Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion BrowserCache_Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ public function ob_callback( $buffer ) {

// without quotes.
$buffer = preg_replace_callback(
'~(href|src|action|extsrc|asyncsrc)=((' . $domain_url_regexp . ')?(/[^\\s>][^\\s>]*\.([a-z-_]+)([\?#][^\\s>]*)?))([\\s>])~Ui',
'~(href|src|action|extsrc|asyncsrc)=((' . $domain_url_regexp . ')?(/[^\\s>][^\\s>]*\.([a-z-_]+)([\?#][^\\s>\'"]*)?))([\\s>])~Ui',
array( $this, 'link_replace_callback_noquote' ),
$buffer
);
Expand Down
4 changes: 2 additions & 2 deletions Cdn_Core.php
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ public function normalize_attachment_file( $w3tc_file ) {
/**
* Normalize an attachment path against a specific uploads basedir.
*
* @since X.X.X
* @since 2.10.7
*
* @param string $basedir Upload basedir.
* @param string $w3tc_file Candidate attachment path.
Expand Down Expand Up @@ -402,7 +402,7 @@ private function normalize_attachment_file_under_basedir( $basedir, $w3tc_file )
* Drive-letter case is ignored for Windows-style paths; the remainder
* of the path comparison stays case-sensitive.
*
* @since X.X.X
* @since 2.10.7
*
* @param string $path Normalized absolute path.
* @param string $prefix Normalized basedir prefix ending in `/`.
Expand Down
4 changes: 2 additions & 2 deletions ConfigState.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class ConfigState {
/**
* Encoded option payload from the last successful load or save.
*
* @since X.X.X
* @since 2.10.7
*
* @var string|null
*/
Expand Down Expand Up @@ -249,7 +249,7 @@ public function save() {
/**
* Loads stored option data when the Options API is available.
*
* @since X.X.X
* @since 2.10.7
*
* @return void
*/
Expand Down
16 changes: 8 additions & 8 deletions Minify_MinifiedFileRequestHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,15 @@ class Minify_MinifiedFileRequestHandler {
/**
* Limits for external JavaScript retrieval.
*
* @since X.X.X
* @since 2.10.7
*/
const EXTERNAL_JS_TIMEOUT = 5;
const EXTERNAL_JS_MAX_SIZE = 1048576;

/**
* Cron hook that retrieves selected external JavaScript.
*
* @since X.X.X
* @since 2.10.7
*/
const EXTERNAL_JS_PRECACHE_HOOK = 'w3tc_minify_precache_external_script';

Expand Down Expand Up @@ -935,7 +935,7 @@ public function _precache_file( $w3tc_url, $type ) {
/**
* Retrieves an existing external JavaScript cache entry without refreshing it.
*
* @since X.X.X
* @since 2.10.7
*
* @param string $w3tc_url Script URL.
*
Expand All @@ -959,7 +959,7 @@ public function get_cached_external_script( $w3tc_url ) {
* by cron. Once a copy exists the tag is rewritten to the minify URL and
* the minify request handler keeps it refreshed.
*
* @since X.X.X
* @since 2.10.7
*
* @param string $w3tc_url Script URL.
*
Expand Down Expand Up @@ -988,7 +988,7 @@ public function schedule_external_script_precache( $w3tc_url ) {
/**
* Returns the cache path of an external script eligible for local caching.
*
* @since X.X.X
* @since 2.10.7
*
* @param string $w3tc_url Normalized script URL.
*
Expand All @@ -1009,7 +1009,7 @@ private function external_javascript_cache_path( $w3tc_url ) {
/**
* Returns the bounded refresh interval for external scripts.
*
* @since X.X.X
* @since 2.10.7
*
* @return int
*/
Expand All @@ -1020,7 +1020,7 @@ private function external_javascript_lifetime() {
/**
* Accepts only non-empty responses with a JavaScript content type.
*
* @since X.X.X
* @since 2.10.7
*
* @param array $response HTTP response.
*
Expand Down Expand Up @@ -1485,7 +1485,7 @@ public function _generate_id( $sources, $type ) {
* versioned or extensionless URLs (e.g. "app.js?ver=1") fall back to
* the type of the group being hashed.
*
* @since X.X.X
* @since 2.10.7
*
* @param string $remote_url Remote asset URL.
* @param string $group_type Type of the group being hashed (css/js).
Expand Down
4 changes: 2 additions & 2 deletions Minify_Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ public function w3tc_minifycache_purge_wpcron() {
/**
* Retrieves a queued external script outside of page generation.
*
* @since X.X.X
* @since 2.10.7
*
* @param string $w3tc_url Script URL.
*
Expand Down Expand Up @@ -1240,7 +1240,7 @@ public function get_minify_url_for_files( $files, $type ) {
* is being generated. Cache population and refresh happen in the minify
* request handler.
*
* @since X.X.X
* @since 2.10.7
*
* @param string $w3tc_url Script URL.
*
Expand Down
2 changes: 1 addition & 1 deletion ObjectCache_WpObjectCache_Regular.php
Original file line number Diff line number Diff line change
Expand Up @@ -1365,7 +1365,7 @@ private function _can_cache() {
* Admin requests typically skip persistent cache so admin queries are not stored.
* `last_changed` still writes through so frontend query salts invalidate.
*
* @since X.X.X
* @since 2.10.7
*
* @param string $id Cache key.
* @param string $w3tc_group Cache group.
Expand Down
22 changes: 11 additions & 11 deletions PageSpeed_Api.php
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ public function refresh_token( $w3tc_site_id, $w3tc_pagespeed_key ) {
/**
* Records a token refresh failure for the admin notice.
*
* @since X.X.X
* @since 2.10.7
*
* @param string $title Notice title.
* @param string $message Optional failure detail.
Expand All @@ -350,7 +350,7 @@ private function set_refresh_failure( $title, $message = '' ) {
/**
* Returns operator-facing text for a token refresh failure.
*
* @since X.X.X
* @since 2.10.7
*
* @param string $w3tc_error_id Nested W3 API error ID, if any.
* @param array $response_body Decoded response body.
Expand Down Expand Up @@ -393,7 +393,7 @@ private function get_refresh_failure_message( $w3tc_error_id, $response_body, $r
/**
* Removes local PageSpeed credentials after an irrecoverable API response.
*
* @since X.X.X
* @since 2.10.7
*
* @return void
*/
Expand All @@ -411,7 +411,7 @@ private function clear_pagespeed_credentials() {
* `W3TCG_Google_Auth_OAuth2::isAccessTokenExpired()` treats a missing `created`
* value as expired, so every persist path must set it.
*
* @since X.X.X
* @since 2.10.7
*
* @param array|string $w3tc_access_token Token payload or token JSON.
*
Expand Down Expand Up @@ -447,7 +447,7 @@ public static function prepare_access_token_json( $w3tc_access_token ) {
*
* Cache-first AJAX handlers must not serve scores once authorization is gone.
*
* @since X.X.X
* @since 2.10.7
*
* @return void
*/
Expand All @@ -471,7 +471,7 @@ public static function clear_pagespeed_cache() {
/**
* Returns operator-facing text for PageSpeed access that was never authorized.
*
* @since X.X.X
* @since 2.10.7
*
* @return string
*/
Expand All @@ -489,7 +489,7 @@ public static function get_authorize_required_message() {
/**
* Returns operator-facing text for stored PageSpeed access that could not be renewed.
*
* @since X.X.X
* @since 2.10.7
*
* @return string
*/
Expand Down Expand Up @@ -576,7 +576,7 @@ public function errors_notice() {
/**
* Returns operator-facing text for an authorization failure.
*
* @since X.X.X
* @since 2.10.7
*
* @param string $error_json W3 API authorization error JSON.
*
Expand Down Expand Up @@ -641,7 +641,7 @@ public static function get_authorize_failure_message( $error_json ) {
/**
* Clears PageSpeed failure notices and automatic refresh cooldown.
*
* @since X.X.X
* @since 2.10.7
*
* @return void
*/
Expand Down Expand Up @@ -725,7 +725,7 @@ public function reset() {
/**
* Records a token revocation failure for the admin notice.
*
* @since X.X.X
* @since 2.10.7
*
* @param string $message Failure detail.
*
Expand All @@ -742,7 +742,7 @@ private function set_revoke_failure( $message ) {
/**
* Returns operator-facing text for a token revocation failure.
*
* @since X.X.X
* @since 2.10.7
*
* @param string $w3tc_error_id Nested W3 API error ID, if any.
* @param int $response_code HTTP response code.
Expand Down
2 changes: 1 addition & 1 deletion PgCache_Environment.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ public function fix_on_event( $w3tc_config, $event, $old_config = null ) {
/**
* Creates the per-site signature for effective preload settings.
*
* @since X.X.X
* @since 2.10.7
*
* @param Config $w3tc_config W3TC configuration.
*
Expand Down
26 changes: 13 additions & 13 deletions PgCache_Plugin_Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class PgCache_Plugin_Admin {
/**
* Option storing the next sitemap entry to preload.
*
* @since X.X.X
* @since 2.10.7
*
* @var string
*/
Expand All @@ -27,7 +27,7 @@ class PgCache_Plugin_Admin {
/**
* Option recording completion of a one-pass preload.
*
* @since X.X.X
* @since 2.10.7
*
* @var string
*/
Expand All @@ -36,7 +36,7 @@ class PgCache_Plugin_Admin {
/**
* Option identifying the current preload pass.
*
* @since X.X.X
* @since 2.10.7
*
* @var string
*/
Expand All @@ -45,7 +45,7 @@ class PgCache_Plugin_Admin {
/**
* Option coordinating overlapping preload callbacks.
*
* @since X.X.X
* @since 2.10.7
*
* @var string
*/
Expand All @@ -54,7 +54,7 @@ class PgCache_Plugin_Admin {
/**
* Option storing the effective preload settings signature.
*
* @since X.X.X
* @since 2.10.7
*
* @var string
*/
Expand All @@ -63,7 +63,7 @@ class PgCache_Plugin_Admin {
/**
* Maximum preload lock lifetime.
*
* @since X.X.X
* @since 2.10.7
*
* @var int
*/
Expand All @@ -72,7 +72,7 @@ class PgCache_Plugin_Admin {
/**
* Sitemap traversal completed.
*
* @since X.X.X
* @since 2.10.7
*
* @var string
*/
Expand All @@ -81,7 +81,7 @@ class PgCache_Plugin_Admin {
/**
* Sitemap entry was excluded by traversal policy.
*
* @since X.X.X
* @since 2.10.7
*
* @var string
*/
Expand All @@ -90,7 +90,7 @@ class PgCache_Plugin_Admin {
/**
* Sitemap traversal encountered a retryable failure.
*
* @since X.X.X
* @since 2.10.7
*
* @var string
*/
Expand All @@ -115,7 +115,7 @@ public function __construct() {
/**
* Returns the current per-site preload generation.
*
* @since X.X.X
* @since 2.10.7
*
* @return string
*/
Expand All @@ -137,7 +137,7 @@ public static function prime_generation() {
* The lock is retained so an in-flight callback remains the only writer.
* Its generation becomes stale and it will discard any progress.
*
* @since X.X.X
* @since 2.10.7
*
* @return string New generation.
*/
Expand All @@ -154,7 +154,7 @@ public static function reset_prime() {
/**
* Acquires the per-site preload lock.
*
* @since X.X.X
* @since 2.10.7
*
* @return array|false Lock data, or false when another run is active.
*/
Expand Down Expand Up @@ -186,7 +186,7 @@ public static function acquire_prime_lock() {
/**
* Releases a preload lock owned by the supplied token.
*
* @since X.X.X
* @since 2.10.7
*
* @param string $token Lock token.
*
Expand Down
2 changes: 1 addition & 1 deletion Util_Cookie.php
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ public static function request_has_rejected_role_cookie( $roles ) {
* Used on the page-cache write path after WordPress has loaded.
* The early `advanced-cache.php` read path cannot use this.
*
* @since X.X.X
* @since 2.10.7
*
* @param string[] $roles Role slugs configured for cache rejection.
*
Expand Down
2 changes: 1 addition & 1 deletion Util_Http.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ public static function download( $w3tc_url, $w3tc_file, $args = array() ) {
/**
* Returns a normalized host for redirect comparisons.
*
* @since X.X.X
* @since 2.10.7
*
* @param string $url URL to inspect.
*
Expand Down
2 changes: 1 addition & 1 deletion bin/make-pot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ else
fi

# "xdebug.max_nesting_level=512" avoids nesting errors while parsing the plugin.
php -d xdebug.max_nesting_level=512 "$WP_CLI_BIN" i18n make-pot . languages/w3-total-cache.pot
php -d xdebug.max_nesting_level=512 "$WP_CLI_BIN" i18n make-pot . languages/w3-total-cache.pot --slug=w3-total-cache
Loading
Loading