/** * Writes directives to WP .htaccess * * @param Config $config * @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_add($config, $exs) { return Util_Rule::add_rules($exs, Util_Rule::get_pgcache_rules_core_path(), self::rules_generate($config), W3TC_MARKER_BEGIN_FEEDBURNER, W3TC_MARKER_END_FEEDBURNER, array(W3TC_MARKER_BEGIN_WORDPRESS => 0, W3TC_MARKER_END_PGCACHE_CORE => strlen(W3TC_MARKER_END_PGCACHE_CORE) + 1)); }
/** * Writes directives to file cache .htaccess * Throws exception on error * * @param Config $config * @param Util_Environment_Exceptions $exs */ private function rules_cache_add($config, $exs) { Util_Rule::add_rules($exs, Util_Rule::get_minify_rules_cache_path(), $this->rules_cache_generate($config), W3TC_MARKER_BEGIN_MINIFY_CACHE, W3TC_MARKER_END_MINIFY_CACHE, array(W3TC_MARKER_BEGIN_PGCACHE_CACHE => 0, W3TC_MARKER_BEGIN_BROWSERCACHE_CACHE => 0, W3TC_MARKER_BEGIN_MINIFY_CORE => 0, W3TC_MARKER_BEGIN_PGCACHE_CORE => 0, W3TC_MARKER_BEGIN_BROWSERCACHE_NO404WP => 0, W3TC_MARKER_BEGIN_WORDPRESS => 0)); }
/** * Writes no 404 by WP rules * * @param Config $config * @param Util_Environment_Exceptions $exs * @throws Util_WpFile_FilesystemOperationException with S/FTP form */ private function rules_no404wp_add($config, $exs) { Util_Rule::add_rules($exs, Util_Rule::get_browsercache_rules_no404wp_path(), $this->rules_no404wp_generate($config), W3TC_MARKER_BEGIN_BROWSERCACHE_NO404WP, W3TC_MARKER_END_BROWSERCACHE_NO404WP, array(W3TC_MARKER_BEGIN_WORDPRESS => 0, W3TC_MARKER_END_PGCACHE_CORE => strlen(W3TC_MARKER_END_PGCACHE_CORE) + 1, W3TC_MARKER_END_MINIFY_CORE => strlen(W3TC_MARKER_END_MINIFY_CORE) + 1, W3TC_MARKER_END_BROWSERCACHE_CACHE => strlen(W3TC_MARKER_END_BROWSERCACHE_CACHE) + 1, W3TC_MARKER_END_PGCACHE_CACHE => strlen(W3TC_MARKER_END_PGCACHE_CACHE) + 1, W3TC_MARKER_END_MINIFY_CACHE => strlen(W3TC_MARKER_END_MINIFY_CACHE) + 1)); }