wp_cache_confirm_delete()
returns true/false depending on location of $dir.
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
wp_cache_confirm_delete( $dir );
- $dir (обязательный)
- -
Код wp_cache_confirm_delete() wp cache confirm delete WPSCache 1.12.4
function wp_cache_confirm_delete( $dir ) { global $cache_path, $blog_cache_dir; // don't allow cache_path, blog cache dir, blog meta dir, supercache. $dir = wpsc_get_realpath( $dir ); if ( ! $dir ) { wp_cache_debug( 'wp_cache_confirm_delete: directory does not exist' ); return false; } if ( ! wpsc_is_in_cache_directory( $dir ) ) { return false; } $rp_cache_path = wpsc_get_realpath( $cache_path ); if ( ! $rp_cache_path ) { wp_cache_debug( "wp_cache_confirm_delete: cache_path does not exist: $cache_path" ); return false; } if ( $dir == '' || $dir == $rp_cache_path || $dir == wpsc_get_realpath( $blog_cache_dir ) || $dir == wpsc_get_realpath( $blog_cache_dir . 'meta/' ) || $dir == wpsc_get_realpath( $cache_path . 'supercache' ) ) { return false; } else { return true; } }