当前位置: 首页>>代码示例>>PHP>>正文


PHP wfUtils::isAdminPageMU方法代码示例

本文整理汇总了PHP中wfUtils::isAdminPageMU方法的典型用法代码示例。如果您正苦于以下问题:PHP wfUtils::isAdminPageMU方法的具体用法?PHP wfUtils::isAdminPageMU怎么用?PHP wfUtils::isAdminPageMU使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在wfUtils的用法示例。


在下文中一共展示了wfUtils::isAdminPageMU方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: admin_menus

 public static function admin_menus()
 {
     if (!wfUtils::isAdmin()) {
         return;
     }
     $warningAdded = false;
     if (get_option('wf_plugin_act_error', false)) {
         if (wfUtils::isAdminPageMU()) {
             add_action('network_admin_notices', 'wordfence::activation_warning');
         } else {
             add_action('admin_notices', 'wordfence::activation_warning');
         }
         $warningAdded = true;
     }
     if (!wfConfig::get('apiKey')) {
         if (wfUtils::isAdminPageMU()) {
             add_action('network_admin_notices', 'wordfence::noKeyError');
         } else {
             add_action('admin_notices', 'wordfence::noKeyError');
         }
         $warningAdded = true;
     }
     if (!$warningAdded) {
         if (wfConfig::get('tourClosed') == '1' && !wfConfig::get('autoUpdate') && !wfConfig::get('autoUpdateChoice')) {
             $warningAdded = true;
             if (wfUtils::isAdminPageMU()) {
                 add_action('network_admin_notices', 'wordfence::autoUpdateNotice');
             } else {
                 add_action('admin_notices', 'wordfence::autoUpdateNotice');
             }
         }
     }
     if (!$warningAdded) {
         if (wfConfig::get('tourClosed') == '1' && (!wfConfig::get('alertEmails') && !wfConfig::get('adminEmailChoice'))) {
             $warningAdded = true;
             if (wfUtils::isAdminPageMU()) {
                 add_action('network_admin_notices', 'wordfence::adminEmailWarning');
             } else {
                 add_action('admin_notices', 'wordfence::adminEmailWarning');
             }
         }
     }
     if (!empty($_GET['page']) && $_GET['page'] === 'WordfenceWAF' && !empty($_GET['wafconfigrebuild']) && !WFWAF_SUBDIRECTORY_INSTALL) {
         check_admin_referer('wafconfigrebuild', 'waf-nonce');
         $storage = wfWAF::getInstance()->getStorageEngine();
         if ($storage instanceof wfWAFStorageFile) {
             $configFile = $storage->getConfigFile();
             if (@unlink($configFile)) {
                 if (function_exists('network_admin_url') && is_multisite()) {
                     $wafMenuURL = network_admin_url('admin.php?page=WordfenceWAF');
                 } else {
                     $wafMenuURL = admin_url('admin.php?page=WordfenceWAF');
                 }
                 wp_redirect($wafMenuURL);
                 exit;
             }
         }
     }
     add_submenu_page("Wordfence", "Scan", "Scan", "activate_plugins", "Wordfence", 'wordfence::menu_scan');
     add_menu_page('Wordfence', 'Wordfence', 'activate_plugins', 'Wordfence', 'wordfence::menu_scan', wfUtils::getBaseURL() . 'images/wordfence-logo-16x16.png');
     add_submenu_page("Wordfence", "Firewall", "Firewall", "activate_plugins", "WordfenceWAF", 'wordfence::menu_waf');
     add_submenu_page("Wordfence", "Live Traffic", "Live Traffic", "activate_plugins", "WordfenceActivity", 'wordfence::menu_activity');
     /* add_submenu_page('Wordfence', 'Site Performance', 'Site Performance', 'activate_plugins', 'WordfenceSitePerfStats', 'wordfence::menu_sitePerfStats'); */
     add_submenu_page('Wordfence', 'Performance Setup', 'Performance Setup', 'activate_plugins', 'WordfenceSitePerf', 'wordfence::menu_sitePerf');
     add_submenu_page('Wordfence', 'Blocked IPs', 'Blocked IPs', 'activate_plugins', 'WordfenceBlockedIPs', 'wordfence::menu_blockedIPs');
     add_submenu_page('Wordfence', 'Password Audit', 'Password Audit', 'activate_plugins', 'WordfencePasswdAudit', 'wordfence::menu_passwd');
     add_submenu_page("Wordfence", "Cellphone Sign-in", "Cellphone Sign-in", "activate_plugins", "WordfenceTwoFactor", 'wordfence::menu_twoFactor');
     add_submenu_page("Wordfence", "Country Blocking", "Country Blocking", "activate_plugins", "WordfenceCountryBlocking", 'wordfence::menu_countryBlocking');
     add_submenu_page("Wordfence", "Scan Schedule", "Scan Schedule", "activate_plugins", "WordfenceScanSchedule", 'wordfence::menu_scanSchedule');
     add_submenu_page("Wordfence", "Whois Lookup", "Whois Lookup", "activate_plugins", "WordfenceWhois", 'wordfence::menu_whois');
     add_submenu_page("Wordfence", "Advanced Blocking", "Advanced Blocking", "activate_plugins", "WordfenceRangeBlocking", 'wordfence::menu_rangeBlocking');
     add_submenu_page("Wordfence", "Options", "Options", "activate_plugins", "WordfenceSecOpt", 'wordfence::menu_options');
     add_submenu_page("Wordfence", "Diagnostics", "Diagnostics", "activate_plugins", "WordfenceDiagnostic", 'wordfence::menu_diagnostic');
 }
