Changeset 3452186
- Timestamp:
- 02/02/2026 02:40:54 PM (8 weeks ago)
- Location:
- powered-cache
- Files:
-
- 2 added
- 22 edited
- 1 copied
-
tags/3.7.2 (copied) (copied from powered-cache/trunk)
-
tags/3.7.2/includes/classes/Dependencies/MatthiasMullie/Minify/CSS.php (modified) (10 diffs)
-
tags/3.7.2/includes/classes/Dependencies/MatthiasMullie/Minify/Exception.php (modified) (1 diff)
-
tags/3.7.2/includes/classes/Dependencies/MatthiasMullie/Minify/Exceptions/BasicException.php (modified) (1 diff)
-
tags/3.7.2/includes/classes/Dependencies/MatthiasMullie/Minify/Exceptions/FileImportException.php (modified) (1 diff)
-
tags/3.7.2/includes/classes/Dependencies/MatthiasMullie/Minify/Exceptions/IOException.php (modified) (1 diff)
-
tags/3.7.2/includes/classes/Dependencies/MatthiasMullie/Minify/Exceptions/PatternMatchException.php (added)
-
tags/3.7.2/includes/classes/Dependencies/MatthiasMullie/Minify/JS.php (modified) (2 diffs)
-
tags/3.7.2/includes/classes/Dependencies/MatthiasMullie/Minify/Minify.php (modified) (12 diffs)
-
tags/3.7.2/includes/package/deliciousbrains/wp-background-processing/classes/wp-background-process.php (modified) (1 diff)
-
tags/3.7.2/languages/powered-cache.pot (modified) (2 diffs)
-
tags/3.7.2/powered-cache.php (modified) (2 diffs)
-
tags/3.7.2/readme.txt (modified) (2 diffs)
-
trunk/includes/classes/Dependencies/MatthiasMullie/Minify/CSS.php (modified) (10 diffs)
-
trunk/includes/classes/Dependencies/MatthiasMullie/Minify/Exception.php (modified) (1 diff)
-
trunk/includes/classes/Dependencies/MatthiasMullie/Minify/Exceptions/BasicException.php (modified) (1 diff)
-
trunk/includes/classes/Dependencies/MatthiasMullie/Minify/Exceptions/FileImportException.php (modified) (1 diff)
-
trunk/includes/classes/Dependencies/MatthiasMullie/Minify/Exceptions/IOException.php (modified) (1 diff)
-
trunk/includes/classes/Dependencies/MatthiasMullie/Minify/Exceptions/PatternMatchException.php (added)
-
trunk/includes/classes/Dependencies/MatthiasMullie/Minify/JS.php (modified) (2 diffs)
-
trunk/includes/classes/Dependencies/MatthiasMullie/Minify/Minify.php (modified) (12 diffs)
-
trunk/includes/package/deliciousbrains/wp-background-processing/classes/wp-background-process.php (modified) (1 diff)
-
trunk/languages/powered-cache.pot (modified) (2 diffs)
-
trunk/powered-cache.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
powered-cache/tags/3.7.2/includes/classes/Dependencies/MatthiasMullie/Minify/CSS.php
r3160589 r3452186 14 14 15 15 use PoweredCache\Dependencies\MatthiasMullie\Minify\Exceptions\FileImportException; 16 use PoweredCache\Dependencies\MatthiasMullie\Minify\Exceptions\PatternMatchException; 16 17 use PoweredCache\Dependencies\MatthiasMullie\PathConverter\Converter; 17 18 use PoweredCache\Dependencies\MatthiasMullie\PathConverter\ConverterInterface; … … 110 111 * to save HTTP requests. 111 112 * 112 * @param string $sourceThe file to combine imports for113 * @param string $content The CSS content to combine imports for113 * @param string $source The file to combine imports for 114 * @param string $content The CSS content to combine imports for 114 115 * @param string[] $parents Parent paths, for circular reference checks 115 116 * … … 246 247 * original file, to save HTTP requests. 247 248 * 248 * @param string $source The file to import files for249 * @param string $source The file to import files for 249 250 * @param string $content The CSS content to import files for 250 251 * … … 297 298 * 298 299 * @return string The minified data 300 * 301 * @throws PatternMatchException 299 302 */ 300 303 public function execute($path = null, $parents = array()) … … 358 361 * 359 362 * @param ConverterInterface $converter Relative path converter 360 * @param string $contentThe CSS content to update relative urls for363 * @param string $content The CSS content to update relative urls for 361 364 * 362 365 * @return string … … 591 594 // convert `rgb` to `hex` 592 595 $dec = '([01]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])'; 596 593 597 return preg_replace_callback( 594 598 "/rgb\($dec $dec $dec\)/i", … … 622 626 623 627 // remove alpha channel if it's pointless .. 624 $content = preg_replace('/' . $tag . '\(\s*([^\s ]+)\s+([^\s]+)\s+([^\s]+)\s+\/\s+1(?:(?:\.\d?)*|00%)?\s*\)/i', '$1($2 $3 $4)', $content);628 $content = preg_replace('/' . $tag . '\(\s*([^\s)]+)\s+([^\s)]+)\s+([^\s)]+)\s+\/\s+1(?:(?:\.\d?)*|00%)?\s*\)/i', '$1($2 $3 $4)', $content); 625 629 626 630 // replace `transparent` with shortcut .. 627 $content = preg_replace('/' . $tag . '\(\s*[^\s ]+\s+[^\s]+\s+[^\s]+\s+\/\s+0(?:[\.0%]*)?\s*\)/i', '#fff0', $content);631 $content = preg_replace('/' . $tag . '\(\s*[^\s)]+\s+[^\s)]+\s+[^\s)]+\s+\/\s+0(?:[\.0%]*)?\s*\)/i', '#fff0', $content); 628 632 629 633 return $content; … … 733 737 * 734 738 * @return string 739 * 740 * @throws PatternMatchException 735 741 */ 736 742 protected function stripWhitespace($content) 737 743 { 738 744 // remove leading & trailing whitespace 739 $content = preg_replace('/^\s*/m', '', $content);740 $content = preg_replace('/\s*$/m', '', $content);745 $content = $this->pregReplace('/^\s*/m', '', $content); 746 $content = $this->pregReplace('/\s*$/m', '', $content); 741 747 742 748 // replace newlines with a single space 743 $content = preg_replace('/\s+/', ' ', $content);749 $content = $this->pregReplace('/\s+/', ' ', $content); 744 750 745 751 // remove whitespace around meta characters 746 752 // inspired by stackoverflow.com/questions/15195750/minify-compress-css-with-regex 747 $content = preg_replace('/\s*([\*$~^|]?+=|[{};,>~]|!important\b)\s*/', '$1', $content);748 $content = preg_replace('/([\[(:>\+])\s+/', '$1', $content);749 $content = preg_replace('/\s+([\]\)>\+])/', '$1', $content);750 $content = preg_replace('/\s+(:)(?![^\}]*\{)/', '$1', $content);753 $content = $this->pregReplace('/\s*([\*$~^|]?+=|[{};,>~]|!important\b)\s*/', '$1', $content); 754 $content = $this->pregReplace('/([\[(:>\+])\s+/', '$1', $content); 755 $content = $this->pregReplace('/\s+([\]\)>\+])/', '$1', $content); 756 $content = $this->pregReplace('/\s+(:)(?![^\}]*\{)/', '$1', $content); 751 757 752 758 // whitespace around + and - can only be stripped inside some pseudo- … … 755 761 // selectors like `div.weird- p` 756 762 $pseudos = array('nth-child', 'nth-last-child', 'nth-last-of-type', 'nth-of-type'); 757 $content = preg_replace('/:(' . implode('|', $pseudos) . ')\(\s*([+-]?)\s*(.+?)\s*([+-]?)\s*(.*?)\s*\)/', ':$1($2$3$4$5)', $content);763 $content = $this->pregReplace('/:(' . implode('|', $pseudos) . ')\(\s*([+-]?)\s*(.+?)\s*([+-]?)\s*(.*?)\s*\)/', ':$1($2$3$4$5)', $content); 758 764 759 765 // remove semicolon/whitespace followed by closing bracket … … 761 767 762 768 return trim($content); 769 } 770 771 /** 772 * Perform a preg_replace and check for errors. 773 * 774 * @param string $pattern Pattern 775 * @param string $replacement Replacement 776 * @param string $subject String to process 777 * 778 * @return string 779 * 780 * @throws PatternMatchException 781 */ 782 protected function pregReplace($pattern, $replacement, $subject) 783 { 784 $result = preg_replace($pattern, $replacement, $subject); 785 if ($result === null) { 786 throw PatternMatchException::fromLastError("Failed to replace with pattern '$pattern'"); 787 } 788 789 return $result; 763 790 } 764 791 -
powered-cache/tags/3.7.2/includes/classes/Dependencies/MatthiasMullie/Minify/Exception.php
r2851003 r3452186 18 18 * @author Matthias Mullie <[email protected]> 19 19 */ 20 abstract class Exception extends \Exception 21 { 22 } 20 abstract class Exception extends \Exception {} -
powered-cache/tags/3.7.2/includes/classes/Dependencies/MatthiasMullie/Minify/Exceptions/BasicException.php
r2851003 r3452186 20 20 * @author Matthias Mullie <[email protected]> 21 21 */ 22 abstract class BasicException extends Exception 23 { 24 } 22 abstract class BasicException extends Exception {} -
powered-cache/tags/3.7.2/includes/classes/Dependencies/MatthiasMullie/Minify/Exceptions/FileImportException.php
r2851003 r3452186 18 18 * @author Matthias Mullie <[email protected]> 19 19 */ 20 class FileImportException extends BasicException 21 { 22 } 20 class FileImportException extends BasicException {} -
powered-cache/tags/3.7.2/includes/classes/Dependencies/MatthiasMullie/Minify/Exceptions/IOException.php
r2851003 r3452186 18 18 * @author Matthias Mullie <[email protected]> 19 19 */ 20 class IOException extends BasicException 21 { 22 } 20 class IOException extends BasicException {} -
powered-cache/tags/3.7.2/includes/classes/Dependencies/MatthiasMullie/Minify/JS.php
r3160589 r3452186 451 451 * 452 452 * @param string[] $operators 453 * @param string $delimiter453 * @param string $delimiter 454 454 * 455 455 * @return string[] … … 482 482 * 483 483 * @param string[] $keywords 484 * @param string $delimiter484 * @param string $delimiter 485 485 * 486 486 * @return string[] -
powered-cache/tags/3.7.2/includes/classes/Dependencies/MatthiasMullie/Minify/Minify.php
r3160589 r3452186 14 14 15 15 use PoweredCache\Dependencies\MatthiasMullie\Minify\Exceptions\IOException; 16 use PoweredCache\Dependencies\MatthiasMullie\Minify\Exceptions\PatternMatchException; 16 17 use Psr\Cache\CacheItemInterface; 17 18 … … 231 232 * 232 233 * @param string $content The minified data 233 * @param string $path The path to save the minified data to234 * @param string $path The path to save the minified data to 234 235 * 235 236 * @throws IOException … … 250 251 * If you need that functionality, use a callback instead. 251 252 * 252 * @param string $patternPCRE pattern253 * @param string $pattern PCRE pattern 253 254 * @param string|callable $replacement Replacement value for matched pattern 254 255 */ … … 266 267 protected function stripMultilineComments() 267 268 { 268 // First extract comments we want to keep, so they can be restored later269 // PHP only supports $this inside anonymous functions since 5.4270 269 $minifier = $this; 271 $callback = function ($match) use ($minifier) { 272 $count = count($minifier->extracted); 273 $placeholder = '/*' . $count . '*/'; 274 $minifier->extracted[$placeholder] = $match[0]; 275 276 return $placeholder; 277 }; 278 $this->registerPattern('/ 279 # optional newline 280 \n? 281 282 # start comment 283 \/\* 284 270 // Pattern for matching comments that we want to preserve 271 $keepPattern = '/^ 285 272 # comment content 286 273 (?: … … 294 281 @(?:license|preserve) 295 282 ) 296 297 # then match to the end of the comment 298 .*?\*\/\n? 299 300 /ixs', $callback); 301 302 // Then strip all other comments 303 $this->registerPattern('/\/\*.*?\*\//s', ''); 283 /ixs'; 284 $callback = function ($match) use ($minifier, $keepPattern) { 285 if (preg_match($keepPattern, $match[1])) { 286 // Preserve the comment 287 $count = count($minifier->extracted); 288 $placeholder = '/*' . $count . '*/'; 289 $minifier->extracted[$placeholder] = $match[0]; 290 } else { 291 // Discard the comment but keep any single line feed 292 $placeholder = strncmp($match[0], "\n", 1) === 0 || substr($match[0], -1) === "\n" 293 ? "\n" 294 : ''; 295 } 296 297 return $placeholder; 298 }; 299 300 $this->registerPattern('/\n?\/\*(.*?)\*\/\n?/s', $callback); 304 301 } 305 302 … … 315 312 * 316 313 * @return string The (manipulated) content 314 * 315 * @throws PatternMatchException 317 316 */ 318 317 protected function replace($content) … … 342 341 343 342 $match = null; 344 if (preg_match($pattern, $content, $match, PREG_OFFSET_CAPTURE, $processedOffset)) { 343 $matchResult = preg_match($pattern, $content, $match, PREG_OFFSET_CAPTURE, $processedOffset); 344 if ($matchResult) { 345 345 $matches[$i] = $match; 346 346 … … 350 350 $positions[$i] = $match[0][1]; 351 351 } else { 352 if ($matchResult === false) { 353 throw PatternMatchException::fromLastError( 354 "Failed to match pattern '$pattern' at $processedOffset" 355 ); 356 } 352 357 // if the pattern couldn't be matched, there's no point in 353 358 // executing it again in later runs on this same content; … … 391 396 * 392 397 * @param string|callable $replacement Replacement value 393 * @param array $matchMatch data, in PREG_OFFSET_CAPTURE form398 * @param array $match Match data, in PREG_OFFSET_CAPTURE form 394 399 * 395 400 * @return string … … 446 451 447 452 /* 453 * Quantifier {0,65535} is used instead of *? to avoid exceeding 454 * backtrack limit with large strings. 65535 is the maximum allowed 455 * (see https://www.php.net/manual/en/regexp.reference.repetition.php) 456 * and should be well sufficient for string representations here. 457 * 448 458 * The \\ messiness explained: 449 459 * * Don't count ' or " as end-of-string if it's escaped (has backslash … … 457 467 * escaped (times 2) 458 468 */ 459 $this->registerPattern('/([' . $chars . '])(.*?(?<!\\\\)(\\\\\\\\)*+)\\1/s', $callback); 469 470 $this->registerPattern('/([' . $chars . '])(.{0,65535}?(?<!\\\\)(\\\\\\\\)*+)\\1/s', $callback); 460 471 } 461 472 … … 533 544 * 534 545 * @param resource $handler The resource to write to 535 * @param string $content The content to write536 * @param string $pathThe path to the file (for exception printing only)546 * @param string $content The content to write 547 * @param string $path The path to the file (for exception printing only) 537 548 * 538 549 * @throws IOException -
powered-cache/tags/3.7.2/includes/package/deliciousbrains/wp-background-processing/classes/wp-background-process.php
r3302134 r3452186 932 932 */ 933 933 public function get_chain_id() { 934 if ( empty( $this->chain_id ) && wp_doing_ajax() ) {934 if ( empty( $this->chain_id ) && wp_doing_ajax() && isset( $_REQUEST['action'] ) && $_REQUEST['action'] === $this->identifier ) { 935 935 check_ajax_referer( $this->identifier, 'nonce' ); 936 936 -
powered-cache/tags/3.7.2/languages/powered-cache.pot
r3421853 r3452186 1 # Copyright (C) 202 5Powered Cache1 # Copyright (C) 2026 Powered Cache 2 2 # This file is distributed under the GPL v2 or later. 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: Powered Cache 3.7. 1\n"5 "Project-Id-Version: Powered Cache 3.7.2\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/powered-cache\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 202 5-12-17T11:50:28+00:00\n"12 "POT-Creation-Date: 2026-02-02T14:36:26+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 14 "X-Generator: WP-CLI 2.12.0\n" -
powered-cache/tags/3.7.2/powered-cache.php
r3421853 r3452186 4 4 * Plugin URI: https://poweredcache.com 5 5 * Description: Powered Cache is the most powerful caching and performance suite for WordPress, designed to easily improve your PageSpeed and Web Vitals Score. 6 * Version: 3.7. 16 * Version: 3.7.2 7 7 * Requires at least: 5.7 8 8 * Requires PHP: 7.4 … … 26 26 27 27 // Useful global constants. 28 define( 'POWERED_CACHE_VERSION', '3.7. 1' );28 define( 'POWERED_CACHE_VERSION', '3.7.2' ); 29 29 define( 'POWERED_CACHE_DB_VERSION', '3.4' ); 30 30 define( 'POWERED_CACHE_PLUGIN_FILE', __FILE__ ); -
powered-cache/tags/3.7.2/readme.txt
r3421853 r3452186 4 4 Requires at least: 5.7 5 5 Tested up to: 6.9 6 Stable tag: 3.7. 16 Stable tag: 3.7.2 7 7 License: GPLv2 (or later) 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 171 171 172 172 == Changelog == 173 174 = 3.7.2 (February 02, 2026) = 175 - [Fixed] Elementor ajax conflict with background processing. 176 - [Updated] Dependencies. 173 177 174 178 = 3.7.1 (December 17, 2025) = -
powered-cache/trunk/includes/classes/Dependencies/MatthiasMullie/Minify/CSS.php
r3160589 r3452186 14 14 15 15 use PoweredCache\Dependencies\MatthiasMullie\Minify\Exceptions\FileImportException; 16 use PoweredCache\Dependencies\MatthiasMullie\Minify\Exceptions\PatternMatchException; 16 17 use PoweredCache\Dependencies\MatthiasMullie\PathConverter\Converter; 17 18 use PoweredCache\Dependencies\MatthiasMullie\PathConverter\ConverterInterface; … … 110 111 * to save HTTP requests. 111 112 * 112 * @param string $sourceThe file to combine imports for113 * @param string $content The CSS content to combine imports for113 * @param string $source The file to combine imports for 114 * @param string $content The CSS content to combine imports for 114 115 * @param string[] $parents Parent paths, for circular reference checks 115 116 * … … 246 247 * original file, to save HTTP requests. 247 248 * 248 * @param string $source The file to import files for249 * @param string $source The file to import files for 249 250 * @param string $content The CSS content to import files for 250 251 * … … 297 298 * 298 299 * @return string The minified data 300 * 301 * @throws PatternMatchException 299 302 */ 300 303 public function execute($path = null, $parents = array()) … … 358 361 * 359 362 * @param ConverterInterface $converter Relative path converter 360 * @param string $contentThe CSS content to update relative urls for363 * @param string $content The CSS content to update relative urls for 361 364 * 362 365 * @return string … … 591 594 // convert `rgb` to `hex` 592 595 $dec = '([01]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])'; 596 593 597 return preg_replace_callback( 594 598 "/rgb\($dec $dec $dec\)/i", … … 622 626 623 627 // remove alpha channel if it's pointless .. 624 $content = preg_replace('/' . $tag . '\(\s*([^\s ]+)\s+([^\s]+)\s+([^\s]+)\s+\/\s+1(?:(?:\.\d?)*|00%)?\s*\)/i', '$1($2 $3 $4)', $content);628 $content = preg_replace('/' . $tag . '\(\s*([^\s)]+)\s+([^\s)]+)\s+([^\s)]+)\s+\/\s+1(?:(?:\.\d?)*|00%)?\s*\)/i', '$1($2 $3 $4)', $content); 625 629 626 630 // replace `transparent` with shortcut .. 627 $content = preg_replace('/' . $tag . '\(\s*[^\s ]+\s+[^\s]+\s+[^\s]+\s+\/\s+0(?:[\.0%]*)?\s*\)/i', '#fff0', $content);631 $content = preg_replace('/' . $tag . '\(\s*[^\s)]+\s+[^\s)]+\s+[^\s)]+\s+\/\s+0(?:[\.0%]*)?\s*\)/i', '#fff0', $content); 628 632 629 633 return $content; … … 733 737 * 734 738 * @return string 739 * 740 * @throws PatternMatchException 735 741 */ 736 742 protected function stripWhitespace($content) 737 743 { 738 744 // remove leading & trailing whitespace 739 $content = preg_replace('/^\s*/m', '', $content);740 $content = preg_replace('/\s*$/m', '', $content);745 $content = $this->pregReplace('/^\s*/m', '', $content); 746 $content = $this->pregReplace('/\s*$/m', '', $content); 741 747 742 748 // replace newlines with a single space 743 $content = preg_replace('/\s+/', ' ', $content);749 $content = $this->pregReplace('/\s+/', ' ', $content); 744 750 745 751 // remove whitespace around meta characters 746 752 // inspired by stackoverflow.com/questions/15195750/minify-compress-css-with-regex 747 $content = preg_replace('/\s*([\*$~^|]?+=|[{};,>~]|!important\b)\s*/', '$1', $content);748 $content = preg_replace('/([\[(:>\+])\s+/', '$1', $content);749 $content = preg_replace('/\s+([\]\)>\+])/', '$1', $content);750 $content = preg_replace('/\s+(:)(?![^\}]*\{)/', '$1', $content);753 $content = $this->pregReplace('/\s*([\*$~^|]?+=|[{};,>~]|!important\b)\s*/', '$1', $content); 754 $content = $this->pregReplace('/([\[(:>\+])\s+/', '$1', $content); 755 $content = $this->pregReplace('/\s+([\]\)>\+])/', '$1', $content); 756 $content = $this->pregReplace('/\s+(:)(?![^\}]*\{)/', '$1', $content); 751 757 752 758 // whitespace around + and - can only be stripped inside some pseudo- … … 755 761 // selectors like `div.weird- p` 756 762 $pseudos = array('nth-child', 'nth-last-child', 'nth-last-of-type', 'nth-of-type'); 757 $content = preg_replace('/:(' . implode('|', $pseudos) . ')\(\s*([+-]?)\s*(.+?)\s*([+-]?)\s*(.*?)\s*\)/', ':$1($2$3$4$5)', $content);763 $content = $this->pregReplace('/:(' . implode('|', $pseudos) . ')\(\s*([+-]?)\s*(.+?)\s*([+-]?)\s*(.*?)\s*\)/', ':$1($2$3$4$5)', $content); 758 764 759 765 // remove semicolon/whitespace followed by closing bracket … … 761 767 762 768 return trim($content); 769 } 770 771 /** 772 * Perform a preg_replace and check for errors. 773 * 774 * @param string $pattern Pattern 775 * @param string $replacement Replacement 776 * @param string $subject String to process 777 * 778 * @return string 779 * 780 * @throws PatternMatchException 781 */ 782 protected function pregReplace($pattern, $replacement, $subject) 783 { 784 $result = preg_replace($pattern, $replacement, $subject); 785 if ($result === null) { 786 throw PatternMatchException::fromLastError("Failed to replace with pattern '$pattern'"); 787 } 788 789 return $result; 763 790 } 764 791 -
powered-cache/trunk/includes/classes/Dependencies/MatthiasMullie/Minify/Exception.php
r2851003 r3452186 18 18 * @author Matthias Mullie <[email protected]> 19 19 */ 20 abstract class Exception extends \Exception 21 { 22 } 20 abstract class Exception extends \Exception {} -
powered-cache/trunk/includes/classes/Dependencies/MatthiasMullie/Minify/Exceptions/BasicException.php
r2851003 r3452186 20 20 * @author Matthias Mullie <[email protected]> 21 21 */ 22 abstract class BasicException extends Exception 23 { 24 } 22 abstract class BasicException extends Exception {} -
powered-cache/trunk/includes/classes/Dependencies/MatthiasMullie/Minify/Exceptions/FileImportException.php
r2851003 r3452186 18 18 * @author Matthias Mullie <[email protected]> 19 19 */ 20 class FileImportException extends BasicException 21 { 22 } 20 class FileImportException extends BasicException {} -
powered-cache/trunk/includes/classes/Dependencies/MatthiasMullie/Minify/Exceptions/IOException.php
r2851003 r3452186 18 18 * @author Matthias Mullie <[email protected]> 19 19 */ 20 class IOException extends BasicException 21 { 22 } 20 class IOException extends BasicException {} -
powered-cache/trunk/includes/classes/Dependencies/MatthiasMullie/Minify/JS.php
r3160589 r3452186 451 451 * 452 452 * @param string[] $operators 453 * @param string $delimiter453 * @param string $delimiter 454 454 * 455 455 * @return string[] … … 482 482 * 483 483 * @param string[] $keywords 484 * @param string $delimiter484 * @param string $delimiter 485 485 * 486 486 * @return string[] -
powered-cache/trunk/includes/classes/Dependencies/MatthiasMullie/Minify/Minify.php
r3160589 r3452186 14 14 15 15 use PoweredCache\Dependencies\MatthiasMullie\Minify\Exceptions\IOException; 16 use PoweredCache\Dependencies\MatthiasMullie\Minify\Exceptions\PatternMatchException; 16 17 use Psr\Cache\CacheItemInterface; 17 18 … … 231 232 * 232 233 * @param string $content The minified data 233 * @param string $path The path to save the minified data to234 * @param string $path The path to save the minified data to 234 235 * 235 236 * @throws IOException … … 250 251 * If you need that functionality, use a callback instead. 251 252 * 252 * @param string $patternPCRE pattern253 * @param string $pattern PCRE pattern 253 254 * @param string|callable $replacement Replacement value for matched pattern 254 255 */ … … 266 267 protected function stripMultilineComments() 267 268 { 268 // First extract comments we want to keep, so they can be restored later269 // PHP only supports $this inside anonymous functions since 5.4270 269 $minifier = $this; 271 $callback = function ($match) use ($minifier) { 272 $count = count($minifier->extracted); 273 $placeholder = '/*' . $count . '*/'; 274 $minifier->extracted[$placeholder] = $match[0]; 275 276 return $placeholder; 277 }; 278 $this->registerPattern('/ 279 # optional newline 280 \n? 281 282 # start comment 283 \/\* 284 270 // Pattern for matching comments that we want to preserve 271 $keepPattern = '/^ 285 272 # comment content 286 273 (?: … … 294 281 @(?:license|preserve) 295 282 ) 296 297 # then match to the end of the comment 298 .*?\*\/\n? 299 300 /ixs', $callback); 301 302 // Then strip all other comments 303 $this->registerPattern('/\/\*.*?\*\//s', ''); 283 /ixs'; 284 $callback = function ($match) use ($minifier, $keepPattern) { 285 if (preg_match($keepPattern, $match[1])) { 286 // Preserve the comment 287 $count = count($minifier->extracted); 288 $placeholder = '/*' . $count . '*/'; 289 $minifier->extracted[$placeholder] = $match[0]; 290 } else { 291 // Discard the comment but keep any single line feed 292 $placeholder = strncmp($match[0], "\n", 1) === 0 || substr($match[0], -1) === "\n" 293 ? "\n" 294 : ''; 295 } 296 297 return $placeholder; 298 }; 299 300 $this->registerPattern('/\n?\/\*(.*?)\*\/\n?/s', $callback); 304 301 } 305 302 … … 315 312 * 316 313 * @return string The (manipulated) content 314 * 315 * @throws PatternMatchException 317 316 */ 318 317 protected function replace($content) … … 342 341 343 342 $match = null; 344 if (preg_match($pattern, $content, $match, PREG_OFFSET_CAPTURE, $processedOffset)) { 343 $matchResult = preg_match($pattern, $content, $match, PREG_OFFSET_CAPTURE, $processedOffset); 344 if ($matchResult) { 345 345 $matches[$i] = $match; 346 346 … … 350 350 $positions[$i] = $match[0][1]; 351 351 } else { 352 if ($matchResult === false) { 353 throw PatternMatchException::fromLastError( 354 "Failed to match pattern '$pattern' at $processedOffset" 355 ); 356 } 352 357 // if the pattern couldn't be matched, there's no point in 353 358 // executing it again in later runs on this same content; … … 391 396 * 392 397 * @param string|callable $replacement Replacement value 393 * @param array $matchMatch data, in PREG_OFFSET_CAPTURE form398 * @param array $match Match data, in PREG_OFFSET_CAPTURE form 394 399 * 395 400 * @return string … … 446 451 447 452 /* 453 * Quantifier {0,65535} is used instead of *? to avoid exceeding 454 * backtrack limit with large strings. 65535 is the maximum allowed 455 * (see https://www.php.net/manual/en/regexp.reference.repetition.php) 456 * and should be well sufficient for string representations here. 457 * 448 458 * The \\ messiness explained: 449 459 * * Don't count ' or " as end-of-string if it's escaped (has backslash … … 457 467 * escaped (times 2) 458 468 */ 459 $this->registerPattern('/([' . $chars . '])(.*?(?<!\\\\)(\\\\\\\\)*+)\\1/s', $callback); 469 470 $this->registerPattern('/([' . $chars . '])(.{0,65535}?(?<!\\\\)(\\\\\\\\)*+)\\1/s', $callback); 460 471 } 461 472 … … 533 544 * 534 545 * @param resource $handler The resource to write to 535 * @param string $content The content to write536 * @param string $pathThe path to the file (for exception printing only)546 * @param string $content The content to write 547 * @param string $path The path to the file (for exception printing only) 537 548 * 538 549 * @throws IOException -
powered-cache/trunk/includes/package/deliciousbrains/wp-background-processing/classes/wp-background-process.php
r3302134 r3452186 932 932 */ 933 933 public function get_chain_id() { 934 if ( empty( $this->chain_id ) && wp_doing_ajax() ) {934 if ( empty( $this->chain_id ) && wp_doing_ajax() && isset( $_REQUEST['action'] ) && $_REQUEST['action'] === $this->identifier ) { 935 935 check_ajax_referer( $this->identifier, 'nonce' ); 936 936 -
powered-cache/trunk/languages/powered-cache.pot
r3421853 r3452186 1 # Copyright (C) 202 5Powered Cache1 # Copyright (C) 2026 Powered Cache 2 2 # This file is distributed under the GPL v2 or later. 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: Powered Cache 3.7. 1\n"5 "Project-Id-Version: Powered Cache 3.7.2\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/powered-cache\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 202 5-12-17T11:50:28+00:00\n"12 "POT-Creation-Date: 2026-02-02T14:36:26+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 14 "X-Generator: WP-CLI 2.12.0\n" -
powered-cache/trunk/powered-cache.php
r3421853 r3452186 4 4 * Plugin URI: https://poweredcache.com 5 5 * Description: Powered Cache is the most powerful caching and performance suite for WordPress, designed to easily improve your PageSpeed and Web Vitals Score. 6 * Version: 3.7. 16 * Version: 3.7.2 7 7 * Requires at least: 5.7 8 8 * Requires PHP: 7.4 … … 26 26 27 27 // Useful global constants. 28 define( 'POWERED_CACHE_VERSION', '3.7. 1' );28 define( 'POWERED_CACHE_VERSION', '3.7.2' ); 29 29 define( 'POWERED_CACHE_DB_VERSION', '3.4' ); 30 30 define( 'POWERED_CACHE_PLUGIN_FILE', __FILE__ ); -
powered-cache/trunk/readme.txt
r3421853 r3452186 4 4 Requires at least: 5.7 5 5 Tested up to: 6.9 6 Stable tag: 3.7. 16 Stable tag: 3.7.2 7 7 License: GPLv2 (or later) 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 171 171 172 172 == Changelog == 173 174 = 3.7.2 (February 02, 2026) = 175 - [Fixed] Elementor ajax conflict with background processing. 176 - [Updated] Dependencies. 173 177 174 178 = 3.7.1 (December 17, 2025) =
Note: See TracChangeset
for help on using the changeset viewer.