Warning: fopen(/home/danestany/public_html/wp-content/plugins/wordfence/waf/../languages/wordfence.mo): failed to open stream: No such file or directory in /home/danestany/public_html/wp-content/plugins/wordfence/waf/pomo/streams.php on line 185
his->config->get_config( 'cache_mandatory_cookies' ) ) );
if ( ! self::$cookies ) {
return self::memoize( __FUNCTION__, [], $missing_cookies );
}
foreach ( array_keys( self::$cookies ) as $cookie_name ) {
if ( preg_match( $mandatory_cookies, $cookie_name ) ) {
unset( $missing_cookies[ $cookie_name ] );
}
}
if ( empty( $missing_cookies ) ) {
return self::memoize( __FUNCTION__, [], true );
}
return self::memoize( __FUNCTION__, [], array_flip( $missing_cookies ) );
}
/**
* Don't process if the user agent is in the forbidden list.
*
* @since 3.3
* @access public
* @author Grégory Viguier
*
* @return bool
*/
public function can_process_user_agent() {
if ( self::is_memoized( __FUNCTION__ ) ) {
return self::get_memoized( __FUNCTION__ );
}
if ( ! $this->config->get_server_input( 'HTTP_USER_AGENT' ) ) {
return self::memoize( __FUNCTION__, [], true );
}
$rejected_uas = $this->config->get_config( 'cache_reject_ua' );
if ( ! $rejected_uas ) {
return self::memoize( __FUNCTION__, [], true );
}
$can = ! preg_match( '#' . $rejected_uas . '#', $this->config->get_server_input( 'HTTP_USER_AGENT' ) );
return self::memoize( __FUNCTION__, [], $can );
}
/**
* Don't process if the user agent is in the forbidden list.
*
* @since 3.3
* @access public
* @author Grégory Viguier
*
* @return bool
*/
public function can_process_mobile() {
if ( self::is_memoized( __FUNCTION__ ) ) {
return self::get_memoized( __FUNCTION__ );
}
if ( ! $this->config->get_server_input( 'HTTP_USER_AGENT' ) ) {
return self::memoize( __FUNCTION__, [], true );
}
if ( $this->config->get_config( 'cache_mobile' ) ) {
return self::memoize( __FUNCTION__, [], true );
}
$uas = '2.0\ MMP|240x320|400X240|AvantGo|BlackBerry|Blazer|Cellphone|Danger|DoCoMo|Elaine/3.0|EudoraWeb|Googlebot-Mobile|hiptop|IEMobile|KYOCERA/WX310K|LG/U990|MIDP-2.|MMEF20|MOT-V|NetFront|Newt|Nintendo\ Wii|Nitro|Nokia|Opera\ Mini|Palm|PlayStation\ Portable|portalmmm|Proxinet|ProxiNet|SHARP-TQ-GX10|SHG-i900|Small|SonyEricsson|Symbian\ OS|SymbianOS|TS21i-10|UP.Browser|UP.Link|webOS|Windows\ CE|WinWAP|YahooSeeker/M1A1-R2D2|iPhone|iPod|Android|BlackBerry9530|LG-TU915\ Obigo|LGE\ VX|webOS|Nokia5800';
if ( preg_match( '#^.*(' . $uas . ').*#i', $this->config->get_server_input( 'HTTP_USER_AGENT' ) ) ) {
return self::memoize( __FUNCTION__, [], false );
}
$uas = 'w3c\ |w3c-|acs-|alav|alca|amoi|audi|avan|benq|bird|blac|blaz|brew|cell|cldc|cmd-|dang|doco|eric|hipt|htc_|inno|ipaq|ipod|jigs|kddi|keji|leno|lg-c|lg-d|lg-g|lge-|lg/u|maui|maxo|midp|mits|mmef|mobi|mot-|moto|mwbp|nec-|newt|noki|palm|pana|pant|phil|play|port|prox|qwap|sage|sams|sany|sch-|sec-|send|seri|sgh-|shar|sie-|siem|smal|smar|sony|sph-|symb|t-mo|teli|tim-|tosh|tsm-|upg1|upsi|vk-v|voda|wap-|wapa|wapi|wapp|wapr|webc|winw|winw|xda\ |xda-';
if ( preg_match( '#^(' . $uas . ').*#i', $this->config->get_server_input( 'HTTP_USER_AGENT' ) ) ) {
return self::memoize( __FUNCTION__, [], false );
}
return self::memoize( __FUNCTION__, [], true );
}
/** ----------------------------------------------------------------------------------------- */
/** SEPARATED TESTS AFTER PAGE RESPONSE ===================================================== */
/** ----------------------------------------------------------------------------------------- */
/**
* Tell if the constant DONOTCACHEPAGE is set and not overridden.
* When defined, the page must not be cached.
*
* @since 3.3
* @access public
* @author Grégory Viguier
*
* @return bool
*/
public function has_donotcachepage() {
if ( ! defined( 'DONOTCACHEPAGE' ) || ! DONOTCACHEPAGE ) {
return false;
}
/**
* At this point the constant DONOTCACHEPAGE is set to true.
* This filter allows to force the page caching.
* It prevents conflict with some plugins like Thrive Leads.
*
* @since 2.5
*
* @param bool $override_donotcachepage True will force the page to be cached.
*/
return ! apply_filters( 'rocket_override_donotcachepage', false );
}
/**
* Tell if we're in the WP’s 404 page.
*
* @since 3.3
* @access public
* @author Grégory Viguier
*
* @return bool
*/
public function is_404() {
return ! function_exists( 'is_404' ) || is_404();
}
/**
* Tell if we're in the WP’s search page.
*
* @since 3.3
* @access public
* @author Grégory Viguier
*
* @return bool
*/
public function is_search() {
if ( function_exists( 'is_search' ) && ! is_search() ) {
return false;
}
/**
* At this point we’re in the WP’s search page.
* This filter allows to cache search results.
*
* @since 2.3.8
*
* @param bool $cache_search True will force caching search results.
*/
return ! apply_filters( 'rocket_cache_search', false );
}
/**
* Tell if the page content has a closing