From 12dc9ca50bfc715f1b17c0e7efb146790cf1fc21 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sat, 14 Oct 2023 12:20:25 +0000 Subject: [PATCH 01/71] Twenty Nineteen: Correctly display default color names in the color palette. Instead of displaying the color names, two of the default colors displayed the color code, which was only intended to show when the user has enabled the custom color option in the Customizer. The reason is that the default value for the option is `false`, and this value is changed to the string `'custom'` if the color option is enabled, and the string `'default'` if the custom color is enabled and then reset to default colors. This commit adjusts the logic for displaying the color name, to make sure that the string value `'default'` is not compared with `false`, by adding the default value as a parameter to `get_theme_mod( 'primary_color' )`. Follow-up to [45964]. Props poena, mukesh27, ugyensupport, shailu25, anveshika, harshgajipara, nicolefurlan, syamraj24, balub, vivekawsm. Fixes #59566. git-svn-id: https://develop.svn.wordpress.org/trunk@56935 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-content/themes/twentynineteen/functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-content/themes/twentynineteen/functions.php b/src/wp-content/themes/twentynineteen/functions.php index 33ce770581ba3..de93b40f77678 100644 --- a/src/wp-content/themes/twentynineteen/functions.php +++ b/src/wp-content/themes/twentynineteen/functions.php @@ -139,12 +139,12 @@ function twentynineteen_setup() { 'editor-color-palette', array( array( - 'name' => 'default' === get_theme_mod( 'primary_color' ) ? __( 'Blue', 'twentynineteen' ) : null, + 'name' => 'default' === get_theme_mod( 'primary_color', 'default' ) ? __( 'Blue', 'twentynineteen' ) : null, 'slug' => 'primary', 'color' => twentynineteen_hsl_hex( 'default' === get_theme_mod( 'primary_color' ) ? 199 : get_theme_mod( 'primary_color_hue', 199 ), 100, 33 ), ), array( - 'name' => 'default' === get_theme_mod( 'primary_color' ) ? __( 'Dark Blue', 'twentynineteen' ) : null, + 'name' => 'default' === get_theme_mod( 'primary_color', 'default' ) ? __( 'Dark Blue', 'twentynineteen' ) : null, 'slug' => 'secondary', 'color' => twentynineteen_hsl_hex( 'default' === get_theme_mod( 'primary_color' ) ? 199 : get_theme_mod( 'primary_color_hue', 199 ), 100, 23 ), ), From 0633814df899694d29e185763776000a933b92fe Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 15 Oct 2023 08:07:11 +0000 Subject: [PATCH 02/71] Tests: Reset the current user before performing assertions in some comment tests. This aims to avoid affecting other tests in case of failure. Follow-up to [54527]. See #58955. git-svn-id: https://develop.svn.wordpress.org/trunk@56936 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/comment.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/phpunit/tests/comment.php b/tests/phpunit/tests/comment.php index d37007d824a06..2af822f456677 100644 --- a/tests/phpunit/tests/comment.php +++ b/tests/phpunit/tests/comment.php @@ -121,14 +121,14 @@ public function test_update_comment_from_privileged_user_by_privileged_user() { ) ); + wp_set_current_user( 0 ); + $comment = get_comment( $comment_id ); $expected_content = is_multisite() ? 'new comment ' : 'new comment '; $this->assertSame( $expected_content, $comment->comment_content ); - - wp_set_current_user( 0 ); } public function test_update_comment_from_unprivileged_user_by_privileged_user() { @@ -165,9 +165,10 @@ public function test_update_comment_from_unprivileged_user_by_privileged_user() ) ); + wp_set_current_user( 0 ); + $comment = get_comment( $comment_id ); $this->assertSame( 'click', $comment->comment_content, 'Comment: ' . $comment->comment_content ); - wp_set_current_user( 0 ); } /** From 39e28173d5c23787e7a9db2dbf60f2f249e13e44 Mon Sep 17 00:00:00 2001 From: Tonya Mork Date: Sun, 15 Oct 2023 14:02:34 +0000 Subject: [PATCH 03/71] Users: Show "Password reset link sent" message only when finished. When an admin sends a password reset link to a user (from the Users UI screen), the "finished" UI message: >Password reset link sent. is displayed on "finished" and no longer displayed on error. **What is the change?** Previously, the conditional (for incrementing the reset counter) checked for a truthy return from `retrieve_password()`. But `retrieve_password()` always returns a truthy state: `true` (meaning "finished") or an instance of `WP_Error`. Thus, checking for a truthy meant the "finished" message was sent on both "finished" and error/failed. This fix checks for `retrieve_password()` returning `true` to indicate "finished". **What is displayed on error?** If `retrieve_password()` returns an instance of `WP_Error`, the following UI message is shown: >Password reset links sent to 0 users. The UI messages were not modified by this changeset. Follow-up to [50129]. Props letraceursnork, prashantbhivsane, audrasjb, costdev, dilipbheda, hareesh-pillai, hellofromTonya, ironprogrammer, huzaifaalmesbah, marybaum, nicolefurlan, oglekler, petitphp, SergeyBiryukov. Fixes #58407. git-svn-id: https://develop.svn.wordpress.org/trunk@56937 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/users.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-admin/users.php b/src/wp-admin/users.php index bab7ad5196085..94d891ae0c963 100644 --- a/src/wp-admin/users.php +++ b/src/wp-admin/users.php @@ -256,7 +256,7 @@ // Send the password reset link. $user = get_userdata( $id ); - if ( retrieve_password( $user->user_login ) ) { + if ( true === retrieve_password( $user->user_login ) ) { ++$reset_count; } } From f5e171652f218df3eaa5ef07a978a7588fed01de Mon Sep 17 00:00:00 2001 From: Tonya Mork Date: Sun, 15 Oct 2023 14:53:12 +0000 Subject: [PATCH 04/71] Code Modernization: Declare dynamic properties on WP_Text_Diff_Renderer_Table. Core uses 3 known, named, dynamic properties on the `WP_Text_Diff_Renderer_Table` class: * `_title` * `_title_left` * `_title_right` When reviewing revisions (within the admin UI), `wp_text_diff()` passes the arguments (without the leading `_`) to a new instance, which raised deprecation notices (see [56354]). Note: the parent class adds the leading `_` to each of these properties (see [7747]). The deprecation notices are resolved by declaring each of these known, named, dynamic properties on the class, per the #56034 mitigation strategy. These new properties are not initialized to retain their previous `null` behavior. Follow-up to [56354], [23506], [7747]. Props wildworks, antonvlasenko, hellofromTonya, ironprogrammer, kafleg, mukesh27, nicolefurlan, presskopp, sabernhardt. Fixes #59431. See #58898, #56034. git-svn-id: https://develop.svn.wordpress.org/trunk@56938 602fd350-edb4-49c9-b593-d223f7449a82 --- .../class-wp-text-diff-renderer-table.php | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/wp-includes/class-wp-text-diff-renderer-table.php b/src/wp-includes/class-wp-text-diff-renderer-table.php index ddf732c3e5232..4fa3d414d2401 100644 --- a/src/wp-includes/class-wp-text-diff-renderer-table.php +++ b/src/wp-includes/class-wp-text-diff-renderer-table.php @@ -30,6 +30,30 @@ class WP_Text_Diff_Renderer_Table extends Text_Diff_Renderer { */ public $_trailing_context_lines = 10000; + /** + * Title of the item being compared. + * + * @since 6.4.0 Declared a previously dynamic property. + * @var string|null + */ + public $_title; + + /** + * Title for the left column. + * + * @since 6.4.0 Declared a previously dynamic property. + * @var string|null + */ + public $_title_left; + + /** + * Title for the right column. + * + * @since 6.4.0 Declared a previously dynamic property. + * @var string|null + */ + public $_title_right; + /** * Threshold for when a diff should be saved or omitted. * From 60cd149b6f8a92f9e9f0f44bf006efcd2c764bce Mon Sep 17 00:00:00 2001 From: Colin Stewart Date: Mon, 16 Oct 2023 00:05:28 +0000 Subject: [PATCH 05/71] Posts, Post Types: Don't force trailing slash in `get_pagenum_link()`. Previously, a trailing slash was appended to the link returned from `get_pagenum_link()`. If the permalink structure didn't contain a trailing slash, this link could fail. This change removes trailing slashes and only appends one if the site is set for adding trailing slashes. This adds a new test file for the accompanying tests, `tests/phpunit/tests/link/getPagenumLink.php`, and moves an existing test for `get_pagenum_link()` to the same file. Props davemad-davenet, darkfate, Nazgul, scribu, nacin, obenland, chriscct7, jesin, matthewppelsheimer, audrasjb, petitphp, mukesh27, oglekler, mai21, webtechpooja, tejwanihemant, nicolefurlan, hellofromTonya, costdev. Fixes #2877. git-svn-id: https://develop.svn.wordpress.org/trunk@56939 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/link-template.php | 17 +- tests/phpunit/tests/link.php | 22 --- tests/phpunit/tests/link/getPagenumLink.php | 199 ++++++++++++++++++++ 3 files changed, 211 insertions(+), 27 deletions(-) create mode 100644 tests/phpunit/tests/link/getPagenumLink.php diff --git a/src/wp-includes/link-template.php b/src/wp-includes/link-template.php index e454ecebe059d..9f3d9a97ee440 100644 --- a/src/wp-includes/link-template.php +++ b/src/wp-includes/link-template.php @@ -2431,6 +2431,9 @@ function get_pagenum_link( $pagenum = 1, $escape = true ) { $qs_regex = '|\?.*?$|'; preg_match( $qs_regex, $request, $qs_match ); + $parts = array(); + $parts[] = untrailingslashit( get_bloginfo( 'url' ) ); + if ( ! empty( $qs_match[0] ) ) { $query_string = $qs_match[0]; $request = preg_replace( $qs_regex, '', $request ); @@ -2442,17 +2445,21 @@ function get_pagenum_link( $pagenum = 1, $escape = true ) { $request = preg_replace( '|^' . preg_quote( $wp_rewrite->index, '|' ) . '|i', '', $request ); $request = ltrim( $request, '/' ); - $base = trailingslashit( get_bloginfo( 'url' ) ); - if ( $wp_rewrite->using_index_permalinks() && ( $pagenum > 1 || '' !== $request ) ) { - $base .= $wp_rewrite->index . '/'; + $parts[] = $wp_rewrite->index; } + $parts[] = untrailingslashit( $request ); + if ( $pagenum > 1 ) { - $request = ( ( ! empty( $request ) ) ? trailingslashit( $request ) : $request ) . user_trailingslashit( $wp_rewrite->pagination_base . '/' . $pagenum, 'paged' ); + $parts[] = $wp_rewrite->pagination_base; + $parts[] = $pagenum; } - $result = $base . $request . $query_string; + $result = user_trailingslashit( implode( '/', array_filter( $parts ) ), 'paged' ); + if ( ! empty( $query_string ) ) { + $result .= $query_string; + } } /** diff --git a/tests/phpunit/tests/link.php b/tests/phpunit/tests/link.php index f3216c17eed93..d05a6b210f636 100644 --- a/tests/phpunit/tests/link.php +++ b/tests/phpunit/tests/link.php @@ -4,28 +4,6 @@ */ class Tests_Link extends WP_UnitTestCase { - public function get_pagenum_link_cb( $url ) { - return $url . '/WooHoo'; - } - - /** - * @ticket 8847 - */ - public function test_get_pagenum_link_case_insensitivity() { - $old_req_uri = $_SERVER['REQUEST_URI']; - - $this->set_permalink_structure( '/%year%/%monthnum%/%day%/%postname%/' ); - - add_filter( 'home_url', array( $this, 'get_pagenum_link_cb' ) ); - $_SERVER['REQUEST_URI'] = '/woohoo'; - $paged = get_pagenum_link( 2 ); - - remove_filter( 'home_url', array( $this, 'get_pagenum_link_cb' ) ); - $this->assertSame( $paged, home_url( '/WooHoo/page/2/' ) ); - - $_SERVER['REQUEST_URI'] = $old_req_uri; - } - public function test_wp_get_shortlink() { $post_id = self::factory()->post->create(); $post_id2 = self::factory()->post->create(); diff --git a/tests/phpunit/tests/link/getPagenumLink.php b/tests/phpunit/tests/link/getPagenumLink.php new file mode 100644 index 0000000000000..9c81cc84548cf --- /dev/null +++ b/tests/phpunit/tests/link/getPagenumLink.php @@ -0,0 +1,199 @@ +set_permalink_structure( '/%year%/%monthnum%/%day%/%postname%/' ); + + add_filter( 'home_url', array( $this, 'get_pagenum_link_cb' ) ); + $_SERVER['REQUEST_URI'] = '/woohoo'; + $paged = get_pagenum_link( 2 ); + + remove_filter( 'home_url', array( $this, 'get_pagenum_link_cb' ) ); + $this->assertSame( $paged, home_url( '/WooHoo/page/2/' ) ); + } + + /** + * Appends '/WooHoo' to the provided URL. + * + * Callback for the 'home_url' filter hook. + * + * @param string $url The base URL. + * @return string The base URL with '/WooHoo' appended. + */ + public function get_pagenum_link_cb( $url ) { + return $url . '/WooHoo'; + } + + /** + * Tests that a trailing slash is not added to the link. + * + * @ticket 2877 + * + * @dataProvider data_get_pagenum_link_plain_permalinks + * @dataProvider data_get_pagenum_link + * + * @param string $permalink_structure The structure to use for permalinks. + * @param string $request_uri The value for `$_SERVER['REQUEST_URI']`. + * @param int $pagenum The page number to get the link for. + * @param string $expected The expected relative URL. + */ + public function test_get_pagenum_link_should_not_add_trailing_slash( $permalink_structure, $request_uri, $pagenum, $expected ) { + $this->set_permalink_structure( $permalink_structure ); + $_SERVER['REQUEST_URI'] = $request_uri; + $paged = get_pagenum_link( $pagenum ); + + $this->assertSame( home_url( $expected ), $paged ); + } + + /** + * Data provider. + * + * @return array[] + */ + public function data_get_pagenum_link_plain_permalinks() { + return array( + 'page 1 and plain permalinks' => array( + 'permalink_structure' => '', + 'request_uri' => '/?paged=2', + 'pagenum' => 1, + 'expected' => '/', + ), + 'page 2 and plain permalinks' => array( + 'permalink_structure' => '', + 'request_uri' => '/', + 'pagenum' => 2, + 'expected' => '/?paged=2', + ), + ); + } + + /** + * Tests that a trailing slash is added to the link when a trailing slash + * exists in the permalink structure. + * + * @ticket 2877 + * + * @dataProvider data_get_pagenum_link + * + * @param string $permalink_structure The structure to use for permalinks. + * @param string $request_uri The value for `$_SERVER['REQUEST_URI']`. + * @param int $pagenum The page number to get the link for. + * @param string $expected The expected relative URL. + */ + public function test_get_pagenum_link_should_add_trailing_slash( $permalink_structure, $request_uri, $pagenum, $expected ) { + // Ensure the permalink structure has a trailing slash. + $permalink_structure = trailingslashit( $permalink_structure ); + + // Ensure the expected value has a trailing slash at the appropriate position. + if ( str_contains( $expected, '?' ) ) { + // Contains query args. + $parts = explode( '?', $expected, 2 ); + $expected = trailingslashit( $parts[0] ) . '?' . $parts[1]; + } else { + $expected = trailingslashit( $expected ); + } + + $this->set_permalink_structure( $permalink_structure ); + $_SERVER['REQUEST_URI'] = $request_uri; + $paged = get_pagenum_link( $pagenum ); + + $this->assertSame( home_url( $expected ), $paged ); + } + + /** + * Data provider. + * + * @return array[] + */ + public function data_get_pagenum_link() { + return array( + 'page 1 and index.php' => array( + 'permalink_structure' => '/index.php/%year%/%monthnum%/%day%/%postname%', + 'request_uri' => '/index.php/woohoo/page/2/', + 'pagenum' => 1, + 'expected' => '/index.php/woohoo', + ), + 'page 2 and index.php' => array( + 'permalink_structure' => '/index.php/%year%/%monthnum%/%day%/%postname%', + 'request_uri' => '/index.php/woohoo/page/2/', + 'pagenum' => 2, + 'expected' => '/index.php/woohoo/page/2', + ), + 'page 1 with date-based permalinks' => array( + 'permalink_structure' => '/%year%/%monthnum%/%day%/%postname%', + 'request_uri' => '/woohoo/page/2/', + 'pagenum' => 1, + 'expected' => '/woohoo', + ), + 'page 2 with date-based permalinks' => array( + 'permalink_structure' => '/%year%/%monthnum%/%day%/%postname%', + 'request_uri' => '/woohoo', + 'pagenum' => 2, + 'expected' => '/woohoo/page/2', + ), + 'page 1 with postname-based permalinks' => array( + 'permalink_structure' => '/%postname%', + 'request_uri' => '/woohoo/page/2', + 'pagenum' => 1, + 'expected' => '/woohoo', + ), + 'page 2 with postname-based permalinks' => array( + 'permalink_structure' => '/%postname%', + 'request_uri' => '/woohoo', + 'pagenum' => 2, + 'expected' => '/woohoo/page/2', + ), + 'page 1 with postname-based permalinks and query args' => array( + 'permalink_structure' => '/%postname%', + 'request_uri' => '/woohoo/page/2?test=1234', + 'pagenum' => 1, + 'expected' => '/woohoo?test=1234', + ), + 'page 2 with postname-based permalinks and query args' => array( + 'permalink_structure' => '/%postname%', + 'request_uri' => '/woohoo?test=1234', + 'pagenum' => 2, + 'expected' => '/woohoo/page/2?test=1234', + ), + ); + } +} From 9225964063a0609de92268fea28d0aed66d86542 Mon Sep 17 00:00:00 2001 From: Peter Wilson Date: Mon, 16 Oct 2023 04:41:13 +0000 Subject: [PATCH 06/71] Twenty Thirteen, Twenty Sixteen: Use default display for summary element. Within the details block, style the `summary` element using the default display, `list-item`, this ensures the toggle icon appears indicating the summary can be expanded or contracted. Props ankit-k-gupta, nicolefurlan, poena, sabernhardt. Fixes #58915. git-svn-id: https://develop.svn.wordpress.org/trunk@56940 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-content/themes/twentysixteen/css/blocks.css | 6 ++++++ src/wp-content/themes/twentythirteen/css/blocks.css | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/src/wp-content/themes/twentysixteen/css/blocks.css b/src/wp-content/themes/twentysixteen/css/blocks.css index 47a13e04d9d12..de6f19fd5359d 100644 --- a/src/wp-content/themes/twentysixteen/css/blocks.css +++ b/src/wp-content/themes/twentysixteen/css/blocks.css @@ -319,6 +319,12 @@ hr.wp-block-separator { margin-bottom: 0; } +/* Details */ + +.wp-block-details > summary:first-of-type { + display: list-item; +} + /*-------------------------------------------------------------- 5.0 Blocks - Widget Blocks --------------------------------------------------------------*/ diff --git a/src/wp-content/themes/twentythirteen/css/blocks.css b/src/wp-content/themes/twentythirteen/css/blocks.css index 092b335d00c23..5eb588a4a64b7 100644 --- a/src/wp-content/themes/twentythirteen/css/blocks.css +++ b/src/wp-content/themes/twentythirteen/css/blocks.css @@ -544,6 +544,12 @@ body:not(.sidebar) .wp-block-table.alignfull { margin-bottom: 0; } +/* Details */ + +.wp-block-details > summary:first-of-type { + display: list-item; +} + /*-------------------------------------------------------------- 6.0 Blocks - Widgets --------------------------------------------------------------*/ From 0f81f441dca0874b58bd2c3200a7102245a188a8 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 16 Oct 2023 14:00:01 +0000 Subject: [PATCH 07/71] HTML API: Avoid calling subclass method while internally scanning in Tag Processor. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit After modifying tags in the HTML API, the Tag Processor backs up to before the tag being modified and then re-parses its attributes. This saves on the code complexity involved in applying updates, which have already been transformed to “lexical updates” by the time they are applied. In order to do that, `::get_updated_html()` called `::next_tag()` to reuse its logic. However, as a public method, subclasses may change the behavior of that method, and the HTML Processor does just this. It maintains an HTML stack of open elements and when the Tag Processor calls this method to re-scan a tag and its attributes, it leads to a broken stack. This commit replaces the call to `::next_tag()` with a more appropriate reapplication of its internal parsing logic to rescan the tag name and its attributes. Given the limited nature of what's occurring in `::get_updated_html()`, this should bring with it certain guarantees that no HTML structure is being changed (that structure will only be changed by subclasses like the HTML Processor). Follow-up to [56274], [56702]. Props dmsnell, zieladam, nicolefurlan. Fixes #59607. git-svn-id: https://develop.svn.wordpress.org/trunk@56941 602fd350-edb4-49c9-b593-d223f7449a82 --- .../html-api/class-wp-html-tag-processor.php | 30 ++++++------ .../html-api/wpHtmlProcessorBreadcrumbs.php | 49 ++++++++++++++++++- 2 files changed, 64 insertions(+), 15 deletions(-) diff --git a/src/wp-includes/html-api/class-wp-html-tag-processor.php b/src/wp-includes/html-api/class-wp-html-tag-processor.php index 818dca6a0f875..445de9ee299bb 100644 --- a/src/wp-includes/html-api/class-wp-html-tag-processor.php +++ b/src/wp-includes/html-api/class-wp-html-tag-processor.php @@ -2270,6 +2270,7 @@ public function __toString() { * * @since 6.2.0 * @since 6.2.1 Shifts the internal cursor corresponding to the applied updates. + * @since 6.4.0 No longer calls subclass method `next_tag()` after updating HTML. * * @return string The processed HTML. */ @@ -2303,24 +2304,25 @@ public function get_updated_html() { * Rewind before the tag name starts so that it's as if the cursor didn't * move; a call to `next_tag()` will reparse the recently-updated attributes * and additional calls to modify the attributes will apply at this same - * location. + * location, but in order to avoid issues with subclasses that might add + * behaviors to `next_tag()`, the internal methods should be called here + * instead. + * + * It's important to note that in this specific place there will be no change + * because the processor was already at a tag when this was called and it's + * rewinding only to the beginning of this very tag before reprocessing it + * and its attributes. * *

Previous HTMLMore HTML

- * ^ | back up by the length of the tag name plus the opening < - * \<-/ back up by strlen("em") + 1 ==> 3 + * ↑ │ back up by the length of the tag name plus the opening < + * └←─┘ back up by strlen("em") + 1 ==> 3 */ - - // Store existing state so it can be restored after reparsing. - $previous_parsed_byte_count = $this->bytes_already_parsed; - $previous_query = $this->last_query; - - // Reparse attributes. $this->bytes_already_parsed = $before_current_tag; - $this->next_tag(); - - // Restore previous state. - $this->bytes_already_parsed = $previous_parsed_byte_count; - $this->parse_query( $previous_query ); + $this->parse_next_tag(); + // Reparse the attributes. + while ( $this->parse_next_attribute() ) { + continue; + } return $this->html; } diff --git a/tests/phpunit/tests/html-api/wpHtmlProcessorBreadcrumbs.php b/tests/phpunit/tests/html-api/wpHtmlProcessorBreadcrumbs.php index 932b3ca8f2a88..6f8f114025cd9 100644 --- a/tests/phpunit/tests/html-api/wpHtmlProcessorBreadcrumbs.php +++ b/tests/phpunit/tests/html-api/wpHtmlProcessorBreadcrumbs.php @@ -410,6 +410,53 @@ public function data_html_with_breadcrumbs_of_various_specificity() { ); } + /** + * Ensures that updating tag's attributes doesn't shift the current position + * in the input HTML document. + * + * @since 6.4.0 + * + * @ticket 59607 + * + * @covers WP_HTML_Tag_Processor::get_updated_html + */ + public function test_remains_stable_when_editing_attributes() { + $p = WP_HTML_Processor::create_fragment( '
'; + style="background: #000" + > + + + + + + + '; $body_content = preg_replace( '/]+>/', $button, $body_content ); diff --git a/src/wp-includes/blocks/image/view.asset.php b/src/wp-includes/blocks/image/view.asset.php index 39e7e80313e40..ed410f781f4bb 100644 --- a/src/wp-includes/blocks/image/view.asset.php +++ b/src/wp-includes/blocks/image/view.asset.php @@ -1 +1 @@ - array(), 'version' => 'aaa9542ea1e8b0279ca6'); + array(), 'version' => '8256ab8fdb922a14e3c2'); diff --git a/src/wp-includes/blocks/image/view.min.asset.php b/src/wp-includes/blocks/image/view.min.asset.php index 51c4afc42de17..150aa7d43c0ae 100644 --- a/src/wp-includes/blocks/image/view.min.asset.php +++ b/src/wp-includes/blocks/image/view.min.asset.php @@ -1 +1 @@ - array(), 'version' => '658cda6fbef6b9d36ffd'); + array(), 'version' => 'f889b00627bef81443e0'); From 933d27bbcbec82d6af5d9cf27a2539361e098e41 Mon Sep 17 00:00:00 2001 From: Tonya Mork Date: Tue, 17 Oct 2023 17:17:44 +0000 Subject: [PATCH 28/71] WordPress 6.4 RC1. git-svn-id: https://develop.svn.wordpress.org/trunk@56962 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/version.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/version.php b/src/wp-includes/version.php index ecbc04ea0e819..2526dbd645322 100644 --- a/src/wp-includes/version.php +++ b/src/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.4-beta4-56923-src'; +$wp_version = '6.4-rc1-src'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. From 47a522ffbed3dc21127211eea1e27245f2013077 Mon Sep 17 00:00:00 2001 From: Tonya Mork Date: Tue, 17 Oct 2023 17:25:23 +0000 Subject: [PATCH 29/71] WordPress 6.4 RC1 - capitalize RC in version. Capitalize RC in the version, i.e. just in case the build requires it. Unprops hellofromTonya. git-svn-id: https://develop.svn.wordpress.org/trunk@56963 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/version.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/version.php b/src/wp-includes/version.php index 2526dbd645322..45a8e4fe281a0 100644 --- a/src/wp-includes/version.php +++ b/src/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.4-rc1-src'; +$wp_version = '6.4-RC1-src'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. From eae1aa8ebfc7ce28e736af93769319948c082530 Mon Sep 17 00:00:00 2001 From: Tonya Mork Date: Tue, 17 Oct 2023 17:43:48 +0000 Subject: [PATCH 30/71] Post WordPress 6.4 RC1 version bump. git-svn-id: https://develop.svn.wordpress.org/trunk@56964 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/version.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/version.php b/src/wp-includes/version.php index 45a8e4fe281a0..452ba1c042e27 100644 --- a/src/wp-includes/version.php +++ b/src/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.4-RC1-src'; +$wp_version = '6.4-RC1-56475-src'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. From 4ec6ff34f61b629607f28e2f848fdfbd88cf3561 Mon Sep 17 00:00:00 2001 From: Tonya Mork Date: Tue, 17 Oct 2023 18:39:45 +0000 Subject: [PATCH 31/71] Trunk is now 6.5 alpha. git-svn-id: https://develop.svn.wordpress.org/trunk@56966 602fd350-edb4-49c9-b593-d223f7449a82 --- .github/workflows/test-old-branches.yml | 10 ++++++++-- SECURITY.md | 3 ++- package-lock.json | 2 +- package.json | 2 +- src/wp-includes/version.php | 2 +- 5 files changed, 13 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test-old-branches.yml b/.github/workflows/test-old-branches.yml index 7a5b9c9f52033..71c70f8cc79cc 100644 --- a/.github/workflows/test-old-branches.yml +++ b/.github/workflows/test-old-branches.yml @@ -17,7 +17,7 @@ on: permissions: {} env: - CURRENTLY_SUPPORTED_BRANCH: '6.3' + CURRENTLY_SUPPORTED_BRANCH: '6.4' jobs: dispatch-workflows-for-old-branches: @@ -37,12 +37,14 @@ jobs: 'test-npm.yml' ] branch: [ - '6.3', '6.2', '6.1','6.0', + '6.4', '6.3', '6.2', '6.1','6.0', '5.9', '5.8', '5.7', '5.6', '5.5', '5.4', '5.3', '5.2', '5.1', '5.0', '4.9', '4.8', '4.7', '4.6', '4.5', '4.4', '4.3', '4.2', '4.1' ] include: # PHP Compatibility testing was introduced in 5.5. + - branch: '6.4' + workflow: 'php-compatibility.yml' - branch: '6.3' workflow: 'php-compatibility.yml' - branch: '6.2' @@ -65,6 +67,8 @@ jobs: # End-to-end testing was introduced in 5.3 but was later removed as there were no meaningful assertions. # Starting in 5.8 with #52905, some additional tests with real assertions were introduced. # Branches 5.8 and newer should be tested to confirm no regressions are introduced. + - branch: '6.4' + workflow: 'end-to-end-tests.yml' - branch: '6.3' workflow: 'end-to-end-tests.yml' - branch: '6.2' @@ -79,6 +83,8 @@ jobs: workflow: 'end-to-end-tests.yml' # Performance testing was introduced in 6.2. + - branch: '6.4' + workflow: 'performance.yml' - branch: '6.3' workflow: 'performance.yml' - branch: '6.2' diff --git a/SECURITY.md b/SECURITY.md index 7d9e4b9368cef..39be6abebf586 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -9,7 +9,8 @@ Full details of the WordPress Security Policy and the list of covered projects a ## Supported Versions | Version | Supported | -| ------- | --------- | +|---------| --------- | +| 6.4.x | Yes | | 6.3.x | Yes | | 6.2.x | Yes | | 6.1.x | Yes | diff --git a/package-lock.json b/package-lock.json index 9db335b81fdac..bcd0df4832637 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "WordPress", - "version": "6.4.0", + "version": "6.5.0", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/package.json b/package.json index c0d8c8d24623f..b3046416f4307 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "WordPress", - "version": "6.4.0", + "version": "6.5.0", "description": "WordPress is open source software you can use to create a beautiful website, blog, or app.", "repository": { "type": "svn", diff --git a/src/wp-includes/version.php b/src/wp-includes/version.php index 452ba1c042e27..7127a4b2f1acb 100644 --- a/src/wp-includes/version.php +++ b/src/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.4-RC1-56475-src'; +$wp_version = '6.5-alpha-56475-src'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. From 23f72332788aaa654152e334384a7ad262411412 Mon Sep 17 00:00:00 2001 From: Tonya Mork Date: Tue, 17 Oct 2023 18:48:03 +0000 Subject: [PATCH 32/71] Fix version number for 6.5-alpha. Fixes the version number from [56966] to include its number in the version, as it is the commit that opened trunk for 6.5-alpha. Follow-up to [56966]. git-svn-id: https://develop.svn.wordpress.org/trunk@56967 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/version.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/version.php b/src/wp-includes/version.php index 7127a4b2f1acb..741a527c5e433 100644 --- a/src/wp-includes/version.php +++ b/src/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.5-alpha-56475-src'; +$wp_version = '6.5-alpha-56966-src'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. From 428c624e155dd4f5ee655891f1f8e89da9a6a65d Mon Sep 17 00:00:00 2001 From: Tonya Mork Date: Tue, 17 Oct 2023 20:34:31 +0000 Subject: [PATCH 33/71] Build/Test Tools: Fix WP version in package-lock.json. After [56966], CI jobs that check the `package-lock.json` failed on the "Ensure version-controlled files are not modified or deleted" task. There are 2 version fields that need to be updated for the new WP version. This changeset updates the "packages" > "version" for 6.5.0. Follow-up to [56966]. Props swissspidy, benharri. Unprops hellofromTonya. Fixes #59665. git-svn-id: https://develop.svn.wordpress.org/trunk@56968 602fd350-edb4-49c9-b593-d223f7449a82 --- package-lock.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package-lock.json b/package-lock.json index bcd0df4832637..a925ec5736053 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6,7 +6,7 @@ "packages": { "": { "name": "WordPress", - "version": "6.4.0", + "version": "6.5.0", "license": "GPL-2.0-or-later", "dependencies": { "@emotion/is-prop-valid": "0.8.8", From c9ff475e1fe63de1356bc6a3792e6fd836a8c587 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Wed, 18 Oct 2023 10:39:19 +0000 Subject: [PATCH 34/71] Tests: Remove some unnecessary `function_exists()` checks for compat functions. Each of these functions already has a separate test for availability. If any of them are unavailable, then the test should fail rather than be skipped. Follow-up to [52038], [52039], [52040]. Props johnbillion. See #59647. git-svn-id: https://develop.svn.wordpress.org/trunk@56969 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/compat/arrayKeyFirst.php | 9 +-------- tests/phpunit/tests/compat/arrayKeyLast.php | 6 +----- tests/phpunit/tests/compat/strContains.php | 9 +-------- tests/phpunit/tests/compat/strEndsWith.php | 9 +-------- tests/phpunit/tests/compat/strStartsWith.php | 9 +-------- 5 files changed, 5 insertions(+), 37 deletions(-) diff --git a/tests/phpunit/tests/compat/arrayKeyFirst.php b/tests/phpunit/tests/compat/arrayKeyFirst.php index b3b97ad464d73..28db82e363a6a 100644 --- a/tests/phpunit/tests/compat/arrayKeyFirst.php +++ b/tests/phpunit/tests/compat/arrayKeyFirst.php @@ -24,14 +24,7 @@ public function test_array_key_first_availability() { * @param array $arr The array to get first key from. */ public function test_array_key_first( $expected, $arr ) { - if ( ! function_exists( 'array_key_first' ) ) { - $this->markTestSkipped( 'array_key_first() is not available.' ); - } else { - $this->assertSame( - $expected, - array_key_first( $arr ) - ); - } + $this->assertSame( $expected, array_key_first( $arr ) ); } /** diff --git a/tests/phpunit/tests/compat/arrayKeyLast.php b/tests/phpunit/tests/compat/arrayKeyLast.php index 77510c83207b6..819e850f13769 100644 --- a/tests/phpunit/tests/compat/arrayKeyLast.php +++ b/tests/phpunit/tests/compat/arrayKeyLast.php @@ -25,11 +25,7 @@ public function test_array_key_last_availability() { * @param array $arr The array to get last key from. */ public function test_array_key_last( $expected, $arr ) { - if ( ! function_exists( 'array_key_last' ) ) { - $this->markTestSkipped( 'array_key_last() is not available.' ); - } else { - $this->assertSame( $expected, array_key_last( $arr ) ); - } + $this->assertSame( $expected, array_key_last( $arr ) ); } /** diff --git a/tests/phpunit/tests/compat/strContains.php b/tests/phpunit/tests/compat/strContains.php index ee5bb6e1d3426..381365b40800c 100644 --- a/tests/phpunit/tests/compat/strContains.php +++ b/tests/phpunit/tests/compat/strContains.php @@ -26,14 +26,7 @@ public function test_is_str_contains_availability() { * @param string $needle The substring to search for in `$haystack`. */ public function test_str_contains( $expected, $haystack, $needle ) { - if ( ! function_exists( 'str_contains' ) ) { - $this->markTestSkipped( 'str_contains() is not available.' ); - } else { - $this->assertSame( - $expected, - str_contains( $haystack, $needle ) - ); - } + $this->assertSame( $expected, str_contains( $haystack, $needle ) ); } /** diff --git a/tests/phpunit/tests/compat/strEndsWith.php b/tests/phpunit/tests/compat/strEndsWith.php index 7cf1e2b15d013..8467675613191 100644 --- a/tests/phpunit/tests/compat/strEndsWith.php +++ b/tests/phpunit/tests/compat/strEndsWith.php @@ -26,14 +26,7 @@ public function test_str_ends_with_availability() { * @param string $needle The substring to search for at the end of `$haystack`. */ public function test_str_ends_with( $expected, $haystack, $needle ) { - if ( ! function_exists( 'str_ends_with' ) ) { - $this->markTestSkipped( 'str_ends_with() is not available.' ); - } else { - $this->assertSame( - $expected, - str_ends_with( $haystack, $needle ) - ); - } + $this->assertSame( $expected, str_ends_with( $haystack, $needle ) ); } /** diff --git a/tests/phpunit/tests/compat/strStartsWith.php b/tests/phpunit/tests/compat/strStartsWith.php index 6bf72cd621932..a7ea8ff3d9ff9 100644 --- a/tests/phpunit/tests/compat/strStartsWith.php +++ b/tests/phpunit/tests/compat/strStartsWith.php @@ -26,14 +26,7 @@ public function test_str_starts_with_availability() { * @param string $needle The substring to search for at the start of `$haystack`. */ public function test_str_starts_with( $expected, $haystack, $needle ) { - if ( ! function_exists( 'str_starts_with' ) ) { - $this->markTestSkipped( 'str_starts_with() is not available.' ); - } else { - $this->assertSame( - $expected, - str_starts_with( $haystack, $needle ) - ); - } + $this->assertSame( $expected, str_starts_with( $haystack, $needle ) ); } /** From 6528d9840b6800edfb8e75c4924936bb14b3f31b Mon Sep 17 00:00:00 2001 From: Bernie Reiter Date: Wed, 18 Oct 2023 19:30:40 +0000 Subject: [PATCH 35/71] Blocks: During traversal, allow post callback to modify block. Both the `$pre_callback` and `$post_callback` functions that are given as arguments to `traverse_and_serialize_block(s)` receive a reference to the current block as their first argument. However, while any changes that the "pre" callback makes to the block are reflected by the serialized markup, the same wasn't true for the "post" callback: Any changes that it made were only applied ''after'' the block had already been serialized. This commit changes the behavior such that `$post_callback`'s changes to the current block are also reflected in the serialized markup. See #59646. Props gziolo. Fixes #59669. git-svn-id: https://develop.svn.wordpress.org/trunk@56970 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/blocks.php | 15 +++++++++------ tests/phpunit/tests/blocks/serialize.php | 17 +++++++++++++++++ 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/src/wp-includes/blocks.php b/src/wp-includes/blocks.php index ecb4fa5b3dfb4..01cc2070ac779 100644 --- a/src/wp-includes/blocks.php +++ b/src/wp-includes/blocks.php @@ -1062,18 +1062,20 @@ function traverse_and_serialize_block( $block, $pre_callback = null, $post_callb ); } - $block_content .= traverse_and_serialize_block( $inner_block, $pre_callback, $post_callback ); - if ( is_callable( $post_callback ) ) { $next = count( $block['innerBlocks'] ) - 1 === $block_index ? null : $block['innerBlocks'][ $block_index + 1 ]; - $block_content .= call_user_func_array( + $post_markup = call_user_func_array( $post_callback, array( &$inner_block, $block, $next ) ); } + + $block_content .= traverse_and_serialize_block( $inner_block, $pre_callback, $post_callback ); + $block_content .= isset( $post_markup ) ? $post_markup : ''; + ++$block_index; } } @@ -1135,18 +1137,19 @@ function traverse_and_serialize_blocks( $blocks, $pre_callback = null, $post_cal ); } - $result .= traverse_and_serialize_block( $block, $pre_callback, $post_callback ); - if ( is_callable( $post_callback ) ) { $next = count( $blocks ) - 1 === $index ? null : $blocks[ $index + 1 ]; - $result .= call_user_func_array( + $post_markup = call_user_func_array( $post_callback, array( &$block, null, $next ) // At the top level, there is no parent block to pass to the callback. ); } + + $result .= traverse_and_serialize_block( $block, $pre_callback, $post_callback ); + $result .= isset( $post_markup ) ? $post_markup : ''; } return $result; diff --git a/tests/phpunit/tests/blocks/serialize.php b/tests/phpunit/tests/blocks/serialize.php index 12da03e3cd11f..b4221ef3c5a15 100644 --- a/tests/phpunit/tests/blocks/serialize.php +++ b/tests/phpunit/tests/blocks/serialize.php @@ -74,6 +74,23 @@ public function test_traverse_and_serialize_blocks_pre_callback_modifies_current ); } + /** + * @ticket 59669 + * + * @covers ::traverse_and_serialize_blocks + */ + public function test_traverse_and_serialize_blocks_post_callback_modifies_current_block() { + $markup = "Example.\n\nExample.\n\n"; + $blocks = parse_blocks( $markup ); + + $actual = traverse_and_serialize_blocks( $blocks, null, array( __CLASS__, 'add_attribute_to_inner_block' ) ); + + $this->assertSame( + "Example.\n\nExample.\n\n", + $actual + ); + } + public static function add_attribute_to_inner_block( &$block ) { if ( 'core/inner' === $block['blockName'] ) { $block['attrs']['myattr'] = 'myvalue'; From 2a6b527f73260925729beb7860a4a2a01513f527 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 19 Oct 2023 13:51:04 +0000 Subject: [PATCH 36/71] Tests: Improve the `@group` annotation accuracy and consistency. Includes removing `.php` from some older group names, because most of the groups are no longer named based on the file containing the function, and sometimes functions move around, making the file-based group name inaccurate. Props afercia, aristath, poena, SergeyBiryukov. See #59647. git-svn-id: https://develop.svn.wordpress.org/trunk@56971 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/admin/includesTheme.php | 1 + tests/phpunit/tests/admin/wpAutomaticUpdater.php | 1 + tests/phpunit/tests/admin/wpSiteHealth.php | 1 + tests/phpunit/tests/admin/wpUserSearch.php | 3 +++ tests/phpunit/tests/admin/wpUsersListTable.php | 1 + tests/phpunit/tests/block-supports/duotone.php | 2 ++ tests/phpunit/tests/blocks/getBlockTemplates.php | 1 + tests/phpunit/tests/canonical/category.php | 2 ++ tests/phpunit/tests/canonical/stripFragmentFromUrl.php | 1 + tests/phpunit/tests/category/categoryDescription.php | 1 + tests/phpunit/tests/category/getAllCategoryIds.php | 2 +- tests/phpunit/tests/category/getCatId.php | 2 +- tests/phpunit/tests/category/getCatName.php | 2 +- tests/phpunit/tests/category/getCategories.php | 2 +- tests/phpunit/tests/category/getCategoryByPath.php | 2 +- tests/phpunit/tests/category/getCategoryBySlug.php | 2 +- tests/phpunit/tests/category/getCategoryLink.php | 1 + tests/phpunit/tests/category/getCategoryParents.php | 1 + tests/phpunit/tests/category/getTheCategoryById.php | 1 + tests/phpunit/tests/category/makeCatCompat.php | 2 +- tests/phpunit/tests/category/walkerCategory.php | 1 + tests/phpunit/tests/category/wpDropdownCategories.php | 2 +- tests/phpunit/tests/category/wpListCategories.php | 1 + tests/phpunit/tests/comment/commentForm.php | 2 +- tests/phpunit/tests/comment/commentsOpen.php | 3 ++- tests/phpunit/tests/comment/commentsTemplate.php | 4 ++-- tests/phpunit/tests/comment/pingsOpen.php | 2 +- tests/phpunit/tests/comment/wpUpdateCommentCountNow.php | 2 +- tests/phpunit/tests/customize/selective-refresh-ajax.php | 1 + tests/phpunit/tests/date/currentDatetime.php | 1 + tests/phpunit/tests/date/currentTime.php | 1 + tests/phpunit/tests/date/dateI18n.php | 1 + tests/phpunit/tests/date/getCommentDate.php | 1 + tests/phpunit/tests/date/getFeedBuildDate.php | 1 + tests/phpunit/tests/date/getPermalink.php | 1 + tests/phpunit/tests/date/getPostTime.php | 1 + tests/phpunit/tests/date/getTheDate.php | 1 + tests/phpunit/tests/date/getTheModifiedDate.php | 1 + tests/phpunit/tests/date/maybeDeclineDate.php | 6 ++++-- tests/phpunit/tests/date/mysql2date.php | 2 ++ tests/phpunit/tests/date/query.php | 4 +++- tests/phpunit/tests/date/theDate.php | 1 + tests/phpunit/tests/date/wpDate.php | 1 + tests/phpunit/tests/date/wpTimezone.php | 1 + tests/phpunit/tests/date/xmlrpc.php | 1 + tests/phpunit/tests/db/dbDelta.php | 3 ++- .../tests/editor/classic-to-block-menu-converter.php | 2 ++ tests/phpunit/tests/editor/navigation-fallback.php | 2 ++ tests/phpunit/tests/filesystem/copyDir.php | 3 ++- tests/phpunit/tests/filesystem/findFolder.php | 4 ++-- tests/phpunit/tests/filesystem/moveDir.php | 3 ++- .../{_unzipFilePclzip.php => unzipFilePclzip.php} | 3 ++- .../{_unzipFileZiparchive.php => unzipFileZiparchive.php} | 3 ++- .../tests/filesystem/wpOpcacheInvalidateDirectory.php | 3 ++- tests/phpunit/tests/functions.php | 2 +- tests/phpunit/tests/functions/addMagicQuotes.php | 3 ++- tests/phpunit/tests/functions/allowedProtocols.php | 3 ++- tests/phpunit/tests/functions/anonymization.php | 3 ++- tests/phpunit/tests/functions/canonicalCharset.php | 3 ++- tests/phpunit/tests/functions/cleanDirsizeCache.php | 8 +++----- tests/phpunit/tests/functions/cleanupHeaderComment.php | 3 ++- tests/phpunit/tests/functions/doEnclose.php | 3 ++- tests/phpunit/tests/functions/getNonCachedIds.php | 1 + tests/phpunit/tests/functions/getStatusHeaderDesc.php | 3 ++- tests/phpunit/tests/functions/getWeekstartend.php | 3 ++- tests/phpunit/tests/functions/isNewDay.php | 3 ++- tests/phpunit/tests/functions/isPhpVersionCompatible.php | 3 ++- tests/phpunit/tests/functions/isSerialized.php | 3 ++- tests/phpunit/tests/functions/isSerializedString.php | 3 ++- tests/phpunit/tests/functions/isWpVersionCompatible.php | 3 ++- tests/phpunit/tests/functions/listFiles.php | 3 ++- tests/phpunit/tests/functions/maybeSerialize.php | 3 ++- tests/phpunit/tests/functions/numberFormatI18n.php | 3 ++- tests/phpunit/tests/functions/pluginBasename.php | 3 ++- tests/phpunit/tests/functions/referer.php | 3 ++- tests/phpunit/tests/functions/removeQueryArg.php | 3 ++- tests/phpunit/tests/functions/sizeFormat.php | 3 ++- tests/phpunit/tests/functions/underscoreReturn.php | 2 +- tests/phpunit/tests/functions/wp.php | 3 ++- tests/phpunit/tests/functions/wpAdminNotice.php | 2 +- tests/phpunit/tests/functions/wpArrayGet.php | 3 ++- tests/phpunit/tests/functions/wpArraySet.php | 3 ++- tests/phpunit/tests/functions/wpArraySliceAssoc.php | 3 ++- tests/phpunit/tests/functions/wpAuthCheck.php | 3 ++- .../phpunit/tests/functions/wpCheckAlternateFileNames.php | 3 ++- tests/phpunit/tests/functions/wpCheckFiletype.php | 2 +- tests/phpunit/tests/functions/wpFilesize.php | 3 ++- tests/phpunit/tests/functions/wpFilterObjectList.php | 2 +- tests/phpunit/tests/functions/wpFuzzyNumberMatch.php | 3 ++- tests/phpunit/tests/functions/wpGetAdminNotice.php | 2 +- tests/phpunit/tests/functions/wpGetArchives.php | 3 ++- tests/phpunit/tests/functions/wpGetMimeTypes.php | 3 ++- tests/phpunit/tests/functions/wpGuessUrl.php | 3 ++- tests/phpunit/tests/functions/wpIsNumericArray.php | 3 ++- tests/phpunit/tests/functions/wpListFilter.php | 3 ++- tests/phpunit/tests/functions/wpListPluck.php | 3 ++- tests/phpunit/tests/functions/wpListSort.php | 3 ++- tests/phpunit/tests/functions/wpListUtil.php | 2 +- tests/phpunit/tests/functions/wpNonceAys.php | 3 ++- tests/phpunit/tests/functions/wpNonceField.php | 3 ++- tests/phpunit/tests/functions/wpNonceUrl.php | 2 +- tests/phpunit/tests/functions/wpRefererField.php | 3 ++- tests/phpunit/tests/functions/wpRemoteFopen.php | 3 ++- tests/phpunit/tests/functions/wpToKebabCase.php | 3 ++- tests/phpunit/tests/functions/wpTriggerError.php | 3 ++- tests/phpunit/tests/functions/wpValidateBoolean.php | 3 ++- tests/phpunit/tests/functions/xmlrpc.php | 2 ++ tests/phpunit/tests/load/isLogin.php | 3 ++- tests/phpunit/tests/load/wpConvertHrToBytes.php | 2 +- tests/phpunit/tests/load/wpDebugMode.php | 3 ++- tests/phpunit/tests/load/wpGetDevelopmentMode.php | 3 ++- tests/phpunit/tests/load/wpIsIniValueChangeable.php | 2 +- tests/phpunit/tests/term.php | 4 +--- tests/phpunit/tests/vars.php | 2 +- 114 files changed, 183 insertions(+), 89 deletions(-) rename tests/phpunit/tests/filesystem/{_unzipFilePclzip.php => unzipFilePclzip.php} (98%) rename tests/phpunit/tests/filesystem/{_unzipFileZiparchive.php => unzipFileZiparchive.php} (98%) diff --git a/tests/phpunit/tests/admin/includesTheme.php b/tests/phpunit/tests/admin/includesTheme.php index 9f2fdbc085386..ed90cf9514ae5 100644 --- a/tests/phpunit/tests/admin/includesTheme.php +++ b/tests/phpunit/tests/admin/includesTheme.php @@ -1,5 +1,6 @@ Date: Thu, 19 Oct 2023 13:59:01 +0000 Subject: [PATCH 37/71] =?UTF-8?q?Build/Test=20Tools:=20Don=E2=80=99t=20run?= =?UTF-8?q?=20the=20performance=20workflow=20when=20branching.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When a branch is created, there is no previous commit to reference in the `github.event.before` context, which causes the performance workflow to fail because there is no previous commit to perform a comparison with. This adds a condition to check that `github.event.before` is not set to `0000000000000000000000000000000000000000`, which is the default value when there are no previous commits. Props swissspidy. See #588867. git-svn-id: https://develop.svn.wordpress.org/trunk@56972 602fd350-edb4-49c9-b593-d223f7449a82 --- .github/workflows/performance.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/performance.yml b/.github/workflows/performance.yml index 43b92e2cd7a8e..6c2b5e1104f39 100644 --- a/.github/workflows/performance.yml +++ b/.github/workflows/performance.yml @@ -92,7 +92,7 @@ jobs: runs-on: ubuntu-latest permissions: contents: read - if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} + if: ${{ ( github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' ) && ! contains( '00000000', github.event.before ) }} steps: - name: Configure environment variables From 545748c9d26cad8d1565d1acf90cbd75e9d4df84 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Thu, 19 Oct 2023 15:03:51 +0000 Subject: [PATCH 38/71] Build/Test Tools: Skip Puppeteer download in build workflow. This adds the `PUPPETEER_SKIP_DOWNLOAD` environment variable to the Build WordPress workflow to skip downloading Puppeteer browser binaries unnecessarily. Follow up to [56958]. See #59416, #59517, #58863. git-svn-id: https://develop.svn.wordpress.org/trunk@56973 602fd350-edb4-49c9-b593-d223f7449a82 --- .github/workflows/build.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d211f1247874e..610a29ec0973f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,9 +15,12 @@ concurrency: # Any needed permissions should be configured at the job level. permissions: {} -# Exposes WordPress builds as a GitHub artifact to enable +env: + PUPPETEER_SKIP_DOWNLOAD: ${{ true }} + +# Exposes WordPress builds as a GitHub artifact to enable # previewing Pull Requests inside WordPress Playground. -# +# # @see https://github.com/WordPress/wordpress-playground/pull/700 # @see https://github.com/WordPress/wordpress-develop/pull/5481 jobs: From 69a56e30f96333dd6de25c141428c7e7ced480d4 Mon Sep 17 00:00:00 2001 From: Felix Arntz Date: Thu, 19 Oct 2023 19:07:13 +0000 Subject: [PATCH 39/71] Multisite: Ensure that switching sites resets the current theme directory globals. The globals introduced in [56635] to cache the current theme directories in memory were not considering switching sites in a multisite network. This changeset addresses the bug including test coverage. Props codex-m, jeremyfelt. Fixes #59677. See #18298. git-svn-id: https://develop.svn.wordpress.org/trunk@56974 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/ms-blogs.php | 16 ++++-- tests/phpunit/tests/theme.php | 96 +++++++++++++++++++++++++++++++++++ 2 files changed, 108 insertions(+), 4 deletions(-) diff --git a/src/wp-includes/ms-blogs.php b/src/wp-includes/ms-blogs.php index eddb99c605cff..7e91e11b8532f 100644 --- a/src/wp-includes/ms-blogs.php +++ b/src/wp-includes/ms-blogs.php @@ -491,6 +491,8 @@ function update_blog_option( $id, $option, $value, $deprecated = null ) { * @global array $_wp_switched_stack * @global bool $switched * @global string $table_prefix + * @global string $wp_template_path + * @global string $wp_stylesheet_path * @global WP_Object_Cache $wp_object_cache * * @param int $new_blog_id The ID of the blog to switch to. Default: current blog. @@ -532,8 +534,10 @@ function switch_to_blog( $new_blog_id, $deprecated = null ) { } $wpdb->set_blog_id( $new_blog_id ); - $GLOBALS['table_prefix'] = $wpdb->get_blog_prefix(); - $GLOBALS['blog_id'] = $new_blog_id; + $GLOBALS['table_prefix'] = $wpdb->get_blog_prefix(); + $GLOBALS['blog_id'] = $new_blog_id; + $GLOBALS['wp_template_path'] = null; + $GLOBALS['wp_stylesheet_path'] = null; if ( function_exists( 'wp_cache_switch_to_blog' ) ) { wp_cache_switch_to_blog( $new_blog_id ); @@ -600,6 +604,8 @@ function switch_to_blog( $new_blog_id, $deprecated = null ) { * @global int $blog_id * @global bool $switched * @global string $table_prefix + * @global string $wp_template_path + * @global string $wp_stylesheet_path * @global WP_Object_Cache $wp_object_cache * * @return bool True on success, false if we're already on the current blog. @@ -625,8 +631,10 @@ function restore_current_blog() { } $wpdb->set_blog_id( $new_blog_id ); - $GLOBALS['blog_id'] = $new_blog_id; - $GLOBALS['table_prefix'] = $wpdb->get_blog_prefix(); + $GLOBALS['blog_id'] = $new_blog_id; + $GLOBALS['table_prefix'] = $wpdb->get_blog_prefix(); + $GLOBALS['wp_template_path'] = null; + $GLOBALS['wp_stylesheet_path'] = null; if ( function_exists( 'wp_cache_switch_to_blog' ) ) { wp_cache_switch_to_blog( $new_blog_id ); diff --git a/tests/phpunit/tests/theme.php b/tests/phpunit/tests/theme.php index 721fa81f22dd1..77cad7156bec4 100644 --- a/tests/phpunit/tests/theme.php +++ b/tests/phpunit/tests/theme.php @@ -1058,6 +1058,102 @@ static function () { ); } + /** + * Tests whether a switched site retrieves the correct stylesheet directory. + * + * @ticket 59677 + * @group ms-required + * + * @covers ::get_stylesheet_directory + */ + public function test_get_stylesheet_directory_with_switched_site() { + $blog_id = self::factory()->blog->create(); + + update_blog_option( $blog_id, 'stylesheet', 'switched_stylesheet' ); + + // Prime global storage with the current site's data. + get_stylesheet_directory(); + + switch_to_blog( $blog_id ); + $switched_stylesheet = get_stylesheet_directory(); + restore_current_blog(); + + $this->assertSame( WP_CONTENT_DIR . '/themes/switched_stylesheet', $switched_stylesheet ); + } + + /** + * Tests whether a switched site retrieves the correct template directory. + * + * @ticket 59677 + * @group ms-required + * + * @covers ::get_template_directory + */ + public function test_get_template_directory_with_switched_site() { + $blog_id = self::factory()->blog->create(); + + update_blog_option( $blog_id, 'template', 'switched_template' ); + + // Prime global storage with the current site's data. + get_template_directory(); + + switch_to_blog( $blog_id ); + $switched_template = get_template_directory(); + restore_current_blog(); + + $this->assertSame( WP_CONTENT_DIR . '/themes/switched_template', $switched_template ); + } + + /** + * Tests whether a restored site retrieves the correct stylesheet directory. + * + * @ticket 59677 + * @group ms-required + * + * @covers ::get_stylesheet_directory + */ + public function test_get_stylesheet_directory_with_restored_site() { + $blog_id = self::factory()->blog->create(); + + update_option( 'stylesheet', 'original_stylesheet' ); + update_blog_option( $blog_id, 'stylesheet', 'switched_stylesheet' ); + + $stylesheet = get_stylesheet_directory(); + + switch_to_blog( $blog_id ); + + // Prime global storage with the restored site's data. + get_stylesheet_directory(); + restore_current_blog(); + + $this->assertSame( WP_CONTENT_DIR . '/themes/original_stylesheet', $stylesheet ); + } + + /** + * Tests whether a restored site retrieves the correct template directory. + * + * @ticket 59677 + * @group ms-required + * + * @covers ::get_template_directory + */ + public function test_get_template_directory_with_restored_site() { + $blog_id = self::factory()->blog->create(); + + update_option( 'template', 'original_template' ); + update_blog_option( $blog_id, 'template', 'switched_template' ); + + $template = get_template_directory(); + + switch_to_blog( $blog_id ); + + // Prime global storage with the switched site's data. + get_template_directory(); + restore_current_blog(); + + $this->assertSame( WP_CONTENT_DIR . '/themes/original_template', $template ); + } + /** * Helper function to ensure that a block theme is available and active. */ From df57c555c29110d736f32e9e01fdb57ad3c79a7d Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 20 Oct 2023 13:27:56 +0000 Subject: [PATCH 40/71] External Libraries: Update getID3 to version 1.9.23. The latest version includes numerous bug fixes, a few new features, as well as various improvements for PHP 8.1 and PHP 8.2 support. This commit also includes PHPCS adjustments previously made for a passing PHP Compatibility scan. References: * [https://github.com/JamesHeinrich/getID3/releases/tag/v1.9.23 getID3 1.9.23 release notes] * [https://github.com/JamesHeinrich/getID3/compare/v1.9.22...v1.9.23 Full list of changes in getID3 1.9.23] Follow-up to [47601], [48278], [52254], [54376]. Props jrf. Fixes #59683. git-svn-id: https://develop.svn.wordpress.org/trunk@56975 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/ID3/getid3.lib.php | 24 ++-- src/wp-includes/ID3/getid3.php | 32 ++++- src/wp-includes/ID3/license.commercial.txt | 27 ---- src/wp-includes/ID3/license.txt | 3 +- .../ID3/module.audio-video.asf.php | 6 +- .../ID3/module.audio-video.matroska.php | 12 +- .../ID3/module.audio-video.quicktime.php | 115 ++++++++++++++++-- .../ID3/module.audio-video.riff.php | 24 ++-- src/wp-includes/ID3/module.audio.mp3.php | 26 ++-- src/wp-includes/ID3/module.audio.ogg.php | 12 +- src/wp-includes/ID3/module.tag.apetag.php | 4 +- src/wp-includes/ID3/module.tag.id3v1.php | 2 +- src/wp-includes/ID3/module.tag.id3v2.php | 25 ++-- src/wp-includes/ID3/readme.txt | 3 +- 14 files changed, 195 insertions(+), 120 deletions(-) delete mode 100644 src/wp-includes/ID3/license.commercial.txt diff --git a/src/wp-includes/ID3/getid3.lib.php b/src/wp-includes/ID3/getid3.lib.php index 5242ce643f625..aec550b30d3cf 100644 --- a/src/wp-includes/ID3/getid3.lib.php +++ b/src/wp-includes/ID3/getid3.lib.php @@ -121,12 +121,24 @@ public static function intValueSupported($num) { } } // if integers are 64-bit - no other check required - if ($hasINT64 || (($num <= PHP_INT_MAX) && ($num >= PHP_INT_MIN))) { // phpcs:ignore PHPCompatibility.Constants.NewConstants.php_int_minFound + if ($hasINT64 || (($num <= PHP_INT_MAX) && ($num >= PHP_INT_MIN))) { return true; } return false; } + /** + * Perform a division, guarding against division by zero + * + * @param float|int $numerator + * @param float|int $denominator + * @param float|int $fallback + * @return float|int + */ + public static function SafeDiv($numerator, $denominator, $fallback = 0) { + return $denominator ? $numerator / $denominator : $fallback; + } + /** * @param string $fraction * @@ -134,7 +146,7 @@ public static function intValueSupported($num) { */ public static function DecimalizeFraction($fraction) { list($numerator, $denominator) = explode('/', $fraction); - return $numerator / ($denominator ? $denominator : 1); + return (int) $numerator / ($denominator ? $denominator : 1); } /** @@ -871,10 +883,6 @@ public static function iconv_fallback_int_utf8($charval) { * @return string */ public static function iconv_fallback_iso88591_utf8($string, $bom=false) { - if (function_exists('utf8_encode')) { - return utf8_encode($string); - } - // utf8_encode() unavailable, use getID3()'s iconv_fallback() conversions (possibly PHP is compiled without XML support) $newcharstring = ''; if ($bom) { $newcharstring .= "\xEF\xBB\xBF"; @@ -943,10 +951,6 @@ public static function iconv_fallback_iso88591_utf16($string) { * @return string */ public static function iconv_fallback_utf8_iso88591($string) { - if (function_exists('utf8_decode')) { - return utf8_decode($string); - } - // utf8_decode() unavailable, use getID3()'s iconv_fallback() conversions (possibly PHP is compiled without XML support) $newcharstring = ''; $offset = 0; $stringlength = strlen($string); diff --git a/src/wp-includes/ID3/getid3.php b/src/wp-includes/ID3/getid3.php index 760e76c811712..6f428554a60f3 100644 --- a/src/wp-includes/ID3/getid3.php +++ b/src/wp-includes/ID3/getid3.php @@ -387,7 +387,7 @@ class getID3 */ protected $startup_warning = ''; - const VERSION = '1.9.22-202207161647'; + const VERSION = '1.9.23-202310190849'; const FREAD_BUFFER_SIZE = 32768; const ATTACHMENTS_NONE = false; @@ -438,19 +438,19 @@ public function __construct() { $this->startup_error .= 'WARNING: php.ini contains "mbstring.func_overload = '.ini_get('mbstring.func_overload').'", getID3 cannot run with this setting (bitmask 2 (string functions) cannot be set). Recommended to disable entirely.'."\n"; } - // check for magic quotes in PHP < 7.4.0 (when these functions became deprecated) - if (version_compare(PHP_VERSION, '7.4.0', '<')) { + // check for magic quotes in PHP < 5.4.0 (when these options were removed and getters always return false) + if (version_compare(PHP_VERSION, '5.4.0', '<')) { // Check for magic_quotes_runtime if (function_exists('get_magic_quotes_runtime')) { // phpcs:ignore PHPCompatibility.FunctionUse.RemovedFunctions.get_magic_quotes_runtimeDeprecated - if (get_magic_quotes_runtime()) { + if (get_magic_quotes_runtime()) { // @phpstan-ignore-line $this->startup_error .= 'magic_quotes_runtime must be disabled before running getID3(). Surround getid3 block by set_magic_quotes_runtime(0) and set_magic_quotes_runtime(1).'."\n"; } } // Check for magic_quotes_gpc if (function_exists('get_magic_quotes_gpc')) { // phpcs:ignore PHPCompatibility.FunctionUse.RemovedFunctions.get_magic_quotes_gpcDeprecated - if (get_magic_quotes_gpc()) { + if (get_magic_quotes_gpc()) { // @phpstan-ignore-line $this->startup_error .= 'magic_quotes_gpc must be disabled before running getID3(). Surround getid3 block by set_magic_quotes_gpc(0) and set_magic_quotes_gpc(1).'."\n"; } } @@ -1468,6 +1468,16 @@ public function GetFileFormatArray() { 'fail_ape' => 'ERROR', ), + // XZ - data - XZ compressed data + '7zip' => array( + 'pattern' => '^7z\\xBC\\xAF\\x27\\x1C', + 'group' => 'archive', + 'module' => '7zip', + 'mime_type' => 'application/x-7z-compressed', + 'fail_id3' => 'ERROR', + 'fail_ape' => 'ERROR', + ), + // Misc other formats @@ -1982,7 +1992,7 @@ public function CalculateCompressionRatioVideo() { } $BitrateUncompressed = $this->info['video']['resolution_x'] * $this->info['video']['resolution_y'] * $this->info['video']['bits_per_sample'] * $FrameRate; - $this->info['video']['compression_ratio'] = $BitrateCompressed / $BitrateUncompressed; + $this->info['video']['compression_ratio'] = getid3_lib::SafeDiv($BitrateCompressed, $BitrateUncompressed, 1); return true; } @@ -2188,6 +2198,8 @@ public function setStringMode($string) { } /** + * @phpstan-impure + * * @return int|bool */ protected function ftell() { @@ -2200,6 +2212,8 @@ protected function ftell() { /** * @param int $bytes * + * @phpstan-impure + * * @return string|false * * @throws getid3_exception @@ -2245,6 +2259,8 @@ protected function fread($bytes) { * @param int $bytes * @param int $whence * + * @phpstan-impure + * * @return int * * @throws getid3_exception @@ -2286,6 +2302,8 @@ protected function fseek($bytes, $whence=SEEK_SET) { } /** + * @phpstan-impure + * * @return string|false * * @throws getid3_exception @@ -2341,6 +2359,8 @@ protected function fgets() { } /** + * @phpstan-impure + * * @return bool */ protected function feof() { diff --git a/src/wp-includes/ID3/license.commercial.txt b/src/wp-includes/ID3/license.commercial.txt deleted file mode 100644 index 416e5a14694b1..0000000000000 --- a/src/wp-includes/ID3/license.commercial.txt +++ /dev/null @@ -1,27 +0,0 @@ - getID3() Commercial License - =========================== - -getID3() is licensed under the "GNU Public License" (GPL) and/or the -"getID3() Commercial License" (gCL). This document describes the gCL. - ---------------------------------------------------------------------- - -The license is non-exclusively granted to a single person or company, -per payment of the license fee, for the lifetime of that person or -company. The license is non-transferrable. - -The gCL grants the licensee the right to use getID3() in commercial -closed-source projects. Modifications may be made to getID3() with no -obligation to release the modified source code. getID3() (or pieces -thereof) may be included in any number of projects authored (in whole -or in part) by the licensee. - -The licensee may use any version of getID3(), past, present or future, -as is most convenient. This license does not entitle the licensee to -receive any technical support, updates or bugfixes, except as such are -made publicly available to all getID3() users. - -The licensee may not sub-license getID3() itself, meaning that any -commercially released product containing all or parts of getID3() must -have added functionality beyond what is available in getID3(); -getID3() itself may not be re-licensed by the licensee. diff --git a/src/wp-includes/ID3/license.txt b/src/wp-includes/ID3/license.txt index c67873ae69fe8..8978b4a2129a0 100644 --- a/src/wp-includes/ID3/license.txt +++ b/src/wp-includes/ID3/license.txt @@ -20,7 +20,8 @@ GNU LGPL: https://gnu.org/licenses/lgpl.html (v3) Mozilla MPL: https://www.mozilla.org/MPL/2.0/ (v2) -getID3 Commercial License: https://www.getid3.org/#gCL (payment required) +getID3 Commercial License: https://www.getid3.org/#gCL +(no longer available, existing licenses remain valid) ***************************************************************** ***************************************************************** diff --git a/src/wp-includes/ID3/module.audio-video.asf.php b/src/wp-includes/ID3/module.audio-video.asf.php index e83de75462e66..4d3d377ddb80d 100644 --- a/src/wp-includes/ID3/module.audio-video.asf.php +++ b/src/wp-includes/ID3/module.audio-video.asf.php @@ -193,7 +193,7 @@ public function Analyze() { $info['playtime_seconds'] = ($thisfile_asf_filepropertiesobject['play_duration'] / 10000000) - ($thisfile_asf_filepropertiesobject['preroll'] / 1000); //$info['bitrate'] = $thisfile_asf_filepropertiesobject['max_bitrate']; - $info['bitrate'] = ((isset($thisfile_asf_filepropertiesobject['filesize']) ? $thisfile_asf_filepropertiesobject['filesize'] : $info['filesize']) * 8) / $info['playtime_seconds']; + $info['bitrate'] = getid3_lib::SafeDiv($thisfile_asf_filepropertiesobject['filesize'] * 8, $info['playtime_seconds']); } break; @@ -1066,7 +1066,7 @@ public function Analyze() { break; } - if (!empty($thisfile_asf['stream_bitrate_properties_object']['bitrate_records'])) { + if (!empty($thisfile_asf['stream_bitrate_properties_object']['bitrate_records'])) { // @phpstan-ignore-line foreach ($thisfile_asf['stream_bitrate_properties_object']['bitrate_records'] as $dummy => $dataarray) { if (isset($dataarray['flags']['stream_number']) && ($dataarray['flags']['stream_number'] == $streamnumber)) { $thisfile_asf_audiomedia_currentstream['bitrate'] = $dataarray['bitrate']; @@ -1152,7 +1152,7 @@ public function Analyze() { $videomediaoffset += 4; $thisfile_asf_videomedia_currentstream['format_data']['codec_data'] = substr($streamdata['type_specific_data'], $videomediaoffset); - if (!empty($thisfile_asf['stream_bitrate_properties_object']['bitrate_records'])) { + if (!empty($thisfile_asf['stream_bitrate_properties_object']['bitrate_records'])) { // @phpstan-ignore-line foreach ($thisfile_asf['stream_bitrate_properties_object']['bitrate_records'] as $dummy => $dataarray) { if (isset($dataarray['flags']['stream_number']) && ($dataarray['flags']['stream_number'] == $streamnumber)) { $thisfile_asf_videomedia_currentstream['bitrate'] = $dataarray['bitrate']; diff --git a/src/wp-includes/ID3/module.audio-video.matroska.php b/src/wp-includes/ID3/module.audio-video.matroska.php index 128e614e2c5cc..eb5febf4336cc 100644 --- a/src/wp-includes/ID3/module.audio-video.matroska.php +++ b/src/wp-includes/ID3/module.audio-video.matroska.php @@ -292,12 +292,12 @@ public function Analyze() $track_info['display_x'] = (isset($trackarray['DisplayWidth']) ? $trackarray['DisplayWidth'] : $trackarray['PixelWidth']); $track_info['display_y'] = (isset($trackarray['DisplayHeight']) ? $trackarray['DisplayHeight'] : $trackarray['PixelHeight']); - if (isset($trackarray['PixelCropBottom'])) { $track_info['crop_bottom'] = $trackarray['PixelCropBottom']; } - if (isset($trackarray['PixelCropTop'])) { $track_info['crop_top'] = $trackarray['PixelCropTop']; } - if (isset($trackarray['PixelCropLeft'])) { $track_info['crop_left'] = $trackarray['PixelCropLeft']; } - if (isset($trackarray['PixelCropRight'])) { $track_info['crop_right'] = $trackarray['PixelCropRight']; } - if (isset($trackarray['DefaultDuration'])) { $track_info['frame_rate'] = round(1000000000 / $trackarray['DefaultDuration'], 3); } - if (isset($trackarray['CodecName'])) { $track_info['codec'] = $trackarray['CodecName']; } + if (isset($trackarray['PixelCropBottom'])) { $track_info['crop_bottom'] = $trackarray['PixelCropBottom']; } + if (isset($trackarray['PixelCropTop'])) { $track_info['crop_top'] = $trackarray['PixelCropTop']; } + if (isset($trackarray['PixelCropLeft'])) { $track_info['crop_left'] = $trackarray['PixelCropLeft']; } + if (isset($trackarray['PixelCropRight'])) { $track_info['crop_right'] = $trackarray['PixelCropRight']; } + if (!empty($trackarray['DefaultDuration'])) { $track_info['frame_rate'] = round(1000000000 / $trackarray['DefaultDuration'], 3); } + if (isset($trackarray['CodecName'])) { $track_info['codec'] = $trackarray['CodecName']; } switch ($trackarray['CodecID']) { case 'V_MS/VFW/FOURCC': diff --git a/src/wp-includes/ID3/module.audio-video.quicktime.php b/src/wp-includes/ID3/module.audio-video.quicktime.php index 577d3adabfc13..d6e0eda7dd6ed 100644 --- a/src/wp-includes/ID3/module.audio-video.quicktime.php +++ b/src/wp-includes/ID3/module.audio-video.quicktime.php @@ -152,7 +152,7 @@ public function Analyze() { } elseif (strlen($lat_deg) == 4) { // [+-]DDMM.M $ISO6709parsed['latitude'] = (($lat_sign == '-') ? -1 : 1) * floatval(ltrim(substr($lat_deg, 0, 2), '0')) + floatval(ltrim(substr($lat_deg, 2, 2), '0').$lat_deg_dec / 60); } elseif (strlen($lat_deg) == 6) { // [+-]DDMMSS.S - $ISO6709parsed['latitude'] = (($lat_sign == '-') ? -1 : 1) * floatval(ltrim(substr($lat_deg, 0, 2), '0')) + floatval(ltrim(substr($lat_deg, 2, 2), '0') / 60) + floatval(ltrim(substr($lat_deg, 4, 2), '0').$lat_deg_dec / 3600); + $ISO6709parsed['latitude'] = (($lat_sign == '-') ? -1 : 1) * floatval(ltrim(substr($lat_deg, 0, 2), '0')) + floatval((int) ltrim(substr($lat_deg, 2, 2), '0') / 60) + floatval(ltrim(substr($lat_deg, 4, 2), '0').$lat_deg_dec / 3600); } if (strlen($lon_deg) == 3) { // [+-]DDD.D @@ -160,7 +160,7 @@ public function Analyze() { } elseif (strlen($lon_deg) == 5) { // [+-]DDDMM.M $ISO6709parsed['longitude'] = (($lon_sign == '-') ? -1 : 1) * floatval(ltrim(substr($lon_deg, 0, 2), '0')) + floatval(ltrim(substr($lon_deg, 2, 2), '0').$lon_deg_dec / 60); } elseif (strlen($lon_deg) == 7) { // [+-]DDDMMSS.S - $ISO6709parsed['longitude'] = (($lon_sign == '-') ? -1 : 1) * floatval(ltrim(substr($lon_deg, 0, 2), '0')) + floatval(ltrim(substr($lon_deg, 2, 2), '0') / 60) + floatval(ltrim(substr($lon_deg, 4, 2), '0').$lon_deg_dec / 3600); + $ISO6709parsed['longitude'] = (($lon_sign == '-') ? -1 : 1) * floatval(ltrim(substr($lon_deg, 0, 2), '0')) + floatval((int) ltrim(substr($lon_deg, 2, 2), '0') / 60) + floatval(ltrim(substr($lon_deg, 4, 2), '0').$lon_deg_dec / 3600); } if (strlen($alt_deg) == 3) { // [+-]DDD.D @@ -168,7 +168,7 @@ public function Analyze() { } elseif (strlen($alt_deg) == 5) { // [+-]DDDMM.M $ISO6709parsed['altitude'] = (($alt_sign == '-') ? -1 : 1) * floatval(ltrim(substr($alt_deg, 0, 2), '0')) + floatval(ltrim(substr($alt_deg, 2, 2), '0').$alt_deg_dec / 60); } elseif (strlen($alt_deg) == 7) { // [+-]DDDMMSS.S - $ISO6709parsed['altitude'] = (($alt_sign == '-') ? -1 : 1) * floatval(ltrim(substr($alt_deg, 0, 2), '0')) + floatval(ltrim(substr($alt_deg, 2, 2), '0') / 60) + floatval(ltrim(substr($alt_deg, 4, 2), '0').$alt_deg_dec / 3600); + $ISO6709parsed['altitude'] = (($alt_sign == '-') ? -1 : 1) * floatval(ltrim(substr($alt_deg, 0, 2), '0')) + floatval((int) ltrim(substr($alt_deg, 2, 2), '0') / 60) + floatval(ltrim(substr($alt_deg, 4, 2), '0').$alt_deg_dec / 3600); } foreach (array('latitude', 'longitude', 'altitude') as $key) { @@ -332,7 +332,7 @@ public function QuicktimeParseAtom($atomname, $atomsize, $atom_data, $baseoffset } } elseif (isset($value_array['time_to_sample_table'])) { foreach ($value_array['time_to_sample_table'] as $key2 => $value_array2) { - if (isset($value_array2['sample_count']) && isset($value_array2['sample_duration']) && ($value_array2['sample_duration'] > 0)) { + if (isset($value_array2['sample_count']) && isset($value_array2['sample_duration']) && ($value_array2['sample_duration'] > 0) && !empty($info['quicktime']['time_scale'])) { $framerate = round($info['quicktime']['time_scale'] / $value_array2['sample_duration'], 3); $framecount = $value_array2['sample_count']; } @@ -776,8 +776,8 @@ public function QuicktimeParseAtom($atomname, $atomsize, $atom_data, $baseoffset case 'stsd': // Sample Table Sample Description atom - $atom_structure['version'] = getid3_lib::BigEndian2Int(substr($atom_data, 0, 1)); - $atom_structure['flags_raw'] = getid3_lib::BigEndian2Int(substr($atom_data, 1, 3)); // hardcoded: 0x0000 + $atom_structure['version'] = getid3_lib::BigEndian2Int(substr($atom_data, 0, 1)); // hardcoded: 0x00 + $atom_structure['flags_raw'] = getid3_lib::BigEndian2Int(substr($atom_data, 1, 3)); // hardcoded: 0x000000 $atom_structure['number_entries'] = getid3_lib::BigEndian2Int(substr($atom_data, 4, 4)); // see: https://github.com/JamesHeinrich/getID3/issues/111 @@ -805,7 +805,6 @@ public function QuicktimeParseAtom($atomname, $atomsize, $atom_data, $baseoffset $stsdEntriesDataOffset += 2; $atom_structure['sample_description_table'][$i]['data'] = substr($atom_data, $stsdEntriesDataOffset, ($atom_structure['sample_description_table'][$i]['size'] - 4 - 4 - 6 - 2)); $stsdEntriesDataOffset += ($atom_structure['sample_description_table'][$i]['size'] - 4 - 4 - 6 - 2); - if (substr($atom_structure['sample_description_table'][$i]['data'], 1, 54) == 'application/octet-stream;type=com.parrot.videometadata') { // special handling for apparently-malformed (TextMetaDataSampleEntry?) data for some version of Parrot drones $atom_structure['sample_description_table'][$i]['parrot_frame_metadata']['mime_type'] = substr($atom_structure['sample_description_table'][$i]['data'], 1, 55); @@ -893,7 +892,8 @@ public function QuicktimeParseAtom($atomname, $atomsize, $atom_data, $baseoffset break; case 'mp4a': - default: + $atom_structure['sample_description_table'][$i]['subatoms'] = $this->QuicktimeParseContainerAtom(substr($atom_structure['sample_description_table'][$i]['data'], 20), $baseoffset + $stsdEntriesDataOffset - 20 - 16, $atomHierarchy, $ParseAllPossibleAtoms); + $info['quicktime']['audio']['codec'] = $this->QuicktimeAudioCodecLookup($atom_structure['sample_description_table'][$i]['data_format']); $info['quicktime']['audio']['sample_rate'] = $atom_structure['sample_description_table'][$i]['audio_sample_rate']; $info['quicktime']['audio']['channels'] = $atom_structure['sample_description_table'][$i]['audio_channels']; @@ -919,6 +919,9 @@ public function QuicktimeParseAtom($atomname, $atomsize, $atom_data, $baseoffset break; } break; + + default: + break; } break; @@ -1666,7 +1669,7 @@ public function QuicktimeParseAtom($atomname, $atomsize, $atom_data, $baseoffset ); $atom_structure['data'] = $atom_data; $atom_structure['image_mime'] = 'image/jpeg'; - $atom_structure['description'] = isset($descriptions[$atomname]) ? $descriptions[$atomname] : 'Nikon preview image'; + $atom_structure['description'] = $descriptions[$atomname]; $info['quicktime']['comments']['picture'][] = array( 'image_mime' => $atom_structure['image_mime'], 'data' => $atom_data, @@ -1683,7 +1686,7 @@ public function QuicktimeParseAtom($atomname, $atomsize, $atom_data, $baseoffset case 'NCHD': // Nikon:MakerNoteVersion - https://exiftool.org/TagNames/Nikon.html $makerNoteVersion = ''; for ($i = 0, $iMax = strlen($atom_data); $i < $iMax; ++$i) { - if (ord($atom_data[$i]) >= 0x00 && ord($atom_data[$i]) <= 0x1F) { + if (ord($atom_data[$i]) <= 0x1F) { $makerNoteVersion .= ' '.ord($atom_data[$i]); } else { $makerNoteVersion .= $atom_data[$i]; @@ -2101,6 +2104,97 @@ public function QuicktimeParseAtom($atomname, $atomsize, $atom_data, $baseoffset break; + case 'esds': // Elementary Stream DeScriptor + // https://github.com/JamesHeinrich/getID3/issues/414 + // https://chromium.googlesource.com/chromium/src/media/+/refs/heads/main/formats/mp4/es_descriptor.cc + // https://chromium.googlesource.com/chromium/src/media/+/refs/heads/main/formats/mp4/es_descriptor.h + $atom_structure['version'] = getid3_lib::BigEndian2Int(substr($atom_data, 0, 1)); // hardcoded: 0x00 + $atom_structure['flags_raw'] = getid3_lib::BigEndian2Int(substr($atom_data, 1, 3)); // hardcoded: 0x000000 + $esds_offset = 4; + + $atom_structure['ES_DescrTag'] = getid3_lib::BigEndian2Int(substr($atom_data, $esds_offset, 1)); + $esds_offset += 1; + if ($atom_structure['ES_DescrTag'] != 0x03) { + $this->warning('expecting esds.ES_DescrTag = 0x03, found 0x'.getid3_lib::PrintHexBytes($atom_structure['ES_DescrTag']).'), at offset '.$atom_structure['offset']); + break; + } + $atom_structure['ES_DescrSize'] = $this->quicktime_read_mp4_descr_length($atom_data, $esds_offset); + + $atom_structure['ES_ID'] = getid3_lib::BigEndian2Int(substr($atom_data, $esds_offset, 2)); + $esds_offset += 2; + $atom_structure['ES_flagsraw'] = getid3_lib::BigEndian2Int(substr($atom_data, $esds_offset, 1)); + $esds_offset += 1; + $atom_structure['ES_flags']['stream_dependency'] = (bool) ($atom_structure['ES_flagsraw'] & 0x80); + $atom_structure['ES_flags']['url_flag'] = (bool) ($atom_structure['ES_flagsraw'] & 0x40); + $atom_structure['ES_flags']['ocr_stream'] = (bool) ($atom_structure['ES_flagsraw'] & 0x20); + $atom_structure['ES_stream_priority'] = ($atom_structure['ES_flagsraw'] & 0x1F); + if ($atom_structure['ES_flags']['url_flag']) { + $this->warning('Unsupported esds.url_flag enabled at offset '.$atom_structure['offset']); + break; + } + if ($atom_structure['ES_flags']['stream_dependency']) { + $atom_structure['ES_dependsOn_ES_ID'] = getid3_lib::BigEndian2Int(substr($atom_data, $esds_offset, 2)); + $esds_offset += 2; + } + if ($atom_structure['ES_flags']['ocr_stream']) { + $atom_structure['ES_OCR_ES_Id'] = getid3_lib::BigEndian2Int(substr($atom_data, $esds_offset, 2)); + $esds_offset += 2; + } + + $atom_structure['ES_DecoderConfigDescrTag'] = getid3_lib::BigEndian2Int(substr($atom_data, $esds_offset, 1)); + $esds_offset += 1; + if ($atom_structure['ES_DecoderConfigDescrTag'] != 0x04) { + $this->warning('expecting esds.ES_DecoderConfigDescrTag = 0x04, found 0x'.getid3_lib::PrintHexBytes($atom_structure['ES_DecoderConfigDescrTag']).'), at offset '.$atom_structure['offset']); + break; + } + $atom_structure['ES_DecoderConfigDescrTagSize'] = $this->quicktime_read_mp4_descr_length($atom_data, $esds_offset); + + $atom_structure['ES_objectTypeIndication'] = getid3_lib::BigEndian2Int(substr($atom_data, $esds_offset, 1)); + $esds_offset += 1; + // https://stackoverflow.com/questions/3987850 + // 0x40 = "Audio ISO/IEC 14496-3" = MPEG-4 Audio + // 0x67 = "Audio ISO/IEC 13818-7 LowComplexity Profile" = MPEG-2 AAC LC + // 0x69 = "Audio ISO/IEC 13818-3" = MPEG-2 Backward Compatible Audio (MPEG-2 Layers 1, 2, and 3) + // 0x6B = "Audio ISO/IEC 11172-3" = MPEG-1 Audio (MPEG-1 Layers 1, 2, and 3) + + $streamTypePlusFlags = getid3_lib::BigEndian2Int(substr($atom_data, $esds_offset, 1)); + $esds_offset += 1; + $atom_structure['ES_streamType'] = ($streamTypePlusFlags & 0xFC) >> 2; + $atom_structure['ES_upStream'] = (bool) ($streamTypePlusFlags & 0x02) >> 1; + $atom_structure['ES_bufferSizeDB'] = getid3_lib::BigEndian2Int(substr($atom_data, $esds_offset, 3)); + $esds_offset += 3; + $atom_structure['ES_maxBitrate'] = getid3_lib::BigEndian2Int(substr($atom_data, $esds_offset, 4)); + $esds_offset += 4; + $atom_structure['ES_avgBitrate'] = getid3_lib::BigEndian2Int(substr($atom_data, $esds_offset, 4)); + $esds_offset += 4; + if ($atom_structure['ES_avgBitrate']) { + $info['quicktime']['audio']['bitrate'] = $atom_structure['ES_avgBitrate']; + $info['audio']['bitrate'] = $atom_structure['ES_avgBitrate']; + } + + $atom_structure['ES_DecSpecificInfoTag'] = getid3_lib::BigEndian2Int(substr($atom_data, $esds_offset, 1)); + $esds_offset += 1; + if ($atom_structure['ES_DecSpecificInfoTag'] != 0x05) { + $this->warning('expecting esds.ES_DecSpecificInfoTag = 0x05, found 0x'.getid3_lib::PrintHexBytes($atom_structure['ES_DecSpecificInfoTag']).'), at offset '.$atom_structure['offset']); + break; + } + $atom_structure['ES_DecSpecificInfoTagSize'] = $this->quicktime_read_mp4_descr_length($atom_data, $esds_offset); + + $atom_structure['ES_DecSpecificInfo'] = getid3_lib::BigEndian2Int(substr($atom_data, $esds_offset, $atom_structure['ES_DecSpecificInfoTagSize'])); + $esds_offset += $atom_structure['ES_DecSpecificInfoTagSize']; + + $atom_structure['ES_SLConfigDescrTag'] = getid3_lib::BigEndian2Int(substr($atom_data, $esds_offset, 1)); + $esds_offset += 1; + if ($atom_structure['ES_SLConfigDescrTag'] != 0x06) { + $this->warning('expecting esds.ES_SLConfigDescrTag = 0x05, found 0x'.getid3_lib::PrintHexBytes($atom_structure['ES_SLConfigDescrTag']).'), at offset '.$atom_structure['offset']); + break; + } + $atom_structure['ES_SLConfigDescrTagSize'] = $this->quicktime_read_mp4_descr_length($atom_data, $esds_offset); + + $atom_structure['ES_SLConfigDescr'] = getid3_lib::BigEndian2Int(substr($atom_data, $esds_offset, $atom_structure['ES_SLConfigDescrTagSize'])); + $esds_offset += $atom_structure['ES_SLConfigDescrTagSize']; + break; + // AVIF-related - https://docs.rs/avif-parse/0.13.2/src/avif_parse/boxes.rs.html case 'pitm': // Primary ITeM case 'iloc': // Item LOCation @@ -2991,6 +3085,7 @@ public function quicktime_time_to_sample_table($info) { return array(); } + /** * @param array $info * diff --git a/src/wp-includes/ID3/module.audio-video.riff.php b/src/wp-includes/ID3/module.audio-video.riff.php index e745ec65f4877..a94ae24d0cb19 100644 --- a/src/wp-includes/ID3/module.audio-video.riff.php +++ b/src/wp-includes/ID3/module.audio-video.riff.php @@ -214,7 +214,7 @@ public function Analyze() { $thisfile_audio['bitrate'] = $thisfile_riff_audio[$streamindex]['bitrate']; if (empty($info['playtime_seconds'])) { // may already be set (e.g. DTS-WAV) - $info['playtime_seconds'] = (float) ((($info['avdataend'] - $info['avdataoffset']) * 8) / $thisfile_audio['bitrate']); + $info['playtime_seconds'] = (float)getid3_lib::SafeDiv(($info['avdataend'] - $info['avdataoffset']) * 8, $thisfile_audio['bitrate']); } $thisfile_audio['lossless'] = false; @@ -440,11 +440,11 @@ public function Analyze() { $thisfile_riff_WAVE['iXML'][0]['parsed'] = $parsedXML; if (isset($parsedXML['SPEED']['MASTER_SPEED'])) { @list($numerator, $denominator) = explode('/', $parsedXML['SPEED']['MASTER_SPEED']); - $thisfile_riff_WAVE['iXML'][0]['master_speed'] = $numerator / ($denominator ? $denominator : 1000); + $thisfile_riff_WAVE['iXML'][0]['master_speed'] = (int) $numerator / ($denominator ? $denominator : 1000); } if (isset($parsedXML['SPEED']['TIMECODE_RATE'])) { @list($numerator, $denominator) = explode('/', $parsedXML['SPEED']['TIMECODE_RATE']); - $thisfile_riff_WAVE['iXML'][0]['timecode_rate'] = $numerator / ($denominator ? $denominator : 1000); + $thisfile_riff_WAVE['iXML'][0]['timecode_rate'] = (int) $numerator / ($denominator ? $denominator : 1000); } if (isset($parsedXML['SPEED']['TIMESTAMP_SAMPLES_SINCE_MIDNIGHT_LO']) && !empty($parsedXML['SPEED']['TIMESTAMP_SAMPLE_RATE']) && !empty($thisfile_riff_WAVE['iXML'][0]['timecode_rate'])) { $samples_since_midnight = floatval(ltrim($parsedXML['SPEED']['TIMESTAMP_SAMPLES_SINCE_MIDNIGHT_HI'].$parsedXML['SPEED']['TIMESTAMP_SAMPLES_SINCE_MIDNIGHT_LO'], '0')); @@ -521,7 +521,7 @@ public function Analyze() { if (!isset($thisfile_audio['bitrate']) && isset($thisfile_riff_audio[$streamindex]['bitrate'])) { $thisfile_audio['bitrate'] = $thisfile_riff_audio[$streamindex]['bitrate']; - $info['playtime_seconds'] = (float) ((($info['avdataend'] - $info['avdataoffset']) * 8) / $thisfile_audio['bitrate']); + $info['playtime_seconds'] = (float)getid3_lib::SafeDiv((($info['avdataend'] - $info['avdataoffset']) * 8), $thisfile_audio['bitrate']); } if (!empty($info['wavpack'])) { @@ -531,7 +531,7 @@ public function Analyze() { // Reset to the way it was - RIFF parsing will have messed this up $info['avdataend'] = $Original['avdataend']; - $thisfile_audio['bitrate'] = (($info['avdataend'] - $info['avdataoffset']) * 8) / $info['playtime_seconds']; + $thisfile_audio['bitrate'] = getid3_lib::SafeDiv(($info['avdataend'] - $info['avdataoffset']) * 8, $info['playtime_seconds']); $this->fseek($info['avdataoffset'] - 44); $RIFFdata = $this->fread(44); @@ -632,7 +632,7 @@ public function Analyze() { } } if ($info['avdataend'] > $info['filesize']) { - switch (!empty($thisfile_audio_dataformat) ? $thisfile_audio_dataformat : '') { + switch ($thisfile_audio_dataformat) { case 'wavpack': // WavPack case 'lpac': // LPAC case 'ofr': // OptimFROG @@ -672,7 +672,7 @@ public function Analyze() { $this->warning('Extra null byte at end of MP3 data assumed to be RIFF padding and therefore ignored'); } } - if (isset($thisfile_audio_dataformat) && ($thisfile_audio_dataformat == 'ac3')) { + if ($thisfile_audio_dataformat == 'ac3') { unset($thisfile_audio['bits_per_sample']); if (!empty($info['ac3']['bitrate']) && ($info['ac3']['bitrate'] != $thisfile_audio['bitrate'])) { $thisfile_audio['bitrate'] = $info['ac3']['bitrate']; @@ -781,15 +781,15 @@ public function Analyze() { /** @var array $thisfile_riff_video_current */ $thisfile_riff_video_current = &$thisfile_riff_video[$streamindex]; - if ($thisfile_riff_raw_avih['dwWidth'] > 0) { + if ($thisfile_riff_raw_avih['dwWidth'] > 0) { // @phpstan-ignore-line $thisfile_riff_video_current['frame_width'] = $thisfile_riff_raw_avih['dwWidth']; $thisfile_video['resolution_x'] = $thisfile_riff_video_current['frame_width']; } - if ($thisfile_riff_raw_avih['dwHeight'] > 0) { + if ($thisfile_riff_raw_avih['dwHeight'] > 0) { // @phpstan-ignore-line $thisfile_riff_video_current['frame_height'] = $thisfile_riff_raw_avih['dwHeight']; $thisfile_video['resolution_y'] = $thisfile_riff_video_current['frame_height']; } - if ($thisfile_riff_raw_avih['dwTotalFrames'] > 0) { + if ($thisfile_riff_raw_avih['dwTotalFrames'] > 0) { // @phpstan-ignore-line $thisfile_riff_video_current['total_frames'] = $thisfile_riff_raw_avih['dwTotalFrames']; $thisfile_video['total_frames'] = $thisfile_riff_video_current['total_frames']; } @@ -1913,7 +1913,7 @@ public function ParseRIFF($startoffset, $maxoffset) { if (isset($RIFFchunk[$chunkname][$thisindex]) && empty($RIFFchunk[$chunkname][$thisindex])) { unset($RIFFchunk[$chunkname][$thisindex]); } - if (isset($RIFFchunk[$chunkname]) && empty($RIFFchunk[$chunkname])) { + if (count($RIFFchunk[$chunkname]) === 0) { unset($RIFFchunk[$chunkname]); } $RIFFchunk[$LISTchunkParent][$chunkname][$thisindex]['data'] = $this->fread($chunksize); @@ -2034,7 +2034,7 @@ public static function parseComments(&$RIFFinfoArray, &$CommentsTargetArray) { foreach ($RIFFinfoKeyLookup as $key => $value) { if (isset($RIFFinfoArray[$key])) { foreach ($RIFFinfoArray[$key] as $commentid => $commentdata) { - if (trim($commentdata['data']) != '') { + if (!empty($commentdata['data']) && trim($commentdata['data']) != '') { if (isset($CommentsTargetArray[$value])) { $CommentsTargetArray[$value][] = trim($commentdata['data']); } else { diff --git a/src/wp-includes/ID3/module.audio.mp3.php b/src/wp-includes/ID3/module.audio.mp3.php index 3d8a9442a9514..0d8fee3e5dc2b 100644 --- a/src/wp-includes/ID3/module.audio.mp3.php +++ b/src/wp-includes/ID3/module.audio.mp3.php @@ -1380,11 +1380,11 @@ public function getOnlyMPEGaudioInfoBruteForce() { $Distribution['padding'][intval($LongMPEGpaddingLookup[$head4])] = isset($Distribution['padding'][intval($LongMPEGpaddingLookup[$head4])]) ? ++$Distribution['padding'][intval($LongMPEGpaddingLookup[$head4])] : 1; $Distribution['frequency'][$LongMPEGfrequencyLookup[$head4]] = isset($Distribution['frequency'][$LongMPEGfrequencyLookup[$head4]]) ? ++$Distribution['frequency'][$LongMPEGfrequencyLookup[$head4]] : 1; if (++$frames_scanned >= $max_frames_scan) { - $pct_data_scanned = ($this->ftell() - $info['avdataoffset']) / ($info['avdataend'] - $info['avdataoffset']); + $pct_data_scanned = getid3_lib::SafeDiv($this->ftell() - $info['avdataoffset'], $info['avdataend'] - $info['avdataoffset']); $this->warning('too many MPEG audio frames to scan, only scanned first '.$max_frames_scan.' frames ('.number_format($pct_data_scanned * 100, 1).'% of file) and extrapolated distribution, playtime and bitrate may be incorrect.'); foreach ($Distribution as $key1 => $value1) { foreach ($value1 as $key2 => $value2) { - $Distribution[$key1][$key2] = round($value2 / $pct_data_scanned); + $Distribution[$key1][$key2] = $pct_data_scanned ? round($value2 / $pct_data_scanned) : 1; } } break; @@ -1475,7 +1475,7 @@ public function getOnlyMPEGaudioInfo($avdataoffset, $BitrateHistogram=false) { $SyncSeekAttemptsMax = 1000; $FirstFrameThisfileInfo = null; while ($SynchSeekOffset < $sync_seek_buffer_size) { - if ((($avdataoffset + $SynchSeekOffset) < $info['avdataend']) && !feof($this->getid3->fp)) { + if ((($avdataoffset + $SynchSeekOffset) < $info['avdataend']) && !$this->feof()) { if ($SynchSeekOffset > $sync_seek_buffer_size) { // if a synch's not found within the first 128k bytes, then give up @@ -1490,20 +1490,6 @@ public function getOnlyMPEGaudioInfo($avdataoffset, $BitrateHistogram=false) { unset($info['mpeg']); } return false; - - } elseif (feof($this->getid3->fp)) { - - $this->error('Could not find valid MPEG audio synch before end of file'); - if (isset($info['audio']['bitrate'])) { - unset($info['audio']['bitrate']); - } - if (isset($info['mpeg']['audio'])) { - unset($info['mpeg']['audio']); - } - if (isset($info['mpeg']) && (!is_array($info['mpeg']) || (count($info['mpeg']) == 0))) { - unset($info['mpeg']); - } - return false; } } @@ -1652,7 +1638,7 @@ public function getOnlyMPEGaudioInfo($avdataoffset, $BitrateHistogram=false) { } $frames_scanned++; if ($frames_scan_per_segment && (++$frames_scanned_this_segment >= $frames_scan_per_segment)) { - $this_pct_scanned = ($this->ftell() - $scan_start_offset[$current_segment]) / ($info['avdataend'] - $info['avdataoffset']); + $this_pct_scanned = getid3_lib::SafeDiv($this->ftell() - $scan_start_offset[$current_segment], $info['avdataend'] - $info['avdataoffset']); if (($current_segment == 0) && (($this_pct_scanned * $max_scan_segments) >= 1)) { // file likely contains < $max_frames_scan, just scan as one segment $max_scan_segments = 1; @@ -1743,6 +1729,10 @@ public function getOnlyMPEGaudioInfo($avdataoffset, $BitrateHistogram=false) { } $info['audio']['channels'] = $info['mpeg']['audio']['channels']; + if ($info['audio']['channels'] < 1) { + $this->error('Corrupt MP3 file: no channels'); + return false; + } $info['audio']['channelmode'] = $info['mpeg']['audio']['channelmode']; $info['audio']['sample_rate'] = $info['mpeg']['audio']['sample_rate']; return true; diff --git a/src/wp-includes/ID3/module.audio.ogg.php b/src/wp-includes/ID3/module.audio.ogg.php index 0cbea61e2ff2c..ebd2b946c552a 100644 --- a/src/wp-includes/ID3/module.audio.ogg.php +++ b/src/wp-includes/ID3/module.audio.ogg.php @@ -210,8 +210,8 @@ public function Analyze() { $filedataoffset += 20; $info['ogg']['skeleton']['fishead']['version'] = $info['ogg']['skeleton']['fishead']['raw']['version_major'].'.'.$info['ogg']['skeleton']['fishead']['raw']['version_minor']; - $info['ogg']['skeleton']['fishead']['presentationtime'] = $info['ogg']['skeleton']['fishead']['raw']['presentationtime_numerator'] / $info['ogg']['skeleton']['fishead']['raw']['presentationtime_denominator']; - $info['ogg']['skeleton']['fishead']['basetime'] = $info['ogg']['skeleton']['fishead']['raw']['basetime_numerator'] / $info['ogg']['skeleton']['fishead']['raw']['basetime_denominator']; + $info['ogg']['skeleton']['fishead']['presentationtime'] = getid3_lib::SafeDiv($info['ogg']['skeleton']['fishead']['raw']['presentationtime_numerator'], $info['ogg']['skeleton']['fishead']['raw']['presentationtime_denominator']); + $info['ogg']['skeleton']['fishead']['basetime'] = getid3_lib::SafeDiv($info['ogg']['skeleton']['fishead']['raw']['basetime_numerator'], $info['ogg']['skeleton']['fishead']['raw']['basetime_denominator']); $info['ogg']['skeleton']['fishead']['utc'] = $info['ogg']['skeleton']['fishead']['raw']['utc']; @@ -288,7 +288,7 @@ public function Analyze() { $info['audio']['sample_rate'] = $info['flac']['STREAMINFO']['sample_rate']; $info['audio']['channels'] = $info['flac']['STREAMINFO']['channels']; $info['audio']['bits_per_sample'] = $info['flac']['STREAMINFO']['bits_per_sample']; - $info['playtime_seconds'] = $info['flac']['STREAMINFO']['samples_stream'] / $info['flac']['STREAMINFO']['sample_rate']; + $info['playtime_seconds'] = getid3_lib::SafeDiv($info['flac']['STREAMINFO']['samples_stream'], $info['flac']['STREAMINFO']['sample_rate']); } } else { @@ -359,7 +359,7 @@ public function Analyze() { return false; } if (!empty($info['audio']['sample_rate'])) { - $info['ogg']['bitrate_average'] = (($info['avdataend'] - $info['avdataoffset']) * 8) / ($info['ogg']['samples'] / $info['audio']['sample_rate']); + $info['ogg']['bitrate_average'] = (($info['avdataend'] - $info['avdataoffset']) * 8) * $info['audio']['sample_rate'] / $info['ogg']['samples']; } } @@ -534,12 +534,12 @@ public function ParseOggPageHeader() { $filedata = $this->fread($this->getid3->fread_buffer_size()); $filedataoffset = 0; - while ((substr($filedata, $filedataoffset++, 4) != 'OggS')) { + while (substr($filedata, $filedataoffset++, 4) != 'OggS') { if (($this->ftell() - $oggheader['page_start_offset']) >= $this->getid3->fread_buffer_size()) { // should be found before here return false; } - if ((($filedataoffset + 28) > strlen($filedata)) || (strlen($filedata) < 28)) { + if (($filedataoffset + 28) > strlen($filedata)) { if ($this->feof() || (($filedata .= $this->fread($this->getid3->fread_buffer_size())) === '')) { // get some more data, unless eof, in which case fail return false; diff --git a/src/wp-includes/ID3/module.tag.apetag.php b/src/wp-includes/ID3/module.tag.apetag.php index c5502133fcbb3..1305cfb509d81 100644 --- a/src/wp-includes/ID3/module.tag.apetag.php +++ b/src/wp-includes/ID3/module.tag.apetag.php @@ -267,7 +267,7 @@ public function Analyze() { case 'cover art (publisher logo)': case 'cover art (recording)': case 'cover art (studio)': - // list of possible cover arts from http://taglib-sharp.sourcearchive.com/documentation/2.0.3.0-2/Ape_2Tag_8cs-source.html + // list of possible cover arts from https://github.com/mono/taglib-sharp/blob/taglib-sharp-2.0.3.2/src/TagLib/Ape/Tag.cs if (is_array($thisfile_ape_items_current['data'])) { $this->warning('APEtag "'.$item_key.'" should be flagged as Binary data, but was incorrectly flagged as UTF-8'); $thisfile_ape_items_current['data'] = implode("\x00", $thisfile_ape_items_current['data']); @@ -332,7 +332,7 @@ public function Analyze() { $info['ape']['comments']['picture'][] = $comments_picture_data; unset($comments_picture_data); } - } while (false); + } while (false); // @phpstan-ignore-line break; default: diff --git a/src/wp-includes/ID3/module.tag.id3v1.php b/src/wp-includes/ID3/module.tag.id3v1.php index b1de25784bb92..442aefe35cf77 100644 --- a/src/wp-includes/ID3/module.tag.id3v1.php +++ b/src/wp-includes/ID3/module.tag.id3v1.php @@ -66,7 +66,7 @@ public function Analyze() { if (!empty($ParsedID3v1['genre'])) { unset($ParsedID3v1['genreid']); } - if (isset($ParsedID3v1['genre']) && (empty($ParsedID3v1['genre']) || ($ParsedID3v1['genre'] == 'Unknown'))) { + if (empty($ParsedID3v1['genre']) || ($ParsedID3v1['genre'] == 'Unknown')) { unset($ParsedID3v1['genre']); } diff --git a/src/wp-includes/ID3/module.tag.id3v2.php b/src/wp-includes/ID3/module.tag.id3v2.php index 9e7b4eb1bb695..ec448be87b4d1 100644 --- a/src/wp-includes/ID3/module.tag.id3v2.php +++ b/src/wp-includes/ID3/module.tag.id3v2.php @@ -1494,7 +1494,7 @@ public function ParseID3v2Frame(&$parsedFrame) { unset($comments_picture_data); } } - } while (false); + } while (false); // @phpstan-ignore-line } } elseif ((($id3v2_majorversion >= 3) && ($parsedFrame['frame_name'] == 'GEOB')) || // 4.15 GEOB General encapsulated object @@ -3753,18 +3753,12 @@ public static function IsValidID3v2FrameName($framename, $id3v2majorversion) { * @return bool */ public static function IsANumber($numberstring, $allowdecimal=false, $allownegative=false) { - for ($i = 0; $i < strlen($numberstring); $i++) { - if ((chr($numberstring[$i]) < chr('0')) || (chr($numberstring[$i]) > chr('9'))) { - if (($numberstring[$i] == '.') && $allowdecimal) { - // allowed - } elseif (($numberstring[$i] == '-') && $allownegative && ($i == 0)) { - // allowed - } else { - return false; - } - } - } - return true; + $pattern = '#^'; + $pattern .= ($allownegative ? '\\-?' : ''); + $pattern .= '[0-9]+'; + $pattern .= ($allowdecimal ? '(\\.[0-9]+)?' : ''); + $pattern .= '$#'; + return preg_match($pattern, $numberstring); } /** @@ -3773,10 +3767,7 @@ public static function IsANumber($numberstring, $allowdecimal=false, $allownegat * @return bool */ public static function IsValidDateStampString($datestamp) { - if (strlen($datestamp) != 8) { - return false; - } - if (!self::IsANumber($datestamp, false)) { + if (!preg_match('#^[12][0-9]{3}[01][0-9][0123][0-9]$#', $datestamp)) { return false; } $year = substr($datestamp, 0, 4); diff --git a/src/wp-includes/ID3/readme.txt b/src/wp-includes/ID3/readme.txt index 0888bc4de2503..c1b3d47bff06c 100644 --- a/src/wp-includes/ID3/readme.txt +++ b/src/wp-includes/ID3/readme.txt @@ -20,7 +20,8 @@ GNU LGPL: https://gnu.org/licenses/lgpl.html (v3) Mozilla MPL: https://www.mozilla.org/MPL/2.0/ (v2) -getID3 Commercial License: https://www.getid3.org/#gCL (payment required) +getID3 Commercial License: https://www.getid3.org/#gCL +(no longer available, existing licenses remain valid) ***************************************************************** ***************************************************************** From 7ac4f60c33859e3c83e116f92500922058a2f324 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Fri, 20 Oct 2023 14:54:23 +0000 Subject: [PATCH 41/71] Build/Test Tools: Test the Gutenberg plugin build process. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A very common contributor setup is having a copy of the `gutenberg` development repository within a checkout of the `wordpress-develop` repository. On occasion, there are some strange incompatibilities that come up when using this setup. A few examples can be seen in #58671 and #59634. This changeset helps ensure that these edge cases are not introduced by testing the Gutenberg plugin’s build process within WordPress configured to run from both the `src` and `build` directories. This also renames the “Test npm” workflow to a more general “Test Build Processes”, which more accurately describes what is actually being tested within it and allows these new test jobs to be grouped in. And finally, the logic within the workflow has been split out into two callable workflows. This helps avoid code duplication within the workflow, and allows for better grouping on the workflow run screen. Props swissspidy, aferica, SergeyBiryukov, antonvlasenko, desrosj. Fixes #59632. See #58671, #59634. git-svn-id: https://develop.svn.wordpress.org/trunk@56976 602fd350-edb4-49c9-b593-d223f7449a82 --- .../callable-test-core-build-process.yml | 73 ++++++ .../callable-test-gutenberg-build-process.yml | 92 +++++++ .github/workflows/test-build-processes.yml | 166 +++++++++++++ .github/workflows/test-npm.yml | 225 ------------------ 4 files changed, 331 insertions(+), 225 deletions(-) create mode 100644 .github/workflows/callable-test-core-build-process.yml create mode 100644 .github/workflows/callable-test-gutenberg-build-process.yml create mode 100644 .github/workflows/test-build-processes.yml delete mode 100644 .github/workflows/test-npm.yml diff --git a/.github/workflows/callable-test-core-build-process.yml b/.github/workflows/callable-test-core-build-process.yml new file mode 100644 index 0000000000000..faedb87bf566a --- /dev/null +++ b/.github/workflows/callable-test-core-build-process.yml @@ -0,0 +1,73 @@ +## +# A callable workflow that tests the WordPress Core build process. +## +name: Test the WordPress Build Process + +on: + workflow_call: + inputs: + os: + description: 'Operating system to run tests on' + required: false + type: 'string' + default: 'ubuntu-latest' + directory: + description: 'Directory to run WordPress from. Valid values are `src` or `build`' + required: false + type: 'string' + default: 'src' + +env: + PUPPETEER_SKIP_DOWNLOAD: ${{ true }} + +jobs: + # Verifies that installing npm dependencies and building WordPress works as expected. + # + # Performs the following steps: + # - Checks out the repository. + # - Sets up Node.js. + # - Logs debug information about the GitHub Action runner. + # - Installs npm dependencies. + # - Builds WordPress to run from the desired location (src or build). + # - Ensures version-controlled files are not modified or deleted. + # - Cleans up after building WordPress. + # - Ensures version-controlled files are not modified or deleted. + build-process-tests: + name: Core running from ${{ inputs.directory }} / ${{ inputs.os == 'macos-latest' && 'MacOS' || inputs.os == 'windows-latest' && 'Windows' || 'Linux' }} + runs-on: ${{ inputs.os }} + timeout-minutes: 20 + + steps: + - name: Checkout repository + uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + with: + show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} + + - name: Set up Node.js + uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1 + with: + node-version-file: '.nvmrc' + cache: npm + + - name: Log debug information + run: | + npm --version + node --version + curl --version + git --version + svn --version + + - name: Install npm Dependencies + run: npm ci + + - name: Build WordPress to run from ${{ inputs.directory }} + run: npm run build${{ inputs.directory == 'src' && ':dev' || '' }} + + - name: Ensure version-controlled files are not modified or deleted during building + run: git diff --exit-code + + - name: Clean after building to run from ${{ inputs.directory }} + run: npm run grunt clean${{ inputs.directory == 'src' && ' -- --dev' || '' }} + + - name: Ensure version-controlled files are not modified or deleted during cleaning + run: git diff --exit-code diff --git a/.github/workflows/callable-test-gutenberg-build-process.yml b/.github/workflows/callable-test-gutenberg-build-process.yml new file mode 100644 index 0000000000000..f009c2817ec34 --- /dev/null +++ b/.github/workflows/callable-test-gutenberg-build-process.yml @@ -0,0 +1,92 @@ +## +# A callable workflow that tests the Gutenberg plugin build process when run within a wordpress-develop checkout. +## +name: Test the Gutenberg plugin Build Process + +on: + workflow_call: + inputs: + os: + description: 'Operating system to run tests on' + required: false + type: 'string' + default: 'ubuntu-latest' + directory: + description: 'Directory to run WordPress from. Valid values are `src` or `build`' + required: false + type: 'string' + default: 'src' + +env: + GUTENBERG_DIRECTORY: ${{ inputs.directory == 'build' && 'build' || 'src' }}/wp-content/plugins/gutenberg + PUPPETEER_SKIP_DOWNLOAD: ${{ true }} + +jobs: + # Verifies that installing npm dependencies and building the Gutenberg plugin works as expected. + # + # Performs the following steps: + # - Checks out the repository. + # - Checks out the Gutenberg plugin into the plugins directory. + # - Sets up Node.js. + # - Logs debug information about the GitHub Action runner. + # - Installs Core npm dependencies. + # - Installs Gutenberg npm dependencies. + # - Runs the Gutenberg build process. + # - Builds WordPress to run from the relevant location (src or build). + # - Builds Gutenberg. + # - Ensures version-controlled files are not modified or deleted. + build-process-tests: + name: Gutenberg running from ${{ inputs.directory }} / ${{ inputs.os == 'macos-latest' && 'MacOS' || inputs.os == 'windows-latest' && 'Windows' || 'Linux' }} + runs-on: ${{ inputs.os }} + timeout-minutes: 30 + + steps: + - name: Checkout repository + uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + with: + show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} + + - name: Checkout Gutenberg plugin + uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + with: + repository: 'WordPress/gutenberg' + path: ${{ env.GUTENBERG_DIRECTORY }} + show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} + + - name: Set up Node.js + uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1 + with: + node-version-file: '.nvmrc' + cache: npm + cache-dependency-path: | + package-lock.json + ${{ env.GUTENBERG_DIRECTORY }}/package-lock.json + + - name: Log debug information + run: | + npm --version + node --version + curl --version + git --version + svn --version + + - name: Install Core Dependencies + run: npm ci + + - name: Install Gutenberg Dependencies + run: npm ci + working-directory: ${{ env.GUTENBERG_DIRECTORY }} + + - name: Build Gutenberg + run: npm run build + working-directory: ${{ env.GUTENBERG_DIRECTORY }} + + - name: Build WordPress to run from ${{ inputs.directory }} + run: npm run build${{ inputs.directory == 'src' && ':dev' || '' }} + + - name: Run Gutenberg build script after building Core to run from ${{ inputs.directory }} + run: npm run build + working-directory: ${{ env.GUTENBERG_DIRECTORY }} + + - name: Ensure version-controlled files are not modified or deleted during building + run: git diff --exit-code diff --git a/.github/workflows/test-build-processes.yml b/.github/workflows/test-build-processes.yml new file mode 100644 index 0000000000000..5685392310574 --- /dev/null +++ b/.github/workflows/test-build-processes.yml @@ -0,0 +1,166 @@ +name: Test Build Processes + +on: + push: + branches: + - trunk + - '3.[7-9]' + - '[4-9].[0-9]' + tags: + - '[0-9]+.[0-9]' + - '[0-9]+.[0-9].[0-9]+' + pull_request: + branches: + - trunk + - '3.[7-9]' + - '[4-9].[0-9]' + paths: + # These files configure npm. Changes could affect the outcome. + - 'package*.json' + # JavaScript files are built using npm. + - '**.js' + # CSS and SCSS files are built using npm. + - '**.scss' + - '**.css' + # Changes to workflow files should always verify all workflows are successful. + - '.github/workflows/**.yml' + workflow_dispatch: + +# Cancels all previous workflow runs for pull requests that have not completed. +concurrency: + # The concurrency group contains the workflow name and the branch name for pull requests + # or the commit hash for any other events. + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} + cancel-in-progress: true + +# Disable permissions for all available scopes by default. +# Any needed permissions should be configured at the job level. +permissions: {} + +jobs: + # Tests the WordPress Core build process on multiple operating systems. + test-core-build-process: + name: Core running from ${{ matrix.directory }} + uses: WordPress/wordpress-develop/.github/workflows/callable-test-core-build-process.yml@trunk + permissions: + contents: read + if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} + strategy: + fail-fast: false + matrix: + os: [ ubuntu-latest, windows-latest ] + directory: [ 'src', 'build' ] + with: + os: ${{ matrix.os }} + directory: ${{ matrix.directory }} + + # Tests the WordPress Core build process on MacOS. + # + # This is separate from the job above in order to use stricter conditions when determining when to run. + # This avoids unintentionally consuming excessive minutes, as MacOS jobs consume minutes at a 10x rate. + # + # The `matrix` and `runner` contexts are not available for use within `if` expressions. So there is + # currently no way to determine the OS being used on a given job. + # See https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability. + test-core-build-process-macos: + name: Core running from ${{ matrix.directory }} + uses: WordPress/wordpress-develop/.github/workflows/callable-test-core-build-process.yml@trunk + permissions: + contents: read + if: ${{ github.repository == 'WordPress/wordpress-develop' }} + strategy: + fail-fast: false + matrix: + os: [ macos-latest ] + directory: [ 'src', 'build' ] + with: + os: ${{ matrix.os }} + directory: ${{ matrix.directory }} + + # Tests the Gutenberg plugin build process on multiple operating systems when run within a wordpress-develop checkout. + test-gutenberg-build-process: + name: Gutenberg running from ${{ matrix.directory }} + uses: desrosj/wordpress-develop/.github/workflows/callable-test-gutenberg-build-process.yml@combine/npm-testing + permissions: + contents: read + if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} + strategy: + fail-fast: false + matrix: + os: [ ubuntu-latest, windows-latest ] + directory: [ 'src', 'build' ] + with: + os: ${{ matrix.os }} + directory: ${{ matrix.directory }} + + # Tests the Gutenberg plugin build process on MacOS when run within a wordpress-develop checkout. + # + # This is separate from the job above in order to use stricter conditions when determining when to run. + # This avoids unintentionally consuming excessive minutes, as MacOS jobs consume minutes at a 10x rate. + # + # The `matrix` and `runner` contexts are not available for use within `if` expressions. So there is + # currently no way to determine the OS being used on a given job. + # See https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability. + test-gutenberg-build-process-macos: + name: Gutenberg running from ${{ matrix.directory }} + uses: desrosj/wordpress-develop/.github/workflows/callable-test-gutenberg-build-process.yml@combine/npm-testing + permissions: + contents: read + if: ${{ github.repository == 'WordPress/wordpress-develop' }} + strategy: + fail-fast: false + matrix: + os: [ macos-latest ] + directory: [ 'src', 'build' ] + with: + os: ${{ matrix.os }} + directory: ${{ matrix.directory }} + + slack-notifications: + name: Slack Notifications + uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk + permissions: + actions: read + contents: read + needs: [ test-core-build-process, test-core-build-process-macos, test-gutenberg-build-process, test-gutenberg-build-process-macos ] + if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }} + with: + calling_status: ${{ contains( needs.*.result, 'cancelled' ) && 'cancelled' || contains( needs.*.result, 'failure' ) && 'failure' || 'success' }} + secrets: + SLACK_GHA_SUCCESS_WEBHOOK: ${{ secrets.SLACK_GHA_SUCCESS_WEBHOOK }} + SLACK_GHA_CANCELLED_WEBHOOK: ${{ secrets.SLACK_GHA_CANCELLED_WEBHOOK }} + SLACK_GHA_FIXED_WEBHOOK: ${{ secrets.SLACK_GHA_FIXED_WEBHOOK }} + SLACK_GHA_FAILURE_WEBHOOK: ${{ secrets.SLACK_GHA_FAILURE_WEBHOOK }} + + failed-workflow: + name: Failed workflow tasks + runs-on: ubuntu-latest + permissions: + actions: write + needs: [ slack-notifications ] + if: | + always() && + github.repository == 'WordPress/wordpress-develop' && + github.event_name != 'pull_request' && + github.run_attempt < 2 && + ( + contains( needs.*.result, 'cancelled' ) || + contains( needs.*.result, 'failure' ) + ) + + steps: + - name: Dispatch workflow run + uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1 + with: + retries: 2 + retry-exempt-status-codes: 418 + script: | + github.rest.actions.createWorkflowDispatch({ + owner: context.repo.owner, + repo: context.repo.repo, + workflow_id: 'failed-workflow.yml', + ref: 'trunk', + inputs: { + run_id: '${{ github.run_id }}' + } + }); diff --git a/.github/workflows/test-npm.yml b/.github/workflows/test-npm.yml deleted file mode 100644 index d53c8ec825690..0000000000000 --- a/.github/workflows/test-npm.yml +++ /dev/null @@ -1,225 +0,0 @@ -name: Test npm - -on: - push: - branches: - - trunk - - '3.[7-9]' - - '[4-9].[0-9]' - tags: - - '[0-9]+.[0-9]' - - '[0-9]+.[0-9].[0-9]+' - pull_request: - branches: - - trunk - - '3.[7-9]' - - '[4-9].[0-9]' - paths: - # These files configure npm. Changes could affect the outcome. - - 'package*.json' - # JavaScript files are built using npm. - - '**.js' - # CSS and SCSS files are built using npm. - - '**.scss' - - '**.css' - # Changes to workflow files should always verify all workflows are successful. - - '.github/workflows/**.yml' - workflow_dispatch: - -# Cancels all previous workflow runs for pull requests that have not completed. -concurrency: - # The concurrency group contains the workflow name and the branch name for pull requests - # or the commit hash for any other events. - group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} - cancel-in-progress: true - -# Disable permissions for all available scopes by default. -# Any needed permissions should be configured at the job level. -permissions: {} - -env: - PUPPETEER_SKIP_DOWNLOAD: ${{ true }} - -jobs: - # Verifies that installing npm dependencies and building WordPress works as expected. - # - # Performs the following steps: - # - Checks out the repository. - # - Sets up Node.js. - # - Logs debug information about the GitHub Action runner. - # - Installs npm dependencies. - # - Builds WordPress to run from the `build` directory. - # - Cleans up after building WordPress to the `build` directory. - # - Ensures version-controlled files are not modified or deleted. - # - Builds WordPress to run from the `src` directory. - # - Cleans up after building WordPress to the `src` directory. - # - Ensures version-controlled files are not modified or deleted. - test-npm: - name: Test npm on ${{ matrix.os }} - runs-on: ${{ matrix.os }} - permissions: - contents: read - timeout-minutes: 20 - if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} - strategy: - fail-fast: false - matrix: - os: [ ubuntu-latest, windows-latest ] - - steps: - - name: Checkout repository - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 - with: - show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} - - - name: Set up Node.js - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1 - with: - node-version-file: '.nvmrc' - cache: npm - - - name: Log debug information - run: | - npm --version - node --version - curl --version - git --version - svn --version - - - name: Install npm Dependencies - run: npm ci - - - name: Build WordPress in /src - run: npm run build:dev - - - name: Clean after building in /src - run: npm run grunt clean -- --dev - - - name: Ensure version-controlled files are not modified or deleted during building and cleaning - run: git diff --exit-code - - - name: Build WordPress - run: npm run build - - - name: Clean after building - run: npm run grunt clean - - - name: Ensure version-controlled files are not modified or deleted during building and cleaning - run: git diff --exit-code - - # Verifies that installing npm dependencies and building WordPress works as expected on MacOS. - # - # This is separate from the job above in order to use stricter conditions about when to run. - # This avoids unintentionally consuming excessive minutes, as MacOS jobs consume minutes at a 10x rate. - # - # The `matrix` and `runner` contexts are not available for use within `if` expressions. So there is - # currently no way to determine the OS being used on a given job. - # See https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability. - # - # Performs the following steps: - # - Checks out the repository. - # - Sets up Node.js. - # - Logs debug information about the GitHub Action runner. - # - Installs npm dependencies. - # - Builds WordPress to run from the `build` directory. - # - Cleans up after building WordPress to the `build` directory. - # - Ensures version-controlled files are not modified or deleted. - # - Builds WordPress to run from the `src` directory. - # - Cleans up after building WordPress to the `src` directory. - # - Ensures version-controlled files are not modified or deleted. - test-npm-macos: - name: Test npm on MacOS - runs-on: macos-latest - permissions: - contents: read - timeout-minutes: 30 - if: ${{ github.repository == 'WordPress/wordpress-develop' }} - steps: - - name: Checkout repository - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 - with: - show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} - - - name: Set up Node.js - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1 - with: - node-version-file: '.nvmrc' - cache: npm - - - name: Log debug information - run: | - npm --version - node --version - curl --version - git --version - svn --version - - - name: Install npm Dependencies - run: npm ci - - - name: Build WordPress in /src - run: npm run build:dev - - - name: Clean after building in /src - run: npm run grunt clean -- --dev - - - name: Ensure version-controlled files are not modified or deleted during building and cleaning - run: git diff --exit-code - - - name: Build WordPress - run: npm run build - - - name: Clean after building - run: npm run grunt clean - - - name: Ensure version-controlled files are not modified or deleted during building and cleaning - run: git diff --exit-code - - slack-notifications: - name: Slack Notifications - uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk - permissions: - actions: read - contents: read - needs: [ test-npm, test-npm-macos ] - if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }} - with: - calling_status: ${{ contains( needs.*.result, 'cancelled' ) && 'cancelled' || contains( needs.*.result, 'failure' ) && 'failure' || 'success' }} - secrets: - SLACK_GHA_SUCCESS_WEBHOOK: ${{ secrets.SLACK_GHA_SUCCESS_WEBHOOK }} - SLACK_GHA_CANCELLED_WEBHOOK: ${{ secrets.SLACK_GHA_CANCELLED_WEBHOOK }} - SLACK_GHA_FIXED_WEBHOOK: ${{ secrets.SLACK_GHA_FIXED_WEBHOOK }} - SLACK_GHA_FAILURE_WEBHOOK: ${{ secrets.SLACK_GHA_FAILURE_WEBHOOK }} - - failed-workflow: - name: Failed workflow tasks - runs-on: ubuntu-latest - permissions: - actions: write - needs: [ slack-notifications ] - if: | - always() && - github.repository == 'WordPress/wordpress-develop' && - github.event_name != 'pull_request' && - github.run_attempt < 2 && - ( - contains( needs.*.result, 'cancelled' ) || - contains( needs.*.result, 'failure' ) - ) - - steps: - - name: Dispatch workflow run - uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1 - with: - retries: 2 - retry-exempt-status-codes: 418 - script: | - github.rest.actions.createWorkflowDispatch({ - owner: context.repo.owner, - repo: context.repo.repo, - workflow_id: 'failed-workflow.yml', - ref: 'trunk', - inputs: { - run_id: '${{ github.run_id }}' - } - }); From df21bdf81c48fcdd00692e1ff208f39053c27501 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Fri, 20 Oct 2023 17:11:10 +0000 Subject: [PATCH 42/71] Build/Test Tools: Use the correct path to build process test workflows. Follow up to [56976]. See #59632. git-svn-id: https://develop.svn.wordpress.org/trunk@56977 602fd350-edb4-49c9-b593-d223f7449a82 --- .github/workflows/test-build-processes.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-build-processes.yml b/.github/workflows/test-build-processes.yml index 5685392310574..7dd247f3f4ea5 100644 --- a/.github/workflows/test-build-processes.yml +++ b/.github/workflows/test-build-processes.yml @@ -80,7 +80,7 @@ jobs: # Tests the Gutenberg plugin build process on multiple operating systems when run within a wordpress-develop checkout. test-gutenberg-build-process: name: Gutenberg running from ${{ matrix.directory }} - uses: desrosj/wordpress-develop/.github/workflows/callable-test-gutenberg-build-process.yml@combine/npm-testing + uses: WordPress/wordpress-develop/.github/workflows/callable-test-gutenberg-build-process.yml@trunk permissions: contents: read if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} @@ -103,7 +103,7 @@ jobs: # See https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability. test-gutenberg-build-process-macos: name: Gutenberg running from ${{ matrix.directory }} - uses: desrosj/wordpress-develop/.github/workflows/callable-test-gutenberg-build-process.yml@combine/npm-testing + uses: WordPress/wordpress-develop/.github/workflows/callable-test-gutenberg-build-process.yml@trunk permissions: contents: read if: ${{ github.repository == 'WordPress/wordpress-develop' }} From 03e46a7670ff44e92957173ccd02405c33fc794b Mon Sep 17 00:00:00 2001 From: Joe McGill Date: Fri, 20 Oct 2023 19:06:46 +0000 Subject: [PATCH 43/71] Themes: Make caches for block patterns clearable. In [56765], theme block pattern files were cached to a transient as a performance enhancement. However, transients are not easily clearable when caches are flushed on environments not using a persistent cache, which can lead to errors if the theme files are renamed, edited, or moved. This changes the caching mechanism to use `wp_cache_set()` instead, and caches these values to the global group so they are still persistent on environments using an object cache, and will be cleared by a cache flush. In addition, the helper `_wp_get_block_patterns` has been moved `WP_Theme::get_block_patterns` for consistency with other block related theme methods and cache helpers for these values, `WP_Theme::get_pattern_cache` and `WP_Theme::set_pattern_cache`, have been made private. Relevant unit tests updated. Props: afercia, flixos90, mukesh27, joemcgill. Fixes #59633. See #59591, #59490. git-svn-id: https://develop.svn.wordpress.org/trunk@56978 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/block-patterns.php | 169 +----------- src/wp-includes/class-wp-theme.php | 249 +++++++++++++++--- .../tests/blocks/wpGetBlockPatterns.php | 153 ----------- .../tests/theme/wpGetGlobalStylesheet.php | 3 + .../tests/theme/wpThemeGetBlockPatterns.php | 198 ++++++++++++++ 5 files changed, 409 insertions(+), 363 deletions(-) delete mode 100644 tests/phpunit/tests/blocks/wpGetBlockPatterns.php create mode 100644 tests/phpunit/tests/theme/wpThemeGetBlockPatterns.php diff --git a/src/wp-includes/block-patterns.php b/src/wp-includes/block-patterns.php index a1a7a67d818e2..7f20d9a894029 100644 --- a/src/wp-includes/block-patterns.php +++ b/src/wp-includes/block-patterns.php @@ -341,7 +341,7 @@ function _register_theme_block_patterns() { $registry = WP_Block_Patterns_Registry::get_instance(); foreach ( $themes as $theme ) { - $patterns = _wp_get_block_patterns( $theme ); + $patterns = $theme->get_block_patterns(); $dirpath = $theme->get_stylesheet_directory() . '/patterns/'; $text_domain = $theme->get( 'TextDomain' ); @@ -387,170 +387,3 @@ function _register_theme_block_patterns() { } } add_action( 'init', '_register_theme_block_patterns' ); - -/** - * Gets block pattern data for a specified theme. - * Each pattern is defined as a PHP file and defines - * its metadata using plugin-style headers. The minimum required definition is: - * - * /** - * * Title: My Pattern - * * Slug: my-theme/my-pattern - * * - * - * The output of the PHP source corresponds to the content of the pattern, e.g.: - * - *

- * - * If applicable, this will collect from both parent and child theme. - * - * Other settable fields include: - * - * - Description - * - Viewport Width - * - Inserter (yes/no) - * - Categories (comma-separated values) - * - Keywords (comma-separated values) - * - Block Types (comma-separated values) - * - Post Types (comma-separated values) - * - Template Types (comma-separated values) - * - * @since 6.4.0 - * @access private - * - * @param WP_Theme $theme Theme object. - * @return array Block pattern data. - */ -function _wp_get_block_patterns( WP_Theme $theme ) { - $can_use_cached = ! wp_is_development_mode( 'theme' ); - - $pattern_data = $theme->get_pattern_cache(); - if ( is_array( $pattern_data ) ) { - if ( $can_use_cached ) { - return $pattern_data; - } - // If in development mode, clear pattern cache. - $theme->delete_pattern_cache(); - } - - $dirpath = $theme->get_stylesheet_directory() . '/patterns/'; - $pattern_data = array(); - - if ( ! file_exists( $dirpath ) ) { - if ( $can_use_cached ) { - $theme->set_pattern_cache( $pattern_data ); - } - return $pattern_data; - } - $files = glob( $dirpath . '*.php' ); - if ( ! $files ) { - if ( $can_use_cached ) { - $theme->set_pattern_cache( $pattern_data ); - } - return $pattern_data; - } - - $default_headers = array( - 'title' => 'Title', - 'slug' => 'Slug', - 'description' => 'Description', - 'viewportWidth' => 'Viewport Width', - 'inserter' => 'Inserter', - 'categories' => 'Categories', - 'keywords' => 'Keywords', - 'blockTypes' => 'Block Types', - 'postTypes' => 'Post Types', - 'templateTypes' => 'Template Types', - ); - - $properties_to_parse = array( - 'categories', - 'keywords', - 'blockTypes', - 'postTypes', - 'templateTypes', - ); - - foreach ( $files as $file ) { - $pattern = get_file_data( $file, $default_headers ); - - if ( empty( $pattern['slug'] ) ) { - _doing_it_wrong( - __FUNCTION__, - sprintf( - /* translators: 1: file name. */ - __( 'Could not register file "%s" as a block pattern ("Slug" field missing)' ), - $file - ), - '6.0.0' - ); - continue; - } - - if ( ! preg_match( '/^[A-z0-9\/_-]+$/', $pattern['slug'] ) ) { - _doing_it_wrong( - __FUNCTION__, - sprintf( - /* translators: 1: file name; 2: slug value found. */ - __( 'Could not register file "%1$s" as a block pattern (invalid slug "%2$s")' ), - $file, - $pattern['slug'] - ), - '6.0.0' - ); - } - - // Title is a required property. - if ( ! $pattern['title'] ) { - _doing_it_wrong( - __FUNCTION__, - sprintf( - /* translators: 1: file name. */ - __( 'Could not register file "%s" as a block pattern ("Title" field missing)' ), - $file - ), - '6.0.0' - ); - continue; - } - - // For properties of type array, parse data as comma-separated. - foreach ( $properties_to_parse as $property ) { - if ( ! empty( $pattern[ $property ] ) ) { - $pattern[ $property ] = array_filter( wp_parse_list( (string) $pattern[ $property ] ) ); - } else { - unset( $pattern[ $property ] ); - } - } - - // Parse properties of type int. - $property = 'viewportWidth'; - if ( ! empty( $pattern[ $property ] ) ) { - $pattern[ $property ] = (int) $pattern[ $property ]; - } else { - unset( $pattern[ $property ] ); - } - - // Parse properties of type bool. - $property = 'inserter'; - if ( ! empty( $pattern[ $property ] ) ) { - $pattern[ $property ] = in_array( - strtolower( $pattern[ $property ] ), - array( 'yes', 'true' ), - true - ); - } else { - unset( $pattern[ $property ] ); - } - - $key = str_replace( $dirpath, '', $file ); - - $pattern_data[ $key ] = $pattern; - } - - if ( $can_use_cached ) { - $theme->set_pattern_cache( $pattern_data ); - } - - return $pattern_data; -} diff --git a/src/wp-includes/class-wp-theme.php b/src/wp-includes/class-wp-theme.php index 84219cd9213f7..09905bee1b93f 100644 --- a/src/wp-includes/class-wp-theme.php +++ b/src/wp-includes/class-wp-theme.php @@ -844,48 +844,6 @@ public function cache_delete() { $this->delete_pattern_cache(); } - /** - * Gets block pattern cache. - * - * @since 6.4.0 - * - * @return array|false Returns an array of patterns if cache is found, otherwise false. - */ - public function get_pattern_cache() { - if ( ! $this->exists() ) { - return false; - } - $pattern_data = get_transient( 'wp_theme_patterns_' . $this->stylesheet ); - if ( is_array( $pattern_data ) && $pattern_data['version'] === $this->get( 'Version' ) ) { - return $pattern_data['patterns']; - } - return false; - } - - /** - * Sets block pattern cache. - * - * @since 6.4.0 - * - * @param array $patterns Block patterns data to set in cache. - */ - public function set_pattern_cache( array $patterns ) { - $pattern_data = array( - 'version' => $this->get( 'Version' ), - 'patterns' => $patterns, - ); - set_transient( 'wp_theme_patterns_' . $this->stylesheet, $pattern_data ); - } - - /** - * Clears block pattern cache. - * - * @since 6.4.0 - */ - public function delete_pattern_cache() { - delete_transient( 'wp_theme_patterns_' . $this->stylesheet ); - } - /** * Gets a raw, unformatted theme header. * @@ -1840,6 +1798,213 @@ public function get_block_template_folders() { return $this->block_template_folders; } + /** + * Gets block pattern data for a specified theme. + * Each pattern is defined as a PHP file and defines + * its metadata using plugin-style headers. The minimum required definition is: + * + * /** + * * Title: My Pattern + * * Slug: my-theme/my-pattern + * * + * + * The output of the PHP source corresponds to the content of the pattern, e.g.: + * + *

+ * + * If applicable, this will collect from both parent and child theme. + * + * Other settable fields include: + * + * - Description + * - Viewport Width + * - Inserter (yes/no) + * - Categories (comma-separated values) + * - Keywords (comma-separated values) + * - Block Types (comma-separated values) + * - Post Types (comma-separated values) + * - Template Types (comma-separated values) + * + * @since 6.4.0 + * + * @return array Block pattern data. + */ + public function get_block_patterns() { + $can_use_cached = ! wp_is_development_mode( 'theme' ); + + $pattern_data = $this->get_pattern_cache(); + if ( is_array( $pattern_data ) ) { + if ( $can_use_cached ) { + return $pattern_data; + } + // If in development mode, clear pattern cache. + $this->delete_pattern_cache(); + } + + $dirpath = $this->get_stylesheet_directory() . '/patterns/'; + $pattern_data = array(); + + if ( ! file_exists( $dirpath ) ) { + if ( $can_use_cached ) { + $this->set_pattern_cache( $pattern_data ); + } + return $pattern_data; + } + $files = glob( $dirpath . '*.php' ); + if ( ! $files ) { + if ( $can_use_cached ) { + $this->set_pattern_cache( $pattern_data ); + } + return $pattern_data; + } + + $default_headers = array( + 'title' => 'Title', + 'slug' => 'Slug', + 'description' => 'Description', + 'viewportWidth' => 'Viewport Width', + 'inserter' => 'Inserter', + 'categories' => 'Categories', + 'keywords' => 'Keywords', + 'blockTypes' => 'Block Types', + 'postTypes' => 'Post Types', + 'templateTypes' => 'Template Types', + ); + + $properties_to_parse = array( + 'categories', + 'keywords', + 'blockTypes', + 'postTypes', + 'templateTypes', + ); + + foreach ( $files as $file ) { + $pattern = get_file_data( $file, $default_headers ); + + if ( empty( $pattern['slug'] ) ) { + _doing_it_wrong( + __FUNCTION__, + sprintf( + /* translators: 1: file name. */ + __( 'Could not register file "%s" as a block pattern ("Slug" field missing)' ), + $file + ), + '6.0.0' + ); + continue; + } + + if ( ! preg_match( '/^[A-z0-9\/_-]+$/', $pattern['slug'] ) ) { + _doing_it_wrong( + __FUNCTION__, + sprintf( + /* translators: 1: file name; 2: slug value found. */ + __( 'Could not register file "%1$s" as a block pattern (invalid slug "%2$s")' ), + $file, + $pattern['slug'] + ), + '6.0.0' + ); + } + + // Title is a required property. + if ( ! $pattern['title'] ) { + _doing_it_wrong( + __FUNCTION__, + sprintf( + /* translators: 1: file name. */ + __( 'Could not register file "%s" as a block pattern ("Title" field missing)' ), + $file + ), + '6.0.0' + ); + continue; + } + + // For properties of type array, parse data as comma-separated. + foreach ( $properties_to_parse as $property ) { + if ( ! empty( $pattern[ $property ] ) ) { + $pattern[ $property ] = array_filter( wp_parse_list( (string) $pattern[ $property ] ) ); + } else { + unset( $pattern[ $property ] ); + } + } + + // Parse properties of type int. + $property = 'viewportWidth'; + if ( ! empty( $pattern[ $property ] ) ) { + $pattern[ $property ] = (int) $pattern[ $property ]; + } else { + unset( $pattern[ $property ] ); + } + + // Parse properties of type bool. + $property = 'inserter'; + if ( ! empty( $pattern[ $property ] ) ) { + $pattern[ $property ] = in_array( + strtolower( $pattern[ $property ] ), + array( 'yes', 'true' ), + true + ); + } else { + unset( $pattern[ $property ] ); + } + + $key = str_replace( $dirpath, '', $file ); + + $pattern_data[ $key ] = $pattern; + } + + if ( $can_use_cached ) { + $this->set_pattern_cache( $pattern_data ); + } + + return $pattern_data; + } + + /** + * Gets block pattern cache. + * + * @since 6.4.0 + * + * @return array|false Returns an array of patterns if cache is found, otherwise false. + */ + private function get_pattern_cache() { + if ( ! $this->exists() ) { + return false; + } + $pattern_data = wp_cache_get( 'wp_theme_patterns_' . $this->stylesheet ); + if ( is_array( $pattern_data ) && $pattern_data['version'] === $this->get( 'Version' ) ) { + return $pattern_data['patterns']; + } + return false; + } + + /** + * Sets block pattern cache. + * + * @since 6.4.0 + * + * @param array $patterns Block patterns data to set in cache. + */ + private function set_pattern_cache( array $patterns ) { + $pattern_data = array( + 'version' => $this->get( 'Version' ), + 'patterns' => $patterns, + ); + wp_cache_set( 'wp_theme_patterns_' . $this->stylesheet, $pattern_data ); + } + + /** + * Clears block pattern cache. + * + * @since 6.4.0 + */ + public function delete_pattern_cache() { + wp_cache_delete( 'wp_theme_patterns_' . $this->stylesheet ); + } + /** * Enables a theme for all sites on the current network. * diff --git a/tests/phpunit/tests/blocks/wpGetBlockPatterns.php b/tests/phpunit/tests/blocks/wpGetBlockPatterns.php deleted file mode 100644 index 4e7f67612bb92..0000000000000 --- a/tests/phpunit/tests/blocks/wpGetBlockPatterns.php +++ /dev/null @@ -1,153 +0,0 @@ -assertSameSets( $expected, $patterns ); - } - - /** - * @ticket 59490 - */ - public function test_delete_theme_cache() { - $theme = wp_get_theme( 'block-theme-patterns' ); - _wp_get_block_patterns( $theme ); - $this->assertSameSets( - array( - 'cta.php' => array( - 'title' => 'Centered Call To Action', - 'slug' => 'block-theme-patterns/cta', - 'description' => '', - 'categories' => array( 'call-to-action' ), - ), - ), - $theme->get_pattern_cache(), - 'The transient for block theme patterns should be set' - ); - $theme->delete_pattern_cache(); - $this->assertFalse( - $theme->get_pattern_cache(), - 'The transient for block theme patterns should have been cleared' - ); - } - - /** - * @ticket 59490 - */ - public function test_should_clear_transient_after_switching_theme() { - switch_theme( 'block-theme' ); - $theme1 = wp_get_theme(); - _wp_get_block_patterns( $theme1 ); - $this->assertSameSets( - array(), - $theme1->get_pattern_cache(), - 'The transient for block theme should be set' - ); - switch_theme( 'block-theme-patterns' ); - $this->assertFalse( $theme1->get_pattern_cache(), 'Transient should not be set for block theme after switch theme' ); - $theme2 = wp_get_theme(); - $this->assertFalse( $theme2->get_pattern_cache(), 'Transient should not be set for block theme patterns before being requested' ); - _wp_get_block_patterns( $theme2 ); - $this->assertSameSets( - array( - 'cta.php' => array( - 'title' => 'Centered Call To Action', - 'slug' => 'block-theme-patterns/cta', - 'description' => '', - 'categories' => array( 'call-to-action' ), - ), - - ), - $theme2->get_pattern_cache(), - 'The transient for block theme patterns should be set' - ); - } - - /** - * Data provider. - * - * @return array[] - */ - public function data_wp_get_block_patterns() { - return array( - array( - 'theme' => 'block-theme', - 'patterns' => array(), - ), - array( - 'theme' => 'block-theme-child', - 'patterns' => array(), - ), - array( - 'theme' => 'block-theme-patterns', - 'patterns' => array( - 'cta.php' => array( - 'title' => 'Centered Call To Action', - 'slug' => 'block-theme-patterns/cta', - 'description' => '', - 'categories' => array( 'call-to-action' ), - ), - ), - ), - array( - 'theme' => 'broken-theme', - 'patterns' => array(), - ), - array( - 'theme' => 'invalid', - 'patterns' => array(), - ), - ); - } - - /** - * Tests that _wp_get_block_patterns() clears existing transient when in theme development mode. - * - * @ticket 59591 - */ - public function test_should_clear_existing_transient_when_in_development_mode() { - $theme = wp_get_theme( 'block-theme-patterns' ); - - // Calling the function should set the cache. - _wp_get_block_patterns( $theme ); - $this->assertSameSets( - array( - 'cta.php' => array( - 'title' => 'Centered Call To Action', - 'slug' => 'block-theme-patterns/cta', - 'description' => '', - 'categories' => array( 'call-to-action' ), - ), - ), - $theme->get_pattern_cache(), - 'The transient for block theme patterns should be set' - ); - - // Calling the function while in theme development mode should clear the cache. - $GLOBALS['_wp_tests_development_mode'] = 'theme'; - _wp_get_block_patterns( $theme ); - unset( $GLOBALS['_wp_tests_development_mode'] ); // Reset to not pollute other tests. - $this->assertFalse( - $theme->get_pattern_cache(), - 'The transient for block theme patterns should have been cleared due to theme development mode' - ); - } -} diff --git a/tests/phpunit/tests/theme/wpGetGlobalStylesheet.php b/tests/phpunit/tests/theme/wpGetGlobalStylesheet.php index 40d87940b4f35..3035467a0161a 100644 --- a/tests/phpunit/tests/theme/wpGetGlobalStylesheet.php +++ b/tests/phpunit/tests/theme/wpGetGlobalStylesheet.php @@ -26,6 +26,9 @@ class Tests_Theme_WpGetGlobalStylesheet extends WP_Theme_UnitTestCase { private $switch_to_default_theme_at_teardown = false; public function tear_down() { + // Reset development mode after each test. + unset( $GLOBALS['_wp_tests_development_mode'] ); + // Reset the theme support. if ( $this->remove_theme_support_at_teardown ) { $this->remove_theme_support_at_teardown = false; diff --git a/tests/phpunit/tests/theme/wpThemeGetBlockPatterns.php b/tests/phpunit/tests/theme/wpThemeGetBlockPatterns.php new file mode 100644 index 0000000000000..caaf189a16a04 --- /dev/null +++ b/tests/phpunit/tests/theme/wpThemeGetBlockPatterns.php @@ -0,0 +1,198 @@ +setAccessible( true ); + + $pattern_cache = $reflection->invoke( $wp_theme, 'get_pattern_cache' ); + $reflection->setAccessible( false ); + + return $pattern_cache; + } + + /** + * @ticket 59490 + * + * @dataProvider data_get_block_patterns + * + * @param string $theme_slug The theme's slug. + * @param array $expected The expected pattern data. + */ + public function test_should_return_block_patterns( $theme_slug, $expected ) { + $theme = wp_get_theme( $theme_slug ); + $patterns = $theme->get_block_patterns(); + $this->assertSameSets( $expected, $patterns ); + } + + /** + * @ticket 59490 + * + * @covers WP_Theme::delete_pattern_cache + */ + public function test_delete_pattern_cache() { + $theme = wp_get_theme( 'block-theme-patterns' ); + + $this->assertTrue( $theme->exists(), 'The test theme could not be found.' ); + + $theme->get_block_patterns(); + + $this->assertSameSets( + array( + 'cta.php' => array( + 'title' => 'Centered Call To Action', + 'slug' => 'block-theme-patterns/cta', + 'description' => '', + 'categories' => array( 'call-to-action' ), + ), + ), + $this->get_pattern_cache( $theme ), + 'The cache for block theme patterns should match the expected.' + ); + $theme->delete_pattern_cache(); + $this->assertFalse( + $this->get_pattern_cache( $theme ), + 'The cache for block theme patterns should have been cleared.' + ); + } + + /** + * @ticket 59490 + */ + public function test_should_clear_cache_after_switching_theme() { + switch_theme( 'block-theme' ); + $theme1 = wp_get_theme(); + + $this->assertTrue( $theme1->exists(), 'The block-theme test theme could not be found.' ); + + $theme1->get_block_patterns(); + $this->assertSameSets( + array(), + $this->get_pattern_cache( $theme1 ), + 'The cache for block theme should be empty.' + ); + + switch_theme( 'block-theme-patterns' ); + + $theme2 = wp_get_theme(); + $this->assertTrue( $theme2->exists(), 'The block-theme-patterns test theme could not be found.' ); + + $this->assertFalse( $this->get_pattern_cache( $theme1 ), 'Cache should not be set for block theme after switch theme.' ); + $this->assertFalse( $this->get_pattern_cache( $theme2 ), 'Cache should not be set for block theme patterns before being requested.' ); + + $theme2->get_block_patterns( $theme2 ); + $this->assertSameSets( + array( + 'cta.php' => array( + 'title' => 'Centered Call To Action', + 'slug' => 'block-theme-patterns/cta', + 'description' => '', + 'categories' => array( 'call-to-action' ), + ), + + ), + $this->get_pattern_cache( $theme2 ), + 'The cache for block theme patterns should match the expected.' + ); + } + + /** + * Data provider. + * + * @return array[] + */ + public function data_get_block_patterns() { + return array( + array( + 'theme' => 'block-theme', + 'patterns' => array(), + ), + array( + 'theme' => 'block-theme-child', + 'patterns' => array(), + ), + array( + 'theme' => 'block-theme-patterns', + 'patterns' => array( + 'cta.php' => array( + 'title' => 'Centered Call To Action', + 'slug' => 'block-theme-patterns/cta', + 'description' => '', + 'categories' => array( 'call-to-action' ), + ), + ), + ), + array( + 'theme' => 'broken-theme', + 'patterns' => array(), + ), + array( + 'theme' => 'invalid', + 'patterns' => array(), + ), + ); + } + + /** + * Tests that WP_Theme::get_block_patterns() clears existing cache when in theme development mode. + * + * @ticket 59591 + */ + public function test_should_clear_existing_cache_when_in_development_mode() { + $theme = wp_get_theme( 'block-theme-patterns' ); + + $this->assertTrue( $theme->exists(), 'The test theme could not be found.' ); + + // Calling the function should set the cache. + $theme->get_block_patterns(); + $this->assertSameSets( + array( + 'cta.php' => array( + 'title' => 'Centered Call To Action', + 'slug' => 'block-theme-patterns/cta', + 'description' => '', + 'categories' => array( 'call-to-action' ), + ), + ), + $this->get_pattern_cache( $theme ), + 'The cache for block theme patterns should be set.' + ); + + // Calling the function while in theme development mode should clear the cache. + $GLOBALS['_wp_tests_development_mode'] = 'theme'; + $theme->get_block_patterns( $theme ); + unset( $GLOBALS['_wp_tests_development_mode'] ); // Reset to not pollute other tests. + $this->assertFalse( + $this->get_pattern_cache( $theme ), + 'The cache for block theme patterns should have been cleared due to theme development mode.' + ); + } +} From 67476285c26f1d9a2488ca73e13df51d0323a17a Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Sat, 21 Oct 2023 08:37:00 +0000 Subject: [PATCH 44/71] Build/Test Tools: Remove now obsolete `jest-image-snapshot` dependency. With the migration of visual regression tests to Playwright in [56926], this package is no longer needed and can be safely removed. See #59517. git-svn-id: https://develop.svn.wordpress.org/trunk@56980 602fd350-edb4-49c9-b593-d223f7449a82 --- package-lock.json | 257 ---------------------------------------------- package.json | 1 - 2 files changed, 258 deletions(-) diff --git a/package-lock.json b/package-lock.json index a925ec5736053..e65dfe10e5558 100644 --- a/package-lock.json +++ b/package-lock.json @@ -141,7 +141,6 @@ "grunt-webpack": "6.0.0", "ink-docstrap": "1.3.2", "install-changed": "1.1.0", - "jest-image-snapshot": "^6.2.0", "matchdep": "~2.0.0", "postcss": "8.4.31", "prettier": "npm:wp-prettier@2.6.2", @@ -16475,15 +16474,6 @@ "resolved": "https://registry.npmjs.org/get-size/-/get-size-2.0.3.tgz", "integrity": "sha512-lXNzT/h/dTjTxRbm9BXb+SGxxzkm97h/PCIKtlN/CBCxxmkkIVV21udumMS93MuVTDX583gqc94v3RjuHmI+2Q==" }, - "node_modules/get-stdin": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-5.0.1.tgz", - "integrity": "sha1-Ei4WFZHiH/TFJTAwVpPyDmOTo5g=", - "dev": true, - "engines": { - "node": ">=0.12.0" - } - }, "node_modules/get-stream": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", @@ -16777,12 +16767,6 @@ "node": "*" } }, - "node_modules/glur": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/glur/-/glur-1.1.2.tgz", - "integrity": "sha1-8g6jbbEDv8KSNDkh8fkeg8NGdok=", - "dev": true - }, "node_modules/good-listener": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/good-listener/-/good-listener-1.2.2.tgz", @@ -21089,103 +21073,6 @@ "node": ">=8.0" } }, - "node_modules/jest-image-snapshot": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/jest-image-snapshot/-/jest-image-snapshot-6.2.0.tgz", - "integrity": "sha512-9mTHBKiiSIZ26csbLmjKyN+SrVypM93S5y+jULCvn6YItgepvcrJIKGNeSyt9d2EZiutOroLs/UjtrWiBzpHbA==", - "dev": true, - "dependencies": { - "chalk": "^4.0.0", - "get-stdin": "^5.0.1", - "glur": "^1.1.2", - "lodash": "^4.17.4", - "pixelmatch": "^5.1.0", - "pngjs": "^3.4.0", - "rimraf": "^2.6.2", - "ssim.js": "^3.1.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "jest": ">=20 <=29" - }, - "peerDependenciesMeta": { - "jest": { - "optional": true - } - } - }, - "node_modules/jest-image-snapshot/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-image-snapshot/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/jest-image-snapshot/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/jest-image-snapshot/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/jest-image-snapshot/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-image-snapshot/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/jest-leak-detector": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz", @@ -26568,27 +26455,6 @@ "node": ">= 6" } }, - "node_modules/pixelmatch": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/pixelmatch/-/pixelmatch-5.2.1.tgz", - "integrity": "sha512-WjcAdYSnKrrdDdqTcVEY7aB7UhhwjYQKYhHiBXdJef0MOaQeYpUdQ+iVyBLa5YBKS8MPVPPMX7rpOByISLpeEQ==", - "dev": true, - "dependencies": { - "pngjs": "^4.0.1" - }, - "bin": { - "pixelmatch": "bin/pixelmatch" - } - }, - "node_modules/pixelmatch/node_modules/pngjs": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pngjs/-/pngjs-4.0.1.tgz", - "integrity": "sha512-rf5+2/ioHeQxR6IxuYNYGFytUyG3lma/WW1nsmjeHlWwtb2aByla6dkVc8pmJ9nplzkTA0q2xx7mMWrOTqT4Gg==", - "dev": true, - "engines": { - "node": ">=8.0.0" - } - }, "node_modules/pkg-dir": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", @@ -26674,15 +26540,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/pngjs": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/pngjs/-/pngjs-3.4.0.tgz", - "integrity": "sha512-NCrCHhWmnQklfH4MtJMRjZ2a8c80qXeMlQMv2uVp9ISJMTt562SbGd6n2oq0PaPgKm7Z6pL9E2UlLIhC+SHL3w==", - "dev": true, - "engines": { - "node": ">=4.0.0" - } - }, "node_modules/polyfill-library": { "version": "4.8.0", "resolved": "https://registry.npmjs.org/polyfill-library/-/polyfill-library-4.8.0.tgz", @@ -30619,12 +30476,6 @@ "node": ">=0.10.0" } }, - "node_modules/ssim.js": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/ssim.js/-/ssim.js-3.5.0.tgz", - "integrity": "sha512-Aj6Jl2z6oDmgYFFbQqK7fght19bXdOxY7Tj03nF+03M9gCBAjeIiO8/PlEGMfKDwYpw4q6iBqVq2YuREorGg/g==", - "dev": true - }, "node_modules/stable": { "version": "0.1.8", "resolved": "https://registry.npmjs.org/stable/-/stable-0.1.8.tgz", @@ -46369,12 +46220,6 @@ "resolved": "https://registry.npmjs.org/get-size/-/get-size-2.0.3.tgz", "integrity": "sha512-lXNzT/h/dTjTxRbm9BXb+SGxxzkm97h/PCIKtlN/CBCxxmkkIVV21udumMS93MuVTDX583gqc94v3RjuHmI+2Q==" }, - "get-stdin": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-5.0.1.tgz", - "integrity": "sha1-Ei4WFZHiH/TFJTAwVpPyDmOTo5g=", - "dev": true - }, "get-stream": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", @@ -46603,12 +46448,6 @@ } } }, - "glur": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/glur/-/glur-1.1.2.tgz", - "integrity": "sha1-8g6jbbEDv8KSNDkh8fkeg8NGdok=", - "dev": true - }, "good-listener": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/good-listener/-/good-listener-1.2.2.tgz", @@ -49803,73 +49642,6 @@ } } }, - "jest-image-snapshot": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/jest-image-snapshot/-/jest-image-snapshot-6.2.0.tgz", - "integrity": "sha512-9mTHBKiiSIZ26csbLmjKyN+SrVypM93S5y+jULCvn6YItgepvcrJIKGNeSyt9d2EZiutOroLs/UjtrWiBzpHbA==", - "dev": true, - "requires": { - "chalk": "^4.0.0", - "get-stdin": "^5.0.1", - "glur": "^1.1.2", - "lodash": "^4.17.4", - "pixelmatch": "^5.1.0", - "pngjs": "^3.4.0", - "rimraf": "^2.6.2", - "ssim.js": "^3.1.1" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, "jest-leak-detector": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz", @@ -53996,23 +53768,6 @@ "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==", "dev": true }, - "pixelmatch": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/pixelmatch/-/pixelmatch-5.2.1.tgz", - "integrity": "sha512-WjcAdYSnKrrdDdqTcVEY7aB7UhhwjYQKYhHiBXdJef0MOaQeYpUdQ+iVyBLa5YBKS8MPVPPMX7rpOByISLpeEQ==", - "dev": true, - "requires": { - "pngjs": "^4.0.1" - }, - "dependencies": { - "pngjs": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pngjs/-/pngjs-4.0.1.tgz", - "integrity": "sha512-rf5+2/ioHeQxR6IxuYNYGFytUyG3lma/WW1nsmjeHlWwtb2aByla6dkVc8pmJ9nplzkTA0q2xx7mMWrOTqT4Gg==", - "dev": true - } - } - }, "pkg-dir": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", @@ -54073,12 +53828,6 @@ "irregular-plurals": "^3.2.0" } }, - "pngjs": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/pngjs/-/pngjs-3.4.0.tgz", - "integrity": "sha512-NCrCHhWmnQklfH4MtJMRjZ2a8c80qXeMlQMv2uVp9ISJMTt562SbGd6n2oq0PaPgKm7Z6pL9E2UlLIhC+SHL3w==", - "dev": true - }, "polyfill-library": { "version": "4.8.0", "resolved": "https://registry.npmjs.org/polyfill-library/-/polyfill-library-4.8.0.tgz", @@ -56950,12 +56699,6 @@ "tweetnacl": "~0.14.0" } }, - "ssim.js": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/ssim.js/-/ssim.js-3.5.0.tgz", - "integrity": "sha512-Aj6Jl2z6oDmgYFFbQqK7fght19bXdOxY7Tj03nF+03M9gCBAjeIiO8/PlEGMfKDwYpw4q6iBqVq2YuREorGg/g==", - "dev": true - }, "stable": { "version": "0.1.8", "resolved": "https://registry.npmjs.org/stable/-/stable-0.1.8.tgz", diff --git a/package.json b/package.json index b3046416f4307..801983701df01 100644 --- a/package.json +++ b/package.json @@ -60,7 +60,6 @@ "grunt-webpack": "6.0.0", "ink-docstrap": "1.3.2", "install-changed": "1.1.0", - "jest-image-snapshot": "^6.2.0", "matchdep": "~2.0.0", "postcss": "8.4.31", "prettier": "npm:wp-prettier@2.6.2", From 33cb0d24dc6f656f5395e0a6566182442cf1f640 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sat, 21 Oct 2023 10:19:55 +0000 Subject: [PATCH 45/71] Tests: Correct test class name for `WP_Duotone` unit tests. Follow-up to [56101]. Props cbravobernal. Fixes #59696. git-svn-id: https://develop.svn.wordpress.org/trunk@56981 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/block-supports/duotone.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/phpunit/tests/block-supports/duotone.php b/tests/phpunit/tests/block-supports/duotone.php index 1a949ad24a530..9ec3c709580b3 100644 --- a/tests/phpunit/tests/block-supports/duotone.php +++ b/tests/phpunit/tests/block-supports/duotone.php @@ -8,7 +8,7 @@ * @package WordPress */ -class Tests_Block_Supports_DuoTones extends WP_UnitTestCase { +class Tests_Block_Supports_Duotone extends WP_UnitTestCase { /** * Cleans up CSS added to block-supports from duotone styles. We neeed to do this * in order to avoid impacting other tests. From f597832f53924dc31eebbe51957f7179ce578637 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 22 Oct 2023 09:03:12 +0000 Subject: [PATCH 46/71] General: Bump the recommended MySQL version in `readme.html`. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit MySQL 5.7 reaches EOL (“End of Life”) in October 2023. The recommended minimum is bumped to 8.0 for now. References: * [https://www.mysql.com/support/ MySQL Support Policies] * [https://make.wordpress.org/hosting/handbook/server-environment/#database Hosting team handbook: Server Environment: Database] Follow-up to [31291], [33946], [35759], [52420], [52421], [54069]. Props swissspidy, SergeyBiryukov. See #59701. git-svn-id: https://develop.svn.wordpress.org/trunk@56982 602fd350-edb4-49c9-b593-d223f7449a82 --- src/readme.html | 2 +- src/wp-admin/includes/class-wp-site-health.php | 2 +- tests/phpunit/tests/readme.php | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/readme.html b/src/readme.html index a40c5e98a95bd..4c76fd4c17eb4 100644 --- a/src/readme.html +++ b/src/readme.html @@ -58,7 +58,7 @@

System Requirements

Recommendations

  • PHP version 7.4 or greater.
  • -
  • MySQL version 5.7 or greater OR MariaDB version 10.4 or greater.
  • +
  • MySQL version 8.0 or greater OR MariaDB version 10.4 or greater.
  • The mod_rewrite Apache module.
  • HTTPS support.
  • A link to wordpress.org on your site.
  • diff --git a/src/wp-admin/includes/class-wp-site-health.php b/src/wp-admin/includes/class-wp-site-health.php index b73e1e78a0910..39b4d0ad56880 100644 --- a/src/wp-admin/includes/class-wp-site-health.php +++ b/src/wp-admin/includes/class-wp-site-health.php @@ -17,7 +17,7 @@ class WP_Site_Health { public $is_mariadb = false; private $mysql_server_version = ''; private $mysql_required_version = '5.5'; - private $mysql_recommended_version = '5.7'; + private $mysql_recommended_version = '8.0'; private $mariadb_recommended_version = '10.4'; public $php_memory_limit; diff --git a/tests/phpunit/tests/readme.php b/tests/phpunit/tests/readme.php index f0068d821e320..7ec762b665345 100644 --- a/tests/phpunit/tests/readme.php +++ b/tests/phpunit/tests/readme.php @@ -48,11 +48,11 @@ public function test_readme_mysql_version() { /* * Per https://www.mysql.com/support/, Oracle actively supports MySQL releases for 5 years from GA release. * - * The currently recommended MySQL 5.7 branch moved from active support to extended support on 2020-10-21. - * As WordPress core is not fully compatible with MySQL 8.0 at this time, the "supported" period here + * The currently recommended MySQL 8.0 branch moved from active support to extended support on 2023-04-19. + * As WordPress core may not be fully compatible with MySQL 8.1 at this time, the "supported" period here * is increased to 8 years to include extended support. * - * TODO: Reduce this back to 5 years once MySQL 8.0 compatibility is achieved. + * TODO: Reduce this back to 5 years once MySQL 8.1 compatibility is achieved. */ $mysql_eol = gmdate( 'Y-m-d', strtotime( $mysql_matches[1] . ' +8 years' ) ); $current_date = gmdate( 'Y-m-d' ); From 482843ae0e51e40335af03ab7625309396240ad3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Greg=20Zi=C3=83=C2=B3=C3=85=E2=80=9Akowski?= Date: Mon, 23 Oct 2023 05:36:50 +0000 Subject: [PATCH 47/71] Tests: Improve code coverage for _build_block_template_result_from_file Props costdev, bernhard-reiter. See #54335, #59325. Follow-up for [56562]. git-svn-id: https://develop.svn.wordpress.org/trunk@56983 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/block-template-utils.php | 133 ------------- .../buildBlockTemplateResultFromFile.php | 181 ++++++++++++++++++ .../buildBlockTemplateResultFromPost.php | 52 +++++ 3 files changed, 233 insertions(+), 133 deletions(-) create mode 100644 tests/phpunit/tests/block-templates/buildBlockTemplateResultFromFile.php create mode 100644 tests/phpunit/tests/block-templates/buildBlockTemplateResultFromPost.php diff --git a/tests/phpunit/tests/block-template-utils.php b/tests/phpunit/tests/block-template-utils.php index b06e931529f1e..5aa0b65929c47 100644 --- a/tests/phpunit/tests/block-template-utils.php +++ b/tests/phpunit/tests/block-template-utils.php @@ -86,139 +86,6 @@ public function set_up() { switch_theme( self::TEST_THEME ); } - public function test_build_block_template_result_from_post() { - $template = _build_block_template_result_from_post( - self::$template_post, - 'wp_template' - ); - - $this->assertNotWPError( $template ); - $this->assertSame( get_stylesheet() . '//my_template', $template->id ); - $this->assertSame( get_stylesheet(), $template->theme ); - $this->assertSame( 'my_template', $template->slug ); - $this->assertSame( 'publish', $template->status ); - $this->assertSame( 'custom', $template->source ); - $this->assertSame( 'My Template', $template->title ); - $this->assertSame( 'Description of my template', $template->description ); - $this->assertSame( 'wp_template', $template->type ); - $this->assertSame( self::$template_post->post_modified, $template->modified, 'Template result properties match' ); - - // Test template parts. - $template_part = _build_block_template_result_from_post( - self::$template_part_post, - 'wp_template_part' - ); - $this->assertNotWPError( $template_part ); - $this->assertSame( get_stylesheet() . '//my_template_part', $template_part->id ); - $this->assertSame( get_stylesheet(), $template_part->theme ); - $this->assertSame( 'my_template_part', $template_part->slug ); - $this->assertSame( 'publish', $template_part->status ); - $this->assertSame( 'custom', $template_part->source ); - $this->assertSame( 'My Template Part', $template_part->title ); - $this->assertSame( 'Description of my template part', $template_part->description ); - $this->assertSame( 'wp_template_part', $template_part->type ); - $this->assertSame( WP_TEMPLATE_PART_AREA_HEADER, $template_part->area ); - $this->assertSame( self::$template_part_post->post_modified, $template_part->modified, 'Template part result properties match' ); - } - - public function test_build_block_template_result_from_file() { - $template = _build_block_template_result_from_file( - array( - 'slug' => 'single', - 'path' => __DIR__ . '/../data/templates/template.html', - ), - 'wp_template' - ); - - $this->assertSame( get_stylesheet() . '//single', $template->id ); - $this->assertSame( get_stylesheet(), $template->theme ); - $this->assertSame( 'single', $template->slug ); - $this->assertSame( 'publish', $template->status ); - $this->assertSame( 'theme', $template->source ); - $this->assertSame( 'Single Posts', $template->title ); - $this->assertSame( 'Displays single posts on your website unless a custom template has been applied to that post or a dedicated template exists.', $template->description ); - $this->assertSame( 'wp_template', $template->type ); - $this->assertEmpty( $template->modified ); - - // Test template parts. - $template_part = _build_block_template_result_from_file( - array( - 'slug' => 'header', - 'path' => __DIR__ . '/../data/templates/template.html', - 'area' => WP_TEMPLATE_PART_AREA_HEADER, - ), - 'wp_template_part' - ); - $this->assertSame( get_stylesheet() . '//header', $template_part->id ); - $this->assertSame( get_stylesheet(), $template_part->theme ); - $this->assertSame( 'header', $template_part->slug ); - $this->assertSame( 'publish', $template_part->status ); - $this->assertSame( 'theme', $template_part->source ); - $this->assertSame( 'header', $template_part->title ); - $this->assertSame( '', $template_part->description ); - $this->assertSame( 'wp_template_part', $template_part->type ); - $this->assertSame( WP_TEMPLATE_PART_AREA_HEADER, $template_part->area ); - $this->assertEmpty( $template_part->modified ); - } - - /** - * @ticket 59325 - * - * @covers ::_build_block_template_result_from_file - * - * @dataProvider data_build_block_template_result_from_file_injects_theme_attribute - * - * @param string $filename The template's filename. - * @param string $expected The expected block markup. - */ - public function test_build_block_template_result_from_file_injects_theme_attribute( $filename, $expected ) { - $template = _build_block_template_result_from_file( - array( - 'slug' => 'single', - 'path' => DIR_TESTDATA . "/templates/$filename", - ), - 'wp_template' - ); - $this->assertSame( $expected, $template->content ); - } - - /** - * Data provider. - * - * @return array[] - */ - public function data_build_block_template_result_from_file_injects_theme_attribute() { - $theme = 'block-theme'; - return array( - 'a template with a template part block' => array( - 'filename' => 'template-with-template-part.html', - 'expected' => sprintf( - '', - $theme - ), - ), - 'a template with a template part block nested inside another block' => array( - 'filename' => 'template-with-nested-template-part.html', - 'expected' => sprintf( - ' - -', - $theme - ), - ), - 'a template with a template part block with an existing theme attribute' => array( - 'filename' => 'template-with-template-part-with-existing-theme-attribute.html', - 'expected' => '', - ), - 'a template with no template part block' => array( - 'filename' => 'template.html', - 'expected' => ' -

    Just a paragraph

    -', - ), - ); - } - /** * @ticket 59338 * diff --git a/tests/phpunit/tests/block-templates/buildBlockTemplateResultFromFile.php b/tests/phpunit/tests/block-templates/buildBlockTemplateResultFromFile.php new file mode 100644 index 0000000000000..efc93d6ac3688 --- /dev/null +++ b/tests/phpunit/tests/block-templates/buildBlockTemplateResultFromFile.php @@ -0,0 +1,181 @@ + 'single', + 'path' => DIR_TESTDATA . '/templates/template.html', + ), + 'wp_template' + ); + + $this->assertSame( get_stylesheet() . '//single', $template->id ); + $this->assertSame( get_stylesheet(), $template->theme ); + $this->assertSame( 'single', $template->slug ); + $this->assertSame( 'publish', $template->status ); + $this->assertSame( 'theme', $template->source ); + $this->assertSame( 'Single Posts', $template->title ); + $this->assertSame( 'Displays single posts on your website unless a custom template has been applied to that post or a dedicated template exists.', $template->description ); + $this->assertSame( 'wp_template', $template->type ); + $this->assertEmpty( $template->modified ); + } + + /** + * @ticket 59325 + */ + public function test_should_build_template_using_custom_properties() { + $template = _build_block_template_result_from_file( + array( + 'slug' => 'custom', + 'title' => 'Custom Title', + 'path' => DIR_TESTDATA . '/templates/template.html', + ), + 'wp_template' + ); + + $this->assertSame( 'custom', $template->slug ); + $this->assertSame( 'Custom Title', $template->title ); + $this->assertTrue( $template->is_custom ); + } + + /** + * @ticket 59325 + */ + public function test_should_enforce_default_properties_when_building_template() { + $template = _build_block_template_result_from_file( + array( + 'slug' => 'single', + 'title' => 'Custom title', + 'path' => DIR_TESTDATA . '/templates/template.html', + ), + 'wp_template' + ); + + $this->assertSame( 'single', $template->slug ); + $this->assertSame( 'Single Posts', $template->title ); + $this->assertSame( 'Displays single posts on your website unless a custom template has been applied to that post or a dedicated template exists.', $template->description ); + $this->assertFalse( $template->is_custom ); + } + + /** + * @ticket 59325 + */ + public function test_should_respect_post_types_property_when_building_template() { + $template = _build_block_template_result_from_file( + array( + 'slug' => 'single', + 'postTypes' => array( 'post' ), + 'path' => DIR_TESTDATA . '/templates/template.html', + ), + 'wp_template' + ); + + $this->assertSameSets( array( 'post' ), $template->post_types ); + } + + /** + * @ticket 59325 + * + * @dataProvider data_build_template_injects_theme_attribute + * + * @param string $filename The template's filename. + * @param string $expected The expected block markup. + */ + public function test_should_build_template_and_inject_theme_attribute( $filename, $expected ) { + $template = _build_block_template_result_from_file( + array( + 'slug' => 'single', + 'path' => DIR_TESTDATA . "/templates/$filename", + ), + 'wp_template' + ); + $this->assertSame( $expected, $template->content ); + } + + /** + * Data provider. + * + * @return array[] + */ + public function data_build_template_injects_theme_attribute() { + return array( + 'a template with a template part block' => array( + 'filename' => 'template-with-template-part.html', + 'expected' => sprintf( + '', + self::TEST_THEME + ), + ), + 'a template with a template part block nested inside another block' => array( + 'filename' => 'template-with-nested-template-part.html', + 'expected' => sprintf( + ' + +', + self::TEST_THEME + ), + ), + 'a template with a template part block with an existing theme attribute' => array( + 'filename' => 'template-with-template-part-with-existing-theme-attribute.html', + 'expected' => '', + ), + 'a template with no template part block' => array( + 'filename' => 'template.html', + 'expected' => ' +

    Just a paragraph

    +', + ), + ); + } + + /** + * @ticket 54335 + */ + public function test_should_build_template_part() { + $template_part = _build_block_template_result_from_file( + array( + 'slug' => 'header', + 'path' => DIR_TESTDATA . '/templates/template.html', + 'area' => WP_TEMPLATE_PART_AREA_HEADER, + ), + 'wp_template_part' + ); + $this->assertSame( get_stylesheet() . '//header', $template_part->id ); + $this->assertSame( get_stylesheet(), $template_part->theme ); + $this->assertSame( 'header', $template_part->slug ); + $this->assertSame( 'publish', $template_part->status ); + $this->assertSame( 'theme', $template_part->source ); + $this->assertSame( 'header', $template_part->title ); + $this->assertSame( '', $template_part->description ); + $this->assertSame( 'wp_template_part', $template_part->type ); + $this->assertSame( WP_TEMPLATE_PART_AREA_HEADER, $template_part->area ); + $this->assertEmpty( $template_part->modified ); + } + + /** + * @ticket 59325 + */ + public function test_should_ignore_post_types_property_when_building_template_part() { + $template = _build_block_template_result_from_file( + array( + 'slug' => 'header', + 'postTypes' => array( 'post' ), + 'path' => DIR_TESTDATA . '/templates/template.html', + ), + 'wp_template_part' + ); + + $this->assertEmpty( $template->post_types ); + } +} diff --git a/tests/phpunit/tests/block-templates/buildBlockTemplateResultFromPost.php b/tests/phpunit/tests/block-templates/buildBlockTemplateResultFromPost.php new file mode 100644 index 0000000000000..371c50a183533 --- /dev/null +++ b/tests/phpunit/tests/block-templates/buildBlockTemplateResultFromPost.php @@ -0,0 +1,52 @@ +assertNotWPError( $template ); + $this->assertSame( get_stylesheet() . '//my_template', $template->id ); + $this->assertSame( get_stylesheet(), $template->theme ); + $this->assertSame( 'my_template', $template->slug ); + $this->assertSame( 'publish', $template->status ); + $this->assertSame( 'custom', $template->source ); + $this->assertSame( 'My Template', $template->title ); + $this->assertSame( 'Description of my template', $template->description ); + $this->assertSame( 'wp_template', $template->type ); + $this->assertSame( self::$template_post->post_modified, $template->modified, 'Template result properties match' ); + } + + /** + * @ticket 54335 + */ + public function test_should_build_template_part() { + $template_part = _build_block_template_result_from_post( + self::$template_part_post, + 'wp_template_part' + ); + $this->assertNotWPError( $template_part ); + $this->assertSame( get_stylesheet() . '//my_template_part', $template_part->id ); + $this->assertSame( get_stylesheet(), $template_part->theme ); + $this->assertSame( 'my_template_part', $template_part->slug ); + $this->assertSame( 'publish', $template_part->status ); + $this->assertSame( 'custom', $template_part->source ); + $this->assertSame( 'My Template Part', $template_part->title ); + $this->assertSame( 'Description of my template part', $template_part->description ); + $this->assertSame( 'wp_template_part', $template_part->type ); + $this->assertSame( WP_TEMPLATE_PART_AREA_HEADER, $template_part->area ); + $this->assertSame( self::$template_part_post->post_modified, $template_part->modified, 'Template part result properties match' ); + } +} From 219dbc651f7e2a31ecf4b1a157f3c63b2bf7b977 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 23 Oct 2023 13:15:17 +0000 Subject: [PATCH 48/71] Docs: Improve documentation for meta revision functions. Includes: * Correcting the position of `@since 6.4.0` in a few places. * Adding missing `@return` documentation. * Adjusting parameter spacing. Follow-up to [56714]. Props jeremyfelt, mukesh27. Fixes #59666. git-svn-id: https://develop.svn.wordpress.org/trunk@56984 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/revision.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/wp-includes/revision.php b/src/wp-includes/revision.php index 42bf72de72ab3..681d11736c0d1 100644 --- a/src/wp-includes/revision.php +++ b/src/wp-includes/revision.php @@ -516,10 +516,10 @@ function wp_restore_post_revision( $revision, $fields = null ) { /** * Restore the revisioned meta values for a post. * + * @since 6.4.0 + * * @param int $post_id The ID of the post to restore the meta to. * @param int $revision_id The ID of the revision to restore the meta from. - * - * @since 6.4.0 */ function wp_restore_post_revision_meta( $post_id, $revision_id ) { $post_type = get_post_type( $post_id ); @@ -540,11 +540,11 @@ function wp_restore_post_revision_meta( $post_id, $revision_id ) { /** * Copy post meta for the given key from one post to another. * + * @since 6.4.0 + * * @param int $source_post_id Post ID to copy meta value(s) from. * @param int $target_post_id Post ID to copy meta value(s) to. * @param string $meta_key Meta key to copy. - * - * @since 6.4.0 */ function _wp_copy_post_meta( $source_post_id, $target_post_id, $meta_key ) { @@ -563,7 +563,6 @@ function _wp_copy_post_meta( $source_post_id, $target_post_id, $meta_key ) { * @since 6.4.0 * * @param string $post_type The post type being revisioned. - * * @return array An array of meta keys to be revisioned. */ function wp_post_revision_meta_keys( $post_type ) { @@ -587,7 +586,7 @@ function wp_post_revision_meta_keys( $post_type ) { * * @since 6.4.0 * - * @param array $keys An array of meta fields to be revisioned. + * @param array $keys An array of meta fields to be revisioned. * @param string $post_type The post type being revisioned. */ return apply_filters( 'wp_post_revision_meta_keys', $wp_revisioned_meta_keys, $post_type ); @@ -596,11 +595,12 @@ function wp_post_revision_meta_keys( $post_type ) { /** * Check whether revisioned post meta fields have changed. * + * @since 6.4.0 + * * @param bool $post_has_changed Whether the post has changed. * @param WP_Post $last_revision The last revision post object. * @param WP_Post $post The post object. - * - * @since 6.4.0 + * @return bool Whether the post has changed. */ function wp_check_revisioned_meta_fields_have_changed( $post_has_changed, WP_Post $last_revision, WP_Post $post ) { foreach ( wp_post_revision_meta_keys( $post->post_type ) as $meta_key ) { From 0ad07266171153be3ed206fbf83f5ba862100446 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Mon, 23 Oct 2023 15:40:44 +0000 Subject: [PATCH 49/71] Sitemaps: add `lastmod` for individual posts and the homepage. When the XML sitemaps feature was originally introduced, the `lastmod` field was omitted because guidance at the time indicated it was less important for search engines, plus for some entities it was computationally expensive to add. Now that the guidance has slightly changed, we are revisiting this and adding `lastmod` where easily possible. - Adds `lastmod` to all individual post objects (of any post type) in the sitemap - Adds `lastmod` to the homepage sitemap entry if the homepage is set to display the latest posts. No `lastmod` is added for the individual sitemap pages in the sitemap index, nor for term archives or user archives. Those enhancements require additional changes, such as storing the modified date for a taxonomy term when something is added to that term. They can be revisited in separate follow-up tickets. Props swissspidy, joemcgill. Fixes #52099 git-svn-id: https://develop.svn.wordpress.org/trunk@56985 602fd350-edb4-49c9-b593-d223f7449a82 --- .../providers/class-wp-sitemaps-posts.php | 25 ++++++++++++++++++- tests/phpunit/tests/sitemaps/sitemaps.php | 8 ++++-- .../tests/sitemaps/wpSitemapsPosts.php | 15 ++++++++--- 3 files changed, 42 insertions(+), 6 deletions(-) diff --git a/src/wp-includes/sitemaps/providers/class-wp-sitemaps-posts.php b/src/wp-includes/sitemaps/providers/class-wp-sitemaps-posts.php index dff85a70e12c5..581b4ca2a3293 100644 --- a/src/wp-includes/sitemaps/providers/class-wp-sitemaps-posts.php +++ b/src/wp-includes/sitemaps/providers/class-wp-sitemaps-posts.php @@ -112,6 +112,28 @@ public function get_url_list( $page_num, $object_subtype = '' ) { 'loc' => home_url( '/' ), ); + /* + * Get the most recent posts displayed on the homepage, + * and then sort them by their modified date to find + * the date the homepage was approximately last updated. + */ + $latest_posts = new WP_Query( + array( + 'post_type' => 'post', + 'post_status' => 'publish', + 'orderby' => 'date', + 'order' => 'DESC', + 'no_found_rows' => true, + 'update_post_meta_cache' => false, + 'update_post_term_cache' => false, + ) + ); + + if ( ! empty( $latest_posts->posts ) ) { + $posts = wp_list_sort( $latest_posts->posts, 'post_modified_gmt', 'DESC' ); + $sitemap_entry['lastmod'] = wp_date( DATE_W3C, strtotime( $posts[0]->post_modified_gmt ) ); + } + /** * Filters the sitemap entry for the home page when the 'show_on_front' option equals 'posts'. * @@ -125,7 +147,8 @@ public function get_url_list( $page_num, $object_subtype = '' ) { foreach ( $query->posts as $post ) { $sitemap_entry = array( - 'loc' => get_permalink( $post ), + 'loc' => get_permalink( $post ), + 'lastmod' => wp_date( DATE_W3C, strtotime( $post->post_modified_gmt ) ), ); /** diff --git a/tests/phpunit/tests/sitemaps/sitemaps.php b/tests/phpunit/tests/sitemaps/sitemaps.php index a4fa6b14d74c2..349bdd961c621 100644 --- a/tests/phpunit/tests/sitemaps/sitemaps.php +++ b/tests/phpunit/tests/sitemaps/sitemaps.php @@ -251,13 +251,16 @@ public function test_get_url_list_page_with_home() { $post_list = $providers['posts']->get_url_list( 1, 'page' ); + $post_list_sorted = wp_list_sort( $post_list, 'lastmod', 'DESC' ); + $expected = $this->_get_expected_url_list( 'page', self::$pages ); // Add the homepage to the front of the URL list. array_unshift( $expected, array( - 'loc' => home_url( '/' ), + 'loc' => home_url( '/' ), + 'lastmod' => $post_list_sorted[0]['lastmod'], ) ); @@ -378,7 +381,8 @@ public function _get_expected_url_list( $type, $ids ) { return array_map( static function ( $post ) { return array( - 'loc' => get_permalink( $post ), + 'loc' => get_permalink( $post ), + 'lastmod' => get_post_modified_time( DATE_W3C, true, $post ), ); }, $posts diff --git a/tests/phpunit/tests/sitemaps/wpSitemapsPosts.php b/tests/phpunit/tests/sitemaps/wpSitemapsPosts.php index 2bdeb92e8e7f0..70b2fbc250cc3 100644 --- a/tests/phpunit/tests/sitemaps/wpSitemapsPosts.php +++ b/tests/phpunit/tests/sitemaps/wpSitemapsPosts.php @@ -59,14 +59,20 @@ public function test_posts_show_on_front_entry() { $url_list = $posts_provider->get_url_list( 1, 'page' ); $sitemap_entry = array_shift( $url_list ); - $this->assertArrayHasKey( 'lastmod', $sitemap_entry ); + $this->assertEqualSetsWithIndex( + array( + 'loc' => home_url( '/' ), + 'lastmod' => '2000-01-01', + ), + $sitemap_entry + ); } /** * Callback for 'wp_sitemaps_posts_show_on_front_entry' filter. */ public function _show_on_front_entry( $sitemap_entry ) { - $sitemap_entry['lastmod'] = wp_date( DATE_W3C, time() ); + $sitemap_entry['lastmod'] = '2000-01-01'; return $sitemap_entry; } @@ -93,7 +99,10 @@ public function test_posts_sticky_posts_not_moved_to_front() { $expected = array(); foreach ( $post_ids as $post_id ) { - $expected[] = array( 'loc' => home_url( "?p={$post_id}" ) ); + $expected[] = array( + 'loc' => home_url( "?p={$post_id}" ), + 'lastmod' => get_post_modified_time( DATE_W3C, true, $post_id ), + ); } // Check that the URL list is still in the order of the post IDs (i.e., sticky post wasn't moved to the front). From ce342f1a33051dcafdb47132f8e07d0597f49124 Mon Sep 17 00:00:00 2001 From: Tammie Lister Date: Mon, 23 Oct 2023 17:05:29 +0000 Subject: [PATCH 50/71] Update editor related npm packages for 6.4 RC2. The npm packages needed update for 6.4 RC2. Props siobhyb, cbravobernal, DAreRodz, luisherranz, artemiosans, afercia, jameskoster, czapla, alexstine, SantosGuillamot, ramonopoly, isabel_brison, andrewserong, jeryj, joedolson See #59411. git-svn-id: https://develop.svn.wordpress.org/trunk@56987 602fd350-edb4-49c9-b593-d223f7449a82 --- package-lock.json | 2970 +++++++++-------- package.json | 138 +- .../assets/script-loader-packages.min.php | 2 +- src/wp-includes/blocks/image.php | 11 +- src/wp-includes/blocks/image/view.asset.php | 2 +- .../blocks/image/view.min.asset.php | 2 +- src/wp-includes/blocks/navigation.php | 7 + .../blocks/navigation/view.asset.php | 2 +- .../blocks/navigation/view.min.asset.php | 2 +- 9 files changed, 1583 insertions(+), 1553 deletions(-) diff --git a/package-lock.json b/package-lock.json index e65dfe10e5558..96016a8a7c398 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,70 +11,70 @@ "dependencies": { "@emotion/is-prop-valid": "0.8.8", "@emotion/memoize": "0.7.4", - "@wordpress/a11y": "3.42.8", - "@wordpress/annotations": "2.42.8", - "@wordpress/api-fetch": "6.39.8", - "@wordpress/autop": "3.42.8", - "@wordpress/blob": "3.42.8", - "@wordpress/block-directory": "4.19.8", - "@wordpress/block-editor": "12.10.8", - "@wordpress/block-library": "8.19.8", - "@wordpress/block-serialization-default-parser": "4.42.8", - "@wordpress/blocks": "12.19.8", - "@wordpress/commands": "0.13.8", - "@wordpress/components": "25.8.8", - "@wordpress/compose": "6.19.8", - "@wordpress/core-commands": "0.11.8", - "@wordpress/core-data": "6.19.8", - "@wordpress/customize-widgets": "4.19.8", - "@wordpress/data": "9.12.8", - "@wordpress/data-controls": "3.11.8", - "@wordpress/date": "4.42.8", - "@wordpress/deprecated": "3.42.8", - "@wordpress/dom": "3.42.8", - "@wordpress/dom-ready": "3.42.8", - "@wordpress/edit-post": "7.19.8", - "@wordpress/edit-site": "5.19.8", - "@wordpress/edit-widgets": "5.19.8", - "@wordpress/editor": "13.19.8", - "@wordpress/element": "5.19.8", - "@wordpress/escape-html": "2.42.8", - "@wordpress/format-library": "4.19.8", - "@wordpress/hooks": "3.42.8", - "@wordpress/html-entities": "3.42.8", - "@wordpress/i18n": "4.42.8", - "@wordpress/icons": "9.33.8", - "@wordpress/interactivity": "2.3.8", - "@wordpress/interface": "5.19.8", - "@wordpress/is-shallow-equal": "4.42.8", - "@wordpress/keyboard-shortcuts": "4.19.8", - "@wordpress/keycodes": "3.42.8", - "@wordpress/list-reusable-blocks": "4.19.8", - "@wordpress/media-utils": "4.33.8", - "@wordpress/notices": "4.10.8", - "@wordpress/nux": "8.4.8", - "@wordpress/patterns": "1.3.8", - "@wordpress/plugins": "6.10.8", - "@wordpress/preferences": "3.19.8", - "@wordpress/preferences-persistence": "1.34.8", - "@wordpress/primitives": "3.40.8", - "@wordpress/priority-queue": "2.42.8", - "@wordpress/private-apis": "0.24.8", - "@wordpress/redux-routine": "4.42.8", - "@wordpress/reusable-blocks": "4.19.8", - "@wordpress/rich-text": "6.19.8", - "@wordpress/router": "0.11.8", - "@wordpress/server-side-render": "4.19.8", - "@wordpress/shortcode": "3.42.8", - "@wordpress/style-engine": "1.25.8", - "@wordpress/sync": "0.4.8", - "@wordpress/token-list": "2.42.8", - "@wordpress/undo-manager": "0.2.8", - "@wordpress/url": "3.43.8", - "@wordpress/viewport": "5.19.8", - "@wordpress/warning": "2.42.8", - "@wordpress/widgets": "3.19.8", - "@wordpress/wordcount": "3.42.8", + "@wordpress/a11y": "3.42.9", + "@wordpress/annotations": "2.42.9", + "@wordpress/api-fetch": "6.39.9", + "@wordpress/autop": "3.42.9", + "@wordpress/blob": "3.42.9", + "@wordpress/block-directory": "4.19.9", + "@wordpress/block-editor": "12.10.9", + "@wordpress/block-library": "8.19.9", + "@wordpress/block-serialization-default-parser": "4.42.9", + "@wordpress/blocks": "12.19.9", + "@wordpress/commands": "0.13.9", + "@wordpress/components": "25.8.9", + "@wordpress/compose": "6.19.9", + "@wordpress/core-commands": "0.11.9", + "@wordpress/core-data": "6.19.9", + "@wordpress/customize-widgets": "4.19.9", + "@wordpress/data": "9.12.9", + "@wordpress/data-controls": "3.11.9", + "@wordpress/date": "4.42.9", + "@wordpress/deprecated": "3.42.9", + "@wordpress/dom": "3.42.9", + "@wordpress/dom-ready": "3.42.9", + "@wordpress/edit-post": "7.19.9", + "@wordpress/edit-site": "5.19.9", + "@wordpress/edit-widgets": "5.19.9", + "@wordpress/editor": "13.19.9", + "@wordpress/element": "5.19.9", + "@wordpress/escape-html": "2.42.9", + "@wordpress/format-library": "4.19.9", + "@wordpress/hooks": "3.42.9", + "@wordpress/html-entities": "3.42.9", + "@wordpress/i18n": "4.42.9", + "@wordpress/icons": "9.33.9", + "@wordpress/interactivity": "2.3.9", + "@wordpress/interface": "5.19.9", + "@wordpress/is-shallow-equal": "4.42.9", + "@wordpress/keyboard-shortcuts": "4.19.9", + "@wordpress/keycodes": "3.42.9", + "@wordpress/list-reusable-blocks": "4.19.9", + "@wordpress/media-utils": "4.33.9", + "@wordpress/notices": "4.10.9", + "@wordpress/nux": "8.4.9", + "@wordpress/patterns": "1.3.9", + "@wordpress/plugins": "6.10.9", + "@wordpress/preferences": "3.19.9", + "@wordpress/preferences-persistence": "1.34.9", + "@wordpress/primitives": "3.40.9", + "@wordpress/priority-queue": "2.42.9", + "@wordpress/private-apis": "0.24.9", + "@wordpress/redux-routine": "4.42.9", + "@wordpress/reusable-blocks": "4.19.9", + "@wordpress/rich-text": "6.19.9", + "@wordpress/router": "0.11.9", + "@wordpress/server-side-render": "4.19.9", + "@wordpress/shortcode": "3.42.9", + "@wordpress/style-engine": "1.25.9", + "@wordpress/sync": "0.4.9", + "@wordpress/token-list": "2.42.9", + "@wordpress/undo-manager": "0.2.9", + "@wordpress/url": "3.43.9", + "@wordpress/viewport": "5.19.9", + "@wordpress/warning": "2.42.9", + "@wordpress/widgets": "3.19.9", + "@wordpress/wordcount": "3.42.9", "backbone": "1.5.0", "clipboard": "2.0.11", "core-js-url-browser": "3.6.4", @@ -108,11 +108,11 @@ "@lodder/grunt-postcss": "^3.1.1", "@playwright/test": "1.32.0", "@pmmmwh/react-refresh-webpack-plugin": "0.5.5", - "@wordpress/babel-preset-default": "7.26.8", - "@wordpress/dependency-extraction-webpack-plugin": "4.25.8", - "@wordpress/e2e-test-utils": "10.13.8", - "@wordpress/e2e-test-utils-playwright": "0.10.8", - "@wordpress/scripts": "26.13.8", + "@wordpress/babel-preset-default": "7.26.9", + "@wordpress/dependency-extraction-webpack-plugin": "4.25.9", + "@wordpress/e2e-test-utils": "10.13.9", + "@wordpress/e2e-test-utils-playwright": "0.10.9", + "@wordpress/scripts": "26.13.9", "autoprefixer": "10.4.16", "chalk": "5.3.0", "check-node-version": "4.2.1", @@ -5804,9 +5804,9 @@ "integrity": "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==" }, "node_modules/@types/semver": { - "version": "7.5.3", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.3.tgz", - "integrity": "sha512-OxepLK9EuNEIPxWNME+C6WwbRAOOI2o2BaQEGzz5Lu2e4Z5eDnEo+/aVEDMIXywoJitJ7xWd641wrGLZdtwRyw==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-MMzuxN3GdFwskAnb6fz0orFvhfqi752yjaXylr0Rp4oDg5H0Zn1IuyRhDVvYOwAXoJirx2xuS16I3WjxnAIHiQ==", "dev": true }, "node_modules/@types/serve-index": { @@ -6356,28 +6356,28 @@ } }, "node_modules/@wordpress/a11y": { - "version": "3.42.8", - "resolved": "https://registry.npmjs.org/@wordpress/a11y/-/a11y-3.42.8.tgz", - "integrity": "sha512-kFCJviURKobuUfqFNdYS19FAnhvKCPY45cWLrUtAWS8t85gXvhSYB1ai2OrLtMPUpwHHhWms4KqReAFWdqXGCQ==", + "version": "3.42.9", + "resolved": "https://registry.npmjs.org/@wordpress/a11y/-/a11y-3.42.9.tgz", + "integrity": "sha512-ILGzRh+Aki2TXTOffEHzirerLIsvrvQEOYSSqGTdh4ZRK6aRMFcC23610LPNiHeDdactSB/NXyTBCdrsNAP3RQ==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/dom-ready": "^3.42.8", - "@wordpress/i18n": "^4.42.8" + "@wordpress/dom-ready": "^3.42.9", + "@wordpress/i18n": "^4.42.9" }, "engines": { "node": ">=12" } }, "node_modules/@wordpress/annotations": { - "version": "2.42.8", - "resolved": "https://registry.npmjs.org/@wordpress/annotations/-/annotations-2.42.8.tgz", - "integrity": "sha512-XavYRWtKzE2jZieVzZlMp3memKyyQ/0w+eT8L114vqFbvy4BotvtDZIatccE61ilUxwvM/TdKhQLHEsgH6/8lw==", + "version": "2.42.9", + "resolved": "https://registry.npmjs.org/@wordpress/annotations/-/annotations-2.42.9.tgz", + "integrity": "sha512-Cls7sy3PdhOTqEbHni7cD8I6X0/S4E1tLw0iB6yleLKaCTV6cf6zmebDOhroMeN29OOPfiGDp/WYGinvErOPqw==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/data": "^9.12.8", - "@wordpress/hooks": "^3.42.8", - "@wordpress/i18n": "^4.42.8", - "@wordpress/rich-text": "^6.19.8", + "@wordpress/data": "^9.12.9", + "@wordpress/hooks": "^3.42.9", + "@wordpress/i18n": "^4.42.9", + "@wordpress/rich-text": "^6.19.9", "rememo": "^4.0.2", "uuid": "^9.0.1" }, @@ -6389,22 +6389,22 @@ } }, "node_modules/@wordpress/api-fetch": { - "version": "6.39.8", - "resolved": "https://registry.npmjs.org/@wordpress/api-fetch/-/api-fetch-6.39.8.tgz", - "integrity": "sha512-OMINmPwhlgm1AU8xFjswjOtSMn/5HOo0whx7r0iqY7CA9eRZccSg4xTHH9+UhK8VlnxQ48XyZKka55GtdCzu0g==", + "version": "6.39.9", + "resolved": "https://registry.npmjs.org/@wordpress/api-fetch/-/api-fetch-6.39.9.tgz", + "integrity": "sha512-FcS1rgn6MwBzQLKsSG0+JcTPzklvnbPEffMq97q7cFSQXsYwR4oRSyn6lYY/ZtNUnrbiE+wP763Q8uh5tsZesg==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/i18n": "^4.42.8", - "@wordpress/url": "^3.43.8" + "@wordpress/i18n": "^4.42.9", + "@wordpress/url": "^3.43.9" }, "engines": { "node": ">=12" } }, "node_modules/@wordpress/autop": { - "version": "3.42.8", - "resolved": "https://registry.npmjs.org/@wordpress/autop/-/autop-3.42.8.tgz", - "integrity": "sha512-/Vlv9yyrIONp6JGYfU6C7Ya9gQUFEnoV2tJ6/Pd4VojuT06NGYamNr/Mk2DoKFzJL2L4hBYPRVxcx32ibvDYKg==", + "version": "3.42.9", + "resolved": "https://registry.npmjs.org/@wordpress/autop/-/autop-3.42.9.tgz", + "integrity": "sha512-FmPS1444QEUVWEt29xHtzkO4zk042H97AevGTzm0j1rLC9GlotKC+YFU/KGsVgvdhtwSOGxUPydqKR1lMUd2aw==", "dependencies": { "@babel/runtime": "^7.16.0" }, @@ -6425,9 +6425,9 @@ } }, "node_modules/@wordpress/babel-preset-default": { - "version": "7.26.8", - "resolved": "https://registry.npmjs.org/@wordpress/babel-preset-default/-/babel-preset-default-7.26.8.tgz", - "integrity": "sha512-HRSuyDb+xWNKsNH1cso4YgTwaCJN0G+KluLkfR/5ng10Cf5sKwzBjAdRkmefyVMf9VPLIr1X6csY4mSht6g+Aw==", + "version": "7.26.9", + "resolved": "https://registry.npmjs.org/@wordpress/babel-preset-default/-/babel-preset-default-7.26.9.tgz", + "integrity": "sha512-UALMxZuxoliMX62VC9w+s4qy3bNWlQSMFvRcd5E+TBZuVs9Vl9rIUuhLGZwNP4IJ0Io5Z45W03pcXcjHT6dBvQ==", "dev": true, "dependencies": { "@babel/core": "^7.16.0", @@ -6436,10 +6436,10 @@ "@babel/preset-env": "^7.16.0", "@babel/preset-typescript": "^7.16.0", "@babel/runtime": "^7.16.0", - "@wordpress/babel-plugin-import-jsx-pragma": "^4.25.8", - "@wordpress/browserslist-config": "^5.25.8", - "@wordpress/element": "^5.19.8", - "@wordpress/warning": "^2.42.8", + "@wordpress/babel-plugin-import-jsx-pragma": "^4.25.9", + "@wordpress/browserslist-config": "^5.25.9", + "@wordpress/element": "^5.19.9", + "@wordpress/warning": "^2.42.9", "browserslist": "^4.21.9", "core-js": "^3.31.0" }, @@ -6454,9 +6454,9 @@ "dev": true }, "node_modules/@wordpress/blob": { - "version": "3.42.8", - "resolved": "https://registry.npmjs.org/@wordpress/blob/-/blob-3.42.8.tgz", - "integrity": "sha512-QDAyftImJznHyujfjVacI0VozqkKQAtn1jNTn5Dw4RZNVMRWSYU06mzhqW4IGEn5SI4w60th7s1OfMTDZsfFaA==", + "version": "3.42.9", + "resolved": "https://registry.npmjs.org/@wordpress/blob/-/blob-3.42.9.tgz", + "integrity": "sha512-C2Kn3PUwpXj91i019XxbMf0Rr8A3eoem5lryR4zpyMZW/1rZv2x+svo8xvpcza7mNpN2GfJGMC+fVd7RTvt6Qw==", "dependencies": { "@babel/runtime": "^7.16.0" }, @@ -6465,29 +6465,29 @@ } }, "node_modules/@wordpress/block-directory": { - "version": "4.19.8", - "resolved": "https://registry.npmjs.org/@wordpress/block-directory/-/block-directory-4.19.8.tgz", - "integrity": "sha512-nCmldVS4wB8Yz/d4jliTuD2dRoOEqyTjy6KAdutvH+1PC41HfGDmtVDOzWcCRkXro16eymLkaD6ZI7Nnxqf4ZA==", + "version": "4.19.9", + "resolved": "https://registry.npmjs.org/@wordpress/block-directory/-/block-directory-4.19.9.tgz", + "integrity": "sha512-Y3bJMa7xFaI7AnwwlKpsFu6pxwJQcZGgGdfT4cYUh4uqDqUILSUwnOXQzgb2IptmqzniWjZWZtNKgng3nU/eQw==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/a11y": "^3.42.8", - "@wordpress/api-fetch": "^6.39.8", - "@wordpress/block-editor": "^12.10.8", - "@wordpress/blocks": "^12.19.8", - "@wordpress/components": "^25.8.8", - "@wordpress/compose": "^6.19.8", - "@wordpress/core-data": "^6.19.8", - "@wordpress/data": "^9.12.8", - "@wordpress/edit-post": "^7.19.8", - "@wordpress/editor": "^13.19.8", - "@wordpress/element": "^5.19.8", - "@wordpress/hooks": "^3.42.8", - "@wordpress/html-entities": "^3.42.8", - "@wordpress/i18n": "^4.42.8", - "@wordpress/icons": "^9.33.8", - "@wordpress/notices": "^4.10.8", - "@wordpress/plugins": "^6.10.8", - "@wordpress/url": "^3.43.8", + "@wordpress/a11y": "^3.42.9", + "@wordpress/api-fetch": "^6.39.9", + "@wordpress/block-editor": "^12.10.9", + "@wordpress/blocks": "^12.19.9", + "@wordpress/components": "^25.8.9", + "@wordpress/compose": "^6.19.9", + "@wordpress/core-data": "^6.19.9", + "@wordpress/data": "^9.12.9", + "@wordpress/edit-post": "^7.19.9", + "@wordpress/editor": "^13.19.9", + "@wordpress/element": "^5.19.9", + "@wordpress/hooks": "^3.42.9", + "@wordpress/html-entities": "^3.42.9", + "@wordpress/i18n": "^4.42.9", + "@wordpress/icons": "^9.33.9", + "@wordpress/notices": "^4.10.9", + "@wordpress/plugins": "^6.10.9", + "@wordpress/url": "^3.43.9", "change-case": "^4.1.2" }, "engines": { @@ -6499,44 +6499,44 @@ } }, "node_modules/@wordpress/block-editor": { - "version": "12.10.8", - "resolved": "https://registry.npmjs.org/@wordpress/block-editor/-/block-editor-12.10.8.tgz", - "integrity": "sha512-y0HmsSHjZ6zVyOagNl11SNKQ0ZJqA7jiMbGrALEq7W5YTbgQSOsetBYBpwxuBWuFGhqQJ0PCa+nfJIBUAXUbPA==", + "version": "12.10.9", + "resolved": "https://registry.npmjs.org/@wordpress/block-editor/-/block-editor-12.10.9.tgz", + "integrity": "sha512-O0QaUP4JU8nK6GZPNcts/0XlSkPlAc+J7m06LfK8WP5sStrZhxmE4IjiPrGStXXiZ4knjx23DufHkU3e/XjoKg==", "dependencies": { "@babel/runtime": "^7.16.0", "@emotion/react": "^11.7.1", "@emotion/styled": "^11.6.0", "@react-spring/web": "^9.4.5", - "@wordpress/a11y": "^3.42.8", - "@wordpress/api-fetch": "^6.39.8", - "@wordpress/blob": "^3.42.8", - "@wordpress/blocks": "^12.19.8", - "@wordpress/commands": "^0.13.8", - "@wordpress/components": "^25.8.8", - "@wordpress/compose": "^6.19.8", - "@wordpress/data": "^9.12.8", - "@wordpress/date": "^4.42.8", - "@wordpress/deprecated": "^3.42.8", - "@wordpress/dom": "^3.42.8", - "@wordpress/element": "^5.19.8", - "@wordpress/escape-html": "^2.42.8", - "@wordpress/hooks": "^3.42.8", - "@wordpress/html-entities": "^3.42.8", - "@wordpress/i18n": "^4.42.8", - "@wordpress/icons": "^9.33.8", - "@wordpress/is-shallow-equal": "^4.42.8", - "@wordpress/keyboard-shortcuts": "^4.19.8", - "@wordpress/keycodes": "^3.42.8", - "@wordpress/notices": "^4.10.8", - "@wordpress/preferences": "^3.19.8", - "@wordpress/private-apis": "^0.24.8", - "@wordpress/rich-text": "^6.19.8", - "@wordpress/shortcode": "^3.42.8", - "@wordpress/style-engine": "^1.25.8", - "@wordpress/token-list": "^2.42.8", - "@wordpress/url": "^3.43.8", - "@wordpress/warning": "^2.42.8", - "@wordpress/wordcount": "^3.42.8", + "@wordpress/a11y": "^3.42.9", + "@wordpress/api-fetch": "^6.39.9", + "@wordpress/blob": "^3.42.9", + "@wordpress/blocks": "^12.19.9", + "@wordpress/commands": "^0.13.9", + "@wordpress/components": "^25.8.9", + "@wordpress/compose": "^6.19.9", + "@wordpress/data": "^9.12.9", + "@wordpress/date": "^4.42.9", + "@wordpress/deprecated": "^3.42.9", + "@wordpress/dom": "^3.42.9", + "@wordpress/element": "^5.19.9", + "@wordpress/escape-html": "^2.42.9", + "@wordpress/hooks": "^3.42.9", + "@wordpress/html-entities": "^3.42.9", + "@wordpress/i18n": "^4.42.9", + "@wordpress/icons": "^9.33.9", + "@wordpress/is-shallow-equal": "^4.42.9", + "@wordpress/keyboard-shortcuts": "^4.19.9", + "@wordpress/keycodes": "^3.42.9", + "@wordpress/notices": "^4.10.9", + "@wordpress/preferences": "^3.19.9", + "@wordpress/private-apis": "^0.24.9", + "@wordpress/rich-text": "^6.19.9", + "@wordpress/shortcode": "^3.42.9", + "@wordpress/style-engine": "^1.25.9", + "@wordpress/token-list": "^2.42.9", + "@wordpress/url": "^3.43.9", + "@wordpress/warning": "^2.42.9", + "@wordpress/wordcount": "^3.42.9", "change-case": "^4.1.2", "classnames": "^2.3.1", "colord": "^2.7.0", @@ -6560,41 +6560,41 @@ } }, "node_modules/@wordpress/block-library": { - "version": "8.19.8", - "resolved": "https://registry.npmjs.org/@wordpress/block-library/-/block-library-8.19.8.tgz", - "integrity": "sha512-bXuWHRxC5nlJXUv7H/GcnqC0YT3Hs2wDv6oJls5d5QwtqqGNc1oIBN/sSofj9gcnlfACuNxSBOf9DYtbu0hsqA==", + "version": "8.19.9", + "resolved": "https://registry.npmjs.org/@wordpress/block-library/-/block-library-8.19.9.tgz", + "integrity": "sha512-zHzGKp4nI/QlQabq2r92BdMAj0qtUsgZzSjvszAoW8gIkc9DvJA3CoE7icIf26yKEyi29h3OhIR6GqUtjmPrGA==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/a11y": "^3.42.8", - "@wordpress/api-fetch": "^6.39.8", - "@wordpress/autop": "^3.42.8", - "@wordpress/blob": "^3.42.8", - "@wordpress/block-editor": "^12.10.8", - "@wordpress/blocks": "^12.19.8", - "@wordpress/components": "^25.8.8", - "@wordpress/compose": "^6.19.8", - "@wordpress/core-data": "^6.19.8", - "@wordpress/data": "^9.12.8", - "@wordpress/date": "^4.42.8", - "@wordpress/deprecated": "^3.42.8", - "@wordpress/dom": "^3.42.8", - "@wordpress/element": "^5.19.8", - "@wordpress/escape-html": "^2.42.8", - "@wordpress/hooks": "^3.42.8", - "@wordpress/html-entities": "^3.42.8", - "@wordpress/i18n": "^4.42.8", - "@wordpress/icons": "^9.33.8", - "@wordpress/interactivity": "^2.3.8", - "@wordpress/keycodes": "^3.42.8", - "@wordpress/notices": "^4.10.8", - "@wordpress/primitives": "^3.40.8", - "@wordpress/private-apis": "^0.24.8", - "@wordpress/reusable-blocks": "^4.19.8", - "@wordpress/rich-text": "^6.19.8", - "@wordpress/server-side-render": "^4.19.8", - "@wordpress/url": "^3.43.8", - "@wordpress/viewport": "^5.19.8", - "@wordpress/wordcount": "^3.42.8", + "@wordpress/a11y": "^3.42.9", + "@wordpress/api-fetch": "^6.39.9", + "@wordpress/autop": "^3.42.9", + "@wordpress/blob": "^3.42.9", + "@wordpress/block-editor": "^12.10.9", + "@wordpress/blocks": "^12.19.9", + "@wordpress/components": "^25.8.9", + "@wordpress/compose": "^6.19.9", + "@wordpress/core-data": "^6.19.9", + "@wordpress/data": "^9.12.9", + "@wordpress/date": "^4.42.9", + "@wordpress/deprecated": "^3.42.9", + "@wordpress/dom": "^3.42.9", + "@wordpress/element": "^5.19.9", + "@wordpress/escape-html": "^2.42.9", + "@wordpress/hooks": "^3.42.9", + "@wordpress/html-entities": "^3.42.9", + "@wordpress/i18n": "^4.42.9", + "@wordpress/icons": "^9.33.9", + "@wordpress/interactivity": "^2.3.9", + "@wordpress/keycodes": "^3.42.9", + "@wordpress/notices": "^4.10.9", + "@wordpress/primitives": "^3.40.9", + "@wordpress/private-apis": "^0.24.9", + "@wordpress/reusable-blocks": "^4.19.9", + "@wordpress/rich-text": "^6.19.9", + "@wordpress/server-side-render": "^4.19.9", + "@wordpress/url": "^3.43.9", + "@wordpress/viewport": "^5.19.9", + "@wordpress/wordcount": "^3.42.9", "change-case": "^4.1.2", "classnames": "^2.3.1", "colord": "^2.7.0", @@ -6614,9 +6614,9 @@ } }, "node_modules/@wordpress/block-serialization-default-parser": { - "version": "4.42.8", - "resolved": "https://registry.npmjs.org/@wordpress/block-serialization-default-parser/-/block-serialization-default-parser-4.42.8.tgz", - "integrity": "sha512-RcD2gK6sMDG5uTNkLrCbAao4Ua2pI/uUDmJUkzaJxA7qjE4TaUzQqc7GpQtTpb2Y0aLhmWGgoLwpPR6f6fHVnQ==", + "version": "4.42.9", + "resolved": "https://registry.npmjs.org/@wordpress/block-serialization-default-parser/-/block-serialization-default-parser-4.42.9.tgz", + "integrity": "sha512-PAL27cgthpO4lGPn6gDXobHWLxyT1voZ6QSjs+ry20GeQNcjEkgeyp9Jcbrk/RiVfaTLwLOoxvtlcmyWWASz+g==", "dependencies": { "@babel/runtime": "^7.16.0" }, @@ -6625,25 +6625,25 @@ } }, "node_modules/@wordpress/blocks": { - "version": "12.19.8", - "resolved": "https://registry.npmjs.org/@wordpress/blocks/-/blocks-12.19.8.tgz", - "integrity": "sha512-2Rapys1X5qpfxklGjWyHSWcNC6yVctm9DztE8RVjDG3RnJsVXg1yh65zJ4HSC6/VltRzhGnnxcenkYqljbdz4g==", + "version": "12.19.9", + "resolved": "https://registry.npmjs.org/@wordpress/blocks/-/blocks-12.19.9.tgz", + "integrity": "sha512-XRA8+SKg+gnbc4/JWmmhSEvzoqTUNC50/VcCPvMudOPx8WDr6fCydcrWIc8goIDkKBkZtdHYBlZvWcvDpXFshw==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/autop": "^3.42.8", - "@wordpress/blob": "^3.42.8", - "@wordpress/block-serialization-default-parser": "^4.42.8", - "@wordpress/compose": "^6.19.8", - "@wordpress/data": "^9.12.8", - "@wordpress/deprecated": "^3.42.8", - "@wordpress/dom": "^3.42.8", - "@wordpress/element": "^5.19.8", - "@wordpress/hooks": "^3.42.8", - "@wordpress/html-entities": "^3.42.8", - "@wordpress/i18n": "^4.42.8", - "@wordpress/is-shallow-equal": "^4.42.8", - "@wordpress/private-apis": "^0.24.8", - "@wordpress/shortcode": "^3.42.8", + "@wordpress/autop": "^3.42.9", + "@wordpress/blob": "^3.42.9", + "@wordpress/block-serialization-default-parser": "^4.42.9", + "@wordpress/compose": "^6.19.9", + "@wordpress/data": "^9.12.9", + "@wordpress/deprecated": "^3.42.9", + "@wordpress/dom": "^3.42.9", + "@wordpress/element": "^5.19.9", + "@wordpress/hooks": "^3.42.9", + "@wordpress/html-entities": "^3.42.9", + "@wordpress/i18n": "^4.42.9", + "@wordpress/is-shallow-equal": "^4.42.9", + "@wordpress/private-apis": "^0.24.9", + "@wordpress/shortcode": "^3.42.9", "change-case": "^4.1.2", "colord": "^2.7.0", "deepmerge": "^4.3.0", @@ -6674,18 +6674,18 @@ } }, "node_modules/@wordpress/commands": { - "version": "0.13.8", - "resolved": "https://registry.npmjs.org/@wordpress/commands/-/commands-0.13.8.tgz", - "integrity": "sha512-JPkUQPS4iz5KHgz0uzGgfbY5u39TsObXQC7cZOpUHHICAmCcQWUT8sPIUJoZ6WWwcjRIjMqMb5ZdizXATU6G3A==", + "version": "0.13.9", + "resolved": "https://registry.npmjs.org/@wordpress/commands/-/commands-0.13.9.tgz", + "integrity": "sha512-fH96vdmmpvRNN0lpFTU30yya/FDNyyKqIxRKnIf5CgJ2t29IMd3bPAQlnBi3JIEUWrXV/dPv3b7TueoVGZ2X9Q==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/components": "^25.8.8", - "@wordpress/data": "^9.12.8", - "@wordpress/element": "^5.19.8", - "@wordpress/i18n": "^4.42.8", - "@wordpress/icons": "^9.33.8", - "@wordpress/keyboard-shortcuts": "^4.19.8", - "@wordpress/private-apis": "^0.24.8", + "@wordpress/components": "^25.8.9", + "@wordpress/data": "^9.12.9", + "@wordpress/element": "^5.19.9", + "@wordpress/i18n": "^4.42.9", + "@wordpress/icons": "^9.33.9", + "@wordpress/keyboard-shortcuts": "^4.19.9", + "@wordpress/private-apis": "^0.24.9", "classnames": "^2.3.1", "cmdk": "^0.2.0", "rememo": "^4.0.2" @@ -6699,9 +6699,9 @@ } }, "node_modules/@wordpress/components": { - "version": "25.8.8", - "resolved": "https://registry.npmjs.org/@wordpress/components/-/components-25.8.8.tgz", - "integrity": "sha512-4RBfXt+VXFxlx7FNz89a1V5yAayCGx3FpU04qJ3BR1TqEEqi5jqg0BbN63PHkqy/krrXhvX2oKFQ9OxbSX62vg==", + "version": "25.8.9", + "resolved": "https://registry.npmjs.org/@wordpress/components/-/components-25.8.9.tgz", + "integrity": "sha512-s+M7eopSqcptLvexaRFhDhilxaLuBu+ifFZK1lsRCa10XvxG4lOsoxN90OMI4Pk5c50zTJ/BrFM0HpU2Ru6EYw==", "dependencies": { "@ariakit/react": "^0.2.12", "@babel/runtime": "^7.16.0", @@ -6714,23 +6714,23 @@ "@floating-ui/react-dom": "^2.0.1", "@radix-ui/react-dropdown-menu": "2.0.4", "@use-gesture/react": "^10.2.24", - "@wordpress/a11y": "^3.42.8", - "@wordpress/compose": "^6.19.8", - "@wordpress/date": "^4.42.8", - "@wordpress/deprecated": "^3.42.8", - "@wordpress/dom": "^3.42.8", - "@wordpress/element": "^5.19.8", - "@wordpress/escape-html": "^2.42.8", - "@wordpress/hooks": "^3.42.8", - "@wordpress/html-entities": "^3.42.8", - "@wordpress/i18n": "^4.42.8", - "@wordpress/icons": "^9.33.8", - "@wordpress/is-shallow-equal": "^4.42.8", - "@wordpress/keycodes": "^3.42.8", - "@wordpress/primitives": "^3.40.8", - "@wordpress/private-apis": "^0.24.8", - "@wordpress/rich-text": "^6.19.8", - "@wordpress/warning": "^2.42.8", + "@wordpress/a11y": "^3.42.9", + "@wordpress/compose": "^6.19.9", + "@wordpress/date": "^4.42.9", + "@wordpress/deprecated": "^3.42.9", + "@wordpress/dom": "^3.42.9", + "@wordpress/element": "^5.19.9", + "@wordpress/escape-html": "^2.42.9", + "@wordpress/hooks": "^3.42.9", + "@wordpress/html-entities": "^3.42.9", + "@wordpress/i18n": "^4.42.9", + "@wordpress/icons": "^9.33.9", + "@wordpress/is-shallow-equal": "^4.42.9", + "@wordpress/keycodes": "^3.42.9", + "@wordpress/primitives": "^3.40.9", + "@wordpress/private-apis": "^0.24.9", + "@wordpress/rich-text": "^6.19.9", + "@wordpress/warning": "^2.42.9", "change-case": "^4.1.2", "classnames": "^2.3.1", "colord": "^2.7.0", @@ -6762,19 +6762,19 @@ } }, "node_modules/@wordpress/compose": { - "version": "6.19.8", - "resolved": "https://registry.npmjs.org/@wordpress/compose/-/compose-6.19.8.tgz", - "integrity": "sha512-6oB+8vptLTM1FTsmSebAnPjuwgy5MQlUN+DKTbrhZiVmCsKTcOR46hu4OFi4yEh1aPEb00aEdSw4fnc94PgxBg==", + "version": "6.19.9", + "resolved": "https://registry.npmjs.org/@wordpress/compose/-/compose-6.19.9.tgz", + "integrity": "sha512-0EMqNy+sbi2wO/+SSKxKfTkyoKwndhJpIC98CCm+JbmPITSU8o0Bpizt8j4aIxWVXH8rkrxFDNmQ1u6F4HIAPA==", "dependencies": { "@babel/runtime": "^7.16.0", "@types/mousetrap": "^1.6.8", - "@wordpress/deprecated": "^3.42.8", - "@wordpress/dom": "^3.42.8", - "@wordpress/element": "^5.19.8", - "@wordpress/is-shallow-equal": "^4.42.8", - "@wordpress/keycodes": "^3.42.8", - "@wordpress/priority-queue": "^2.42.8", - "@wordpress/undo-manager": "^0.2.8", + "@wordpress/deprecated": "^3.42.9", + "@wordpress/dom": "^3.42.9", + "@wordpress/element": "^5.19.9", + "@wordpress/is-shallow-equal": "^4.42.9", + "@wordpress/keycodes": "^3.42.9", + "@wordpress/priority-queue": "^2.42.9", + "@wordpress/undo-manager": "^0.2.9", "change-case": "^4.1.2", "clipboard": "^2.0.8", "mousetrap": "^1.6.5", @@ -6788,21 +6788,21 @@ } }, "node_modules/@wordpress/core-commands": { - "version": "0.11.8", - "resolved": "https://registry.npmjs.org/@wordpress/core-commands/-/core-commands-0.11.8.tgz", - "integrity": "sha512-hJA6VHr3BgNSLtMIx9sfZkfwuy9zTW6iTcbDpLihGCqbXOFvTUKteLO8x6FU35nYbcBf3KlZOfAWCdzQykIDIg==", + "version": "0.11.9", + "resolved": "https://registry.npmjs.org/@wordpress/core-commands/-/core-commands-0.11.9.tgz", + "integrity": "sha512-fWnO5Sh/3KHxT6TFlqK8GnWtMnXKyLtPxrDFsLp1vwqzbBBf7XroIqOa/ybh7ZV93H+tbmJ7LQTwAWXZEIDPiQ==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/block-editor": "^12.10.8", - "@wordpress/commands": "^0.13.8", - "@wordpress/core-data": "^6.19.8", - "@wordpress/data": "^9.12.8", - "@wordpress/element": "^5.19.8", - "@wordpress/i18n": "^4.42.8", - "@wordpress/icons": "^9.33.8", - "@wordpress/private-apis": "^0.24.8", - "@wordpress/router": "^0.11.8", - "@wordpress/url": "^3.43.8" + "@wordpress/block-editor": "^12.10.9", + "@wordpress/commands": "^0.13.9", + "@wordpress/core-data": "^6.19.9", + "@wordpress/data": "^9.12.9", + "@wordpress/element": "^5.19.9", + "@wordpress/i18n": "^4.42.9", + "@wordpress/icons": "^9.33.9", + "@wordpress/private-apis": "^0.24.9", + "@wordpress/router": "^0.11.9", + "@wordpress/url": "^3.43.9" }, "engines": { "node": ">=12" @@ -6813,25 +6813,25 @@ } }, "node_modules/@wordpress/core-data": { - "version": "6.19.8", - "resolved": "https://registry.npmjs.org/@wordpress/core-data/-/core-data-6.19.8.tgz", - "integrity": "sha512-d/despGSZK2GJKulmjhV2rkPGZpCPZVmq5LNoSmCkVMXBPWq7YCr4xrnRTkVz5H6FQkk54fGMjMZ5dEmPLgSxA==", + "version": "6.19.9", + "resolved": "https://registry.npmjs.org/@wordpress/core-data/-/core-data-6.19.9.tgz", + "integrity": "sha512-1ZNSphggpT6VZrKlxqJBCTEo3Q4zGmiANqjSryRnM+1YQLGeLsFQlyCYIGr1m9LtCnJejZAmngSt4bhuzqBYpw==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/api-fetch": "^6.39.8", - "@wordpress/block-editor": "^12.10.8", - "@wordpress/blocks": "^12.19.8", - "@wordpress/compose": "^6.19.8", - "@wordpress/data": "^9.12.8", - "@wordpress/deprecated": "^3.42.8", - "@wordpress/element": "^5.19.8", - "@wordpress/html-entities": "^3.42.8", - "@wordpress/i18n": "^4.42.8", - "@wordpress/is-shallow-equal": "^4.42.8", - "@wordpress/private-apis": "^0.24.8", - "@wordpress/sync": "^0.4.8", - "@wordpress/undo-manager": "^0.2.8", - "@wordpress/url": "^3.43.8", + "@wordpress/api-fetch": "^6.39.9", + "@wordpress/block-editor": "^12.10.9", + "@wordpress/blocks": "^12.19.9", + "@wordpress/compose": "^6.19.9", + "@wordpress/data": "^9.12.9", + "@wordpress/deprecated": "^3.42.9", + "@wordpress/element": "^5.19.9", + "@wordpress/html-entities": "^3.42.9", + "@wordpress/i18n": "^4.42.9", + "@wordpress/is-shallow-equal": "^4.42.9", + "@wordpress/private-apis": "^0.24.9", + "@wordpress/sync": "^0.4.9", + "@wordpress/undo-manager": "^0.2.9", + "@wordpress/url": "^3.43.9", "change-case": "^4.1.2", "equivalent-key-map": "^0.2.2", "fast-deep-equal": "^3.1.3", @@ -6848,31 +6848,31 @@ } }, "node_modules/@wordpress/customize-widgets": { - "version": "4.19.8", - "resolved": "https://registry.npmjs.org/@wordpress/customize-widgets/-/customize-widgets-4.19.8.tgz", - "integrity": "sha512-6RdVnA9QTxOix07S/AvjHp4URLuVKw6gJQUJeppM4rYrY/DTUkvnqj/PffpxATk1LFEgszRVVtiPjhl1Bd3sZA==", + "version": "4.19.9", + "resolved": "https://registry.npmjs.org/@wordpress/customize-widgets/-/customize-widgets-4.19.9.tgz", + "integrity": "sha512-elkNJUadkZcac0kr3Ovx/ZIwJ0PaATrLCRX95I2a8KcdQyGS2v0IZBjaUTDUuHcer5NnbUGLPu0eq9Z+LfzXlA==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/block-editor": "^12.10.8", - "@wordpress/block-library": "^8.19.8", - "@wordpress/blocks": "^12.19.8", - "@wordpress/components": "^25.8.8", - "@wordpress/compose": "^6.19.8", - "@wordpress/core-data": "^6.19.8", - "@wordpress/data": "^9.12.8", - "@wordpress/dom": "^3.42.8", - "@wordpress/element": "^5.19.8", - "@wordpress/hooks": "^3.42.8", - "@wordpress/i18n": "^4.42.8", - "@wordpress/icons": "^9.33.8", - "@wordpress/interface": "^5.19.8", - "@wordpress/is-shallow-equal": "^4.42.8", - "@wordpress/keyboard-shortcuts": "^4.19.8", - "@wordpress/keycodes": "^3.42.8", - "@wordpress/media-utils": "^4.33.8", - "@wordpress/preferences": "^3.19.8", - "@wordpress/private-apis": "^0.24.8", - "@wordpress/widgets": "^3.19.8", + "@wordpress/block-editor": "^12.10.9", + "@wordpress/block-library": "^8.19.9", + "@wordpress/blocks": "^12.19.9", + "@wordpress/components": "^25.8.9", + "@wordpress/compose": "^6.19.9", + "@wordpress/core-data": "^6.19.9", + "@wordpress/data": "^9.12.9", + "@wordpress/dom": "^3.42.9", + "@wordpress/element": "^5.19.9", + "@wordpress/hooks": "^3.42.9", + "@wordpress/i18n": "^4.42.9", + "@wordpress/icons": "^9.33.9", + "@wordpress/interface": "^5.19.9", + "@wordpress/is-shallow-equal": "^4.42.9", + "@wordpress/keyboard-shortcuts": "^4.19.9", + "@wordpress/keycodes": "^3.42.9", + "@wordpress/media-utils": "^4.33.9", + "@wordpress/preferences": "^3.19.9", + "@wordpress/private-apis": "^0.24.9", + "@wordpress/widgets": "^3.19.9", "classnames": "^2.3.1", "fast-deep-equal": "^3.1.3" }, @@ -6885,18 +6885,18 @@ } }, "node_modules/@wordpress/data": { - "version": "9.12.8", - "resolved": "https://registry.npmjs.org/@wordpress/data/-/data-9.12.8.tgz", - "integrity": "sha512-gUu+g/Urg6aknUATNFyDQycoNE1JQub8ZUImgMxlfFLG+KnoHpz0LteEpigRVqem6qGsYihqS9MIPElnIkmasQ==", + "version": "9.12.9", + "resolved": "https://registry.npmjs.org/@wordpress/data/-/data-9.12.9.tgz", + "integrity": "sha512-DU2Gbbl6y2X258hBehIwR0iknC6xyy4Ug6bs1nGygKrPqBgiuXsRAWeF8ilSRaOLtC6lHALs3d6IHXdj86Om2g==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/compose": "^6.19.8", - "@wordpress/deprecated": "^3.42.8", - "@wordpress/element": "^5.19.8", - "@wordpress/is-shallow-equal": "^4.42.8", - "@wordpress/priority-queue": "^2.42.8", - "@wordpress/private-apis": "^0.24.8", - "@wordpress/redux-routine": "^4.42.8", + "@wordpress/compose": "^6.19.9", + "@wordpress/deprecated": "^3.42.9", + "@wordpress/element": "^5.19.9", + "@wordpress/is-shallow-equal": "^4.42.9", + "@wordpress/priority-queue": "^2.42.9", + "@wordpress/private-apis": "^0.24.9", + "@wordpress/redux-routine": "^4.42.9", "deepmerge": "^4.3.0", "equivalent-key-map": "^0.2.2", "is-plain-object": "^5.0.0", @@ -6914,14 +6914,14 @@ } }, "node_modules/@wordpress/data-controls": { - "version": "3.11.8", - "resolved": "https://registry.npmjs.org/@wordpress/data-controls/-/data-controls-3.11.8.tgz", - "integrity": "sha512-drP8XeA2f36eKq1LtdDyaOTqPNNQ+ar3W4zYWz01ac9Pr0/C2WQ3Fb4TLsrUbmeciVAJ/yEtGQPmqurmvHljeA==", + "version": "3.11.9", + "resolved": "https://registry.npmjs.org/@wordpress/data-controls/-/data-controls-3.11.9.tgz", + "integrity": "sha512-CTS2ZySNXIgdP1PRRgAo1oF/SM3XKrLtSTxsQ+yH+Hly+16CyoMLBcNrq8uOmeBMlFwpbFoZLPkNDNweKAhoNw==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/api-fetch": "^6.39.8", - "@wordpress/data": "^9.12.8", - "@wordpress/deprecated": "^3.42.8" + "@wordpress/api-fetch": "^6.39.9", + "@wordpress/data": "^9.12.9", + "@wordpress/deprecated": "^3.42.9" }, "engines": { "node": ">=12" @@ -6931,12 +6931,12 @@ } }, "node_modules/@wordpress/date": { - "version": "4.42.8", - "resolved": "https://registry.npmjs.org/@wordpress/date/-/date-4.42.8.tgz", - "integrity": "sha512-Ph/bR5jy5nUyCKDmDUz7cgVdC+9ZXcU3noak6jEbT5bSnXPFNcQ/LAgtP5h+5pbS5l7832tdXD+4lQloM86Byw==", + "version": "4.42.9", + "resolved": "https://registry.npmjs.org/@wordpress/date/-/date-4.42.9.tgz", + "integrity": "sha512-hj7F+1RCEC9/TJzVyx+8JwBgyufB4fpvtzgoSvA4uSK6vxXdxtBb4rZCqW2lawUFLi3PHiwZSoOCQ+vyO5PJYg==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/deprecated": "^3.42.8", + "@wordpress/deprecated": "^3.42.9", "moment": "^2.29.4", "moment-timezone": "^0.5.40" }, @@ -6945,9 +6945,9 @@ } }, "node_modules/@wordpress/dependency-extraction-webpack-plugin": { - "version": "4.25.8", - "resolved": "https://registry.npmjs.org/@wordpress/dependency-extraction-webpack-plugin/-/dependency-extraction-webpack-plugin-4.25.8.tgz", - "integrity": "sha512-B0zs87lTbfJ/8UafRE9D0R75mi2ZI7FgBwwpATOwIywZcGJwSBRsDMRKQVWFGbXsQriQPaAVuL1P85dFcX+eGg==", + "version": "4.25.9", + "resolved": "https://registry.npmjs.org/@wordpress/dependency-extraction-webpack-plugin/-/dependency-extraction-webpack-plugin-4.25.9.tgz", + "integrity": "sha512-2V4hX3eliV7+x6LA79bartHYA06MjwXVlY6UPET8RFf+R455WUcmUwBjcPX03DLsKe1Pe9yGXi3K2rNjcNV4Aw==", "dev": true, "dependencies": { "json2php": "^0.0.7", @@ -6961,33 +6961,33 @@ } }, "node_modules/@wordpress/deprecated": { - "version": "3.42.8", - "resolved": "https://registry.npmjs.org/@wordpress/deprecated/-/deprecated-3.42.8.tgz", - "integrity": "sha512-mW4uPRHYuqVTBIuzXfQeELImSXl9GUa9EjhTddNkBvZpPRvLMool7NKJ+9WHcN9sJBAj3hvpTbkvBgxGSOgu4w==", + "version": "3.42.9", + "resolved": "https://registry.npmjs.org/@wordpress/deprecated/-/deprecated-3.42.9.tgz", + "integrity": "sha512-T5p2eVYvNDyDfrwvUw51n1ux5B9Z3xiO5xhQzKgqXbpJG9sBZ7moI76QUiPsZr3/pbPXQxqnxAv8VyZEFXxqsA==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/hooks": "^3.42.8" + "@wordpress/hooks": "^3.42.9" }, "engines": { "node": ">=12" } }, "node_modules/@wordpress/dom": { - "version": "3.42.8", - "resolved": "https://registry.npmjs.org/@wordpress/dom/-/dom-3.42.8.tgz", - "integrity": "sha512-4mVVNTtzD8BO09n4vEPKQup/sklSS2F3r37MbPt2bq0q25aQIT1CjFHefIM6aUg/jZLlw+2pTgWic0liXIOyyg==", + "version": "3.42.9", + "resolved": "https://registry.npmjs.org/@wordpress/dom/-/dom-3.42.9.tgz", + "integrity": "sha512-2aQbLMCcd8tlaXZhANx5GzQnnz4lgQsITZOBYrhyprJMCUAowWCLae2EjmNSA3T9kb2ur0pCr805s0uNJZwqCQ==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/deprecated": "^3.42.8" + "@wordpress/deprecated": "^3.42.9" }, "engines": { "node": ">=12" } }, "node_modules/@wordpress/dom-ready": { - "version": "3.42.8", - "resolved": "https://registry.npmjs.org/@wordpress/dom-ready/-/dom-ready-3.42.8.tgz", - "integrity": "sha512-dwnjXW7sTfqKZenmBEe0GqfSO38XhGtKxtRsn5OpZV4QCz54lDorSTOxKGgpG35++Hywet5kphyFoJ0RluG2Nw==", + "version": "3.42.9", + "resolved": "https://registry.npmjs.org/@wordpress/dom-ready/-/dom-ready-3.42.9.tgz", + "integrity": "sha512-ow+NVxzEYxjLrEurPkHctZxuFuwcspusxoPPF3BKPlu0JY5UEqt7Hmrr6LsP12SBXJKQ8dz+DPGG6EJPbYqzRA==", "dependencies": { "@babel/runtime": "^7.16.0" }, @@ -6996,15 +6996,15 @@ } }, "node_modules/@wordpress/e2e-test-utils": { - "version": "10.13.8", - "resolved": "https://registry.npmjs.org/@wordpress/e2e-test-utils/-/e2e-test-utils-10.13.8.tgz", - "integrity": "sha512-a7x+ae55k733p0HnozJH5rTlgBSmw8TYP1Ju4uGAdPgLJfpvFsjT1mBA3BerYNu7qgY8VjFjLKQ1EoBW7fubdQ==", + "version": "10.13.9", + "resolved": "https://registry.npmjs.org/@wordpress/e2e-test-utils/-/e2e-test-utils-10.13.9.tgz", + "integrity": "sha512-JjY6g8KLikXqf/r1xWDx1L0A1Zw1ikoKBb+cmXfpVBwM4jwq1D+oH3eTCC3df8fm8auyCFVnobg8vAzNCKKAoQ==", "dev": true, "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/api-fetch": "^6.39.8", - "@wordpress/keycodes": "^3.42.8", - "@wordpress/url": "^3.43.8", + "@wordpress/api-fetch": "^6.39.9", + "@wordpress/keycodes": "^3.42.9", + "@wordpress/url": "^3.43.9", "change-case": "^4.1.2", "form-data": "^4.0.0", "node-fetch": "^2.6.0" @@ -7018,14 +7018,14 @@ } }, "node_modules/@wordpress/e2e-test-utils-playwright": { - "version": "0.10.8", - "resolved": "https://registry.npmjs.org/@wordpress/e2e-test-utils-playwright/-/e2e-test-utils-playwright-0.10.8.tgz", - "integrity": "sha512-OOp3XtplIBT2YZ/q9AusTzvbHN+vIO+FF+IdhtlEeMczRgN/YOMNyLA3CG6l5vhnvkOKwJRzS45MewzacMOrBQ==", + "version": "0.10.9", + "resolved": "https://registry.npmjs.org/@wordpress/e2e-test-utils-playwright/-/e2e-test-utils-playwright-0.10.9.tgz", + "integrity": "sha512-kqck+8F24gi9D6F0oeGTeiJHJfVKtixsqomZ2hpzIIF4/CIcR3SZbxk0IiTEk7WroqqfCEiIGxxm8atSehPqig==", "dev": true, "dependencies": { - "@wordpress/api-fetch": "^6.39.8", - "@wordpress/keycodes": "^3.42.8", - "@wordpress/url": "^3.43.8", + "@wordpress/api-fetch": "^6.39.9", + "@wordpress/keycodes": "^3.42.9", + "@wordpress/url": "^3.43.9", "change-case": "^4.1.2", "form-data": "^4.0.0", "get-port": "^5.1.1", @@ -7153,41 +7153,41 @@ } }, "node_modules/@wordpress/edit-post": { - "version": "7.19.8", - "resolved": "https://registry.npmjs.org/@wordpress/edit-post/-/edit-post-7.19.8.tgz", - "integrity": "sha512-JTKocPTRlhuRNPfIt460VHFzGPe1kVnRUSUGsbLDrt+wdHUA7cVct5hak1kBY/FSW7o3eOgw1CiTJPWTBiUEqA==", + "version": "7.19.9", + "resolved": "https://registry.npmjs.org/@wordpress/edit-post/-/edit-post-7.19.9.tgz", + "integrity": "sha512-oVqJjms9vvS8xzJXRY9XS69744LjkVvihqzDoA5HHpZQp6EbOaqsAOw0CU/7vsBzFWIpT526Mru3ndsZz6W3HQ==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/a11y": "^3.42.8", - "@wordpress/api-fetch": "^6.39.8", - "@wordpress/block-editor": "^12.10.8", - "@wordpress/block-library": "^8.19.8", - "@wordpress/blocks": "^12.19.8", - "@wordpress/commands": "^0.13.8", - "@wordpress/components": "^25.8.8", - "@wordpress/compose": "^6.19.8", - "@wordpress/core-commands": "^0.11.8", - "@wordpress/core-data": "^6.19.8", - "@wordpress/data": "^9.12.8", - "@wordpress/deprecated": "^3.42.8", - "@wordpress/dom": "^3.42.8", - "@wordpress/editor": "^13.19.8", - "@wordpress/element": "^5.19.8", - "@wordpress/hooks": "^3.42.8", - "@wordpress/i18n": "^4.42.8", - "@wordpress/icons": "^9.33.8", - "@wordpress/interface": "^5.19.8", - "@wordpress/keyboard-shortcuts": "^4.19.8", - "@wordpress/keycodes": "^3.42.8", - "@wordpress/media-utils": "^4.33.8", - "@wordpress/notices": "^4.10.8", - "@wordpress/plugins": "^6.10.8", - "@wordpress/preferences": "^3.19.8", - "@wordpress/private-apis": "^0.24.8", - "@wordpress/url": "^3.43.8", - "@wordpress/viewport": "^5.19.8", - "@wordpress/warning": "^2.42.8", - "@wordpress/widgets": "^3.19.8", + "@wordpress/a11y": "^3.42.9", + "@wordpress/api-fetch": "^6.39.9", + "@wordpress/block-editor": "^12.10.9", + "@wordpress/block-library": "^8.19.9", + "@wordpress/blocks": "^12.19.9", + "@wordpress/commands": "^0.13.9", + "@wordpress/components": "^25.8.9", + "@wordpress/compose": "^6.19.9", + "@wordpress/core-commands": "^0.11.9", + "@wordpress/core-data": "^6.19.9", + "@wordpress/data": "^9.12.9", + "@wordpress/deprecated": "^3.42.9", + "@wordpress/dom": "^3.42.9", + "@wordpress/editor": "^13.19.9", + "@wordpress/element": "^5.19.9", + "@wordpress/hooks": "^3.42.9", + "@wordpress/i18n": "^4.42.9", + "@wordpress/icons": "^9.33.9", + "@wordpress/interface": "^5.19.9", + "@wordpress/keyboard-shortcuts": "^4.19.9", + "@wordpress/keycodes": "^3.42.9", + "@wordpress/media-utils": "^4.33.9", + "@wordpress/notices": "^4.10.9", + "@wordpress/plugins": "^6.10.9", + "@wordpress/preferences": "^3.19.9", + "@wordpress/private-apis": "^0.24.9", + "@wordpress/url": "^3.43.9", + "@wordpress/viewport": "^5.19.9", + "@wordpress/warning": "^2.42.9", + "@wordpress/widgets": "^3.19.9", "classnames": "^2.3.1", "memize": "^2.1.0", "rememo": "^4.0.2" @@ -7201,49 +7201,49 @@ } }, "node_modules/@wordpress/edit-site": { - "version": "5.19.8", - "resolved": "https://registry.npmjs.org/@wordpress/edit-site/-/edit-site-5.19.8.tgz", - "integrity": "sha512-a5w8CGa+GxbNmcvvD8RZLk4kwc8fFV2TNKUk2LIzWw4ro2VyEs+TkearD6Ymll71jcCFBKOujwQ9nrIsdDuBNg==", + "version": "5.19.9", + "resolved": "https://registry.npmjs.org/@wordpress/edit-site/-/edit-site-5.19.9.tgz", + "integrity": "sha512-Qkb+kULvgzyOlAoPucvgxCFqK2ECe21izKjrdNaZbU+fPCHDaxzoq/dk+FpDZMqkjeUoCj25uxGhte0WBlQZCw==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/a11y": "^3.42.8", - "@wordpress/api-fetch": "^6.39.8", - "@wordpress/block-editor": "^12.10.8", - "@wordpress/block-library": "^8.19.8", - "@wordpress/blocks": "^12.19.8", - "@wordpress/commands": "^0.13.8", - "@wordpress/components": "^25.8.8", - "@wordpress/compose": "^6.19.8", - "@wordpress/core-commands": "^0.11.8", - "@wordpress/core-data": "^6.19.8", - "@wordpress/data": "^9.12.8", - "@wordpress/date": "^4.42.8", - "@wordpress/deprecated": "^3.42.8", - "@wordpress/dom": "^3.42.8", - "@wordpress/editor": "^13.19.8", - "@wordpress/element": "^5.19.8", - "@wordpress/escape-html": "^2.42.8", - "@wordpress/hooks": "^3.42.8", - "@wordpress/html-entities": "^3.42.8", - "@wordpress/i18n": "^4.42.8", - "@wordpress/icons": "^9.33.8", - "@wordpress/interface": "^5.19.8", - "@wordpress/keyboard-shortcuts": "^4.19.8", - "@wordpress/keycodes": "^3.42.8", - "@wordpress/media-utils": "^4.33.8", - "@wordpress/notices": "^4.10.8", - "@wordpress/patterns": "^1.3.8", - "@wordpress/plugins": "^6.10.8", - "@wordpress/preferences": "^3.19.8", - "@wordpress/primitives": "^3.40.8", - "@wordpress/private-apis": "^0.24.8", - "@wordpress/reusable-blocks": "^4.19.8", - "@wordpress/router": "^0.11.8", - "@wordpress/style-engine": "^1.25.8", - "@wordpress/url": "^3.43.8", - "@wordpress/viewport": "^5.19.8", - "@wordpress/widgets": "^3.19.8", - "@wordpress/wordcount": "^3.42.8", + "@wordpress/a11y": "^3.42.9", + "@wordpress/api-fetch": "^6.39.9", + "@wordpress/block-editor": "^12.10.9", + "@wordpress/block-library": "^8.19.9", + "@wordpress/blocks": "^12.19.9", + "@wordpress/commands": "^0.13.9", + "@wordpress/components": "^25.8.9", + "@wordpress/compose": "^6.19.9", + "@wordpress/core-commands": "^0.11.9", + "@wordpress/core-data": "^6.19.9", + "@wordpress/data": "^9.12.9", + "@wordpress/date": "^4.42.9", + "@wordpress/deprecated": "^3.42.9", + "@wordpress/dom": "^3.42.9", + "@wordpress/editor": "^13.19.9", + "@wordpress/element": "^5.19.9", + "@wordpress/escape-html": "^2.42.9", + "@wordpress/hooks": "^3.42.9", + "@wordpress/html-entities": "^3.42.9", + "@wordpress/i18n": "^4.42.9", + "@wordpress/icons": "^9.33.9", + "@wordpress/interface": "^5.19.9", + "@wordpress/keyboard-shortcuts": "^4.19.9", + "@wordpress/keycodes": "^3.42.9", + "@wordpress/media-utils": "^4.33.9", + "@wordpress/notices": "^4.10.9", + "@wordpress/patterns": "^1.3.9", + "@wordpress/plugins": "^6.10.9", + "@wordpress/preferences": "^3.19.9", + "@wordpress/primitives": "^3.40.9", + "@wordpress/private-apis": "^0.24.9", + "@wordpress/reusable-blocks": "^4.19.9", + "@wordpress/router": "^0.11.9", + "@wordpress/style-engine": "^1.25.9", + "@wordpress/url": "^3.43.9", + "@wordpress/viewport": "^5.19.9", + "@wordpress/widgets": "^3.19.9", + "@wordpress/wordcount": "^3.42.9", "change-case": "^4.1.2", "classnames": "^2.3.1", "colord": "^2.9.2", @@ -7265,37 +7265,37 @@ } }, "node_modules/@wordpress/edit-widgets": { - "version": "5.19.8", - "resolved": "https://registry.npmjs.org/@wordpress/edit-widgets/-/edit-widgets-5.19.8.tgz", - "integrity": "sha512-LQ35/Cso5ZiMTOQ0twxpyhaJCAvMK8wVQ/aCzu5S8OEedZCsC6nE2pO2pjSLrlaLskIAaQvziGHPBR33fjqdTQ==", + "version": "5.19.9", + "resolved": "https://registry.npmjs.org/@wordpress/edit-widgets/-/edit-widgets-5.19.9.tgz", + "integrity": "sha512-kq7uilrjCMjr2RqJ+KQ/7TWPxcUImBq5zDqPEkM3z3fhk3+KhsG6L74+OIlv3PYl89CjfL8pYV2B7lKYG27VkA==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/api-fetch": "^6.39.8", - "@wordpress/block-editor": "^12.10.8", - "@wordpress/block-library": "^8.19.8", - "@wordpress/blocks": "^12.19.8", - "@wordpress/components": "^25.8.8", - "@wordpress/compose": "^6.19.8", - "@wordpress/core-data": "^6.19.8", - "@wordpress/data": "^9.12.8", - "@wordpress/deprecated": "^3.42.8", - "@wordpress/dom": "^3.42.8", - "@wordpress/element": "^5.19.8", - "@wordpress/hooks": "^3.42.8", - "@wordpress/i18n": "^4.42.8", - "@wordpress/icons": "^9.33.8", - "@wordpress/interface": "^5.19.8", - "@wordpress/keyboard-shortcuts": "^4.19.8", - "@wordpress/keycodes": "^3.42.8", - "@wordpress/media-utils": "^4.33.8", - "@wordpress/notices": "^4.10.8", - "@wordpress/patterns": "^1.3.8", - "@wordpress/plugins": "^6.10.8", - "@wordpress/preferences": "^3.19.8", - "@wordpress/private-apis": "^0.24.8", - "@wordpress/reusable-blocks": "^4.19.8", - "@wordpress/url": "^3.43.8", - "@wordpress/widgets": "^3.19.8", + "@wordpress/api-fetch": "^6.39.9", + "@wordpress/block-editor": "^12.10.9", + "@wordpress/block-library": "^8.19.9", + "@wordpress/blocks": "^12.19.9", + "@wordpress/components": "^25.8.9", + "@wordpress/compose": "^6.19.9", + "@wordpress/core-data": "^6.19.9", + "@wordpress/data": "^9.12.9", + "@wordpress/deprecated": "^3.42.9", + "@wordpress/dom": "^3.42.9", + "@wordpress/element": "^5.19.9", + "@wordpress/hooks": "^3.42.9", + "@wordpress/i18n": "^4.42.9", + "@wordpress/icons": "^9.33.9", + "@wordpress/interface": "^5.19.9", + "@wordpress/keyboard-shortcuts": "^4.19.9", + "@wordpress/keycodes": "^3.42.9", + "@wordpress/media-utils": "^4.33.9", + "@wordpress/notices": "^4.10.9", + "@wordpress/patterns": "^1.3.9", + "@wordpress/plugins": "^6.10.9", + "@wordpress/preferences": "^3.19.9", + "@wordpress/private-apis": "^0.24.9", + "@wordpress/reusable-blocks": "^4.19.9", + "@wordpress/url": "^3.43.9", + "@wordpress/widgets": "^3.19.9", "classnames": "^2.3.1" }, "engines": { @@ -7307,40 +7307,40 @@ } }, "node_modules/@wordpress/editor": { - "version": "13.19.8", - "resolved": "https://registry.npmjs.org/@wordpress/editor/-/editor-13.19.8.tgz", - "integrity": "sha512-TUji5zz5VdN5LV4AYG8zuyFoxUWtxkf8voIwQg4WivYYWgeGRstDnsWXAEpi1azc+rN5TLe4gEBMKdTJxFFS6g==", + "version": "13.19.9", + "resolved": "https://registry.npmjs.org/@wordpress/editor/-/editor-13.19.9.tgz", + "integrity": "sha512-GVi+RfKaQ9tBNUA2UjtNzCe4xyepK2rrC5/fy+IBOeo9jkSSm/9cM8TCWsBVLv/HAScDCjI2mDaOnrlLDeZ1QQ==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/a11y": "^3.42.8", - "@wordpress/api-fetch": "^6.39.8", - "@wordpress/blob": "^3.42.8", - "@wordpress/block-editor": "^12.10.8", - "@wordpress/blocks": "^12.19.8", - "@wordpress/components": "^25.8.8", - "@wordpress/compose": "^6.19.8", - "@wordpress/core-data": "^6.19.8", - "@wordpress/data": "^9.12.8", - "@wordpress/date": "^4.42.8", - "@wordpress/deprecated": "^3.42.8", - "@wordpress/dom": "^3.42.8", - "@wordpress/element": "^5.19.8", - "@wordpress/hooks": "^3.42.8", - "@wordpress/html-entities": "^3.42.8", - "@wordpress/i18n": "^4.42.8", - "@wordpress/icons": "^9.33.8", - "@wordpress/keyboard-shortcuts": "^4.19.8", - "@wordpress/keycodes": "^3.42.8", - "@wordpress/media-utils": "^4.33.8", - "@wordpress/notices": "^4.10.8", - "@wordpress/patterns": "^1.3.8", - "@wordpress/preferences": "^3.19.8", - "@wordpress/private-apis": "^0.24.8", - "@wordpress/reusable-blocks": "^4.19.8", - "@wordpress/rich-text": "^6.19.8", - "@wordpress/server-side-render": "^4.19.8", - "@wordpress/url": "^3.43.8", - "@wordpress/wordcount": "^3.42.8", + "@wordpress/a11y": "^3.42.9", + "@wordpress/api-fetch": "^6.39.9", + "@wordpress/blob": "^3.42.9", + "@wordpress/block-editor": "^12.10.9", + "@wordpress/blocks": "^12.19.9", + "@wordpress/components": "^25.8.9", + "@wordpress/compose": "^6.19.9", + "@wordpress/core-data": "^6.19.9", + "@wordpress/data": "^9.12.9", + "@wordpress/date": "^4.42.9", + "@wordpress/deprecated": "^3.42.9", + "@wordpress/dom": "^3.42.9", + "@wordpress/element": "^5.19.9", + "@wordpress/hooks": "^3.42.9", + "@wordpress/html-entities": "^3.42.9", + "@wordpress/i18n": "^4.42.9", + "@wordpress/icons": "^9.33.9", + "@wordpress/keyboard-shortcuts": "^4.19.9", + "@wordpress/keycodes": "^3.42.9", + "@wordpress/media-utils": "^4.33.9", + "@wordpress/notices": "^4.10.9", + "@wordpress/patterns": "^1.3.9", + "@wordpress/preferences": "^3.19.9", + "@wordpress/private-apis": "^0.24.9", + "@wordpress/reusable-blocks": "^4.19.9", + "@wordpress/rich-text": "^6.19.9", + "@wordpress/server-side-render": "^4.19.9", + "@wordpress/url": "^3.43.9", + "@wordpress/wordcount": "^3.42.9", "classnames": "^2.3.1", "date-fns": "^2.28.0", "memize": "^2.1.0", @@ -7357,14 +7357,14 @@ } }, "node_modules/@wordpress/element": { - "version": "5.19.8", - "resolved": "https://registry.npmjs.org/@wordpress/element/-/element-5.19.8.tgz", - "integrity": "sha512-VoA0ib6aIKPTwtiksmbg0QFx17o5MvMqRk+Ggue56YOmPnHylshzuxY9saS83kKP2XLaKdWWuI09ouT+cWoBUQ==", + "version": "5.19.9", + "resolved": "https://registry.npmjs.org/@wordpress/element/-/element-5.19.9.tgz", + "integrity": "sha512-RjJwgrkWAsd/rK+2UwhdyR+Qa2Vtqc4LXCQcwevw/nAp3FHcXxfpwjKt2+9076EtLtI0b9PSoXkZCwW0mwpw5w==", "dependencies": { "@babel/runtime": "^7.16.0", "@types/react": "^18.0.21", "@types/react-dom": "^18.0.6", - "@wordpress/escape-html": "^2.42.8", + "@wordpress/escape-html": "^2.42.9", "change-case": "^4.1.2", "is-plain-object": "^5.0.0", "react": "^18.2.0", @@ -7375,9 +7375,9 @@ } }, "node_modules/@wordpress/escape-html": { - "version": "2.42.8", - "resolved": "https://registry.npmjs.org/@wordpress/escape-html/-/escape-html-2.42.8.tgz", - "integrity": "sha512-auFGR/T2TkQnX6p87xFHzxwFwsYUAPgxeWDMTyGxBh5qCt0kD5rWSGvHo6lubm2pQmBAJWUTXwqJ+MveSE/U2Q==", + "version": "2.42.9", + "resolved": "https://registry.npmjs.org/@wordpress/escape-html/-/escape-html-2.42.9.tgz", + "integrity": "sha512-JdhEV2PsKDngs+UAp7DRhxkeD1ODAQdaDoGp8V4S0dCRIaoTbw1nvNS40BHVwq06QXIy3oreRcoirXhxrqt+PQ==", "dependencies": { "@babel/runtime": "^7.16.0" }, @@ -7386,16 +7386,16 @@ } }, "node_modules/@wordpress/eslint-plugin": { - "version": "16.0.8", - "resolved": "https://registry.npmjs.org/@wordpress/eslint-plugin/-/eslint-plugin-16.0.8.tgz", - "integrity": "sha512-8zzMbkIwwBBdVEECi3EVfk81kVqECXv6nPsfahbd4ZZGpXKg8N4w7q2cnAvAU+KV2DSiwTyQ7P2Lu4/rGMeXVw==", + "version": "16.0.9", + "resolved": "https://registry.npmjs.org/@wordpress/eslint-plugin/-/eslint-plugin-16.0.9.tgz", + "integrity": "sha512-FRXIhqREPHqTOhj4Hbmm+NL40h0NgnEBTGXq+Yn6gs4fGMFHbJSBKqtK1pv+4CkFP7vvvkfsCDDG5KnpgyP6Lw==", "dev": true, "dependencies": { "@babel/eslint-parser": "^7.16.0", "@typescript-eslint/eslint-plugin": "^6.4.1", "@typescript-eslint/parser": "^6.4.1", - "@wordpress/babel-preset-default": "^7.26.8", - "@wordpress/prettier-config": "^2.25.8", + "@wordpress/babel-preset-default": "^7.26.9", + "@wordpress/prettier-config": "^2.25.9", "cosmiconfig": "^7.0.0", "eslint-config-prettier": "^8.3.0", "eslint-plugin-import": "^2.25.2", @@ -7444,22 +7444,22 @@ } }, "node_modules/@wordpress/format-library": { - "version": "4.19.8", - "resolved": "https://registry.npmjs.org/@wordpress/format-library/-/format-library-4.19.8.tgz", - "integrity": "sha512-8I+0yLOfC+uDnG7N4hudeOXsdCSCEGnKDe9d/YL3bvI47oMALoDW/Vc39n3ct3Kzyxyw7e3Hz/XcDiuHNYB8cA==", + "version": "4.19.9", + "resolved": "https://registry.npmjs.org/@wordpress/format-library/-/format-library-4.19.9.tgz", + "integrity": "sha512-1omgpcFR3GAVUkJKJhMM+ceU6mXP/7CSsTZJ6cWmYRdwkPTYZzsjXEE4HyePliSDS0+B6AYyHjCH8LlviDN3tg==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/a11y": "^3.42.8", - "@wordpress/block-editor": "^12.10.8", - "@wordpress/components": "^25.8.8", - "@wordpress/compose": "^6.19.8", - "@wordpress/data": "^9.12.8", - "@wordpress/element": "^5.19.8", - "@wordpress/html-entities": "^3.42.8", - "@wordpress/i18n": "^4.42.8", - "@wordpress/icons": "^9.33.8", - "@wordpress/rich-text": "^6.19.8", - "@wordpress/url": "^3.43.8" + "@wordpress/a11y": "^3.42.9", + "@wordpress/block-editor": "^12.10.9", + "@wordpress/components": "^25.8.9", + "@wordpress/compose": "^6.19.9", + "@wordpress/data": "^9.12.9", + "@wordpress/element": "^5.19.9", + "@wordpress/html-entities": "^3.42.9", + "@wordpress/i18n": "^4.42.9", + "@wordpress/icons": "^9.33.9", + "@wordpress/rich-text": "^6.19.9", + "@wordpress/url": "^3.43.9" }, "engines": { "node": ">=12" @@ -7470,9 +7470,9 @@ } }, "node_modules/@wordpress/hooks": { - "version": "3.42.8", - "resolved": "https://registry.npmjs.org/@wordpress/hooks/-/hooks-3.42.8.tgz", - "integrity": "sha512-1UQGRs96eu1ngerMkJH/UJOu1iIuk7uusZHjzYchEWsuUt2YcaP6+rchaS1YsV8aTdqY0lVwK6/5sLWaEWQeUA==", + "version": "3.42.9", + "resolved": "https://registry.npmjs.org/@wordpress/hooks/-/hooks-3.42.9.tgz", + "integrity": "sha512-L8pwwbclYF5VQERoBKjrQqbq/mhyBhzUF4irD4h5MfnCyJNg9C8it9e9/OHHqaXjVBgF5NfWSPr9bdY+PIMLrg==", "dependencies": { "@babel/runtime": "^7.16.0" }, @@ -7481,9 +7481,9 @@ } }, "node_modules/@wordpress/html-entities": { - "version": "3.42.8", - "resolved": "https://registry.npmjs.org/@wordpress/html-entities/-/html-entities-3.42.8.tgz", - "integrity": "sha512-9KpdJxrsmfMlxEWdgkB8Fj2VVJwj++bsBNCKYY8zmgT0KLKgGRLhpQjQgkGZ8eA0XQUW6veJ1HZhtiIiWyZ2Rw==", + "version": "3.42.9", + "resolved": "https://registry.npmjs.org/@wordpress/html-entities/-/html-entities-3.42.9.tgz", + "integrity": "sha512-KyAm20q04GuRvQn4hdz7LuVrA3thVM0hCNrP3eENTdAvLvOEt6i1eJiebIHuzHakqZXIYpGhMiPrbTPkrWW0bw==", "dependencies": { "@babel/runtime": "^7.16.0" }, @@ -7492,12 +7492,12 @@ } }, "node_modules/@wordpress/i18n": { - "version": "4.42.8", - "resolved": "https://registry.npmjs.org/@wordpress/i18n/-/i18n-4.42.8.tgz", - "integrity": "sha512-gf+zq8N1oTCRV3iJV1x/tmimDYc4CS6WwQG9tI50Ge6AR01MTagXuWhHZArvlIF9PnNSoDDLM1UmBWjtqqH9mA==", + "version": "4.42.9", + "resolved": "https://registry.npmjs.org/@wordpress/i18n/-/i18n-4.42.9.tgz", + "integrity": "sha512-tfxTQo2XiUQC+uQCLtWMJxU9fAtfZL31uFCj96dVgWmNH53wyJdl24EpwtT53iOAOHoYv1Bo59f3l94WRZaGfw==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/hooks": "^3.42.8", + "@wordpress/hooks": "^3.42.9", "gettext-parser": "^1.3.1", "memize": "^2.1.0", "sprintf-js": "^1.1.1", @@ -7511,22 +7511,22 @@ } }, "node_modules/@wordpress/icons": { - "version": "9.33.8", - "resolved": "https://registry.npmjs.org/@wordpress/icons/-/icons-9.33.8.tgz", - "integrity": "sha512-Rmq7QYB9R2SGtniXSVox6achmDh9ekipPdIDHq9PW5wHiGrYH0xbyhLXHvn8MyHTPBa/zcc2MsZlsRe1fz3HBw==", + "version": "9.33.9", + "resolved": "https://registry.npmjs.org/@wordpress/icons/-/icons-9.33.9.tgz", + "integrity": "sha512-hab0Nnwp+RBmFe1Pq4MdUrdwe3bMmno5/6wsqRxuDYQuUDk6E1eFzXTasRpj3sakr5AY6TZ0/B6G8XvtRB7Gaw==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/element": "^5.19.8", - "@wordpress/primitives": "^3.40.8" + "@wordpress/element": "^5.19.9", + "@wordpress/primitives": "^3.40.9" }, "engines": { "node": ">=12" } }, "node_modules/@wordpress/interactivity": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/@wordpress/interactivity/-/interactivity-2.3.8.tgz", - "integrity": "sha512-V/5NFnT10zrxRU5zJ2EKfZ7lIlsXh/kUepM6/QnSdmZktu/BQ1ni7yo2BTybUE3nfTJjW/dQQG3BLCMhGSF9rQ==", + "version": "2.3.9", + "resolved": "https://registry.npmjs.org/@wordpress/interactivity/-/interactivity-2.3.9.tgz", + "integrity": "sha512-9wNNj/RD3R91g6XZwQVcRayjj0oulBSIuOWrzewjIgt7fvEKaFBusrIj+WyTKETYMR8bXGxtJP7ydPjH5iK1TQ==", "dependencies": { "@preact/signals": "^1.1.3", "deepsignal": "^1.3.6", @@ -7537,22 +7537,22 @@ } }, "node_modules/@wordpress/interface": { - "version": "5.19.8", - "resolved": "https://registry.npmjs.org/@wordpress/interface/-/interface-5.19.8.tgz", - "integrity": "sha512-xpAoT4Ap252YXG4GMFhohEIhT97UitK/Ncvwnu+pz3iHNvtSk5p0OpRGFy3n9YVLJgHxT3kCFnNNV/hz0/dGZw==", + "version": "5.19.9", + "resolved": "https://registry.npmjs.org/@wordpress/interface/-/interface-5.19.9.tgz", + "integrity": "sha512-GMhdGWADL5Zm300Cdibh5QGb+DofKO9HI211Zz+0DzcKk6H79hN4sXkZpJEQLCqfnGvdL1X8IwVGoBA2vWkb/Q==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/a11y": "^3.42.8", - "@wordpress/components": "^25.8.8", - "@wordpress/compose": "^6.19.8", - "@wordpress/data": "^9.12.8", - "@wordpress/deprecated": "^3.42.8", - "@wordpress/element": "^5.19.8", - "@wordpress/i18n": "^4.42.8", - "@wordpress/icons": "^9.33.8", - "@wordpress/plugins": "^6.10.8", - "@wordpress/preferences": "^3.19.8", - "@wordpress/viewport": "^5.19.8", + "@wordpress/a11y": "^3.42.9", + "@wordpress/components": "^25.8.9", + "@wordpress/compose": "^6.19.9", + "@wordpress/data": "^9.12.9", + "@wordpress/deprecated": "^3.42.9", + "@wordpress/element": "^5.19.9", + "@wordpress/i18n": "^4.42.9", + "@wordpress/icons": "^9.33.9", + "@wordpress/plugins": "^6.10.9", + "@wordpress/preferences": "^3.19.9", + "@wordpress/viewport": "^5.19.9", "classnames": "^2.3.1" }, "engines": { @@ -7564,9 +7564,9 @@ } }, "node_modules/@wordpress/is-shallow-equal": { - "version": "4.42.8", - "resolved": "https://registry.npmjs.org/@wordpress/is-shallow-equal/-/is-shallow-equal-4.42.8.tgz", - "integrity": "sha512-SIFZ+a+B+DrKKqJ1fk9c5xY02MkMlO7bxYH1dC/sJGUgr2P7eIELHqTg/240coNvmy/juny5HZj64Mzk3QkQyw==", + "version": "4.42.9", + "resolved": "https://registry.npmjs.org/@wordpress/is-shallow-equal/-/is-shallow-equal-4.42.9.tgz", + "integrity": "sha512-U8FJEXaYhJ7Hr6UKI8P3vXb04tjtLpv1AzYnANqtS72GJNWTQ/v3auQQCu0gfuV/QokXL/q5rN8uTrN9KCi/rw==", "dependencies": { "@babel/runtime": "^7.16.0" }, @@ -7608,14 +7608,14 @@ } }, "node_modules/@wordpress/keyboard-shortcuts": { - "version": "4.19.8", - "resolved": "https://registry.npmjs.org/@wordpress/keyboard-shortcuts/-/keyboard-shortcuts-4.19.8.tgz", - "integrity": "sha512-UGN5CZM3rEG+LZq4+AqWlmdOQEFweiCL6exUdMCyrtkQsdQzHnuGVL4qUgg1l+kiznOuaucG9Q2chyJQmr6lZA==", + "version": "4.19.9", + "resolved": "https://registry.npmjs.org/@wordpress/keyboard-shortcuts/-/keyboard-shortcuts-4.19.9.tgz", + "integrity": "sha512-8ymRxEY7Axb4YZVA3Ddgxi8Yiw3ep8OqwW2B9tqG/qvaQN8f6c7l0E1TPFmXtwSCwtSyi5Yk+NoLkQPqGdov1A==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/data": "^9.12.8", - "@wordpress/element": "^5.19.8", - "@wordpress/keycodes": "^3.42.8", + "@wordpress/data": "^9.12.9", + "@wordpress/element": "^5.19.9", + "@wordpress/keycodes": "^3.42.9", "rememo": "^4.0.2" }, "engines": { @@ -7626,12 +7626,12 @@ } }, "node_modules/@wordpress/keycodes": { - "version": "3.42.8", - "resolved": "https://registry.npmjs.org/@wordpress/keycodes/-/keycodes-3.42.8.tgz", - "integrity": "sha512-YzB+qChfLDeOnzVWV4oKtz2XTwrK+tIm7wS6Mscvv6z29DZ0+3R2mNZCvd9N/sYa7PDZ1IPC40wPV0s3tkIFMw==", + "version": "3.42.9", + "resolved": "https://registry.npmjs.org/@wordpress/keycodes/-/keycodes-3.42.9.tgz", + "integrity": "sha512-cYQMgpryAUzly9SCc8HyKPqeXD5xo/pgzwlAFV+BuFItRI24ccSoW46JxJS2SrvygvHLNF0Uy6u4ZYFWgMdBlQ==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/i18n": "^4.42.8", + "@wordpress/i18n": "^4.42.9", "change-case": "^4.1.2" }, "engines": { @@ -7639,16 +7639,16 @@ } }, "node_modules/@wordpress/list-reusable-blocks": { - "version": "4.19.8", - "resolved": "https://registry.npmjs.org/@wordpress/list-reusable-blocks/-/list-reusable-blocks-4.19.8.tgz", - "integrity": "sha512-QZ+yGcQ/g872gFVEdC4tomLEBDPVNbu1hOw95Xki7pCOeh2aFpby+6l1SY87/uJycOc+904UOyC+Omf+Xs/lIA==", + "version": "4.19.9", + "resolved": "https://registry.npmjs.org/@wordpress/list-reusable-blocks/-/list-reusable-blocks-4.19.9.tgz", + "integrity": "sha512-dW4Ri7G7E/TUUTdVo4sg27R3OQJIEEBNVGy8pk+Vn2A3QgD6WXd2YzTf+Le01yU15Oi84g6cogl3CL/ZF4spJg==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/api-fetch": "^6.39.8", - "@wordpress/components": "^25.8.8", - "@wordpress/compose": "^6.19.8", - "@wordpress/element": "^5.19.8", - "@wordpress/i18n": "^4.42.8", + "@wordpress/api-fetch": "^6.39.9", + "@wordpress/components": "^25.8.9", + "@wordpress/compose": "^6.19.9", + "@wordpress/element": "^5.19.9", + "@wordpress/i18n": "^4.42.9", "change-case": "^4.1.2" }, "engines": { @@ -7660,28 +7660,28 @@ } }, "node_modules/@wordpress/media-utils": { - "version": "4.33.8", - "resolved": "https://registry.npmjs.org/@wordpress/media-utils/-/media-utils-4.33.8.tgz", - "integrity": "sha512-WxfPMlJnu57pRT2A5AztKffkVOnMBCyaT5IuX8LPrP3jU/1phrfel9i+BNl7LIjzDxqv1bgXZYqS2+SvT78Atg==", + "version": "4.33.9", + "resolved": "https://registry.npmjs.org/@wordpress/media-utils/-/media-utils-4.33.9.tgz", + "integrity": "sha512-sMx9kxvuvFsS3J9yZwFKHoCcfiOR8tY2FKxxq7hzE2EcgdQ9ol0fo7BkzgOLpFlTLIg1kEoW8yGQgN5HQV0fuw==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/api-fetch": "^6.39.8", - "@wordpress/blob": "^3.42.8", - "@wordpress/element": "^5.19.8", - "@wordpress/i18n": "^4.42.8" + "@wordpress/api-fetch": "^6.39.9", + "@wordpress/blob": "^3.42.9", + "@wordpress/element": "^5.19.9", + "@wordpress/i18n": "^4.42.9" }, "engines": { "node": ">=12" } }, "node_modules/@wordpress/notices": { - "version": "4.10.8", - "resolved": "https://registry.npmjs.org/@wordpress/notices/-/notices-4.10.8.tgz", - "integrity": "sha512-40m5Pt64h6OFu19/o9Xoxs57JcwiS2wSgOxSBWj5u0xLLanSTPbG7/jWhj2MpSlYMxFpc7vupD+NUwWqwMe5xw==", + "version": "4.10.9", + "resolved": "https://registry.npmjs.org/@wordpress/notices/-/notices-4.10.9.tgz", + "integrity": "sha512-Co7JuUgaZonooaRbXlfQGrfE4HK6kNcmaS5gJBWBYH79aOWyNt2ENZxdFHMDQIN+9v0UlB7rOFAQSG24EsgVZQ==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/a11y": "^3.42.8", - "@wordpress/data": "^9.12.8" + "@wordpress/a11y": "^3.42.9", + "@wordpress/data": "^9.12.9" }, "engines": { "node": ">=12" @@ -7703,18 +7703,18 @@ } }, "node_modules/@wordpress/nux": { - "version": "8.4.8", - "resolved": "https://registry.npmjs.org/@wordpress/nux/-/nux-8.4.8.tgz", - "integrity": "sha512-MNwMlVWc5LYq9FGy8CZPPjqoRdCOZi4BvLIvedp6gngkATtJY+7YNHWu6GhKuEk0P7YyW5qLEOClWHzJX9npgw==", + "version": "8.4.9", + "resolved": "https://registry.npmjs.org/@wordpress/nux/-/nux-8.4.9.tgz", + "integrity": "sha512-a6JWKQk91B+wLwyGogxqSXSTzM2eC25+Z1nP/Bpe2P7p3vcxpeut3Jy1XIpiXDuH82YFxnnRx2lJb5qTsROEhA==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/components": "^25.8.8", - "@wordpress/compose": "^6.19.8", - "@wordpress/data": "^9.12.8", - "@wordpress/deprecated": "^3.42.8", - "@wordpress/element": "^5.19.8", - "@wordpress/i18n": "^4.42.8", - "@wordpress/icons": "^9.33.8", + "@wordpress/components": "^25.8.9", + "@wordpress/compose": "^6.19.9", + "@wordpress/data": "^9.12.9", + "@wordpress/deprecated": "^3.42.9", + "@wordpress/element": "^5.19.9", + "@wordpress/i18n": "^4.42.9", + "@wordpress/icons": "^9.33.9", "rememo": "^4.0.2" }, "engines": { @@ -7726,24 +7726,24 @@ } }, "node_modules/@wordpress/patterns": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/@wordpress/patterns/-/patterns-1.3.8.tgz", - "integrity": "sha512-j29U3EZpDSfURZ87+MKaPmYXXmSwA0YRFx2unry5B2ZLN9Lh2y3H0HA71RjocWUZHgwQ7KgrS1ug1tqh6g/2/Q==", + "version": "1.3.9", + "resolved": "https://registry.npmjs.org/@wordpress/patterns/-/patterns-1.3.9.tgz", + "integrity": "sha512-zvSfE8wdXxlKHONYH0tvYMOlH0eMI5sXUhDAfqYH1B1OQ4Clq84jc0r+X/iolvD/WjuyP4b6K3P91almrRqBnA==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/block-editor": "^12.10.8", - "@wordpress/blocks": "^12.19.8", - "@wordpress/components": "^25.8.8", - "@wordpress/compose": "^6.19.8", - "@wordpress/core-data": "^6.19.8", - "@wordpress/data": "^9.12.8", - "@wordpress/element": "^5.19.8", - "@wordpress/html-entities": "^3.42.8", - "@wordpress/i18n": "^4.42.8", - "@wordpress/icons": "^9.33.8", - "@wordpress/notices": "^4.10.8", - "@wordpress/private-apis": "^0.24.8", - "@wordpress/url": "^3.43.8" + "@wordpress/block-editor": "^12.10.9", + "@wordpress/blocks": "^12.19.9", + "@wordpress/components": "^25.8.9", + "@wordpress/compose": "^6.19.9", + "@wordpress/core-data": "^6.19.9", + "@wordpress/data": "^9.12.9", + "@wordpress/element": "^5.19.9", + "@wordpress/html-entities": "^3.42.9", + "@wordpress/i18n": "^4.42.9", + "@wordpress/icons": "^9.33.9", + "@wordpress/notices": "^4.10.9", + "@wordpress/private-apis": "^0.24.9", + "@wordpress/url": "^3.43.9" }, "engines": { "node": ">=16.0.0" @@ -7754,17 +7754,17 @@ } }, "node_modules/@wordpress/plugins": { - "version": "6.10.8", - "resolved": "https://registry.npmjs.org/@wordpress/plugins/-/plugins-6.10.8.tgz", - "integrity": "sha512-zH2ExHxro4+HubHzb4VucslZwriKl5EHlFpQFLXVduIrrglmLPmoR9wbioGkAsen2P0Ny+v61lwJjdWpeK2ZWw==", + "version": "6.10.9", + "resolved": "https://registry.npmjs.org/@wordpress/plugins/-/plugins-6.10.9.tgz", + "integrity": "sha512-jOdxubWwBlMh5YRVKJ6BA0tj+awJLfDdYHXTwwW3CW9dZMKPLbWGw6SBSAQXtdjLlJ6dJewvMjCsAxc1fIJSwg==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/components": "^25.8.8", - "@wordpress/compose": "^6.19.8", - "@wordpress/element": "^5.19.8", - "@wordpress/hooks": "^3.42.8", - "@wordpress/icons": "^9.33.8", - "@wordpress/is-shallow-equal": "^4.42.8", + "@wordpress/components": "^25.8.9", + "@wordpress/compose": "^6.19.9", + "@wordpress/element": "^5.19.9", + "@wordpress/hooks": "^3.42.9", + "@wordpress/icons": "^9.33.9", + "@wordpress/is-shallow-equal": "^4.42.9", "memize": "^2.0.1" }, "engines": { @@ -7792,17 +7792,17 @@ } }, "node_modules/@wordpress/preferences": { - "version": "3.19.8", - "resolved": "https://registry.npmjs.org/@wordpress/preferences/-/preferences-3.19.8.tgz", - "integrity": "sha512-+/NdmLZ845KJnYB/O2OLmq5ZtiSf43/SJzdbCktODPQQacF2GqyMte0NHDm31RSihwiOGt332kLhg5Uf9SvwXA==", + "version": "3.19.9", + "resolved": "https://registry.npmjs.org/@wordpress/preferences/-/preferences-3.19.9.tgz", + "integrity": "sha512-WWNb6U1FufAdff5365fmmbW5o3UGkegXaQ5tzW5ONtFiugThIZ29VSSJCBeYhq5D3PaRsKGR6r1iZdqt/Crv1Q==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/a11y": "^3.42.8", - "@wordpress/components": "^25.8.8", - "@wordpress/data": "^9.12.8", - "@wordpress/element": "^5.19.8", - "@wordpress/i18n": "^4.42.8", - "@wordpress/icons": "^9.33.8", + "@wordpress/a11y": "^3.42.9", + "@wordpress/components": "^25.8.9", + "@wordpress/data": "^9.12.9", + "@wordpress/element": "^5.19.9", + "@wordpress/i18n": "^4.42.9", + "@wordpress/icons": "^9.33.9", "classnames": "^2.3.1" }, "engines": { @@ -7814,21 +7814,21 @@ } }, "node_modules/@wordpress/preferences-persistence": { - "version": "1.34.8", - "resolved": "https://registry.npmjs.org/@wordpress/preferences-persistence/-/preferences-persistence-1.34.8.tgz", - "integrity": "sha512-1LSpOJcjUsoL2xJ3olQS2Bap7kuW/rcIf0ZhFkdHX5gZzwZXm6tthBxROFSsXNznI1MzAvp3nPOYH+zG1i2i6Q==", + "version": "1.34.9", + "resolved": "https://registry.npmjs.org/@wordpress/preferences-persistence/-/preferences-persistence-1.34.9.tgz", + "integrity": "sha512-H05GoyBh7I23vhv3lej3vLRRi716Ln/j+Nb2AHOMemFNKehpcFTtpepmRNyM62bAeEta3OEL8uWZh601yOI8zg==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/api-fetch": "^6.39.8" + "@wordpress/api-fetch": "^6.39.9" }, "engines": { "node": ">=12" } }, "node_modules/@wordpress/prettier-config": { - "version": "2.25.8", - "resolved": "https://registry.npmjs.org/@wordpress/prettier-config/-/prettier-config-2.25.8.tgz", - "integrity": "sha512-u2ixIFhw8YyrlQ1HEy9sDPTDxiOj6cPEEDI4ObGnrKIQVcE90CJpswyquBU23b++I9htJpklGWk7sotUOBlvgg==", + "version": "2.25.9", + "resolved": "https://registry.npmjs.org/@wordpress/prettier-config/-/prettier-config-2.25.9.tgz", + "integrity": "sha512-R1vc/HAp9dsQzg4wbKhCDTGzVvPSXb4ZJZ0ed8nyAcegbYGPcJZSgJKEl6JrNialU6OzNygXz2Og6cy21DYCFQ==", "dev": true, "engines": { "node": ">=14" @@ -7838,12 +7838,12 @@ } }, "node_modules/@wordpress/primitives": { - "version": "3.40.8", - "resolved": "https://registry.npmjs.org/@wordpress/primitives/-/primitives-3.40.8.tgz", - "integrity": "sha512-kkqvnw617T9q13YeWbNNrhtGa90fqXrxZueONXDEzFkeMO1VKU77g3OQ48g04DpeSSrcNT6MQVSZcqeAfulPHQ==", + "version": "3.40.9", + "resolved": "https://registry.npmjs.org/@wordpress/primitives/-/primitives-3.40.9.tgz", + "integrity": "sha512-jV66szHVhATrw8vOSogGx3Rn4X2VPFshwjGWdbxfY3nYiYnQ6XrXePDFX/rTExMNyaTGRWQRviUzlyvqxqCWgw==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/element": "^5.19.8", + "@wordpress/element": "^5.19.9", "classnames": "^2.3.1" }, "engines": { @@ -7851,9 +7851,9 @@ } }, "node_modules/@wordpress/priority-queue": { - "version": "2.42.8", - "resolved": "https://registry.npmjs.org/@wordpress/priority-queue/-/priority-queue-2.42.8.tgz", - "integrity": "sha512-ww9TmFyLCW6W+FrcyrYvIAxQ6lYY9g0CAbWIVE47n1yQj3AtDrLJ4RFkgkEKrrEyXPDjmX383irLOV1q6GcsaQ==", + "version": "2.42.9", + "resolved": "https://registry.npmjs.org/@wordpress/priority-queue/-/priority-queue-2.42.9.tgz", + "integrity": "sha512-YSkVlGRACfqujGDUhRMBqHaIKJKqGXTQegMrMctdr6O1twvD80Xc2M86fvL0EBlMUnfQ+dqqE2htYqFGu2NitQ==", "dependencies": { "@babel/runtime": "^7.16.0", "requestidlecallback": "^0.3.0" @@ -7863,9 +7863,9 @@ } }, "node_modules/@wordpress/private-apis": { - "version": "0.24.8", - "resolved": "https://registry.npmjs.org/@wordpress/private-apis/-/private-apis-0.24.8.tgz", - "integrity": "sha512-wfI7QoXQRTIt22bZXjMQO5xYstnI76l/OYpPF67N8TPtvOcZ2hR+FpFVY72kl2Hgjp0XBY0sXapncFWJ/wCNHQ==", + "version": "0.24.9", + "resolved": "https://registry.npmjs.org/@wordpress/private-apis/-/private-apis-0.24.9.tgz", + "integrity": "sha512-QxXLA/57CwVDWrTRAHNn1nmm3jbegmfFeH0yp70wikns5JlIIZUcpVpvOjLsW/NNzbKppoUlVDJ3/YfnHQKVeA==", "dependencies": { "@babel/runtime": "^7.16.0" }, @@ -7874,9 +7874,9 @@ } }, "node_modules/@wordpress/redux-routine": { - "version": "4.42.8", - "resolved": "https://registry.npmjs.org/@wordpress/redux-routine/-/redux-routine-4.42.8.tgz", - "integrity": "sha512-L2sDJkn0kVQRgGzmxJLRml7jQHjCWYmKiyeDbbsTjq1cw4+ra3qX1pEmMnP3RXlheFBecvfZmj8FakFgxEd6+A==", + "version": "4.42.9", + "resolved": "https://registry.npmjs.org/@wordpress/redux-routine/-/redux-routine-4.42.9.tgz", + "integrity": "sha512-rhY7yqXVnOR5tvGZowlPBVI5qGARVogPzMkX0I6+ThtHTkGZ3dR38c34IAYDmCki8OLeJIiVqH/hikQknXlO7w==", "dependencies": { "@babel/runtime": "^7.16.0", "is-plain-object": "^5.0.0", @@ -7891,22 +7891,22 @@ } }, "node_modules/@wordpress/reusable-blocks": { - "version": "4.19.8", - "resolved": "https://registry.npmjs.org/@wordpress/reusable-blocks/-/reusable-blocks-4.19.8.tgz", - "integrity": "sha512-oS4VVwpaDbnRoPpH+yJB+6zvhVDwIqFH00CtWPZlNKldUZEPAm3nv2EqVx9TpSZfJUOG8uK9kbuB/lHyOn6i0Q==", + "version": "4.19.9", + "resolved": "https://registry.npmjs.org/@wordpress/reusable-blocks/-/reusable-blocks-4.19.9.tgz", + "integrity": "sha512-ZXhANpogA3FmyNuFwj3NvyePY4WQFU0lYZCTvWIXHZi9DHlcqHcIbaFD1uhsvS2k8KNLjuEVh1wyvh8SCo+hBw==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/block-editor": "^12.10.8", - "@wordpress/blocks": "^12.19.8", - "@wordpress/components": "^25.8.8", - "@wordpress/core-data": "^6.19.8", - "@wordpress/data": "^9.12.8", - "@wordpress/element": "^5.19.8", - "@wordpress/i18n": "^4.42.8", - "@wordpress/icons": "^9.33.8", - "@wordpress/notices": "^4.10.8", - "@wordpress/private-apis": "^0.24.8", - "@wordpress/url": "^3.43.8" + "@wordpress/block-editor": "^12.10.9", + "@wordpress/blocks": "^12.19.9", + "@wordpress/components": "^25.8.9", + "@wordpress/core-data": "^6.19.9", + "@wordpress/data": "^9.12.9", + "@wordpress/element": "^5.19.9", + "@wordpress/i18n": "^4.42.9", + "@wordpress/icons": "^9.33.9", + "@wordpress/notices": "^4.10.9", + "@wordpress/private-apis": "^0.24.9", + "@wordpress/url": "^3.43.9" }, "engines": { "node": ">=12" @@ -7917,19 +7917,19 @@ } }, "node_modules/@wordpress/rich-text": { - "version": "6.19.8", - "resolved": "https://registry.npmjs.org/@wordpress/rich-text/-/rich-text-6.19.8.tgz", - "integrity": "sha512-LBiivMfpDX2zvN/dnGU47r1XTg/qkn8xffYbkl9q9YMx/MJ5vaoK60UrvdZNIORRQ3sxkQCzNflDWrWTe8zu/w==", + "version": "6.19.9", + "resolved": "https://registry.npmjs.org/@wordpress/rich-text/-/rich-text-6.19.9.tgz", + "integrity": "sha512-K7B3YvpJqsKgjPDiC3sFFJ814ErUcv9gXdVVQ25HVXnEs9GT4MX56PW13nbQAaEh03Y2/2w0hSPAsav/WOUd6Q==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/a11y": "^3.42.8", - "@wordpress/compose": "^6.19.8", - "@wordpress/data": "^9.12.8", - "@wordpress/deprecated": "^3.42.8", - "@wordpress/element": "^5.19.8", - "@wordpress/escape-html": "^2.42.8", - "@wordpress/i18n": "^4.42.8", - "@wordpress/keycodes": "^3.42.8", + "@wordpress/a11y": "^3.42.9", + "@wordpress/compose": "^6.19.9", + "@wordpress/data": "^9.12.9", + "@wordpress/deprecated": "^3.42.9", + "@wordpress/element": "^5.19.9", + "@wordpress/escape-html": "^2.42.9", + "@wordpress/i18n": "^4.42.9", + "@wordpress/keycodes": "^3.42.9", "memize": "^2.1.0", "rememo": "^4.0.2" }, @@ -7941,14 +7941,14 @@ } }, "node_modules/@wordpress/router": { - "version": "0.11.8", - "resolved": "https://registry.npmjs.org/@wordpress/router/-/router-0.11.8.tgz", - "integrity": "sha512-+NFvQgyZJ6jW6F49bAImtN4i/srhEe2k4A5NPM1u14i+LgPHsDbXKZm9C0f+vyhKe+iUm6yghv+WmDZDTNLHbA==", + "version": "0.11.9", + "resolved": "https://registry.npmjs.org/@wordpress/router/-/router-0.11.9.tgz", + "integrity": "sha512-bSuNqVCkABzdeh1ORKb2uenyK7QjLBma79xcFIux0fhPt9uXn5QLocKG0apExaNKofssCyF6XF4EL5NuaXZSLQ==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/element": "^5.19.8", - "@wordpress/private-apis": "^0.24.8", - "@wordpress/url": "^3.43.8", + "@wordpress/element": "^5.19.9", + "@wordpress/private-apis": "^0.24.9", + "@wordpress/url": "^3.43.9", "history": "^5.1.0" }, "engines": { @@ -7959,24 +7959,24 @@ } }, "node_modules/@wordpress/scripts": { - "version": "26.13.8", - "resolved": "https://registry.npmjs.org/@wordpress/scripts/-/scripts-26.13.8.tgz", - "integrity": "sha512-zYJMPJdhEY/YbqM5ZbpM3ZFNJ/tRa48f5pbdD99b2pHFTu820UG8sYDtb7HpzXHfxe9S6QzNJjdgqsdQMVr0+Q==", + "version": "26.13.9", + "resolved": "https://registry.npmjs.org/@wordpress/scripts/-/scripts-26.13.9.tgz", + "integrity": "sha512-+EM2f9s2U1WwlhKgXCQfdYLI3qGm3+eFTgStRBI9+AzVGyGu7s0/sTQm7ekmvs5nSFTBk6OjYQ/jxNhvz860pw==", "dev": true, "dependencies": { "@babel/core": "^7.16.0", "@pmmmwh/react-refresh-webpack-plugin": "^0.5.2", "@svgr/webpack": "^8.0.1", - "@wordpress/babel-preset-default": "^7.26.8", - "@wordpress/browserslist-config": "^5.25.8", - "@wordpress/dependency-extraction-webpack-plugin": "^4.25.8", - "@wordpress/e2e-test-utils-playwright": "^0.10.8", - "@wordpress/eslint-plugin": "^16.0.8", - "@wordpress/jest-preset-default": "^11.13.8", - "@wordpress/npm-package-json-lint-config": "^4.27.8", - "@wordpress/postcss-plugins-preset": "^4.26.8", - "@wordpress/prettier-config": "^2.25.8", - "@wordpress/stylelint-config": "^21.25.8", + "@wordpress/babel-preset-default": "^7.26.9", + "@wordpress/browserslist-config": "^5.25.9", + "@wordpress/dependency-extraction-webpack-plugin": "^4.25.9", + "@wordpress/e2e-test-utils-playwright": "^0.10.9", + "@wordpress/eslint-plugin": "^16.0.9", + "@wordpress/jest-preset-default": "^11.13.9", + "@wordpress/npm-package-json-lint-config": "^4.27.9", + "@wordpress/postcss-plugins-preset": "^4.26.9", + "@wordpress/prettier-config": "^2.25.9", + "@wordpress/stylelint-config": "^21.25.9", "adm-zip": "^0.5.9", "babel-jest": "^29.6.2", "babel-loader": "^8.2.3", @@ -8375,20 +8375,20 @@ } }, "node_modules/@wordpress/server-side-render": { - "version": "4.19.8", - "resolved": "https://registry.npmjs.org/@wordpress/server-side-render/-/server-side-render-4.19.8.tgz", - "integrity": "sha512-8vrP5BFlMAG1uJBvjt9cQl8T92GmRJACQ8UOCUz0AHTECfC/0IW+rSPU2MyJbmxJTl3wVN2k5HLf9pv3IEsSOQ==", + "version": "4.19.9", + "resolved": "https://registry.npmjs.org/@wordpress/server-side-render/-/server-side-render-4.19.9.tgz", + "integrity": "sha512-eHu9VjoREDsgD+p6vGgTEcZ2W7f7Xnd1DOQAb9ZBDWkr8XxPcd5wjhxiBIP4xz70UrYeByuZpcZ0ngXoP5xwtw==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/api-fetch": "^6.39.8", - "@wordpress/blocks": "^12.19.8", - "@wordpress/components": "^25.8.8", - "@wordpress/compose": "^6.19.8", - "@wordpress/data": "^9.12.8", - "@wordpress/deprecated": "^3.42.8", - "@wordpress/element": "^5.19.8", - "@wordpress/i18n": "^4.42.8", - "@wordpress/url": "^3.43.8", + "@wordpress/api-fetch": "^6.39.9", + "@wordpress/blocks": "^12.19.9", + "@wordpress/components": "^25.8.9", + "@wordpress/compose": "^6.19.9", + "@wordpress/data": "^9.12.9", + "@wordpress/deprecated": "^3.42.9", + "@wordpress/element": "^5.19.9", + "@wordpress/i18n": "^4.42.9", + "@wordpress/url": "^3.43.9", "fast-deep-equal": "^3.1.3" }, "engines": { @@ -8400,9 +8400,9 @@ } }, "node_modules/@wordpress/shortcode": { - "version": "3.42.8", - "resolved": "https://registry.npmjs.org/@wordpress/shortcode/-/shortcode-3.42.8.tgz", - "integrity": "sha512-b9rujekRuie8fwO01LgGLInC2WFQxYdlq5tnj6Zp9cwcOQFSJP4NDVvsfZohUZGgfkSLBusb3ljGfmFCtOAtGg==", + "version": "3.42.9", + "resolved": "https://registry.npmjs.org/@wordpress/shortcode/-/shortcode-3.42.9.tgz", + "integrity": "sha512-t8M65OyNITU4zs1GLxNGxrP8kVS+JErjhHs/OA5JEuhB94HUVz6vPHux3MmwbgEzWjCyFcyMhaKyy51GLLfWpQ==", "dependencies": { "@babel/runtime": "^7.16.0", "memize": "^2.0.1" @@ -8412,9 +8412,9 @@ } }, "node_modules/@wordpress/style-engine": { - "version": "1.25.8", - "resolved": "https://registry.npmjs.org/@wordpress/style-engine/-/style-engine-1.25.8.tgz", - "integrity": "sha512-kf0e/U33YNgAlvpF/NnQ2BO3c2ATExRR5nb+47IPgayqsNKSU30aRbGc2ncrhYg297noDH5E679936M/QcJ1+w==", + "version": "1.25.9", + "resolved": "https://registry.npmjs.org/@wordpress/style-engine/-/style-engine-1.25.9.tgz", + "integrity": "sha512-DgYBCunHbe6dgjOkI9euvjbZeO5coolkhZI02niF2aCZHBXXyfkLl/VEBqJhotZ1peBUKaF0rQCStivnvMrYDA==", "dependencies": { "@babel/runtime": "^7.16.0", "change-case": "^4.1.2" @@ -8440,9 +8440,9 @@ } }, "node_modules/@wordpress/sync": { - "version": "0.4.8", - "resolved": "https://registry.npmjs.org/@wordpress/sync/-/sync-0.4.8.tgz", - "integrity": "sha512-e/ujr8ZoVwF46oxRjFmwtfL6QKtlz0rA0HV8D7uye8lkIi3Dl6ytIfVQfPYj58LYaQEfBR5p7ydmsuK54N2IkA==", + "version": "0.4.9", + "resolved": "https://registry.npmjs.org/@wordpress/sync/-/sync-0.4.9.tgz", + "integrity": "sha512-t04zhd6wjc4tgvMk1nRCOLkLg0ebEWODAE4bJ14GUzkpW5Y4txJLvqOMNIq/CV0YYEI71/4l32b+YIWKRhrHaQ==", "dependencies": { "@babel/runtime": "^7.16.0", "y-indexeddb": "~9.0.11", @@ -8454,9 +8454,9 @@ } }, "node_modules/@wordpress/token-list": { - "version": "2.42.8", - "resolved": "https://registry.npmjs.org/@wordpress/token-list/-/token-list-2.42.8.tgz", - "integrity": "sha512-Sk9sgfBKYTBsbbcdCj7I8RR2q35GPYZ8SAa2hW8LfbHftxlpg640MTLoEZVoJ8bKCj6+4sEu0uxyCyC7pTWDVw==", + "version": "2.42.9", + "resolved": "https://registry.npmjs.org/@wordpress/token-list/-/token-list-2.42.9.tgz", + "integrity": "sha512-C1+nitSAVqftjPHyRQxiZmqpQUtMU4mYOj+TQ591Rd2ErOoBU42wzySafhqozelew8JyV19TDSVRqlpJzh/aAA==", "dependencies": { "@babel/runtime": "^7.16.0" }, @@ -8465,21 +8465,21 @@ } }, "node_modules/@wordpress/undo-manager": { - "version": "0.2.8", - "resolved": "https://registry.npmjs.org/@wordpress/undo-manager/-/undo-manager-0.2.8.tgz", - "integrity": "sha512-BakaKB3zFeTYBsVtpXCD9/AYnI3NbHxLQaeJhuQaZXZ+MWoxJSLt48XrEmLYNSNZJ5sXs2ZuSNSy4Wi9Gm3c1g==", + "version": "0.2.9", + "resolved": "https://registry.npmjs.org/@wordpress/undo-manager/-/undo-manager-0.2.9.tgz", + "integrity": "sha512-YDArAWNvvH9AkXgxmhT560+rFzLs4w7S7LQmzzU/ej4CRFFuJ0qHdvsucX8lStdKyZ08hMky3HUBrwgDkav8ug==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/is-shallow-equal": "^4.42.8" + "@wordpress/is-shallow-equal": "^4.42.9" }, "engines": { "node": ">=12" } }, "node_modules/@wordpress/url": { - "version": "3.43.8", - "resolved": "https://registry.npmjs.org/@wordpress/url/-/url-3.43.8.tgz", - "integrity": "sha512-ZjNNaLbtv43B9XVt6wCFfB2YOSNAntYB0azARw91zBAq/QEqAUnzNCa4WZyj7NtsKQ9+hbo46Uw+PNgdJ1wulg==", + "version": "3.43.9", + "resolved": "https://registry.npmjs.org/@wordpress/url/-/url-3.43.9.tgz", + "integrity": "sha512-bpOK3EAu8K8nFf8G5cDzenPOYBPu34s6OMwq79rK+Jvcu4cnLH+doYm0HWUvffsi9suTu2Igm6rPnmAR9+xGuw==", "dependencies": { "@babel/runtime": "^7.16.0", "remove-accents": "^0.5.0" @@ -8489,14 +8489,14 @@ } }, "node_modules/@wordpress/viewport": { - "version": "5.19.8", - "resolved": "https://registry.npmjs.org/@wordpress/viewport/-/viewport-5.19.8.tgz", - "integrity": "sha512-QFC8ZSdESs/vjkFSrLYuxT0bBJOw5jr1/beRcyJdR4qVu6q5vGe3F63W8qQgNtnufQ7XcTS/+Zz39bQZE02eHA==", + "version": "5.19.9", + "resolved": "https://registry.npmjs.org/@wordpress/viewport/-/viewport-5.19.9.tgz", + "integrity": "sha512-HLivhA8eXlCKguFBWOex4KcnZSyVA918TMUjN4YHnRE68hMNRMrVeswcYLlq4t3WH7e6q8a3rM0As32mV6c8ZQ==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/compose": "^6.19.8", - "@wordpress/data": "^9.12.8", - "@wordpress/element": "^5.19.8" + "@wordpress/compose": "^6.19.9", + "@wordpress/data": "^9.12.9", + "@wordpress/element": "^5.19.9" }, "engines": { "node": ">=12" @@ -8506,30 +8506,30 @@ } }, "node_modules/@wordpress/warning": { - "version": "2.42.8", - "resolved": "https://registry.npmjs.org/@wordpress/warning/-/warning-2.42.8.tgz", - "integrity": "sha512-4xuUwm+Hr1ot0w9s58gA3fs43rZ4nhoF8ClOTqcp3U7WsnVw1cfrv30lXzF7LXOtHbXhuD88b+0KsLwvcYNARA==", + "version": "2.42.9", + "resolved": "https://registry.npmjs.org/@wordpress/warning/-/warning-2.42.9.tgz", + "integrity": "sha512-/IlPgNZGP/m0LeJuamfUe7C5H1c0nNFnKHNsaQ/barXVij9Idah5gDR26XSlkwY1MQcrM0ECKf11pizY9ug3IA==", "engines": { "node": ">=12" } }, "node_modules/@wordpress/widgets": { - "version": "3.19.8", - "resolved": "https://registry.npmjs.org/@wordpress/widgets/-/widgets-3.19.8.tgz", - "integrity": "sha512-nww+iLijZWV0lV0CK30knr13t1G19Wjmwp9fspv+xjwZJ6LAOCYOH63z5lvwnv1Mj+YfJNIgTmXsXd1qPk050A==", + "version": "3.19.9", + "resolved": "https://registry.npmjs.org/@wordpress/widgets/-/widgets-3.19.9.tgz", + "integrity": "sha512-KLFc9Cy9kelmPz3t/wLpiJrIaOVK0cs864adHIFdkkWISd37MquMH8TleqvHqx+NNWXkYq8uuH/Wh/tpvoCSlA==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/api-fetch": "^6.39.8", - "@wordpress/block-editor": "^12.10.8", - "@wordpress/blocks": "^12.19.8", - "@wordpress/components": "^25.8.8", - "@wordpress/compose": "^6.19.8", - "@wordpress/core-data": "^6.19.8", - "@wordpress/data": "^9.12.8", - "@wordpress/element": "^5.19.8", - "@wordpress/i18n": "^4.42.8", - "@wordpress/icons": "^9.33.8", - "@wordpress/notices": "^4.10.8", + "@wordpress/api-fetch": "^6.39.9", + "@wordpress/block-editor": "^12.10.9", + "@wordpress/blocks": "^12.19.9", + "@wordpress/components": "^25.8.9", + "@wordpress/compose": "^6.19.9", + "@wordpress/core-data": "^6.19.9", + "@wordpress/data": "^9.12.9", + "@wordpress/element": "^5.19.9", + "@wordpress/i18n": "^4.42.9", + "@wordpress/icons": "^9.33.9", + "@wordpress/notices": "^4.10.9", "classnames": "^2.3.1" }, "peerDependencies": { @@ -8538,9 +8538,9 @@ } }, "node_modules/@wordpress/wordcount": { - "version": "3.42.8", - "resolved": "https://registry.npmjs.org/@wordpress/wordcount/-/wordcount-3.42.8.tgz", - "integrity": "sha512-LRqJOT427bcqwusbqhlSjd+FNOMcFZEAoO2zS4OaZMkDrQSkhQCV1XHZNqkoWGuYssULC44CGBXA1bn9KO0PvA==", + "version": "3.42.9", + "resolved": "https://registry.npmjs.org/@wordpress/wordcount/-/wordcount-3.42.9.tgz", + "integrity": "sha512-hFTeVcoN/l341LlN349GyD3nEEUwwOWCmgr8BD+Lyp2J6G9kSUW9g3KQH8QU9b2x9+vtqKmiy52kf6sgTW4m4g==", "dependencies": { "@babel/runtime": "^7.16.0" }, @@ -13742,12 +13742,12 @@ } }, "node_modules/es-shim-unscopables": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz", - "integrity": "sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz", + "integrity": "sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==", "dev": true, "dependencies": { - "has": "^1.0.3" + "hasown": "^2.0.0" } }, "node_modules/es-to-primitive": { @@ -13959,26 +13959,26 @@ } }, "node_modules/eslint-plugin-import": { - "version": "2.28.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.28.1.tgz", - "integrity": "sha512-9I9hFlITvOV55alzoKBI+K9q74kv0iKMeY6av5+umsNwayt59fz692daGyjR+oStBQgx6nwR9rXldDev3Clw+A==", + "version": "2.29.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.29.0.tgz", + "integrity": "sha512-QPOO5NO6Odv5lpoTkddtutccQjysJuFxoPS7fAHO+9m9udNHvTCPSAMW9zGAYj8lAIdr40I8yPCdUYrncXtrwg==", "dev": true, "dependencies": { - "array-includes": "^3.1.6", - "array.prototype.findlastindex": "^1.2.2", - "array.prototype.flat": "^1.3.1", - "array.prototype.flatmap": "^1.3.1", + "array-includes": "^3.1.7", + "array.prototype.findlastindex": "^1.2.3", + "array.prototype.flat": "^1.3.2", + "array.prototype.flatmap": "^1.3.2", "debug": "^3.2.7", "doctrine": "^2.1.0", - "eslint-import-resolver-node": "^0.3.7", + "eslint-import-resolver-node": "^0.3.9", "eslint-module-utils": "^2.8.0", - "has": "^1.0.3", - "is-core-module": "^2.13.0", + "hasown": "^2.0.0", + "is-core-module": "^2.13.1", "is-glob": "^4.0.3", "minimatch": "^3.1.2", - "object.fromentries": "^2.0.6", - "object.groupby": "^1.0.0", - "object.values": "^1.1.6", + "object.fromentries": "^2.0.7", + "object.groupby": "^1.0.1", + "object.values": "^1.1.7", "semver": "^6.3.1", "tsconfig-paths": "^3.14.2" }, @@ -14020,9 +14020,9 @@ } }, "node_modules/eslint-plugin-jest": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-27.4.2.tgz", - "integrity": "sha512-3Nfvv3wbq2+PZlRTf2oaAWXWwbdBejFRBR2O8tAO67o+P8zno+QGbcDYaAXODlreXVg+9gvWhKKmG2rgfb8GEg==", + "version": "27.4.3", + "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-27.4.3.tgz", + "integrity": "sha512-7S6SmmsHsgIm06BAGCAxL+ABd9/IB3MWkz2pudj6Qqor2y1qQpWPfuFU4SG9pWj4xDjF0e+D7Llh5useuSzAZw==", "dev": true, "dependencies": { "@typescript-eslint/utils": "^5.10.0" @@ -16347,9 +16347,12 @@ } }, "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/function.prototype.name": { "version": "1.1.5", @@ -17964,6 +17967,7 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, "dependencies": { "function-bind": "^1.1.1" }, @@ -18122,6 +18126,17 @@ "node": ">=0.10.0" } }, + "node_modules/hasown": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", + "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/header-case": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/header-case/-/header-case-2.0.4.tgz", @@ -19168,11 +19183,11 @@ } }, "node_modules/is-core-module": { - "version": "2.13.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.0.tgz", - "integrity": "sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==", + "version": "2.13.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", + "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", "dependencies": { - "has": "^1.0.3" + "hasown": "^2.0.0" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -25760,14 +25775,14 @@ } }, "node_modules/object.values": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.6.tgz", - "integrity": "sha512-FVVTkD1vENCsAcwNs9k6jea2uHC/X0+JcjG8YA60FN5CMaJmG95wT9jek/xX9nornqGRrBkKtzuAu2wuHpKqvw==", + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.7.tgz", + "integrity": "sha512-aU6xnDFYT3x17e/f0IiiwlGPTy2jzMySGfUB4fq6z7CV8l85CWHDk5ErhyhpfDHhrOMwGFhSQkhMGHaIotA6Ng==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4" + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" }, "engines": { "node": ">= 0.4" @@ -38107,9 +38122,9 @@ "integrity": "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==" }, "@types/semver": { - "version": "7.5.3", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.3.tgz", - "integrity": "sha512-OxepLK9EuNEIPxWNME+C6WwbRAOOI2o2BaQEGzz5Lu2e4Z5eDnEo+/aVEDMIXywoJitJ7xWd641wrGLZdtwRyw==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-MMzuxN3GdFwskAnb6fz0orFvhfqi752yjaXylr0Rp4oDg5H0Zn1IuyRhDVvYOwAXoJirx2xuS16I3WjxnAIHiQ==", "dev": true }, "@types/serve-index": { @@ -38545,43 +38560,43 @@ "dev": true }, "@wordpress/a11y": { - "version": "3.42.8", - "resolved": "https://registry.npmjs.org/@wordpress/a11y/-/a11y-3.42.8.tgz", - "integrity": "sha512-kFCJviURKobuUfqFNdYS19FAnhvKCPY45cWLrUtAWS8t85gXvhSYB1ai2OrLtMPUpwHHhWms4KqReAFWdqXGCQ==", + "version": "3.42.9", + "resolved": "https://registry.npmjs.org/@wordpress/a11y/-/a11y-3.42.9.tgz", + "integrity": "sha512-ILGzRh+Aki2TXTOffEHzirerLIsvrvQEOYSSqGTdh4ZRK6aRMFcC23610LPNiHeDdactSB/NXyTBCdrsNAP3RQ==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/dom-ready": "^3.42.8", - "@wordpress/i18n": "^4.42.8" + "@wordpress/dom-ready": "^3.42.9", + "@wordpress/i18n": "^4.42.9" } }, "@wordpress/annotations": { - "version": "2.42.8", - "resolved": "https://registry.npmjs.org/@wordpress/annotations/-/annotations-2.42.8.tgz", - "integrity": "sha512-XavYRWtKzE2jZieVzZlMp3memKyyQ/0w+eT8L114vqFbvy4BotvtDZIatccE61ilUxwvM/TdKhQLHEsgH6/8lw==", + "version": "2.42.9", + "resolved": "https://registry.npmjs.org/@wordpress/annotations/-/annotations-2.42.9.tgz", + "integrity": "sha512-Cls7sy3PdhOTqEbHni7cD8I6X0/S4E1tLw0iB6yleLKaCTV6cf6zmebDOhroMeN29OOPfiGDp/WYGinvErOPqw==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/data": "^9.12.8", - "@wordpress/hooks": "^3.42.8", - "@wordpress/i18n": "^4.42.8", - "@wordpress/rich-text": "^6.19.8", + "@wordpress/data": "^9.12.9", + "@wordpress/hooks": "^3.42.9", + "@wordpress/i18n": "^4.42.9", + "@wordpress/rich-text": "^6.19.9", "rememo": "^4.0.2", "uuid": "^9.0.1" } }, "@wordpress/api-fetch": { - "version": "6.39.8", - "resolved": "https://registry.npmjs.org/@wordpress/api-fetch/-/api-fetch-6.39.8.tgz", - "integrity": "sha512-OMINmPwhlgm1AU8xFjswjOtSMn/5HOo0whx7r0iqY7CA9eRZccSg4xTHH9+UhK8VlnxQ48XyZKka55GtdCzu0g==", + "version": "6.39.9", + "resolved": "https://registry.npmjs.org/@wordpress/api-fetch/-/api-fetch-6.39.9.tgz", + "integrity": "sha512-FcS1rgn6MwBzQLKsSG0+JcTPzklvnbPEffMq97q7cFSQXsYwR4oRSyn6lYY/ZtNUnrbiE+wP763Q8uh5tsZesg==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/i18n": "^4.42.8", - "@wordpress/url": "^3.43.8" + "@wordpress/i18n": "^4.42.9", + "@wordpress/url": "^3.43.9" } }, "@wordpress/autop": { - "version": "3.42.8", - "resolved": "https://registry.npmjs.org/@wordpress/autop/-/autop-3.42.8.tgz", - "integrity": "sha512-/Vlv9yyrIONp6JGYfU6C7Ya9gQUFEnoV2tJ6/Pd4VojuT06NGYamNr/Mk2DoKFzJL2L4hBYPRVxcx32ibvDYKg==", + "version": "3.42.9", + "resolved": "https://registry.npmjs.org/@wordpress/autop/-/autop-3.42.9.tgz", + "integrity": "sha512-FmPS1444QEUVWEt29xHtzkO4zk042H97AevGTzm0j1rLC9GlotKC+YFU/KGsVgvdhtwSOGxUPydqKR1lMUd2aw==", "requires": { "@babel/runtime": "^7.16.0" } @@ -38593,9 +38608,9 @@ "dev": true }, "@wordpress/babel-preset-default": { - "version": "7.26.8", - "resolved": "https://registry.npmjs.org/@wordpress/babel-preset-default/-/babel-preset-default-7.26.8.tgz", - "integrity": "sha512-HRSuyDb+xWNKsNH1cso4YgTwaCJN0G+KluLkfR/5ng10Cf5sKwzBjAdRkmefyVMf9VPLIr1X6csY4mSht6g+Aw==", + "version": "7.26.9", + "resolved": "https://registry.npmjs.org/@wordpress/babel-preset-default/-/babel-preset-default-7.26.9.tgz", + "integrity": "sha512-UALMxZuxoliMX62VC9w+s4qy3bNWlQSMFvRcd5E+TBZuVs9Vl9rIUuhLGZwNP4IJ0Io5Z45W03pcXcjHT6dBvQ==", "dev": true, "requires": { "@babel/core": "^7.16.0", @@ -38604,10 +38619,10 @@ "@babel/preset-env": "^7.16.0", "@babel/preset-typescript": "^7.16.0", "@babel/runtime": "^7.16.0", - "@wordpress/babel-plugin-import-jsx-pragma": "^4.25.8", - "@wordpress/browserslist-config": "^5.25.8", - "@wordpress/element": "^5.19.8", - "@wordpress/warning": "^2.42.8", + "@wordpress/babel-plugin-import-jsx-pragma": "^4.25.9", + "@wordpress/browserslist-config": "^5.25.9", + "@wordpress/element": "^5.19.9", + "@wordpress/warning": "^2.42.9", "browserslist": "^4.21.9", "core-js": "^3.31.0" } @@ -38619,79 +38634,79 @@ "dev": true }, "@wordpress/blob": { - "version": "3.42.8", - "resolved": "https://registry.npmjs.org/@wordpress/blob/-/blob-3.42.8.tgz", - "integrity": "sha512-QDAyftImJznHyujfjVacI0VozqkKQAtn1jNTn5Dw4RZNVMRWSYU06mzhqW4IGEn5SI4w60th7s1OfMTDZsfFaA==", + "version": "3.42.9", + "resolved": "https://registry.npmjs.org/@wordpress/blob/-/blob-3.42.9.tgz", + "integrity": "sha512-C2Kn3PUwpXj91i019XxbMf0Rr8A3eoem5lryR4zpyMZW/1rZv2x+svo8xvpcza7mNpN2GfJGMC+fVd7RTvt6Qw==", "requires": { "@babel/runtime": "^7.16.0" } }, "@wordpress/block-directory": { - "version": "4.19.8", - "resolved": "https://registry.npmjs.org/@wordpress/block-directory/-/block-directory-4.19.8.tgz", - "integrity": "sha512-nCmldVS4wB8Yz/d4jliTuD2dRoOEqyTjy6KAdutvH+1PC41HfGDmtVDOzWcCRkXro16eymLkaD6ZI7Nnxqf4ZA==", + "version": "4.19.9", + "resolved": "https://registry.npmjs.org/@wordpress/block-directory/-/block-directory-4.19.9.tgz", + "integrity": "sha512-Y3bJMa7xFaI7AnwwlKpsFu6pxwJQcZGgGdfT4cYUh4uqDqUILSUwnOXQzgb2IptmqzniWjZWZtNKgng3nU/eQw==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/a11y": "^3.42.8", - "@wordpress/api-fetch": "^6.39.8", - "@wordpress/block-editor": "^12.10.8", - "@wordpress/blocks": "^12.19.8", - "@wordpress/components": "^25.8.8", - "@wordpress/compose": "^6.19.8", - "@wordpress/core-data": "^6.19.8", - "@wordpress/data": "^9.12.8", - "@wordpress/edit-post": "^7.19.8", - "@wordpress/editor": "^13.19.8", - "@wordpress/element": "^5.19.8", - "@wordpress/hooks": "^3.42.8", - "@wordpress/html-entities": "^3.42.8", - "@wordpress/i18n": "^4.42.8", - "@wordpress/icons": "^9.33.8", - "@wordpress/notices": "^4.10.8", - "@wordpress/plugins": "^6.10.8", - "@wordpress/url": "^3.43.8", + "@wordpress/a11y": "^3.42.9", + "@wordpress/api-fetch": "^6.39.9", + "@wordpress/block-editor": "^12.10.9", + "@wordpress/blocks": "^12.19.9", + "@wordpress/components": "^25.8.9", + "@wordpress/compose": "^6.19.9", + "@wordpress/core-data": "^6.19.9", + "@wordpress/data": "^9.12.9", + "@wordpress/edit-post": "^7.19.9", + "@wordpress/editor": "^13.19.9", + "@wordpress/element": "^5.19.9", + "@wordpress/hooks": "^3.42.9", + "@wordpress/html-entities": "^3.42.9", + "@wordpress/i18n": "^4.42.9", + "@wordpress/icons": "^9.33.9", + "@wordpress/notices": "^4.10.9", + "@wordpress/plugins": "^6.10.9", + "@wordpress/url": "^3.43.9", "change-case": "^4.1.2" } }, "@wordpress/block-editor": { - "version": "12.10.8", - "resolved": "https://registry.npmjs.org/@wordpress/block-editor/-/block-editor-12.10.8.tgz", - "integrity": "sha512-y0HmsSHjZ6zVyOagNl11SNKQ0ZJqA7jiMbGrALEq7W5YTbgQSOsetBYBpwxuBWuFGhqQJ0PCa+nfJIBUAXUbPA==", + "version": "12.10.9", + "resolved": "https://registry.npmjs.org/@wordpress/block-editor/-/block-editor-12.10.9.tgz", + "integrity": "sha512-O0QaUP4JU8nK6GZPNcts/0XlSkPlAc+J7m06LfK8WP5sStrZhxmE4IjiPrGStXXiZ4knjx23DufHkU3e/XjoKg==", "requires": { "@babel/runtime": "^7.16.0", "@emotion/react": "^11.7.1", "@emotion/styled": "^11.6.0", "@react-spring/web": "^9.4.5", - "@wordpress/a11y": "^3.42.8", - "@wordpress/api-fetch": "^6.39.8", - "@wordpress/blob": "^3.42.8", - "@wordpress/blocks": "^12.19.8", - "@wordpress/commands": "^0.13.8", - "@wordpress/components": "^25.8.8", - "@wordpress/compose": "^6.19.8", - "@wordpress/data": "^9.12.8", - "@wordpress/date": "^4.42.8", - "@wordpress/deprecated": "^3.42.8", - "@wordpress/dom": "^3.42.8", - "@wordpress/element": "^5.19.8", - "@wordpress/escape-html": "^2.42.8", - "@wordpress/hooks": "^3.42.8", - "@wordpress/html-entities": "^3.42.8", - "@wordpress/i18n": "^4.42.8", - "@wordpress/icons": "^9.33.8", - "@wordpress/is-shallow-equal": "^4.42.8", - "@wordpress/keyboard-shortcuts": "^4.19.8", - "@wordpress/keycodes": "^3.42.8", - "@wordpress/notices": "^4.10.8", - "@wordpress/preferences": "^3.19.8", - "@wordpress/private-apis": "^0.24.8", - "@wordpress/rich-text": "^6.19.8", - "@wordpress/shortcode": "^3.42.8", - "@wordpress/style-engine": "^1.25.8", - "@wordpress/token-list": "^2.42.8", - "@wordpress/url": "^3.43.8", - "@wordpress/warning": "^2.42.8", - "@wordpress/wordcount": "^3.42.8", + "@wordpress/a11y": "^3.42.9", + "@wordpress/api-fetch": "^6.39.9", + "@wordpress/blob": "^3.42.9", + "@wordpress/blocks": "^12.19.9", + "@wordpress/commands": "^0.13.9", + "@wordpress/components": "^25.8.9", + "@wordpress/compose": "^6.19.9", + "@wordpress/data": "^9.12.9", + "@wordpress/date": "^4.42.9", + "@wordpress/deprecated": "^3.42.9", + "@wordpress/dom": "^3.42.9", + "@wordpress/element": "^5.19.9", + "@wordpress/escape-html": "^2.42.9", + "@wordpress/hooks": "^3.42.9", + "@wordpress/html-entities": "^3.42.9", + "@wordpress/i18n": "^4.42.9", + "@wordpress/icons": "^9.33.9", + "@wordpress/is-shallow-equal": "^4.42.9", + "@wordpress/keyboard-shortcuts": "^4.19.9", + "@wordpress/keycodes": "^3.42.9", + "@wordpress/notices": "^4.10.9", + "@wordpress/preferences": "^3.19.9", + "@wordpress/private-apis": "^0.24.9", + "@wordpress/rich-text": "^6.19.9", + "@wordpress/shortcode": "^3.42.9", + "@wordpress/style-engine": "^1.25.9", + "@wordpress/token-list": "^2.42.9", + "@wordpress/url": "^3.43.9", + "@wordpress/warning": "^2.42.9", + "@wordpress/wordcount": "^3.42.9", "change-case": "^4.1.2", "classnames": "^2.3.1", "colord": "^2.7.0", @@ -38708,41 +38723,41 @@ } }, "@wordpress/block-library": { - "version": "8.19.8", - "resolved": "https://registry.npmjs.org/@wordpress/block-library/-/block-library-8.19.8.tgz", - "integrity": "sha512-bXuWHRxC5nlJXUv7H/GcnqC0YT3Hs2wDv6oJls5d5QwtqqGNc1oIBN/sSofj9gcnlfACuNxSBOf9DYtbu0hsqA==", + "version": "8.19.9", + "resolved": "https://registry.npmjs.org/@wordpress/block-library/-/block-library-8.19.9.tgz", + "integrity": "sha512-zHzGKp4nI/QlQabq2r92BdMAj0qtUsgZzSjvszAoW8gIkc9DvJA3CoE7icIf26yKEyi29h3OhIR6GqUtjmPrGA==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/a11y": "^3.42.8", - "@wordpress/api-fetch": "^6.39.8", - "@wordpress/autop": "^3.42.8", - "@wordpress/blob": "^3.42.8", - "@wordpress/block-editor": "^12.10.8", - "@wordpress/blocks": "^12.19.8", - "@wordpress/components": "^25.8.8", - "@wordpress/compose": "^6.19.8", - "@wordpress/core-data": "^6.19.8", - "@wordpress/data": "^9.12.8", - "@wordpress/date": "^4.42.8", - "@wordpress/deprecated": "^3.42.8", - "@wordpress/dom": "^3.42.8", - "@wordpress/element": "^5.19.8", - "@wordpress/escape-html": "^2.42.8", - "@wordpress/hooks": "^3.42.8", - "@wordpress/html-entities": "^3.42.8", - "@wordpress/i18n": "^4.42.8", - "@wordpress/icons": "^9.33.8", - "@wordpress/interactivity": "^2.3.8", - "@wordpress/keycodes": "^3.42.8", - "@wordpress/notices": "^4.10.8", - "@wordpress/primitives": "^3.40.8", - "@wordpress/private-apis": "^0.24.8", - "@wordpress/reusable-blocks": "^4.19.8", - "@wordpress/rich-text": "^6.19.8", - "@wordpress/server-side-render": "^4.19.8", - "@wordpress/url": "^3.43.8", - "@wordpress/viewport": "^5.19.8", - "@wordpress/wordcount": "^3.42.8", + "@wordpress/a11y": "^3.42.9", + "@wordpress/api-fetch": "^6.39.9", + "@wordpress/autop": "^3.42.9", + "@wordpress/blob": "^3.42.9", + "@wordpress/block-editor": "^12.10.9", + "@wordpress/blocks": "^12.19.9", + "@wordpress/components": "^25.8.9", + "@wordpress/compose": "^6.19.9", + "@wordpress/core-data": "^6.19.9", + "@wordpress/data": "^9.12.9", + "@wordpress/date": "^4.42.9", + "@wordpress/deprecated": "^3.42.9", + "@wordpress/dom": "^3.42.9", + "@wordpress/element": "^5.19.9", + "@wordpress/escape-html": "^2.42.9", + "@wordpress/hooks": "^3.42.9", + "@wordpress/html-entities": "^3.42.9", + "@wordpress/i18n": "^4.42.9", + "@wordpress/icons": "^9.33.9", + "@wordpress/interactivity": "^2.3.9", + "@wordpress/keycodes": "^3.42.9", + "@wordpress/notices": "^4.10.9", + "@wordpress/primitives": "^3.40.9", + "@wordpress/private-apis": "^0.24.9", + "@wordpress/reusable-blocks": "^4.19.9", + "@wordpress/rich-text": "^6.19.9", + "@wordpress/server-side-render": "^4.19.9", + "@wordpress/url": "^3.43.9", + "@wordpress/viewport": "^5.19.9", + "@wordpress/wordcount": "^3.42.9", "change-case": "^4.1.2", "classnames": "^2.3.1", "colord": "^2.7.0", @@ -38755,33 +38770,33 @@ } }, "@wordpress/block-serialization-default-parser": { - "version": "4.42.8", - "resolved": "https://registry.npmjs.org/@wordpress/block-serialization-default-parser/-/block-serialization-default-parser-4.42.8.tgz", - "integrity": "sha512-RcD2gK6sMDG5uTNkLrCbAao4Ua2pI/uUDmJUkzaJxA7qjE4TaUzQqc7GpQtTpb2Y0aLhmWGgoLwpPR6f6fHVnQ==", + "version": "4.42.9", + "resolved": "https://registry.npmjs.org/@wordpress/block-serialization-default-parser/-/block-serialization-default-parser-4.42.9.tgz", + "integrity": "sha512-PAL27cgthpO4lGPn6gDXobHWLxyT1voZ6QSjs+ry20GeQNcjEkgeyp9Jcbrk/RiVfaTLwLOoxvtlcmyWWASz+g==", "requires": { "@babel/runtime": "^7.16.0" } }, "@wordpress/blocks": { - "version": "12.19.8", - "resolved": "https://registry.npmjs.org/@wordpress/blocks/-/blocks-12.19.8.tgz", - "integrity": "sha512-2Rapys1X5qpfxklGjWyHSWcNC6yVctm9DztE8RVjDG3RnJsVXg1yh65zJ4HSC6/VltRzhGnnxcenkYqljbdz4g==", + "version": "12.19.9", + "resolved": "https://registry.npmjs.org/@wordpress/blocks/-/blocks-12.19.9.tgz", + "integrity": "sha512-XRA8+SKg+gnbc4/JWmmhSEvzoqTUNC50/VcCPvMudOPx8WDr6fCydcrWIc8goIDkKBkZtdHYBlZvWcvDpXFshw==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/autop": "^3.42.8", - "@wordpress/blob": "^3.42.8", - "@wordpress/block-serialization-default-parser": "^4.42.8", - "@wordpress/compose": "^6.19.8", - "@wordpress/data": "^9.12.8", - "@wordpress/deprecated": "^3.42.8", - "@wordpress/dom": "^3.42.8", - "@wordpress/element": "^5.19.8", - "@wordpress/hooks": "^3.42.8", - "@wordpress/html-entities": "^3.42.8", - "@wordpress/i18n": "^4.42.8", - "@wordpress/is-shallow-equal": "^4.42.8", - "@wordpress/private-apis": "^0.24.8", - "@wordpress/shortcode": "^3.42.8", + "@wordpress/autop": "^3.42.9", + "@wordpress/blob": "^3.42.9", + "@wordpress/block-serialization-default-parser": "^4.42.9", + "@wordpress/compose": "^6.19.9", + "@wordpress/data": "^9.12.9", + "@wordpress/deprecated": "^3.42.9", + "@wordpress/dom": "^3.42.9", + "@wordpress/element": "^5.19.9", + "@wordpress/hooks": "^3.42.9", + "@wordpress/html-entities": "^3.42.9", + "@wordpress/i18n": "^4.42.9", + "@wordpress/is-shallow-equal": "^4.42.9", + "@wordpress/private-apis": "^0.24.9", + "@wordpress/shortcode": "^3.42.9", "change-case": "^4.1.2", "colord": "^2.7.0", "deepmerge": "^4.3.0", @@ -38803,27 +38818,27 @@ "dev": true }, "@wordpress/commands": { - "version": "0.13.8", - "resolved": "https://registry.npmjs.org/@wordpress/commands/-/commands-0.13.8.tgz", - "integrity": "sha512-JPkUQPS4iz5KHgz0uzGgfbY5u39TsObXQC7cZOpUHHICAmCcQWUT8sPIUJoZ6WWwcjRIjMqMb5ZdizXATU6G3A==", + "version": "0.13.9", + "resolved": "https://registry.npmjs.org/@wordpress/commands/-/commands-0.13.9.tgz", + "integrity": "sha512-fH96vdmmpvRNN0lpFTU30yya/FDNyyKqIxRKnIf5CgJ2t29IMd3bPAQlnBi3JIEUWrXV/dPv3b7TueoVGZ2X9Q==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/components": "^25.8.8", - "@wordpress/data": "^9.12.8", - "@wordpress/element": "^5.19.8", - "@wordpress/i18n": "^4.42.8", - "@wordpress/icons": "^9.33.8", - "@wordpress/keyboard-shortcuts": "^4.19.8", - "@wordpress/private-apis": "^0.24.8", + "@wordpress/components": "^25.8.9", + "@wordpress/data": "^9.12.9", + "@wordpress/element": "^5.19.9", + "@wordpress/i18n": "^4.42.9", + "@wordpress/icons": "^9.33.9", + "@wordpress/keyboard-shortcuts": "^4.19.9", + "@wordpress/private-apis": "^0.24.9", "classnames": "^2.3.1", "cmdk": "^0.2.0", "rememo": "^4.0.2" } }, "@wordpress/components": { - "version": "25.8.8", - "resolved": "https://registry.npmjs.org/@wordpress/components/-/components-25.8.8.tgz", - "integrity": "sha512-4RBfXt+VXFxlx7FNz89a1V5yAayCGx3FpU04qJ3BR1TqEEqi5jqg0BbN63PHkqy/krrXhvX2oKFQ9OxbSX62vg==", + "version": "25.8.9", + "resolved": "https://registry.npmjs.org/@wordpress/components/-/components-25.8.9.tgz", + "integrity": "sha512-s+M7eopSqcptLvexaRFhDhilxaLuBu+ifFZK1lsRCa10XvxG4lOsoxN90OMI4Pk5c50zTJ/BrFM0HpU2Ru6EYw==", "requires": { "@ariakit/react": "^0.2.12", "@babel/runtime": "^7.16.0", @@ -38836,23 +38851,23 @@ "@floating-ui/react-dom": "^2.0.1", "@radix-ui/react-dropdown-menu": "2.0.4", "@use-gesture/react": "^10.2.24", - "@wordpress/a11y": "^3.42.8", - "@wordpress/compose": "^6.19.8", - "@wordpress/date": "^4.42.8", - "@wordpress/deprecated": "^3.42.8", - "@wordpress/dom": "^3.42.8", - "@wordpress/element": "^5.19.8", - "@wordpress/escape-html": "^2.42.8", - "@wordpress/hooks": "^3.42.8", - "@wordpress/html-entities": "^3.42.8", - "@wordpress/i18n": "^4.42.8", - "@wordpress/icons": "^9.33.8", - "@wordpress/is-shallow-equal": "^4.42.8", - "@wordpress/keycodes": "^3.42.8", - "@wordpress/primitives": "^3.40.8", - "@wordpress/private-apis": "^0.24.8", - "@wordpress/rich-text": "^6.19.8", - "@wordpress/warning": "^2.42.8", + "@wordpress/a11y": "^3.42.9", + "@wordpress/compose": "^6.19.9", + "@wordpress/date": "^4.42.9", + "@wordpress/deprecated": "^3.42.9", + "@wordpress/dom": "^3.42.9", + "@wordpress/element": "^5.19.9", + "@wordpress/escape-html": "^2.42.9", + "@wordpress/hooks": "^3.42.9", + "@wordpress/html-entities": "^3.42.9", + "@wordpress/i18n": "^4.42.9", + "@wordpress/icons": "^9.33.9", + "@wordpress/is-shallow-equal": "^4.42.9", + "@wordpress/keycodes": "^3.42.9", + "@wordpress/primitives": "^3.40.9", + "@wordpress/private-apis": "^0.24.9", + "@wordpress/rich-text": "^6.19.9", + "@wordpress/warning": "^2.42.9", "change-case": "^4.1.2", "classnames": "^2.3.1", "colord": "^2.7.0", @@ -38877,19 +38892,19 @@ } }, "@wordpress/compose": { - "version": "6.19.8", - "resolved": "https://registry.npmjs.org/@wordpress/compose/-/compose-6.19.8.tgz", - "integrity": "sha512-6oB+8vptLTM1FTsmSebAnPjuwgy5MQlUN+DKTbrhZiVmCsKTcOR46hu4OFi4yEh1aPEb00aEdSw4fnc94PgxBg==", + "version": "6.19.9", + "resolved": "https://registry.npmjs.org/@wordpress/compose/-/compose-6.19.9.tgz", + "integrity": "sha512-0EMqNy+sbi2wO/+SSKxKfTkyoKwndhJpIC98CCm+JbmPITSU8o0Bpizt8j4aIxWVXH8rkrxFDNmQ1u6F4HIAPA==", "requires": { "@babel/runtime": "^7.16.0", "@types/mousetrap": "^1.6.8", - "@wordpress/deprecated": "^3.42.8", - "@wordpress/dom": "^3.42.8", - "@wordpress/element": "^5.19.8", - "@wordpress/is-shallow-equal": "^4.42.8", - "@wordpress/keycodes": "^3.42.8", - "@wordpress/priority-queue": "^2.42.8", - "@wordpress/undo-manager": "^0.2.8", + "@wordpress/deprecated": "^3.42.9", + "@wordpress/dom": "^3.42.9", + "@wordpress/element": "^5.19.9", + "@wordpress/is-shallow-equal": "^4.42.9", + "@wordpress/keycodes": "^3.42.9", + "@wordpress/priority-queue": "^2.42.9", + "@wordpress/undo-manager": "^0.2.9", "change-case": "^4.1.2", "clipboard": "^2.0.8", "mousetrap": "^1.6.5", @@ -38897,43 +38912,43 @@ } }, "@wordpress/core-commands": { - "version": "0.11.8", - "resolved": "https://registry.npmjs.org/@wordpress/core-commands/-/core-commands-0.11.8.tgz", - "integrity": "sha512-hJA6VHr3BgNSLtMIx9sfZkfwuy9zTW6iTcbDpLihGCqbXOFvTUKteLO8x6FU35nYbcBf3KlZOfAWCdzQykIDIg==", + "version": "0.11.9", + "resolved": "https://registry.npmjs.org/@wordpress/core-commands/-/core-commands-0.11.9.tgz", + "integrity": "sha512-fWnO5Sh/3KHxT6TFlqK8GnWtMnXKyLtPxrDFsLp1vwqzbBBf7XroIqOa/ybh7ZV93H+tbmJ7LQTwAWXZEIDPiQ==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/block-editor": "^12.10.8", - "@wordpress/commands": "^0.13.8", - "@wordpress/core-data": "^6.19.8", - "@wordpress/data": "^9.12.8", - "@wordpress/element": "^5.19.8", - "@wordpress/i18n": "^4.42.8", - "@wordpress/icons": "^9.33.8", - "@wordpress/private-apis": "^0.24.8", - "@wordpress/router": "^0.11.8", - "@wordpress/url": "^3.43.8" + "@wordpress/block-editor": "^12.10.9", + "@wordpress/commands": "^0.13.9", + "@wordpress/core-data": "^6.19.9", + "@wordpress/data": "^9.12.9", + "@wordpress/element": "^5.19.9", + "@wordpress/i18n": "^4.42.9", + "@wordpress/icons": "^9.33.9", + "@wordpress/private-apis": "^0.24.9", + "@wordpress/router": "^0.11.9", + "@wordpress/url": "^3.43.9" } }, "@wordpress/core-data": { - "version": "6.19.8", - "resolved": "https://registry.npmjs.org/@wordpress/core-data/-/core-data-6.19.8.tgz", - "integrity": "sha512-d/despGSZK2GJKulmjhV2rkPGZpCPZVmq5LNoSmCkVMXBPWq7YCr4xrnRTkVz5H6FQkk54fGMjMZ5dEmPLgSxA==", + "version": "6.19.9", + "resolved": "https://registry.npmjs.org/@wordpress/core-data/-/core-data-6.19.9.tgz", + "integrity": "sha512-1ZNSphggpT6VZrKlxqJBCTEo3Q4zGmiANqjSryRnM+1YQLGeLsFQlyCYIGr1m9LtCnJejZAmngSt4bhuzqBYpw==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/api-fetch": "^6.39.8", - "@wordpress/block-editor": "^12.10.8", - "@wordpress/blocks": "^12.19.8", - "@wordpress/compose": "^6.19.8", - "@wordpress/data": "^9.12.8", - "@wordpress/deprecated": "^3.42.8", - "@wordpress/element": "^5.19.8", - "@wordpress/html-entities": "^3.42.8", - "@wordpress/i18n": "^4.42.8", - "@wordpress/is-shallow-equal": "^4.42.8", - "@wordpress/private-apis": "^0.24.8", - "@wordpress/sync": "^0.4.8", - "@wordpress/undo-manager": "^0.2.8", - "@wordpress/url": "^3.43.8", + "@wordpress/api-fetch": "^6.39.9", + "@wordpress/block-editor": "^12.10.9", + "@wordpress/blocks": "^12.19.9", + "@wordpress/compose": "^6.19.9", + "@wordpress/data": "^9.12.9", + "@wordpress/deprecated": "^3.42.9", + "@wordpress/element": "^5.19.9", + "@wordpress/html-entities": "^3.42.9", + "@wordpress/i18n": "^4.42.9", + "@wordpress/is-shallow-equal": "^4.42.9", + "@wordpress/private-apis": "^0.24.9", + "@wordpress/sync": "^0.4.9", + "@wordpress/undo-manager": "^0.2.9", + "@wordpress/url": "^3.43.9", "change-case": "^4.1.2", "equivalent-key-map": "^0.2.2", "fast-deep-equal": "^3.1.3", @@ -38943,48 +38958,48 @@ } }, "@wordpress/customize-widgets": { - "version": "4.19.8", - "resolved": "https://registry.npmjs.org/@wordpress/customize-widgets/-/customize-widgets-4.19.8.tgz", - "integrity": "sha512-6RdVnA9QTxOix07S/AvjHp4URLuVKw6gJQUJeppM4rYrY/DTUkvnqj/PffpxATk1LFEgszRVVtiPjhl1Bd3sZA==", + "version": "4.19.9", + "resolved": "https://registry.npmjs.org/@wordpress/customize-widgets/-/customize-widgets-4.19.9.tgz", + "integrity": "sha512-elkNJUadkZcac0kr3Ovx/ZIwJ0PaATrLCRX95I2a8KcdQyGS2v0IZBjaUTDUuHcer5NnbUGLPu0eq9Z+LfzXlA==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/block-editor": "^12.10.8", - "@wordpress/block-library": "^8.19.8", - "@wordpress/blocks": "^12.19.8", - "@wordpress/components": "^25.8.8", - "@wordpress/compose": "^6.19.8", - "@wordpress/core-data": "^6.19.8", - "@wordpress/data": "^9.12.8", - "@wordpress/dom": "^3.42.8", - "@wordpress/element": "^5.19.8", - "@wordpress/hooks": "^3.42.8", - "@wordpress/i18n": "^4.42.8", - "@wordpress/icons": "^9.33.8", - "@wordpress/interface": "^5.19.8", - "@wordpress/is-shallow-equal": "^4.42.8", - "@wordpress/keyboard-shortcuts": "^4.19.8", - "@wordpress/keycodes": "^3.42.8", - "@wordpress/media-utils": "^4.33.8", - "@wordpress/preferences": "^3.19.8", - "@wordpress/private-apis": "^0.24.8", - "@wordpress/widgets": "^3.19.8", + "@wordpress/block-editor": "^12.10.9", + "@wordpress/block-library": "^8.19.9", + "@wordpress/blocks": "^12.19.9", + "@wordpress/components": "^25.8.9", + "@wordpress/compose": "^6.19.9", + "@wordpress/core-data": "^6.19.9", + "@wordpress/data": "^9.12.9", + "@wordpress/dom": "^3.42.9", + "@wordpress/element": "^5.19.9", + "@wordpress/hooks": "^3.42.9", + "@wordpress/i18n": "^4.42.9", + "@wordpress/icons": "^9.33.9", + "@wordpress/interface": "^5.19.9", + "@wordpress/is-shallow-equal": "^4.42.9", + "@wordpress/keyboard-shortcuts": "^4.19.9", + "@wordpress/keycodes": "^3.42.9", + "@wordpress/media-utils": "^4.33.9", + "@wordpress/preferences": "^3.19.9", + "@wordpress/private-apis": "^0.24.9", + "@wordpress/widgets": "^3.19.9", "classnames": "^2.3.1", "fast-deep-equal": "^3.1.3" } }, "@wordpress/data": { - "version": "9.12.8", - "resolved": "https://registry.npmjs.org/@wordpress/data/-/data-9.12.8.tgz", - "integrity": "sha512-gUu+g/Urg6aknUATNFyDQycoNE1JQub8ZUImgMxlfFLG+KnoHpz0LteEpigRVqem6qGsYihqS9MIPElnIkmasQ==", + "version": "9.12.9", + "resolved": "https://registry.npmjs.org/@wordpress/data/-/data-9.12.9.tgz", + "integrity": "sha512-DU2Gbbl6y2X258hBehIwR0iknC6xyy4Ug6bs1nGygKrPqBgiuXsRAWeF8ilSRaOLtC6lHALs3d6IHXdj86Om2g==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/compose": "^6.19.8", - "@wordpress/deprecated": "^3.42.8", - "@wordpress/element": "^5.19.8", - "@wordpress/is-shallow-equal": "^4.42.8", - "@wordpress/priority-queue": "^2.42.8", - "@wordpress/private-apis": "^0.24.8", - "@wordpress/redux-routine": "^4.42.8", + "@wordpress/compose": "^6.19.9", + "@wordpress/deprecated": "^3.42.9", + "@wordpress/element": "^5.19.9", + "@wordpress/is-shallow-equal": "^4.42.9", + "@wordpress/priority-queue": "^2.42.9", + "@wordpress/private-apis": "^0.24.9", + "@wordpress/redux-routine": "^4.42.9", "deepmerge": "^4.3.0", "equivalent-key-map": "^0.2.2", "is-plain-object": "^5.0.0", @@ -38996,31 +39011,31 @@ } }, "@wordpress/data-controls": { - "version": "3.11.8", - "resolved": "https://registry.npmjs.org/@wordpress/data-controls/-/data-controls-3.11.8.tgz", - "integrity": "sha512-drP8XeA2f36eKq1LtdDyaOTqPNNQ+ar3W4zYWz01ac9Pr0/C2WQ3Fb4TLsrUbmeciVAJ/yEtGQPmqurmvHljeA==", + "version": "3.11.9", + "resolved": "https://registry.npmjs.org/@wordpress/data-controls/-/data-controls-3.11.9.tgz", + "integrity": "sha512-CTS2ZySNXIgdP1PRRgAo1oF/SM3XKrLtSTxsQ+yH+Hly+16CyoMLBcNrq8uOmeBMlFwpbFoZLPkNDNweKAhoNw==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/api-fetch": "^6.39.8", - "@wordpress/data": "^9.12.8", - "@wordpress/deprecated": "^3.42.8" + "@wordpress/api-fetch": "^6.39.9", + "@wordpress/data": "^9.12.9", + "@wordpress/deprecated": "^3.42.9" } }, "@wordpress/date": { - "version": "4.42.8", - "resolved": "https://registry.npmjs.org/@wordpress/date/-/date-4.42.8.tgz", - "integrity": "sha512-Ph/bR5jy5nUyCKDmDUz7cgVdC+9ZXcU3noak6jEbT5bSnXPFNcQ/LAgtP5h+5pbS5l7832tdXD+4lQloM86Byw==", + "version": "4.42.9", + "resolved": "https://registry.npmjs.org/@wordpress/date/-/date-4.42.9.tgz", + "integrity": "sha512-hj7F+1RCEC9/TJzVyx+8JwBgyufB4fpvtzgoSvA4uSK6vxXdxtBb4rZCqW2lawUFLi3PHiwZSoOCQ+vyO5PJYg==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/deprecated": "^3.42.8", + "@wordpress/deprecated": "^3.42.9", "moment": "^2.29.4", "moment-timezone": "^0.5.40" } }, "@wordpress/dependency-extraction-webpack-plugin": { - "version": "4.25.8", - "resolved": "https://registry.npmjs.org/@wordpress/dependency-extraction-webpack-plugin/-/dependency-extraction-webpack-plugin-4.25.8.tgz", - "integrity": "sha512-B0zs87lTbfJ/8UafRE9D0R75mi2ZI7FgBwwpATOwIywZcGJwSBRsDMRKQVWFGbXsQriQPaAVuL1P85dFcX+eGg==", + "version": "4.25.9", + "resolved": "https://registry.npmjs.org/@wordpress/dependency-extraction-webpack-plugin/-/dependency-extraction-webpack-plugin-4.25.9.tgz", + "integrity": "sha512-2V4hX3eliV7+x6LA79bartHYA06MjwXVlY6UPET8RFf+R455WUcmUwBjcPX03DLsKe1Pe9yGXi3K2rNjcNV4Aw==", "dev": true, "requires": { "json2php": "^0.0.7", @@ -39028,41 +39043,41 @@ } }, "@wordpress/deprecated": { - "version": "3.42.8", - "resolved": "https://registry.npmjs.org/@wordpress/deprecated/-/deprecated-3.42.8.tgz", - "integrity": "sha512-mW4uPRHYuqVTBIuzXfQeELImSXl9GUa9EjhTddNkBvZpPRvLMool7NKJ+9WHcN9sJBAj3hvpTbkvBgxGSOgu4w==", + "version": "3.42.9", + "resolved": "https://registry.npmjs.org/@wordpress/deprecated/-/deprecated-3.42.9.tgz", + "integrity": "sha512-T5p2eVYvNDyDfrwvUw51n1ux5B9Z3xiO5xhQzKgqXbpJG9sBZ7moI76QUiPsZr3/pbPXQxqnxAv8VyZEFXxqsA==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/hooks": "^3.42.8" + "@wordpress/hooks": "^3.42.9" } }, "@wordpress/dom": { - "version": "3.42.8", - "resolved": "https://registry.npmjs.org/@wordpress/dom/-/dom-3.42.8.tgz", - "integrity": "sha512-4mVVNTtzD8BO09n4vEPKQup/sklSS2F3r37MbPt2bq0q25aQIT1CjFHefIM6aUg/jZLlw+2pTgWic0liXIOyyg==", + "version": "3.42.9", + "resolved": "https://registry.npmjs.org/@wordpress/dom/-/dom-3.42.9.tgz", + "integrity": "sha512-2aQbLMCcd8tlaXZhANx5GzQnnz4lgQsITZOBYrhyprJMCUAowWCLae2EjmNSA3T9kb2ur0pCr805s0uNJZwqCQ==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/deprecated": "^3.42.8" + "@wordpress/deprecated": "^3.42.9" } }, "@wordpress/dom-ready": { - "version": "3.42.8", - "resolved": "https://registry.npmjs.org/@wordpress/dom-ready/-/dom-ready-3.42.8.tgz", - "integrity": "sha512-dwnjXW7sTfqKZenmBEe0GqfSO38XhGtKxtRsn5OpZV4QCz54lDorSTOxKGgpG35++Hywet5kphyFoJ0RluG2Nw==", + "version": "3.42.9", + "resolved": "https://registry.npmjs.org/@wordpress/dom-ready/-/dom-ready-3.42.9.tgz", + "integrity": "sha512-ow+NVxzEYxjLrEurPkHctZxuFuwcspusxoPPF3BKPlu0JY5UEqt7Hmrr6LsP12SBXJKQ8dz+DPGG6EJPbYqzRA==", "requires": { "@babel/runtime": "^7.16.0" } }, "@wordpress/e2e-test-utils": { - "version": "10.13.8", - "resolved": "https://registry.npmjs.org/@wordpress/e2e-test-utils/-/e2e-test-utils-10.13.8.tgz", - "integrity": "sha512-a7x+ae55k733p0HnozJH5rTlgBSmw8TYP1Ju4uGAdPgLJfpvFsjT1mBA3BerYNu7qgY8VjFjLKQ1EoBW7fubdQ==", + "version": "10.13.9", + "resolved": "https://registry.npmjs.org/@wordpress/e2e-test-utils/-/e2e-test-utils-10.13.9.tgz", + "integrity": "sha512-JjY6g8KLikXqf/r1xWDx1L0A1Zw1ikoKBb+cmXfpVBwM4jwq1D+oH3eTCC3df8fm8auyCFVnobg8vAzNCKKAoQ==", "dev": true, "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/api-fetch": "^6.39.8", - "@wordpress/keycodes": "^3.42.8", - "@wordpress/url": "^3.43.8", + "@wordpress/api-fetch": "^6.39.9", + "@wordpress/keycodes": "^3.42.9", + "@wordpress/url": "^3.43.9", "change-case": "^4.1.2", "form-data": "^4.0.0", "node-fetch": "^2.6.0" @@ -39082,14 +39097,14 @@ } }, "@wordpress/e2e-test-utils-playwright": { - "version": "0.10.8", - "resolved": "https://registry.npmjs.org/@wordpress/e2e-test-utils-playwright/-/e2e-test-utils-playwright-0.10.8.tgz", - "integrity": "sha512-OOp3XtplIBT2YZ/q9AusTzvbHN+vIO+FF+IdhtlEeMczRgN/YOMNyLA3CG6l5vhnvkOKwJRzS45MewzacMOrBQ==", + "version": "0.10.9", + "resolved": "https://registry.npmjs.org/@wordpress/e2e-test-utils-playwright/-/e2e-test-utils-playwright-0.10.9.tgz", + "integrity": "sha512-kqck+8F24gi9D6F0oeGTeiJHJfVKtixsqomZ2hpzIIF4/CIcR3SZbxk0IiTEk7WroqqfCEiIGxxm8atSehPqig==", "dev": true, "requires": { - "@wordpress/api-fetch": "^6.39.8", - "@wordpress/keycodes": "^3.42.8", - "@wordpress/url": "^3.43.8", + "@wordpress/api-fetch": "^6.39.9", + "@wordpress/keycodes": "^3.42.9", + "@wordpress/url": "^3.43.9", "change-case": "^4.1.2", "form-data": "^4.0.0", "get-port": "^5.1.1", @@ -39172,90 +39187,90 @@ } }, "@wordpress/edit-post": { - "version": "7.19.8", - "resolved": "https://registry.npmjs.org/@wordpress/edit-post/-/edit-post-7.19.8.tgz", - "integrity": "sha512-JTKocPTRlhuRNPfIt460VHFzGPe1kVnRUSUGsbLDrt+wdHUA7cVct5hak1kBY/FSW7o3eOgw1CiTJPWTBiUEqA==", + "version": "7.19.9", + "resolved": "https://registry.npmjs.org/@wordpress/edit-post/-/edit-post-7.19.9.tgz", + "integrity": "sha512-oVqJjms9vvS8xzJXRY9XS69744LjkVvihqzDoA5HHpZQp6EbOaqsAOw0CU/7vsBzFWIpT526Mru3ndsZz6W3HQ==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/a11y": "^3.42.8", - "@wordpress/api-fetch": "^6.39.8", - "@wordpress/block-editor": "^12.10.8", - "@wordpress/block-library": "^8.19.8", - "@wordpress/blocks": "^12.19.8", - "@wordpress/commands": "^0.13.8", - "@wordpress/components": "^25.8.8", - "@wordpress/compose": "^6.19.8", - "@wordpress/core-commands": "^0.11.8", - "@wordpress/core-data": "^6.19.8", - "@wordpress/data": "^9.12.8", - "@wordpress/deprecated": "^3.42.8", - "@wordpress/dom": "^3.42.8", - "@wordpress/editor": "^13.19.8", - "@wordpress/element": "^5.19.8", - "@wordpress/hooks": "^3.42.8", - "@wordpress/i18n": "^4.42.8", - "@wordpress/icons": "^9.33.8", - "@wordpress/interface": "^5.19.8", - "@wordpress/keyboard-shortcuts": "^4.19.8", - "@wordpress/keycodes": "^3.42.8", - "@wordpress/media-utils": "^4.33.8", - "@wordpress/notices": "^4.10.8", - "@wordpress/plugins": "^6.10.8", - "@wordpress/preferences": "^3.19.8", - "@wordpress/private-apis": "^0.24.8", - "@wordpress/url": "^3.43.8", - "@wordpress/viewport": "^5.19.8", - "@wordpress/warning": "^2.42.8", - "@wordpress/widgets": "^3.19.8", + "@wordpress/a11y": "^3.42.9", + "@wordpress/api-fetch": "^6.39.9", + "@wordpress/block-editor": "^12.10.9", + "@wordpress/block-library": "^8.19.9", + "@wordpress/blocks": "^12.19.9", + "@wordpress/commands": "^0.13.9", + "@wordpress/components": "^25.8.9", + "@wordpress/compose": "^6.19.9", + "@wordpress/core-commands": "^0.11.9", + "@wordpress/core-data": "^6.19.9", + "@wordpress/data": "^9.12.9", + "@wordpress/deprecated": "^3.42.9", + "@wordpress/dom": "^3.42.9", + "@wordpress/editor": "^13.19.9", + "@wordpress/element": "^5.19.9", + "@wordpress/hooks": "^3.42.9", + "@wordpress/i18n": "^4.42.9", + "@wordpress/icons": "^9.33.9", + "@wordpress/interface": "^5.19.9", + "@wordpress/keyboard-shortcuts": "^4.19.9", + "@wordpress/keycodes": "^3.42.9", + "@wordpress/media-utils": "^4.33.9", + "@wordpress/notices": "^4.10.9", + "@wordpress/plugins": "^6.10.9", + "@wordpress/preferences": "^3.19.9", + "@wordpress/private-apis": "^0.24.9", + "@wordpress/url": "^3.43.9", + "@wordpress/viewport": "^5.19.9", + "@wordpress/warning": "^2.42.9", + "@wordpress/widgets": "^3.19.9", "classnames": "^2.3.1", "memize": "^2.1.0", "rememo": "^4.0.2" } }, "@wordpress/edit-site": { - "version": "5.19.8", - "resolved": "https://registry.npmjs.org/@wordpress/edit-site/-/edit-site-5.19.8.tgz", - "integrity": "sha512-a5w8CGa+GxbNmcvvD8RZLk4kwc8fFV2TNKUk2LIzWw4ro2VyEs+TkearD6Ymll71jcCFBKOujwQ9nrIsdDuBNg==", + "version": "5.19.9", + "resolved": "https://registry.npmjs.org/@wordpress/edit-site/-/edit-site-5.19.9.tgz", + "integrity": "sha512-Qkb+kULvgzyOlAoPucvgxCFqK2ECe21izKjrdNaZbU+fPCHDaxzoq/dk+FpDZMqkjeUoCj25uxGhte0WBlQZCw==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/a11y": "^3.42.8", - "@wordpress/api-fetch": "^6.39.8", - "@wordpress/block-editor": "^12.10.8", - "@wordpress/block-library": "^8.19.8", - "@wordpress/blocks": "^12.19.8", - "@wordpress/commands": "^0.13.8", - "@wordpress/components": "^25.8.8", - "@wordpress/compose": "^6.19.8", - "@wordpress/core-commands": "^0.11.8", - "@wordpress/core-data": "^6.19.8", - "@wordpress/data": "^9.12.8", - "@wordpress/date": "^4.42.8", - "@wordpress/deprecated": "^3.42.8", - "@wordpress/dom": "^3.42.8", - "@wordpress/editor": "^13.19.8", - "@wordpress/element": "^5.19.8", - "@wordpress/escape-html": "^2.42.8", - "@wordpress/hooks": "^3.42.8", - "@wordpress/html-entities": "^3.42.8", - "@wordpress/i18n": "^4.42.8", - "@wordpress/icons": "^9.33.8", - "@wordpress/interface": "^5.19.8", - "@wordpress/keyboard-shortcuts": "^4.19.8", - "@wordpress/keycodes": "^3.42.8", - "@wordpress/media-utils": "^4.33.8", - "@wordpress/notices": "^4.10.8", - "@wordpress/patterns": "^1.3.8", - "@wordpress/plugins": "^6.10.8", - "@wordpress/preferences": "^3.19.8", - "@wordpress/primitives": "^3.40.8", - "@wordpress/private-apis": "^0.24.8", - "@wordpress/reusable-blocks": "^4.19.8", - "@wordpress/router": "^0.11.8", - "@wordpress/style-engine": "^1.25.8", - "@wordpress/url": "^3.43.8", - "@wordpress/viewport": "^5.19.8", - "@wordpress/widgets": "^3.19.8", - "@wordpress/wordcount": "^3.42.8", + "@wordpress/a11y": "^3.42.9", + "@wordpress/api-fetch": "^6.39.9", + "@wordpress/block-editor": "^12.10.9", + "@wordpress/block-library": "^8.19.9", + "@wordpress/blocks": "^12.19.9", + "@wordpress/commands": "^0.13.9", + "@wordpress/components": "^25.8.9", + "@wordpress/compose": "^6.19.9", + "@wordpress/core-commands": "^0.11.9", + "@wordpress/core-data": "^6.19.9", + "@wordpress/data": "^9.12.9", + "@wordpress/date": "^4.42.9", + "@wordpress/deprecated": "^3.42.9", + "@wordpress/dom": "^3.42.9", + "@wordpress/editor": "^13.19.9", + "@wordpress/element": "^5.19.9", + "@wordpress/escape-html": "^2.42.9", + "@wordpress/hooks": "^3.42.9", + "@wordpress/html-entities": "^3.42.9", + "@wordpress/i18n": "^4.42.9", + "@wordpress/icons": "^9.33.9", + "@wordpress/interface": "^5.19.9", + "@wordpress/keyboard-shortcuts": "^4.19.9", + "@wordpress/keycodes": "^3.42.9", + "@wordpress/media-utils": "^4.33.9", + "@wordpress/notices": "^4.10.9", + "@wordpress/patterns": "^1.3.9", + "@wordpress/plugins": "^6.10.9", + "@wordpress/preferences": "^3.19.9", + "@wordpress/primitives": "^3.40.9", + "@wordpress/private-apis": "^0.24.9", + "@wordpress/reusable-blocks": "^4.19.9", + "@wordpress/router": "^0.11.9", + "@wordpress/style-engine": "^1.25.9", + "@wordpress/url": "^3.43.9", + "@wordpress/viewport": "^5.19.9", + "@wordpress/widgets": "^3.19.9", + "@wordpress/wordcount": "^3.42.9", "change-case": "^4.1.2", "classnames": "^2.3.1", "colord": "^2.9.2", @@ -39270,75 +39285,75 @@ } }, "@wordpress/edit-widgets": { - "version": "5.19.8", - "resolved": "https://registry.npmjs.org/@wordpress/edit-widgets/-/edit-widgets-5.19.8.tgz", - "integrity": "sha512-LQ35/Cso5ZiMTOQ0twxpyhaJCAvMK8wVQ/aCzu5S8OEedZCsC6nE2pO2pjSLrlaLskIAaQvziGHPBR33fjqdTQ==", + "version": "5.19.9", + "resolved": "https://registry.npmjs.org/@wordpress/edit-widgets/-/edit-widgets-5.19.9.tgz", + "integrity": "sha512-kq7uilrjCMjr2RqJ+KQ/7TWPxcUImBq5zDqPEkM3z3fhk3+KhsG6L74+OIlv3PYl89CjfL8pYV2B7lKYG27VkA==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/api-fetch": "^6.39.8", - "@wordpress/block-editor": "^12.10.8", - "@wordpress/block-library": "^8.19.8", - "@wordpress/blocks": "^12.19.8", - "@wordpress/components": "^25.8.8", - "@wordpress/compose": "^6.19.8", - "@wordpress/core-data": "^6.19.8", - "@wordpress/data": "^9.12.8", - "@wordpress/deprecated": "^3.42.8", - "@wordpress/dom": "^3.42.8", - "@wordpress/element": "^5.19.8", - "@wordpress/hooks": "^3.42.8", - "@wordpress/i18n": "^4.42.8", - "@wordpress/icons": "^9.33.8", - "@wordpress/interface": "^5.19.8", - "@wordpress/keyboard-shortcuts": "^4.19.8", - "@wordpress/keycodes": "^3.42.8", - "@wordpress/media-utils": "^4.33.8", - "@wordpress/notices": "^4.10.8", - "@wordpress/patterns": "^1.3.8", - "@wordpress/plugins": "^6.10.8", - "@wordpress/preferences": "^3.19.8", - "@wordpress/private-apis": "^0.24.8", - "@wordpress/reusable-blocks": "^4.19.8", - "@wordpress/url": "^3.43.8", - "@wordpress/widgets": "^3.19.8", + "@wordpress/api-fetch": "^6.39.9", + "@wordpress/block-editor": "^12.10.9", + "@wordpress/block-library": "^8.19.9", + "@wordpress/blocks": "^12.19.9", + "@wordpress/components": "^25.8.9", + "@wordpress/compose": "^6.19.9", + "@wordpress/core-data": "^6.19.9", + "@wordpress/data": "^9.12.9", + "@wordpress/deprecated": "^3.42.9", + "@wordpress/dom": "^3.42.9", + "@wordpress/element": "^5.19.9", + "@wordpress/hooks": "^3.42.9", + "@wordpress/i18n": "^4.42.9", + "@wordpress/icons": "^9.33.9", + "@wordpress/interface": "^5.19.9", + "@wordpress/keyboard-shortcuts": "^4.19.9", + "@wordpress/keycodes": "^3.42.9", + "@wordpress/media-utils": "^4.33.9", + "@wordpress/notices": "^4.10.9", + "@wordpress/patterns": "^1.3.9", + "@wordpress/plugins": "^6.10.9", + "@wordpress/preferences": "^3.19.9", + "@wordpress/private-apis": "^0.24.9", + "@wordpress/reusable-blocks": "^4.19.9", + "@wordpress/url": "^3.43.9", + "@wordpress/widgets": "^3.19.9", "classnames": "^2.3.1" } }, "@wordpress/editor": { - "version": "13.19.8", - "resolved": "https://registry.npmjs.org/@wordpress/editor/-/editor-13.19.8.tgz", - "integrity": "sha512-TUji5zz5VdN5LV4AYG8zuyFoxUWtxkf8voIwQg4WivYYWgeGRstDnsWXAEpi1azc+rN5TLe4gEBMKdTJxFFS6g==", + "version": "13.19.9", + "resolved": "https://registry.npmjs.org/@wordpress/editor/-/editor-13.19.9.tgz", + "integrity": "sha512-GVi+RfKaQ9tBNUA2UjtNzCe4xyepK2rrC5/fy+IBOeo9jkSSm/9cM8TCWsBVLv/HAScDCjI2mDaOnrlLDeZ1QQ==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/a11y": "^3.42.8", - "@wordpress/api-fetch": "^6.39.8", - "@wordpress/blob": "^3.42.8", - "@wordpress/block-editor": "^12.10.8", - "@wordpress/blocks": "^12.19.8", - "@wordpress/components": "^25.8.8", - "@wordpress/compose": "^6.19.8", - "@wordpress/core-data": "^6.19.8", - "@wordpress/data": "^9.12.8", - "@wordpress/date": "^4.42.8", - "@wordpress/deprecated": "^3.42.8", - "@wordpress/dom": "^3.42.8", - "@wordpress/element": "^5.19.8", - "@wordpress/hooks": "^3.42.8", - "@wordpress/html-entities": "^3.42.8", - "@wordpress/i18n": "^4.42.8", - "@wordpress/icons": "^9.33.8", - "@wordpress/keyboard-shortcuts": "^4.19.8", - "@wordpress/keycodes": "^3.42.8", - "@wordpress/media-utils": "^4.33.8", - "@wordpress/notices": "^4.10.8", - "@wordpress/patterns": "^1.3.8", - "@wordpress/preferences": "^3.19.8", - "@wordpress/private-apis": "^0.24.8", - "@wordpress/reusable-blocks": "^4.19.8", - "@wordpress/rich-text": "^6.19.8", - "@wordpress/server-side-render": "^4.19.8", - "@wordpress/url": "^3.43.8", - "@wordpress/wordcount": "^3.42.8", + "@wordpress/a11y": "^3.42.9", + "@wordpress/api-fetch": "^6.39.9", + "@wordpress/blob": "^3.42.9", + "@wordpress/block-editor": "^12.10.9", + "@wordpress/blocks": "^12.19.9", + "@wordpress/components": "^25.8.9", + "@wordpress/compose": "^6.19.9", + "@wordpress/core-data": "^6.19.9", + "@wordpress/data": "^9.12.9", + "@wordpress/date": "^4.42.9", + "@wordpress/deprecated": "^3.42.9", + "@wordpress/dom": "^3.42.9", + "@wordpress/element": "^5.19.9", + "@wordpress/hooks": "^3.42.9", + "@wordpress/html-entities": "^3.42.9", + "@wordpress/i18n": "^4.42.9", + "@wordpress/icons": "^9.33.9", + "@wordpress/keyboard-shortcuts": "^4.19.9", + "@wordpress/keycodes": "^3.42.9", + "@wordpress/media-utils": "^4.33.9", + "@wordpress/notices": "^4.10.9", + "@wordpress/patterns": "^1.3.9", + "@wordpress/preferences": "^3.19.9", + "@wordpress/private-apis": "^0.24.9", + "@wordpress/reusable-blocks": "^4.19.9", + "@wordpress/rich-text": "^6.19.9", + "@wordpress/server-side-render": "^4.19.9", + "@wordpress/url": "^3.43.9", + "@wordpress/wordcount": "^3.42.9", "classnames": "^2.3.1", "date-fns": "^2.28.0", "memize": "^2.1.0", @@ -39348,14 +39363,14 @@ } }, "@wordpress/element": { - "version": "5.19.8", - "resolved": "https://registry.npmjs.org/@wordpress/element/-/element-5.19.8.tgz", - "integrity": "sha512-VoA0ib6aIKPTwtiksmbg0QFx17o5MvMqRk+Ggue56YOmPnHylshzuxY9saS83kKP2XLaKdWWuI09ouT+cWoBUQ==", + "version": "5.19.9", + "resolved": "https://registry.npmjs.org/@wordpress/element/-/element-5.19.9.tgz", + "integrity": "sha512-RjJwgrkWAsd/rK+2UwhdyR+Qa2Vtqc4LXCQcwevw/nAp3FHcXxfpwjKt2+9076EtLtI0b9PSoXkZCwW0mwpw5w==", "requires": { "@babel/runtime": "^7.16.0", "@types/react": "^18.0.21", "@types/react-dom": "^18.0.6", - "@wordpress/escape-html": "^2.42.8", + "@wordpress/escape-html": "^2.42.9", "change-case": "^4.1.2", "is-plain-object": "^5.0.0", "react": "^18.2.0", @@ -39363,24 +39378,24 @@ } }, "@wordpress/escape-html": { - "version": "2.42.8", - "resolved": "https://registry.npmjs.org/@wordpress/escape-html/-/escape-html-2.42.8.tgz", - "integrity": "sha512-auFGR/T2TkQnX6p87xFHzxwFwsYUAPgxeWDMTyGxBh5qCt0kD5rWSGvHo6lubm2pQmBAJWUTXwqJ+MveSE/U2Q==", + "version": "2.42.9", + "resolved": "https://registry.npmjs.org/@wordpress/escape-html/-/escape-html-2.42.9.tgz", + "integrity": "sha512-JdhEV2PsKDngs+UAp7DRhxkeD1ODAQdaDoGp8V4S0dCRIaoTbw1nvNS40BHVwq06QXIy3oreRcoirXhxrqt+PQ==", "requires": { "@babel/runtime": "^7.16.0" } }, "@wordpress/eslint-plugin": { - "version": "16.0.8", - "resolved": "https://registry.npmjs.org/@wordpress/eslint-plugin/-/eslint-plugin-16.0.8.tgz", - "integrity": "sha512-8zzMbkIwwBBdVEECi3EVfk81kVqECXv6nPsfahbd4ZZGpXKg8N4w7q2cnAvAU+KV2DSiwTyQ7P2Lu4/rGMeXVw==", + "version": "16.0.9", + "resolved": "https://registry.npmjs.org/@wordpress/eslint-plugin/-/eslint-plugin-16.0.9.tgz", + "integrity": "sha512-FRXIhqREPHqTOhj4Hbmm+NL40h0NgnEBTGXq+Yn6gs4fGMFHbJSBKqtK1pv+4CkFP7vvvkfsCDDG5KnpgyP6Lw==", "dev": true, "requires": { "@babel/eslint-parser": "^7.16.0", "@typescript-eslint/eslint-plugin": "^6.4.1", "@typescript-eslint/parser": "^6.4.1", - "@wordpress/babel-preset-default": "^7.26.8", - "@wordpress/prettier-config": "^2.25.8", + "@wordpress/babel-preset-default": "^7.26.9", + "@wordpress/prettier-config": "^2.25.9", "cosmiconfig": "^7.0.0", "eslint-config-prettier": "^8.3.0", "eslint-plugin-import": "^2.25.2", @@ -39407,47 +39422,47 @@ } }, "@wordpress/format-library": { - "version": "4.19.8", - "resolved": "https://registry.npmjs.org/@wordpress/format-library/-/format-library-4.19.8.tgz", - "integrity": "sha512-8I+0yLOfC+uDnG7N4hudeOXsdCSCEGnKDe9d/YL3bvI47oMALoDW/Vc39n3ct3Kzyxyw7e3Hz/XcDiuHNYB8cA==", + "version": "4.19.9", + "resolved": "https://registry.npmjs.org/@wordpress/format-library/-/format-library-4.19.9.tgz", + "integrity": "sha512-1omgpcFR3GAVUkJKJhMM+ceU6mXP/7CSsTZJ6cWmYRdwkPTYZzsjXEE4HyePliSDS0+B6AYyHjCH8LlviDN3tg==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/a11y": "^3.42.8", - "@wordpress/block-editor": "^12.10.8", - "@wordpress/components": "^25.8.8", - "@wordpress/compose": "^6.19.8", - "@wordpress/data": "^9.12.8", - "@wordpress/element": "^5.19.8", - "@wordpress/html-entities": "^3.42.8", - "@wordpress/i18n": "^4.42.8", - "@wordpress/icons": "^9.33.8", - "@wordpress/rich-text": "^6.19.8", - "@wordpress/url": "^3.43.8" + "@wordpress/a11y": "^3.42.9", + "@wordpress/block-editor": "^12.10.9", + "@wordpress/components": "^25.8.9", + "@wordpress/compose": "^6.19.9", + "@wordpress/data": "^9.12.9", + "@wordpress/element": "^5.19.9", + "@wordpress/html-entities": "^3.42.9", + "@wordpress/i18n": "^4.42.9", + "@wordpress/icons": "^9.33.9", + "@wordpress/rich-text": "^6.19.9", + "@wordpress/url": "^3.43.9" } }, "@wordpress/hooks": { - "version": "3.42.8", - "resolved": "https://registry.npmjs.org/@wordpress/hooks/-/hooks-3.42.8.tgz", - "integrity": "sha512-1UQGRs96eu1ngerMkJH/UJOu1iIuk7uusZHjzYchEWsuUt2YcaP6+rchaS1YsV8aTdqY0lVwK6/5sLWaEWQeUA==", + "version": "3.42.9", + "resolved": "https://registry.npmjs.org/@wordpress/hooks/-/hooks-3.42.9.tgz", + "integrity": "sha512-L8pwwbclYF5VQERoBKjrQqbq/mhyBhzUF4irD4h5MfnCyJNg9C8it9e9/OHHqaXjVBgF5NfWSPr9bdY+PIMLrg==", "requires": { "@babel/runtime": "^7.16.0" } }, "@wordpress/html-entities": { - "version": "3.42.8", - "resolved": "https://registry.npmjs.org/@wordpress/html-entities/-/html-entities-3.42.8.tgz", - "integrity": "sha512-9KpdJxrsmfMlxEWdgkB8Fj2VVJwj++bsBNCKYY8zmgT0KLKgGRLhpQjQgkGZ8eA0XQUW6veJ1HZhtiIiWyZ2Rw==", + "version": "3.42.9", + "resolved": "https://registry.npmjs.org/@wordpress/html-entities/-/html-entities-3.42.9.tgz", + "integrity": "sha512-KyAm20q04GuRvQn4hdz7LuVrA3thVM0hCNrP3eENTdAvLvOEt6i1eJiebIHuzHakqZXIYpGhMiPrbTPkrWW0bw==", "requires": { "@babel/runtime": "^7.16.0" } }, "@wordpress/i18n": { - "version": "4.42.8", - "resolved": "https://registry.npmjs.org/@wordpress/i18n/-/i18n-4.42.8.tgz", - "integrity": "sha512-gf+zq8N1oTCRV3iJV1x/tmimDYc4CS6WwQG9tI50Ge6AR01MTagXuWhHZArvlIF9PnNSoDDLM1UmBWjtqqH9mA==", + "version": "4.42.9", + "resolved": "https://registry.npmjs.org/@wordpress/i18n/-/i18n-4.42.9.tgz", + "integrity": "sha512-tfxTQo2XiUQC+uQCLtWMJxU9fAtfZL31uFCj96dVgWmNH53wyJdl24EpwtT53iOAOHoYv1Bo59f3l94WRZaGfw==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/hooks": "^3.42.8", + "@wordpress/hooks": "^3.42.9", "gettext-parser": "^1.3.1", "memize": "^2.1.0", "sprintf-js": "^1.1.1", @@ -39455,19 +39470,19 @@ } }, "@wordpress/icons": { - "version": "9.33.8", - "resolved": "https://registry.npmjs.org/@wordpress/icons/-/icons-9.33.8.tgz", - "integrity": "sha512-Rmq7QYB9R2SGtniXSVox6achmDh9ekipPdIDHq9PW5wHiGrYH0xbyhLXHvn8MyHTPBa/zcc2MsZlsRe1fz3HBw==", + "version": "9.33.9", + "resolved": "https://registry.npmjs.org/@wordpress/icons/-/icons-9.33.9.tgz", + "integrity": "sha512-hab0Nnwp+RBmFe1Pq4MdUrdwe3bMmno5/6wsqRxuDYQuUDk6E1eFzXTasRpj3sakr5AY6TZ0/B6G8XvtRB7Gaw==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/element": "^5.19.8", - "@wordpress/primitives": "^3.40.8" + "@wordpress/element": "^5.19.9", + "@wordpress/primitives": "^3.40.9" } }, "@wordpress/interactivity": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/@wordpress/interactivity/-/interactivity-2.3.8.tgz", - "integrity": "sha512-V/5NFnT10zrxRU5zJ2EKfZ7lIlsXh/kUepM6/QnSdmZktu/BQ1ni7yo2BTybUE3nfTJjW/dQQG3BLCMhGSF9rQ==", + "version": "2.3.9", + "resolved": "https://registry.npmjs.org/@wordpress/interactivity/-/interactivity-2.3.9.tgz", + "integrity": "sha512-9wNNj/RD3R91g6XZwQVcRayjj0oulBSIuOWrzewjIgt7fvEKaFBusrIj+WyTKETYMR8bXGxtJP7ydPjH5iK1TQ==", "requires": { "@preact/signals": "^1.1.3", "deepsignal": "^1.3.6", @@ -39475,29 +39490,29 @@ } }, "@wordpress/interface": { - "version": "5.19.8", - "resolved": "https://registry.npmjs.org/@wordpress/interface/-/interface-5.19.8.tgz", - "integrity": "sha512-xpAoT4Ap252YXG4GMFhohEIhT97UitK/Ncvwnu+pz3iHNvtSk5p0OpRGFy3n9YVLJgHxT3kCFnNNV/hz0/dGZw==", + "version": "5.19.9", + "resolved": "https://registry.npmjs.org/@wordpress/interface/-/interface-5.19.9.tgz", + "integrity": "sha512-GMhdGWADL5Zm300Cdibh5QGb+DofKO9HI211Zz+0DzcKk6H79hN4sXkZpJEQLCqfnGvdL1X8IwVGoBA2vWkb/Q==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/a11y": "^3.42.8", - "@wordpress/components": "^25.8.8", - "@wordpress/compose": "^6.19.8", - "@wordpress/data": "^9.12.8", - "@wordpress/deprecated": "^3.42.8", - "@wordpress/element": "^5.19.8", - "@wordpress/i18n": "^4.42.8", - "@wordpress/icons": "^9.33.8", - "@wordpress/plugins": "^6.10.8", - "@wordpress/preferences": "^3.19.8", - "@wordpress/viewport": "^5.19.8", + "@wordpress/a11y": "^3.42.9", + "@wordpress/components": "^25.8.9", + "@wordpress/compose": "^6.19.9", + "@wordpress/data": "^9.12.9", + "@wordpress/deprecated": "^3.42.9", + "@wordpress/element": "^5.19.9", + "@wordpress/i18n": "^4.42.9", + "@wordpress/icons": "^9.33.9", + "@wordpress/plugins": "^6.10.9", + "@wordpress/preferences": "^3.19.9", + "@wordpress/viewport": "^5.19.9", "classnames": "^2.3.1" } }, "@wordpress/is-shallow-equal": { - "version": "4.42.8", - "resolved": "https://registry.npmjs.org/@wordpress/is-shallow-equal/-/is-shallow-equal-4.42.8.tgz", - "integrity": "sha512-SIFZ+a+B+DrKKqJ1fk9c5xY02MkMlO7bxYH1dC/sJGUgr2P7eIELHqTg/240coNvmy/juny5HZj64Mzk3QkQyw==", + "version": "4.42.9", + "resolved": "https://registry.npmjs.org/@wordpress/is-shallow-equal/-/is-shallow-equal-4.42.9.tgz", + "integrity": "sha512-U8FJEXaYhJ7Hr6UKI8P3vXb04tjtLpv1AzYnANqtS72GJNWTQ/v3auQQCu0gfuV/QokXL/q5rN8uTrN9KCi/rw==", "requires": { "@babel/runtime": "^7.16.0" } @@ -39523,61 +39538,61 @@ } }, "@wordpress/keyboard-shortcuts": { - "version": "4.19.8", - "resolved": "https://registry.npmjs.org/@wordpress/keyboard-shortcuts/-/keyboard-shortcuts-4.19.8.tgz", - "integrity": "sha512-UGN5CZM3rEG+LZq4+AqWlmdOQEFweiCL6exUdMCyrtkQsdQzHnuGVL4qUgg1l+kiznOuaucG9Q2chyJQmr6lZA==", + "version": "4.19.9", + "resolved": "https://registry.npmjs.org/@wordpress/keyboard-shortcuts/-/keyboard-shortcuts-4.19.9.tgz", + "integrity": "sha512-8ymRxEY7Axb4YZVA3Ddgxi8Yiw3ep8OqwW2B9tqG/qvaQN8f6c7l0E1TPFmXtwSCwtSyi5Yk+NoLkQPqGdov1A==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/data": "^9.12.8", - "@wordpress/element": "^5.19.8", - "@wordpress/keycodes": "^3.42.8", + "@wordpress/data": "^9.12.9", + "@wordpress/element": "^5.19.9", + "@wordpress/keycodes": "^3.42.9", "rememo": "^4.0.2" } }, "@wordpress/keycodes": { - "version": "3.42.8", - "resolved": "https://registry.npmjs.org/@wordpress/keycodes/-/keycodes-3.42.8.tgz", - "integrity": "sha512-YzB+qChfLDeOnzVWV4oKtz2XTwrK+tIm7wS6Mscvv6z29DZ0+3R2mNZCvd9N/sYa7PDZ1IPC40wPV0s3tkIFMw==", + "version": "3.42.9", + "resolved": "https://registry.npmjs.org/@wordpress/keycodes/-/keycodes-3.42.9.tgz", + "integrity": "sha512-cYQMgpryAUzly9SCc8HyKPqeXD5xo/pgzwlAFV+BuFItRI24ccSoW46JxJS2SrvygvHLNF0Uy6u4ZYFWgMdBlQ==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/i18n": "^4.42.8", + "@wordpress/i18n": "^4.42.9", "change-case": "^4.1.2" } }, "@wordpress/list-reusable-blocks": { - "version": "4.19.8", - "resolved": "https://registry.npmjs.org/@wordpress/list-reusable-blocks/-/list-reusable-blocks-4.19.8.tgz", - "integrity": "sha512-QZ+yGcQ/g872gFVEdC4tomLEBDPVNbu1hOw95Xki7pCOeh2aFpby+6l1SY87/uJycOc+904UOyC+Omf+Xs/lIA==", + "version": "4.19.9", + "resolved": "https://registry.npmjs.org/@wordpress/list-reusable-blocks/-/list-reusable-blocks-4.19.9.tgz", + "integrity": "sha512-dW4Ri7G7E/TUUTdVo4sg27R3OQJIEEBNVGy8pk+Vn2A3QgD6WXd2YzTf+Le01yU15Oi84g6cogl3CL/ZF4spJg==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/api-fetch": "^6.39.8", - "@wordpress/components": "^25.8.8", - "@wordpress/compose": "^6.19.8", - "@wordpress/element": "^5.19.8", - "@wordpress/i18n": "^4.42.8", + "@wordpress/api-fetch": "^6.39.9", + "@wordpress/components": "^25.8.9", + "@wordpress/compose": "^6.19.9", + "@wordpress/element": "^5.19.9", + "@wordpress/i18n": "^4.42.9", "change-case": "^4.1.2" } }, "@wordpress/media-utils": { - "version": "4.33.8", - "resolved": "https://registry.npmjs.org/@wordpress/media-utils/-/media-utils-4.33.8.tgz", - "integrity": "sha512-WxfPMlJnu57pRT2A5AztKffkVOnMBCyaT5IuX8LPrP3jU/1phrfel9i+BNl7LIjzDxqv1bgXZYqS2+SvT78Atg==", + "version": "4.33.9", + "resolved": "https://registry.npmjs.org/@wordpress/media-utils/-/media-utils-4.33.9.tgz", + "integrity": "sha512-sMx9kxvuvFsS3J9yZwFKHoCcfiOR8tY2FKxxq7hzE2EcgdQ9ol0fo7BkzgOLpFlTLIg1kEoW8yGQgN5HQV0fuw==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/api-fetch": "^6.39.8", - "@wordpress/blob": "^3.42.8", - "@wordpress/element": "^5.19.8", - "@wordpress/i18n": "^4.42.8" + "@wordpress/api-fetch": "^6.39.9", + "@wordpress/blob": "^3.42.9", + "@wordpress/element": "^5.19.9", + "@wordpress/i18n": "^4.42.9" } }, "@wordpress/notices": { - "version": "4.10.8", - "resolved": "https://registry.npmjs.org/@wordpress/notices/-/notices-4.10.8.tgz", - "integrity": "sha512-40m5Pt64h6OFu19/o9Xoxs57JcwiS2wSgOxSBWj5u0xLLanSTPbG7/jWhj2MpSlYMxFpc7vupD+NUwWqwMe5xw==", + "version": "4.10.9", + "resolved": "https://registry.npmjs.org/@wordpress/notices/-/notices-4.10.9.tgz", + "integrity": "sha512-Co7JuUgaZonooaRbXlfQGrfE4HK6kNcmaS5gJBWBYH79aOWyNt2ENZxdFHMDQIN+9v0UlB7rOFAQSG24EsgVZQ==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/a11y": "^3.42.8", - "@wordpress/data": "^9.12.8" + "@wordpress/a11y": "^3.42.9", + "@wordpress/data": "^9.12.9" } }, "@wordpress/npm-package-json-lint-config": { @@ -39587,54 +39602,54 @@ "dev": true }, "@wordpress/nux": { - "version": "8.4.8", - "resolved": "https://registry.npmjs.org/@wordpress/nux/-/nux-8.4.8.tgz", - "integrity": "sha512-MNwMlVWc5LYq9FGy8CZPPjqoRdCOZi4BvLIvedp6gngkATtJY+7YNHWu6GhKuEk0P7YyW5qLEOClWHzJX9npgw==", + "version": "8.4.9", + "resolved": "https://registry.npmjs.org/@wordpress/nux/-/nux-8.4.9.tgz", + "integrity": "sha512-a6JWKQk91B+wLwyGogxqSXSTzM2eC25+Z1nP/Bpe2P7p3vcxpeut3Jy1XIpiXDuH82YFxnnRx2lJb5qTsROEhA==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/components": "^25.8.8", - "@wordpress/compose": "^6.19.8", - "@wordpress/data": "^9.12.8", - "@wordpress/deprecated": "^3.42.8", - "@wordpress/element": "^5.19.8", - "@wordpress/i18n": "^4.42.8", - "@wordpress/icons": "^9.33.8", + "@wordpress/components": "^25.8.9", + "@wordpress/compose": "^6.19.9", + "@wordpress/data": "^9.12.9", + "@wordpress/deprecated": "^3.42.9", + "@wordpress/element": "^5.19.9", + "@wordpress/i18n": "^4.42.9", + "@wordpress/icons": "^9.33.9", "rememo": "^4.0.2" } }, "@wordpress/patterns": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/@wordpress/patterns/-/patterns-1.3.8.tgz", - "integrity": "sha512-j29U3EZpDSfURZ87+MKaPmYXXmSwA0YRFx2unry5B2ZLN9Lh2y3H0HA71RjocWUZHgwQ7KgrS1ug1tqh6g/2/Q==", + "version": "1.3.9", + "resolved": "https://registry.npmjs.org/@wordpress/patterns/-/patterns-1.3.9.tgz", + "integrity": "sha512-zvSfE8wdXxlKHONYH0tvYMOlH0eMI5sXUhDAfqYH1B1OQ4Clq84jc0r+X/iolvD/WjuyP4b6K3P91almrRqBnA==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/block-editor": "^12.10.8", - "@wordpress/blocks": "^12.19.8", - "@wordpress/components": "^25.8.8", - "@wordpress/compose": "^6.19.8", - "@wordpress/core-data": "^6.19.8", - "@wordpress/data": "^9.12.8", - "@wordpress/element": "^5.19.8", - "@wordpress/html-entities": "^3.42.8", - "@wordpress/i18n": "^4.42.8", - "@wordpress/icons": "^9.33.8", - "@wordpress/notices": "^4.10.8", - "@wordpress/private-apis": "^0.24.8", - "@wordpress/url": "^3.43.8" + "@wordpress/block-editor": "^12.10.9", + "@wordpress/blocks": "^12.19.9", + "@wordpress/components": "^25.8.9", + "@wordpress/compose": "^6.19.9", + "@wordpress/core-data": "^6.19.9", + "@wordpress/data": "^9.12.9", + "@wordpress/element": "^5.19.9", + "@wordpress/html-entities": "^3.42.9", + "@wordpress/i18n": "^4.42.9", + "@wordpress/icons": "^9.33.9", + "@wordpress/notices": "^4.10.9", + "@wordpress/private-apis": "^0.24.9", + "@wordpress/url": "^3.43.9" } }, "@wordpress/plugins": { - "version": "6.10.8", - "resolved": "https://registry.npmjs.org/@wordpress/plugins/-/plugins-6.10.8.tgz", - "integrity": "sha512-zH2ExHxro4+HubHzb4VucslZwriKl5EHlFpQFLXVduIrrglmLPmoR9wbioGkAsen2P0Ny+v61lwJjdWpeK2ZWw==", + "version": "6.10.9", + "resolved": "https://registry.npmjs.org/@wordpress/plugins/-/plugins-6.10.9.tgz", + "integrity": "sha512-jOdxubWwBlMh5YRVKJ6BA0tj+awJLfDdYHXTwwW3CW9dZMKPLbWGw6SBSAQXtdjLlJ6dJewvMjCsAxc1fIJSwg==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/components": "^25.8.8", - "@wordpress/compose": "^6.19.8", - "@wordpress/element": "^5.19.8", - "@wordpress/hooks": "^3.42.8", - "@wordpress/icons": "^9.33.8", - "@wordpress/is-shallow-equal": "^4.42.8", + "@wordpress/components": "^25.8.9", + "@wordpress/compose": "^6.19.9", + "@wordpress/element": "^5.19.9", + "@wordpress/hooks": "^3.42.9", + "@wordpress/icons": "^9.33.9", + "@wordpress/is-shallow-equal": "^4.42.9", "memize": "^2.0.1" } }, @@ -39649,66 +39664,66 @@ } }, "@wordpress/preferences": { - "version": "3.19.8", - "resolved": "https://registry.npmjs.org/@wordpress/preferences/-/preferences-3.19.8.tgz", - "integrity": "sha512-+/NdmLZ845KJnYB/O2OLmq5ZtiSf43/SJzdbCktODPQQacF2GqyMte0NHDm31RSihwiOGt332kLhg5Uf9SvwXA==", + "version": "3.19.9", + "resolved": "https://registry.npmjs.org/@wordpress/preferences/-/preferences-3.19.9.tgz", + "integrity": "sha512-WWNb6U1FufAdff5365fmmbW5o3UGkegXaQ5tzW5ONtFiugThIZ29VSSJCBeYhq5D3PaRsKGR6r1iZdqt/Crv1Q==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/a11y": "^3.42.8", - "@wordpress/components": "^25.8.8", - "@wordpress/data": "^9.12.8", - "@wordpress/element": "^5.19.8", - "@wordpress/i18n": "^4.42.8", - "@wordpress/icons": "^9.33.8", + "@wordpress/a11y": "^3.42.9", + "@wordpress/components": "^25.8.9", + "@wordpress/data": "^9.12.9", + "@wordpress/element": "^5.19.9", + "@wordpress/i18n": "^4.42.9", + "@wordpress/icons": "^9.33.9", "classnames": "^2.3.1" } }, "@wordpress/preferences-persistence": { - "version": "1.34.8", - "resolved": "https://registry.npmjs.org/@wordpress/preferences-persistence/-/preferences-persistence-1.34.8.tgz", - "integrity": "sha512-1LSpOJcjUsoL2xJ3olQS2Bap7kuW/rcIf0ZhFkdHX5gZzwZXm6tthBxROFSsXNznI1MzAvp3nPOYH+zG1i2i6Q==", + "version": "1.34.9", + "resolved": "https://registry.npmjs.org/@wordpress/preferences-persistence/-/preferences-persistence-1.34.9.tgz", + "integrity": "sha512-H05GoyBh7I23vhv3lej3vLRRi716Ln/j+Nb2AHOMemFNKehpcFTtpepmRNyM62bAeEta3OEL8uWZh601yOI8zg==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/api-fetch": "^6.39.8" + "@wordpress/api-fetch": "^6.39.9" } }, "@wordpress/prettier-config": { - "version": "2.25.8", - "resolved": "https://registry.npmjs.org/@wordpress/prettier-config/-/prettier-config-2.25.8.tgz", - "integrity": "sha512-u2ixIFhw8YyrlQ1HEy9sDPTDxiOj6cPEEDI4ObGnrKIQVcE90CJpswyquBU23b++I9htJpklGWk7sotUOBlvgg==", + "version": "2.25.9", + "resolved": "https://registry.npmjs.org/@wordpress/prettier-config/-/prettier-config-2.25.9.tgz", + "integrity": "sha512-R1vc/HAp9dsQzg4wbKhCDTGzVvPSXb4ZJZ0ed8nyAcegbYGPcJZSgJKEl6JrNialU6OzNygXz2Og6cy21DYCFQ==", "dev": true }, "@wordpress/primitives": { - "version": "3.40.8", - "resolved": "https://registry.npmjs.org/@wordpress/primitives/-/primitives-3.40.8.tgz", - "integrity": "sha512-kkqvnw617T9q13YeWbNNrhtGa90fqXrxZueONXDEzFkeMO1VKU77g3OQ48g04DpeSSrcNT6MQVSZcqeAfulPHQ==", + "version": "3.40.9", + "resolved": "https://registry.npmjs.org/@wordpress/primitives/-/primitives-3.40.9.tgz", + "integrity": "sha512-jV66szHVhATrw8vOSogGx3Rn4X2VPFshwjGWdbxfY3nYiYnQ6XrXePDFX/rTExMNyaTGRWQRviUzlyvqxqCWgw==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/element": "^5.19.8", + "@wordpress/element": "^5.19.9", "classnames": "^2.3.1" } }, "@wordpress/priority-queue": { - "version": "2.42.8", - "resolved": "https://registry.npmjs.org/@wordpress/priority-queue/-/priority-queue-2.42.8.tgz", - "integrity": "sha512-ww9TmFyLCW6W+FrcyrYvIAxQ6lYY9g0CAbWIVE47n1yQj3AtDrLJ4RFkgkEKrrEyXPDjmX383irLOV1q6GcsaQ==", + "version": "2.42.9", + "resolved": "https://registry.npmjs.org/@wordpress/priority-queue/-/priority-queue-2.42.9.tgz", + "integrity": "sha512-YSkVlGRACfqujGDUhRMBqHaIKJKqGXTQegMrMctdr6O1twvD80Xc2M86fvL0EBlMUnfQ+dqqE2htYqFGu2NitQ==", "requires": { "@babel/runtime": "^7.16.0", "requestidlecallback": "^0.3.0" } }, "@wordpress/private-apis": { - "version": "0.24.8", - "resolved": "https://registry.npmjs.org/@wordpress/private-apis/-/private-apis-0.24.8.tgz", - "integrity": "sha512-wfI7QoXQRTIt22bZXjMQO5xYstnI76l/OYpPF67N8TPtvOcZ2hR+FpFVY72kl2Hgjp0XBY0sXapncFWJ/wCNHQ==", + "version": "0.24.9", + "resolved": "https://registry.npmjs.org/@wordpress/private-apis/-/private-apis-0.24.9.tgz", + "integrity": "sha512-QxXLA/57CwVDWrTRAHNn1nmm3jbegmfFeH0yp70wikns5JlIIZUcpVpvOjLsW/NNzbKppoUlVDJ3/YfnHQKVeA==", "requires": { "@babel/runtime": "^7.16.0" } }, "@wordpress/redux-routine": { - "version": "4.42.8", - "resolved": "https://registry.npmjs.org/@wordpress/redux-routine/-/redux-routine-4.42.8.tgz", - "integrity": "sha512-L2sDJkn0kVQRgGzmxJLRml7jQHjCWYmKiyeDbbsTjq1cw4+ra3qX1pEmMnP3RXlheFBecvfZmj8FakFgxEd6+A==", + "version": "4.42.9", + "resolved": "https://registry.npmjs.org/@wordpress/redux-routine/-/redux-routine-4.42.9.tgz", + "integrity": "sha512-rhY7yqXVnOR5tvGZowlPBVI5qGARVogPzMkX0I6+ThtHTkGZ3dR38c34IAYDmCki8OLeJIiVqH/hikQknXlO7w==", "requires": { "@babel/runtime": "^7.16.0", "is-plain-object": "^5.0.0", @@ -39717,73 +39732,73 @@ } }, "@wordpress/reusable-blocks": { - "version": "4.19.8", - "resolved": "https://registry.npmjs.org/@wordpress/reusable-blocks/-/reusable-blocks-4.19.8.tgz", - "integrity": "sha512-oS4VVwpaDbnRoPpH+yJB+6zvhVDwIqFH00CtWPZlNKldUZEPAm3nv2EqVx9TpSZfJUOG8uK9kbuB/lHyOn6i0Q==", + "version": "4.19.9", + "resolved": "https://registry.npmjs.org/@wordpress/reusable-blocks/-/reusable-blocks-4.19.9.tgz", + "integrity": "sha512-ZXhANpogA3FmyNuFwj3NvyePY4WQFU0lYZCTvWIXHZi9DHlcqHcIbaFD1uhsvS2k8KNLjuEVh1wyvh8SCo+hBw==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/block-editor": "^12.10.8", - "@wordpress/blocks": "^12.19.8", - "@wordpress/components": "^25.8.8", - "@wordpress/core-data": "^6.19.8", - "@wordpress/data": "^9.12.8", - "@wordpress/element": "^5.19.8", - "@wordpress/i18n": "^4.42.8", - "@wordpress/icons": "^9.33.8", - "@wordpress/notices": "^4.10.8", - "@wordpress/private-apis": "^0.24.8", - "@wordpress/url": "^3.43.8" + "@wordpress/block-editor": "^12.10.9", + "@wordpress/blocks": "^12.19.9", + "@wordpress/components": "^25.8.9", + "@wordpress/core-data": "^6.19.9", + "@wordpress/data": "^9.12.9", + "@wordpress/element": "^5.19.9", + "@wordpress/i18n": "^4.42.9", + "@wordpress/icons": "^9.33.9", + "@wordpress/notices": "^4.10.9", + "@wordpress/private-apis": "^0.24.9", + "@wordpress/url": "^3.43.9" } }, "@wordpress/rich-text": { - "version": "6.19.8", - "resolved": "https://registry.npmjs.org/@wordpress/rich-text/-/rich-text-6.19.8.tgz", - "integrity": "sha512-LBiivMfpDX2zvN/dnGU47r1XTg/qkn8xffYbkl9q9YMx/MJ5vaoK60UrvdZNIORRQ3sxkQCzNflDWrWTe8zu/w==", + "version": "6.19.9", + "resolved": "https://registry.npmjs.org/@wordpress/rich-text/-/rich-text-6.19.9.tgz", + "integrity": "sha512-K7B3YvpJqsKgjPDiC3sFFJ814ErUcv9gXdVVQ25HVXnEs9GT4MX56PW13nbQAaEh03Y2/2w0hSPAsav/WOUd6Q==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/a11y": "^3.42.8", - "@wordpress/compose": "^6.19.8", - "@wordpress/data": "^9.12.8", - "@wordpress/deprecated": "^3.42.8", - "@wordpress/element": "^5.19.8", - "@wordpress/escape-html": "^2.42.8", - "@wordpress/i18n": "^4.42.8", - "@wordpress/keycodes": "^3.42.8", + "@wordpress/a11y": "^3.42.9", + "@wordpress/compose": "^6.19.9", + "@wordpress/data": "^9.12.9", + "@wordpress/deprecated": "^3.42.9", + "@wordpress/element": "^5.19.9", + "@wordpress/escape-html": "^2.42.9", + "@wordpress/i18n": "^4.42.9", + "@wordpress/keycodes": "^3.42.9", "memize": "^2.1.0", "rememo": "^4.0.2" } }, "@wordpress/router": { - "version": "0.11.8", - "resolved": "https://registry.npmjs.org/@wordpress/router/-/router-0.11.8.tgz", - "integrity": "sha512-+NFvQgyZJ6jW6F49bAImtN4i/srhEe2k4A5NPM1u14i+LgPHsDbXKZm9C0f+vyhKe+iUm6yghv+WmDZDTNLHbA==", + "version": "0.11.9", + "resolved": "https://registry.npmjs.org/@wordpress/router/-/router-0.11.9.tgz", + "integrity": "sha512-bSuNqVCkABzdeh1ORKb2uenyK7QjLBma79xcFIux0fhPt9uXn5QLocKG0apExaNKofssCyF6XF4EL5NuaXZSLQ==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/element": "^5.19.8", - "@wordpress/private-apis": "^0.24.8", - "@wordpress/url": "^3.43.8", + "@wordpress/element": "^5.19.9", + "@wordpress/private-apis": "^0.24.9", + "@wordpress/url": "^3.43.9", "history": "^5.1.0" } }, "@wordpress/scripts": { - "version": "26.13.8", - "resolved": "https://registry.npmjs.org/@wordpress/scripts/-/scripts-26.13.8.tgz", - "integrity": "sha512-zYJMPJdhEY/YbqM5ZbpM3ZFNJ/tRa48f5pbdD99b2pHFTu820UG8sYDtb7HpzXHfxe9S6QzNJjdgqsdQMVr0+Q==", + "version": "26.13.9", + "resolved": "https://registry.npmjs.org/@wordpress/scripts/-/scripts-26.13.9.tgz", + "integrity": "sha512-+EM2f9s2U1WwlhKgXCQfdYLI3qGm3+eFTgStRBI9+AzVGyGu7s0/sTQm7ekmvs5nSFTBk6OjYQ/jxNhvz860pw==", "dev": true, "requires": { "@babel/core": "^7.16.0", "@pmmmwh/react-refresh-webpack-plugin": "^0.5.2", "@svgr/webpack": "^8.0.1", - "@wordpress/babel-preset-default": "^7.26.8", - "@wordpress/browserslist-config": "^5.25.8", - "@wordpress/dependency-extraction-webpack-plugin": "^4.25.8", - "@wordpress/e2e-test-utils-playwright": "^0.10.8", - "@wordpress/eslint-plugin": "^16.0.8", - "@wordpress/jest-preset-default": "^11.13.8", - "@wordpress/npm-package-json-lint-config": "^4.27.8", - "@wordpress/postcss-plugins-preset": "^4.26.8", - "@wordpress/prettier-config": "^2.25.8", - "@wordpress/stylelint-config": "^21.25.8", + "@wordpress/babel-preset-default": "^7.26.9", + "@wordpress/browserslist-config": "^5.25.9", + "@wordpress/dependency-extraction-webpack-plugin": "^4.25.9", + "@wordpress/e2e-test-utils-playwright": "^0.10.9", + "@wordpress/eslint-plugin": "^16.0.9", + "@wordpress/jest-preset-default": "^11.13.9", + "@wordpress/npm-package-json-lint-config": "^4.27.9", + "@wordpress/postcss-plugins-preset": "^4.26.9", + "@wordpress/prettier-config": "^2.25.9", + "@wordpress/stylelint-config": "^21.25.9", "adm-zip": "^0.5.9", "babel-jest": "^29.6.2", "babel-loader": "^8.2.3", @@ -40056,36 +40071,36 @@ } }, "@wordpress/server-side-render": { - "version": "4.19.8", - "resolved": "https://registry.npmjs.org/@wordpress/server-side-render/-/server-side-render-4.19.8.tgz", - "integrity": "sha512-8vrP5BFlMAG1uJBvjt9cQl8T92GmRJACQ8UOCUz0AHTECfC/0IW+rSPU2MyJbmxJTl3wVN2k5HLf9pv3IEsSOQ==", + "version": "4.19.9", + "resolved": "https://registry.npmjs.org/@wordpress/server-side-render/-/server-side-render-4.19.9.tgz", + "integrity": "sha512-eHu9VjoREDsgD+p6vGgTEcZ2W7f7Xnd1DOQAb9ZBDWkr8XxPcd5wjhxiBIP4xz70UrYeByuZpcZ0ngXoP5xwtw==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/api-fetch": "^6.39.8", - "@wordpress/blocks": "^12.19.8", - "@wordpress/components": "^25.8.8", - "@wordpress/compose": "^6.19.8", - "@wordpress/data": "^9.12.8", - "@wordpress/deprecated": "^3.42.8", - "@wordpress/element": "^5.19.8", - "@wordpress/i18n": "^4.42.8", - "@wordpress/url": "^3.43.8", + "@wordpress/api-fetch": "^6.39.9", + "@wordpress/blocks": "^12.19.9", + "@wordpress/components": "^25.8.9", + "@wordpress/compose": "^6.19.9", + "@wordpress/data": "^9.12.9", + "@wordpress/deprecated": "^3.42.9", + "@wordpress/element": "^5.19.9", + "@wordpress/i18n": "^4.42.9", + "@wordpress/url": "^3.43.9", "fast-deep-equal": "^3.1.3" } }, "@wordpress/shortcode": { - "version": "3.42.8", - "resolved": "https://registry.npmjs.org/@wordpress/shortcode/-/shortcode-3.42.8.tgz", - "integrity": "sha512-b9rujekRuie8fwO01LgGLInC2WFQxYdlq5tnj6Zp9cwcOQFSJP4NDVvsfZohUZGgfkSLBusb3ljGfmFCtOAtGg==", + "version": "3.42.9", + "resolved": "https://registry.npmjs.org/@wordpress/shortcode/-/shortcode-3.42.9.tgz", + "integrity": "sha512-t8M65OyNITU4zs1GLxNGxrP8kVS+JErjhHs/OA5JEuhB94HUVz6vPHux3MmwbgEzWjCyFcyMhaKyy51GLLfWpQ==", "requires": { "@babel/runtime": "^7.16.0", "memize": "^2.0.1" } }, "@wordpress/style-engine": { - "version": "1.25.8", - "resolved": "https://registry.npmjs.org/@wordpress/style-engine/-/style-engine-1.25.8.tgz", - "integrity": "sha512-kf0e/U33YNgAlvpF/NnQ2BO3c2ATExRR5nb+47IPgayqsNKSU30aRbGc2ncrhYg297noDH5E679936M/QcJ1+w==", + "version": "1.25.9", + "resolved": "https://registry.npmjs.org/@wordpress/style-engine/-/style-engine-1.25.9.tgz", + "integrity": "sha512-DgYBCunHbe6dgjOkI9euvjbZeO5coolkhZI02niF2aCZHBXXyfkLl/VEBqJhotZ1peBUKaF0rQCStivnvMrYDA==", "requires": { "@babel/runtime": "^7.16.0", "change-case": "^4.1.2" @@ -40102,9 +40117,9 @@ } }, "@wordpress/sync": { - "version": "0.4.8", - "resolved": "https://registry.npmjs.org/@wordpress/sync/-/sync-0.4.8.tgz", - "integrity": "sha512-e/ujr8ZoVwF46oxRjFmwtfL6QKtlz0rA0HV8D7uye8lkIi3Dl6ytIfVQfPYj58LYaQEfBR5p7ydmsuK54N2IkA==", + "version": "0.4.9", + "resolved": "https://registry.npmjs.org/@wordpress/sync/-/sync-0.4.9.tgz", + "integrity": "sha512-t04zhd6wjc4tgvMk1nRCOLkLg0ebEWODAE4bJ14GUzkpW5Y4txJLvqOMNIq/CV0YYEI71/4l32b+YIWKRhrHaQ==", "requires": { "@babel/runtime": "^7.16.0", "y-indexeddb": "~9.0.11", @@ -40113,71 +40128,71 @@ } }, "@wordpress/token-list": { - "version": "2.42.8", - "resolved": "https://registry.npmjs.org/@wordpress/token-list/-/token-list-2.42.8.tgz", - "integrity": "sha512-Sk9sgfBKYTBsbbcdCj7I8RR2q35GPYZ8SAa2hW8LfbHftxlpg640MTLoEZVoJ8bKCj6+4sEu0uxyCyC7pTWDVw==", + "version": "2.42.9", + "resolved": "https://registry.npmjs.org/@wordpress/token-list/-/token-list-2.42.9.tgz", + "integrity": "sha512-C1+nitSAVqftjPHyRQxiZmqpQUtMU4mYOj+TQ591Rd2ErOoBU42wzySafhqozelew8JyV19TDSVRqlpJzh/aAA==", "requires": { "@babel/runtime": "^7.16.0" } }, "@wordpress/undo-manager": { - "version": "0.2.8", - "resolved": "https://registry.npmjs.org/@wordpress/undo-manager/-/undo-manager-0.2.8.tgz", - "integrity": "sha512-BakaKB3zFeTYBsVtpXCD9/AYnI3NbHxLQaeJhuQaZXZ+MWoxJSLt48XrEmLYNSNZJ5sXs2ZuSNSy4Wi9Gm3c1g==", + "version": "0.2.9", + "resolved": "https://registry.npmjs.org/@wordpress/undo-manager/-/undo-manager-0.2.9.tgz", + "integrity": "sha512-YDArAWNvvH9AkXgxmhT560+rFzLs4w7S7LQmzzU/ej4CRFFuJ0qHdvsucX8lStdKyZ08hMky3HUBrwgDkav8ug==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/is-shallow-equal": "^4.42.8" + "@wordpress/is-shallow-equal": "^4.42.9" } }, "@wordpress/url": { - "version": "3.43.8", - "resolved": "https://registry.npmjs.org/@wordpress/url/-/url-3.43.8.tgz", - "integrity": "sha512-ZjNNaLbtv43B9XVt6wCFfB2YOSNAntYB0azARw91zBAq/QEqAUnzNCa4WZyj7NtsKQ9+hbo46Uw+PNgdJ1wulg==", + "version": "3.43.9", + "resolved": "https://registry.npmjs.org/@wordpress/url/-/url-3.43.9.tgz", + "integrity": "sha512-bpOK3EAu8K8nFf8G5cDzenPOYBPu34s6OMwq79rK+Jvcu4cnLH+doYm0HWUvffsi9suTu2Igm6rPnmAR9+xGuw==", "requires": { "@babel/runtime": "^7.16.0", "remove-accents": "^0.5.0" } }, "@wordpress/viewport": { - "version": "5.19.8", - "resolved": "https://registry.npmjs.org/@wordpress/viewport/-/viewport-5.19.8.tgz", - "integrity": "sha512-QFC8ZSdESs/vjkFSrLYuxT0bBJOw5jr1/beRcyJdR4qVu6q5vGe3F63W8qQgNtnufQ7XcTS/+Zz39bQZE02eHA==", + "version": "5.19.9", + "resolved": "https://registry.npmjs.org/@wordpress/viewport/-/viewport-5.19.9.tgz", + "integrity": "sha512-HLivhA8eXlCKguFBWOex4KcnZSyVA918TMUjN4YHnRE68hMNRMrVeswcYLlq4t3WH7e6q8a3rM0As32mV6c8ZQ==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/compose": "^6.19.8", - "@wordpress/data": "^9.12.8", - "@wordpress/element": "^5.19.8" + "@wordpress/compose": "^6.19.9", + "@wordpress/data": "^9.12.9", + "@wordpress/element": "^5.19.9" } }, "@wordpress/warning": { - "version": "2.42.8", - "resolved": "https://registry.npmjs.org/@wordpress/warning/-/warning-2.42.8.tgz", - "integrity": "sha512-4xuUwm+Hr1ot0w9s58gA3fs43rZ4nhoF8ClOTqcp3U7WsnVw1cfrv30lXzF7LXOtHbXhuD88b+0KsLwvcYNARA==" + "version": "2.42.9", + "resolved": "https://registry.npmjs.org/@wordpress/warning/-/warning-2.42.9.tgz", + "integrity": "sha512-/IlPgNZGP/m0LeJuamfUe7C5H1c0nNFnKHNsaQ/barXVij9Idah5gDR26XSlkwY1MQcrM0ECKf11pizY9ug3IA==" }, "@wordpress/widgets": { - "version": "3.19.8", - "resolved": "https://registry.npmjs.org/@wordpress/widgets/-/widgets-3.19.8.tgz", - "integrity": "sha512-nww+iLijZWV0lV0CK30knr13t1G19Wjmwp9fspv+xjwZJ6LAOCYOH63z5lvwnv1Mj+YfJNIgTmXsXd1qPk050A==", + "version": "3.19.9", + "resolved": "https://registry.npmjs.org/@wordpress/widgets/-/widgets-3.19.9.tgz", + "integrity": "sha512-KLFc9Cy9kelmPz3t/wLpiJrIaOVK0cs864adHIFdkkWISd37MquMH8TleqvHqx+NNWXkYq8uuH/Wh/tpvoCSlA==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/api-fetch": "^6.39.8", - "@wordpress/block-editor": "^12.10.8", - "@wordpress/blocks": "^12.19.8", - "@wordpress/components": "^25.8.8", - "@wordpress/compose": "^6.19.8", - "@wordpress/core-data": "^6.19.8", - "@wordpress/data": "^9.12.8", - "@wordpress/element": "^5.19.8", - "@wordpress/i18n": "^4.42.8", - "@wordpress/icons": "^9.33.8", - "@wordpress/notices": "^4.10.8", + "@wordpress/api-fetch": "^6.39.9", + "@wordpress/block-editor": "^12.10.9", + "@wordpress/blocks": "^12.19.9", + "@wordpress/components": "^25.8.9", + "@wordpress/compose": "^6.19.9", + "@wordpress/core-data": "^6.19.9", + "@wordpress/data": "^9.12.9", + "@wordpress/element": "^5.19.9", + "@wordpress/i18n": "^4.42.9", + "@wordpress/icons": "^9.33.9", + "@wordpress/notices": "^4.10.9", "classnames": "^2.3.1" } }, "@wordpress/wordcount": { - "version": "3.42.8", - "resolved": "https://registry.npmjs.org/@wordpress/wordcount/-/wordcount-3.42.8.tgz", - "integrity": "sha512-LRqJOT427bcqwusbqhlSjd+FNOMcFZEAoO2zS4OaZMkDrQSkhQCV1XHZNqkoWGuYssULC44CGBXA1bn9KO0PvA==", + "version": "3.42.9", + "resolved": "https://registry.npmjs.org/@wordpress/wordcount/-/wordcount-3.42.9.tgz", + "integrity": "sha512-hFTeVcoN/l341LlN349GyD3nEEUwwOWCmgr8BD+Lyp2J6G9kSUW9g3KQH8QU9b2x9+vtqKmiy52kf6sgTW4m4g==", "requires": { "@babel/runtime": "^7.16.0" } @@ -44190,12 +44205,12 @@ } }, "es-shim-unscopables": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz", - "integrity": "sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz", + "integrity": "sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==", "dev": true, "requires": { - "has": "^1.0.3" + "hasown": "^2.0.0" } }, "es-to-primitive": { @@ -44565,26 +44580,26 @@ } }, "eslint-plugin-import": { - "version": "2.28.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.28.1.tgz", - "integrity": "sha512-9I9hFlITvOV55alzoKBI+K9q74kv0iKMeY6av5+umsNwayt59fz692daGyjR+oStBQgx6nwR9rXldDev3Clw+A==", + "version": "2.29.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.29.0.tgz", + "integrity": "sha512-QPOO5NO6Odv5lpoTkddtutccQjysJuFxoPS7fAHO+9m9udNHvTCPSAMW9zGAYj8lAIdr40I8yPCdUYrncXtrwg==", "dev": true, "requires": { - "array-includes": "^3.1.6", - "array.prototype.findlastindex": "^1.2.2", - "array.prototype.flat": "^1.3.1", - "array.prototype.flatmap": "^1.3.1", + "array-includes": "^3.1.7", + "array.prototype.findlastindex": "^1.2.3", + "array.prototype.flat": "^1.3.2", + "array.prototype.flatmap": "^1.3.2", "debug": "^3.2.7", "doctrine": "^2.1.0", - "eslint-import-resolver-node": "^0.3.7", + "eslint-import-resolver-node": "^0.3.9", "eslint-module-utils": "^2.8.0", - "has": "^1.0.3", - "is-core-module": "^2.13.0", + "hasown": "^2.0.0", + "is-core-module": "^2.13.1", "is-glob": "^4.0.3", "minimatch": "^3.1.2", - "object.fromentries": "^2.0.6", - "object.groupby": "^1.0.0", - "object.values": "^1.1.6", + "object.fromentries": "^2.0.7", + "object.groupby": "^1.0.1", + "object.values": "^1.1.7", "semver": "^6.3.1", "tsconfig-paths": "^3.14.2" }, @@ -44616,9 +44631,9 @@ } }, "eslint-plugin-jest": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-27.4.2.tgz", - "integrity": "sha512-3Nfvv3wbq2+PZlRTf2oaAWXWwbdBejFRBR2O8tAO67o+P8zno+QGbcDYaAXODlreXVg+9gvWhKKmG2rgfb8GEg==", + "version": "27.4.3", + "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-27.4.3.tgz", + "integrity": "sha512-7S6SmmsHsgIm06BAGCAxL+ABd9/IB3MWkz2pudj6Qqor2y1qQpWPfuFU4SG9pWj4xDjF0e+D7Llh5useuSzAZw==", "dev": true, "requires": { "@typescript-eslint/utils": "^5.10.0" @@ -46129,9 +46144,9 @@ "optional": true }, "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==" }, "function.prototype.name": { "version": "1.1.5", @@ -47354,6 +47369,7 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, "requires": { "function-bind": "^1.1.1" } @@ -47465,6 +47481,14 @@ } } }, + "hasown": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", + "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", + "requires": { + "function-bind": "^1.1.2" + } + }, "header-case": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/header-case/-/header-case-2.0.4.tgz", @@ -48275,11 +48299,11 @@ "dev": true }, "is-core-module": { - "version": "2.13.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.0.tgz", - "integrity": "sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==", + "version": "2.13.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", + "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", "requires": { - "has": "^1.0.3" + "hasown": "^2.0.0" } }, "is-data-descriptor": { @@ -53244,14 +53268,14 @@ } }, "object.values": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.6.tgz", - "integrity": "sha512-FVVTkD1vENCsAcwNs9k6jea2uHC/X0+JcjG8YA60FN5CMaJmG95wT9jek/xX9nornqGRrBkKtzuAu2wuHpKqvw==", + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.7.tgz", + "integrity": "sha512-aU6xnDFYT3x17e/f0IiiwlGPTy2jzMySGfUB4fq6z7CV8l85CWHDk5ErhyhpfDHhrOMwGFhSQkhMGHaIotA6Ng==", "dev": true, "requires": { "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4" + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" } }, "objectFitPolyfill": { diff --git a/package.json b/package.json index 801983701df01..569d853cb90c9 100644 --- a/package.json +++ b/package.json @@ -27,11 +27,11 @@ "@lodder/grunt-postcss": "^3.1.1", "@playwright/test": "1.32.0", "@pmmmwh/react-refresh-webpack-plugin": "0.5.5", - "@wordpress/babel-preset-default": "7.26.8", - "@wordpress/dependency-extraction-webpack-plugin": "4.25.8", - "@wordpress/e2e-test-utils": "10.13.8", - "@wordpress/e2e-test-utils-playwright": "0.10.8", - "@wordpress/scripts": "26.13.8", + "@wordpress/babel-preset-default": "7.26.9", + "@wordpress/dependency-extraction-webpack-plugin": "4.25.9", + "@wordpress/e2e-test-utils": "10.13.9", + "@wordpress/e2e-test-utils-playwright": "0.10.9", + "@wordpress/scripts": "26.13.9", "autoprefixer": "10.4.16", "chalk": "5.3.0", "check-node-version": "4.2.1", @@ -79,70 +79,70 @@ "dependencies": { "@emotion/is-prop-valid": "0.8.8", "@emotion/memoize": "0.7.4", - "@wordpress/a11y": "3.42.8", - "@wordpress/annotations": "2.42.8", - "@wordpress/api-fetch": "6.39.8", - "@wordpress/autop": "3.42.8", - "@wordpress/blob": "3.42.8", - "@wordpress/block-directory": "4.19.8", - "@wordpress/block-editor": "12.10.8", - "@wordpress/block-library": "8.19.8", - "@wordpress/block-serialization-default-parser": "4.42.8", - "@wordpress/blocks": "12.19.8", - "@wordpress/commands": "0.13.8", - "@wordpress/components": "25.8.8", - "@wordpress/compose": "6.19.8", - "@wordpress/core-commands": "0.11.8", - "@wordpress/core-data": "6.19.8", - "@wordpress/customize-widgets": "4.19.8", - "@wordpress/data": "9.12.8", - "@wordpress/data-controls": "3.11.8", - "@wordpress/date": "4.42.8", - "@wordpress/deprecated": "3.42.8", - "@wordpress/dom": "3.42.8", - "@wordpress/dom-ready": "3.42.8", - "@wordpress/edit-post": "7.19.8", - "@wordpress/edit-site": "5.19.8", - "@wordpress/edit-widgets": "5.19.8", - "@wordpress/editor": "13.19.8", - "@wordpress/element": "5.19.8", - "@wordpress/escape-html": "2.42.8", - "@wordpress/format-library": "4.19.8", - "@wordpress/hooks": "3.42.8", - "@wordpress/html-entities": "3.42.8", - "@wordpress/i18n": "4.42.8", - "@wordpress/icons": "9.33.8", - "@wordpress/interactivity": "2.3.8", - "@wordpress/interface": "5.19.8", - "@wordpress/is-shallow-equal": "4.42.8", - "@wordpress/keyboard-shortcuts": "4.19.8", - "@wordpress/keycodes": "3.42.8", - "@wordpress/list-reusable-blocks": "4.19.8", - "@wordpress/media-utils": "4.33.8", - "@wordpress/notices": "4.10.8", - "@wordpress/nux": "8.4.8", - "@wordpress/patterns": "1.3.8", - "@wordpress/plugins": "6.10.8", - "@wordpress/preferences": "3.19.8", - "@wordpress/preferences-persistence": "1.34.8", - "@wordpress/primitives": "3.40.8", - "@wordpress/priority-queue": "2.42.8", - "@wordpress/private-apis": "0.24.8", - "@wordpress/redux-routine": "4.42.8", - "@wordpress/reusable-blocks": "4.19.8", - "@wordpress/rich-text": "6.19.8", - "@wordpress/router": "0.11.8", - "@wordpress/server-side-render": "4.19.8", - "@wordpress/shortcode": "3.42.8", - "@wordpress/style-engine": "1.25.8", - "@wordpress/sync": "0.4.8", - "@wordpress/token-list": "2.42.8", - "@wordpress/undo-manager": "0.2.8", - "@wordpress/url": "3.43.8", - "@wordpress/viewport": "5.19.8", - "@wordpress/warning": "2.42.8", - "@wordpress/widgets": "3.19.8", - "@wordpress/wordcount": "3.42.8", + "@wordpress/a11y": "3.42.9", + "@wordpress/annotations": "2.42.9", + "@wordpress/api-fetch": "6.39.9", + "@wordpress/autop": "3.42.9", + "@wordpress/blob": "3.42.9", + "@wordpress/block-directory": "4.19.9", + "@wordpress/block-editor": "12.10.9", + "@wordpress/block-library": "8.19.9", + "@wordpress/block-serialization-default-parser": "4.42.9", + "@wordpress/blocks": "12.19.9", + "@wordpress/commands": "0.13.9", + "@wordpress/components": "25.8.9", + "@wordpress/compose": "6.19.9", + "@wordpress/core-commands": "0.11.9", + "@wordpress/core-data": "6.19.9", + "@wordpress/customize-widgets": "4.19.9", + "@wordpress/data": "9.12.9", + "@wordpress/data-controls": "3.11.9", + "@wordpress/date": "4.42.9", + "@wordpress/deprecated": "3.42.9", + "@wordpress/dom": "3.42.9", + "@wordpress/dom-ready": "3.42.9", + "@wordpress/edit-post": "7.19.9", + "@wordpress/edit-site": "5.19.9", + "@wordpress/edit-widgets": "5.19.9", + "@wordpress/editor": "13.19.9", + "@wordpress/element": "5.19.9", + "@wordpress/escape-html": "2.42.9", + "@wordpress/format-library": "4.19.9", + "@wordpress/hooks": "3.42.9", + "@wordpress/html-entities": "3.42.9", + "@wordpress/i18n": "4.42.9", + "@wordpress/icons": "9.33.9", + "@wordpress/interactivity": "2.3.9", + "@wordpress/interface": "5.19.9", + "@wordpress/is-shallow-equal": "4.42.9", + "@wordpress/keyboard-shortcuts": "4.19.9", + "@wordpress/keycodes": "3.42.9", + "@wordpress/list-reusable-blocks": "4.19.9", + "@wordpress/media-utils": "4.33.9", + "@wordpress/notices": "4.10.9", + "@wordpress/nux": "8.4.9", + "@wordpress/patterns": "1.3.9", + "@wordpress/plugins": "6.10.9", + "@wordpress/preferences": "3.19.9", + "@wordpress/preferences-persistence": "1.34.9", + "@wordpress/primitives": "3.40.9", + "@wordpress/priority-queue": "2.42.9", + "@wordpress/private-apis": "0.24.9", + "@wordpress/redux-routine": "4.42.9", + "@wordpress/reusable-blocks": "4.19.9", + "@wordpress/rich-text": "6.19.9", + "@wordpress/router": "0.11.9", + "@wordpress/server-side-render": "4.19.9", + "@wordpress/shortcode": "3.42.9", + "@wordpress/style-engine": "1.25.9", + "@wordpress/sync": "0.4.9", + "@wordpress/token-list": "2.42.9", + "@wordpress/undo-manager": "0.2.9", + "@wordpress/url": "3.43.9", + "@wordpress/viewport": "5.19.9", + "@wordpress/warning": "2.42.9", + "@wordpress/widgets": "3.19.9", + "@wordpress/wordcount": "3.42.9", "backbone": "1.5.0", "clipboard": "2.0.11", "core-js-url-browser": "3.6.4", diff --git a/src/wp-includes/assets/script-loader-packages.min.php b/src/wp-includes/assets/script-loader-packages.min.php index 665deeb8cfc7a..89751e95e3940 100644 --- a/src/wp-includes/assets/script-loader-packages.min.php +++ b/src/wp-includes/assets/script-loader-packages.min.php @@ -1 +1 @@ - array('dependencies' => array('wp-dom-ready', 'wp-i18n', 'wp-polyfill'), 'version' => '7032343a947cfccf5608'), 'annotations.min.js' => array('dependencies' => array('wp-data', 'wp-hooks', 'wp-i18n', 'wp-polyfill', 'wp-rich-text'), 'version' => 'c4843f8e435a9d7a87bb'), 'api-fetch.min.js' => array('dependencies' => array('wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '0fa4dabf8bf2c7adf21a'), 'autop.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'dacd785d109317df2707'), 'blob.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '10a1c5c0acdef3d15657'), 'block-directory.min.js' => array('dependencies' => array('wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '5b7cd5ab23c9d68e0b1e'), 'block-editor.min.js' => array('dependencies' => array('react', 'react-dom', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-blocks', 'wp-commands', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-shortcode', 'wp-style-engine', 'wp-token-list', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => 'c95047b5d1ef296bd0b2'), 'block-library.min.js' => array('dependencies' => array('wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-viewport', 'wp-wordcount'), 'version' => '4a4e1bddf0705bf8837e'), 'block-serialization-default-parser.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '30ffd7e7e199f10b2a6d'), 'blocks.min.js' => array('dependencies' => array('wp-autop', 'wp-blob', 'wp-block-serialization-default-parser', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-private-apis', 'wp-shortcode'), 'version' => '7204d43123223474471a'), 'commands.min.js' => array('dependencies' => array('react', 'react-dom', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-polyfill', 'wp-primitives', 'wp-private-apis'), 'version' => '07ff2b66990783ecd068'), 'components.min.js' => array('dependencies' => array('react', 'react-dom', 'wp-a11y', 'wp-compose', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-warning'), 'version' => 'f6e63a4760dcece8b909'), 'compose.min.js' => array('dependencies' => array('react', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-priority-queue'), 'version' => '3189b344ff39fef940b7'), 'core-commands.min.js' => array('dependencies' => array('wp-commands', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-router', 'wp-url'), 'version' => 'ade490de79d35734e06d'), 'core-data.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-private-apis', 'wp-url'), 'version' => 'ac1f0efce014968a3716'), 'customize-widgets.min.js' => array('dependencies' => array('wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-widgets'), 'version' => 'bb454c7f10757887ce5a'), 'data.min.js' => array('dependencies' => array('wp-compose', 'wp-deprecated', 'wp-element', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-priority-queue', 'wp-private-apis', 'wp-redux-routine'), 'version' => 'ac94d42fa1999bcf3722'), 'data-controls.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-data', 'wp-deprecated', 'wp-polyfill'), 'version' => 'fe4ccc8a1782ea8e2cb1'), 'date.min.js' => array('dependencies' => array('moment', 'wp-deprecated', 'wp-polyfill'), 'version' => '936c461ad5dce9c2c8ea'), 'deprecated.min.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => '73ad3591e7bc95f4777a'), 'dom.min.js' => array('dependencies' => array('wp-deprecated', 'wp-polyfill'), 'version' => '49ff2869626fbeaacc23'), 'dom-ready.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '392bdd43726760d1f3ca'), 'edit-post.min.js' => array('dependencies' => array('wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-commands', 'wp-components', 'wp-compose', 'wp-core-commands', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-url', 'wp-viewport', 'wp-warning', 'wp-widgets'), 'version' => '6720d8a86f225f3ce492'), 'edit-site.min.js' => array('dependencies' => array('react', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-commands', 'wp-components', 'wp-compose', 'wp-core-commands', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-editor', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-patterns', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-reusable-blocks', 'wp-router', 'wp-url', 'wp-viewport', 'wp-widgets', 'wp-wordcount'), 'version' => '3d8a50adc6d174b01247'), 'edit-widgets.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-patterns', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-url', 'wp-viewport', 'wp-widgets'), 'version' => '64e3e5b8558ec09ac4ba'), 'editor.min.js' => array('dependencies' => array('react', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-patterns', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-wordcount'), 'version' => '3f5791ae786456067a27'), 'element.min.js' => array('dependencies' => array('react', 'react-dom', 'wp-escape-html', 'wp-polyfill'), 'version' => 'ed1c7604880e8b574b40'), 'escape-html.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '03e27a7b6ae14f7afaa6'), 'format-library.min.js' => array('dependencies' => array('wp-a11y', 'wp-block-editor', 'wp-components', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-url'), 'version' => '57955a6a6df65c1fb8b6'), 'hooks.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'c6aec9a8d4e5a5d543a1'), 'html-entities.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '36a4a255da7dd2e1bf8e'), 'i18n.min.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => '7701b0c3857f914212ef'), 'is-shallow-equal.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '20c2b06ecf04afb14fee'), 'keyboard-shortcuts.min.js' => array('dependencies' => array('wp-data', 'wp-element', 'wp-keycodes', 'wp-polyfill'), 'version' => '525da859946d4df24898'), 'keycodes.min.js' => array('dependencies' => array('wp-i18n', 'wp-polyfill'), 'version' => '3460bd0fac9859d6886c'), 'list-reusable-blocks.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '4d77f2834116824e70c8'), 'media-utils.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-blob', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => 'bcd60e7a2fb568f38015'), 'notices.min.js' => array('dependencies' => array('wp-data', 'wp-polyfill'), 'version' => '38e88f4b627cf873edd0'), 'nux.min.js' => array('dependencies' => array('wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => '59718fab5e39f9dd21b0'), 'patterns.min.js' => array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-url'), 'version' => 'e1f251d36e08fc03cc75'), 'plugins.min.js' => array('dependencies' => array('wp-compose', 'wp-element', 'wp-hooks', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-primitives'), 'version' => 'c485ff6186cdddabcf91'), 'preferences.min.js' => array('dependencies' => array('wp-a11y', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => 'ca088ba0a612bff77aa3'), 'preferences-persistence.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-polyfill'), 'version' => '6c6b220422eb35541489'), 'primitives.min.js' => array('dependencies' => array('wp-element', 'wp-polyfill'), 'version' => '6984e6eb5d6157c4fe44'), 'priority-queue.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '422e19e9d48b269c5219'), 'private-apis.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '11cb2ebaa70a9f1f0ab5'), 'redux-routine.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '0be1b2a6a79703e28531'), 'reusable-blocks.min.js' => array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-url'), 'version' => '5ac513f0f58c78e7f084'), 'rich-text.min.js' => array('dependencies' => array('wp-a11y', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-escape-html', 'wp-i18n', 'wp-keycodes', 'wp-polyfill'), 'version' => '6222504ebedf0627981b'), 'router.min.js' => array('dependencies' => array('wp-element', 'wp-polyfill', 'wp-private-apis', 'wp-url'), 'version' => 'd1ae6718bab1f7073adb'), 'server-side-render.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '81299db67c0fa2c65479'), 'shortcode.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'c128a3008a96e820aa86'), 'style-engine.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '17cbc030cba88a42ccb5'), 'token-list.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '199103fc7cec3b9eef5a'), 'undo-manager.min.js' => array('dependencies' => array('wp-is-shallow-equal', 'wp-polyfill'), 'version' => '312610424b40059d9f44'), 'url.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'b4979979018b684be209'), 'viewport.min.js' => array('dependencies' => array('wp-compose', 'wp-data', 'wp-element', 'wp-polyfill'), 'version' => '1fbef8175bb335c5603b'), 'warning.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '122829a085511691f14d'), 'widgets.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-polyfill', 'wp-primitives'), 'version' => '938735ae45e739ac8b70'), 'wordcount.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '5a74890fd7c610679e34')); + array('dependencies' => array('wp-dom-ready', 'wp-i18n', 'wp-polyfill'), 'version' => '7032343a947cfccf5608'), 'annotations.min.js' => array('dependencies' => array('wp-data', 'wp-hooks', 'wp-i18n', 'wp-polyfill', 'wp-rich-text'), 'version' => 'c4843f8e435a9d7a87bb'), 'api-fetch.min.js' => array('dependencies' => array('wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '0fa4dabf8bf2c7adf21a'), 'autop.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'dacd785d109317df2707'), 'blob.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '10a1c5c0acdef3d15657'), 'block-directory.min.js' => array('dependencies' => array('wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '5b7cd5ab23c9d68e0b1e'), 'block-editor.min.js' => array('dependencies' => array('react', 'react-dom', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-blocks', 'wp-commands', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-shortcode', 'wp-style-engine', 'wp-token-list', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => 'c95047b5d1ef296bd0b2'), 'block-library.min.js' => array('dependencies' => array('wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-viewport', 'wp-wordcount'), 'version' => 'b36fbbb3d2e61806659a'), 'block-serialization-default-parser.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '30ffd7e7e199f10b2a6d'), 'blocks.min.js' => array('dependencies' => array('wp-autop', 'wp-blob', 'wp-block-serialization-default-parser', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-private-apis', 'wp-shortcode'), 'version' => '7204d43123223474471a'), 'commands.min.js' => array('dependencies' => array('react', 'react-dom', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-polyfill', 'wp-primitives', 'wp-private-apis'), 'version' => '07ff2b66990783ecd068'), 'components.min.js' => array('dependencies' => array('react', 'react-dom', 'wp-a11y', 'wp-compose', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-warning'), 'version' => 'f6e63a4760dcece8b909'), 'compose.min.js' => array('dependencies' => array('react', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-priority-queue'), 'version' => '3189b344ff39fef940b7'), 'core-commands.min.js' => array('dependencies' => array('wp-commands', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-router', 'wp-url'), 'version' => 'ade490de79d35734e06d'), 'core-data.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-private-apis', 'wp-url'), 'version' => 'ac1f0efce014968a3716'), 'customize-widgets.min.js' => array('dependencies' => array('wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-widgets'), 'version' => 'bb454c7f10757887ce5a'), 'data.min.js' => array('dependencies' => array('wp-compose', 'wp-deprecated', 'wp-element', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-priority-queue', 'wp-private-apis', 'wp-redux-routine'), 'version' => 'ac94d42fa1999bcf3722'), 'data-controls.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-data', 'wp-deprecated', 'wp-polyfill'), 'version' => 'fe4ccc8a1782ea8e2cb1'), 'date.min.js' => array('dependencies' => array('moment', 'wp-deprecated', 'wp-polyfill'), 'version' => '936c461ad5dce9c2c8ea'), 'deprecated.min.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => '73ad3591e7bc95f4777a'), 'dom.min.js' => array('dependencies' => array('wp-deprecated', 'wp-polyfill'), 'version' => '49ff2869626fbeaacc23'), 'dom-ready.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '392bdd43726760d1f3ca'), 'edit-post.min.js' => array('dependencies' => array('wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-commands', 'wp-components', 'wp-compose', 'wp-core-commands', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-url', 'wp-viewport', 'wp-warning', 'wp-widgets'), 'version' => '6720d8a86f225f3ce492'), 'edit-site.min.js' => array('dependencies' => array('react', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-commands', 'wp-components', 'wp-compose', 'wp-core-commands', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-editor', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-patterns', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-reusable-blocks', 'wp-router', 'wp-url', 'wp-viewport', 'wp-widgets', 'wp-wordcount'), 'version' => '3d8a50adc6d174b01247'), 'edit-widgets.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-patterns', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-url', 'wp-viewport', 'wp-widgets'), 'version' => '64e3e5b8558ec09ac4ba'), 'editor.min.js' => array('dependencies' => array('react', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-patterns', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-wordcount'), 'version' => '3f5791ae786456067a27'), 'element.min.js' => array('dependencies' => array('react', 'react-dom', 'wp-escape-html', 'wp-polyfill'), 'version' => 'ed1c7604880e8b574b40'), 'escape-html.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '03e27a7b6ae14f7afaa6'), 'format-library.min.js' => array('dependencies' => array('wp-a11y', 'wp-block-editor', 'wp-components', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-url'), 'version' => '57955a6a6df65c1fb8b6'), 'hooks.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'c6aec9a8d4e5a5d543a1'), 'html-entities.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '36a4a255da7dd2e1bf8e'), 'i18n.min.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => '7701b0c3857f914212ef'), 'is-shallow-equal.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '20c2b06ecf04afb14fee'), 'keyboard-shortcuts.min.js' => array('dependencies' => array('wp-data', 'wp-element', 'wp-keycodes', 'wp-polyfill'), 'version' => '525da859946d4df24898'), 'keycodes.min.js' => array('dependencies' => array('wp-i18n', 'wp-polyfill'), 'version' => '3460bd0fac9859d6886c'), 'list-reusable-blocks.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '4d77f2834116824e70c8'), 'media-utils.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-blob', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => 'bcd60e7a2fb568f38015'), 'notices.min.js' => array('dependencies' => array('wp-data', 'wp-polyfill'), 'version' => '38e88f4b627cf873edd0'), 'nux.min.js' => array('dependencies' => array('wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => '59718fab5e39f9dd21b0'), 'patterns.min.js' => array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-url'), 'version' => 'e1f251d36e08fc03cc75'), 'plugins.min.js' => array('dependencies' => array('wp-compose', 'wp-element', 'wp-hooks', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-primitives'), 'version' => 'c485ff6186cdddabcf91'), 'preferences.min.js' => array('dependencies' => array('wp-a11y', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => 'ca088ba0a612bff77aa3'), 'preferences-persistence.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-polyfill'), 'version' => '6c6b220422eb35541489'), 'primitives.min.js' => array('dependencies' => array('wp-element', 'wp-polyfill'), 'version' => '6984e6eb5d6157c4fe44'), 'priority-queue.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '422e19e9d48b269c5219'), 'private-apis.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '11cb2ebaa70a9f1f0ab5'), 'redux-routine.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '0be1b2a6a79703e28531'), 'reusable-blocks.min.js' => array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-url'), 'version' => '5ac513f0f58c78e7f084'), 'rich-text.min.js' => array('dependencies' => array('wp-a11y', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-escape-html', 'wp-i18n', 'wp-keycodes', 'wp-polyfill'), 'version' => '6222504ebedf0627981b'), 'router.min.js' => array('dependencies' => array('wp-element', 'wp-polyfill', 'wp-private-apis', 'wp-url'), 'version' => 'd1ae6718bab1f7073adb'), 'server-side-render.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '81299db67c0fa2c65479'), 'shortcode.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'c128a3008a96e820aa86'), 'style-engine.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '17cbc030cba88a42ccb5'), 'token-list.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '199103fc7cec3b9eef5a'), 'undo-manager.min.js' => array('dependencies' => array('wp-is-shallow-equal', 'wp-polyfill'), 'version' => '312610424b40059d9f44'), 'url.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'b4979979018b684be209'), 'viewport.min.js' => array('dependencies' => array('wp-compose', 'wp-data', 'wp-element', 'wp-polyfill'), 'version' => '1fbef8175bb335c5603b'), 'warning.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '122829a085511691f14d'), 'widgets.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-polyfill', 'wp-primitives'), 'version' => '938735ae45e739ac8b70'), 'wordcount.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '5a74890fd7c610679e34')); diff --git a/src/wp-includes/blocks/image.php b/src/wp-includes/blocks/image.php index dd2e72aebe5ef..c465677a986e0 100644 --- a/src/wp-includes/blocks/image.php +++ b/src/wp-includes/blocks/image.php @@ -235,6 +235,7 @@ function block_core_image_render_lightbox( $block_content, $block ) { $button = $img[0] . ''; @@ -322,12 +320,13 @@ function block_core_image_render_lightbox( $block_content, $block ) { data-wp-on--touchmove="actions.core.image.handleTouchMove" data-wp-on--touchend="actions.core.image.handleTouchEnd" data-wp-on--click="actions.core.image.hideLightbox" + tabindex="-1" > - +
HTML; diff --git a/src/wp-includes/blocks/image/view.asset.php b/src/wp-includes/blocks/image/view.asset.php index ed410f781f4bb..d04efc457b85a 100644 --- a/src/wp-includes/blocks/image/view.asset.php +++ b/src/wp-includes/blocks/image/view.asset.php @@ -1 +1 @@ - array(), 'version' => '8256ab8fdb922a14e3c2'); + array(), 'version' => 'dbfcc21fbb5399dd36c8'); diff --git a/src/wp-includes/blocks/image/view.min.asset.php b/src/wp-includes/blocks/image/view.min.asset.php index 150aa7d43c0ae..ce0fbc393d2ae 100644 --- a/src/wp-includes/blocks/image/view.min.asset.php +++ b/src/wp-includes/blocks/image/view.min.asset.php @@ -1 +1 @@ - array(), 'version' => 'f889b00627bef81443e0'); + array(), 'version' => '1617ea85b28841341ef7'); diff --git a/src/wp-includes/blocks/navigation.php b/src/wp-includes/blocks/navigation.php index c4854fbc4b26d..4d9fe4a08c6bf 100644 --- a/src/wp-includes/blocks/navigation.php +++ b/src/wp-includes/blocks/navigation.php @@ -90,6 +90,13 @@ function block_core_navigation_add_directives_to_submenu( $w, $block_attributes $w->set_attribute( 'data-wp-effect', 'effects.core.navigation.initMenu' ); $w->set_attribute( 'data-wp-on--focusout', 'actions.core.navigation.handleMenuFocusout' ); $w->set_attribute( 'data-wp-on--keydown', 'actions.core.navigation.handleMenuKeydown' ); + + // This is a fix for Safari. Without it, Safari doesn't change the active + // element when the user clicks on a button. It can be removed once we add + // an overlay to capture the clicks, instead of relying on the focusout + // event. + $w->set_attribute( 'tabindex', '-1' ); + if ( ! isset( $block_attributes['openSubmenusOnClick'] ) || false === $block_attributes['openSubmenusOnClick'] ) { $w->set_attribute( 'data-wp-on--mouseenter', 'actions.core.navigation.openMenuOnHover' ); $w->set_attribute( 'data-wp-on--mouseleave', 'actions.core.navigation.closeMenuOnHover' ); diff --git a/src/wp-includes/blocks/navigation/view.asset.php b/src/wp-includes/blocks/navigation/view.asset.php index 61200d5ae9b5a..de5557646adb5 100644 --- a/src/wp-includes/blocks/navigation/view.asset.php +++ b/src/wp-includes/blocks/navigation/view.asset.php @@ -1 +1 @@ - array(), 'version' => '825c00b0743ccffd2242'); + array(), 'version' => '47a0eac8b2e3278228c8'); diff --git a/src/wp-includes/blocks/navigation/view.min.asset.php b/src/wp-includes/blocks/navigation/view.min.asset.php index ea614a4225fc4..5675933da44ff 100644 --- a/src/wp-includes/blocks/navigation/view.min.asset.php +++ b/src/wp-includes/blocks/navigation/view.min.asset.php @@ -1 +1 @@ - array(), 'version' => 'a5ffa1bdbe6aee7a5c54'); + array(), 'version' => 'e3d6f3216904b5b42831'); From 51ae4e67d0425277cccd2872bfbe72ea05f7f21b Mon Sep 17 00:00:00 2001 From: Felix Arntz Date: Mon, 23 Oct 2023 21:27:31 +0000 Subject: [PATCH 51/71] Options, Meta APIs: Rename `prime_options()` to `wp_load_options()`. This clearly separates these functions which are intended to be used by external developers from the existing `_prime_*_caches()` functions which are primarily intended for internal usage. The term "load" is additionally more accessible than "prime". This changeset renames the above function, as well as the wrapper function `prime_options_by_group()` to `wp_load_options_by_group()`. Props peterwilsoncc, joemcgill, hellofromTonya, poran766, flixos90. Fixes #58962. git-svn-id: https://develop.svn.wordpress.org/trunk@56990 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/option.php | 22 ++++---- .../{primeOptions.php => wpLoadOptions.php} | 54 +++++++++---------- ...nsByGroup.php => wpLoadOptionsByGroup.php} | 30 +++++------ 3 files changed, 53 insertions(+), 53 deletions(-) rename tests/phpunit/tests/option/{primeOptions.php => wpLoadOptions.php} (66%) rename tests/phpunit/tests/option/{primeOptionsByGroup.php => wpLoadOptionsByGroup.php} (67%) diff --git a/src/wp-includes/option.php b/src/wp-includes/option.php index bff57ea32944e..4e3886630d3a0 100644 --- a/src/wp-includes/option.php +++ b/src/wp-includes/option.php @@ -248,17 +248,17 @@ function get_option( $option, $default_value = false ) { } /** - * Primes specific options into the cache with a single database query. + * Loads specific options into the cache with a single database query. * - * Only options that do not already exist in cache will be primed. + * Only options that do not already exist in cache will be loaded. * * @since 6.4.0 * * @global wpdb $wpdb WordPress database abstraction object. * - * @param array $options An array of option names to be primed. + * @param array $options An array of option names to be loaded. */ -function prime_options( $options ) { +function wp_load_options( $options ) { $alloptions = wp_load_alloptions(); $cached_options = wp_cache_get_multiple( $options, 'options' ); @@ -270,7 +270,7 @@ function prime_options( $options ) { } } - // Bail early if there are no options to be primed. + // Bail early if there are no options to be loaded. if ( empty( $options_to_prime ) ) { return; } @@ -321,26 +321,26 @@ function prime_options( $options ) { } /** - * Primes all options registered with a specific option group. + * Loads all options registered with a specific option group. * * @since 6.4.0 * * @global array $new_allowed_options * - * @param string $option_group The option group to prime options for. + * @param string $option_group The option group to load options for. */ -function prime_options_by_group( $option_group ) { +function wp_load_options_by_group( $option_group ) { global $new_allowed_options; if ( isset( $new_allowed_options[ $option_group ] ) ) { - prime_options( $new_allowed_options[ $option_group ] ); + wp_load_options( $new_allowed_options[ $option_group ] ); } } /** * Retrieves multiple options. * - * Options are primed as necessary first in order to use a single database query at most. + * Options are loaded as necessary first in order to use a single database query at most. * * @since 6.4.0 * @@ -348,7 +348,7 @@ function prime_options_by_group( $option_group ) { * @return array An array of key-value pairs for the requested options. */ function get_options( $options ) { - prime_options( $options ); + wp_load_options( $options ); $result = array(); foreach ( $options as $option ) { diff --git a/tests/phpunit/tests/option/primeOptions.php b/tests/phpunit/tests/option/wpLoadOptions.php similarity index 66% rename from tests/phpunit/tests/option/primeOptions.php rename to tests/phpunit/tests/option/wpLoadOptions.php index 6798d33f04d1d..bf6a8d58953fd 100644 --- a/tests/phpunit/tests/option/primeOptions.php +++ b/tests/phpunit/tests/option/wpLoadOptions.php @@ -1,21 +1,21 @@ assertFalse( wp_cache_get( $option, 'options' ), "$option was not deleted from the cache." ); } - // Call the prime_options function to prime the options. - prime_options( $options_to_prime ); + // Call the wp_load_options function to load the options. + wp_load_options( $options_to_load ); // Store the initial database query count. $initial_query_count = get_num_queries(); // Check that options are only in the 'options' cache group. - foreach ( $options_to_prime as $option ) { + foreach ( $options_to_load as $option ) { $this->assertSame( wp_cache_get( $option, 'options' ), get_option( $option ), - "$option was not primed to the 'options' cache group." + "$option was not loaded to the 'options' cache group." ); $this->assertFalse( wp_cache_get( $option, 'notoptions' ), get_option( $option ), - "$option was primed to the 'notoptions' cache group." + "$option was loaded to the 'notoptions' cache group." ); } @@ -62,13 +62,13 @@ public function test_prime_options() { } /** - * Tests prime_options() with options that do not exist in the database. + * Tests wp_load_options() with options that do not exist in the database. * * @ticket 58962 */ - public function test_prime_options_with_nonexistent_options() { - // Create some options to prime. - $options_to_prime = array( + public function test_wp_load_options_with_nonexistent_options() { + // Create some options to load. + $options_to_load = array( 'option1', 'option2', ); @@ -78,50 +78,50 @@ public function test_prime_options_with_nonexistent_options() { * clear the cache for the options, * check options are not in cache initially. */ - foreach ( $options_to_prime as $option ) { + foreach ( $options_to_load as $option ) { $this->assertFalse( wp_cache_get( $option, 'options' ), "$option was not deleted from the cache." ); } - // Call the prime_options function to prime the options. - prime_options( $options_to_prime ); + // Call the wp_load_options function to load the options. + wp_load_options( $options_to_load ); // Check that options are not in the cache or database. - foreach ( $options_to_prime as $option ) { + foreach ( $options_to_load as $option ) { $this->assertFalse( wp_cache_get( $option, 'options' ), "$option was not deleted from the cache." ); } // Check that options are present in the notoptions cache. $new_notoptions = wp_cache_get( 'notoptions', 'options' ); $this->assertIsArray( $new_notoptions, 'The notoptions cache should be an array.' ); - foreach ( $options_to_prime as $option ) { + foreach ( $options_to_load as $option ) { $this->assertArrayHasKey( $option, $new_notoptions, "$option was not added to the notoptions cache." ); } } /** - * Tests prime_options() with an empty array. + * Tests wp_load_options() with an empty array. * * @ticket 58962 */ - public function test_prime_options_with_empty_array() { + public function test_wp_load_options_with_empty_array() { $alloptions = wp_load_alloptions(); $notoptions = wp_cache_get( 'notoptions', 'options' ); - prime_options( array() ); + wp_load_options( array() ); $this->assertSame( $alloptions, wp_cache_get( 'alloptions', 'options' ), 'The alloptions cache was modified.' ); $this->assertSame( $notoptions, wp_cache_get( 'notoptions', 'options' ), 'The notoptions cache was modified.' ); } /** - * Tests that prime_options handles an empty "notoptions" cache. + * Tests that wp_load_options handles an empty "notoptions" cache. * * @ticket 58962 */ - public function test_prime_options_handles_empty_notoptions_cache() { + public function test_wp_load_options_handles_empty_notoptions_cache() { wp_cache_delete( 'notoptions', 'options' ); - prime_options( array( 'nonexistent_option' ) ); + wp_load_options( array( 'nonexistent_option' ) ); $notoptions = wp_cache_get( 'notoptions', 'options' ); $this->assertIsArray( $notoptions, 'The notoptions cache should be an array.' ); diff --git a/tests/phpunit/tests/option/primeOptionsByGroup.php b/tests/phpunit/tests/option/wpLoadOptionsByGroup.php similarity index 67% rename from tests/phpunit/tests/option/primeOptionsByGroup.php rename to tests/phpunit/tests/option/wpLoadOptionsByGroup.php index 9d6819664c1bc..482e20cc3b87c 100644 --- a/tests/phpunit/tests/option/primeOptionsByGroup.php +++ b/tests/phpunit/tests/option/wpLoadOptionsByGroup.php @@ -1,22 +1,22 @@ array( 'option1', @@ -27,7 +27,7 @@ public function test_prime_options_by_group() { ), ); - $options_to_prime = array( + $options_to_load = array( 'option1', 'option2', 'option3', @@ -38,35 +38,35 @@ public function test_prime_options_by_group() { * clear the cache for the options, * check options are not in cache initially. */ - foreach ( $options_to_prime as $option ) { + foreach ( $options_to_load as $option ) { update_option( $option, "value_$option", false ); wp_cache_delete( $option, 'options' ); $this->assertFalse( wp_cache_get( $option, 'options' ), "$option was not deleted from the cache." ); } - // Call the prime_options_by_group function to prime the options. - prime_options_by_group( 'group1' ); + // Call the wp_load_options_by_group function to load the options. + wp_load_options_by_group( 'group1' ); // Check that options are now in the cache. - $this->assertSame( get_option( 'option1' ), wp_cache_get( 'option1', 'options' ), 'option1 was not primed.' ); - $this->assertSame( get_option( 'option2' ), wp_cache_get( 'option2', 'options' ), 'option2 was not primed.' ); + $this->assertSame( get_option( 'option1' ), wp_cache_get( 'option1', 'options' ), 'option1 was not loaded.' ); + $this->assertSame( get_option( 'option2' ), wp_cache_get( 'option2', 'options' ), 'option2 was not loaded.' ); // Make sure option3 is still not in cache. $this->assertFalse( wp_cache_get( 'option3', 'options' ), 'option3 was not deleted from the cache.' ); } /** - * Tests prime_options_by_group() with a nonexistent option group. + * Tests wp_load_options_by_group() with a nonexistent option group. * * @ticket 58962 */ - public function test_prime_options_by_group_with_nonexistent_group() { + public function test_wp_load_options_by_group_with_nonexistent_group() { // Make sure options are not in cache or database initially. $this->assertFalse( wp_cache_get( 'option1', 'options' ), 'option1 was not deleted from the cache.' ); $this->assertFalse( wp_cache_get( 'option2', 'options' ), 'option2 was not deleted from the cache.' ); - // Call the prime_options_by_group function with a nonexistent group. - prime_options_by_group( 'nonexistent_group' ); + // Call the wp_load_options_by_group function with a nonexistent group. + wp_load_options_by_group( 'nonexistent_group' ); // Check that options are still not in the cache or database. $this->assertFalse( wp_cache_get( 'option1', 'options' ), 'option1 was not deleted from the cache.' ); From ee631556b43aca2d55a32d58189da55faa219547 Mon Sep 17 00:00:00 2001 From: Tonya Mork Date: Mon, 23 Oct 2023 23:37:55 +0000 Subject: [PATCH 52/71] Editor: Fix render_duotone_support() to be compatible with enhanced pagination. Some blocks do not have content. For duotone support, blocks without content still need to run through the `render_duotone_support()` to render their duotone CSS. This fix makes the duotone compatible with the enhanced pagination (introduced in 6.4.0) by making sure that the CSS is always on the page, even when the posts have no featured image. It also prevents the duotone from interfering with other blocks using `wp_unique_id()`. References: * [https://github.com/WordPress/gutenberg/pull/55415 Gutenberg PR 55415] Follow-up to [56226]. Props cbravobernal, luisherranz, hellofromTonya, isabel_brison, jorbin. Fixes #59694. git-svn-id: https://develop.svn.wordpress.org/trunk@56991 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class-wp-duotone.php | 2 +- .../phpunit/tests/block-supports/duotone.php | 27 +++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/src/wp-includes/class-wp-duotone.php b/src/wp-includes/class-wp-duotone.php index 1bb8bea5cd3d2..813258c10dde5 100644 --- a/src/wp-includes/class-wp-duotone.php +++ b/src/wp-includes/class-wp-duotone.php @@ -1074,7 +1074,7 @@ private static function get_all_global_style_block_names() { * @return string Filtered block content. */ public static function render_duotone_support( $block_content, $block, $wp_block ) { - if ( empty( $block_content ) || ! $block['blockName'] ) { + if ( ! $block['blockName'] ) { return $block_content; } $duotone_selector = self::get_selector( $wp_block->block_type ); diff --git a/tests/phpunit/tests/block-supports/duotone.php b/tests/phpunit/tests/block-supports/duotone.php index 9ec3c709580b3..eac3d2acac3a3 100644 --- a/tests/phpunit/tests/block-supports/duotone.php +++ b/tests/phpunit/tests/block-supports/duotone.php @@ -102,6 +102,33 @@ public function data_get_slug_from_attribute() { ); } + /** + * Tests whether the CSS declarations are generated even if the block content is + * empty. This is needed to make the CSS output stable across paginations for + * features like the enhanced pagination of the Query block. + * + * @ticket 59694 + * + * @covers ::render_duotone_support + */ + public function test_css_declarations_are_generated_even_with_empty_block_content() { + $block = array( + 'blockName' => 'core/image', + 'attrs' => array( 'style' => array( 'color' => array( 'duotone' => 'var:preset|duotone|blue-orange' ) ) ), + ); + $wp_block = new WP_Block( $block ); + $block_css_declarations_property = new ReflectionProperty( 'WP_Duotone', 'block_css_declarations' ); + $block_css_declarations_property->setAccessible( true ); + $block_css_declarations_property->setValue( $wp_block, array() ); + + WP_Duotone::render_duotone_support( '', $block, $wp_block ); + $actual = $block_css_declarations_property->getValue(); + // Reset the property's visibility. + $block_css_declarations_property->setAccessible( false ); + + $this->assertNotEmpty( $actual ); + } + /** * @dataProvider data_is_preset */ From b5392cc28c6f065227e9345cdb9ac266a0f9ee30 Mon Sep 17 00:00:00 2001 From: Peter Wilson Date: Tue, 24 Oct 2023 01:38:16 +0000 Subject: [PATCH 53/71] Build/Test tools: Introduce partial unit tests for `WP_Upgrader`. Props jipmoors, karlijnbk, chaion07, cu121, martin.krcho, costdev, mukesh27, hellofromTonya, SergeyBiryukov, audrasjb, jrf. Fixes #54245. git-svn-id: https://develop.svn.wordpress.org/trunk@56992 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/admin/wpUpgrader.php | 1616 ++++++++++++++++++++++ 1 file changed, 1616 insertions(+) create mode 100644 tests/phpunit/tests/admin/wpUpgrader.php diff --git a/tests/phpunit/tests/admin/wpUpgrader.php b/tests/phpunit/tests/admin/wpUpgrader.php new file mode 100644 index 0000000000000..9de3ed07cd766 --- /dev/null +++ b/tests/phpunit/tests/admin/wpUpgrader.php @@ -0,0 +1,1616 @@ +getMockBuilder( 'WP_Upgrader_Skin' )->getMock(); + + self::$instance = new WP_Upgrader( self::$upgrader_skin_mock ); + + self::$wp_filesystem_mock = $this->getMockBuilder( 'WP_Filesystem_Base' )->getMock(); + + if ( array_key_exists( 'wp_filesystem', $GLOBALS ) ) { + self::$wp_filesystem_backup = $GLOBALS['wp_filesystem']; + } + + $GLOBALS['wp_filesystem'] = self::$wp_filesystem_mock; + } + + /** + * Cleans up after each test. + */ + public function tear_down() { + if ( null !== self::$wp_filesystem_backup ) { + $GLOBALS['wp_filesystem'] = self::$wp_filesystem_backup; + } else { + unset( $GLOBALS['wp_filesystem'] ); + } + + parent::tear_down(); + } + + /** + * Tests that `WP_Upgrader::__construct()` creates a skin when one is not + * passed to the constructor. + * + * @ticket 54245 + * + * @covers WP_Upgrader::__construct + */ + public function test_constructor_should_create_skin_when_one_is_not_provided() { + $instance = new WP_Upgrader(); + + $this->assertInstanceOf( WP_Upgrader_Skin::class, $instance->skin ); + } + + /** + * Tests that `WP_Upgrader::init()` calls `WP_Upgrader::set_upgrader()`. + * + * @ticket 54245 + * + * @covers WP_Upgrader::init + */ + public function test_init_should_call_set_upgrader() { + self::$upgrader_skin_mock->expects( $this->once() )->method( 'set_upgrader' )->with( self::$instance ); + self::$instance->init(); + } + + /** + * Tests that `WP_Upgrader::init()` initializes the `$strings` property. + * + * @ticket 54245 + * + * @covers WP_Upgrader::init + * @covers WP_Upgrader::generic_strings + * + * @dataProvider data_init_should_initialize_strings + * + * @param string $key The key to check. + */ + public function test_init_should_initialize_strings( $key ) { + $this->assertEmpty( self::$instance->strings, '"$strings" has already been initialized' ); + + self::$instance->init(); + + $this->assertArrayHasKey( $key, self::$instance->strings, "The '$key' key was not created" ); + } + + /** + * Data provider. + * + * @return array[] + */ + public function data_init_should_initialize_strings() { + return self::text_array_to_dataprovider( + array( + 'bad_request', + 'fs_unavailable', + 'fs_error', + 'fs_no_root_dir', + 'fs_no_content_dir', + 'fs_no_plugins_dir', + 'fs_no_themes_dir', + 'fs_no_folder', + 'download_failed', + 'installing_package', + 'no_files', + 'folder_exists', + 'mkdir_failed', + 'incompatible_archive', + 'files_not_writable', + 'maintenance_start', + 'maintenance_end', + 'temp_backup_mkdir_failed', + 'temp_backup_move_failed', + 'temp_backup_restore_failed', + 'temp_backup_delete_failed', + ) + ); + } + + /** + * Tests that `WP_Upgrader::flatten_dirlist()` returns the expected file list. + * + * @ticket 54245 + * + * @dataProvider data_should_flatten_dirlist + * + * @covers WP_Upgrader::flatten_dirlist + * + * @param array $expected The expected flattened dirlist. + * @param array $nested_files Array of files as returned by WP_Filesystem_Base::dirlist(). + * @param string $path Optional. Relative path to prepend to child nodes. Default empty string. + */ + public function test_flatten_dirlist_should_flatten_the_provided_directory_list( $expected, $nested_files, $path = '' ) { + $flatten_dirlist = new ReflectionMethod( self::$instance, 'flatten_dirlist' ); + $flatten_dirlist->setAccessible( true ); + $actual = $flatten_dirlist->invoke( self::$instance, $nested_files, $path ); + $flatten_dirlist->setAccessible( false ); + + $this->assertSameSetsWithIndex( $expected, $actual ); + } + + /** + * Data provider. + * + * @return array[] + */ + public function data_should_flatten_dirlist() { + return array( + 'empty array, default path' => array( + 'expected' => array(), + 'nested_files' => array(), + ), + 'root only' => array( + 'expected' => array( + 'file1.php' => array( 'name' => 'file1.php' ), + 'file2.php' => array( 'name' => 'file2.php' ), + ), + 'nested_files' => array( + 'file1.php' => array( 'name' => 'file1.php' ), + 'file2.php' => array( 'name' => 'file2.php' ), + ), + ), + 'root only and custom path' => array( + 'expected' => array( + 'custom_path/file1.php' => array( 'name' => 'file1.php' ), + 'custom_path/file2.php' => array( 'name' => 'file2.php' ), + ), + 'nested_files' => array( + 'file1.php' => array( 'name' => 'file1.php' ), + 'file2.php' => array( 'name' => 'file2.php' ), + ), + 'path' => 'custom_path/', + ), + 'one level deep' => array( + 'expected' => array( + 'subdir1' => array( + 'files' => array( + 'subfile1.php' => array( 'name' => 'subfile1.php' ), + 'subfile2.php' => array( 'name' => 'subfile2.php' ), + ), + ), + 'subdir2' => array( + 'files' => array( + 'subfile3.php' => array( 'name' => 'subfile3.php' ), + 'subfile4.php' => array( 'name' => 'subfile4.php' ), + ), + ), + 'subdir1/subfile1.php' => array( 'name' => 'subfile1.php' ), + 'subdir1/subfile2.php' => array( 'name' => 'subfile2.php' ), + 'subdir2/subfile3.php' => array( 'name' => 'subfile3.php' ), + 'subdir2/subfile4.php' => array( 'name' => 'subfile4.php' ), + ), + 'nested_files' => array( + 'subdir1' => array( + 'files' => array( + 'subfile1.php' => array( 'name' => 'subfile1.php' ), + 'subfile2.php' => array( 'name' => 'subfile2.php' ), + ), + ), + 'subdir2' => array( + 'files' => array( + 'subfile3.php' => array( 'name' => 'subfile3.php' ), + 'subfile4.php' => array( 'name' => 'subfile4.php' ), + ), + ), + ), + ), + 'one level deep and numeric keys' => array( + 'expected' => array( + 'subdir1' => array( + 'files' => array( + 0 => array( 'name' => '0' ), + 1 => array( 'name' => '1' ), + ), + ), + 'subdir2' => array( + 'files' => array( + 2 => array( 'name' => '2' ), + 3 => array( 'name' => '3' ), + ), + ), + 'subdir1/0' => array( 'name' => '0' ), + 'subdir1/1' => array( 'name' => '1' ), + 'subdir2/2' => array( 'name' => '2' ), + 'subdir2/3' => array( 'name' => '3' ), + ), + 'nested_files' => array( + 'subdir1' => array( + 'files' => array( + '0' => array( 'name' => '0' ), + '1' => array( 'name' => '1' ), + ), + ), + 'subdir2' => array( + 'files' => array( + '2' => array( 'name' => '2' ), + '3' => array( 'name' => '3' ), + ), + ), + ), + ), + 'one level deep and custom path' => array( + 'expected' => array( + 'custom_path/subdir1' => array( + 'files' => array( + 'subfile1.php' => array( 'name' => 'subfile1.php' ), + 'subfile2.php' => array( 'name' => 'subfile2.php' ), + ), + ), + 'custom_path/subdir2' => array( + 'files' => array( + 'subfile3.php' => array( 'name' => 'subfile3.php' ), + 'subfile4.php' => array( 'name' => 'subfile4.php' ), + ), + ), + 'custom_path/subdir1/subfile1.php' => array( + 'name' => 'subfile1.php', + ), + 'custom_path/subdir1/subfile2.php' => array( + 'name' => 'subfile2.php', + ), + 'custom_path/subdir2/subfile3.php' => array( + 'name' => 'subfile3.php', + ), + 'custom_path/subdir2/subfile4.php' => array( + 'name' => 'subfile4.php', + ), + ), + 'nested_files' => array( + 'subdir1' => array( + 'files' => array( + 'subfile1.php' => array( 'name' => 'subfile1.php' ), + 'subfile2.php' => array( 'name' => 'subfile2.php' ), + ), + ), + 'subdir2' => array( + 'files' => array( + 'subfile3.php' => array( 'name' => 'subfile3.php' ), + 'subfile4.php' => array( 'name' => 'subfile4.php' ), + ), + ), + ), + 'path' => 'custom_path/', + ), + 'two levels deep' => array( + 'expected' => array( + 'subdir1' => array( + 'files' => array( + 'subfile1.php' => array( + 'name' => 'subfile1.php', + ), + 'subfile2.php' => array( + 'name' => 'subfile2.php', + ), + 'subsubdir1' => array( + 'files' => array( + 'subsubfile1.php' => array( + 'name' => 'subsubfile1.php', + ), + 'subsubfile2.php' => array( + 'name' => 'subsubfile2.php', + ), + ), + ), + ), + ), + 'subdir1/subfile1.php' => array( + 'name' => 'subfile1.php', + ), + 'subdir1/subfile2.php' => array( + 'name' => 'subfile2.php', + ), + 'subdir1/subsubdir1' => array( + 'files' => array( + 'subsubfile1.php' => array( + 'name' => 'subsubfile1.php', + ), + 'subsubfile2.php' => array( + 'name' => 'subsubfile2.php', + ), + ), + ), + 'subdir1/subsubdir1/subsubfile1.php' => array( + 'name' => 'subsubfile1.php', + ), + 'subdir1/subsubdir1/subsubfile2.php' => array( + 'name' => 'subsubfile2.php', + ), + 'subdir2' => array( + 'files' => array( + 'subfile3.php' => array( 'name' => 'subfile3.php' ), + 'subfile4.php' => array( 'name' => 'subfile4.php' ), + 'subsubdir2' => array( + 'files' => array( + 'subsubfile3.php' => array( + 'name' => 'subsubfile3.php', + ), + 'subsubfile4.php' => array( + 'name' => 'subsubfile4.php', + ), + ), + ), + ), + ), + 'subdir2/subfile3.php' => array( + 'name' => 'subfile3.php', + ), + 'subdir2/subfile4.php' => array( + 'name' => 'subfile4.php', + ), + 'subdir2/subsubdir2' => array( + 'files' => array( + 'subsubfile3.php' => array( + 'name' => 'subsubfile3.php', + ), + 'subsubfile4.php' => array( + 'name' => 'subsubfile4.php', + ), + ), + ), + 'subdir2/subsubdir2/subsubfile3.php' => array( + 'name' => 'subsubfile3.php', + ), + 'subdir2/subsubdir2/subsubfile4.php' => array( + 'name' => 'subsubfile4.php', + ), + ), + 'nested_files' => array( + 'subdir1' => array( + 'files' => array( + 'subfile1.php' => array( 'name' => 'subfile1.php' ), + 'subfile2.php' => array( 'name' => 'subfile2.php' ), + 'subsubdir1' => array( + 'files' => array( + 'subsubfile1.php' => array( + 'name' => 'subsubfile1.php', + ), + 'subsubfile2.php' => array( + 'name' => 'subsubfile2.php', + ), + ), + ), + ), + ), + 'subdir2' => array( + 'files' => array( + 'subfile3.php' => array( 'name' => 'subfile3.php' ), + 'subfile4.php' => array( 'name' => 'subfile4.php' ), + 'subsubdir2' => array( + 'files' => array( + 'subsubfile3.php' => array( + 'name' => 'subsubfile3.php', + ), + 'subsubfile4.php' => array( + 'name' => 'subsubfile4.php', + ), + ), + ), + ), + ), + ), + ), + 'two levels deep and custom path' => array( + 'expected' => array( + 'custom_path/subdir1' => array( + 'files' => array( + 'subfile1.php' => array( + 'name' => 'subfile1.php', + ), + 'subfile2.php' => array( + 'name' => 'subfile2.php', + ), + 'subsubdir1' => array( + 'files' => array( + 'subsubfile1.php' => array( + 'name' => 'subsubfile1.php', + ), + 'subsubfile2.php' => array( + 'name' => 'subsubfile2.php', + ), + ), + ), + ), + ), + 'custom_path/subdir1/subfile1.php' => array( + 'name' => 'subfile1.php', + ), + 'custom_path/subdir1/subfile2.php' => array( + 'name' => 'subfile2.php', + ), + 'custom_path/subdir1/subsubdir1' => array( + 'files' => array( + 'subsubfile1.php' => array( + 'name' => 'subsubfile1.php', + ), + 'subsubfile2.php' => array( + 'name' => 'subsubfile2.php', + ), + ), + ), + 'custom_path/subdir1/subsubdir1/subsubfile1.php' => array( + 'name' => 'subsubfile1.php', + ), + 'custom_path/subdir1/subsubdir1/subsubfile2.php' => array( + 'name' => 'subsubfile2.php', + ), + 'custom_path/subdir2' => array( + 'files' => array( + 'subfile3.php' => array( 'name' => 'subfile3.php' ), + 'subfile4.php' => array( 'name' => 'subfile4.php' ), + 'subsubdir2' => array( + 'files' => array( + 'subsubfile3.php' => array( + 'name' => 'subsubfile3.php', + ), + 'subsubfile4.php' => array( + 'name' => 'subsubfile4.php', + ), + ), + ), + ), + ), + 'custom_path/subdir2/subfile3.php' => array( + 'name' => 'subfile3.php', + ), + 'custom_path/subdir2/subfile4.php' => array( + 'name' => 'subfile4.php', + ), + 'custom_path/subdir2/subsubdir2' => array( + 'files' => array( + 'subsubfile3.php' => array( + 'name' => 'subsubfile3.php', + ), + 'subsubfile4.php' => array( + 'name' => 'subsubfile4.php', + ), + ), + ), + 'custom_path/subdir2/subsubdir2/subsubfile3.php' => array( + 'name' => 'subsubfile3.php', + ), + 'custom_path/subdir2/subsubdir2/subsubfile4.php' => array( + 'name' => 'subsubfile4.php', + ), + ), + 'nested_files' => array( + 'subdir1' => array( + 'files' => array( + 'subfile1.php' => array( 'name' => 'subfile1.php' ), + 'subfile2.php' => array( 'name' => 'subfile2.php' ), + 'subsubdir1' => array( + 'files' => array( + 'subsubfile1.php' => array( + 'name' => 'subsubfile1.php', + ), + 'subsubfile2.php' => array( + 'name' => 'subsubfile2.php', + ), + ), + ), + ), + ), + 'subdir2' => array( + 'files' => array( + 'subfile3.php' => array( 'name' => 'subfile3.php' ), + 'subfile4.php' => array( 'name' => 'subfile4.php' ), + 'subsubdir2' => array( + 'files' => array( + 'subsubfile3.php' => array( + 'name' => 'subsubfile3.php', + ), + 'subsubfile4.php' => array( + 'name' => 'subsubfile4.php', + ), + ), + ), + ), + ), + ), + 'path' => 'custom_path/', + ), + ); + } + + /** + * Tests that `WP_Upgrader::clear_destination()` returns early with `true` + * when the destination does not exist. + * + * @ticket 54245 + * + * @covers WP_Upgrader::clear_destination + */ + public function test_clear_destination_should_return_early_when_the_destination_does_not_exist() { + self::$wp_filesystem_mock->expects( $this->never() )->method( 'is_writable' ); + self::$wp_filesystem_mock->expects( $this->never() )->method( 'chmod' ); + self::$wp_filesystem_mock->expects( $this->never() )->method( 'delete' ); + + $destination = DIR_TESTDATA . '/upgrade/'; + + self::$wp_filesystem_mock + ->expects( $this->once() ) + ->method( 'dirlist' ) + ->with( $destination ) + ->willReturn( false ); + + $this->assertTrue( self::$instance->clear_destination( $destination ) ); + } + + /** + * Tests that `WP_Upgrader::clear_destination()` clears + * the destination directory. + * + * @ticket 54245 + * + * @covers WP_Upgrader::clear_destination + */ + public function test_clear_destination_should_clear_the_destination_directory() { + $destination = DIR_TESTDATA . '/upgrade/'; + + self::$wp_filesystem_mock + ->expects( $this->once() ) + ->method( 'dirlist' ) + ->with( $destination ) + ->willReturn( array() ); + + self::$wp_filesystem_mock + ->expects( $this->once() ) + ->method( 'delete' ) + ->with( $destination ) + ->willReturn( true ); + + $this->assertTrue( self::$instance->clear_destination( $destination ) ); + } + + /** + * Tests that `WP_Upgrader::clear_destination()` returns a WP_Error object + * if files are not writable. + * + * This test runs in a separate process so that it can define + * constants without impacting other tests. + * + * This test does not preserve global state to prevent the exception + * "Serialization of 'Closure' is not allowed." when running in a + * separate process. + * + * @ticket 54245 + * + * @covers WP_Upgrader::clear_destination + * + * @runInSeparateProcess + * @preserveGlobalState disabled + */ + public function test_clear_destination_should_return_wp_error_if_files_are_not_writable() { + define( 'FS_CHMOD_FILE', 0644 ); + define( 'FS_CHMOD_DIR', 0755 ); + + self::$instance->generic_strings(); + + self::$wp_filesystem_mock->expects( $this->never() )->method( 'delete' ); + + $destination = DIR_TESTDATA . '/upgrade/'; + $dirlist = array( + 'file1.php' => array( + 'name' => 'file1.php', + 'type' => 'f', + ), + 'subdir' => array( + 'name' => 'subdir', + 'type' => 'd', + ), + ); + + self::$wp_filesystem_mock + ->expects( $this->once() ) + ->method( 'dirlist' ) + ->with( $destination ) + ->willReturn( $dirlist ); + + $unwritable_checks = array( + array( $destination . 'file1.php' ), + array( $destination . 'file1.php' ), + array( $destination . 'subdir' ), + array( $destination . 'subdir' ), + ); + + self::$wp_filesystem_mock + ->expects( $this->exactly( 4 ) ) + ->method( 'is_writable' ) + ->withConsecutive( ...$unwritable_checks ) + ->willReturn( false ); + + $actual = self::$instance->clear_destination( $destination ); + + $this->assertWPError( + $actual, + 'WP_Upgrader::clear_destination() did not return a WP_Error object' + ); + + $this->assertSame( + 'files_not_writable', + $actual->get_error_code(), + 'Unexpected WP_Error code' + ); + + $this->assertSameSets( + array( 'file1.php, subdir' ), + $actual->get_all_error_data(), + 'Unexpected WP_Error data' + ); + } + + /** + * Tests that `WP_Upgrader::install_package()` returns a WP_Error object + * when an invalid source is passed. + * + * @ticket 54245 + * + * @covers WP_Upgrader::install_package + * + * @dataProvider data_install_package_invalid_paths + * + * @param mixed $path The path to test. + */ + public function test_install_package_should_return_wp_error_with_invalid_source( $path ) { + self::$instance->generic_strings(); + + self::$upgrader_skin_mock->expects( $this->never() )->method( 'feedback' ); + self::$wp_filesystem_mock->expects( $this->never() )->method( 'dirlist' ); + self::$wp_filesystem_mock->expects( $this->never() )->method( 'find_folder' ); + self::$wp_filesystem_mock->expects( $this->never() )->method( 'is_dir' ); + self::$wp_filesystem_mock->expects( $this->never() )->method( 'exists' ); + self::$wp_filesystem_mock->expects( $this->never() )->method( 'delete' ); + self::$wp_filesystem_mock->expects( $this->never() )->method( 'mkdir' ); + + $args = array( + 'source' => $path, + 'destination' => '/', + ); + + $actual = self::$instance->install_package( $args ); + + $this->assertWPError( + $actual, + 'WP_Upgrader::install_package() did not return a WP_Error object' + ); + + $this->assertSame( + 'bad_request', + $actual->get_error_code(), + 'Unexpected WP_Error code' + ); + } + + /** + * Tests that `WP_Upgrader::install_package()` returns a WP_Error object + * when an invalid destination is passed. + * + * @ticket 54245 + * + * @covers WP_Upgrader::install_package + * + * @dataProvider data_install_package_invalid_paths + * + * @param mixed $path The path to test. + */ + public function test_install_package_should_return_wp_error_with_invalid_destination( $path ) { + self::$instance->generic_strings(); + + self::$upgrader_skin_mock->expects( $this->never() )->method( 'feedback' ); + self::$wp_filesystem_mock->expects( $this->never() )->method( 'dirlist' ); + self::$wp_filesystem_mock->expects( $this->never() )->method( 'find_folder' ); + self::$wp_filesystem_mock->expects( $this->never() )->method( 'is_dir' ); + self::$wp_filesystem_mock->expects( $this->never() )->method( 'exists' ); + self::$wp_filesystem_mock->expects( $this->never() )->method( 'delete' ); + self::$wp_filesystem_mock->expects( $this->never() )->method( 'mkdir' ); + + $args = array( + 'source' => '/', + 'destination' => $path, + ); + + $actual = self::$instance->install_package( $args ); + + $this->assertWPError( + $actual, + 'WP_Upgrader::install_package() did not return a WP_Error object' + ); + + $this->assertSame( + 'bad_request', + $actual->get_error_code(), + 'Unexpected WP_Error code' + ); + } + + /** + * Data provider. + * + * @return array[] + */ + public function data_install_package_invalid_paths() { + return array( + 'empty string' => array( 'path' => '' ), + + // Type checks. + 'empty array' => array( 'path' => array() ), + '(int) 0' => array( 'path' => 0 ), + '(int) -0' => array( 'path' => -0 ), + '(float) 0.0' => array( 'path' => 0.0 ), + '(float) -0.0' => array( 'path' => -0.0 ), + '(bool) false' => array( 'path' => false ), + 'null' => array( 'path' => null ), + ); + } + + /** + * Tests that `WP_Upgrader::install_package()` returns a WP_Error object + * when the 'upgrader_pre_install' filter returns a WP_Error object. + * + * @ticket 54245 + * + * @covers WP_Upgrader::install_package + */ + public function test_install_package_should_return_wp_error_when_pre_install_filter_returns_wp_error() { + self::$instance->generic_strings(); + + self::$upgrader_skin_mock + ->expects( $this->once() ) + ->method( 'feedback' ) + ->with( 'installing_package' ); + + add_filter( + 'upgrader_pre_install', + static function () { + return new WP_Error( 'from_upgrader_pre_install' ); + } + ); + + $args = array( + 'source' => '/', + 'destination' => '/', + ); + + $actual = self::$instance->install_package( $args ); + + $this->assertWPError( + $actual, + 'WP_Upgrader::install_package() did not return a WP_Error object' + ); + + $this->assertSame( + 'from_upgrader_pre_install', + $actual->get_error_code(), + 'The WP_Error object was not returned from the filter' + ); + } + + /** + * Tests that `WP_Upgrader::install_package()` adds a trailing slash to + * the source directory and a single subdirectory. + * + * @ticket 54245 + * + * @covers WP_Upgrader::install_package + */ + public function test_install_package_should_add_trailing_slash_to_source_and_subdirectory() { + self::$instance->generic_strings(); + + self::$upgrader_skin_mock + ->expects( $this->once() ) + ->method( 'feedback' ) + ->with( 'installing_package' ); + + $dirlist = array( + 'subdir' => array( + 'name' => 'subdir', + 'type' => 'd', + 'files' => array( 'subfile.php' ), + ), + ); + + self::$wp_filesystem_mock + ->expects( $this->once() ) + ->method( 'dirlist' ) + ->with( '/source_dir' ) + ->willReturn( $dirlist ); + + self::$wp_filesystem_mock + ->expects( $this->once() ) + ->method( 'is_dir' ) + ->with( '/source_dir/subdir/' ) + ->willReturn( true ); + + add_filter( + 'upgrader_source_selection', + function ( $source ) { + $this->assertSame( '/source_dir/subdir/', $source ); + + // Return a WP_Error to exit before `move_dir()/copy_dir()`. + return new WP_Error(); + } + ); + + $args = array( + 'source' => '/source_dir', + 'destination' => '/dest_dir', + ); + + self::$instance->install_package( $args ); + } + + /** + * Tests that `WP_Upgrader::install_package()` returns a WP_Error object + * when no source files exist. + * + * @ticket 54245 + * + * @covers WP_Upgrader::install_package + */ + public function test_install_package_should_return_wp_error_when_no_source_files_exist() { + self::$instance->generic_strings(); + + self::$upgrader_skin_mock + ->expects( $this->once() ) + ->method( 'feedback' ) + ->with( 'installing_package' ); + + self::$wp_filesystem_mock + ->expects( $this->once() ) + ->method( 'dirlist' ) + ->with( '/' ) + ->willReturn( array() ); + + $args = array( + 'source' => '/', + 'destination' => '/', + ); + + $actual = self::$instance->install_package( $args ); + + $this->assertWPError( + $actual, + 'WP_Upgrader::install_package() did not return a WP_Error object' + ); + + $this->assertSame( + 'incompatible_archive_empty', + $actual->get_error_code(), + 'Unexpected WP_Error code' + ); + } + + /** + * Tests that `WP_Upgrader::install_package()` adds a trailing slash to + * the source directory of a single file. + * + * @ticket 54245 + * + * @covers WP_Upgrader::install_package + */ + public function test_install_package_should_add_trailing_slash_to_the_source_directory_of_single_file() { + self::$instance->generic_strings(); + + self::$upgrader_skin_mock + ->expects( $this->once() ) + ->method( 'feedback' ) + ->with( 'installing_package' ); + + self::$wp_filesystem_mock + ->expects( $this->once() ) + ->method( 'dirlist' ) + ->with( '/source_dir' ) + ->willReturn( array( 'file1.php' ) ); + + add_filter( + 'upgrader_source_selection', + function ( $source ) { + $this->assertSame( '/source_dir/', $source ); + + // Return a WP_Error to exit before `move_dir()/copy_dir()`. + return new WP_Error(); + } + ); + + $args = array( + 'source' => '/source_dir', + 'destination' => '/dest_dir', + ); + + self::$instance->install_package( $args ); + } + + /** + * Tests that `WP_Upgrader::install_package()` applies + * 'upgrader_clear_destination' filters with arguments. + * + * This test runs in a separate process so that it can define + * constants without impacting other tests. + * + * This test does not preserve global state to prevent the exception + * "Serialization of 'Closure' is not allowed." when running in a + * separate process. + * + * @ticket 54245 + * + * @covers WP_Upgrader::install_package + * + * @runInSeparateProcess + * @preserveGlobalState disabled + */ + public function test_install_package_should_clear_destination_when_clear_destination_is_true() { + define( 'FS_CHMOD_FILE', 0644 ); + + self::$instance->generic_strings(); + + self::$upgrader_skin_mock + ->expects( $this->exactly( 2 ) ) + ->method( 'feedback' ) + ->withConsecutive( + array( 'installing_package' ), + array( 'remove_old' ) + ); + + self::$wp_filesystem_mock + ->expects( $this->once() ) + ->method( 'find_folder' ) + ->with( '/dest_dir' ) + ->willReturn( '/dest_dir/' ); + + $dirlist_args = array( + array( '/source_dir' ), + array( '/source_dir/' ), + array( '/dest_dir/' ), + ); + + $dirlist_results = array( + 'file1.php' => array( + 'name' => 'file1.php', + 'type' => 'f', + ), + ); + + self::$wp_filesystem_mock + ->expects( $this->exactly( 3 ) ) + ->method( 'dirlist' ) + ->withConsecutive( ...$dirlist_args ) + ->willReturn( $dirlist_results ); + + add_filter( + 'upgrader_clear_destination', + function ( $removed, $local_destination, $remote_destination, $hook_extra ) { + $this->assertTrue( + is_bool( $removed ) || is_wp_error( $removed ), + 'The "removed" argument is not a bool or WP_Error' + ); + + $this->assertIsString( + $local_destination, + 'The "local_destination" argument is not a string' + ); + + $this->assertIsString( + $remote_destination, + 'The "remote_destination" argument is not a string' + ); + + $this->assertIsArray( + $hook_extra, + 'The "hook_extra" argument is not an array' + ); + + return new WP_Error( 'exit_early' ); + }, + 10, + 4 + ); + + $args = array( + 'source' => '/source_dir', + 'destination' => '/dest_dir', + 'clear_destination' => true, + ); + + self::$instance->install_package( $args ); + } + + /** + * Tests that `WP_Upgrader::install_package()` makes the + * remote destination safe when set to a protected directory. + * + * This test runs in a separate process so that it can define + * constants without impacting other tests. + * + * This test does not preserve global state to prevent the exception + * "Serialization of 'Closure' is not allowed." when running in a + * separate process. + * + * @ticket 54245 + * + * @covers WP_Upgrader::install_package + * + * @dataProvider data_install_package_should_make_remote_destination_safe_when_set_to_a_protected_directory + * + * @runInSeparateProcess + * @preserveGlobalState disabled + * + * @param string $protected_directory The path to a protected directory. + * @param string $expected The expected safe remote destination. + */ + public function test_install_package_should_make_remote_destination_safe_when_set_to_a_protected_directory( $protected_directory, $expected ) { + define( 'FS_CHMOD_FILE', 0644 ); + + self::$instance->generic_strings(); + + self::$upgrader_skin_mock + ->expects( $this->exactly( 2 ) ) + ->method( 'feedback' ) + ->withConsecutive( + array( 'installing_package' ), + array( 'remove_old' ) + ); + + self::$wp_filesystem_mock + ->expects( $this->once() ) + ->method( 'find_folder' ) + ->with( $protected_directory ) + ->willReturn( trailingslashit( $protected_directory ) ); + + $dirlist_args = array( + array( '/source_dir' ), + array( '/source_dir/' ), + array( $expected ), + ); + + $dirlist_results = array( + 'file1.php' => array( + 'name' => 'file1.php', + 'type' => 'f', + ), + ); + + self::$wp_filesystem_mock + ->expects( $this->exactly( 3 ) ) + ->method( 'dirlist' ) + ->withConsecutive( ...$dirlist_args ) + ->willReturn( $dirlist_results ); + + add_filter( + 'upgrader_clear_destination', + function ( $removed, $local_destination, $remote_destination ) use ( $expected ) { + $this->assertSame( $expected, $remote_destination ); + return new WP_Error( 'exit_early' ); + }, + 10, + 3 + ); + + $args = array( + 'source' => '/source_dir', + 'destination' => $protected_directory, + 'clear_destination' => true, + ); + + self::$instance->install_package( $args ); + } + + /** + * Data provider. + * + * @return array[] + */ + public function data_install_package_should_make_remote_destination_safe_when_set_to_a_protected_directory() { + return array( + 'ABSPATH' => array( + 'protected_directory' => ABSPATH, + 'expected' => ABSPATH . 'source_dir/', + ), + 'WP_CONTENT_DIR' => array( + 'protected_directory' => WP_CONTENT_DIR, + 'expected' => WP_CONTENT_DIR . '/source_dir/', + ), + 'WP_PLUGIN_DIR' => array( + 'protected_directory' => WP_PLUGIN_DIR, + 'expected' => WP_PLUGIN_DIR . '/source_dir/', + ), + 'WP_CONTENT_DIR/themes' => array( + 'protected_directory' => WP_CONTENT_DIR . '/themes', + 'expected' => WP_CONTENT_DIR . '/themes/source_dir/', + ), + ); + } + + /** + * Tests that `WP_Upgrader::install_package()` returns a WP_Error object + * if the destination directory exists. + * + * @ticket 54245 + * + * @covers WP_Upgrader::install_package + */ + public function test_install_package_should_abort_if_the_destination_directory_exists() { + self::$instance->generic_strings(); + + self::$upgrader_skin_mock + ->expects( $this->once() ) + ->method( 'feedback' ) + ->with( 'installing_package' ); + + self::$wp_filesystem_mock + ->expects( $this->once() ) + ->method( 'find_folder' ) + ->with( '/dest_dir' ) + ->willReturn( '/dest_dir/' ); + + $dirlist_args = array( + array( '/source_dir' ), + array( '/source_dir/' ), + array( '/dest_dir/' ), + ); + + $dirlist_results = array( + 'file1.php' => array( + 'name' => 'file1.php', + 'type' => 'f', + ), + ); + + self::$wp_filesystem_mock + ->expects( $this->exactly( 3 ) ) + ->method( 'dirlist' ) + ->withConsecutive( ...$dirlist_args ) + ->willReturn( $dirlist_results ); + + self::$wp_filesystem_mock + ->expects( $this->once() ) + ->method( 'exists' ) + ->with( '/dest_dir/' ) + ->willReturn( true ); + + $args = array( + 'source' => '/source_dir', + 'destination' => '/dest_dir', + ); + + $actual = self::$instance->install_package( $args ); + + $this->assertWPError( + $actual, + 'WP_Upgrader::install_package() did not return a WP_Error object' + ); + + $this->assertSame( + 'folder_exists', + $actual->get_error_code(), + 'Unexpected WP_Error code' + ); + } + + /** + * Tests that `WP_Upgrader::install_package()` returns a WP_Error + * if the destination directory cannot be created. + * + * This test runs in a separate process so that it can define + * constants without impacting other tests. + * + * This test does not preserve global state to prevent the exception + * "Serialization of 'Closure' is not allowed." when running in a + * separate process. + * + * @ticket 54245 + * + * @covers WP_Upgrader::install_package + * + * @runInSeparateProcess + * @preserveGlobalState disabled + */ + public function test_install_package_should_return_wp_error_if_destination_cannot_be_created() { + define( 'FS_CHMOD_DIR', 0755 ); + + self::$instance->generic_strings(); + + self::$upgrader_skin_mock + ->expects( $this->once() ) + ->method( 'feedback' ) + ->with( 'installing_package' ); + + self::$wp_filesystem_mock + ->expects( $this->once() ) + ->method( 'find_folder' ) + ->with( '/dest_dir' ) + ->willReturn( '/dest_dir/' ); + + $dirlist_args = array( + array( '/source_dir' ), + array( '/source_dir/' ), + ); + + $dirlist_results = array( + 'file1.php' => array( + 'name' => 'file1.php', + 'type' => 'f', + ), + ); + + self::$wp_filesystem_mock + ->expects( $this->exactly( 2 ) ) + ->method( 'dirlist' ) + ->withConsecutive( ...$dirlist_args ) + ->willReturn( $dirlist_results ); + + self::$wp_filesystem_mock + ->expects( $this->once() ) + ->method( 'exists' ) + ->with( '/dest_dir/' ) + ->willReturn( false ); + + self::$wp_filesystem_mock + ->expects( $this->once() ) + ->method( 'mkdir' ) + ->with( '/dest_dir/' ) + ->willReturn( false ); + + $args = array( + 'source' => '/source_dir', + 'destination' => '/dest_dir', + 'abort_if_destination_exists' => false, + ); + + $actual = self::$instance->install_package( $args ); + + $this->assertWPError( + $actual, + 'WP_Upgrader::install_package() did not return a WP_Error object' + ); + + $this->assertSame( + 'mkdir_failed_destination', + $actual->get_error_code(), + 'Unexpected WP_Error code' + ); + } + + /** + * Tests that `WP_Upgrader::run()` returns `false` when + * requesting filesystem credentials fails. + * + * @ticket 54245 + * + * @covers WP_Upgrader::run + */ + public function test_run_should_return_false_when_requesting_filesystem_credentials_fails() { + self::$upgrader_skin_mock + ->expects( $this->once() ) + ->method( 'request_filesystem_credentials' ) + ->willReturn( false ); + + self::$upgrader_skin_mock + ->expects( $this->once() ) + ->method( 'footer' ); + + $this->assertFalse( self::$instance->run( array() ) ); + } + + /** + * Tests that `WP_Upgrader::maintenance_mode()` removes the `.maintenance` file. + * + * @ticket 54245 + * + * @covers WP_Upgrader::maintenance_mode + */ + public function test_maintenance_mode_should_disable_maintenance_mode_if_maintenance_file_exists() { + self::$wp_filesystem_mock + ->expects( $this->once() ) + ->method( 'abspath' ) + ->willReturn( '/' ); + + self::$wp_filesystem_mock + ->expects( $this->once() ) + ->method( 'exists' ) + ->with( '/.maintenance' ) + ->willReturn( true ); + + self::$upgrader_skin_mock + ->expects( $this->once() ) + ->method( 'feedback' ) + ->with( 'maintenance_end' ); + + self::$wp_filesystem_mock + ->expects( $this->once() ) + ->method( 'delete' ) + ->with( '/.maintenance' ); + + self::$instance->maintenance_mode(); + } + + /** + * Tests that `WP_Upgrader::maintenance_mode()` does nothing if + * the `.maintenance` file does not exist. + * + * @ticket 54245 + * + * @covers WP_Upgrader::maintenance_mode + */ + public function test_maintenance_mode_should_not_disable_maintenance_mode_if_no_maintenance_file_exists() { + self::$upgrader_skin_mock->expects( $this->never() )->method( 'feedback' ); + self::$wp_filesystem_mock->expects( $this->never() )->method( 'delete' ); + + self::$wp_filesystem_mock + ->expects( $this->once() ) + ->method( 'abspath' ) + ->willReturn( '/' ); + + self::$wp_filesystem_mock + ->expects( $this->once() ) + ->method( 'exists' ) + ->with( '/.maintenance' ) + ->willReturn( false ); + + self::$instance->maintenance_mode(); + } + + /** + * Tests that `WP_Upgrader::maintenance_mode()` creates + * a `.maintenance` file with a boolean `$enable` argument. + * + * This test runs in a separate process so that it can define + * constants without impacting other tests. + * + * This test does not preserve global state to prevent the exception + * "Serialization of 'Closure' is not allowed." when running in a + * separate process. + * + * @ticket 54245 + * + * @covers WP_Upgrader::maintenance_mode + * + * @runInSeparateProcess + * @preserveGlobalState disabled + */ + public function test_maintenance_mode_should_create_maintenance_file_with_boolean() { + define( 'FS_CHMOD_FILE', 0644 ); + + self::$wp_filesystem_mock + ->expects( $this->once() ) + ->method( 'abspath' ) + ->willReturn( '/' ); + + self::$upgrader_skin_mock + ->expects( $this->once() ) + ->method( 'feedback' ) + ->with( 'maintenance_start' ); + + self::$wp_filesystem_mock + ->expects( $this->once() ) + ->method( 'delete' ) + ->with( '/.maintenance' ); + + self::$wp_filesystem_mock + ->expects( $this->once() ) + ->method( 'put_contents' ) + ->with( + '/.maintenance', + $this->stringContains( 'maintenance_mode( true ); + } + + /** + * Tests that `WP_Upgrader::release_lock()` removes the 'lock' option. + * + * @ticket 54245 + * + * @covers WP_Upgrader::release_lock + */ + public function test_release_lock_should_remove_lock_option() { + global $wpdb; + + $this->assertSame( + 1, + $wpdb->insert( + $wpdb->options, + array( + 'option_name' => 'lock.lock', + 'option_value' => 'content', + ), + '%s' + ), + 'The initial lock was not created.' + ); + + WP_Upgrader::release_lock( 'lock' ); + + $this->assertNotSame( 'content', get_option( 'lock.lock' ) ); + } + + /** + * Tests that `WP_Upgrader::download_package()` returns early when + * the 'upgrader_pre_download' filter returns a non-false value. + * + * @ticket 54245 + * + * @covers WP_Upgrader::download_package + */ + public function test_download_package_should_exit_early_when_the_upgrader_pre_download_filter_returns_non_false() { + self::$upgrader_skin_mock->expects( $this->never() )->method( 'feedback' ); + + add_filter( + 'upgrader_pre_download', + static function () { + return 'a non-false value'; + } + ); + + $result = self::$instance->download_package( 'package' ); + + $this->assertSame( 'a non-false value', $result ); + } + + /** + * Tests that `WP_Upgrader::download_package()` should apply + * 'upgrader_pre_download' filters with expected arguments. + * + * @ticket 54245 + * + * @covers WP_Upgrader::download_package + */ + public function test_download_package_should_apply_upgrader_pre_download_filter_with_arguments() { + self::$upgrader_skin_mock->expects( $this->never() )->method( 'feedback' ); + + add_filter( + 'upgrader_pre_download', + function ( $reply, $package, $upgrader, $hook_extra ) { + $this->assertFalse( $reply, '"$reply" was not false' ); + + $this->assertSame( + 'package', + $package, + 'The package file name was not "package"' + ); + + $this->assertSame( + self::$instance, + $upgrader, + 'The wrong WP_Upgrader instance was passed' + ); + + $this->assertSameSets( + array( 'hook_extra' ), + $hook_extra, + 'The "$hook_extra" array was not the expected array' + ); + + return ! $reply; + }, + 10, + 4 + ); + + $result = self::$instance->download_package( 'package', false, array( 'hook_extra' ) ); + + $this->assertTrue( + $result, + 'WP_Upgrader::download_package() did not return true' + ); + } + + /** + * Tests that `WP_Upgrader::download_package()` returns an existing file. + * + * @ticket 54245 + * + * @covers WP_Upgrader::download_package + */ + public function test_download_package_should_return_an_existing_file() { + $result = self::$instance->download_package( __FILE__ ); + + $this->assertSame( __FILE__, $result ); + } + + /** + * Tests that `WP_Upgrader::download_package()` returns a file with the + * package name in it. + * + * @ticket 54245 + * + * @covers WP_Upgrader::download_package + */ + public function test_download_package_should_return_a_file_with_the_package_name() { + add_filter( + 'pre_http_request', + static function () { + return array( 'response' => array( 'code' => 200 ) ); + } + ); + + $result = self::$instance->download_package( 'wordpress-seo' ); + + $this->assertStringContainsString( '/wordpress-seo-', $result ); + } + + /** + * Tests that `WP_Upgrader::download_package()` returns a package URL error + * as a `WP_Error` object. + * + * @ticket 54245 + * + * @covers WP_Upgrader::download_package + */ + public function test_download_package_should_return_a_wp_error_object() { + self::$instance->generic_strings(); + + add_filter( + 'pre_http_request', + static function () { + return array( + 'response' => array( + 'code' => 400, + 'message' => 'error', + ), + ); + } + ); + + $result = self::$instance->download_package( 'wordpress-seo' ); + + $this->assertWPError( + $result, + 'WP_Upgrader::download_package() did not return a WP_Error object' + ); + + $this->assertSame( + 'download_failed', + $result->get_error_code(), + 'Unexpected WP_Error code' + ); + } +} From ac8bca4fdf78ccf6f49a1503ccfa33c274e29f57 Mon Sep 17 00:00:00 2001 From: Bernie Reiter Date: Tue, 24 Oct 2023 08:49:38 +0000 Subject: [PATCH 54/71] Blocks: Fix layout support to be compatible with enhanced pagination. Make layout support compatible with enhanced pagination by ensuring that generated class names are stable across pagination, even when the number of rendered posts is different. With the previous implementation of enhanced pagination, the CSS corresponding to each block was not detected. Therefore, for enhanced pagination to work correctly, the CSS of the blocks present in the Post Template must be stable on all pages. The number of posts rendered by the Query block is always the same, except in the last page, where it can be only a fraction. If any of the blocks rendered by the Post Template used the `wp_unique_id` function, the ID (which is incremental) would have been different than in the previous pages and the class names would have varied. This is remediated by this changeset by replacing the usage of `wp_unique_id` in the layout support (which is used by the Query block) with an implementation that uses IDs that are incremental only for that block. That way, the generated class names are never affected by the number of times `wp_unique_id` runs. Props luisherranz, andrewserong, isabel_brison, costdev, mukesh27, cbravobernal, hellofromTonya, jorbin. Fixes #59681. git-svn-id: https://develop.svn.wordpress.org/trunk@56994 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/block-supports/layout.php | 11 +- src/wp-includes/functions.php | 34 +++ tests/phpunit/tests/blocks/render.php | 4 +- .../tests/functions/wpUniquePrefixedId.php | 196 ++++++++++++++++++ 4 files changed, 242 insertions(+), 3 deletions(-) create mode 100644 tests/phpunit/tests/functions/wpUniquePrefixedId.php diff --git a/src/wp-includes/block-supports/layout.php b/src/wp-includes/block-supports/layout.php index 4c1f4c2fe7b43..0e22dded74e44 100644 --- a/src/wp-includes/block-supports/layout.php +++ b/src/wp-includes/block-supports/layout.php @@ -630,7 +630,16 @@ function wp_render_layout_support_flag( $block_content, $block ) { $class_names = array(); $layout_definitions = wp_get_layout_definitions(); - $container_class = wp_unique_id( 'wp-container-' ); + + /* + * Uses an incremental ID that is independent per prefix to make sure that + * rendering different numbers of blocks doesn't affect the IDs of other + * blocks. Makes the CSS class names stable across paginations + * for features like the enhanced pagination of the Query block. + */ + $container_class = wp_unique_prefixed_id( + 'wp-container-' . sanitize_title( $block['blockName'] ) . '-layout-' + ); // Set the correct layout type for blocks using legacy content width. if ( isset( $used_layout['inherit'] ) && $used_layout['inherit'] || isset( $used_layout['contentSize'] ) && $used_layout['contentSize'] ) { diff --git a/src/wp-includes/functions.php b/src/wp-includes/functions.php index c467961c98f9e..cb490ee1764fa 100644 --- a/src/wp-includes/functions.php +++ b/src/wp-includes/functions.php @@ -7830,6 +7830,40 @@ function wp_unique_id( $prefix = '' ) { return $prefix . (string) ++$id_counter; } +/** + * Generates an incremental ID that is independent per each different prefix. + * + * It is similar to `wp_unique_id`, but each prefix has its own internal ID + * counter to make each prefix independent from each other. The ID starts at 1 + * and increments on each call. The returned value is not universally unique, + * but it is unique across the life of the PHP process and it's stable per + * prefix. + * + * @since 6.4.0 + * + * @param string $prefix Optional. Prefix for the returned ID. Default empty string. + * @return string Incremental ID per prefix. + */ +function wp_unique_prefixed_id( $prefix = '' ) { + static $id_counters = array(); + + if ( ! is_string( $prefix ) ) { + wp_trigger_error( + __FUNCTION__, + sprintf( 'The prefix must be a string. "%s" data type given.', gettype( $prefix ) ) + ); + $prefix = ''; + } + + if ( ! isset( $id_counters[ $prefix ] ) ) { + $id_counters[ $prefix ] = 0; + } + + $id = ++$id_counters[ $prefix ]; + + return $prefix . (string) $id; +} + /** * Gets last changed date for the specified cache group. * diff --git a/tests/phpunit/tests/blocks/render.php b/tests/phpunit/tests/blocks/render.php index 632298186eaa0..cb06030282604 100644 --- a/tests/phpunit/tests/blocks/render.php +++ b/tests/phpunit/tests/blocks/render.php @@ -218,9 +218,9 @@ public function test_do_block_output( $html_filename, $server_html_filename ) { $html = do_blocks( self::strip_r( file_get_contents( $html_path ) ) ); // If blocks opt into Gutenberg's layout implementation - // the container will receive an added classname of `wp_unique_id( 'wp-container-' )` + // the container will receive an additional, unique classname based on "wp-container-[blockname]-layout" // so we need to normalize the random id. - $normalized_html = preg_replace( '/wp-container-\d+/', 'wp-container-1', $html ); + $normalized_html = preg_replace( '/wp-container-[a-z-]+\d+/', 'wp-container-1', $html ); // The gallery block uses a unique class name of `wp_unique_id( 'wp-block-gallery-' )` // so we need to normalize the random id. diff --git a/tests/phpunit/tests/functions/wpUniquePrefixedId.php b/tests/phpunit/tests/functions/wpUniquePrefixedId.php new file mode 100644 index 0000000000000..64a6a955a14ac --- /dev/null +++ b/tests/phpunit/tests/functions/wpUniquePrefixedId.php @@ -0,0 +1,196 @@ +assertNotSame( $id1, $id2, 'The IDs are not unique.' ); + $this->assertSame( $expected, array( $id1, $id2 ), 'The IDs did not match the expected values.' ); + } + + /** + * Data provider. + * + * @return array[] + */ + public function data_should_create_unique_prefixed_ids() { + return array( + 'prefix as empty string' => array( + 'prefix' => '', + 'expected' => array( '1', '2' ), + ), + 'prefix as (string) "0"' => array( + 'prefix' => '0', + 'expected' => array( '01', '02' ), + ), + 'prefix as string' => array( + 'prefix' => 'test', + 'expected' => array( 'test1', 'test2' ), + ), + 'prefix as string with spaces' => array( + 'prefix' => ' ', + 'expected' => array( ' 1', ' 2' ), + ), + 'prefix as (string) "1"' => array( + 'prefix' => '1', + 'expected' => array( '11', '12' ), + ), + 'prefix as a (string) "."' => array( + 'prefix' => '.', + 'expected' => array( '.1', '.2' ), + ), + 'prefix as a block name' => array( + 'prefix' => 'core/list-item', + 'expected' => array( 'core/list-item1', 'core/list-item2' ), + ), + ); + } + + /** + * @ticket 59681 + * + * @dataProvider data_should_raise_notice_and_use_empty_string_prefix_when_nonstring_given + * + * @runInSeparateProcess + * @preserveGlobalState disabled + * + * @param mixed $non_string_prefix Non-string prefix. + * @param int $number_of_ids_to_generate Number of IDs to generate. + * As the prefix will default to an empty string, changing the number of IDs generated within each dataset further tests ID uniqueness. + * @param string $expected_message Expected notice message. + * @param array $expected_ids Expected unique IDs. + */ + public function test_should_raise_notice_and_use_empty_string_prefix_when_nonstring_given( $non_string_prefix, $number_of_ids_to_generate, $expected_message, $expected_ids ) { + $this->expectNotice(); + $this->expectNoticeMessage( $expected_message ); + + $ids = array(); + for ( $i = 0; $i < $number_of_ids_to_generate; $i++ ) { + $ids[] = wp_unique_prefixed_id( $non_string_prefix ); + } + + $this->assertSameSets( $ids, array_unique( $ids ), 'IDs are not unique.' ); + $this->assertSameSets( $expected_ids, $ids, 'The IDs did not match the expected values.' ); + } + + /** + * Data provider. + * + * @return array[] + */ + public function data_should_raise_notice_and_use_empty_string_prefix_when_nonstring_given() { + $message = 'wp_unique_prefixed_id(): The prefix must be a string. "%s" data type given.'; + return array( + 'prefix as null' => array( + 'non_string_prefix' => null, + 'number_of_ids_to_generate' => 2, + 'expected_message' => sprintf( $message, 'NULL' ), + 'expected_ids' => array( '1', '2' ), + ), + 'prefix as (int) 0' => array( + 'non_string_prefix' => 0, + 'number_of_ids_to_generate' => 3, + 'expected_message' => sprintf( $message, 'integer' ), + 'expected_ids' => array( '1', '2', '3' ), + ), + 'prefix as (int) 1' => array( + 'non_string_prefix' => 1, + 'number_of_ids_to_generate' => 4, + 'expected_data_type' => sprintf( $message, 'integer' ), + 'expected_ids' => array( '1', '2', '3', '4' ), + ), + 'prefix as (bool) false' => array( + 'non_string_prefix' => false, + 'number_of_ids_to_generate' => 5, + 'expected_data_type' => sprintf( $message, 'boolean' ), + 'expected_ids' => array( '1', '2', '3', '4', '5' ), + ), + 'prefix as (double) 98.7' => array( + 'non_string_prefix' => 98.7, + 'number_of_ids_to_generate' => 6, + 'expected_data_type' => sprintf( $message, 'double' ), + 'expected_ids' => array( '1', '2', '3', '4', '5', '6' ), + ), + ); + } + + /** + * Prefixes that are or will become the same should generate unique IDs. + * + * This test is added to avoid future regressions if the function's prefix data type check is + * modified to type juggle or check for scalar data types. + * + * @ticket 59681 + * + * @dataProvider data_same_prefixes_should_generate_unique_ids + * + * @runInSeparateProcess + * @preserveGlobalState disabled + * + * @param array $prefixes The prefixes to check. + * @param array $expected The expected unique IDs. + */ + public function test_same_prefixes_should_generate_unique_ids( array $prefixes, array $expected ) { + // Suppress E_USER_NOTICE, which will be raised when a prefix is non-string. + $original_error_reporting = error_reporting(); + error_reporting( $original_error_reporting & ~E_USER_NOTICE ); + + $ids = array(); + foreach ( $prefixes as $prefix ) { + $ids[] = wp_unique_prefixed_id( $prefix ); + } + + // Reset error reporting. + error_reporting( $original_error_reporting ); + + $this->assertSameSets( $ids, array_unique( $ids ), 'IDs are not unique.' ); + $this->assertSameSets( $expected, $ids, 'The IDs did not match the expected values.' ); + } + + /** + * Data provider. + * + * @return array[] + */ + public function data_same_prefixes_should_generate_unique_ids() { + return array( + 'prefixes = empty string' => array( + 'prefixes' => array( null, true, '' ), + 'expected' => array( '1', '2', '3' ), + ), + 'prefixes = 0' => array( + 'prefixes' => array( '0', 0, 0.0, false ), + 'expected' => array( '01', '1', '2', '3' ), + ), + 'prefixes = 1' => array( + 'prefixes' => array( '1', 1, 1.0, true ), + 'expected' => array( '11', '1', '2', '3' ), + ), + ); + } +} From 88ab0a2c5716f3c2949b3bbb12bdd7fc19b3e141 Mon Sep 17 00:00:00 2001 From: Tonya Mork Date: Tue, 24 Oct 2023 10:57:03 +0000 Subject: [PATCH 55/71] Tests: Fix static property handling in r56991. Fixes static property handling for `WP_Duotone::$block_css_declarations` in the `Tests_Block_Supports_Duotone::test_css_declarations_are_generated_even_with_empty_block_content()`: * Fixes `ReflectionProperty::setValue()` to use an instance of `WP_Duotone`. * Adds an inline comment to explain why a static class (i.e. a class that is not intended to be an object by design as it only contains static properties and methods) needs an instance, i.e. needed for PHP 8.3 and higher. * Resets the static property's value to its original value, i.e. before the test started. Follow-up to [56991]. Props costdev. See #59694. git-svn-id: https://develop.svn.wordpress.org/trunk@56996 602fd350-edb4-49c9-b593-d223f7449a82 --- .../phpunit/tests/block-supports/duotone.php | 21 +++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/tests/phpunit/tests/block-supports/duotone.php b/tests/phpunit/tests/block-supports/duotone.php index eac3d2acac3a3..90cf376be70c8 100644 --- a/tests/phpunit/tests/block-supports/duotone.php +++ b/tests/phpunit/tests/block-supports/duotone.php @@ -112,18 +112,31 @@ public function data_get_slug_from_attribute() { * @covers ::render_duotone_support */ public function test_css_declarations_are_generated_even_with_empty_block_content() { - $block = array( + $block = array( 'blockName' => 'core/image', 'attrs' => array( 'style' => array( 'color' => array( 'duotone' => 'var:preset|duotone|blue-orange' ) ) ), ); - $wp_block = new WP_Block( $block ); + $wp_block = new WP_Block( $block ); + + /* + * Handling to access the static WP_Duotone::$block_css_declarations property. + * + * Why is an instance needed? + * WP_Duotone is a static class by design, meaning it only contains static properties and methods. + * In production, it should not be instantiated. However, as of PHP 8.3, ReflectionProperty::setValue() + * needs an object. + */ + $wp_duotone = new WP_Duotone(); $block_css_declarations_property = new ReflectionProperty( 'WP_Duotone', 'block_css_declarations' ); $block_css_declarations_property->setAccessible( true ); - $block_css_declarations_property->setValue( $wp_block, array() ); + $previous_value = $block_css_declarations_property->getValue(); + $block_css_declarations_property->setValue( $wp_duotone, array() ); WP_Duotone::render_duotone_support( '', $block, $wp_block ); $actual = $block_css_declarations_property->getValue(); - // Reset the property's visibility. + + // Reset the property. + $block_css_declarations_property->setValue( $wp_duotone, $previous_value ); $block_css_declarations_property->setAccessible( false ); $this->assertNotEmpty( $actual ); From c438bebad1530fcef443be35061bf67024dde6a7 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 24 Oct 2023 11:32:42 +0000 Subject: [PATCH 56/71] Tests: Correct the `WP_Test_Stream::mkdir()` method. The method attempted to check if there is already a file with the same name, however the conditional used an undefined variable. This commit prevents directory creation if a file or directory with the same name already exists, bringing consistency with the PHP `mkdir()` implementation. Includes adding missing documentation for the method. Reference: [https://www.php.net/manual/en/streamwrapper.mkdir.php PHP Manual: streamWrapper::mkdir()]. Follow-up to [49230]. Props david.binda, sadizaman, rajinsharwar, SergeyBiryukov. Fixes #59406. git-svn-id: https://develop.svn.wordpress.org/trunk@56998 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/includes/class-wp-test-stream.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/tests/phpunit/includes/class-wp-test-stream.php b/tests/phpunit/includes/class-wp-test-stream.php index 11997507d0b1b..17d930b5861b3 100644 --- a/tests/phpunit/includes/class-wp-test-stream.php +++ b/tests/phpunit/includes/class-wp-test-stream.php @@ -198,16 +198,27 @@ public function stream_metadata( $path, $option, $value ) { * Creates a directory. * * @see streamWrapper::mkdir + * + * @param string $path Directory which should be created. + * @param int $mode The value passed to mkdir(). + * @param int $options A bitwise mask of values, such as STREAM_MKDIR_RECURSIVE. + * @return bool True on success, false on failure. */ public function mkdir( $path, $mode, $options ) { $this->open( $path ); + $plainfile = rtrim( $this->file, '/' ); - if ( isset( WP_Test_Stream::$data[ $this->bucket ][ $file ] ) ) { + // Check if a file or directory with the same name already exists. + if ( isset( WP_Test_Stream::$data[ $this->bucket ][ $plainfile ] ) + || isset( WP_Test_Stream::$data[ $this->bucket ][ $plainfile . '/' ] ) + ) { return false; } + $dir_ref = & $this->get_directory_ref(); $dir_ref = 'DIRECTORY'; + return true; } From 9b539b65bf8ed5e7db9eeda070528992393a147c Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Tue, 24 Oct 2023 14:04:13 +0000 Subject: [PATCH 57/71] Twenty Twenty-Four: Bug fixes for 6.4 RC2. This update includes updates to patterns to correct color issues and some code quality fixes. Follow-up to [56951], [56813], [56764], [56716]. Props luminuu, richtabor, onemaggie, kafleg, swissspidy, huzaifaalmesbah, neilorangepeel, shailu25, lada7042, mukesh27, nilovelez, jorbin. Fixes #59711. git-svn-id: https://develop.svn.wordpress.org/trunk@56999 602fd350-edb4-49c9-b593-d223f7449a82 --- .../themes/twentytwentyfour/functions.php | 8 +++----- .../patterns/cta-services-image-left.php | 4 ++-- .../twentytwentyfour/patterns/text-faq.php | 20 +++++++++---------- .../themes/twentytwentyfour/readme.txt | 1 + .../themes/twentytwentyfour/style.css | 2 +- 5 files changed, 17 insertions(+), 18 deletions(-) diff --git a/src/wp-content/themes/twentytwentyfour/functions.php b/src/wp-content/themes/twentytwentyfour/functions.php index a7c7ad197561b..443035f384649 100644 --- a/src/wp-content/themes/twentytwentyfour/functions.php +++ b/src/wp-content/themes/twentytwentyfour/functions.php @@ -9,16 +9,15 @@ */ /** - * Register block styles + * Register block styles. */ if ( ! function_exists( 'twentytwentyfour_block_styles' ) ) : /** * Register custom block styles * - * @return void * @since Twenty Twenty-Four 1.0 - * + * @return void */ function twentytwentyfour_block_styles() { /** @@ -174,9 +173,8 @@ function twentytwentyfour_block_styles() { /** * Register pattern categories * - * @return void * @since Twenty Twenty-Four 1.0 - * + * @return void */ function twentytwentyfour_pattern_categories() { diff --git a/src/wp-content/themes/twentytwentyfour/patterns/cta-services-image-left.php b/src/wp-content/themes/twentytwentyfour/patterns/cta-services-image-left.php index 0ceed99ab6e22..87f3c9f3d77ad 100644 --- a/src/wp-content/themes/twentytwentyfour/patterns/cta-services-image-left.php +++ b/src/wp-content/themes/twentytwentyfour/patterns/cta-services-image-left.php @@ -7,8 +7,8 @@ */ ?> - -
+ +
diff --git a/src/wp-content/themes/twentytwentyfour/patterns/text-faq.php b/src/wp-content/themes/twentytwentyfour/patterns/text-faq.php index 284e895c6501b..9ebe08b77b04b 100644 --- a/src/wp-content/themes/twentytwentyfour/patterns/text-faq.php +++ b/src/wp-content/themes/twentytwentyfour/patterns/text-faq.php @@ -16,15 +16,15 @@
- -
+ +
- - + +
@@ -32,8 +32,8 @@
- - + +
@@ -41,8 +41,8 @@
- - + +
@@ -50,8 +50,8 @@
- - + +
diff --git a/src/wp-content/themes/twentytwentyfour/readme.txt b/src/wp-content/themes/twentytwentyfour/readme.txt index c3e2a56f29b1a..31d3bcf98503c 100644 --- a/src/wp-content/themes/twentytwentyfour/readme.txt +++ b/src/wp-content/themes/twentytwentyfour/readme.txt @@ -3,6 +3,7 @@ Contributors: wordpressdotorg Requires at least: 6.4 Tested up to: 6.4 Requires PHP: 7.0 +Stable tag: 1.0 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html diff --git a/src/wp-content/themes/twentytwentyfour/style.css b/src/wp-content/themes/twentytwentyfour/style.css index 2a56fed4cd3d5..6325914b1bbb3 100644 --- a/src/wp-content/themes/twentytwentyfour/style.css +++ b/src/wp-content/themes/twentytwentyfour/style.css @@ -1,6 +1,6 @@ /* Theme Name: Twenty Twenty-Four -Theme URI: https://wordpress.org/themes/twentytwentyfour +Theme URI: https://wordpress.org/themes/twentytwentyfour/ Author: the WordPress team Author URI: https://wordpress.org Description: Twenty Twenty-Four is designed to be flexible, versatile and applicable to any website. Its collection of templates and patterns tailor to different needs, such as presenting a business, blogging and writing or showcasing work. A multitude of possibilities open up with just a few adjustments to color and typography. Twenty Twenty-Four comes with style variations and full page designs to help speed up the site building process, is fully compatible with the site editor, and takes advantage of new design tools introduced in WordPress 6.4. From 32f75bf0f4c9adeaa51277f979490a53bea07e4f Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Tue, 24 Oct 2023 14:33:23 +0000 Subject: [PATCH 58/71] Twenty Twenty-Four: Include file renaming for RC2. This includes a file renaming that was missed in [56999]. Follow-up to [56999], [56951], [56813], [56764], [56716]. Props hellofromTonya, huzaifaalmesbah. See #59711. git-svn-id: https://develop.svn.wordpress.org/trunk@57003 602fd350-edb4-49c9-b593-d223f7449a82 --- .../{template-search-writer.php => template-search-blogging.php} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/wp-content/themes/twentytwentyfour/patterns/{template-search-writer.php => template-search-blogging.php} (100%) diff --git a/src/wp-content/themes/twentytwentyfour/patterns/template-search-writer.php b/src/wp-content/themes/twentytwentyfour/patterns/template-search-blogging.php similarity index 100% rename from src/wp-content/themes/twentytwentyfour/patterns/template-search-writer.php rename to src/wp-content/themes/twentytwentyfour/patterns/template-search-blogging.php From 0133fc5441e299a39480d0e726a61a585713af32 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Wed, 25 Oct 2023 11:20:23 +0000 Subject: [PATCH 59/71] Tests: Remove some unnecessary multisite test skipping. These checks are redundant, as the skipping already handled by the `ms-required` and `ms-excluded` groups. Follow-up to [36740], [36741], [38705], [40520], [51415]. Props johnbillion. See #59647. git-svn-id: https://develop.svn.wordpress.org/trunk@57008 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/l10n/getLocale.php | 8 -------- tests/phpunit/tests/l10n/getUserLocale.php | 4 ---- 2 files changed, 12 deletions(-) diff --git a/tests/phpunit/tests/l10n/getLocale.php b/tests/phpunit/tests/l10n/getLocale.php index 1f16448318cf1..bebae56316b87 100644 --- a/tests/phpunit/tests/l10n/getLocale.php +++ b/tests/phpunit/tests/l10n/getLocale.php @@ -40,10 +40,6 @@ public function test_local_option_should_take_precedence_on_multisite() { * @group ms-required */ public function test_network_option_should_be_fallback_on_multisite() { - if ( ! is_multisite() ) { - $this->markTestSkipped( 'This test requires Multisite.' ); - } - global $locale; $old_locale = $locale; $locale = null; @@ -60,10 +56,6 @@ public function test_network_option_should_be_fallback_on_multisite() { * @group ms-excluded */ public function test_option_should_be_respected_on_nonmultisite() { - if ( is_multisite() ) { - $this->markTestSkipped( 'This test does not apply to Multisite.' ); - } - global $locale; $old_locale = $locale; $locale = null; diff --git a/tests/phpunit/tests/l10n/getUserLocale.php b/tests/phpunit/tests/l10n/getUserLocale.php index 91e98b63e13e8..76492b3b707f6 100644 --- a/tests/phpunit/tests/l10n/getUserLocale.php +++ b/tests/phpunit/tests/l10n/getUserLocale.php @@ -67,10 +67,6 @@ public function test_site_locale_is_not_affected_on_frontend() { * @group ms-required */ public function test_user_locale_is_same_across_network() { - if ( ! is_multisite() ) { - $this->markTestSkipped( 'This test requires Multisite.' ); - } - $user_locale = get_user_locale(); switch_to_blog( self::factory()->blog->create() ); From 33069c3c6b6001a25a455ac6536c9ba8613b99d2 Mon Sep 17 00:00:00 2001 From: Felix Arntz Date: Thu, 26 Oct 2023 18:42:46 +0000 Subject: [PATCH 60/71] Themes: Fix block theme supports being added too early, leading to Customizer live preview bugs in 6.4. The Customizer live preview broke because of [56635], however the root cause for the bug was a lower-level problem that had been present since WordPress 5.8: The block theme specific functions `_add_default_theme_supports()` and `wp_enable_block_templates()` were being hooked into the `setup_theme` action, which fires too early to initialize theme features. Because of that, theme functionality would be initialized before the current theme setup being completed. In the case of the Customizer, that includes overriding which theme is the current theme entirely, thus leading to an inconsistent experience. This changeset fixes the bug by moving those two callbacks to the `after_setup_theme` action, which is the appropriate action to initialize theme features. Props karl94, hellofromTonya, joemcgill, flixos90. Fixes #59732. See #18298, #53397, #54597. git-svn-id: https://develop.svn.wordpress.org/trunk@57009 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/default-filters.php | 4 ++-- src/wp-includes/theme.php | 4 ++-- tests/phpunit/tests/block-template.php | 1 + tests/phpunit/tests/theme.php | 6 ++++-- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/wp-includes/default-filters.php b/src/wp-includes/default-filters.php index fa756427d1552..9cb447181aefd 100644 --- a/src/wp-includes/default-filters.php +++ b/src/wp-includes/default-filters.php @@ -521,7 +521,7 @@ */ // Theme. add_action( 'setup_theme', 'create_initial_theme_features', 0 ); -add_action( 'setup_theme', '_add_default_theme_supports', 1 ); +add_action( 'after_setup_theme', '_add_default_theme_supports', 1 ); add_action( 'wp_loaded', '_custom_header_background_just_in_time' ); add_action( 'wp_head', '_custom_logo_header_styles' ); add_action( 'plugins_loaded', '_wp_customize_include' ); @@ -718,7 +718,7 @@ add_action( 'save_post_wp_template_part', 'wp_set_unique_slug_on_create_template_part' ); add_action( 'wp_enqueue_scripts', 'wp_enqueue_block_template_skip_link' ); add_action( 'wp_footer', 'the_block_template_skip_link' ); // Retained for backwards-compatibility. Unhooked by wp_enqueue_block_template_skip_link(). -add_action( 'setup_theme', 'wp_enable_block_templates' ); +add_action( 'after_setup_theme', 'wp_enable_block_templates', 1 ); add_action( 'wp_loaded', '_add_template_loader_filters' ); // wp_navigation post type. diff --git a/src/wp-includes/theme.php b/src/wp-includes/theme.php index b5fba76159dad..6315cc2ab5ce2 100644 --- a/src/wp-includes/theme.php +++ b/src/wp-includes/theme.php @@ -4335,9 +4335,9 @@ function wp_theme_get_element_class_name( $element ) { } /** - * Adds default theme supports for block themes when the 'setup_theme' action fires. + * Adds default theme supports for block themes when the 'after_setup_theme' action fires. * - * See {@see 'setup_theme'}. + * See {@see 'after_setup_theme'}. * * @since 5.9.0 * @access private diff --git a/tests/phpunit/tests/block-template.php b/tests/phpunit/tests/block-template.php index 7b4cbf33220a7..d7ffad7f90305 100644 --- a/tests/phpunit/tests/block-template.php +++ b/tests/phpunit/tests/block-template.php @@ -15,6 +15,7 @@ public function set_up() { parent::set_up(); switch_theme( 'block-theme' ); do_action( 'setup_theme' ); + do_action( 'after_setup_theme' ); } public function tear_down() { diff --git a/tests/phpunit/tests/theme.php b/tests/phpunit/tests/theme.php index 77cad7156bec4..7260d6af57c46 100644 --- a/tests/phpunit/tests/theme.php +++ b/tests/phpunit/tests/theme.php @@ -746,6 +746,7 @@ public function data_register_theme_support_validation() { * * @ticket 54597 * @ticket 54731 + * @ticket 59732 * * @dataProvider data_block_theme_has_default_support * @@ -774,7 +775,7 @@ public function test_block_theme_has_default_support( $support ) { "Could not remove support for $support_data_str." ); - do_action( 'setup_theme' ); + do_action( 'after_setup_theme' ); $this->assertTrue( current_theme_supports( ...$support_data ), @@ -858,6 +859,7 @@ public function data_block_theme_has_default_support() { * Tests that block themes load separate core block assets by default. * * @ticket 54597 + * @ticket 59732 * * @covers ::_add_default_theme_supports * @covers ::wp_should_load_separate_core_block_assets @@ -872,7 +874,7 @@ public function test_block_theme_should_load_separate_core_block_assets_by_defau 'Could not disable loading separate core block assets.' ); - do_action( 'setup_theme' ); + do_action( 'after_setup_theme' ); $this->assertTrue( wp_should_load_separate_core_block_assets(), From 64b1726c4434fd34ab7e62dae89a71fbb6ddee4c Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 26 Oct 2023 20:31:45 +0000 Subject: [PATCH 61/71] Tests: Use a `@requires` annotation for `readonly()` function test. The function is only defined by WordPress core on PHP < 8.1. Follow-up to [51586]. See #59647. git-svn-id: https://develop.svn.wordpress.org/trunk@57011 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/php-compat/readonly.php | 2 +- .../phpunit/tests/general/template_CheckedSelectedHelper.php | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/wp-includes/php-compat/readonly.php b/src/wp-includes/php-compat/readonly.php index 1c7fd9deff4e0..16f0fab2c0db9 100644 --- a/src/wp-includes/php-compat/readonly.php +++ b/src/wp-includes/php-compat/readonly.php @@ -4,7 +4,7 @@ * to `wp_readonly()` in WordPress 5.9.0. * * In order to avoid PHP parser errors, this function was extracted - * to this separate file and is only included conditionally on PHP 8.1. + * to this separate file and is only included conditionally on PHP < 8.1. * * Including this file on PHP >= 8.1 results in a fatal error. * diff --git a/tests/phpunit/tests/general/template_CheckedSelectedHelper.php b/tests/phpunit/tests/general/template_CheckedSelectedHelper.php index 2c3afa9a80726..c6d3a5b9deb89 100644 --- a/tests/phpunit/tests/general/template_CheckedSelectedHelper.php +++ b/tests/phpunit/tests/general/template_CheckedSelectedHelper.php @@ -56,12 +56,9 @@ public function test_disabled_with_equal_values() { * * @ticket 53858 * @covers ::readonly + * @requires PHP < 8.1 */ public function test_readonly_with_equal_values() { - if ( ! function_exists( 'readonly' ) ) { - $this->markTestSkipped( 'readonly() function is not available on PHP 8.1' ); - } - $this->setExpectedDeprecated( 'readonly' ); // Call the function via a variable to prevent a parse error for this file on PHP 8.1. From 2fb54c20cd8b9e5a0d4a1b89e6103fcd61893e2b Mon Sep 17 00:00:00 2001 From: Aaron Jorbin Date: Thu, 26 Oct 2023 22:34:41 +0000 Subject: [PATCH 62/71] REST API: Move `rest_pre_serve_request` filter to after no cache headers are sent. [56834] adjusted the order of activity inside the rest server responses. This lead to the `rest_pre_serve_request` filter potentially blocking the sending of the no cache headers. This moves that action back to being after the sending of no cache headers has finished to restore the pre 6.3.2 order of these two actions. Props perrelet, SergeyBiryukov, peterwilsoncc. Fixes #59722. git-svn-id: https://develop.svn.wordpress.org/trunk@57012 602fd350-edb4-49c9-b593-d223f7449a82 --- .../rest-api/class-wp-rest-server.php | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/wp-includes/rest-api/class-wp-rest-server.php b/src/wp-includes/rest-api/class-wp-rest-server.php index fdc3034755981..4304881b16fef 100644 --- a/src/wp-includes/rest-api/class-wp-rest-server.php +++ b/src/wp-includes/rest-api/class-wp-rest-server.php @@ -466,22 +466,6 @@ public function serve_request( $path = null ) { $code = $result->get_status(); $this->set_status( $code ); - /** - * Filters whether the REST API request has already been served. - * - * Allow sending the request manually - by returning true, the API result - * will not be sent to the client. - * - * @since 4.4.0 - * - * @param bool $served Whether the request has already been served. - * Default false. - * @param WP_HTTP_Response $result Result to send to the client. Usually a `WP_REST_Response`. - * @param WP_REST_Request $request Request used to generate the response. - * @param WP_REST_Server $server Server instance. - */ - $served = apply_filters( 'rest_pre_serve_request', false, $result, $request, $this ); - /** * Filters whether to send nocache headers on a REST API request. * @@ -504,6 +488,22 @@ public function serve_request( $path = null ) { } } + /** + * Filters whether the REST API request has already been served. + * + * Allow sending the request manually - by returning true, the API result + * will not be sent to the client. + * + * @since 4.4.0 + * + * @param bool $served Whether the request has already been served. + * Default false. + * @param WP_HTTP_Response $result Result to send to the client. Usually a `WP_REST_Response`. + * @param WP_REST_Request $request Request used to generate the response. + * @param WP_REST_Server $server Server instance. + */ + $served = apply_filters( 'rest_pre_serve_request', false, $result, $request, $this ); + if ( ! $served ) { if ( 'HEAD' === $request->get_method() ) { return null; From fc3aae3a0816f20182204449a2c61127b12c7a70 Mon Sep 17 00:00:00 2001 From: Peter Wilson Date: Thu, 26 Oct 2023 22:54:15 +0000 Subject: [PATCH 63/71] Options, Meta APIs: Rename option cache priming functions. Rename the option cache priming functions to more closely follow the naming convention used by other cache priming functions. * `wp_load_options()` becomes `wp_prime_option_caches()` * `wp_load_options_by_group()` becomes `wp_prime_option_caches_by_group()` The unit test files and classes are renamed accordingly. Unlike the existing cache priming functions, these functions were introduced with the intention of being public so use the `wp_` prefix rather than the `_` prefix used by the functions initially introduced as private functions but since made public. Follow up to [56445],[56990]. Props flixos90, peterwilsoncc, joemcgill, SergeyBiryukov, desrosj. Fixes #58962. git-svn-id: https://develop.svn.wordpress.org/trunk@57013 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/option.php | 12 ++-- ...oadOptions.php => wpPrimeOptionCaches.php} | 56 +++++++++---------- ...oup.php => wpPrimeOptionCachesByGroup.php} | 32 +++++------ 3 files changed, 50 insertions(+), 50 deletions(-) rename tests/phpunit/tests/option/{wpLoadOptions.php => wpPrimeOptionCaches.php} (62%) rename tests/phpunit/tests/option/{wpLoadOptionsByGroup.php => wpPrimeOptionCachesByGroup.php} (62%) diff --git a/src/wp-includes/option.php b/src/wp-includes/option.php index 4e3886630d3a0..e58793117389d 100644 --- a/src/wp-includes/option.php +++ b/src/wp-includes/option.php @@ -248,7 +248,7 @@ function get_option( $option, $default_value = false ) { } /** - * Loads specific options into the cache with a single database query. + * Primes specific options into the cache with a single database query. * * Only options that do not already exist in cache will be loaded. * @@ -258,7 +258,7 @@ function get_option( $option, $default_value = false ) { * * @param array $options An array of option names to be loaded. */ -function wp_load_options( $options ) { +function wp_prime_option_caches( $options ) { $alloptions = wp_load_alloptions(); $cached_options = wp_cache_get_multiple( $options, 'options' ); @@ -321,7 +321,7 @@ function wp_load_options( $options ) { } /** - * Loads all options registered with a specific option group. + * Primes the cache of all options registered with a specific option group. * * @since 6.4.0 * @@ -329,11 +329,11 @@ function wp_load_options( $options ) { * * @param string $option_group The option group to load options for. */ -function wp_load_options_by_group( $option_group ) { +function wp_prime_option_caches_by_group( $option_group ) { global $new_allowed_options; if ( isset( $new_allowed_options[ $option_group ] ) ) { - wp_load_options( $new_allowed_options[ $option_group ] ); + wp_prime_option_caches( $new_allowed_options[ $option_group ] ); } } @@ -348,7 +348,7 @@ function wp_load_options_by_group( $option_group ) { * @return array An array of key-value pairs for the requested options. */ function get_options( $options ) { - wp_load_options( $options ); + wp_prime_option_caches( $options ); $result = array(); foreach ( $options as $option ) { diff --git a/tests/phpunit/tests/option/wpLoadOptions.php b/tests/phpunit/tests/option/wpPrimeOptionCaches.php similarity index 62% rename from tests/phpunit/tests/option/wpLoadOptions.php rename to tests/phpunit/tests/option/wpPrimeOptionCaches.php index bf6a8d58953fd..68b7d526b45d2 100644 --- a/tests/phpunit/tests/option/wpLoadOptions.php +++ b/tests/phpunit/tests/option/wpPrimeOptionCaches.php @@ -1,21 +1,21 @@ assertFalse( wp_cache_get( $option, 'options' ), "$option was not deleted from the cache." ); } - // Call the wp_load_options function to load the options. - wp_load_options( $options_to_load ); + // Call the wp_prime_option_caches function to prime the options. + wp_prime_option_caches( $options_to_prime ); // Store the initial database query count. $initial_query_count = get_num_queries(); // Check that options are only in the 'options' cache group. - foreach ( $options_to_load as $option ) { + foreach ( $options_to_prime as $option ) { $this->assertSame( wp_cache_get( $option, 'options' ), get_option( $option ), - "$option was not loaded to the 'options' cache group." + "$option was not primed in the 'options' cache group." ); $this->assertFalse( wp_cache_get( $option, 'notoptions' ), get_option( $option ), - "$option was loaded to the 'notoptions' cache group." + "$option was primed in the 'notoptions' cache group." ); } @@ -62,13 +62,13 @@ public function test_wp_load_options() { } /** - * Tests wp_load_options() with options that do not exist in the database. + * Tests wp_prime_option_caches() with options that do not exist in the database. * * @ticket 58962 */ - public function test_wp_load_options_with_nonexistent_options() { - // Create some options to load. - $options_to_load = array( + public function test_wp_prime_option_caches_with_nonexistent_options() { + // Create some options to prime. + $options_to_prime = array( 'option1', 'option2', ); @@ -78,50 +78,50 @@ public function test_wp_load_options_with_nonexistent_options() { * clear the cache for the options, * check options are not in cache initially. */ - foreach ( $options_to_load as $option ) { + foreach ( $options_to_prime as $option ) { $this->assertFalse( wp_cache_get( $option, 'options' ), "$option was not deleted from the cache." ); } - // Call the wp_load_options function to load the options. - wp_load_options( $options_to_load ); + // Call the wp_prime_option_caches function to prime the options. + wp_prime_option_caches( $options_to_prime ); // Check that options are not in the cache or database. - foreach ( $options_to_load as $option ) { + foreach ( $options_to_prime as $option ) { $this->assertFalse( wp_cache_get( $option, 'options' ), "$option was not deleted from the cache." ); } // Check that options are present in the notoptions cache. $new_notoptions = wp_cache_get( 'notoptions', 'options' ); $this->assertIsArray( $new_notoptions, 'The notoptions cache should be an array.' ); - foreach ( $options_to_load as $option ) { + foreach ( $options_to_prime as $option ) { $this->assertArrayHasKey( $option, $new_notoptions, "$option was not added to the notoptions cache." ); } } /** - * Tests wp_load_options() with an empty array. + * Tests wp_prime_option_caches() with an empty array. * * @ticket 58962 */ - public function test_wp_load_options_with_empty_array() { + public function test_wp_prime_option_caches_with_empty_array() { $alloptions = wp_load_alloptions(); $notoptions = wp_cache_get( 'notoptions', 'options' ); - wp_load_options( array() ); + wp_prime_option_caches( array() ); $this->assertSame( $alloptions, wp_cache_get( 'alloptions', 'options' ), 'The alloptions cache was modified.' ); $this->assertSame( $notoptions, wp_cache_get( 'notoptions', 'options' ), 'The notoptions cache was modified.' ); } /** - * Tests that wp_load_options handles an empty "notoptions" cache. + * Tests that wp_prime_option_caches() handles an empty "notoptions" cache. * * @ticket 58962 */ - public function test_wp_load_options_handles_empty_notoptions_cache() { + public function test_wp_prime_option_caches_handles_empty_notoptions_cache() { wp_cache_delete( 'notoptions', 'options' ); - wp_load_options( array( 'nonexistent_option' ) ); + wp_prime_option_caches( array( 'nonexistent_option' ) ); $notoptions = wp_cache_get( 'notoptions', 'options' ); $this->assertIsArray( $notoptions, 'The notoptions cache should be an array.' ); diff --git a/tests/phpunit/tests/option/wpLoadOptionsByGroup.php b/tests/phpunit/tests/option/wpPrimeOptionCachesByGroup.php similarity index 62% rename from tests/phpunit/tests/option/wpLoadOptionsByGroup.php rename to tests/phpunit/tests/option/wpPrimeOptionCachesByGroup.php index 482e20cc3b87c..dac621122d109 100644 --- a/tests/phpunit/tests/option/wpLoadOptionsByGroup.php +++ b/tests/phpunit/tests/option/wpPrimeOptionCachesByGroup.php @@ -1,22 +1,22 @@ array( 'option1', @@ -27,7 +27,7 @@ public function test_wp_load_options_by_group() { ), ); - $options_to_load = array( + $options_to_prime = array( 'option1', 'option2', 'option3', @@ -38,35 +38,35 @@ public function test_wp_load_options_by_group() { * clear the cache for the options, * check options are not in cache initially. */ - foreach ( $options_to_load as $option ) { + foreach ( $options_to_prime as $option ) { update_option( $option, "value_$option", false ); wp_cache_delete( $option, 'options' ); $this->assertFalse( wp_cache_get( $option, 'options' ), "$option was not deleted from the cache." ); } - // Call the wp_load_options_by_group function to load the options. - wp_load_options_by_group( 'group1' ); + // Call the wp_prime_option_caches_by_group function to prime the options. + wp_prime_option_caches_by_group( 'group1' ); // Check that options are now in the cache. - $this->assertSame( get_option( 'option1' ), wp_cache_get( 'option1', 'options' ), 'option1 was not loaded.' ); - $this->assertSame( get_option( 'option2' ), wp_cache_get( 'option2', 'options' ), 'option2 was not loaded.' ); + $this->assertSame( get_option( 'option1' ), wp_cache_get( 'option1', 'options' ), 'option1\'s cache was not primed.' ); + $this->assertSame( get_option( 'option2' ), wp_cache_get( 'option2', 'options' ), 'option2\'s cache was not primed.' ); // Make sure option3 is still not in cache. $this->assertFalse( wp_cache_get( 'option3', 'options' ), 'option3 was not deleted from the cache.' ); } /** - * Tests wp_load_options_by_group() with a nonexistent option group. + * Tests wp_prime_option_caches_by_group() with a nonexistent option group. * * @ticket 58962 */ - public function test_wp_load_options_by_group_with_nonexistent_group() { + public function test_wp_prime_option_caches_by_group_with_nonexistent_group() { // Make sure options are not in cache or database initially. $this->assertFalse( wp_cache_get( 'option1', 'options' ), 'option1 was not deleted from the cache.' ); $this->assertFalse( wp_cache_get( 'option2', 'options' ), 'option2 was not deleted from the cache.' ); - // Call the wp_load_options_by_group function with a nonexistent group. - wp_load_options_by_group( 'nonexistent_group' ); + // Call the wp_prime_option_caches_by_group function with a nonexistent group. + wp_prime_option_caches_by_group( 'nonexistent_group' ); // Check that options are still not in the cache or database. $this->assertFalse( wp_cache_get( 'option1', 'options' ), 'option1 was not deleted from the cache.' ); From dea705e71f978bb93295a468a5dd96844da5e292 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 27 Oct 2023 08:27:33 +0000 Subject: [PATCH 64/71] Coding Standards: Remove a redundant section in the `phpcs.xml.dist` ruleset. The affected lines already have ignore annotations in the `wp-includes/class-wp-block-parser-block.php` file itself. Follow-up to [56048], [56738], [56743], [56751], [56752], [56753]. Props jrf, SergeyBiryukov. See #59161. git-svn-id: https://develop.svn.wordpress.org/trunk@57017 602fd350-edb4-49c9-b593-d223f7449a82 --- phpcs.xml.dist | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/phpcs.xml.dist b/phpcs.xml.dist index ab8124af292dc..3defbc290a6b2 100644 --- a/phpcs.xml.dist +++ b/phpcs.xml.dist @@ -338,16 +338,4 @@ /tests/* - - - /src/wp-includes/class-wp-block-parser\.php - /src/wp-includes/class-wp-block-parser-block\.php - - - /src/wp-includes/class-wp-block-parser-block\.php - - - /src/wp-includes/class-wp-block-parser-block\.php - - From f6befb782e385b13b51aca65e087da6743e0431f Mon Sep 17 00:00:00 2001 From: Aaron Jorbin Date: Fri, 27 Oct 2023 17:01:50 +0000 Subject: [PATCH 65/71] Help/About: Improve Accessibility, RTL, Internationalization, and Responsiveness of about pages. Tweaks the 6.4 about pages in a couple of ways: - Decouples the background from the 6.4 logo so the logo can move for RTL. - Updates a color to improve color contrast. - Help prevent overlap of long text strings with 6.4 logo. - Ensure background isn't dark when no background is used on mobile. Props nudge, jorbin, afercia, sumitsingh, sabernhardt. See #59289, #59664. git-svn-id: https://develop.svn.wordpress.org/trunk@57018 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/css/about.css | 31 ++++++++++--------- src/wp-admin/freedoms.php | 2 +- src/wp-admin/images/about-header-about.svg | 29 ++++++----------- .../images/about-header-background.svg | 11 +++++++ .../images/about-header-contribute.svg | 29 ++++++----------- src/wp-admin/images/about-header-credits.svg | 29 ++++++----------- src/wp-admin/images/about-header-freedoms.svg | 29 ++++++----------- src/wp-admin/images/about-header-privacy.svg | 29 ++++++----------- 8 files changed, 78 insertions(+), 111 deletions(-) create mode 100644 src/wp-admin/images/about-header-background.svg diff --git a/src/wp-admin/css/about.css b/src/wp-admin/css/about.css index f3f49234bec1f..ff140ac50ee89 100644 --- a/src/wp-admin/css/about.css +++ b/src/wp-admin/css/about.css @@ -21,7 +21,7 @@ .about__container { /* Section backgrounds */ - --background: #151515; + --background: #EAE9E7; --subtle-background: #EAE9E7; /* Main text color */ @@ -29,7 +29,7 @@ --text-light: #fff; /* Accent colors: used in header, on special classes. */ - --accent-1: #D8613C; /* Link color */ + --accent-1: #C94C26; /* Link color */ --accent-2: #CFCABE; /* Accent background */ --accent-3: #f0f0f1; /* hr background */ --accent-4: #B1C5A4; /* Light green */ @@ -538,28 +538,30 @@ justify-content: end; box-sizing: border-box; padding: var(--gap) 0; - min-height: 420px; + height: clamp(12.5rem, -1.25rem + 36.67vw, 26.25rem); color: var(--text-light); - background: var(--background) url('../images/about-header-about.svg?ver=6.4') no-repeat; - background-size: cover; - background-position: center; + background-image: url('../images/about-header-about.svg?ver=6.4'), url('../images/about-header-background.svg?ver=6.4'); + background-size: auto 70%, cover; border-radius: 5px; + background-repeat: no-repeat; + background-position: right 7% center, top left; + background-color: var(--background); } .credits-php .about__header { - background-image: url('../images/about-header-credits.svg?ver=6.4'); + background-image: url('../images/about-header-credits.svg?ver=6.4'), url('../images/about-header-background.svg?ver=6.4'); } .freedoms-php .about__header { - background-image: url('../images/about-header-freedoms.svg?ver=6.4'); + background-image: url('../images/about-header-freedoms.svg?ver=6.4'), url('../images/about-header-background.svg?ver=6.4'); } .privacy-php .about__header { - background-image: url('../images/about-header-privacy.svg?ver=6.4'); + background-image: url('../images/about-header-privacy.svg?ver=6.4'), url('../images/about-header-background.svg?ver=6.4'); } .contribute-php .about__header { - background-image: url('../images/about-header-contribute.svg?ver=6.4'); + background-image: url('../images/about-header-contribute.svg?ver=6.4'), url('../images/about-header-background.svg?ver=6.4'); } .about__header-image { @@ -568,8 +570,9 @@ .about__header-title { box-sizing: border-box; - margin: 0 calc(var(--gap) + 3rem); + margin: 0 calc(var(--gap) + 2rem); padding: 0; + max-width: 55%; } .about__header-title h1 { @@ -581,6 +584,7 @@ font-weight: 600; } +.about-php .about__header-title h1, .credits-php .about__header-title h1, .freedoms-php .about__header-title h1, .privacy-php .about__header-title h1, @@ -645,11 +649,8 @@ } @media screen and (max-width: 960px) { - .about__header-title h1 { - /* Fluid font size scales on browser size 600px - 960px. */ - font-size: clamp(3rem, 13.33vw - 2rem, 6rem); - } + .about-php .about__header-title h1, .credits-php .about__header-title h1, .freedoms-php .about__header-title h1, .privacy-php .about__header-title h1, diff --git a/src/wp-admin/freedoms.php b/src/wp-admin/freedoms.php index bbe4fb60ad9d0..b227735ebff61 100644 --- a/src/wp-admin/freedoms.php +++ b/src/wp-admin/freedoms.php @@ -25,7 +25,7 @@
-
+

diff --git a/src/wp-admin/images/about-header-about.svg b/src/wp-admin/images/about-header-about.svg index 65a10188ba1c8..0da51e0c44115 100644 --- a/src/wp-admin/images/about-header-about.svg +++ b/src/wp-admin/images/about-header-about.svg @@ -1,20 +1,11 @@ - - - - - - - - - - - - - - - - - - - + + + + + + + + + + diff --git a/src/wp-admin/images/about-header-background.svg b/src/wp-admin/images/about-header-background.svg new file mode 100644 index 0000000000000..016948c2f2b9f --- /dev/null +++ b/src/wp-admin/images/about-header-background.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/src/wp-admin/images/about-header-contribute.svg b/src/wp-admin/images/about-header-contribute.svg index d83960982e561..6750365682efe 100644 --- a/src/wp-admin/images/about-header-contribute.svg +++ b/src/wp-admin/images/about-header-contribute.svg @@ -1,20 +1,11 @@ - - - - - - - - - - - - - - - - - - - + + + + + + + + + + diff --git a/src/wp-admin/images/about-header-credits.svg b/src/wp-admin/images/about-header-credits.svg index 41aff1704455d..fa910d7d28bf0 100644 --- a/src/wp-admin/images/about-header-credits.svg +++ b/src/wp-admin/images/about-header-credits.svg @@ -1,20 +1,11 @@ - - - - - - - - - - - - - - - - - - - + + + + + + + + + + diff --git a/src/wp-admin/images/about-header-freedoms.svg b/src/wp-admin/images/about-header-freedoms.svg index a2be2302653a3..14172b2ef1e81 100644 --- a/src/wp-admin/images/about-header-freedoms.svg +++ b/src/wp-admin/images/about-header-freedoms.svg @@ -1,20 +1,11 @@ - - - - - - - - - - - - - - - - - - - + + + + + + + + + + diff --git a/src/wp-admin/images/about-header-privacy.svg b/src/wp-admin/images/about-header-privacy.svg index a83807797c7fc..979428d3d40bb 100644 --- a/src/wp-admin/images/about-header-privacy.svg +++ b/src/wp-admin/images/about-header-privacy.svg @@ -1,20 +1,11 @@ - - - - - - - - - - - - - - - - - - - + + + + + + + + + + From 22e32d8993f7584c4be8bb56e5d064579799a62d Mon Sep 17 00:00:00 2001 From: Felix Arntz Date: Fri, 27 Oct 2023 18:16:05 +0000 Subject: [PATCH 66/71] Themes: Skip wrapping block template for singular content with a main query loop when the template was injected from outside the current theme. As a follow up to [56507], this fixes a bug that could occur for instance when plugins hijack the block template detection process to inject their own block template with entirely custom logic. Props afragen, hellofromTonya, costdev, mukesh27, huzaifaalmesbah, flixos90. Fixes #59736. See #58154. git-svn-id: https://develop.svn.wordpress.org/trunk@57019 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/block-template.php | 15 +++++++-- tests/phpunit/tests/block-template.php | 43 +++++++++++++++++++++++--- tests/phpunit/tests/media.php | 15 +++++++-- 3 files changed, 64 insertions(+), 9 deletions(-) diff --git a/src/wp-includes/block-template.php b/src/wp-includes/block-template.php index ffed0e04364c0..7030e2e2a19f5 100644 --- a/src/wp-includes/block-template.php +++ b/src/wp-includes/block-template.php @@ -208,6 +208,7 @@ function _block_template_render_title_tag() { * @access private * @since 5.8.0 * + * @global string $_wp_current_template_id * @global string $_wp_current_template_content * @global WP_Embed $wp_embed * @global WP_Query $wp_query @@ -215,7 +216,7 @@ function _block_template_render_title_tag() { * @return string Block template markup. */ function get_the_block_template_html() { - global $_wp_current_template_content, $wp_embed, $wp_query; + global $_wp_current_template_id, $_wp_current_template_content, $wp_embed, $wp_query; if ( ! $_wp_current_template_content ) { if ( is_user_logged_in() ) { @@ -242,8 +243,18 @@ function get_the_block_template_html() { * Even if the block template contained a `core/query` and `core/post-template` block referencing the main query * loop, it would not cause errors since it would use a cloned instance and go through the same loop of a single * post, within the actual main query loop. + * + * This special logic should be skipped if the current template does not come from the current theme, in which case + * it has been injected by a plugin by hijacking the block template loader mechanism. In that case, entirely custom + * logic may be applied which is unpredictable and therefore safer to omit this special handling on. */ - if ( is_singular() && 1 === $wp_query->post_count && have_posts() ) { + if ( + $_wp_current_template_id && + str_starts_with( $_wp_current_template_id, get_stylesheet() . '//' ) && + is_singular() && + 1 === $wp_query->post_count && + have_posts() + ) { while ( have_posts() ) { the_post(); $content = do_blocks( $content ); diff --git a/tests/phpunit/tests/block-template.php b/tests/phpunit/tests/block-template.php index d7ffad7f90305..8e86254f29c2f 100644 --- a/tests/phpunit/tests/block-template.php +++ b/tests/phpunit/tests/block-template.php @@ -19,8 +19,8 @@ public function set_up() { } public function tear_down() { - global $_wp_current_template_content; - unset( $_wp_current_template_content ); + global $_wp_current_template_id, $_wp_current_template_content; + unset( $_wp_current_template_id, $_wp_current_template_content ); parent::tear_down(); } @@ -193,10 +193,11 @@ public function test_template_remains_unchanged_if_templates_array_is_empty() { * since there is only a single post in the main query loop in such cases anyway. * * @ticket 58154 + * @ticket 59736 * @covers ::get_the_block_template_html */ public function test_get_the_block_template_html_enforces_singular_query_loop() { - global $_wp_current_template_content, $wp_query, $wp_the_query; + global $_wp_current_template_id, $_wp_current_template_content, $wp_query, $wp_the_query; // Register test block to log `in_the_loop()` results. $in_the_loop_logs = array(); @@ -207,6 +208,8 @@ public function test_get_the_block_template_html_enforces_singular_query_loop() $wp_query = new WP_Query( array( 'p' => $post_id ) ); $wp_the_query = $wp_query; + // Force a template ID that is for the current stylesheet. + $_wp_current_template_id = get_stylesheet() . '//single'; // Use block template that just renders post title and the above test block. $_wp_current_template_content = ''; @@ -227,7 +230,7 @@ public function test_get_the_block_template_html_enforces_singular_query_loop() * @covers ::get_the_block_template_html */ public function test_get_the_block_template_html_does_not_generally_enforce_loop() { - global $_wp_current_template_content, $wp_query, $wp_the_query; + global $_wp_current_template_id, $_wp_current_template_content, $wp_query, $wp_the_query; // Register test block to log `in_the_loop()` results. $in_the_loop_logs = array(); @@ -248,6 +251,9 @@ public function test_get_the_block_template_html_does_not_generally_enforce_loop ); $wp_the_query = $wp_query; + // Force a template ID that is for the current stylesheet. + $_wp_current_template_id = get_stylesheet() . '//home'; + /* * Use block template that renders the above test block, followed by a main query loop. * `get_the_block_template_html()` should not start the loop, but the `core/query` and `core/post-template` @@ -276,6 +282,35 @@ public function test_get_the_block_template_html_does_not_generally_enforce_loop $this->assertSame( array( false, true ), $in_the_loop_logs, 'Main query loop was triggered incorrectly' ); } + /** + * Tests that `get_the_block_template_html()` does not start the main query loop when on a template that is not from the current theme. + * + * @ticket 58154 + * @ticket 59736 + * @covers ::get_the_block_template_html + */ + public function test_get_the_block_template_html_skips_singular_query_loop_when_non_theme_template() { + global $_wp_current_template_id, $_wp_current_template_content, $wp_query, $wp_the_query; + + // Register test block to log `in_the_loop()` results. + $in_the_loop_logs = array(); + $this->register_in_the_loop_logger_block( $in_the_loop_logs ); + + // Set main query to single post. + $post_id = self::factory()->post->create( array( 'post_title' => 'A single post' ) ); + $wp_query = new WP_Query( array( 'p' => $post_id ) ); + $wp_the_query = $wp_query; + + // Force a template ID that is not for the current stylesheet. + $_wp_current_template_id = 'some-plugin-slug//single'; + // Use block template that just renders post title and the above test block. + $_wp_current_template_content = ''; + + $output = get_the_block_template_html(); + $this->unregister_in_the_loop_logger_block(); + $this->assertSame( array( false ), $in_the_loop_logs, 'Main query loop was triggered despite a custom block template outside the current theme being used' ); + } + /** * @ticket 58319 * diff --git a/tests/phpunit/tests/media.php b/tests/phpunit/tests/media.php index 3b8615dd82bfe..8d91517b1fcd6 100644 --- a/tests/phpunit/tests/media.php +++ b/tests/phpunit/tests/media.php @@ -79,6 +79,9 @@ public static function tear_down_after_class() { * Ensures that the static content media count, fetchpriority element flag and related filter are reset between tests. */ public function tear_down() { + global $_wp_current_template_id, $_wp_current_template_content; + unset( $_wp_current_template_id, $_wp_current_template_content ); + parent::tear_down(); $this->reset_content_media_count(); @@ -3972,7 +3975,7 @@ public function data_wp_get_loading_attr_default_before_and_no_loop() { * @covers ::wp_get_loading_optimization_attributes */ public function test_wp_filter_content_tags_does_not_lazy_load_first_image_in_block_theme() { - global $_wp_current_template_content, $wp_query, $wp_the_query, $post; + global $_wp_current_template_id, $_wp_current_template_content, $wp_query, $wp_the_query, $post; // Do not add srcset, sizes, or decoding attributes as they are irrelevant for this test. add_filter( 'wp_img_tag_add_srcset_and_sizes_attr', '__return_false' ); @@ -4001,6 +4004,8 @@ public function test_wp_filter_content_tags_does_not_lazy_load_first_image_in_bl $wp_the_query = $wp_query; $post = get_post( self::$post_ids['publish'] ); + // Force a template ID that is for the current stylesheet. + $_wp_current_template_id = get_stylesheet() . '//single'; $_wp_current_template_content = ''; $html = get_the_block_template_html(); @@ -4020,7 +4025,7 @@ public function test_wp_filter_content_tags_does_not_lazy_load_first_image_in_bl * @covers ::wp_get_loading_optimization_attributes */ public function test_wp_filter_content_tags_does_not_lazy_load_first_featured_image_in_block_theme() { - global $_wp_current_template_content, $wp_query, $wp_the_query, $post; + global $_wp_current_template_id, $_wp_current_template_content, $wp_query, $wp_the_query, $post; // Do not add srcset, sizes, or decoding attributes as they are irrelevant for this test. add_filter( 'wp_img_tag_add_srcset_and_sizes_attr', '__return_false' ); @@ -4069,6 +4074,8 @@ static function ( $attr ) { $wp_the_query = $wp_query; $post = get_post( self::$post_ids['publish'] ); + // Force a template ID that is for the current stylesheet. + $_wp_current_template_id = get_stylesheet() . '//single'; $_wp_current_template_content = ' '; $html = get_the_block_template_html(); @@ -4087,7 +4094,7 @@ static function ( $attr ) { * @covers ::wp_get_loading_optimization_attributes */ public function test_wp_filter_content_tags_does_not_lazy_load_images_in_header() { - global $_wp_current_template_content; + global $_wp_current_template_id, $_wp_current_template_content; // Do not add srcset, sizes, or decoding attributes as they are irrelevant for this test. add_filter( 'wp_img_tag_add_srcset_and_sizes_attr', '__return_false' ); @@ -4122,6 +4129,8 @@ public function test_wp_filter_content_tags_does_not_lazy_load_images_in_header( wp_set_post_terms( $footer_post_id, WP_TEMPLATE_PART_AREA_FOOTER, 'wp_template_part_area' ); wp_set_post_terms( $footer_post_id, get_stylesheet(), 'wp_theme' ); + // Force a template ID that is for the current stylesheet. + $_wp_current_template_id = get_stylesheet() . '//single'; $_wp_current_template_content = ''; // Header image should not be lazy-loaded, footer image should be lazy-loaded. From ea30b5d8eb25e036baf021f406935a4907614abf Mon Sep 17 00:00:00 2001 From: Joe McGill Date: Fri, 27 Oct 2023 19:02:54 +0000 Subject: [PATCH 67/71] Upgrade/Install: Skip registering theme block patterns during the upgrade process. This fixes a bug during the database upgrade process where a theme's `functions.php` file may not be loaded, leading to potential exceptions if the theme's pattern files use symbols (classes, functions, constants, etc.) that are declared only when the `functions.php` file is loaded. To do so, a check for `wp_get_active_and_valid_themes()` is added early to `_register_theme_block_patterns()`, which returns early if no active or valid themes are returned. Props fabiankaegy, rajinsharwar, pbiron, huzaifaalmesbah, hellofromTonya, peterwilsoncc, joemcgill. Fixes #59723. git-svn-id: https://develop.svn.wordpress.org/trunk@57021 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/block-patterns.php | 11 ++++ .../tests/blocks/wpBlockPatternsRegistry.php | 64 +++++++++++++++++++ 2 files changed, 75 insertions(+) diff --git a/src/wp-includes/block-patterns.php b/src/wp-includes/block-patterns.php index 7f20d9a894029..b74f75611fb2a 100644 --- a/src/wp-includes/block-patterns.php +++ b/src/wp-includes/block-patterns.php @@ -328,6 +328,17 @@ function _register_remote_theme_patterns() { * @access private */ function _register_theme_block_patterns() { + + /* + * During the bootstrap process, a check for active and valid themes is run. + * If no themes are returned, the theme's functions.php file will not be loaded, + * which can lead to errors if patterns expect some variables or constants to + * already be set at this point, so bail early if that is the case. + */ + if ( empty( wp_get_active_and_valid_themes() ) ) { + return; + } + /* * Register patterns for the active theme. If the theme is a child theme, * let it override any patterns from the parent theme that shares the same slug. diff --git a/tests/phpunit/tests/blocks/wpBlockPatternsRegistry.php b/tests/phpunit/tests/blocks/wpBlockPatternsRegistry.php index 61298d1b164af..01050a2c5f2ad 100644 --- a/tests/phpunit/tests/blocks/wpBlockPatternsRegistry.php +++ b/tests/phpunit/tests/blocks/wpBlockPatternsRegistry.php @@ -482,4 +482,68 @@ public function test_is_registered_for_known_pattern() { $result = $this->registry->is_registered( 'test/one' ); $this->assertTrue( $result ); } + + /** + * Ensures theme patterns are registered on init. + * + * @ticket 59723 + * + * @covers ::_register_theme_block_patterns + */ + public function test_register_theme_block_patterns_on_init() { + // This test needs to use access static class properties. + $registry = WP_Block_Patterns_Registry::get_instance(); + + // Ensure we're using a theme with patterns. + switch_theme( 'twentytwentythree' ); + + $theme = wp_get_theme(); + $theme_patterns = array_values( wp_list_pluck( $theme->get_block_patterns(), 'slug' ) ); + + // This helper is fired on the init hook. + _register_theme_block_patterns(); + + $registered = wp_list_pluck( $registry->get_all_registered(), 'name' ); + + // Cleanup patterns registry. + foreach ( $theme_patterns as $pattern ) { + $registry->unregister( $pattern ); + } + + $this->assertSameSets( $theme_patterns, array_intersect( $theme_patterns, $registered ), 'Could not confirm theme patterns were registered.' ); + } + + /** + * Ensures theme patterns are not registered when no themes are active and valid. + * + * @ticket 59723 + * + * @covers ::_register_theme_block_patterns + */ + public function test_register_theme_block_patterns_on_init_skipped_during_install() { + // This test needs to use access static class properties. + $registry = WP_Block_Patterns_Registry::get_instance(); + + // Ensure we're using a theme with patterns. + switch_theme( 'twentytwentythree' ); + + $theme = wp_get_theme(); + $theme_patterns = array_values( wp_list_pluck( $theme->get_block_patterns(), 'slug' ) ); + + /* + * This will short-circuit theme activation. + * @see wp_get_active_and_valid_themes(). + */ + wp_installing( true ); + + // This helper is fired on the init hook. + _register_theme_block_patterns(); + + $registered = wp_list_pluck( $registry->get_all_registered(), 'name' ); + + // Cleanup. + wp_installing( false ); + + $this->assertEmpty( array_intersect( $theme_patterns, $registered ), 'Theme patterns were were incorrectly registered.' ); + } } From d571da5db51ccf31df92a2ff56bd13a4025401d2 Mon Sep 17 00:00:00 2001 From: Joe Dolson Date: Fri, 27 Oct 2023 19:23:07 +0000 Subject: [PATCH 68/71] Plugins: Prevent `ajaxComplete` listener from observing all events. Add a conditional to prevent the `prefers-reduced-motion` `ajaxComplete` listener from observing events not occurring in the plugin installation screen. Improve handling of settings data test. The listener observing `ajaxComplete` in [56541] was intercepting all `ajaxComplete` events, creating potential for unexpected errors in unrelated functions. Props bplv, afercia, rudlinkon, hellofromTonya, huzaifaalmesbah, joedolson, jorbin. Fixes #59689. git-svn-id: https://develop.svn.wordpress.org/trunk@57022 602fd350-edb4-49c9-b593-d223f7449a82 --- src/js/_enqueues/admin/common.js | 40 ++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/src/js/_enqueues/admin/common.js b/src/js/_enqueues/admin/common.js index e3daa8c4d1c6f..3de9447879f5e 100644 --- a/src/js/_enqueues/admin/common.js +++ b/src/js/_enqueues/admin/common.js @@ -2129,8 +2129,8 @@ $( function( $ ) { /** * Freeze animated plugin icons when reduced motion is enabled. * - * When the user has enabled the 'prefers-reduced-motion' setting, this module - * stops animations for all GIFs on the page with the class 'plugin-icon' or + * When the user has enabled the 'prefers-reduced-motion' setting, this module + * stops animations for all GIFs on the page with the class 'plugin-icon' or * plugin icon images in the update plugins table. * * @since 6.4.0 @@ -2156,7 +2156,7 @@ $( function( $ ) { var width = img.width; var height = img.height; var canvas = document.createElement( 'canvas' ); - + // Set canvas dimensions. canvas.width = width; canvas.height = height; @@ -2219,23 +2219,27 @@ $( function( $ ) { // Listen for jQuery AJAX events. ( function( $ ) { - $( document ).ajaxComplete( function( event, xhr, settings ) { - // Check if this is the 'search-install-plugins' request. - if ( settings.data && settings.data.includes( 'action=search-install-plugins' ) ) { - // Recheck if the user prefers reduced motion. - if ( window.matchMedia ) { - var mediaQuery = window.matchMedia( '(prefers-reduced-motion: reduce)' ); - if ( mediaQuery.matches ) { - pub.freezeAll(); - } - } else { - // Fallback for browsers that don't support matchMedia. - if ( true === priv.pauseAll ) { - pub.freezeAll(); + if ( window.pagenow === 'plugin-install' ) { + // Only listen for ajaxComplete if this is the plugin-install.php page. + $( document ).ajaxComplete( function( event, xhr, settings ) { + + // Check if this is the 'search-install-plugins' request. + if ( settings.data && typeof settings.data === 'string' && settings.data.includes( 'action=search-install-plugins' ) ) { + // Recheck if the user prefers reduced motion. + if ( window.matchMedia ) { + var mediaQuery = window.matchMedia( '(prefers-reduced-motion: reduce)' ); + if ( mediaQuery.matches ) { + pub.freezeAll(); + } + } else { + // Fallback for browsers that don't support matchMedia. + if ( true === priv.pauseAll ) { + pub.freezeAll(); + } } } - } - } ); + } ); + } } )( jQuery ); // Expose public methods. From cc2133fc3448de9bc050c0a7484f9a08c206847c Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sat, 28 Oct 2023 01:00:14 +0000 Subject: [PATCH 69/71] Blocks: Parse the arguments earlier in `register_block_type_from_metadata()`. This makes it possible to register a block by passing an array of arguments, without the presence of a `block.json` file. Follow-up to [48141], [49948]. Props aristath, spacedmonkey, mukesh27, costdev, audrasjb, oglekler, felipeelia, hellofromTonya. Fixes #56865. git-svn-id: https://develop.svn.wordpress.org/trunk@57026 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/blocks.php | 90 +++++++++--------- tests/phpunit/tests/blocks/register.php | 120 ++++++++++++++++++++++++ 2 files changed, 168 insertions(+), 42 deletions(-) diff --git a/src/wp-includes/blocks.php b/src/wp-includes/blocks.php index 01cc2070ac779..ce5853d32d0fb 100644 --- a/src/wp-includes/blocks.php +++ b/src/wp-includes/blocks.php @@ -352,13 +352,14 @@ function register_block_type_from_metadata( $file_or_folder, $args = array() ) { $file_or_folder; $is_core_block = str_starts_with( $file_or_folder, ABSPATH . WPINC ); - - if ( ! $is_core_block && ! file_exists( $metadata_file ) ) { + // If the block is not a core block, the metadata file must exist. + $metadata_file_exists = $is_core_block || file_exists( $metadata_file ); + if ( ! $metadata_file_exists && empty( $args['name'] ) ) { return false; } // Try to get metadata from the static cache for core blocks. - $metadata = false; + $metadata = array(); if ( $is_core_block ) { $core_block_name = str_replace( ABSPATH . WPINC . '/blocks/', '', $file_or_folder ); if ( ! empty( $core_blocks_meta[ $core_block_name ] ) ) { @@ -367,14 +368,15 @@ function register_block_type_from_metadata( $file_or_folder, $args = array() ) { } // If metadata is not found in the static cache, read it from the file. - if ( ! $metadata ) { + if ( $metadata_file_exists && empty( $metadata ) ) { $metadata = wp_json_file_decode( $metadata_file, array( 'associative' => true ) ); } - if ( ! is_array( $metadata ) || empty( $metadata['name'] ) ) { + if ( ! is_array( $metadata ) || ( empty( $metadata['name'] ) && empty( $args['name'] ) ) ) { return false; } - $metadata['file'] = wp_normalize_path( realpath( $metadata_file ) ); + + $metadata['file'] = $metadata_file_exists ? wp_normalize_path( realpath( $metadata_file ) ) : null; /** * Filters the metadata provided for registering a block type. @@ -404,6 +406,7 @@ function register_block_type_from_metadata( $file_or_folder, $args = array() ) { $settings = array(); $property_mappings = array( 'apiVersion' => 'api_version', + 'name' => 'name', 'title' => 'title', 'category' => 'category', 'parent' => 'parent', @@ -426,18 +429,50 @@ function register_block_type_from_metadata( $file_or_folder, $args = array() ) { foreach ( $property_mappings as $key => $mapped_key ) { if ( isset( $metadata[ $key ] ) ) { $settings[ $mapped_key ] = $metadata[ $key ]; - if ( $textdomain && isset( $i18n_schema->$key ) ) { + if ( $metadata_file_exists && $textdomain && isset( $i18n_schema->$key ) ) { $settings[ $mapped_key ] = translate_settings_using_i18n_schema( $i18n_schema->$key, $settings[ $key ], $textdomain ); } } } + if ( ! empty( $metadata['render'] ) ) { + $template_path = wp_normalize_path( + realpath( + dirname( $metadata['file'] ) . '/' . + remove_block_asset_path_prefix( $metadata['render'] ) + ) + ); + if ( $template_path ) { + /** + * Renders the block on the server. + * + * @since 6.1.0 + * + * @param array $attributes Block attributes. + * @param string $content Block default content. + * @param WP_Block $block Block instance. + * + * @return string Returns the block content. + */ + $settings['render_callback'] = static function ( $attributes, $content, $block ) use ( $template_path ) { + ob_start(); + require $template_path; + return ob_get_clean(); + }; + } + } + + $settings = array_merge( $settings, $args ); + $script_fields = array( 'editorScript' => 'editor_script_handles', 'script' => 'script_handles', 'viewScript' => 'view_script_handles', ); foreach ( $script_fields as $metadata_field_name => $settings_field_name ) { + if ( ! empty( $settings[ $metadata_field_name ] ) ) { + $metadata[ $metadata_field_name ] = $settings[ $metadata_field_name ]; + } if ( ! empty( $metadata[ $metadata_field_name ] ) ) { $scripts = $metadata[ $metadata_field_name ]; $processed_scripts = array(); @@ -470,6 +505,9 @@ function register_block_type_from_metadata( $file_or_folder, $args = array() ) { 'style' => 'style_handles', ); foreach ( $style_fields as $metadata_field_name => $settings_field_name ) { + if ( ! empty( $settings[ $metadata_field_name ] ) ) { + $metadata[ $metadata_field_name ] = $settings[ $metadata_field_name ]; + } if ( ! empty( $metadata[ $metadata_field_name ] ) ) { $styles = $metadata[ $metadata_field_name ]; $processed_styles = array(); @@ -530,33 +568,6 @@ function register_block_type_from_metadata( $file_or_folder, $args = array() ) { } } - if ( ! empty( $metadata['render'] ) ) { - $template_path = wp_normalize_path( - realpath( - dirname( $metadata['file'] ) . '/' . - remove_block_asset_path_prefix( $metadata['render'] ) - ) - ); - if ( $template_path ) { - /** - * Renders the block on the server. - * - * @since 6.1.0 - * - * @param array $attributes Block attributes. - * @param string $content Block default content. - * @param WP_Block $block Block instance. - * - * @return string Returns the block content. - */ - $settings['render_callback'] = static function ( $attributes, $content, $block ) use ( $template_path ) { - ob_start(); - require $template_path; - return ob_get_clean(); - }; - } - } - /** * Filters the settings determined from the block type metadata. * @@ -565,14 +576,9 @@ function register_block_type_from_metadata( $file_or_folder, $args = array() ) { * @param array $settings Array of determined settings for registering a block type. * @param array $metadata Metadata provided for registering a block type. */ - $settings = apply_filters( - 'block_type_metadata_settings', - array_merge( - $settings, - $args - ), - $metadata - ); + $settings = apply_filters( 'block_type_metadata_settings', $settings, $metadata ); + + $metadata['name'] = ! empty( $settings['name'] ) ? $settings['name'] : $metadata['name']; return WP_Block_Type_Registry::get_instance()->register( $metadata['name'], diff --git a/tests/phpunit/tests/blocks/register.php b/tests/phpunit/tests/blocks/register.php index 3e55206037e40..525d7498ae300 100644 --- a/tests/phpunit/tests/blocks/register.php +++ b/tests/phpunit/tests/blocks/register.php @@ -599,6 +599,126 @@ public function test_metadata_not_found_in_the_current_directory() { $this->assertFalse( $result ); } + /** + * Tests registering a block using arguments instead of a block.json file. + * + * @ticket 56865 + * + * @covers ::register_block_type_from_metadata + */ + public function test_register_block_type_from_metadata_with_arguments() { + $result = register_block_type_from_metadata( + '', + array( + 'api_version' => 2, + 'name' => 'tests/notice-from-array', + 'title' => 'Notice from array', + 'category' => 'common', + 'icon' => 'star', + 'description' => 'Shows warning, error or success notices… (registered from an array)', + 'keywords' => array( + 'alert', + 'message', + ), + 'textdomain' => 'notice-from-array', + ) + ); + + $this->assertInstanceOf( 'WP_Block_Type', $result, 'The block was not registered' ); + $this->assertSame( 2, $result->api_version, 'The API version is incorrect' ); + $this->assertSame( 'tests/notice-from-array', $result->name, 'The block name is incorrect' ); + $this->assertSame( 'Notice from array', $result->title, 'The block title is incorrect' ); + $this->assertSame( 'common', $result->category, 'The block category is incorrect' ); + $this->assertSame( 'star', $result->icon, 'The block icon is incorrect' ); + $this->assertSame( + 'Shows warning, error or success notices… (registered from an array)', + $result->description, + 'The block description is incorrect' + ); + $this->assertSameSets( array( 'alert', 'message' ), $result->keywords, 'The block keywords are incorrect' ); + } + + /** + * Tests that defined $args can properly override the block.json file. + * + * @ticket 56865 + * + * @covers ::register_block_type_from_metadata + */ + public function test_block_registers_with_args_override() { + $result = register_block_type_from_metadata( + DIR_TESTDATA . '/blocks/notice', + array( + 'name' => 'tests/notice-with-overrides', + 'title' => 'Overriden title', + 'style' => array( 'tests-notice-style-overridden' ), + ) + ); + + $this->assertInstanceOf( 'WP_Block_Type', $result, 'The block was not registered' ); + $this->assertSame( 2, $result->api_version, 'The API version is incorrect' ); + $this->assertSame( 'tests/notice-with-overrides', $result->name, 'The block name was not overridden' ); + $this->assertSame( 'Overriden title', $result->title, 'The block title was not overridden' ); + $this->assertSameSets( + array( 'tests-notice-editor-script' ), + $result->editor_script_handles, + 'The block editor script is incorrect' + ); + $this->assertSameSets( + array( 'tests-notice-style-overridden' ), + $result->style_handles, + 'The block style was not overridden' + ); + $this->assertIsCallable( $result->render_callback ); + } + + /** + * Tests that when the `name` is missing, `register_block_type_from_metadata()` + * will return `false`. + * + * @ticket 56865 + * + * @covers ::register_block_type_from_metadata + * + * @dataProvider data_register_block_registers_with_args_override_returns_false_when_name_is_missing + * + * @param string $file The metadata file. + * @param array $args Array of block type arguments. + */ + public function test_block_registers_with_args_override_returns_false_when_name_is_missing( $file, $args ) { + $this->assertFalse( register_block_type_from_metadata( $file, $args ) ); + } + + /** + * Data provider. + * + * @return array[] + */ + public function data_register_block_registers_with_args_override_returns_false_when_name_is_missing() { + return array( + 'no block.json file and no name argument' => array( + 'file' => '', // No block.json file. + 'args' => array( + 'title' => 'Overriden title', + 'style' => array( 'tests-notice-style-overridden' ), + ), + ), + 'existing file and args not an array' => array( + // A file that exists but is empty. This will bypass the file_exists() check. + 'file' => DIR_TESTDATA . '/blocks/notice/block.js', + 'args' => false, + ), + 'existing file and args[name] missing' => array( + // A file that exists but is empty. This will bypass the file_exists() check. + 'file' => DIR_TESTDATA . '/blocks/notice/block.js', + 'args' => array( + 'title' => 'Overriden title', + 'style' => array( 'tests-notice-style-overridden' ), + ), + ), + ); + } + /** * Tests that the function returns the registered block when the `block.json` * is found in the fixtures directory. From ffcf5fb38aa0de123f71ef89d14de77eaa5904c0 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 29 Oct 2023 00:14:46 +0000 Subject: [PATCH 70/71] Docs: Improve documentation for `wp_tempnam()` and `download_url()`. Instead of mentioning the `unlink()` function specifically, the DocBlock should state that the calling function must delete or move the temporary file. Follow-up to [6779], [12151]. Props bedas. Fixes #59761. git-svn-id: https://develop.svn.wordpress.org/trunk@57027 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/file.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wp-admin/includes/file.php b/src/wp-admin/includes/file.php index 600ddc27dfd6e..c3863ba2ea5ba 100644 --- a/src/wp-admin/includes/file.php +++ b/src/wp-admin/includes/file.php @@ -656,7 +656,7 @@ function wp_edit_theme_plugin_file( $args ) { /** * Returns a filename of a temporary unique file. * - * Please note that the calling function must unlink() this itself. + * Please note that the calling function must delete or move the file. * * The filename is based off the passed parameter or defaults to the current unix timestamp, * while the directory can either be passed as well, or by leaving it blank, default to a writable @@ -1139,7 +1139,7 @@ function wp_handle_sideload( &$file, $overrides = false, $time = null ) { /** * Downloads a URL to a local temporary file using the WordPress HTTP API. * - * Please note that the calling function must unlink() the file. + * Please note that the calling function must delete or move the file. * * @since 2.5.0 * @since 5.2.0 Signature Verification with SoftFail was added. @@ -1153,7 +1153,7 @@ function wp_handle_sideload( &$file, $overrides = false, $time = null ) { * @return string|WP_Error Filename on success, WP_Error on failure. */ function download_url( $url, $timeout = 300, $signature_verification = false ) { - // WARNING: The file is not automatically deleted, the script must unlink() the file. + // WARNING: The file is not automatically deleted, the script must delete or move the file. if ( ! $url ) { return new WP_Error( 'http_no_url', __( 'Invalid URL Provided.' ) ); } From 63a4ae98ee3c08d93c3d3e21a0c8804b54eae917 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 30 Oct 2023 12:52:44 +0000 Subject: [PATCH 71/71] Editor: Correctly load RTL stylesheets in `register_core_block_style_handles()`. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When setting an RTL language under Settings → General, some RTL stylesheets were not loaded, with LTR stylesheets being loaded instead, meaning that some blocks were not displayed correctly. This commit ensures that all appropriate RTL stylesheets are loaded when selecting an RTL language. Follow-up to [56524]. Props mukesh27, maahrokh, hellofromTonya, joemcgill, huzaifaalmesbah, rajinsharwar, devmuhib, swissspidy. Fixes #59715. git-svn-id: https://develop.svn.wordpress.org/trunk@57028 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/blocks/index.php | 4 +- .../blocks/registerCoreBlockStyleHandles.php | 38 ++++++++++++++++++- 2 files changed, 38 insertions(+), 4 deletions(-) diff --git a/src/wp-includes/blocks/index.php b/src/wp-includes/blocks/index.php index 6832759e77d98..40967727da574 100644 --- a/src/wp-includes/blocks/index.php +++ b/src/wp-includes/blocks/index.php @@ -106,11 +106,11 @@ static function ( $file ) use ( $normalized_blocks_path ) { $wp_styles->add( $style_handle, $blocks_url . $style_path ); $wp_styles->add_data( $style_handle, 'path', $path ); - $rtl_file = str_replace( "{$suffix}.css", "-rtl{$suffix}.css", $path ); + $rtl_file = "{$name}/{$filename}-rtl{$suffix}.css"; if ( is_rtl() && in_array( $rtl_file, $files, true ) ) { $wp_styles->add_data( $style_handle, 'rtl', 'replace' ); $wp_styles->add_data( $style_handle, 'suffix', $suffix ); - $wp_styles->add_data( $style_handle, 'path', $rtl_file ); + $wp_styles->add_data( $style_handle, 'path', str_replace( "{$suffix}.css", "-rtl{$suffix}.css", $path ) ); } }; diff --git a/tests/phpunit/tests/blocks/registerCoreBlockStyleHandles.php b/tests/phpunit/tests/blocks/registerCoreBlockStyleHandles.php index a4ed1dd418c72..6f710cab18841 100644 --- a/tests/phpunit/tests/blocks/registerCoreBlockStyleHandles.php +++ b/tests/phpunit/tests/blocks/registerCoreBlockStyleHandles.php @@ -95,7 +95,7 @@ public function test_wp_should_load_separate_core_block_assets_true( $name, $sch $this->assertArrayHasKey( $style_handle, $wp_styles->registered, 'The key should exist, as this style should be registered' ); if ( false === $wp_styles->registered[ $style_handle ]->src ) { - $this->assertEmpty( $wp_styles->registered[ $style_handle ]->extra, 'If source is false, not style path should be set' ); + $this->assertEmpty( $wp_styles->registered[ $style_handle ]->extra, 'If source is false, style path should not be set' ); } else { $this->assertStringContainsString( $this->includes_url, $wp_styles->registered[ $style_handle ]->src, 'Source of style should contain the includes url' ); $this->assertNotEmpty( $wp_styles->registered[ $style_handle ]->extra, 'The path of the style should exist' ); @@ -123,7 +123,7 @@ public function test_wp_should_load_separate_core_block_assets_current_theme_sup $this->assertArrayHasKey( $style_handle, $wp_styles->registered, 'The key should exist, as this style should be registered' ); if ( false === $wp_styles->registered[ $style_handle ]->src ) { - $this->assertEmpty( $wp_styles->registered[ $style_handle ]->extra, 'If source is false, not style path should be set' ); + $this->assertEmpty( $wp_styles->registered[ $style_handle ]->extra, 'If source is false, style path should not be set' ); } else { $this->assertStringContainsString( $this->includes_url, $wp_styles->registered[ $style_handle ]->src, 'Source of style should contain the includes url' ); $this->assertNotEmpty( $wp_styles->registered[ $style_handle ]->extra, 'The path of the style should exist' ); @@ -132,6 +132,40 @@ public function test_wp_should_load_separate_core_block_assets_current_theme_sup } } + /** + * @ticket 59715 + * + * @dataProvider data_block_data + * + * @param string $name The block name. + */ + public function test_register_core_block_style_handles_should_load_rtl_stylesheets_for_rtl_text_direction( $name ) { + global $wp_locale; + + $orig_text_dir = $wp_locale->text_direction; + $wp_locale->text_direction = 'rtl'; + + add_filter( 'should_load_separate_core_block_assets', '__return_true' ); + register_core_block_style_handles(); + + $wp_styles = $GLOBALS['wp_styles']; + + $style_handle = "wp-block-{$name}-theme"; + + $wp_locale->text_direction = $orig_text_dir; + + $this->assertArrayHasKey( $style_handle, $wp_styles->registered, 'The key should exist, as this style should be registered' ); + if ( false === $wp_styles->registered[ $style_handle ]->src ) { + $this->assertEmpty( $wp_styles->registered[ $style_handle ]->extra, 'If source is false, style path should not be set' ); + } else { + $this->assertStringContainsString( $this->includes_url, $wp_styles->registered[ $style_handle ]->src, 'Source of style should contain the includes url' ); + $this->assertNotEmpty( $wp_styles->registered[ $style_handle ]->extra, 'The path of the style should exist' ); + $this->assertArrayHasKey( 'path', $wp_styles->registered[ $style_handle ]->extra, 'The path key of the style should exist in extra array' ); + $this->assertNotEmpty( $wp_styles->registered[ $style_handle ]->extra['path'], 'The path key of the style should not be empty' ); + $this->assertArrayHasKey( 'rtl', $wp_styles->registered[ $style_handle ]->extra, 'The rtl key of the style should exist in extra array' ); + } + } + public function data_block_data() { $core_blocks_meta = require ABSPATH . WPINC . '/blocks/blocks-json.php';