WP_Super_Cache_Rest_Update_Settings::restore_default_settingsprotectedWPSCache 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 3.1.1

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( gmdate( 'H:i:s' ) . wp_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 );
}