Example #1
0
/**
 * 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');
}
/**
 * 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');
}
Example #3
0
/**
 * 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');
}