WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru Получай пассивный доход от сайта с помощью браузерных PUSH уведомлений
функция не описана

WPSEO_Upgrade::__construct() public Yoast 1.0

Class constructor.

{} Это метод класса: WPSEO_Upgrade{}

Хуки из метода
Возвращает

null. Ничего.

Использование

$WPSEO_Upgrade = new WPSEO_Upgrade();
$WPSEO_Upgrade->__construct();

Код WPSEO_Upgrade::__construct() Yoast 16.2

<?php
public function __construct() {
	$this->taxonomy_helper = YoastSEO()->helpers->taxonomy;

	$version = WPSEO_Options::get( 'version' );

	WPSEO_Options::maybe_set_multisite_defaults( false );

	$routines = [
		'1.5.0'      => 'upgrade_15',
		'2.0'        => 'upgrade_20',
		'2.1'        => 'upgrade_21',
		'2.2'        => 'upgrade_22',
		'2.3'        => 'upgrade_23',
		'3.0'        => 'upgrade_30',
		'3.3'        => 'upgrade_33',
		'3.6'        => 'upgrade_36',
		'4.0'        => 'upgrade_40',
		'4.4'        => 'upgrade_44',
		'4.7'        => 'upgrade_47',
		'4.9'        => 'upgrade_49',
		'5.0'        => 'upgrade_50',
		'5.5'        => 'upgrade_55',
		'6.3'        => 'upgrade_63',
		'7.0-RC0'    => 'upgrade_70',
		'7.1-RC0'    => 'upgrade_71',
		'7.3-RC0'    => 'upgrade_73',
		'7.4-RC0'    => 'upgrade_74',
		'7.5.3'      => 'upgrade_753',
		'7.7-RC0'    => 'upgrade_77',
		'7.7.2-RC0'  => 'upgrade_772',
		'9.0-RC0'    => 'upgrade_90',
		'10.0-RC0'   => 'upgrade_100',
		'11.1-RC0'   => 'upgrade_111',
		/** Reset notifications because we removed the AMP Glue plugin notification */
		'12.1-RC0'   => 'clean_all_notifications',
		'12.3-RC0'   => 'upgrade_123',
		'12.4-RC0'   => 'upgrade_124',
		'12.8-RC0'   => 'upgrade_128',
		'13.2-RC0'   => 'upgrade_132',
		'14.0.3-RC0' => 'upgrade_1403',
		'14.1-RC0'   => 'upgrade_141',
		'14.2-RC0'   => 'upgrade_142',
		'14.5-RC0'   => 'upgrade_145',
		'14.9-RC0'   => 'upgrade_149',
		'15.1-RC0'   => 'upgrade_151',
		'15.3-RC0'   => 'upgrade_153',
		'15.5-RC0'   => 'upgrade_155',
		'15.7-RC0'   => 'upgrade_157',
		'15.9.1-RC0' => 'upgrade_1591',
		'16.2-RC0'   => 'upgrade_162',
	];

	array_walk( $routines, [ $this, 'run_upgrade_routine' ], $version );

	if ( version_compare( $version, '12.5-RC0', '<' ) ) {
		/*
		 * We have to run this by hook, because otherwise:
		 * - the theme support check isn't available.
		 * - the notification center notifications are not filled yet.
		 */
		add_action( 'init', [ $this, 'upgrade_125' ] );
	}

	// Since 3.7.
	$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.
	 *
	 * @api string - The current version of Yoast SEO
	 */
	do_action( 'wpseo_run_upgrade', $version );

	$this->finish_up( $version );
}