wp_cache_add_site_cache_index()
Хуков нет.
Возвращает
null. Ничего (null).
Использование
wp_cache_add_site_cache_index();
Код wp_cache_add_site_cache_index() wp cache add site cache index WPSCache 3.0.3
function wp_cache_add_site_cache_index() {
global $cache_path;
wp_cache_add_index_protection(); // root and supercache
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 ( false == is_file( $directory . "/index.html" ) ) {
$fp = @fopen( $directory . "/index.html", 'w' );
if ( $fp )
fclose( $fp );
}
if ( is_dir( $directory . "/meta" ) ) {
if ( false == is_file( $directory . "/meta/index.html" ) ) {
$fp = @fopen( $directory . "/meta/index.html", 'w' );
if ( $fp )
fclose( $fp );
}
}
}
}
}
}