Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness. Use https://wpengine.com/support/cache/#Default_Cache_Exclusions instead.
LLMS_Cache_Helper::exclude_page_from_wpe_server_cache( int|WP_Post $post = null )
Sets a browser cookie that tells WP Engine to exclude a page from server caching.
Contents
Description Description
See also See also
Parameters Parameters
- $post
-
(int|WP_Post) (Optional) Post ID or post object. Default is the global
$post
.Default value: null
Return Return
(void)
Source Source
File: includes/class.llms.cache.helper.php
private function exclude_page_from_wpe_server_cache( $post = null ) { if ( function_exists( 'is_wpe' ) && is_wpe() ) { /* * If "Settings -> Permalinks" is "Plain", i.e. the `permalink_structure` option is '', * allow the entire site to be cached by WP Engine. * Note: This will prevent users from being able to successfully use the "Lost your password?" feature. */ if ( isset( $GLOBALS['wp_rewrite'] ) && ! $GLOBALS['wp_rewrite']->using_permalinks() ) { return; } $path = wp_parse_url( get_permalink( $post ), PHP_URL_PATH ); llms_setcookie( 'wordpress_wpe_no_cache', '1', 0, $path, COOKIE_DOMAIN, is_ssl(), true ); } }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
6.6.0 | Introduced. |