clear_post_supercache()
Хуков нет.
Возвращает
null. Ничего (null).
Использование
clear_post_supercache( $post_id );
- $post_id(обязательный)
- .
Код clear_post_supercache() clear post supercache WPSCache 3.0.3
function clear_post_supercache( $post_id ) {
$dir = get_current_url_supercache_dir( $post_id );
if ( false == @is_dir( $dir ) )
return false;
if ( get_supercache_dir() == $dir ) {
wp_cache_debug( "clear_post_supercache: not deleting post_id $post_id as it points at homepage: $dir" );
return false;
}
wp_cache_debug( "clear_post_supercache: post_id: $post_id. deleting files in $dir" );
if ( get_post_type( $post_id ) != 'page') { // don't delete child pages if they exist
prune_super_cache( $dir, true );
} else {
wpsc_delete_files( $dir );
}
}