×
×
×
Settings', AOWPCS_PLUGIN_IDENTIFIER)), array('tab2', 'all-in-one-wp-content-security-admin&con=about', 'fa-info-circle', __(' About', AOWPCS_PLUGIN_IDENTIFIER)), array('tab3', 'all-in-one-wp-content-security-admin&con=donate', 'fa-info-circle', __(' Say Thanks', AOWPCS_PLUGIN_IDENTIFIER)) ); $menu = null; foreach ($list as $item => $value) { $menu .= '
'; } 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'); 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'; } $data = update_option('_all_in_one_wp_content_security', $opts); header('location:' . admin_url('options-general.php?page=all-in-one-wp-content-security-admin') . '&status=updated'); die(); } } /** * 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)); } if (@$_GET['con'] == 'about') { $this->return_about_page(); } else if (@$_GET['con'] == 'donate') { $this->return_donate_page(); } else { ?>© - created by Mahesh Mohan Thorat