ap_cache_dir()
Description #
Handles AnsPress caching
Source #
File: includes/cache.php
function ap_cache_dir() { global $wp; $current_url_path = str_replace( rtrim( ap_base_page_link(), '/' ), '', esc_url( home_url( add_query_arg( [], $wp->request ) ) ) ); $current_url_path = ltrim( $current_url_path, '/' ); if ( empty( $current_url_path ) ) { $current_url_path = 'index'; } $folder = rtrim( $current_url_path, basename( $current_url_path ) ); return (object) array( 'current_path' => $current_url_path, 'filename' => basename( $current_url_path ) . '.html', 'folder' => ANSPRESS_CACHE_DIR . '/' . $folder, 'path' => ANSPRESS_CACHE_DIR . '/' . $current_url_path . '.html', ); }
Expand full source code Collapse full source code View on GitHub: includes/cache.php:8
Add your comment