WPSEO_Upgrade::upgrade_288 │ protected │ Yoast 1.0

Performs the 28.8 upgrade routine. Repairs the timestamps that the settings page stored as the text "null". A site with the schema aggregation endpoint already enabled gets the upgrade time as its timestamp.

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

Хуков нет.

Возвращает

void. Ничего (null).

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

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->upgrade_288();

Код WPSEO_Upgrade::upgrade_288() Yoast 28.9

protected function upgrade_288() {
	if ( ! is_numeric( WPSEO_Options::get( 'schema_aggregation_endpoint_enabled_on' ) ) ) {
		$enabled_on = ( WPSEO_Options::get( 'enable_schema_aggregation_endpoint' ) ) ? time() : null;
		WPSEO_Options::set( 'schema_aggregation_endpoint_enabled_on', $enabled_on, 'wpseo' );
	}

	if ( ! is_numeric( WPSEO_Options::get( 'ai_free_sparks_started_on' ) ) ) {
		WPSEO_Options::set( 'ai_free_sparks_started_on', null, 'wpseo' );
	}
}