开发者ID:ashenkar,项目名称:sanga,代码行数:74,代码来源:wordfenceClass.php

示例2: admin_menus

 public static function admin_menus()
 {
     if (!wfUtils::isAdmin()) {
         return;
     }
     $warningAdded = false;
     if (get_option('wf_plugin_act_error', false)) {
         if (wfUtils::isAdminPageMU()) {
             add_action('network_admin_notices', 'wordfence::activation_warning');
         } else {
             add_action('admin_notices', 'wordfence::activation_warning');
         }
         $warningAdded = true;
     }
     if (!wfConfig::get('apiKey')) {
         if (wfUtils::isAdminPageMU()) {
             add_action('network_admin_notices', 'wordfence::noKeyError');
         } else {
             add_action('admin_notices', 'wordfence::noKeyError');
         }
         $warningAdded = true;
     }
     if (!$warningAdded) {
         if (wfConfig::get('tourClosed') == '1' && !wfConfig::get('autoUpdate') && !wfConfig::get('autoUpdateChoice')) {
             $warningAdded = true;
             if (wfUtils::isAdminPageMU()) {
                 add_action('network_admin_notices', 'wordfence::autoUpdateNotice');
             } else {
                 add_action('admin_notices', 'wordfence::autoUpdateNotice');
             }
         }
     }
     if (!$warningAdded) {
         if (wfConfig::get('tourClosed') == '1' && !wfConfig::get('alertEmails')) {
             $warningAdded = true;
             if (wfUtils::isAdminPageMU()) {
                 add_action('network_admin_notices', 'wordfence::adminEmailWarning');
             } else {
                 add_action('admin_notices', 'wordfence::adminEmailWarning');
             }
         }
     }
     add_submenu_page("Wordfence", "Scan", "Scan", "activate_plugins", "Wordfence", 'wordfence::menu_scan');
     add_menu_page('Wordfence', 'Wordfence', 'activate_plugins', 'Wordfence', 'wordfence::menu_scan', wfUtils::getBaseURL() . 'images/wordfence-logo-16x16.png');
     add_submenu_page("Wordfence", "Live Traffic", "Live Traffic", "activate_plugins", "WordfenceActivity", 'wordfence::menu_activity');
     /* add_submenu_page('Wordfence', 'Site Performance', 'Site Performance', 'activate_plugins', 'WordfenceSitePerfStats', 'wordfence::menu_sitePerfStats'); */
     add_submenu_page('Wordfence', 'Performance Setup', 'Performance Setup', 'activate_plugins', 'WordfenceSitePerf', 'wordfence::menu_sitePerf');
     add_submenu_page('Wordfence', 'Blocked IPs', 'Blocked IPs', 'activate_plugins', 'WordfenceBlockedIPs', 'wordfence::menu_blockedIPs');
     add_submenu_page('Wordfence', 'Password Audit', 'Password Audit', 'activate_plugins', 'WordfencePasswdAudit', 'wordfence::menu_passwd');
     add_submenu_page("Wordfence", "Cellphone Sign-in", "Cellphone Sign-in", "activate_plugins", "WordfenceTwoFactor", 'wordfence::menu_twoFactor');
     add_submenu_page("Wordfence", "Country Blocking", "Country Blocking", "activate_plugins", "WordfenceCountryBlocking", 'wordfence::menu_countryBlocking');
     add_submenu_page("Wordfence", "Scan Schedule", "Scan Schedule", "activate_plugins", "WordfenceScanSchedule", 'wordfence::menu_scanSchedule');
     add_submenu_page("Wordfence", "Whois Lookup", "Whois Lookup", "activate_plugins", "WordfenceWhois", 'wordfence::menu_whois');
     add_submenu_page("Wordfence", "Advanced Blocking", "Advanced Blocking", "activate_plugins", "WordfenceRangeBlocking", 'wordfence::menu_rangeBlocking');
     add_submenu_page("Wordfence", "Options", "Options", "activate_plugins", "WordfenceSecOpt", 'wordfence::menu_options');
 }
