/** * Class constructor */ public function __construct() { $this->options = WPSEO_Options::get_option('wpseo'); WPSEO_Options::maybe_set_multisite_defaults(false); if (version_compare($this->options['version'], '1.5.0', '<')) { $this->upgrade_15($this->options['version']); } if (version_compare($this->options['version'], '2.0', '<')) { $this->upgrade_20(); } if (version_compare($this->options['version'], '2.1', '<')) { $this->upgrade_21(); } if (version_compare($this->options['version'], '2.2', '<')) { $this->upgrade_22(); } if (version_compare($this->options['version'], '2.3', '<')) { $this->upgrade_23(); } if (version_compare($this->options['version'], '3.0', '<')) { $this->upgrade_30(); } if (version_compare($this->options['version'], '3.3', '<')) { $this->upgrade_33(); } if (version_compare($this->options['version'], '3.6', '<')) { $this->upgrade_36(); } // Since 3.7. $features = new WPSEO_Features(); if (!$features->is_premium()) { $upsell_notice = new WPSEO_Product_Upsell_Notice(); $upsell_notice->set_upgrade_notice(); } /** * Filter: 'wpseo_run_upgrade' - Runs the upgrade hook which are dependent on Yoast SEO * * @deprecated Since 3.1 * * @api string - The current version of Yoast SEO */ do_action('wpseo_run_upgrade', $this->options['version']); $this->finish_up(); }
/** * Sets the upsell notice. */ protected function set_upsell_notice() { $upsell = new WPSEO_Product_Upsell_Notice(); $upsell->dismiss_notice_listener(); $upsell->initialize(); }