WP_Super_Cache_Rest_Update_Settings::restore_default_settings()protectedWPSCache 1.0

Delete the plugin configuration file and restore the sample one.

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

Хуков нет.

Возвращает

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

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

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->restore_default_settings( $parameters );
$parameters (обязательный)
-

Код WP_Super_Cache_Rest_Update_Settings::restore_default_settings() WPSCache 1.12.0

protected function restore_default_settings( $parameters ) {
	global $wp_cache_config_file, $wp_cache_config_file_sample;

	if ( file_exists( $wp_cache_config_file_sample ) ) {
		copy( $wp_cache_config_file_sample, $wp_cache_config_file );
		$cache_page_secret = md5( date( 'H:i:s' ) . mt_rand() );
		wp_cache_setting( 'cache_page_secret', $cache_page_secret );

		if ( function_exists( "opcache_invalidate" ) ) {
			@opcache_invalidate( $wp_cache_config_file );
		}
	}
	wpsc_set_default_gc( true );
}