wpsc_delete_cats_tags()
Хуков нет.
Возвращает
null. Ничего (null).
Использование
wpsc_delete_cats_tags( $post );
- $post(обязательный)
- .
Код wpsc_delete_cats_tags() wpsc delete cats tags WPSCache 3.0.2
function wpsc_delete_cats_tags( $post ) {
if ( function_exists( '_deprecated_function' ) ) {
_deprecated_function( __FUNCTION__, 'WP Super Cache 1.6.3', 'wpsc_delete_post_archives' );
}
$post = get_post( $post );
$categories = get_the_category( $post->ID );
if ( $categories ) {
$category_base = get_option( 'category_base' );
if ( $category_base == '' ) {
$category_base = '/category/';
}
$category_base = trailingslashit( $category_base ); // paranoid much?
foreach ( $categories as $cat ) {
prune_super_cache( get_supercache_dir() . $category_base . $cat->slug . '/', true );
wp_cache_debug( 'wpsc_post_transition: deleting category: ' . get_supercache_dir() . $category_base . $cat->slug . '/' );
}
}
$posttags = get_the_tags( $post->ID );
if ( $posttags ) {
$tag_base = get_option( 'tag_base' );
if ( $tag_base == '' ) {
$tag_base = '/tag/';
}
$tag_base = trailingslashit( str_replace( '..', '', $tag_base ) ); // maybe!
foreach ( $posttags as $tag ) {
prune_super_cache( get_supercache_dir() . $tag_base . $tag->slug . '/', true );
wp_cache_debug( 'wpsc_post_transition: deleting tag: ' . get_supercache_dir() . $tag_base . $tag->slug . '/' );
}
}
}