updated plugin WPScan version 1.15.4

This commit is contained in:
2021-07-25 23:25:13 +00:00
committed by Gitium
parent aa6967db92
commit 0a73b21fab
19 changed files with 228 additions and 156 deletions

View File

@ -82,6 +82,7 @@ class Settings {
register_setting( $this->page, $this->parent->OPT_IGNORE_ITEMS );
register_setting( $this->page, $this->parent->OPT_SCANNING_INTERVAL, 'sanitize_text_field' );
register_setting( $this->page, $this->parent->OPT_SCANNING_TIME, 'sanitize_text_field' );
register_setting( $this->page, $this->parent->OPT_DISABLE_CHECKS, array( 'type' => 'boolean', 'default' => '0' ) );
$section = $this->page . '_section';
@ -116,6 +117,14 @@ class Settings {
$section
);
add_settings_field(
$this->parent->OPT_DISABLE_CHECKS,
__( 'Disable Security Checks', 'wpscan' ),
array( $this, 'field_disable_security_checks' ),
$this->page,
$section
);
add_settings_field(
$this->parent->OPT_IGNORE_ITEMS,
__( 'Ignore Items', 'wpscan' ),
@ -197,7 +206,7 @@ class Settings {
*/
public function page() {
echo '<div class="wrap">';
echo '<h1><img src="' . $this->parent->plugin_url . 'assets/svg/logo.svg" alt="WPScan"></h1>';
echo '<h1><img src="' . plugin_dir_url( dirname( __FILE__ ) ) . 'assets/svg/logo.svg" alt="WPScan"></h1>';
echo '<h2>' . __( 'Settings', 'wpscan' ) . '</h2>';
@ -323,6 +332,21 @@ class Settings {
echo '</p><br/>';
}
/**
* Disable security checks field
*
* @since 1.15.2
* @access public
* @return string
*/
public function field_disable_security_checks() {
$opt = $this->parent->OPT_DISABLE_CHECKS;
$value = get_option( $opt, array() );
$checked = $value === '1' ? 'checked' : null;
echo "<input name='{$opt}' type='checkbox' $checked value='1' >";
}
/**
* Ignore items field