Settings', 'all-in-one-wp-content-security')), array('tab2', 'all-in-one-wp-content-security-admin&con=about', 'fa-info-circle', __(' About', 'all-in-one-wp-content-security')), array('tab3', 'all-in-one-wp-content-security-admin&con=donate', 'fa-info-circle', __(' Say Thanks', 'all-in-one-wp-content-security')) ); $menu = null; foreach ($list as $item => $value) { $menu .= '
' . $value[3] . '
'; } echo wp_kses_post($menu); } /** * Register the stylesheet file(s) for the dashboard area */ public function enqueue_backend_standalone() { wp_register_style($this->plugin_name . '-standalone', plugin_dir_url(__FILE__) . 'assets/styles/standalone.css', array(), $this->version, 'all'); wp_enqueue_style($this->plugin_name . '-standalone'); } /** * Update `Options` on form submit */ public function return_update_options() { if ((isset($_POST['all-in-one-wp-content-security-update-option'])) && ($_POST['all-in-one-wp-content-security-update-option'] == 'true') && check_admin_referer('pwm-referer-form', 'pwm-referer-option') ) { $opts = array('block_selection' => 'off', 'block_image_dragging' => 'off', 'loadtime' => 'off', 'block_hacking_website' => 'off', 'enhanced_web_security' => 'off'); if (isset($_POST['_all_in_one_wp_content_security']['block_selection'])) { $opts['block_selection'] = 'on'; } if (isset($_POST['_all_in_one_wp_content_security']['block_image_dragging'])) { $opts['block_image_dragging'] = 'on'; } if (isset($_POST['_all_in_one_wp_content_security']['block_right_clicking'])) { $opts['block_right_clicking'] = 'on'; } if (isset($_POST['_all_in_one_wp_content_security']['block_hacking_website'])) { $opts['block_hacking_website'] = 'on'; } if (isset($_POST['_all_in_one_wp_content_security']['enhanced_web_security'])) { $opts['enhanced_web_security'] = 'on'; self::update_htaccess_security_headers(true); } else { $opts['enhanced_web_security'] = 'off'; self::update_htaccess_security_headers(false); } if (isset($_POST['_all_in_one_wp_content_security']['disable_xmlrpc'])) { $opts['disable_xmlrpc'] = 'on'; self::update_htaccess_xmlrpc_restriction(true); } else { $opts['disable_xmlrpc'] = 'off'; self::update_htaccess_xmlrpc_restriction(false); } update_option('_all_in_one_wp_content_security', $opts); $this->notice = array('success', __('Your settings have been successfully updated.', 'all-in-one-wp-content-security')); // header('location:' . admin_url('options-general.php?page=all-in-one-wp-content-security-admin') . '&status=updated'); // die(); } } public static function check_htaccess_permissions() { $htaccess_file = ABSPATH . '.htaccess'; // Path to .htaccess file if (!file_exists($htaccess_file)) { return "Error: .htaccess file does not exist."; } $permissions = fileperms($htaccess_file) & 0777; // Get permissions $permissions_octal = sprintf("%o", $permissions); // Convert to octal format return $permissions_octal; } public static function update_htaccess_security_headers($enable) { $htaccess_file = ABSPATH . '.htaccess'; // Path to .htaccess file if (!is_writable($htaccess_file)) { return; } $security_headers = << Header set X-XSS-Protection "1; mode=block" Header set X-Frame-Options "SAMEORIGIN" Header set X-Content-Type-Options "nosniff" Header always set Strict-Transport-Security "max-age=63072000; includeSubDomains" Header set Referrer-Policy "same-origin" Header set Feature-Policy "geolocation 'self'; vibrate 'none'" Header set Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; object-src 'none'" Header set Permissions-Policy "geolocation=(self 'none'); vibrate=(self 'none')" Header always set Access-Control-Allow-Origin "ADD YOUR SITE URL" Header always set Expect-CT "enforce, max-age=86400" # END All-in-One WP Content Security EOT; $htaccess_content = file_get_contents($htaccess_file); if ($enable) { if (strpos($htaccess_content, '# BEGIN All-in-One WP Content Security') === false) { file_put_contents($htaccess_file, PHP_EOL . $security_headers . PHP_EOL, FILE_APPEND); } } else { $htaccess_content = preg_replace('/# BEGIN All-in-One WP Content Security.*?# END All-in-One WP Content Security/s', '', $htaccess_content); file_put_contents($htaccess_file, $htaccess_content); } } public static function update_htaccess_xmlrpc_restriction($enable) { $htaccess_file = ABSPATH . '.htaccess'; // Path to .htaccess file if (!file_exists($htaccess_file)) { return "Error: .htaccess file does not exist."; } $permissions = fileperms($htaccess_file) & 0777; if ($permissions == 0444) { return "Error: .htaccess file is read-only (444). Please change it to 644 or 755 to allow modifications."; } $xmlrpc_rule = << Order Deny,Allow Deny from all # END XMLRPC Restriction EOT; $htaccess_content = file_get_contents($htaccess_file); if ($enable) { if (strpos($htaccess_content, '# BEGIN XMLRPC Restriction') === false) { file_put_contents($htaccess_file, PHP_EOL . $xmlrpc_rule . PHP_EOL, FILE_APPEND); } } else { $htaccess_content = preg_replace('/# BEGIN XMLRPC Restriction.*?# END XMLRPC Restriction/s', '', $htaccess_content); file_put_contents($htaccess_file, $htaccess_content); } } /** * Return the `Options` page */ public function return_options_page() { $opts = get_option('_all_in_one_wp_content_security'); // if ((isset($_GET['status'])) && ($_GET['status'] == 'updated')) { // $notice = array('success', __('Your settings have been successfully updated.', AOWPCS_PLUGIN_IDENTIFIER)); // } $nonce = wp_create_nonce('all-in-one-wp-content-security'); if (isset($_GET['con']) && $_GET['con'] == 'about' && wp_verify_nonce($nonce, 'all-in-one-wp-content-security')) { $this->return_about_page(); } else if (isset($_GET['con']) && $_GET['con'] == 'donate' && wp_verify_nonce($nonce, 'all-in-one-wp-content-security')) { $this->return_donate_page(); } else { ?>
return_plugin_header()); ?>
return_tabs_menu('tab1')); ?>
notice) && !empty($this->notice)) { ?>
× notice[1], AOWPCS_PLUGIN_IDENTIFIER); ?>
×
×

Current .htaccess file permissions:

Current .htaccess file permissions:

' . AOWPCS_PLUGIN_FULLNAME . ''; return $html; } /** * Return the `About` page */ public function return_about_page() { ?>
return_plugin_header()); ?>
return_tabs_menu('tab3')); ?>

Scan below code



Mr Mahesh Mohan Thorat

UPI - maheshmthorat@oksbi

request); $printHTML = '

We strongly not supporting to Inspect Element in Browser.
Please reload page'; ?> " . __('Settings') . '', "Say Thanks"]; $links = array_merge( $settings_link, $links ); return $links; } } ?>