From 39b97209fae7b9b54b959166e988ef9d5de65a1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Perona?= Date: Mon, 23 Sep 2024 15:25:04 -0400 Subject: [PATCH 01/12] add method to to get lrc exclusions --- inc/Engine/Optimization/DynamicLists/DynamicLists.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/inc/Engine/Optimization/DynamicLists/DynamicLists.php b/inc/Engine/Optimization/DynamicLists/DynamicLists.php index 8ffbc97681..1734730889 100644 --- a/inc/Engine/Optimization/DynamicLists/DynamicLists.php +++ b/inc/Engine/Optimization/DynamicLists/DynamicLists.php @@ -302,4 +302,15 @@ public function get_exclude_js_templates(): array { return $lists->exclude_js_template ?? []; } + + /** + * Get the lazy rendered exclusions. + * + * @return array + */ + public function get_lrc_exclusions(): array { + $lists = $this->providers['defaultlists']->data_manager->get_lists(); + + return $lists->lazy_rendering_exclusions ?? []; + } } From 6a00375625335cd3f1f203905263bdb789037b18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Perona?= Date: Mon, 23 Sep 2024 15:25:19 -0400 Subject: [PATCH 02/12] add callback for lrc exclusions --- inc/Engine/Optimization/DynamicLists/Subscriber.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/inc/Engine/Optimization/DynamicLists/Subscriber.php b/inc/Engine/Optimization/DynamicLists/Subscriber.php index afb9425a1e..9948d47b05 100644 --- a/inc/Engine/Optimization/DynamicLists/Subscriber.php +++ b/inc/Engine/Optimization/DynamicLists/Subscriber.php @@ -43,6 +43,7 @@ public static function get_subscribed_events() { 'rocket_exclude_js' => 'add_js_exclude_files', 'rocket_plugins_to_deactivate' => 'add_incompatible_plugins_to_deactivate', 'rocket_staging_list' => 'add_staging_exclusions', + 'rocket_lrc_exclusions' => 'add_lrc_exclusions', ]; } @@ -213,4 +214,15 @@ public function add_incompatible_plugins_to_deactivate( $plugins = [] ): array { public function add_staging_exclusions( $stagings = [] ): array { return array_merge( (array) $stagings, (array) $this->dynamic_lists->get_stagings() ); } + + /** + * Add the LRC exclusions to the array + * + * @param array $exclusions Array of LRC exclusions. + * + * @return array + */ + public function add_lrc_exclusions( $exclusions ): array { + return array_merge( (array) $exclusions, $this->dynamic_lists->get_lrc_exclusions() ); + } } From 70587fab8e016867d6d61a71943553c1e7236c7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Perona?= Date: Mon, 23 Sep 2024 15:25:51 -0400 Subject: [PATCH 03/12] add set_exclusions() method to interface --- .../Frontend/Processor/ProcessorInterface.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/inc/Engine/Optimization/LazyRenderContent/Frontend/Processor/ProcessorInterface.php b/inc/Engine/Optimization/LazyRenderContent/Frontend/Processor/ProcessorInterface.php index 1a071cee7b..5b2b3bf637 100644 --- a/inc/Engine/Optimization/LazyRenderContent/Frontend/Processor/ProcessorInterface.php +++ b/inc/Engine/Optimization/LazyRenderContent/Frontend/Processor/ProcessorInterface.php @@ -12,4 +12,13 @@ interface ProcessorInterface { * @return string */ public function add_hashes( $html ); + + /** + * Sets the exclusions list + * + * @param string[] $exclusions The list of patterns to exclude from hash injection. + * + * @return void + */ + public function set_exclusions( array $exclusions ): void; } From 24395aed84fd98c520f4c8046eccda061480f7e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Perona?= Date: Mon, 23 Sep 2024 15:26:08 -0400 Subject: [PATCH 04/12] use exclusions --- .../Frontend/Processor/Dom.php | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/inc/Engine/Optimization/LazyRenderContent/Frontend/Processor/Dom.php b/inc/Engine/Optimization/LazyRenderContent/Frontend/Processor/Dom.php index f846a1f462..418ec1274b 100644 --- a/inc/Engine/Optimization/LazyRenderContent/Frontend/Processor/Dom.php +++ b/inc/Engine/Optimization/LazyRenderContent/Frontend/Processor/Dom.php @@ -28,6 +28,43 @@ class Dom implements ProcessorInterface { */ private $max_hashes; + /** + * Array of patterns to exclude from hash injection. + * + * @since 3.17 + * + * @var array + */ + private $exclusions; + + /** + * Sets the exclusions list + * + * @param string[] $exclusions The list of patterns to exclude from hash injection. + * + * @return void + */ + public function set_exclusions( $exclusions ): void { + $this->exclusions = $exclusions; + } + + /** + * Gets the exclusions pattern + * + * @return string + */ + private function get_exclusions_pattern(): string { + $exclusions = $this->exclusions; + + if ( empty( $exclusions ) ) { + return ''; + } + + $exclusions = array_map( 'preg_quote', $exclusions ); + + return implode( '|', $exclusions ); + } + /** * Add hashes to the HTML elements * @@ -107,6 +144,10 @@ private function add_hash_to_element( $element, $depth, $html ) { $child_html = $child->ownerDocument->saveHTML( $child ); // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase $opening_tag_html = strstr( $child_html, '>', true ) . '>'; + if ( preg_match( '/(' . $this->get_exclusions_pattern() . ')/i', $opening_tag_html ) ) { + continue; + } + $hash = md5( $opening_tag_html . $this->count ); ++$this->count; From 6f5c52bbe9861d767777bde010ed67f6046eba32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Perona?= Date: Mon, 23 Sep 2024 15:26:19 -0400 Subject: [PATCH 05/12] pass exclusions array to processor --- .../LazyRenderContent/Frontend/Controller.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/inc/Engine/Optimization/LazyRenderContent/Frontend/Controller.php b/inc/Engine/Optimization/LazyRenderContent/Frontend/Controller.php index 6815b6f3cd..2b498cbc4c 100644 --- a/inc/Engine/Optimization/LazyRenderContent/Frontend/Controller.php +++ b/inc/Engine/Optimization/LazyRenderContent/Frontend/Controller.php @@ -145,10 +145,29 @@ public function add_hashes( $html ) { $processor = wpm_apply_filters_typed( 'string', 'rocket_lrc_processor', 'dom' ); $this->processor->set_processor( $processor ); + $this->processor->get_processor()->set_exclusions( $this->get_exclusions() ); return $this->processor->get_processor()->add_hashes( $html ); } + /** + * Get the list of patterns to exclude from hash injection. + * + * @return string[] + */ + private function get_exclusions(): array { + /** + * Filters the list of patterns to exclude from hash injection. + * + * @since 3.17 + * + * @param string[] $exclusions The list of patterns to exclude from hash injection. + */ + $exclusions = wpm_apply_filters_typed( 'array', 'rocket_lrc_exclusions', [] ); + + return $exclusions; + } + /** * Add custom data like the List of elements to be considered for optimization. * From 8945978b82c00fb65aac8a5aac8b80f5f34121af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Perona?= Date: Mon, 23 Sep 2024 15:44:55 -0400 Subject: [PATCH 06/12] add set_exclusions() method --- .../Frontend/Processor/Regex.php | 20 +++++++++++++++++++ .../Frontend/Processor/SimpleHtmlDom.php | 20 +++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/inc/Engine/Optimization/LazyRenderContent/Frontend/Processor/Regex.php b/inc/Engine/Optimization/LazyRenderContent/Frontend/Processor/Regex.php index 97252455fd..e8af3db70e 100644 --- a/inc/Engine/Optimization/LazyRenderContent/Frontend/Processor/Regex.php +++ b/inc/Engine/Optimization/LazyRenderContent/Frontend/Processor/Regex.php @@ -27,6 +27,26 @@ class Regex implements ProcessorInterface { */ private $max_hashes; + /** + * Array of patterns to exclude from hash injection. + * + * @since 3.17 + * + * @var array + */ + private $exclusions; + + /** + * Sets the exclusions list + * + * @param string[] $exclusions The list of patterns to exclude from hash injection. + * + * @return void + */ + public function set_exclusions( $exclusions ): void { + $this->exclusions = $exclusions; + } + /** * Add hashes to the HTML elements * diff --git a/inc/Engine/Optimization/LazyRenderContent/Frontend/Processor/SimpleHtmlDom.php b/inc/Engine/Optimization/LazyRenderContent/Frontend/Processor/SimpleHtmlDom.php index 746a9300a7..ff5253addb 100644 --- a/inc/Engine/Optimization/LazyRenderContent/Frontend/Processor/SimpleHtmlDom.php +++ b/inc/Engine/Optimization/LazyRenderContent/Frontend/Processor/SimpleHtmlDom.php @@ -30,6 +30,26 @@ class SimpleHtmlDom implements ProcessorInterface { */ private $max_hashes; + /** + * Array of patterns to exclude from hash injection. + * + * @since 3.17 + * + * @var array + */ + private $exclusions; + + /** + * Sets the exclusions list + * + * @param string[] $exclusions The list of patterns to exclude from hash injection. + * + * @return void + */ + public function set_exclusions( $exclusions ): void { + $this->exclusions = $exclusions; + } + /** * Add hashes to the HTML elements * From 4e94e61436dc9090ef6362c93ceafdc56a3a8dc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Perona?= Date: Mon, 23 Sep 2024 15:52:00 -0400 Subject: [PATCH 07/12] update pattern escaping --- .../LazyRenderContent/Frontend/Processor/Dom.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/inc/Engine/Optimization/LazyRenderContent/Frontend/Processor/Dom.php b/inc/Engine/Optimization/LazyRenderContent/Frontend/Processor/Dom.php index 418ec1274b..ef762f0180 100644 --- a/inc/Engine/Optimization/LazyRenderContent/Frontend/Processor/Dom.php +++ b/inc/Engine/Optimization/LazyRenderContent/Frontend/Processor/Dom.php @@ -60,7 +60,12 @@ private function get_exclusions_pattern(): string { return ''; } - $exclusions = array_map( 'preg_quote', $exclusions ); + $exclusions = array_map( + function ( $exclusion ) { + return preg_quote( $exclusion, '#' ); + }, + $exclusions + ); return implode( '|', $exclusions ); } From 05f6538ee9ddd40713ca2aa8fa2c28f3c0a41b76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Perona?= Date: Mon, 23 Sep 2024 16:01:47 -0400 Subject: [PATCH 08/12] check if exclusions pattern is empty --- .../Frontend/Processor/Dom.php | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/inc/Engine/Optimization/LazyRenderContent/Frontend/Processor/Dom.php b/inc/Engine/Optimization/LazyRenderContent/Frontend/Processor/Dom.php index ef762f0180..aa0a0c4d94 100644 --- a/inc/Engine/Optimization/LazyRenderContent/Frontend/Processor/Dom.php +++ b/inc/Engine/Optimization/LazyRenderContent/Frontend/Processor/Dom.php @@ -7,7 +7,6 @@ use WP_Rocket\Logger\Logger; class Dom implements ProcessorInterface { - use HelperTrait; /** @@ -35,7 +34,7 @@ class Dom implements ProcessorInterface { * * @var array */ - private $exclusions; + private $exclusions = []; /** * Sets the exclusions list @@ -54,9 +53,7 @@ public function set_exclusions( $exclusions ): void { * @return string */ private function get_exclusions_pattern(): string { - $exclusions = $this->exclusions; - - if ( empty( $exclusions ) ) { + if ( empty( $this->exclusions ) ) { return ''; } @@ -64,7 +61,7 @@ private function get_exclusions_pattern(): string { function ( $exclusion ) { return preg_quote( $exclusion, '#' ); }, - $exclusions + $this->exclusions ); return implode( '|', $exclusions ); @@ -149,7 +146,13 @@ private function add_hash_to_element( $element, $depth, $html ) { $child_html = $child->ownerDocument->saveHTML( $child ); // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase $opening_tag_html = strstr( $child_html, '>', true ) . '>'; - if ( preg_match( '/(' . $this->get_exclusions_pattern() . ')/i', $opening_tag_html ) ) { + $exclusions_pattern = $this->get_exclusions_pattern(); + + if ( + ! empty( $exclusions_pattern ) + && + preg_match( '/(' . $exclusions_pattern . ')/i', $opening_tag_html ) + ) { continue; } From efac3d7ed65bf392244170a89faf7c027826707b Mon Sep 17 00:00:00 2001 From: Gael Robin Date: Tue, 24 Sep 2024 04:23:22 +0200 Subject: [PATCH 09/12] Adds integration test on `rocket_lrc_exclusions` --- .../Subscriber/addLrcExclusions.php | 32 +++++++++++++ .../Subscriber/addLrcExclusions.php | 46 +++++++++++++++++++ 2 files changed, 78 insertions(+) create mode 100644 tests/Fixtures/inc/Engine/Optimization/DynamicLists/Subscriber/addLrcExclusions.php create mode 100644 tests/Integration/inc/Engine/Optimization/DynamicLists/Subscriber/addLrcExclusions.php diff --git a/tests/Fixtures/inc/Engine/Optimization/DynamicLists/Subscriber/addLrcExclusions.php b/tests/Fixtures/inc/Engine/Optimization/DynamicLists/Subscriber/addLrcExclusions.php new file mode 100644 index 0000000000..c2d9beafc4 --- /dev/null +++ b/tests/Fixtures/inc/Engine/Optimization/DynamicLists/Subscriber/addLrcExclusions.php @@ -0,0 +1,32 @@ + [ + 'config' => [ + 'dynamic_lists' => (object) [ + 'lazy_rendering_exclusions' => [ + 'a' + ] + ], + 'exclusions' => ['p', 'div'] + ], + 'expected' => [ + 'p', + 'div', + 'a' + ], + ], + 'shouldReturnUpdatedArrayWhenOriginalEmpty' => [ + 'config' => [ + 'dynamic_lists' => (object) [ + 'lazy_rendering_exclusions' => [ + ] + ], + 'exclusions' => ['p', 'div'] + ], + 'expected' => [ + 'p', + 'div', + ], + ], +]; diff --git a/tests/Integration/inc/Engine/Optimization/DynamicLists/Subscriber/addLrcExclusions.php b/tests/Integration/inc/Engine/Optimization/DynamicLists/Subscriber/addLrcExclusions.php new file mode 100644 index 0000000000..79ba017701 --- /dev/null +++ b/tests/Integration/inc/Engine/Optimization/DynamicLists/Subscriber/addLrcExclusions.php @@ -0,0 +1,46 @@ +unregisterAllCallbacksExcept( 'rocket_lrc_exclusions', 'add_lrc_exclusions', 10 ); + } + + public function tear_down() { + remove_filter( 'pre_transient_wpr_dynamic_lists', [$this, 'set_dynamic_list'] ); + + $this->restoreWpHook( 'rocket_lrc_exclusions' ); + + parent::tear_down(); + } + + /** + * @dataProvider configTestData + */ + public function testShouldReturnExpected( $config, $expected ) { + $this->dynamic_lists = $config['dynamic_lists']; + add_filter( 'pre_transient_wpr_dynamic_lists', [$this, 'set_dynamic_list'], 12 ); + + $this->assertSame( + $expected, + wpm_apply_filters_typed('array', 'rocket_lrc_exclusions', $config['exclusions'] ) + ); + } + + public function set_dynamic_list() { + return $this->dynamic_lists; + } +} From b58ea3b3d585a878b1e50ac73784aae2eaee20f5 Mon Sep 17 00:00:00 2001 From: Gael Robin Date: Tue, 24 Sep 2024 04:44:19 +0200 Subject: [PATCH 10/12] Adds integration test on `add_hashes` --- .../Frontend/Subscriber/add_hashes.php | 26 ++++++- .../Subscriber/html/expected_exclusions.php | 67 +++++++++++++++++++ .../Frontend/Subscriber/add_hashes.php | 7 +- 3 files changed, 98 insertions(+), 2 deletions(-) create mode 100644 tests/Fixtures/inc/Engine/Optimization/LazyRenderContent/Frontend/Subscriber/html/expected_exclusions.php diff --git a/tests/Fixtures/inc/Engine/Optimization/LazyRenderContent/Frontend/Subscriber/add_hashes.php b/tests/Fixtures/inc/Engine/Optimization/LazyRenderContent/Frontend/Subscriber/add_hashes.php index 4398813895..7ba4a5967f 100644 --- a/tests/Fixtures/inc/Engine/Optimization/LazyRenderContent/Frontend/Subscriber/add_hashes.php +++ b/tests/Fixtures/inc/Engine/Optimization/LazyRenderContent/Frontend/Subscriber/add_hashes.php @@ -55,6 +55,30 @@ 'expected' => [ 'html' => file_get_contents( WP_ROCKET_TESTS_FIXTURES_DIR . '/inc/Engine/Optimization/LazyRenderContent/Frontend/Subscriber/html/long_expected_150_hashes.php' ), ] - ] + ], + 'shouldNotAddHashesToExclusions' => [ + 'config' => [ + 'row' => [ + 'url' => 'http://example.org/', + 'is_mobile' => 0, + 'below_the_fold' => json_encode( + [ + "93548b90aa8f4989f7198144479055dc", + "7b16eca0652d4703f83ba63e304f2030", + "737184bbad8e65d0172a89cc68a46107", + "8a4ef50742cf3456f9db6425e16930dc" + ] + ), + 'status' => 'completed' + ], + 'html' => file_get_contents( WP_ROCKET_TESTS_FIXTURES_DIR . '/inc/Engine/Optimization/LazyRenderContent/Frontend/Subscriber/html/original.php' ), + 'exclusions' => [ + 'footer' + ], + ], + 'expected' => [ + 'html' => file_get_contents( WP_ROCKET_TESTS_FIXTURES_DIR . '/inc/Engine/Optimization/LazyRenderContent/Frontend/Subscriber/html/expected_exclusions.php' ), + ] + ], ] ]; diff --git a/tests/Fixtures/inc/Engine/Optimization/LazyRenderContent/Frontend/Subscriber/html/expected_exclusions.php b/tests/Fixtures/inc/Engine/Optimization/LazyRenderContent/Frontend/Subscriber/html/expected_exclusions.php new file mode 100644 index 0000000000..97a25999e9 --- /dev/null +++ b/tests/Fixtures/inc/Engine/Optimization/LazyRenderContent/Frontend/Subscriber/html/expected_exclusions.php @@ -0,0 +1,67 @@ + + + + + + + + + + +
400px +
800 px +































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































+ 1800 px
Testing something
+
+
+ +
+
+
+
+ This is a class with margin-top set to 3000px +
+
+
+
+ +
+
+
+ This is a class with margin-top set to 1800px +
+
+
+ +
+ Somethign fishy going on. +
+ + diff --git a/tests/Integration/inc/Engine/Optimization/LazyRenderContent/Frontend/Subscriber/add_hashes.php b/tests/Integration/inc/Engine/Optimization/LazyRenderContent/Frontend/Subscriber/add_hashes.php index 412f15a940..699cf7caf5 100644 --- a/tests/Integration/inc/Engine/Optimization/LazyRenderContent/Frontend/Subscriber/add_hashes.php +++ b/tests/Integration/inc/Engine/Optimization/LazyRenderContent/Frontend/Subscriber/add_hashes.php @@ -30,6 +30,7 @@ public function set_up() { $this->max_hashes = null; $this->unregisterAllCallbacksExcept( 'rocket_performance_hints_buffer', 'add_hashes', 16 ); + } public function tear_down() { @@ -47,12 +48,16 @@ public function testShouldWorkAsExpected( $config, $expected ) { self::addLrc( $config['row'] ); add_filter( 'rocket_lrc_optimization', '__return_true' ); + add_filter( 'rocket_lrc_exclusions', function() use ($config) { + return $config['exclusions'] ?? []; + }); + if ( isset( $config['max_hashes'] ) ) { $this->max_hashes = $config['max_hashes']; add_filter( 'rocket_lrc_max_hashes', [ $this, 'set_lrc_max_hashes' ] ); } - + $this->assertSame( $expected['html'], From 4ca0de1b49707582b0c6c50a89d02c17e13b2453 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Perona?= Date: Tue, 24 Sep 2024 09:14:31 -0400 Subject: [PATCH 11/12] use more specific type --- .../Optimization/LazyRenderContent/Frontend/Controller.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/Engine/Optimization/LazyRenderContent/Frontend/Controller.php b/inc/Engine/Optimization/LazyRenderContent/Frontend/Controller.php index 2b498cbc4c..739124ceb4 100644 --- a/inc/Engine/Optimization/LazyRenderContent/Frontend/Controller.php +++ b/inc/Engine/Optimization/LazyRenderContent/Frontend/Controller.php @@ -159,11 +159,11 @@ private function get_exclusions(): array { /** * Filters the list of patterns to exclude from hash injection. * - * @since 3.17 + * @since 3.17.0.2 * * @param string[] $exclusions The list of patterns to exclude from hash injection. */ - $exclusions = wpm_apply_filters_typed( 'array', 'rocket_lrc_exclusions', [] ); + $exclusions = wpm_apply_filters_typed( 'string[]', 'rocket_lrc_exclusions', [] ); return $exclusions; } From e4d2713058cc04871cfe88771455543e750e713d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Perona?= Date: Tue, 24 Sep 2024 09:14:41 -0400 Subject: [PATCH 12/12] update since value --- .../Optimization/LazyRenderContent/Frontend/Processor/Dom.php | 4 ++-- .../LazyRenderContent/Frontend/Processor/Regex.php | 2 +- .../LazyRenderContent/Frontend/Processor/SimpleHtmlDom.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/inc/Engine/Optimization/LazyRenderContent/Frontend/Processor/Dom.php b/inc/Engine/Optimization/LazyRenderContent/Frontend/Processor/Dom.php index aa0a0c4d94..546e8872cf 100644 --- a/inc/Engine/Optimization/LazyRenderContent/Frontend/Processor/Dom.php +++ b/inc/Engine/Optimization/LazyRenderContent/Frontend/Processor/Dom.php @@ -30,7 +30,7 @@ class Dom implements ProcessorInterface { /** * Array of patterns to exclude from hash injection. * - * @since 3.17 + * @since 3.17.0.2 * * @var array */ @@ -59,7 +59,7 @@ private function get_exclusions_pattern(): string { $exclusions = array_map( function ( $exclusion ) { - return preg_quote( $exclusion, '#' ); + return preg_quote( $exclusion, '/' ); }, $this->exclusions ); diff --git a/inc/Engine/Optimization/LazyRenderContent/Frontend/Processor/Regex.php b/inc/Engine/Optimization/LazyRenderContent/Frontend/Processor/Regex.php index e8af3db70e..56487bb3a4 100644 --- a/inc/Engine/Optimization/LazyRenderContent/Frontend/Processor/Regex.php +++ b/inc/Engine/Optimization/LazyRenderContent/Frontend/Processor/Regex.php @@ -30,7 +30,7 @@ class Regex implements ProcessorInterface { /** * Array of patterns to exclude from hash injection. * - * @since 3.17 + * @since 3.17.0.2 * * @var array */ diff --git a/inc/Engine/Optimization/LazyRenderContent/Frontend/Processor/SimpleHtmlDom.php b/inc/Engine/Optimization/LazyRenderContent/Frontend/Processor/SimpleHtmlDom.php index ff5253addb..d7a3f8cdf7 100644 --- a/inc/Engine/Optimization/LazyRenderContent/Frontend/Processor/SimpleHtmlDom.php +++ b/inc/Engine/Optimization/LazyRenderContent/Frontend/Processor/SimpleHtmlDom.php @@ -33,7 +33,7 @@ class SimpleHtmlDom implements ProcessorInterface { /** * Array of patterns to exclude from hash injection. * - * @since 3.17 + * @since 3.17.0.2 * * @var array */