/** * Removes Page Cache core directives * * @param Util_Environment_Exceptions $exs * @throws Util_WpFile_FilesystemOperationException with S/FTP form if it can't get the required filesystem credentials */ private static function rules_remove($exs) { Util_Rule::remove_rules($exs, Util_Rule::get_pgcache_rules_core_path(), W3TC_MARKER_BEGIN_FEEDBURNER, W3TC_MARKER_END_FEEDBURNER); }
echo '<li>', $check, '</li>'; } ?> </ul> <?php } ?> <h4><?php _e('WordPress Resources', 'w3-total-cache'); ?> </h4> <ul> <?php $paths = array_unique(array(Util_Rule::get_pgcache_rules_core_path(), Util_Rule::get_browsercache_rules_cache_path(), Util_Rule::get_browsercache_rules_no404wp_path())); ?> <?php foreach ($paths as $path) { if ($path) { ?> <li> <?php echo htmlspecialchars($path); ?> : <?php if (file_exists($path)) { ?> <?php if (Util_File::is_writable($path)) {
/** * Send support request action * * @return void */ function w3tc_support_send_details() { $c = Dispatcher::config(); $post = array(); foreach ($_GET as $p => $v) { $post[$p] = $v; } $post['user_agent'] = $_SERVER['HTTP_USER_AGENT']; $post['version'] = W3TC_VERSION; $license_level = 'community'; if (Util_Environment::is_w3tc_pro($c)) { $license_level = 'pro'; } elseif (Util_Environment::is_w3tc_enterprise($c)) { $license_level = 'enterprise'; } $post['license_level'] = $license_level . ' ' . $c->get_string('plugin.license_key'); /** * Add attachments */ $attachments = array(); $attach_files = array(Util_Environment::wp_config_path(), Util_Rule::get_pgcache_rules_core_path(), Util_Rule::get_pgcache_rules_cache_path(), Util_Rule::get_browsercache_rules_cache_path(), Util_Rule::get_browsercache_rules_no404wp_path(), Util_Rule::get_minify_rules_core_path(), Util_Rule::get_minify_rules_cache_path()); /** * Attach config files */ if ($handle = opendir(W3TC_CONFIG_DIR)) { while (($entry = @readdir($handle)) !== false) { if ($entry == '.' || $entry == '..' || $entry == 'index.html') { continue; } $attach_file[] = W3TC_CONFIG_DIR . '/' . $entry; } closedir($handle); } foreach ($attach_files as $attach_file) { if ($attach_file && file_exists($attach_file) && !in_array($attach_file, $attachments)) { $attachments[] = array('filename' => basename($attach_file), 'content' => file_get_contents($attach_file)); } } /** * Attach server info */ $server_info = print_r($this->get_server_info(), true); $server_info = str_replace("\n", "\r\n", $server_info); $attachments[] = array('filename' => 'server_info.txt', 'content' => $server_info); /** * Attach phpinfo */ ob_start(); phpinfo(); $php_info = ob_get_contents(); ob_end_clean(); $attachments[] = array('filename' => 'php_info.html', 'content' => $php_info); /** * Attach self-test */ ob_start(); $this->self_test(); $self_test = ob_get_contents(); ob_end_clean(); $attachments[] = array('filename' => 'self_test.html', 'content' => $self_test); $post['attachments'] = $attachments; $response = wp_remote_post(W3TC_SUPPORT_REQUEST_URL, array('body' => $post, 'timeout' => $c->get_integer('timelimit.email_send'))); if (!is_wp_error($response)) { $result = $response['response']['code'] == 200 && $response['body'] == 'ok'; } else { $result = false; } echo $result ? 'ok' : 'error'; }
/** * Removes Page Cache core directives * * @param Util_Environment_Exceptions $exs * @throws Util_WpFile_FilesystemOperationException with S/FTP form if it can't get the required filesystem credentials */ private function rules_core_remove($exs) { Util_Rule::remove_rules($exs, Util_Rule::get_pgcache_rules_core_path(), W3TC_MARKER_BEGIN_PGCACHE_CORE, W3TC_MARKER_END_PGCACHE_CORE); }
public static function get_new_relic_rules_core_path() { return Util_Rule::get_pgcache_rules_core_path(); }