예제 #1
0
 /**
  * Run the Yoast SEO 1.5 upgrade routine
  *
  * @param string $version
  */
 private function upgrade_15($version)
 {
     // Clean up options and meta.
     YMBESEO_Options::clean_up(null, $version);
     YMBESEO_Meta::clean_up();
     // Add new capabilities on upgrade.
     YMBESEO_add_capabilities();
 }
예제 #2
0
/**
 * Runs on activation of the plugin.
 */
function _YMBESEO_activate()
{
    require_once YMBESEO_PATH . 'inc/ymbeseo-functions.php';
    YMBESEO_load_textdomain();
    // Make sure we have our translations available for the defaults.
    YMBESEO_Options::get_instance();
    if (!is_multisite()) {
        YMBESEO_Options::initialize();
    } else {
        YMBESEO_Options::maybe_set_multisite_defaults(true);
    }
    YMBESEO_Options::ensure_options_exist();
    add_action('shutdown', 'flush_rewrite_rules');
    YMBESEO_add_capabilities();
    // Clear cache so the changes are obvious.
    YMBESEO_Utils::clear_cache();
    do_action('YMBESEO_activate');
}