WPSEO_Options::reset()public staticYoast 1.0

Reset all options to their default values and rerun some tests.

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

Хуков нет.

Возвращает

null. Ничего.

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

$result = WPSEO_Options::reset();

Код WPSEO_Options::reset() Yoast 19.6.1

public static function reset() {
	if ( ! is_multisite() ) {
		$option_names = static::get_option_names();
		if ( is_array( $option_names ) && $option_names !== [] ) {
			foreach ( $option_names as $option_name ) {
				delete_option( $option_name );
				update_option( $option_name, get_option( $option_name ) );
			}
		}
		unset( $option_names );
	}
	else {
		// Reset MS blog based on network default blog setting.
		static::reset_ms_blog( get_current_blog_id() );
	}

	static::initialize();
}