get_all_supercache_filenames()
Hooks from the function
Return
null
. Nothing (null).
Usage
get_all_supercache_filenames( $dir );
- $dir **
- -
Default: ''
get_all_supercache_filenames() get all supercache filenames code WPSCache 1.12.4
function get_all_supercache_filenames( $dir = '' ) { global $wp_cache_mobile_enabled, $cache_path; $dir = wpsc_get_realpath( $dir ); if ( ! $dir ) { wp_cache_debug( 'get_all_supercache_filenames: directory does not exist' ); return array(); } if ( ! wpsc_is_in_cache_directory( $dir ) ) { return array(); } $filenames = array( 'index.html', 'index-https.html', 'index.html.php' ); if ( $dir != '' && isset( $wp_cache_mobile_enabled ) && $wp_cache_mobile_enabled ) { // open directory and look for index-*.html files if ( is_dir( $dir ) && $dh = @opendir( $dir ) ) { while ( ( $file = readdir( $dh ) ) !== false ) { if ( substr( $file, 0, 6 ) == 'index-' && strpos( $file, '.html' ) ) { $filenames[] = $file; } } closedir( $dh ); } } if ( function_exists( 'apply_filters' ) ) { $filenames = apply_filters( 'all_supercache_filenames', $filenames ); } else { $filenames = do_cacheaction( 'all_supercache_filenames', $filenames ); } foreach ( $filenames as $file ) { $out[] = $file; $out[] = $file . '.gz'; } return $out; }