You appear to be a bot. Output may be restricted
Description
Runs on activation of the plugin.
Usage
_wpseo_activate();
Parameters
Returns
void
Source
File name: wordpress-seo/wp-seo-main.php
Lines:
1 to 48 of 48
function _wpseo_activate() { require_once WPSEO_PATH . 'inc/wpseo-functions.php'; require_once WPSEO_PATH . 'inc/class-wpseo-installation.php'; wpseo_load_textdomain(); // Make sure we have our translations available for the defaults. new WPSEO_Installation(); WPSEO_Options::get_instance(); if ( ! is_multisite() ) { WPSEO_Options::initialize(); } else { WPSEO_Options::maybe_set_multisite_defaults( true ); } WPSEO_Options::ensure_options_exist(); if ( is_multisite() && ms_is_switched() ) { delete_option( 'rewrite_rules' ); } else { $wpseo_rewrite = new WPSEO_Rewrite(); $wpseo_rewrite->schedule_flush(); } // Reset tracking to be disabled by default. if ( ! WPSEO_Utils::is_yoast_seo_premium() ) { WPSEO_Options::set( 'tracking', false ); } WPSEO_Options::set( 'indexing_reason', 'first_install' ); do_action( 'wpseo_register_roles' ); WPSEO_Role_Manager_Factory::get()->add(); do_action( 'wpseo_register_capabilities' ); WPSEO_Capability_Manager_Factory::get()->add(); // Clear cache so the changes are obvious. WPSEO_Utils::clear_cache(); // Schedule cronjob when it doesn't exists on activation. $wpseo_ryte = new WPSEO_Ryte(); $wpseo_ryte->activate_hooks(); do_action( 'wpseo_activate' ); }