forked from 10up/wpcli-vulnerability-scanner
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwpcli-vulnerability-scanner.php
More file actions
33 lines (30 loc) · 1.07 KB
/
wpcli-vulnerability-scanner.php
File metadata and controls
33 lines (30 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
/**
* Plugin Name: 10up WP-CLI Vulnerability Scanner
* Plugin URI: https://github.com/10up/wpcli-vulnerability-scanner
* Description: WP-CLI command only. Check WordPress code, installed plugins and themes for vulnerabilities.
* Version: 1.2.2
* Requires at least: 5.7
* Requires PHP: 7.0
* Tested up to: 6.1
* Author: 10up
* Author URI: https://10up.com
* License: MIT
* License URI: https://spdx.org/licenses/MIT.html
* Update URI: https://github.com/10up/wpcli-vulnerability-scanner
*/
if ( ! defined( 'WP_CLI' ) ) {
return;
}
// Handle installed as a plugin.
if ( ! class_exists( 'Vulnerability_CLI' ) ) {
/**
* Composer check.
*/
if ( file_exists( __DIR__ . '/vendor/autoload.php' ) ) {
require_once __DIR__ . '/vendor/autoload.php';
} else {
WP_CLI::error( 'You appear to be running a development version of 10up WP-CLI Vulnerability Scanner. Please run `composer install` in order for things to work properly.' );
}
}
WP_CLI::add_command( 'vuln', 'Vulnerability_CLI' );