本文整理匯總了PHP中ITSEC_Core::is_iwp_call方法的典型用法代碼示例。如果您正苦於以下問題:PHP ITSEC_Core::is_iwp_call方法的具體用法?PHP ITSEC_Core::is_iwp_call怎麽用?PHP ITSEC_Core::is_iwp_call使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ITSEC_Core
的用法示例。
在下文中一共展示了ITSEC_Core::is_iwp_call方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: block_long_urls
public function block_long_urls()
{
if (strlen($_SERVER['REQUEST_URI']) <= 255) {
return;
}
if (is_admin()) {
return;
}
if (defined('WP_CLI') && WP_CLI) {
return;
}
if (ITSEC_Core::is_iwp_call()) {
return;
}
if (strpos($_SERVER['REQUEST_URI'], 'infinity=scrolling&action=infinite_scroll')) {
return;
}
// TODO: These checks should not be part of the "Filter Long URL Strings" feature.
if (strpos($_SERVER['REQUEST_URI'], 'eval(') || strpos($_SERVER['REQUEST_URI'], 'CONCAT') || strpos($_SERVER['REQUEST_URI'], 'UNION+SELECT') || strpos($_SERVER['REQUEST_URI'], 'base64')) {
@header('HTTP/1.1 414 Request-URI Too Long');
@header('Status: 414 Request-URI Too Long');
@header('Cache-Control: no-cache, must-revalidate');
@header('Expires: Thu, 22 Jun 1978 00:28:00 GMT');
@header('Connection: Close');
@exit;
}
}
示例2: init
public function init()
{
if (ITSEC_Core::is_iwp_call()) {
return;
}
if (current_user_can('manage_options')) {
return;
}
$settings = ITSEC_Modules::get_settings('multisite-tweaks');
if ($settings['theme_updates']) {
remove_action('load-update-core.php', 'wp_update_themes');
add_filter('pre_site_transient_update_themes', '__return_null');
wp_clear_scheduled_hook('wp_update_themes');
}
if ($settings['plugin_updates']) {
remove_action('load-update-core.php', 'wp_update_plugins');
add_filter('pre_site_transient_update_plugins', '__return_null');
wp_clear_scheduled_hook('wp_update_plugins');
}
if ($settings['core_updates']) {
remove_action('admin_notices', 'update_nag', 3);
add_filter('pre_site_transient_update_core', '__return_null');
wp_clear_scheduled_hook('wp_version_check');
}
}
示例3: block_long_urls
public function block_long_urls()
{
if (strlen($_SERVER['REQUEST_URI']) <= 255) {
return;
}
if (is_admin()) {
return;
}
if (defined('WP_CLI') && WP_CLI) {
return;
}
if (ITSEC_Core::is_iwp_call()) {
return;
}
if (strpos($_SERVER['REQUEST_URI'], 'infinity=scrolling&action=infinite_scroll')) {
return;
}
@header('HTTP/1.1 414 Request-URI Too Long');
@header('Status: 414 Request-URI Too Long');
@header('Cache-Control: no-cache, must-revalidate');
@header('Expires: Thu, 22 Jun 1978 00:28:00 GMT');
@header('Connection: Close');
@exit;
}