function checkQuickCache() { if (!class_exists('c_ws_plugin__qcache_menu_pages')) { return false; } $prev_agents = preg_split("/[\r\n\t]+/", $GLOBALS['WS_PLUGIN__']['qcache']['o']['dont_cache_these_agents']); $agents = $prev_agents; foreach (array('iPhone', 'iPod', 'Android', 'IEMobile', 'wp2android_user_agent=ipad_app', 'wp2android_user_agent=android_app', '72dcc186a8d3d7b3d8554a14256389a4') as $agent) { if (!in_array($agent, $agents)) { $agents[] = $agent; } } if ($agents === $prev_agents) { return false; } c_ws_plugin__qcache_menu_pages::update_all_options(array('ws_plugin__qcache_dont_cache_these_agents' => implode(PHP_EOL, $agents)), true, true, false); return true; }
public static function options_page() { do_action("ws_plugin__qcache_before_options_page", get_defined_vars()); /**/ c_ws_plugin__qcache_menu_pages::update_all_options() . clearstatcache(); /**/ if (file_exists(ABSPATH . "wp-config.php") && !is_writable(ABSPATH . "wp-config.php")) { c_ws_plugin__qcache_admin_notices::display_admin_notice('<strong>Permissions:</strong> Please check permissions on <code>' . esc_html(preg_replace("/^" . preg_quote($_SERVER["DOCUMENT_ROOT"], "/") . "/", "", ABSPATH . "wp-config.php")) . '</code>. Quick Cache needs write-access to this file. Permissions need to be <code>755</code> or higher.', true); } else { if (file_exists(dirname(ABSPATH) . "/wp-config.php") && !is_writable(dirname(ABSPATH) . "/wp-config.php")) { c_ws_plugin__qcache_admin_notices::display_admin_notice('<strong>Permissions:</strong> Please check permissions on <code>' . esc_html(preg_replace("/^" . preg_quote($_SERVER["DOCUMENT_ROOT"], "/") . "/", "", dirname(ABSPATH) . "/wp-config.php")) . '</code>. Quick Cache needs write-access to this file. Permissions need to be <code>755</code> or higher.', true); } } if (is_dir(WP_CONTENT_DIR) && !is_writable(WP_CONTENT_DIR)) { c_ws_plugin__qcache_admin_notices::display_admin_notice('<strong>Permissions:</strong> Please check permissions on <code>' . esc_html(preg_replace("/^" . preg_quote($_SERVER["DOCUMENT_ROOT"], "/") . "/", "", WP_CONTENT_DIR)) . '</code>. Quick Cache needs write-access to this directory. Permissions need to be <code>755</code> or higher.', true); } if (is_dir(WP_CONTENT_DIR . "/cache") && !is_writable(WP_CONTENT_DIR . "/cache")) { c_ws_plugin__qcache_admin_notices::display_admin_notice('<strong>Permissions:</strong> Please check permissions on <code>' . esc_html(preg_replace("/^" . preg_quote($_SERVER["DOCUMENT_ROOT"], "/") . "/", "", WP_CONTENT_DIR . "/cache")) . '</code>. Quick Cache needs write-access to this directory. Permissions need to be <code>755</code> or higher.', true); } /**/ include_once dirname(dirname(__FILE__)) . "/menu-pages/options.inc.php"; /**/ do_action("ws_plugin__qcache_after_options_page", get_defined_vars()); /**/ return; /* Return for uniformity. */ }