本文整理汇总了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');
}
示例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');
}
示例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);
}
示例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');
}