WPSEO_Upgrade::upgrade_202()privateYoast 1.0

Performs the 20.2 upgrade routine.

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

Хуков нет.

Возвращает

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

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

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

Код WPSEO_Upgrade::upgrade_202() Yoast 22.3

private function upgrade_202() {
	if ( WPSEO_Options::get( 'disable-attachment', true ) ) {
		$attachment_cleanup_helper = YoastSEO()->helpers->attachment_cleanup;

		$attachment_cleanup_helper->remove_attachment_indexables( true );
		$attachment_cleanup_helper->clean_attachment_links_from_target_indexable_ids( true );
	}

	$this->clean_unindexed_indexable_rows_with_no_object_id();

	if ( ! wp_next_scheduled( Cleanup_Integration::START_HOOK ) ) {
		// This schedules the cleanup routine cron again, since in combination of premium cleans up the prominent words table. We also want to cleanup possible orphaned hierarchies from the above cleanups.
		wp_schedule_single_event( ( time() + ( MINUTE_IN_SECONDS * 5 ) ), Cleanup_Integration::START_HOOK );
	}
}