domain_mapping_gc_cache()
Хуков нет.
Возвращает
null. Ничего (null).
Использование
domain_mapping_gc_cache( $function, $directory );
- $function(обязательный)
- .
- $directory(обязательный)
- .
Код domain_mapping_gc_cache() domain mapping gc cache WPSCache 3.1.1
function domain_mapping_gc_cache( $function, $directory ) {
global $cache_path;
if ( ! function_exists( 'domain_mapping_warning' ) ) {
return;
}
$siteurl = domain_mapping_siteurl( false );
if ( ! $siteurl ) {
return;
}
$sitedir = trailingslashit( preg_replace( '`^(https?:)?//`', '', $siteurl ) );
if ( 'homepage' === $directory ) {
$directory = '';
}
switch ( $function ) {
case 'rebuild':
wpsc_rebuild_files( $cache_path . 'supercache/' . $sitedir . $directory );
break;
case 'prune':
wpsc_delete_files( $cache_path . 'supercache/' . $sitedir . $directory );
break;
}
}