Example #1
0
 public function add_admin_pages()
 {
     $capability = ITSEC_Core::get_required_cap();
     $page_refs = array();
     add_menu_page(__('Settings', 'better-wp-security'), __('Security', 'better-wp-security'), $capability, 'itsec', array($this, 'show_page'));
     $page_refs[] = add_submenu_page('itsec', __('iThemes Security Settings', 'better-wp-security'), __('Settings', 'better-wp-security'), $capability, 'itsec', array($this, 'show_page'));
     $page_refs[] = add_submenu_page('itsec', '', __('Security Check', 'better-wp-security'), $capability, 'itsec-security-check', array($this, 'show_page'));
     $page_refs[] = add_submenu_page('itsec', __('iThemes Security Logs', 'better-wp-security'), __('Logs', 'better-wp-security'), $capability, 'itsec-logs', array($this, 'show_page'));
     if (!ITSEC_Core::is_pro()) {
         $page_refs[] = add_submenu_page('itsec', '', '<span style="color:#2EA2CC">' . __('Go Pro', 'better-wp-security') . '</span>', $capability, 'itsec-go-pro', array($this, 'show_page'));
     }
     foreach ($page_refs as $page_ref) {
         add_action("load-{$page_ref}", array($this, 'load'));
     }
 }
 public function add_footer()
 {
     $footer = '';
     if (!ITSEC_Core::is_pro()) {
         $callout = $this->get_template('pro-callout.html');
         $replacements = array('two_factor' => esc_html__('Want two-factor authentication, scheduled malware scanning, ticketed support and more?', 'better-wp-security'), 'get_pro' => esc_html__('Get iThemes Security Pro', 'better-wp-security'), 'why_pro' => sprintf(wp_kses(__('Why go Pro? <a href="%s">Check out the Free/Pro comparison chart.</a>', 'better-wp-security'), array('a' => array('href' => array()))), esc_url('https://ithemes.com/security/why-go-pro/')));
         $footer .= $this->replace_all($callout, $replacements);
     } else {
         $this->add_divider();
     }
     $footer .= $this->get_template('footer.html');
     $replacements = array('security_resources' => esc_html__('Security Resources', 'better-wp-security'), 'articles' => esc_html__('Articles', 'better-wp-security'), 'articles_content' => sprintf(wp_kses(__('Read the latest in WordPress Security news, tips, and updates on <a href="%s">iThemes Blog</a>.', 'better-wp-security'), array('a' => array('href' => array()))), esc_url('https://ithemes.com/category/wordpress-security/')), 'tutorials' => esc_html__('Tutorials', 'better-wp-security'), 'tutorials_content' => sprintf(wp_kses(__('Make the most of iThemes Security features with our <a href="%s">free iThemes Security tutorials</a>.', 'better-wp-security'), array('a' => array('href' => array()))), esc_url('https://ithemes.com/tutorial/category/ithemes-security/')), 'help_and_support' => esc_html__('Help & Support', 'better-wp-security'), 'documentation' => esc_html__('Documentation', 'better-wp-security'), 'documentation_content' => sprintf(wp_kses(__('Read iThemes Security documentation and Frequently Asked Questions on <a href="%s">the Codex</a>.', 'better-wp-security'), array('a' => array('href' => array()))), esc_url('http://ithemes.com/codex/page/IThemes_Security')), 'support' => esc_html__('Support', 'better-wp-security'), 'pro' => esc_html__('Pro', 'better-wp-security'), 'support_content' => sprintf(wp_kses(__('Pro customers can contact <a href="%s">iThemes Helpdesk</a> for help. Our support team answers questions Monday – Friday, 8am – 5pm (CST).', 'better-wp-security'), array('a' => array('href' => array()))), esc_url('https://members.ithemes.com/panel/helpdesk.php')), 'security_settings_link' => esc_url(ITSEC_Core::get_settings_page_url()), 'unsubscribe_link_text' => esc_html__('This email was generated by the iThemes Security plugin.', 'better-wp-security') . '<br>' . esc_html__('To unsubscribe from these updates, visit the Settings page in the iThemes Security plugin menu.', 'better-wp-security'), 'security_guide' => esc_html__('Free WordPress Security Guide', 'better-wp-security'), 'security_guide_content' => sprintf(wp_kses(__('Learn simple WordPress security tips — including 3 kinds of security your site needs and 4 best security practices for keeping your WordPress site safe with our <a href="%s">free guide</a>.', 'better-wp-security'), array('a' => array('href' => array()))), esc_url('https://ithemes.com/publishing/wordpress-security/')));
     $footer = $this->replace_all($footer, $replacements);
     $this->content .= $footer;
 }
 public function register_modules()
 {
     $path = dirname(__FILE__);
     include "{$path}/modules/security-check/init.php";
     include "{$path}/modules/global/init.php";
     include "{$path}/modules/404-detection/init.php";
     include "{$path}/modules/away-mode/init.php";
     include "{$path}/modules/ban-users/init.php";
     include "{$path}/modules/brute-force/init.php";
     include "{$path}/modules/core/init.php";
     include "{$path}/modules/backup/init.php";
     include "{$path}/modules/file-change/init.php";
     include "{$path}/modules/file-permissions/init.php";
     include "{$path}/modules/hide-backend/init.php";
     include "{$path}/modules/ipcheck/init.php";
     include "{$path}/modules/malware/init.php";
     include "{$path}/modules/ssl/init.php";
     include "{$path}/modules/strong-passwords/init.php";
     include "{$path}/modules/system-tweaks/init.php";
     include "{$path}/modules/wordpress-tweaks/init.php";
     include "{$path}/modules/multisite-tweaks/init.php";
     include "{$path}/modules/admin-user/init.php";
     include "{$path}/modules/salts/init.php";
     include "{$path}/modules/content-directory/init.php";
     include "{$path}/modules/database-prefix/init.php";
     include "{$path}/modules/file-writing/init.php";
     if (!ITSEC_Core::is_pro()) {
         include "{$path}/modules/pro/init.php";
     }
 }