本文整理汇总了PHP中wpseo_remove_capabilities函数的典型用法代码示例。如果您正苦于以下问题:PHP wpseo_remove_capabilities函数的具体用法?PHP wpseo_remove_capabilities怎么用?PHP wpseo_remove_capabilities使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了wpseo_remove_capabilities函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: wpseo_deactivate
/**
* On deactivation, flush the rewrite rules so XML sitemaps stop working.
*/
function wpseo_deactivate()
{
require_once WPSEO_PATH . 'inc/wpseo-functions.php';
flush_rewrite_rules();
wpseo_remove_capabilities();
// Force unschedule
WPSEO_Options::schedule_yoast_tracking(null, get_option('wpseo'), true);
// Clear cache so the changes are obvious.
WPSEO_Options::clear_cache();
do_action('wpseo_deactivate');
}
示例2: _wpseo_deactivate
/**
* On deactivation, flush the rewrite rules so XML sitemaps stop working.
*/
function _wpseo_deactivate()
{
require_once WPSEO_PATH . 'inc/wpseo-functions.php';
if (is_multisite() && ms_is_switched()) {
delete_option('rewrite_rules');
} else {
add_action('shutdown', 'flush_rewrite_rules');
}
wpseo_remove_capabilities();
// Clear cache so the changes are obvious.
WPSEO_Utils::clear_cache();
do_action('wpseo_deactivate');
}
示例3: _wpseo_deactivate
/**
* On deactivation, flush the rewrite rules so XML sitemaps stop working.
*/
function _wpseo_deactivate()
{
require_once WPSEO_PATH . 'inc/wpseo-functions.php';
add_action('shutdown', 'flush_rewrite_rules');
wpseo_remove_capabilities();
// Clear cache so the changes are obvious.
WPSEO_Utils::clear_cache();
do_action('wpseo_deactivate');
}