开发者ID:rinodung,项目名称:myfreetheme,代码行数:56,代码来源:wordfenceClass.php

示例3: admin_menus

 public static function admin_menus()
 {
     if (!wfUtils::isAdmin()) {
         return;
     }
     $warningAdded = false;
     if (get_option('wf_plugin_act_error', false)) {
         if (wfUtils::isAdminPageMU()) {
             add_action('network_admin_notices', 'wordfence::activation_warning');
         } else {
             add_action('admin_notices', 'wordfence::activation_warning');
         }
         $warningAdded = true;
     }
     if (!wfConfig::get('apiKey')) {
         if (wfUtils::isAdminPageMU()) {
             add_action('network_admin_notices', 'wordfence::noKeyError');
         } else {
             add_action('admin_notices', 'wordfence::noKeyError');
         }
         $warningAdded = true;
     }
     $page = isset($_GET['page']) ? $_GET['page'] : '';
     if ((wfConfig::get('cacheType') == 'php' || wfConfig::get('cacheType') == 'falcon') && !wfConfig::get('falconDeprecationChoice') && $page != 'WordfenceSitePerf') {
         $warningAdded = true;
         if (wfUtils::isAdminPageMU()) {
             add_action('network_admin_notices', 'wordfence::falconDeprecationWarning');
         } else {
             add_action('admin_notices', 'wordfence::falconDeprecationWarning');
         }
     }
     if (!$warningAdded) {
         if (wfConfig::get('tourClosed') == '1' && !wfConfig::get('autoUpdate') && !wfConfig::get('autoUpdateChoice')) {
             $warningAdded = true;
             if (wfUtils::isAdminPageMU()) {
                 add_action('network_admin_notices', 'wordfence::autoUpdateNotice');
             } else {
                 add_action('admin_notices', 'wordfence::autoUpdateNotice');
             }
         }
     }
     if (!$warningAdded) {
         if (wfConfig::get('tourClosed') == '1' && (!wfConfig::get('alertEmails') && !wfConfig::get('adminEmailChoice'))) {
             $warningAdded = true;
             if (wfUtils::isAdminPageMU()) {
                 add_action('network_admin_notices', 'wordfence::adminEmailWarning');
             } else {
                 add_action('admin_notices', 'wordfence::adminEmailWarning');
             }
         }
     }
     if (!empty($_GET['page']) && $_GET['page'] === 'WordfenceWAF' && !empty($_GET['wafconfigrebuild']) && !WFWAF_SUBDIRECTORY_INSTALL) {
         check_admin_referer('wafconfigrebuild', 'waf-nonce');
         $storage = wfWAF::getInstance()->getStorageEngine();
         if ($storage instanceof wfWAFStorageFile) {
             $configFile = $storage->getConfigFile();
             if (@unlink($configFile)) {
                 if (function_exists('network_admin_url') && is_multisite()) {
                     $wafMenuURL = network_admin_url('admin.php?page=WordfenceWAF');
                 } else {
                     $wafMenuURL = admin_url('admin.php?page=WordfenceWAF');
                 }
                 wp_redirect($wafMenuURL);
                 exit;
             }
         }
     }
     add_submenu_page("Wordfence", "Scan", "Scan", "activate_plugins", "Wordfence", 'wordfence::menu_scan');
     add_menu_page('Wordfence', 'Wordfence', 'activate_plugins', 'Wordfence', 'wordfence::menu_scan', wfUtils::getBaseURL() . 'images/wordfence-logo-16x16.png');
     add_submenu_page("Wordfence", "Firewall", "Firewall", "activate_plugins", "WordfenceWAF", 'wordfence::menu_waf');
     add_submenu_page("Wordfence", "Live Traffic", "Live Traffic", "activate_plugins", "WordfenceActivity", 'wordfence::menu_activity');
     /* add_submenu_page('Wordfence', 'Site Performance', 'Site Performance', 'activate_plugins', 'WordfenceSitePerfStats', 'wordfence::menu_sitePerfStats'); */
     if (wfConfig::get('wf621HadFalconEnabled') || defined('WF_ENABLE_FALCON') && WF_ENABLE_FALCON) {
         add_submenu_page('Wordfence', 'Performance Setup', 'Performance Setup', 'activate_plugins', 'WordfenceSitePerf', 'wordfence::menu_sitePerf');
     }
     add_submenu_page('Wordfence', 'Blocked IPs', 'Blocked IPs', 'activate_plugins', 'WordfenceBlockedIPs', 'wordfence::menu_blockedIPs');
     add_submenu_page('Wordfence', 'Password Audit', 'Password Audit', 'activate_plugins', 'WordfencePasswdAudit', 'wordfence::menu_passwd');
     add_submenu_page("Wordfence", "Cellphone Sign-in", "Cellphone Sign-in", "activate_plugins", "WordfenceTwoFactor", 'wordfence::menu_twoFactor');
     add_submenu_page("Wordfence", "Country Blocking", "Country Blocking", "activate_plugins", "WordfenceCountryBlocking", 'wordfence::menu_countryBlocking');
     add_submenu_page("Wordfence", "Scan Schedule", "Scan Schedule", "activate_plugins", "WordfenceScanSchedule", 'wordfence::menu_scanSchedule');
     add_submenu_page("Wordfence", "Whois Lookup", "Whois Lookup", "activate_plugins", "WordfenceWhois", 'wordfence::menu_whois');
     add_submenu_page("Wordfence", "Advanced Blocking", "Advanced Blocking", "activate_plugins", "WordfenceRangeBlocking", 'wordfence::menu_rangeBlocking');
     add_submenu_page("Wordfence", "Options", "Options", "activate_plugins", "WordfenceSecOpt", 'wordfence::menu_options');
     add_submenu_page("Wordfence", "Diagnostics", "Diagnostics", "activate_plugins", "WordfenceDiagnostic", 'wordfence::menu_diagnostic');
     if (wfConfig::get('isPaid')) {
         add_submenu_page("Wordfence", "Protect More Sites", "<strong id=\"wfMenuCallout\" style=\"color: #FCB214;\">Protect More Sites</strong>", "activate_plugins", "WordfenceProtectMoreSites", 'wordfence::menu_diagnostic');
     } else {
         add_submenu_page("Wordfence", "Upgrade To Premium", "<strong id=\"wfMenuCallout\" style=\"color: #FCB214;\">Upgrade To Premium</strong>", "activate_plugins", "WordfenceUpgradeToPremium", 'wordfence::menu_diagnostic');
     }
     add_filter('clean_url', 'wordfence::_patchWordfenceSubmenuCallout', 10, 3);
 }
