Server IP : 192.64.112.168 / Your IP : 13.58.252.71 Web Server : Apache System : Linux nc-ph-2300-85.bluforrest.com 4.18.0-513.9.1.el8_9.x86_64 #1 SMP Sat Dec 2 05:23:44 EST 2023 x86_64 User : expressoneac ( 1128) PHP Version : 8.0.30 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/expressoneac/www/wp-content/plugins/mailchimp-for-wp/includes/admin/ |
Upload File : |
<?php class MC4WP_Admin_Tools { /** * @return string */ public function get_plugin_page() { if (empty($_GET['page'])) { return ''; } $prefix = 'mailchimp-for-wp'; $page = ltrim(substr($_GET['page'], strlen($prefix)), '-'); return $page; } /** * @param string $page * * @return bool */ public function on_plugin_page($page = null) { // any settings page if (is_null($page)) { return isset($_GET['page']) && strpos($_GET['page'], 'mailchimp-for-wp') === 0; } // specific page return $this->get_plugin_page() === $page; } /** * Does the logged-in user have the required capability? * * @return bool */ public function is_user_authorized() { return current_user_can($this->get_required_capability()); } /** * Get required capability to access settings page and view dashboard widgets. * * @return string */ public function get_required_capability() { $capability = 'manage_options'; /** * Filters the required user capability to access the Mailchimp for WordPress' settings pages, view the dashboard widgets. * * Defaults to `manage_options` * * @since 3.0 * @param string $capability * @see https://codex.wordpress.org/Roles_and_Capabilities */ $capability = (string) apply_filters('mc4wp_admin_required_capability', $capability); return $capability; } }