WPSEO_Admin::schedule_rewrite_flush()publicYoast 1.0

Schedules a rewrite flush to happen at shutdown.

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

Хуков нет.

Возвращает

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

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

$WPSEO_Admin = new WPSEO_Admin();
$WPSEO_Admin->schedule_rewrite_flush();

Код WPSEO_Admin::schedule_rewrite_flush() Yoast 24.1

public function schedule_rewrite_flush() {
	if ( WPSEO_Options::get( 'stripcategorybase' ) !== true ) {
		return;
	}

	// Bail if this is a multisite installation and the site has been switched.
	if ( is_multisite() && ms_is_switched() ) {
		return;
	}

	add_action( 'shutdown', 'flush_rewrite_rules' );
}