开发者ID:Jerram-Marketing,项目名称:Gummer-Co,代码行数:91,代码来源:wordfenceClass.php

示例4: admin_menus

 public static function admin_menus()
 {
     if (!wfUtils::isAdmin()) {
         return;
     }
     $warningAdded = false;
     if (get_option('wf_plugin_act_error', false)) {
         if (wfUtils::isAdminPageMU()) {
             add_action('network_admin_notices', 'wordfence::activation_warning');
         } else {
             add_action('admin_notices', 'wordfence::activation_warning');
         }
         $warningAdded = true;
     }
     if (!wfConfig::get('apiKey')) {
         if (wfUtils::isAdminPageMU()) {
             add_action('network_admin_notices', 'wordfence::noKeyError');
         } else {
             add_action('admin_notices', 'wordfence::noKeyError');
         }
         $warningAdded = true;
     }
     if (!$warningAdded) {
         if (wfConfig::get('tourClosed') == '1' && !wfConfig::get('alertEmails')) {
             if (wfUtils::isAdminPageMU()) {
                 add_action('network_admin_notices', 'wordfence::adminEmailWarning');
             } else {
                 add_action('admin_notices', 'wordfence::adminEmailWarning');
             }
         }
     }
     /*
     if(is_plugin_active('w3-total-cache/w3-total-cache.php') && wfConfig::get('liveTrafficEnabled')){
     	wfConfig::set('liveTrafficEnabled', 0);
     	if(wfUtils::isAdminPageMU()){
     		add_action('network_admin_notices', 'wordfence::liveTrafficW3TCWarning');
     	} else {
     		add_action('admin_notices', 'wordfence::liveTrafficW3TCWarning');
     	}
     }
     if(is_plugin_active('wp-super-cache/wp-cache.php') && wfConfig::get('liveTrafficEnabled')){
     	wfConfig::set('liveTrafficEnabled', 0);
     	if(wfUtils::isAdminPageMU()){
     		add_action('network_admin_notices', 'wordfence::liveTrafficSuperCacheWarning');
     	} else {
     		add_action('admin_notices', 'wordfence::liveTrafficSuperCacheWarning');
     	}
     }
     */
     add_submenu_page("Wordfence", "Scan", "Scan", "activate_plugins", "Wordfence", 'wordfence::menu_scan');
     add_menu_page('Wordfence', 'Wordfence', 'activate_plugins', 'Wordfence', 'wordfence::menu_scan', wfUtils::getBaseURL() . 'images/wordfence-logo-16x16.png');
     if (wfConfig::get('liveTrafficEnabled')) {
         add_submenu_page("Wordfence", "Live Traffic", "Live Traffic", "activate_plugins", "WordfenceActivity", 'wordfence::menu_activity');
     }
     add_submenu_page('Wordfence', 'Blocked IPs', 'Blocked IPs', 'activate_plugins', 'WordfenceBlockedIPs', 'wordfence::menu_blockedIPs');
     add_submenu_page("Wordfence", "Cellphone Sign-in", "Cellphone Sign-in", "activate_plugins", "WordfenceTwoFactor", 'wordfence::menu_twoFactor');
     add_submenu_page("Wordfence", "Country Blocking", "Country Blocking", "activate_plugins", "WordfenceCountryBlocking", 'wordfence::menu_countryBlocking');
     add_submenu_page("Wordfence", "Scan Schedule", "Scan Schedule", "activate_plugins", "WordfenceScanSchedule", 'wordfence::menu_scanSchedule');
     add_submenu_page("Wordfence", "Whois Lookup", "Whois Lookup", "activate_plugins", "WordfenceWhois", 'wordfence::menu_whois');
     add_submenu_page("Wordfence", "Advanced Blocking", "Advanced Blocking", "activate_plugins", "WordfenceRangeBlocking", 'wordfence::menu_rangeBlocking');
     add_submenu_page("Wordfence", "Options", "Options", "activate_plugins", "WordfenceSecOpt", 'wordfence::menu_options');
 }
开发者ID:verbazend,项目名称:AWFA,代码行数:62,代码来源:wordfenceClass.php


注:本文中的wfUtils::isAdminPageMU方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。