wp_cache_remove_index()WPSCache 1.0

Хуков нет.

Возвращает

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

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

wp_cache_remove_index();

Код wp_cache_remove_index() WPSCache 1.12.0

function wp_cache_remove_index() {
	global $cache_path;

	if ( empty( $cache_path ) ) {
		return;
	}

	@unlink( $cache_path . "index.html" );
	@unlink( $cache_path . "supercache/index.html" );
	@unlink( $cache_path . "blogs/index.html" );
	if ( is_dir( $cache_path . "blogs" ) ) {
		$dir = new DirectoryIterator( $cache_path . "blogs" );
		foreach( $dir as $fileinfo ) {
			if ( $fileinfo->isDot() ) {
				continue;
			}
			if ( $fileinfo->isDir() ) {
				$directory = $cache_path . "blogs/" . $fileinfo->getFilename();
				if ( is_file( $directory . "/index.html" ) ) {
					unlink( $directory . "/index.html" );
				}
				if ( is_dir( $directory . "/meta" ) ) {
					if ( is_file( $directory . "/meta/index.html" ) ) {
						unlink( $directory . "/meta/index.html" );
					}
				}
			}
		}
	}
}