From 67296ea571127695b8cfd3cf7cb8b077ce91567a Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 2 Jan 2024 15:57:20 +0000 Subject: [PATCH 01/35] Tests: Use more specific assertions in `wp_scheduled_delete()` tests. Includes clarifying test method names and descriptions. Follow-up to [57224]. See #59938. git-svn-id: https://develop.svn.wordpress.org/trunk@57237 602fd350-edb4-49c9-b593-d223f7449a82 --- .../tests/functions/wpScheduledDelete.php | 78 +++++++++---------- 1 file changed, 38 insertions(+), 40 deletions(-) diff --git a/tests/phpunit/tests/functions/wpScheduledDelete.php b/tests/phpunit/tests/functions/wpScheduledDelete.php index 38044d44a1827..d3f4d144aa665 100644 --- a/tests/phpunit/tests/functions/wpScheduledDelete.php +++ b/tests/phpunit/tests/functions/wpScheduledDelete.php @@ -1,9 +1,9 @@ post->create( @@ -40,21 +41,21 @@ public function test_wp_scheduled_delete() { add_post_meta( self::$page_id, '_wp_trash_meta_time', time() - ( DAY_IN_SECONDS * EMPTY_TRASH_DAYS + 1 ) ); add_post_meta( self::$page_id, '_wp_trash_meta_status', 'published' ); - $this->assertNotEmpty( get_post( self::$page_id ) ); + $this->assertInstanceOf( 'WP_Post', get_post( self::$page_id ) ); wp_scheduled_delete(); - $this->assertEmpty( get_post( self::$page_id ) ); + $this->assertNull( get_post( self::$page_id ) ); } /** - * Don't delete old trashed post/pages if status not trash. - * Remove the trash meta status. + * Tests that old trashed posts/pages are not deleted if status is not 'trash'. * - * @ticket 59938 + * Ensures that the trash meta status is removed. * + * @ticket 59938 */ - public function test_wp_scheduled_delete_not_trash() { + public function test_wp_scheduled_delete_status_not_trash() { self::$page_id = self::factory()->post->create( array( 'post_type' => 'page', @@ -64,23 +65,22 @@ public function test_wp_scheduled_delete_not_trash() { add_post_meta( self::$page_id, '_wp_trash_meta_time', time() - ( DAY_IN_SECONDS * EMPTY_TRASH_DAYS + 1 ) ); add_post_meta( self::$page_id, '_wp_trash_meta_status', 'published' ); - $this->assertNotEmpty( get_post( self::$page_id ) ); + $this->assertInstanceOf( 'WP_Post', get_post( self::$page_id ) ); wp_scheduled_delete(); - $this->assertNotEmpty( get_post( self::$page_id ) ); - $this->assertEmpty( get_post_meta( self::$page_id, '_wp_trash_meta_time', true ) ); - $this->assertEmpty( get_post_meta( self::$page_id, '_wp_trash_meta_status', true ) ); + $this->assertInstanceOf( 'WP_Post', get_post( self::$page_id ) ); + $this->assertSame( '', get_post_meta( self::$page_id, '_wp_trash_meta_time', true ) ); + $this->assertSame( '', get_post_meta( self::$page_id, '_wp_trash_meta_status', true ) ); } /** - * Don't delete old trashed post/pages if old enough. + * Tests that old trashed posts/pages are not deleted if not old enough. * * @ticket 59938 - * */ - public function test_wp_scheduled_delete_not_old() { + public function test_wp_scheduled_delete_page_not_old_enough() { self::$page_id = self::factory()->post->create( array( 'post_type' => 'page', @@ -90,20 +90,19 @@ public function test_wp_scheduled_delete_not_old() { add_post_meta( self::$page_id, '_wp_trash_meta_time', time() - ( DAY_IN_SECONDS * EMPTY_TRASH_DAYS ) ); add_post_meta( self::$page_id, '_wp_trash_meta_status', 'published' ); - $this->assertNotEmpty( get_post( self::$page_id ) ); + $this->assertInstanceOf( 'WP_Post', get_post( self::$page_id ) ); wp_scheduled_delete(); - $this->assertNotEmpty( get_post( self::$page_id ) ); - $this->assertNotEmpty( get_post_meta( self::$page_id, '_wp_trash_meta_time', true ) ); - $this->assertNotEmpty( get_post_meta( self::$page_id, '_wp_trash_meta_status', true ) ); + $this->assertInstanceOf( 'WP_Post', get_post( self::$page_id ) ); + $this->assertIsNumeric( get_post_meta( self::$page_id, '_wp_trash_meta_time', true ) ); + $this->assertSame( 'published', get_post_meta( self::$page_id, '_wp_trash_meta_status', true ) ); } /** - * Delete old trashed comments. + * Tests that old trashed comments are deleted. * * @ticket 59938 - * */ public function test_wp_scheduled_delete_comment() { self::$comment_id = self::factory()->comment->create( @@ -114,21 +113,21 @@ public function test_wp_scheduled_delete_comment() { add_comment_meta( self::$comment_id, '_wp_trash_meta_time', time() - ( DAY_IN_SECONDS * EMPTY_TRASH_DAYS + 1 ) ); add_post_meta( self::$comment_id, '_wp_trash_meta_status', 'published' ); - $this->assertNotEmpty( get_comment( self::$comment_id ) ); + $this->assertInstanceOf( 'WP_Comment', get_comment( self::$comment_id ) ); wp_scheduled_delete(); - $this->assertEmpty( get_comment( self::$comment_id ) ); + $this->assertNull( get_comment( self::$comment_id ) ); } /** - * Don't delete old trashed comments if status not trash. - * Remove the trash meta status. + * Tests that old trashed comments are not deleted if status is not 'trash'. * - * @ticket 59938 + * Ensures that the trash meta status is removed. * + * @ticket 59938 */ - public function test_wp_scheduled_delete_not_trash_comment() { + public function test_wp_scheduled_delete_comment_status_not_trash() { self::$comment_id = self::factory()->comment->create( array( 'comment_approved' => '1', @@ -137,23 +136,22 @@ public function test_wp_scheduled_delete_not_trash_comment() { add_comment_meta( self::$comment_id, '_wp_trash_meta_time', time() - ( DAY_IN_SECONDS * EMPTY_TRASH_DAYS + 1 ) ); add_comment_meta( self::$comment_id, '_wp_trash_meta_status', 'published' ); - $this->assertNotEmpty( get_comment( self::$comment_id ) ); + $this->assertInstanceOf( 'WP_Comment', get_comment( self::$comment_id ) ); wp_scheduled_delete(); - $this->assertNotEmpty( get_comment( self::$comment_id ) ); - $this->assertEmpty( get_comment_meta( self::$comment_id, '_wp_trash_meta_time', true ) ); - $this->assertEmpty( get_comment_meta( self::$comment_id, '_wp_trash_meta_status', true ) ); + $this->assertInstanceOf( 'WP_Comment', get_comment( self::$comment_id ) ); + $this->assertSame( '', get_comment_meta( self::$comment_id, '_wp_trash_meta_time', true ) ); + $this->assertSame( '', get_comment_meta( self::$comment_id, '_wp_trash_meta_status', true ) ); } /** - * Don't delete old trashed comments if old enough. + * Tests that old trashed comments are not deleted if not old enough. * * @ticket 59938 - * */ - public function test_wp_scheduled_delete_not_old_comment() { + public function test_wp_scheduled_delete_comment_not_old_enough() { self::$comment_id = self::factory()->comment->create( array( 'comment_approved' => 'trash', @@ -162,12 +160,12 @@ public function test_wp_scheduled_delete_not_old_comment() { add_comment_meta( self::$comment_id, '_wp_trash_meta_time', time() - ( DAY_IN_SECONDS * EMPTY_TRASH_DAYS ) ); add_comment_meta( self::$comment_id, '_wp_trash_meta_status', 'published' ); - $this->assertNotEmpty( get_comment( self::$comment_id ) ); + $this->assertInstanceOf( 'WP_Comment', get_comment( self::$comment_id ) ); wp_scheduled_delete(); - $this->assertNotEmpty( get_comment( self::$comment_id ) ); - $this->assertNotEmpty( get_comment_meta( self::$comment_id, '_wp_trash_meta_time', true ) ); - $this->assertNotEmpty( get_comment_meta( self::$comment_id, '_wp_trash_meta_status', true ) ); + $this->assertInstanceOf( 'WP_Comment', get_comment( self::$comment_id ) ); + $this->assertIsNumeric( get_comment_meta( self::$comment_id, '_wp_trash_meta_time', true ) ); + $this->assertSame( 'published', get_comment_meta( self::$comment_id, '_wp_trash_meta_status', true ) ); } } From 0e559891efa171fbc07cb99ad1b90d49c2cf4215 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Wed, 3 Jan 2024 16:20:02 +0000 Subject: [PATCH 02/35] Customize: Pass the previous status to post trash hooks when trashing a changeset. This ensures that the correct number of arguments is passed to post trash hooks in `WP_Customize_Manager::trash_changeset_post()`, which bypasses `wp_trash_post()`. Follow-up to [56043]. Props joelcj91, mukesh27. Fixes #60183. git-svn-id: https://develop.svn.wordpress.org/trunk@57238 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class-wp-customize-manager.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/wp-includes/class-wp-customize-manager.php b/src/wp-includes/class-wp-customize-manager.php index 24f82510bd782..d12eea0e5f326 100644 --- a/src/wp-includes/class-wp-customize-manager.php +++ b/src/wp-includes/class-wp-customize-manager.php @@ -3079,25 +3079,26 @@ public function trash_changeset_post( $post ) { return false; } + $previous_status = $post->post_status; + /** This filter is documented in wp-includes/post.php */ - $check = apply_filters( 'pre_trash_post', null, $post ); + $check = apply_filters( 'pre_trash_post', null, $post, $previous_status ); if ( null !== $check ) { return $check; } /** This action is documented in wp-includes/post.php */ - do_action( 'wp_trash_post', $post_id ); + do_action( 'wp_trash_post', $post_id, $previous_status ); - add_post_meta( $post_id, '_wp_trash_meta_status', $post->post_status ); + add_post_meta( $post_id, '_wp_trash_meta_status', $previous_status ); add_post_meta( $post_id, '_wp_trash_meta_time', time() ); - $old_status = $post->post_status; $new_status = 'trash'; $wpdb->update( $wpdb->posts, array( 'post_status' => $new_status ), array( 'ID' => $post->ID ) ); clean_post_cache( $post->ID ); $post->post_status = $new_status; - wp_transition_post_status( $new_status, $old_status, $post ); + wp_transition_post_status( $new_status, $previous_status, $post ); /** This action is documented in wp-includes/post.php */ do_action( "edit_post_{$post->post_type}", $post->ID, $post ); @@ -3119,7 +3120,7 @@ public function trash_changeset_post( $post ) { wp_trash_post_comments( $post_id ); /** This action is documented in wp-includes/post.php */ - do_action( 'trashed_post', $post_id ); + do_action( 'trashed_post', $post_id, $previous_status ); return $post; } From 489b9e737f33a284a4ef5a9b1a7489a735eca10c Mon Sep 17 00:00:00 2001 From: Tonya Mork Date: Wed, 3 Jan 2024 21:57:32 +0000 Subject: [PATCH 03/35] Docs: Replace "sanity" with "confidence" for inclusive language. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The phrase "sanity check" unnecessarily references mental health. It's an old phrase used to denote an extra step in verifying code works as expected. “The WordPress open source community cares about diversity. We strive to maintain a welcoming environment where everyone can feel included.” While "sanity check" is a well-known phrase with a specific meaning, "confidence check" is a direct replacement that is more clear of its intent while being more inclusive. Words matter. Follow-up to [49216], [46271], [40583], [38832], [38637], [37409], [33359], [32162], [30346], [30345], [30238], [30055], [29902], [28763], [26141], [25002], [22227], [13428], [12148], [11025], [8927]. Props dartiss, hellofromTonya. Fixes #60187. git-svn-id: https://develop.svn.wordpress.org/trunk@57239 602fd350-edb4-49c9-b593-d223f7449a82 --- src/js/_enqueues/admin/post.js | 4 ++-- src/js/_enqueues/vendor/tinymce/utils/form_utils.js | 2 +- src/js/_enqueues/wp/theme.js | 2 +- src/wp-admin/includes/class-pclzip.php | 2 +- src/wp-admin/includes/class-plugin-upgrader.php | 2 +- src/wp-admin/includes/class-theme-upgrader.php | 2 +- src/wp-admin/includes/post.php | 2 +- src/wp-admin/includes/update-core.php | 2 +- src/wp-admin/install.php | 2 +- .../themes/twentytwenty/assets/js/customize-controls.js | 2 +- .../themes/twentytwentyone/inc/template-functions.php | 2 +- src/wp-includes/class-wp-tax-query.php | 2 +- src/wp-includes/class-wpdb.php | 8 ++++---- src/wp-includes/cron.php | 2 +- src/wp-includes/functions.php | 6 +++--- src/wp-includes/post.php | 2 +- src/wp-includes/shortcodes.php | 2 +- src/wp-includes/taxonomy.php | 2 +- tests/phpunit/tests/db/charset.php | 6 +++--- tests/phpunit/tests/formatting/wpTexturize.php | 2 +- tests/phpunit/tests/functions.php | 2 +- tests/phpunit/tests/post.php | 8 ++++---- tests/phpunit/tests/rest-api/rest-users-controller.php | 2 +- 23 files changed, 34 insertions(+), 34 deletions(-) diff --git a/src/js/_enqueues/admin/post.js b/src/js/_enqueues/admin/post.js index eb577013d5ad3..bba9c17358df6 100644 --- a/src/js/_enqueues/admin/post.js +++ b/src/js/_enqueues/admin/post.js @@ -1173,7 +1173,7 @@ jQuery( function($) { } /** - * When the dragging stopped make sure we return focus and do a sanity check on the height. + * When the dragging stopped make sure we return focus and do a confidence check on the height. */ function endDrag() { var height, toolbarHeight; @@ -1198,7 +1198,7 @@ jQuery( function($) { $document.off( '.wp-editor-resize' ); - // Sanity check: normalize height to stay within acceptable ranges. + // Confidence check: normalize height to stay within acceptable ranges. if ( height && height > 50 && height < 5000 ) { setUserSetting( 'ed_size', height ); } diff --git a/src/js/_enqueues/vendor/tinymce/utils/form_utils.js b/src/js/_enqueues/vendor/tinymce/utils/form_utils.js index 358ad60a9a364..8f8a234c953b1 100644 --- a/src/js/_enqueues/vendor/tinymce/utils/form_utils.js +++ b/src/js/_enqueues/vendor/tinymce/utils/form_utils.js @@ -199,7 +199,7 @@ function getCSSSize(size) { if (/^[0-9]+$/.test(size)) { size += 'px'; } - // Sanity check, IE doesn't like broken values + // Confidence check, IE doesn't like broken values else if (!(/^[0-9\.]+(px|%|in|cm|mm|em|ex|pt|pc)$/i.test(size))) { return ""; } diff --git a/src/js/_enqueues/wp/theme.js b/src/js/_enqueues/wp/theme.js index 5daf04f7d7b55..13ed5aab4e8d2 100644 --- a/src/js/_enqueues/wp/theme.js +++ b/src/js/_enqueues/wp/theme.js @@ -1300,7 +1300,7 @@ themes.view.Themes = wp.Backbone.View.extend({ // Find the next model within the collection. nextModel = self.collection.at( self.collection.indexOf( model ) + 1 ); - // Sanity check which also serves as a boundary test. + // Confidence check which also serves as a boundary test. if ( nextModel !== undefined ) { // We have a new theme... diff --git a/src/wp-admin/includes/class-pclzip.php b/src/wp-admin/includes/class-pclzip.php index 3fdade5dd11f2..963f31178c1b6 100644 --- a/src/wp-admin/includes/class-pclzip.php +++ b/src/wp-admin/includes/class-pclzip.php @@ -1854,7 +1854,7 @@ function privOptionDefaultThreshold(&$p_options) $p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD] = floor($v_memory_limit_int*PCLZIP_TEMPORARY_FILE_RATIO); - // ----- Sanity check : No threshold if value lower than 1M + // ----- Confidence check : No threshold if value lower than 1M if ($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD] < 1048576) { unset($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD]); } diff --git a/src/wp-admin/includes/class-plugin-upgrader.php b/src/wp-admin/includes/class-plugin-upgrader.php index 02743f64561e9..091cfebc188ff 100644 --- a/src/wp-admin/includes/class-plugin-upgrader.php +++ b/src/wp-admin/includes/class-plugin-upgrader.php @@ -472,7 +472,7 @@ public function check_package( $source ) { } $working_directory = str_replace( $wp_filesystem->wp_content_dir(), trailingslashit( WP_CONTENT_DIR ), $source ); - if ( ! is_dir( $working_directory ) ) { // Sanity check, if the above fails, let's not prevent installation. + if ( ! is_dir( $working_directory ) ) { // Confidence check, if the above fails, let's not prevent installation. return $source; } diff --git a/src/wp-admin/includes/class-theme-upgrader.php b/src/wp-admin/includes/class-theme-upgrader.php index 12bd4772919cc..b1cf6778396b3 100644 --- a/src/wp-admin/includes/class-theme-upgrader.php +++ b/src/wp-admin/includes/class-theme-upgrader.php @@ -538,7 +538,7 @@ public function check_package( $source ) { // Check that the folder contains a valid theme. $working_directory = str_replace( $wp_filesystem->wp_content_dir(), trailingslashit( WP_CONTENT_DIR ), $source ); - if ( ! is_dir( $working_directory ) ) { // Sanity check, if the above fails, let's not prevent installation. + if ( ! is_dir( $working_directory ) ) { // Confidence check, if the above fails, let's not prevent installation. return $source; } diff --git a/src/wp-admin/includes/post.php b/src/wp-admin/includes/post.php index b9986d1bdec7a..c93ac71bec525 100644 --- a/src/wp-admin/includes/post.php +++ b/src/wp-admin/includes/post.php @@ -452,7 +452,7 @@ function edit_post( $post_data = null ) { $success = wp_update_post( $translated ); - // If the save failed, see if we can sanity check the main fields and try again. + // If the save failed, see if we can confidence check the main fields and try again. if ( ! $success && is_callable( array( $wpdb, 'strip_invalid_text_for_column' ) ) ) { $fields = array( 'post_title', 'post_content', 'post_excerpt' ); diff --git a/src/wp-admin/includes/update-core.php b/src/wp-admin/includes/update-core.php index ee710d3df36dc..0c66ad3ee9db0 100644 --- a/src/wp-admin/includes/update-core.php +++ b/src/wp-admin/includes/update-core.php @@ -1093,7 +1093,7 @@ function update_core( $from, $to ) { */ apply_filters( 'update_feedback', __( 'Verifying the unpacked files…' ) ); - // Sanity check the unzipped distribution. + // Confidence check the unzipped distribution. $distro = ''; $roots = array( '/wordpress/', '/wordpress-mu/' ); diff --git a/src/wp-admin/install.php b/src/wp-admin/install.php index 971392d07647c..bf102893ff9df 100644 --- a/src/wp-admin/install.php +++ b/src/wp-admin/install.php @@ -6,7 +6,7 @@ * @subpackage Administration */ -// Sanity check. +// Confidence check. if ( false ) { ?> diff --git a/src/wp-content/themes/twentytwenty/assets/js/customize-controls.js b/src/wp-content/themes/twentytwenty/assets/js/customize-controls.js index 4397cf29c75de..ba2d5ad63f812 100644 --- a/src/wp-content/themes/twentytwenty/assets/js/customize-controls.js +++ b/src/wp-content/themes/twentytwenty/assets/js/customize-controls.js @@ -69,7 +69,7 @@ // Get accessible colors for the defined background-color and hue. colors = twentyTwentyColor( backgroundColor, accentHue ); - // Sanity check. + // Confidence check. if ( colors.getAccentColor() && 'function' === typeof colors.getAccentColor().toCSS ) { // Update the value for this context. value[ context ] = { diff --git a/src/wp-content/themes/twentytwentyone/inc/template-functions.php b/src/wp-content/themes/twentytwentyone/inc/template-functions.php index 5c1ca0f1e116d..4924773dc1c38 100644 --- a/src/wp-content/themes/twentytwentyone/inc/template-functions.php +++ b/src/wp-content/themes/twentytwentyone/inc/template-functions.php @@ -367,7 +367,7 @@ function twenty_twenty_one_print_first_instance_of_block( $block_name, $content // Loop blocks. foreach ( $blocks as $block ) { - // Sanity check. + // Confidence check. if ( ! isset( $block['blockName'] ) ) { continue; } diff --git a/src/wp-includes/class-wp-tax-query.php b/src/wp-includes/class-wp-tax-query.php index 38841c42b06de..58e53ea4a2c75 100644 --- a/src/wp-includes/class-wp-tax-query.php +++ b/src/wp-includes/class-wp-tax-query.php @@ -505,7 +505,7 @@ public function get_sql_for_clause( &$clause, $parent_query ) { protected function find_compatible_table_alias( $clause, $parent_query ) { $alias = false; - // Sanity check. Only IN queries use the JOIN syntax. + // Confidence check. Only IN queries use the JOIN syntax. if ( ! isset( $clause['operator'] ) || 'IN' !== $clause['operator'] ) { return $alias; } diff --git a/src/wp-includes/class-wpdb.php b/src/wp-includes/class-wpdb.php index baba39d91f4d9..d9186b91f463f 100644 --- a/src/wp-includes/class-wpdb.php +++ b/src/wp-includes/class-wpdb.php @@ -154,7 +154,7 @@ class wpdb { protected $result; /** - * Cached column info, for sanity checking data before inserting. + * Cached column info, for confidence checking data before inserting. * * @since 4.2.0 * @@ -172,7 +172,7 @@ class wpdb { protected $table_charset = array(); /** - * Whether text fields in the current query need to be sanity checked. + * Whether text fields in the current query need to be confidence checked. * * @since 4.2.0 * @@ -1927,7 +1927,7 @@ public function flush() { mysqli_free_result( $this->result ); $this->result = null; - // Sanity check before using the handle. + // Confidence check before using the handle. if ( empty( $this->dbh ) || ! ( $this->dbh instanceof mysqli ) ) { return; } @@ -3516,7 +3516,7 @@ protected function check_safe_collation( $query ) { return false; } - // If any of the columns don't have one of these collations, it needs more sanity checking. + // If any of the columns don't have one of these collations, it needs more confidence checking. $safe_collations = array( 'utf8_bin', 'utf8_general_ci', diff --git a/src/wp-includes/cron.php b/src/wp-includes/cron.php index c1837e6051c1e..aadc22b7eb17d 100644 --- a/src/wp-includes/cron.php +++ b/src/wp-includes/cron.php @@ -874,7 +874,7 @@ function spawn_cron( $gmt_time = 0 ) { return false; } - // Sanity check. + // Confidence check. $crons = wp_get_ready_cron_jobs(); if ( empty( $crons ) ) { return false; diff --git a/src/wp-includes/functions.php b/src/wp-includes/functions.php index d270157d1f886..c4ecb81f66160 100644 --- a/src/wp-includes/functions.php +++ b/src/wp-includes/functions.php @@ -4284,7 +4284,7 @@ function _wp_die_process_input( $message, $title = '', $args = array() ) { } /** - * Encodes a variable into JSON, with some sanity checks. + * Encodes a variable into JSON, with some confidence checks. * * @since 4.1.0 * @since 5.3.0 No longer handles support for PHP < 5.6. @@ -4300,7 +4300,7 @@ function _wp_die_process_input( $message, $title = '', $args = array() ) { function wp_json_encode( $value, $flags = 0, $depth = 512 ) { $json = json_encode( $value, $flags, $depth ); - // If json_encode() was successful, no need to do more sanity checking. + // If json_encode() was successful, no need to do more confidence checking. if ( false !== $json ) { return $json; } @@ -4315,7 +4315,7 @@ function wp_json_encode( $value, $flags = 0, $depth = 512 ) { } /** - * Performs sanity checks on data that shall be encoded to JSON. + * Performs confidence checks on data that shall be encoded to JSON. * * @ignore * @since 4.1.0 diff --git a/src/wp-includes/post.php b/src/wp-includes/post.php index d6b6bc6649cc9..25fefbb6211cb 100644 --- a/src/wp-includes/post.php +++ b/src/wp-includes/post.php @@ -3861,7 +3861,7 @@ function wp_untrash_post_comments( $post = null ) { } foreach ( $group_by_status as $status => $comments ) { - // Sanity check. This shouldn't happen. + // Confidence check. This shouldn't happen. if ( 'post-trashed' === $status ) { $status = '0'; } diff --git a/src/wp-includes/shortcodes.php b/src/wp-includes/shortcodes.php index 24df21d4da11e..98cd8f71ddd02 100644 --- a/src/wp-includes/shortcodes.php +++ b/src/wp-includes/shortcodes.php @@ -504,7 +504,7 @@ function do_shortcodes_in_html_tags( $content, $ignore_html, $tagnames ) { $element = preg_replace_callback( "/$pattern/", 'do_shortcode_tag', $element ); } - // Looks like we found some crazy unfiltered HTML. Skipping it for sanity. + // Looks like we found some crazy unfiltered HTML. Skipping it for confidence. $element = strtr( $element, $trans ); continue; } diff --git a/src/wp-includes/taxonomy.php b/src/wp-includes/taxonomy.php index 59ec5345fe0cd..eaadaad65c4af 100644 --- a/src/wp-includes/taxonomy.php +++ b/src/wp-includes/taxonomy.php @@ -2573,7 +2573,7 @@ function wp_insert_term( $term, $taxonomy, $args = array() ) { $tt_id = (int) $wpdb->insert_id; /* - * Sanity check: if we just created a term with the same parent + taxonomy + slug but a higher term_id than + * Confidence check: if we just created a term with the same parent + taxonomy + slug but a higher term_id than * an existing term, then we have unwittingly created a duplicate term. Delete the dupe, and use the term_id * and term_taxonomy_id of the older term instead. Then return out of the function so that the "create" hooks * are not fired. diff --git a/tests/phpunit/tests/db/charset.php b/tests/phpunit/tests/db/charset.php index 1a79ab911f2fb..52eb56a7a80f4 100644 --- a/tests/phpunit/tests/db/charset.php +++ b/tests/phpunit/tests/db/charset.php @@ -1022,7 +1022,7 @@ public function data_table_collation_check() { $table_name = 'table_collation_check'; $data = array( 'utf8_bin' => array( - // utf8_bin tables don't need extra sanity checking. + // utf8_bin tables don't need extra confidence checking. 'create' => '( a VARCHAR(50) COLLATE utf8_bin )', 'expected' => true, ), @@ -1037,13 +1037,13 @@ public function data_table_collation_check() { 'expected' => false, ), 'utf8_bin + big5_chinese_ci' => array( - // utf8_bin tables don't need extra sanity checking, + // utf8_bin tables don't need extra confidence checking, // except for when they're not just utf8_bin. 'create' => '( a VARCHAR(50) COLLATE utf8_bin, b VARCHAR(50) COLLATE big5_chinese_ci )', 'expected' => false, ), 'utf8_bin + int' => array( - // utf8_bin tables don't need extra sanity checking + // utf8_bin tables don't need extra confidence checking // when the other columns aren't strings. 'create' => '( a VARCHAR(50) COLLATE utf8_bin, b INT )', 'expected' => true, diff --git a/tests/phpunit/tests/formatting/wpTexturize.php b/tests/phpunit/tests/formatting/wpTexturize.php index 3202db4ba760f..fa81245c83bb9 100644 --- a/tests/phpunit/tests/formatting/wpTexturize.php +++ b/tests/phpunit/tests/formatting/wpTexturize.php @@ -1788,7 +1788,7 @@ public function data_translate() { } /** - * Extra sanity checks for _wptexturize_pushpop_element() + * Extra confidence checks for _wptexturize_pushpop_element() * * @ticket 28483 * @dataProvider data_element_stack diff --git a/tests/phpunit/tests/functions.php b/tests/phpunit/tests/functions.php index cef6a1eaf5462..828184491d7b9 100644 --- a/tests/phpunit/tests/functions.php +++ b/tests/phpunit/tests/functions.php @@ -229,7 +229,7 @@ public function test_wp_unique_filename() { $testdir = DIR_TESTDATA . '/images/'; - // Sanity check. + // Confidence check. $this->assertSame( 'abcdefg.png', wp_unique_filename( $testdir, 'abcdefg.png' ), 'Test non-existing file, file name should be unchanged.' ); // Ensure correct images exist. diff --git a/tests/phpunit/tests/post.php b/tests/phpunit/tests/post.php index 548c5eb2cabf8..6e0207add28de 100644 --- a/tests/phpunit/tests/post.php +++ b/tests/phpunit/tests/post.php @@ -329,12 +329,12 @@ public function test_user_without_publish_posts_cannot_affect_sticky() { ); stick_post( $post->ID ); - // Sanity check. + // Confidence check. $this->assertTrue( is_sticky( $post->ID ) ); wp_set_current_user( self::$grammarian_id ); - // Sanity check. + // Confidence check. $this->assertFalse( current_user_can( 'publish_posts' ) ); $this->assertTrue( current_user_can( 'edit_others_posts' ) ); $this->assertTrue( current_user_can( 'edit_published_posts' ) ); @@ -367,12 +367,12 @@ public function test_user_without_publish_posts_cannot_affect_sticky_with_edit_p ); stick_post( $post->ID ); - // Sanity check. + // Confidence check. $this->assertTrue( is_sticky( $post->ID ) ); wp_set_current_user( self::$grammarian_id ); - // Sanity check. + // Confidence check. $this->assertFalse( current_user_can( 'publish_posts' ) ); $this->assertTrue( current_user_can( 'edit_others_posts' ) ); $this->assertTrue( current_user_can( 'edit_published_posts' ) ); diff --git a/tests/phpunit/tests/rest-api/rest-users-controller.php b/tests/phpunit/tests/rest-api/rest-users-controller.php index ac5b0741e90a0..2cad1ef03225f 100644 --- a/tests/phpunit/tests/rest-api/rest-users-controller.php +++ b/tests/phpunit/tests/rest-api/rest-users-controller.php @@ -2520,7 +2520,7 @@ public function test_delete_user_reassign() { ) ); - // Sanity check to ensure the factory created the post correctly. + // Confidence check to ensure the factory created the post correctly. $post = get_post( $test_post ); $this->assertEquals( $user_id, $post->post_author ); From 43d2455dc68072fdd43c3c800cc8c32590f23cbe Mon Sep 17 00:00:00 2001 From: hellofromTonya Date: Wed, 3 Jan 2024 22:11:01 +0000 Subject: [PATCH 04/35] Fonts: Fix font_style typo in wp_print_font_faces(). Changes `font_style` to `font-style` to reflect the CSS property. Follow-up to [56540]. Props tmatsuur, rajinsharwar, audrasjb. Fixes #59858. git-svn-id: https://develop.svn.wordpress.org/trunk@57240 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/fonts.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/fonts.php b/src/wp-includes/fonts.php index 306364bdc8099..87503c275f390 100644 --- a/src/wp-includes/fonts.php +++ b/src/wp-includes/fonts.php @@ -22,7 +22,7 @@ * @type array $font_variation { * @type string $font-family The font-family property. * @type string|string[] $src The URL(s) to each resource containing the font data. - * @type string $font_style Optional. The font-style property. Default 'normal'. + * @type string $font-style Optional. The font-style property. Default 'normal'. * @type string $font-weight Optional. The font-weight property. Default '400'. * @type string $font-display Optional. The font-display property. Default 'fallback'. * @type string $ascent-override Optional. The ascent-override property. From e43275b61c6e3a8d5657b6d21eb99bf1bafd52b2 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 4 Jan 2024 11:45:31 +0000 Subject: [PATCH 05/35] Tests: Add a unit test for post trash hooks executed when trashing a changeset. The test ensures that the correct number of arguments is passed to post trash hooks in `WP_Customize_Manager::trash_changeset_post()`, which bypasses `wp_trash_post()`. Follow-up to [56043], [57238]. See #60183. git-svn-id: https://develop.svn.wordpress.org/trunk@57241 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/customize/manager.php | 38 +++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/tests/phpunit/tests/customize/manager.php b/tests/phpunit/tests/customize/manager.php index 9f0ff383ed0e8..1da0bf6e8584f 100644 --- a/tests/phpunit/tests/customize/manager.php +++ b/tests/phpunit/tests/customize/manager.php @@ -2150,6 +2150,44 @@ public function test_trash_changeset_post_preserves_properties() { $this->assertSame( $args['post_content'], $post->post_content ); } + /** + * Test that trash_changeset_post() passes the correct number of arguments to post trash hooks. + * + * @covers WP_Customize_Manager::trash_changeset_post + */ + public function test_trash_changeset_post_passes_all_arguments_to_trash_hooks() { + $args = array( + 'post_type' => 'customize_changeset', + 'post_content' => wp_json_encode( + array( + 'blogname' => array( + 'value' => 'Test', + ), + ) + ), + 'post_name' => wp_generate_uuid4(), + 'post_status' => 'draft', + ); + + $post_id = wp_insert_post( $args ); + + $manager = $this->create_test_manager( $args['post_name'] ); + + $pre_trash_post = new MockAction(); + $wp_trash_post = new MockAction(); + $trashed_post = new MockAction(); + + add_action( 'pre_trash_post', array( $pre_trash_post, 'action' ), 10, 3 ); + add_action( 'wp_trash_post', array( $wp_trash_post, 'action' ), 10, 2 ); + add_action( 'trashed_post', array( $trashed_post, 'action' ), 10, 2 ); + + $manager->trash_changeset_post( $post_id ); + + $this->assertCount( 3, $pre_trash_post->get_args()[0] ); + $this->assertCount( 2, $wp_trash_post->get_args()[0] ); + $this->assertCount( 2, $trashed_post->get_args()[0] ); + } + /** * Register scratchpad setting. * From cb85d888a0eee6f8d1636a4a8219127698a07423 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 5 Jan 2024 11:38:34 +0000 Subject: [PATCH 06/35] Tests: Add a `@ticket` reference for `WP_Customize_Manager::trash_changeset_post()` test. Follow-up to [56043], [57238], [57241]. Props mukesh27. See #60183. git-svn-id: https://develop.svn.wordpress.org/trunk@57242 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/customize/manager.php | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/phpunit/tests/customize/manager.php b/tests/phpunit/tests/customize/manager.php index 1da0bf6e8584f..0f8ddb2d9bbf3 100644 --- a/tests/phpunit/tests/customize/manager.php +++ b/tests/phpunit/tests/customize/manager.php @@ -2153,6 +2153,7 @@ public function test_trash_changeset_post_preserves_properties() { /** * Test that trash_changeset_post() passes the correct number of arguments to post trash hooks. * + * @ticket 60183 * @covers WP_Customize_Manager::trash_changeset_post */ public function test_trash_changeset_post_passes_all_arguments_to_trash_hooks() { From 15637fa436f394406679cd7ba48355456da7e19a Mon Sep 17 00:00:00 2001 From: Colin Stewart Date: Sat, 6 Jan 2024 09:45:44 +0000 Subject: [PATCH 07/35] Docs: Fix typo in `twentyten_header_image_height` filter's docblock. This corrects a minor typo from "defaul" to "default" in the docblock of the `twentyten_header_image_height` filter. Props mukesh27. See #59651. git-svn-id: https://develop.svn.wordpress.org/trunk@57243 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-content/themes/twentyten/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-content/themes/twentyten/functions.php b/src/wp-content/themes/twentyten/functions.php index eb4fe64ef3a19..c2baec76eff4d 100644 --- a/src/wp-content/themes/twentyten/functions.php +++ b/src/wp-content/themes/twentyten/functions.php @@ -172,7 +172,7 @@ function twentyten_setup() { */ 'width' => apply_filters( 'twentyten_header_image_width', 940 ), /** - * Filters the Twenty Ten defaul header image height. + * Filters the Twenty Ten default header image height. * * @since Twenty Ten 1.0 * From b9ca649f3b7749a7dd40fdf1b31962b3c83b3b86 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sat, 6 Jan 2024 12:59:49 +0000 Subject: [PATCH 08/35] Tests: Use `assertSame()` in some newly introduced tests. This ensures that not only the return values match the expected results, but also that their type is the same. Going forward, stricter type checking by using `assertSame()` should generally be preferred to `assertEquals()` where appropriate, to make the tests more reliable. Follow-up to [55859], [56380], [56802], [57115], [57129], [57185]. See #59655. git-svn-id: https://develop.svn.wordpress.org/trunk@57244 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/ajax/wpAjaxImageEditor.php | 2 +- tests/phpunit/tests/ajax/wpAjaxInlineSave.php | 8 ++++---- tests/phpunit/tests/dependencies/scripts.php | 2 +- .../tests/html-api/wpHtmlProcessorSemanticRules.php | 6 +++--- tests/phpunit/tests/theme.php | 8 ++++---- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/tests/phpunit/tests/ajax/wpAjaxImageEditor.php b/tests/phpunit/tests/ajax/wpAjaxImageEditor.php index ac761c3520341..89745d645883c 100644 --- a/tests/phpunit/tests/ajax/wpAjaxImageEditor.php +++ b/tests/phpunit/tests/ajax/wpAjaxImageEditor.php @@ -52,7 +52,7 @@ public function testCropImageIntoLargerOne() { $ret = wp_save_image( $id ); $this->assertObjectHasProperty( 'error', $ret ); - $this->assertEquals( 'Images cannot be scaled to a size larger than the original.', $ret->error ); + $this->assertSame( 'Images cannot be scaled to a size larger than the original.', $ret->error ); } /** diff --git a/tests/phpunit/tests/ajax/wpAjaxInlineSave.php b/tests/phpunit/tests/ajax/wpAjaxInlineSave.php index 2edd630de8c64..afb73e6dcff61 100644 --- a/tests/phpunit/tests/ajax/wpAjaxInlineSave.php +++ b/tests/phpunit/tests/ajax/wpAjaxInlineSave.php @@ -110,7 +110,7 @@ public function test_quick_edit_draft_should_not_set_publish_date() { $this->assertSame( 'draft', $post->post_status ); - $this->assertEquals( '0000-00-00 00:00:00', $post->post_date_gmt ); + $this->assertSame( '0000-00-00 00:00:00', $post->post_date_gmt ); // Set up a request. $_POST['_inline_edit'] = wp_create_nonce( 'inlineeditnonce' ); @@ -142,7 +142,7 @@ public function test_quick_edit_draft_should_not_set_publish_date() { $post_date = sprintf( '%04d-%02d-%02d %02d:%02d:%02d', $_POST['aa'], $_POST['mm'], $_POST['jj'], $_POST['hh'], $_POST['mn'], $_POST['ss'] ); - $this->assertEquals( '0000-00-00 00:00:00', $post->post_date_gmt ); + $this->assertSame( '0000-00-00 00:00:00', $post->post_date_gmt ); } /** @@ -167,7 +167,7 @@ public function test_quick_edit_draft_should_set_publish_date() { $this->assertSame( 'draft', $post->post_status ); - $this->assertEquals( '0000-00-00 00:00:00', $post->post_date_gmt ); + $this->assertSame( '0000-00-00 00:00:00', $post->post_date_gmt ); // Set up a request. $_POST['_inline_edit'] = wp_create_nonce( 'inlineeditnonce' ); @@ -197,6 +197,6 @@ public function test_quick_edit_draft_should_set_publish_date() { $post = get_post( $post->ID ); - $this->assertEquals( '2020-09-11 19:20:11', $post->post_date_gmt ); + $this->assertSame( '2020-09-11 19:20:11', $post->post_date_gmt ); } } diff --git a/tests/phpunit/tests/dependencies/scripts.php b/tests/phpunit/tests/dependencies/scripts.php index 9021397e3b94c..228077188067b 100644 --- a/tests/phpunit/tests/dependencies/scripts.php +++ b/tests/phpunit/tests/dependencies/scripts.php @@ -3366,7 +3366,7 @@ public function test_wp_default_packages_vendor( $script ) { wp_default_packages_vendor( $wp_scripts ); - $this->assertEquals( $package_json[ $script ], $wp_scripts->query( $script, 'registered' )->ver ); + $this->assertSame( $package_json[ $script ], $wp_scripts->query( $script, 'registered' )->ver ); } public function data_wp_default_packages_vendor() { diff --git a/tests/phpunit/tests/html-api/wpHtmlProcessorSemanticRules.php b/tests/phpunit/tests/html-api/wpHtmlProcessorSemanticRules.php index 7bd243d8dce9a..bd3996d51d7b7 100644 --- a/tests/phpunit/tests/html-api/wpHtmlProcessorSemanticRules.php +++ b/tests/phpunit/tests/html-api/wpHtmlProcessorSemanticRules.php @@ -35,7 +35,7 @@ public function test_in_body_article_group_closes_open_p_element( $tag_name ) { continue; } - $this->assertEquals( + $this->assertSame( $tag_name, $processor->get_tag(), "Expected to find {$tag_name} but found {$processor->get_tag()} instead." @@ -125,7 +125,7 @@ public function test_in_body_skips_unexpected_button_closer() { $p = WP_HTML_Processor::create_fragment( '
Test
' ); $p->step(); - $this->assertEquals( 'DIV', $p->get_tag(), 'Did not stop at initial DIV tag.' ); + $this->assertSame( 'DIV', $p->get_tag(), 'Did not stop at initial DIV tag.' ); $this->assertFalse( $p->is_tag_closer(), 'Did not find that initial DIV tag is an opener.' ); /* @@ -133,7 +133,7 @@ public function test_in_body_skips_unexpected_button_closer() { * It should be ignored as there's no BUTTON to close. */ $this->assertTrue( $p->step(), 'Found no further tags when it should have found the closing DIV' ); - $this->assertEquals( 'DIV', $p->get_tag(), "Did not skip unexpected BUTTON; stopped at {$p->get_tag()}." ); + $this->assertSame( 'DIV', $p->get_tag(), "Did not skip unexpected BUTTON; stopped at {$p->get_tag()}." ); $this->assertTrue( $p->is_tag_closer(), 'Did not find that the terminal DIV tag is a closer.' ); } diff --git a/tests/phpunit/tests/theme.php b/tests/phpunit/tests/theme.php index cf5ea9ad6c208..a70bf9e7ff60a 100644 --- a/tests/phpunit/tests/theme.php +++ b/tests/phpunit/tests/theme.php @@ -1259,8 +1259,8 @@ function () use ( $new_root ) { // Cleanup. switch_theme( $old_theme->get_stylesheet() ); - $this->assertEquals( $old_root . '/test', $path1, 'The original stylesheet path is not correct' ); - $this->assertEquals( $new_root . '/test', $path2, 'The new stylesheet path is not correct' ); + $this->assertSame( $old_root . '/test', $path1, 'The original stylesheet path is not correct' ); + $this->assertSame( $new_root . '/test', $path2, 'The new stylesheet path is not correct' ); } /** @@ -1302,7 +1302,7 @@ function () use ( $new_root ) { // Cleanup. switch_theme( $old_theme->get_stylesheet() ); - $this->assertEquals( $old_root . '/test-parent', $path1, 'The original template path is not correct' ); - $this->assertEquals( $new_root . '/test-parent', $path2, 'The new template path is not correct' ); + $this->assertSame( $old_root . '/test-parent', $path1, 'The original template path is not correct' ); + $this->assertSame( $new_root . '/test-parent', $path2, 'The new template path is not correct' ); } } From 4c90a9118af455ad98e0a2d86a4295b87cef1f4f Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 7 Jan 2024 16:07:47 +0000 Subject: [PATCH 09/35] Site Health: Include site ID in debug data on multisite installations. Follow-up to [44986]. Props sebastienserre, mukesh27. Fixes #60081. git-svn-id: https://develop.svn.wordpress.org/trunk@57245 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/class-wp-debug-data.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/wp-admin/includes/class-wp-debug-data.php b/src/wp-admin/includes/class-wp-debug-data.php index d83c8737685eb..ed6a9e75a47b3 100644 --- a/src/wp-admin/includes/class-wp-debug-data.php +++ b/src/wp-admin/includes/class-wp-debug-data.php @@ -381,6 +381,14 @@ public static function debug_data() { // Conditionally add debug information for multisite setups. if ( is_multisite() ) { + $site_id = get_current_blog_id(); + + $info['wp-core']['fields']['site_id'] = array( + 'label' => __( 'Site ID' ), + 'value' => $site_id, + 'debug' => $site_id, + ); + $network_query = new WP_Network_Query(); $network_ids = $network_query->query( array( From f7041f1cbfdfc50cf02174a8313f8a6f0a2078bf Mon Sep 17 00:00:00 2001 From: Isabel Brison Date: Mon, 8 Jan 2024 06:12:00 +0000 Subject: [PATCH 10/35] Editor: add layout classes to legacy Group inner container. Moves generated layout classes into the Group block inner container in classic themes, so that block gap support can work correctly. Props flixos90, mukesh27. Fixes #60130. git-svn-id: https://develop.svn.wordpress.org/trunk@57246 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/block-supports/layout.php | 36 +++++++- tests/phpunit/tests/block-supports/layout.php | 90 +++++++++++++++++++ 2 files changed, 122 insertions(+), 4 deletions(-) diff --git a/src/wp-includes/block-supports/layout.php b/src/wp-includes/block-supports/layout.php index 70d1fe4255fdd..67d6a3f1b77ac 100644 --- a/src/wp-includes/block-supports/layout.php +++ b/src/wp-includes/block-supports/layout.php @@ -638,7 +638,7 @@ function wp_render_layout_support_flag( $block_content, $block ) { * for features like the enhanced pagination of the Query block. */ $container_class = wp_unique_prefixed_id( - 'wp-container-' . sanitize_title( $block['blockName'] ) . '-layout-' + 'wp-container-' . sanitize_title( $block['blockName'] ) . '-is-layout-' ); // Set the correct layout type for blocks using legacy content width. @@ -883,17 +883,45 @@ function wp_restore_group_inner_container( $block_content, $block ) { return $block_content; } - $replace_regex = sprintf( + /* + * This filter runs after the layout classnames have been added to the block, so they + * have to be removed from the outer wrapper and then added to the inner. + */ + $layout_classes = array(); + $processor = new WP_HTML_Tag_Processor( $block_content ); + + if ( $processor->next_tag( array( 'class_name' => 'wp-block-group' ) ) ) { + foreach ( $processor->class_list() as $class_name ) { + if ( str_contains( $class_name, 'is-layout-' ) ) { + $layout_classes[] = $class_name; + $processor->remove_class( $class_name ); + } + } + } + + $content_without_layout_classes = $processor->get_updated_html(); + $replace_regex = sprintf( '/(^\s*<%1$s\b[^>]*wp-block-group[^>]*>)(.*)(<\/%1$s>\s*$)/ms', preg_quote( $tag_name, '/' ) ); - $updated_content = preg_replace_callback( + $updated_content = preg_replace_callback( $replace_regex, static function ( $matches ) { return $matches[1] . '
' . $matches[2] . '
' . $matches[3]; }, - $block_content + $content_without_layout_classes ); + + // Add layout classes to inner wrapper. + if ( ! empty( $layout_classes ) ) { + $processor = new WP_HTML_Tag_Processor( $updated_content ); + if ( $processor->next_tag( array( 'class_name' => 'wp-block-group__inner-container' ) ) ) { + foreach ( $layout_classes as $class_name ) { + $processor->add_class( $class_name ); + } + } + $updated_content = $processor->get_updated_html(); + } return $updated_content; } diff --git a/tests/phpunit/tests/block-supports/layout.php b/tests/phpunit/tests/block-supports/layout.php index df0abf9b49922..379c10fe2b566 100644 --- a/tests/phpunit/tests/block-supports/layout.php +++ b/tests/phpunit/tests/block-supports/layout.php @@ -252,4 +252,94 @@ public function data_layout_support_flag_renders_classnames_on_wrapper() { ), ); } + + /** + * Check that wp_restore_group_inner_container() restores the legacy inner container on the Group block. + * + * @ticket 60130 + * + * @covers ::wp_restore_group_inner_container + * + * @dataProvider data_restore_group_inner_container + * + * @param array $args Dataset to test. + * @param string $expected_output The expected output. + */ + public function test_restore_group_inner_container( $args, $expected_output ) { + $actual_output = wp_restore_group_inner_container( $args['block_content'], $args['block'] ); + $this->assertEquals( $expected_output, $actual_output ); + } + + /** + * Data provider for test_restore_group_inner_container. + * + * @return array + */ + public function data_restore_group_inner_container() { + return array( + 'group block with existing inner container' => array( + 'args' => array( + 'block_content' => '
', + 'block' => array( + 'blockName' => 'core/group', + 'attrs' => array( + 'layout' => array( + 'type' => 'default', + ), + ), + 'innerBlocks' => array(), + 'innerHTML' => '
', + 'innerContent' => array( + '
', + ' ', + '
', + ), + ), + ), + 'expected_output' => '
', + ), + 'group block with no existing inner container' => array( + 'args' => array( + 'block_content' => '
', + 'block' => array( + 'blockName' => 'core/group', + 'attrs' => array( + 'layout' => array( + 'type' => 'default', + ), + ), + 'innerBlocks' => array(), + 'innerHTML' => '
', + 'innerContent' => array( + '
', + ' ', + '
', + ), + ), + ), + 'expected_output' => '
', + ), + 'group block with layout classnames' => array( + 'args' => array( + 'block_content' => '
', + 'block' => array( + 'blockName' => 'core/group', + 'attrs' => array( + 'layout' => array( + 'type' => 'default', + ), + ), + 'innerBlocks' => array(), + 'innerHTML' => '
', + 'innerContent' => array( + '
', + ' ', + '
', + ), + ), + ), + 'expected_output' => '
', + ), + ); + } } From b315d4ec015572f17848cad3960b20b7cd4da0f1 Mon Sep 17 00:00:00 2001 From: Isabel Brison Date: Mon, 8 Jan 2024 06:21:02 +0000 Subject: [PATCH 11/35] Editor: add setting to disable layout content and wide size controls. Adds support for an `allowCustomContentAndWideSize` setting in `WP_Theme_JSON` valid settings. Props andrewserong. Fixes #60133. git-svn-id: https://develop.svn.wordpress.org/trunk@57247 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class-wp-theme-json.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/wp-includes/class-wp-theme-json.php b/src/wp-includes/class-wp-theme-json.php index 9fea12a8d3e99..4826de8648acd 100644 --- a/src/wp-includes/class-wp-theme-json.php +++ b/src/wp-includes/class-wp-theme-json.php @@ -344,6 +344,7 @@ class WP_Theme_JSON { * @since 6.3.0 Added support for `typography.textColumns`, removed `layout.definitions`. * @since 6.4.0 Added support for `layout.allowEditing`, `background.backgroundImage`, * `typography.writingMode`, `lightbox.enabled` and `lightbox.allowEditing`. + * @since 6.5.0 Added support for `layout.allowCustomContentAndWideSize`. * @var array */ const VALID_SETTINGS = array( @@ -380,9 +381,10 @@ class WP_Theme_JSON { 'minHeight' => null, ), 'layout' => array( - 'contentSize' => null, - 'wideSize' => null, - 'allowEditing' => null, + 'contentSize' => null, + 'wideSize' => null, + 'allowEditing' => null, + 'allowCustomContentAndWideSize' => null, ), 'lightbox' => array( 'enabled' => null, From 8b2ed2fe62785a298e12e153ebd0e24d4512c6b9 Mon Sep 17 00:00:00 2001 From: bernhard-reiter Date: Mon, 8 Jan 2024 14:03:40 +0000 Subject: [PATCH 12/35] HTML API: Add explicit handling or failure for all tags. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The HTML API HTML processor does not yet support all tags. Many tags (e.g. list elements) have some complicated rules in the [https://html.spec.whatwg.org/#parsing-main-inbody "in body" insertion mode]. Implementing these special rules is blocking the implementation for a catch-all rule for "any other tag" because we need to prevent special rules from being handled by the catch-all. Any other start tag Reconstruct the active formatting elements, if any. Insert an HTML element for the token. … This change ensures the HTML Processor fails when handling special tags. This is the same as existing behavior, but will allow us to implement the catch-all "any other tag" handling without unintentionally handling special elements. Additionally, we add tests that assert the special elements are unhandled. As these tags are implemented, this should help to ensure they're removed from the unsupported tag list. Props jonsurrell, dmsnell. Fixes #60092. git-svn-id: https://develop.svn.wordpress.org/trunk@57248 602fd350-edb4-49c9-b593-d223f7449a82 --- .../html-api/class-wp-html-processor.php | 153 ++++++++++++++---- .../tests/html-api/wpHtmlProcessor.php | 108 +++++++++++-- .../html-api/wpHtmlProcessorBreadcrumbs.php | 78 ++++----- .../wpHtmlSupportRequiredOpenElements.php | 105 ++++-------- 4 files changed, 290 insertions(+), 154 deletions(-) diff --git a/src/wp-includes/html-api/class-wp-html-processor.php b/src/wp-includes/html-api/class-wp-html-processor.php index e46c368c702d4..41823af00ff93 100644 --- a/src/wp-includes/html-api/class-wp-html-processor.php +++ b/src/wp-includes/html-api/class-wp-html-processor.php @@ -100,15 +100,19 @@ * The following list specifies the HTML tags that _are_ supported: * * - Containers: ADDRESS, BLOCKQUOTE, DETAILS, DIALOG, DIV, FOOTER, HEADER, MAIN, MENU, SPAN, SUMMARY. - * - Form elements: BUTTON, FIELDSET, SEARCH. + * - Custom elements: All custom elements are supported. :) + * - Form elements: BUTTON, DATALIST, FIELDSET, LABEL, LEGEND, METER, PROGRESS, SEARCH. * - Formatting elements: B, BIG, CODE, EM, FONT, I, SMALL, STRIKE, STRONG, TT, U. * - Heading elements: H1, H2, H3, H4, H5, H6, HGROUP. * - Links: A. * - Lists: DL. - * - Media elements: FIGCAPTION, FIGURE, IMG. + * - Media elements: AUDIO, CANVAS, FIGCAPTION, FIGURE, IMG, MAP, PICTURE, VIDEO. * - Paragraph: P. - * - Sectioning elements: ARTICLE, ASIDE, NAV, SECTION - * - Deprecated elements: CENTER, DIR + * - Phrasing elements: ABBR, BDI, BDO, CITE, DATA, DEL, DFN, INS, MARK, OUTPUT, Q, SAMP, SUB, SUP, TIME, VAR. + * - Sectioning elements: ARTICLE, ASIDE, NAV, SECTION. + * - Templating elements: SLOT. + * - Text decoration: RUBY. + * - Deprecated elements: ACRONYM, BLINK, CENTER, DIR, ISINDEX, MULTICOL, NEXTID, SPACER. * * ### Supported markup * @@ -830,41 +834,132 @@ private function step_in_body() { $this->reconstruct_active_formatting_elements(); $this->insert_html_element( $this->state->current_token ); return true; + } + + /* + * These tags require special handling in the 'in body' insertion mode + * but that handling hasn't yet been implemented. + * + * As the rules for each tag are implemented, the corresponding tag + * name should be removed from this list. An accompanying test should + * help ensure this list is maintained. + * + * @see Tests_HtmlApi_WpHtmlProcessor::test_step_in_body_fails_on_unsupported_tags + * + * Since this switch structure throws a WP_HTML_Unsupported_Exception, it's + * possible to handle "any other start tag" and "any other end tag" below, + * as that guarantees execution doesn't proceed for the unimplemented tags. + * + * @see https://html.spec.whatwg.org/multipage/parsing.html#parsing-main-inbody + */ + switch ( $tag_name ) { + case 'APPLET': + case 'AREA': + case 'BASE': + case 'BASEFONT': + case 'BGSOUND': + case 'BODY': + case 'BR': + case 'CAPTION': + case 'COL': + case 'COLGROUP': + case 'DD': + case 'DT': + case 'EMBED': + case 'FORM': + case 'FRAME': + case 'FRAMESET': + case 'HEAD': + case 'HR': + case 'HTML': + case 'IFRAME': + case 'INPUT': + case 'KEYGEN': + case 'LI': + case 'LINK': + case 'LISTING': + case 'MARQUEE': + case 'MATH': + case 'META': + case 'NOBR': + case 'NOEMBED': + case 'NOFRAMES': + case 'NOSCRIPT': + case 'OBJECT': + case 'OL': + case 'OPTGROUP': + case 'OPTION': + case 'PARAM': + case 'PLAINTEXT': + case 'PRE': + case 'RB': + case 'RP': + case 'RT': + case 'RTC': + case 'SARCASM': + case 'SCRIPT': + case 'SELECT': + case 'SOURCE': + case 'STYLE': + case 'SVG': + case 'TABLE': + case 'TBODY': + case 'TD': + case 'TEMPLATE': + case 'TEXTAREA': + case 'TFOOT': + case 'TH': + case 'THEAD': + case 'TITLE': + case 'TR': + case 'TRACK': + case 'UL': + case 'WBR': + case 'XMP': + $this->last_error = self::ERROR_UNSUPPORTED; + throw new WP_HTML_Unsupported_Exception( "Cannot process {$tag_name} element." ); + } + if ( ! $this->is_tag_closer() ) { /* * > Any other start tag */ - case '+SPAN': - $this->reconstruct_active_formatting_elements(); - $this->insert_html_element( $this->state->current_token ); - return true; + $this->reconstruct_active_formatting_elements(); + $this->insert_html_element( $this->state->current_token ); + return true; + } else { + /* + * > Any other end tag + */ /* - * Any other end tag + * Find the corresponding tag opener in the stack of open elements, if + * it exists before reaching a special element, which provides a kind + * of boundary in the stack. For example, a `` should not + * close anything beyond its containing `P` or `DIV` element. */ - case '-SPAN': - foreach ( $this->state->stack_of_open_elements->walk_up() as $item ) { - // > If node is an HTML element with the same tag name as the token, then: - if ( $item->node_name === $tag_name ) { - $this->generate_implied_end_tags( $tag_name ); + foreach ( $this->state->stack_of_open_elements->walk_up() as $node ) { + if ( $tag_name === $node->node_name ) { + break; + } - // > If node is not the current node, then this is a parse error. + if ( self::is_special( $node->node_name ) ) { + // This is a parse error, ignore the token. + return $this->step(); + } + } - $this->state->stack_of_open_elements->pop_until( $tag_name ); - return true; - } + $this->generate_implied_end_tags( $tag_name ); + if ( $node !== $this->state->stack_of_open_elements->current_node() ) { + // @todo Record parse error: this error doesn't impact parsing. + } - // > Otherwise, if node is in the special category, then this is a parse error; ignore the token, and return. - if ( self::is_special( $item->node_name ) ) { - return $this->step(); - } + foreach ( $this->state->stack_of_open_elements->walk_up() as $item ) { + $this->state->stack_of_open_elements->pop(); + if ( $node === $item ) { + return true; } - // Execution should not reach here; if it does then something went wrong. - return false; - - default: - $this->last_error = self::ERROR_UNSUPPORTED; - throw new WP_HTML_Unsupported_Exception( "Cannot process {$tag_name} element." ); + } } } @@ -1264,7 +1359,7 @@ private function run_adoption_agency_algorithm() { // > If formatting element is not in the stack of open elements, then this is a parse error; remove the element from the list, and return. if ( ! $this->state->stack_of_open_elements->contains_node( $formatting_element ) ) { - $this->state->active_formatting_elements->remove_node( $formatting_element->bookmark_name ); + $this->state->active_formatting_elements->remove_node( $formatting_element ); return; } diff --git a/tests/phpunit/tests/html-api/wpHtmlProcessor.php b/tests/phpunit/tests/html-api/wpHtmlProcessor.php index a9af5d790fc53..2e5565c9734fa 100644 --- a/tests/phpunit/tests/html-api/wpHtmlProcessor.php +++ b/tests/phpunit/tests/html-api/wpHtmlProcessor.php @@ -60,22 +60,6 @@ public function test_get_tag_is_null_once_document_is_finished() { $this->assertNull( $p->get_tag() ); } - /** - * Ensures that if the HTML Processor encounters inputs that it can't properly handle, - * that it stops processing the rest of the document. This prevents data corruption. - * - * @ticket 59167 - * - * @covers WP_HTML_Processor::next_tag - */ - public function test_stops_processing_after_unsupported_elements() { - $p = WP_HTML_Processor::create_fragment( '

' ); - $p->next_tag( 'P' ); - $this->assertFalse( $p->next_tag(), 'Stepped into a tag after encountering X-NOT-SUPPORTED element when it should have aborted.' ); - $this->assertNull( $p->get_tag(), "Should have aborted processing, but still reported tag {$p->get_tag()} after properly failing to step into tag." ); - $this->assertFalse( $p->next_tag( 'P' ), 'Stepped into normal P element after X-NOT-SUPPORTED element when it should have aborted.' ); - } - /** * Ensures that the HTML Processor maintains its internal state through seek calls. * @@ -147,4 +131,96 @@ public function test_fails_to_reconstruct_formatting_elements() { $this->assertTrue( $p->next_tag( 'EM' ), 'Could not find first EM.' ); $this->assertFalse( $p->next_tag( 'EM' ), 'Should have aborted before finding second EM as it required reconstructing the first EM.' ); } + + /** + * Ensures that special handling of unsupported tags is cleaned up + * as handling is implemented. Otherwise there's risk of leaving special + * handling (that is never reached) when tag handling is implemented. + * + * @ticket 60092 + * + * @dataProvider data_unsupported_special_in_body_tags + * + * @covers WP_HTML_Processor::step_in_body + * + * @param string $tag_name Name of the tag to test. + */ + public function test_step_in_body_fails_on_unsupported_tags( $tag_name ) { + $fragment = WP_HTML_Processor::create_fragment( '<' . $tag_name . '>' ); + $this->assertFalse( $fragment->next_tag(), 'Should fail to find tag: ' . $tag_name . '.' ); + $this->assertEquals( $fragment->get_last_error(), WP_HTML_Processor::ERROR_UNSUPPORTED, 'Should have unsupported last error.' ); + } + + /** + * Data provider. + * + * @return array[] + */ + public function data_unsupported_special_in_body_tags() { + return array( + 'APPLET' => array( 'APPLET' ), + 'AREA' => array( 'AREA' ), + 'BASE' => array( 'BASE' ), + 'BASEFONT' => array( 'BASEFONT' ), + 'BGSOUND' => array( 'BGSOUND' ), + 'BODY' => array( 'BODY' ), + 'BR' => array( 'BR' ), + 'CAPTION' => array( 'CAPTION' ), + 'COL' => array( 'COL' ), + 'COLGROUP' => array( 'COLGROUP' ), + 'DD' => array( 'DD' ), + 'DT' => array( 'DT' ), + 'EMBED' => array( 'EMBED' ), + 'FORM' => array( 'FORM' ), + 'FRAME' => array( 'FRAME' ), + 'FRAMESET' => array( 'FRAMESET' ), + 'HEAD' => array( 'HEAD' ), + 'HR' => array( 'HR' ), + 'HTML' => array( 'HTML' ), + 'IFRAME' => array( 'IFRAME' ), + 'INPUT' => array( 'INPUT' ), + 'KEYGEN' => array( 'KEYGEN' ), + 'LI' => array( 'LI' ), + 'LINK' => array( 'LINK' ), + 'LISTING' => array( 'LISTING' ), + 'MARQUEE' => array( 'MARQUEE' ), + 'MATH' => array( 'MATH' ), + 'META' => array( 'META' ), + 'NOBR' => array( 'NOBR' ), + 'NOEMBED' => array( 'NOEMBED' ), + 'NOFRAMES' => array( 'NOFRAMES' ), + 'NOSCRIPT' => array( 'NOSCRIPT' ), + 'OBJECT' => array( 'OBJECT' ), + 'OL' => array( 'OL' ), + 'OPTGROUP' => array( 'OPTGROUP' ), + 'OPTION' => array( 'OPTION' ), + 'PARAM' => array( 'PARAM' ), + 'PLAINTEXT' => array( 'PLAINTEXT' ), + 'PRE' => array( 'PRE' ), + 'RB' => array( 'RB' ), + 'RP' => array( 'RP' ), + 'RT' => array( 'RT' ), + 'RTC' => array( 'RTC' ), + 'SARCASM' => array( 'SARCASM' ), + 'SCRIPT' => array( 'SCRIPT' ), + 'SELECT' => array( 'SELECT' ), + 'SOURCE' => array( 'SOURCE' ), + 'STYLE' => array( 'STYLE' ), + 'SVG' => array( 'SVG' ), + 'TABLE' => array( 'TABLE' ), + 'TBODY' => array( 'TBODY' ), + 'TD' => array( 'TD' ), + 'TEMPLATE' => array( 'TEMPLATE' ), + 'TEXTAREA' => array( 'TEXTAREA' ), + 'TFOOT' => array( 'TFOOT' ), + 'TH' => array( 'TH' ), + 'THEAD' => array( 'THEAD' ), + 'TITLE' => array( 'TITLE' ), + 'TR' => array( 'TR' ), + 'TRACK' => array( 'TRACK' ), + 'UL' => array( 'UL' ), + 'WBR' => array( 'WBR' ), + 'XMP' => array( 'XMP' ), + ); + } } diff --git a/tests/phpunit/tests/html-api/wpHtmlProcessorBreadcrumbs.php b/tests/phpunit/tests/html-api/wpHtmlProcessorBreadcrumbs.php index 2fd852e434412..3b339e4f82ee9 100644 --- a/tests/phpunit/tests/html-api/wpHtmlProcessorBreadcrumbs.php +++ b/tests/phpunit/tests/html-api/wpHtmlProcessorBreadcrumbs.php @@ -37,14 +37,26 @@ public function test_navigates_into_normative_html_for_supported_elements( $html public function data_single_tag_of_supported_elements() { $supported_elements = array( 'A', + 'ABBR', + 'ACRONYM', // Neutralized 'ADDRESS', 'ARTICLE', 'ASIDE', + 'AUDIO', 'B', + 'BDI', + 'BDO', 'BIG', + 'BLINK', // Deprecated 'BUTTON', + 'CANVAS', 'CENTER', // Neutralized + 'CITE', 'CODE', + 'DATA', + 'DATALIST', + 'DFN', + 'DEL', 'DETAILS', 'DIALOG', 'DIR', @@ -66,19 +78,42 @@ public function data_single_tag_of_supported_elements() { 'HGROUP', 'I', 'IMG', + 'INS', + 'ISINDEX', // Deprecated + 'KBD', + 'LABEL', + 'LEGEND', 'MAIN', + 'MAP', + 'MARK', 'MENU', + 'METER', + 'MULTICOL', // Deprecated 'NAV', + 'NEXTID', // Deprecated + 'OUTPUT', 'P', + 'PICTURE', + 'PROGRESS', + 'Q', + 'RUBY', + 'SAMP', 'SEARCH', 'SECTION', + 'SLOT', 'SMALL', + 'SPACER', // Deprecated 'SPAN', 'STRIKE', 'STRONG', + 'SUB', 'SUMMARY', + 'SUP', + 'TIME', 'TT', 'U', + 'VAR', + 'VIDEO', ); $data = array(); @@ -121,28 +156,16 @@ public function test_fails_when_encountering_unsupported_tag( $html ) { */ public function data_unsupported_elements() { $unsupported_elements = array( - 'ABBR', - 'ACRONYM', // Neutralized 'APPLET', // Deprecated 'AREA', - 'AUDIO', 'BASE', - 'BDI', - 'BDO', 'BGSOUND', // Deprecated; self-closing if self-closing flag provided, otherwise normal. - 'BLINK', // Deprecated 'BODY', 'BR', - 'CANVAS', 'CAPTION', - 'CITE', 'COL', 'COLGROUP', - 'DATA', - 'DATALIST', 'DD', - 'DEL', - 'DEFN', 'DT', 'EMBED', 'FORM', @@ -153,23 +176,13 @@ public function data_unsupported_elements() { 'HTML', 'IFRAME', 'INPUT', - 'INS', - 'ISINDEX', // Deprecated - 'KBD', 'KEYGEN', // Deprecated; void - 'LABEL', - 'LEGEND', 'LI', 'LINK', 'LISTING', // Deprecated, use PRE instead. - 'MAP', - 'MARK', 'MARQUEE', // Deprecated 'MATH', 'META', - 'METER', - 'MULTICOL', // Deprecated - 'NEXTID', // Deprecated 'NOBR', // Neutralized 'NOEMBED', // Neutralized 'NOFRAMES', // Neutralized @@ -178,26 +191,16 @@ public function data_unsupported_elements() { 'OL', 'OPTGROUP', 'OPTION', - 'OUTPUT', - 'PICTURE', 'PLAINTEXT', // Neutralized 'PRE', - 'PROGRESS', - 'Q', 'RB', // Neutralized 'RP', 'RT', 'RTC', // Neutralized - 'RUBY', - 'SAMP', 'SCRIPT', 'SELECT', - 'SLOT', 'SOURCE', - 'SPACER', // Deprecated 'STYLE', - 'SUB', - 'SUP', 'SVG', 'TABLE', 'TBODY', @@ -207,19 +210,12 @@ public function data_unsupported_elements() { 'TFOOT', 'TH', 'THEAD', - 'TIME', 'TITLE', 'TR', 'TRACK', 'UL', - 'VAR', - 'VIDEO', 'WBR', 'XMP', // Deprecated, use PRE instead. - - // Made up elements, custom elements. - 'X-NOT-AN-HTML-ELEMENT', - 'HUMAN-TIME', ); $data = array(); @@ -360,6 +356,10 @@ public function data_html_target_with_breadcrumbs() { 'H4 inside H2' => array( '

Major

Minor

', array( 'HTML', 'BODY', 'H2', 'SPAN', 'H4' ), 1 ), 'H5 after unclosed H4 inside H2' => array( '

Major

Minor

', array( 'HTML', 'BODY', 'H2', 'SPAN', 'H5' ), 1 ), 'H5 after H4 inside H2' => array( '

Major

Minor

', array( 'HTML', 'BODY', 'H5' ), 1 ), + + // Custom elements. + 'WP-EMOJI' => array( '
', array( 'HTML', 'BODY', 'DIV', 'WP-EMOJI' ), 1 ), + 'WP-EMOJI then IMG' => array( '
', array( 'HTML', 'BODY', 'DIV', 'IMG' ), 1 ), ); } diff --git a/tests/phpunit/tests/html-api/wpHtmlSupportRequiredOpenElements.php b/tests/phpunit/tests/html-api/wpHtmlSupportRequiredOpenElements.php index 9dbb689df0329..a0c9c600c1e45 100644 --- a/tests/phpunit/tests/html-api/wpHtmlSupportRequiredOpenElements.php +++ b/tests/phpunit/tests/html-api/wpHtmlSupportRequiredOpenElements.php @@ -72,21 +72,16 @@ public function test_has_element_in_scope_needs_support() { $this->ensure_support_is_added_everywhere( 'OBJECT' ); $this->ensure_support_is_added_everywhere( 'TEMPLATE' ); - // MathML Elements - $this->ensure_support_is_added_everywhere( 'MI' ); - $this->ensure_support_is_added_everywhere( 'MO' ); - $this->ensure_support_is_added_everywhere( 'MN' ); - $this->ensure_support_is_added_everywhere( 'MS' ); - $this->ensure_support_is_added_everywhere( 'MTEXT' ); - $this->ensure_support_is_added_everywhere( 'ANNOTATION-XML' ); + // MathML Elements: MI, MO, MN, MS, MTEXT, ANNOTATION-XML. + $this->ensure_support_is_added_everywhere( 'MATH' ); /* * SVG elements: note that TITLE is both an HTML element and an SVG element * so care must be taken when adding support for either one. + * + * FOREIGNOBJECT, DESC, TITLE. */ - $this->ensure_support_is_added_everywhere( 'FOREIGNOBJECT' ); - $this->ensure_support_is_added_everywhere( 'DESC' ); - $this->ensure_support_is_added_everywhere( 'TITLE' ); + $this->ensure_support_is_added_everywhere( 'SVG' ); } /** @@ -115,21 +110,16 @@ public function test_has_element_in_list_item_scope_needs_support() { $this->ensure_support_is_added_everywhere( 'OBJECT' ); $this->ensure_support_is_added_everywhere( 'TEMPLATE' ); - // MathML Elements - $this->ensure_support_is_added_everywhere( 'MI' ); - $this->ensure_support_is_added_everywhere( 'MO' ); - $this->ensure_support_is_added_everywhere( 'MN' ); - $this->ensure_support_is_added_everywhere( 'MS' ); - $this->ensure_support_is_added_everywhere( 'MTEXT' ); - $this->ensure_support_is_added_everywhere( 'ANNOTATION-XML' ); + // MathML Elements: MI, MO, MN, MS, MTEXT, ANNOTATION-XML. + $this->ensure_support_is_added_everywhere( 'MATH' ); /* * SVG elements: note that TITLE is both an HTML element and an SVG element * so care must be taken when adding support for either one. + * + * FOREIGNOBJECT, DESC, TITLE. */ - $this->ensure_support_is_added_everywhere( 'FOREIGNOBJECT' ); - $this->ensure_support_is_added_everywhere( 'DESC' ); - $this->ensure_support_is_added_everywhere( 'TITLE' ); + $this->ensure_support_is_added_everywhere( 'SVG' ); // These elements are specific to list item scope. $this->ensure_support_is_added_everywhere( 'OL' ); @@ -161,21 +151,16 @@ public function test_has_element_in_button_scope_needs_support() { $this->ensure_support_is_added_everywhere( 'OBJECT' ); $this->ensure_support_is_added_everywhere( 'TEMPLATE' ); - // MathML Elements - $this->ensure_support_is_added_everywhere( 'MI' ); - $this->ensure_support_is_added_everywhere( 'MO' ); - $this->ensure_support_is_added_everywhere( 'MN' ); - $this->ensure_support_is_added_everywhere( 'MS' ); - $this->ensure_support_is_added_everywhere( 'MTEXT' ); - $this->ensure_support_is_added_everywhere( 'ANNOTATION-XML' ); + // MathML Elements: MI, MO, MN, MS, MTEXT, ANNOTATION-XML. + $this->ensure_support_is_added_everywhere( 'MATH' ); /* * SVG elements: note that TITLE is both an HTML element and an SVG element * so care must be taken when adding support for either one. + * + * FOREIGNOBJECT, DESC, TITLE. */ - $this->ensure_support_is_added_everywhere( 'FOREIGNOBJECT' ); - $this->ensure_support_is_added_everywhere( 'DESC' ); - $this->ensure_support_is_added_everywhere( 'TITLE' ); + $this->ensure_support_is_added_everywhere( 'SVG' ); } /** @@ -201,21 +186,16 @@ public function test_after_element_pop_must_maintain_p_in_button_scope_flag() { $this->ensure_support_is_added_everywhere( 'OBJECT' ); $this->ensure_support_is_added_everywhere( 'TEMPLATE' ); - // MathML Elements - $this->ensure_support_is_added_everywhere( 'MI' ); - $this->ensure_support_is_added_everywhere( 'MO' ); - $this->ensure_support_is_added_everywhere( 'MN' ); - $this->ensure_support_is_added_everywhere( 'MS' ); - $this->ensure_support_is_added_everywhere( 'MTEXT' ); - $this->ensure_support_is_added_everywhere( 'ANNOTATION-XML' ); + // MathML Elements: MI, MO, MN, MS, MTEXT, ANNOTATION-XML. + $this->ensure_support_is_added_everywhere( 'MATH' ); /* * SVG elements: note that TITLE is both an HTML element and an SVG element * so care must be taken when adding support for either one. + * + * FOREIGNOBJECT, DESC, TITLE. */ - $this->ensure_support_is_added_everywhere( 'FOREIGNOBJECT' ); - $this->ensure_support_is_added_everywhere( 'DESC' ); - $this->ensure_support_is_added_everywhere( 'TITLE' ); + $this->ensure_support_is_added_everywhere( 'SVG' ); } /** @@ -241,21 +221,16 @@ public function test_after_element_push_must_maintain_p_in_button_scope_flag() { $this->ensure_support_is_added_everywhere( 'OBJECT' ); $this->ensure_support_is_added_everywhere( 'TEMPLATE' ); - // MathML Elements - $this->ensure_support_is_added_everywhere( 'MI' ); - $this->ensure_support_is_added_everywhere( 'MO' ); - $this->ensure_support_is_added_everywhere( 'MN' ); - $this->ensure_support_is_added_everywhere( 'MS' ); - $this->ensure_support_is_added_everywhere( 'MTEXT' ); - $this->ensure_support_is_added_everywhere( 'ANNOTATION-XML' ); + // MathML Elements: MI, MO, MN, MS, MTEXT, ANNOTATION-XML. + $this->ensure_support_is_added_everywhere( 'MATH' ); /* * SVG elements: note that TITLE is both an HTML element and an SVG element * so care must be taken when adding support for either one. + * + * FOREIGNOBJECT, DESC, TITLE. */ - $this->ensure_support_is_added_everywhere( 'FOREIGNOBJECT' ); - $this->ensure_support_is_added_everywhere( 'DESC' ); - $this->ensure_support_is_added_everywhere( 'TITLE' ); + $this->ensure_support_is_added_everywhere( 'SVG' ); } /** @@ -280,21 +255,16 @@ public function test_has_element_in_table_scope_needs_support() { $this->ensure_support_is_added_everywhere( 'OBJECT' ); $this->ensure_support_is_added_everywhere( 'TEMPLATE' ); - // MathML Elements - $this->ensure_support_is_added_everywhere( 'MI' ); - $this->ensure_support_is_added_everywhere( 'MO' ); - $this->ensure_support_is_added_everywhere( 'MN' ); - $this->ensure_support_is_added_everywhere( 'MS' ); - $this->ensure_support_is_added_everywhere( 'MTEXT' ); - $this->ensure_support_is_added_everywhere( 'ANNOTATION-XML' ); + // MathML Elements: MI, MO, MN, MS, MTEXT, ANNOTATION-XML. + $this->ensure_support_is_added_everywhere( 'MATH' ); /* * SVG elements: note that TITLE is both an HTML element and an SVG element * so care must be taken when adding support for either one. + * + * FOREIGNOBJECT, DESC, TITLE. */ - $this->ensure_support_is_added_everywhere( 'FOREIGNOBJECT' ); - $this->ensure_support_is_added_everywhere( 'DESC' ); - $this->ensure_support_is_added_everywhere( 'TITLE' ); + $this->ensure_support_is_added_everywhere( 'SVG' ); // These elements are specific to TABLE scope. $this->ensure_support_is_added_everywhere( 'HTML' ); @@ -335,21 +305,16 @@ public function test_has_element_in_select_scope_needs_support() { $this->ensure_support_is_added_everywhere( 'OBJECT' ); $this->ensure_support_is_added_everywhere( 'TEMPLATE' ); - // MathML Elements - $this->ensure_support_is_added_everywhere( 'MI' ); - $this->ensure_support_is_added_everywhere( 'MO' ); - $this->ensure_support_is_added_everywhere( 'MN' ); - $this->ensure_support_is_added_everywhere( 'MS' ); - $this->ensure_support_is_added_everywhere( 'MTEXT' ); - $this->ensure_support_is_added_everywhere( 'ANNOTATION-XML' ); + // MathML Elements: MI, MO, MN, MS, MTEXT, ANNOTATION-XML. + $this->ensure_support_is_added_everywhere( 'MATH' ); /* * SVG elements: note that TITLE is both an HTML element and an SVG element * so care must be taken when adding support for either one. + * + * FOREIGNOBJECT, DESC, TITLE. */ - $this->ensure_support_is_added_everywhere( 'FOREIGNOBJECT' ); - $this->ensure_support_is_added_everywhere( 'DESC' ); - $this->ensure_support_is_added_everywhere( 'TITLE' ); + $this->ensure_support_is_added_everywhere( 'SVG' ); // These elements are specific to SELECT scope. $this->ensure_support_is_added_everywhere( 'OPTGROUP' ); From cc645160ab91289af4ebc036956be71a582d8595 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Mon, 8 Jan 2024 15:49:27 +0000 Subject: [PATCH 13/35] Build/Test Tools: Remove `svn` debug command. SVN support has officially been sunset by GitHub. While SVN was not has not been utilized in GitHub Action workflows, the version of SVN being used has been output for debugging purposes. This removes those debug lines to prevent encountering failures as new versions of test runners are pushed out without `svn` installed. See https://github.blog/changelog/2024-01-08-subversion-has-been-sunset/. See #59805. git-svn-id: https://develop.svn.wordpress.org/trunk@57249 602fd350-edb4-49c9-b593-d223f7449a82 --- .github/workflows/callable-test-core-build-process.yml | 1 - .github/workflows/callable-test-gutenberg-build-process.yml | 1 - .github/workflows/coding-standards.yml | 1 - .github/workflows/end-to-end-tests.yml | 1 - .github/workflows/javascript-tests.yml | 1 - .github/workflows/performance.yml | 1 - .github/workflows/phpunit-tests-run.yml | 1 - .github/workflows/test-coverage.yml | 1 - 8 files changed, 8 deletions(-) diff --git a/.github/workflows/callable-test-core-build-process.yml b/.github/workflows/callable-test-core-build-process.yml index a9523ec34300a..bf566e7782241 100644 --- a/.github/workflows/callable-test-core-build-process.yml +++ b/.github/workflows/callable-test-core-build-process.yml @@ -58,7 +58,6 @@ jobs: node --version curl --version git --version - svn --version - name: Install npm Dependencies run: npm ci diff --git a/.github/workflows/callable-test-gutenberg-build-process.yml b/.github/workflows/callable-test-gutenberg-build-process.yml index ef41cff56ed75..0e747a059a93a 100644 --- a/.github/workflows/callable-test-gutenberg-build-process.yml +++ b/.github/workflows/callable-test-gutenberg-build-process.yml @@ -69,7 +69,6 @@ jobs: node --version curl --version git --version - svn --version - name: Install Core Dependencies run: npm ci diff --git a/.github/workflows/coding-standards.yml b/.github/workflows/coding-standards.yml index c09703167f1cd..393c7d1d7b013 100644 --- a/.github/workflows/coding-standards.yml +++ b/.github/workflows/coding-standards.yml @@ -162,7 +162,6 @@ jobs: npm --version node --version git --version - svn --version - name: Install npm Dependencies run: npm ci diff --git a/.github/workflows/end-to-end-tests.yml b/.github/workflows/end-to-end-tests.yml index 25f37b5d4b046..344201d2572d5 100644 --- a/.github/workflows/end-to-end-tests.yml +++ b/.github/workflows/end-to-end-tests.yml @@ -87,7 +87,6 @@ jobs: node --version curl --version git --version - svn --version locale -a - name: Install npm Dependencies diff --git a/.github/workflows/javascript-tests.yml b/.github/workflows/javascript-tests.yml index ce3536b84f796..1826b03041b9d 100644 --- a/.github/workflows/javascript-tests.yml +++ b/.github/workflows/javascript-tests.yml @@ -77,7 +77,6 @@ jobs: npm --version node --version git --version - svn --version - name: Install npm Dependencies run: npm ci diff --git a/.github/workflows/performance.yml b/.github/workflows/performance.yml index 356d5f77244e5..900b77417b400 100644 --- a/.github/workflows/performance.yml +++ b/.github/workflows/performance.yml @@ -121,7 +121,6 @@ jobs: node --version curl --version git --version - svn --version locale -a - name: Install npm dependencies diff --git a/.github/workflows/phpunit-tests-run.yml b/.github/workflows/phpunit-tests-run.yml index d47db28696382..bebd1e3a29d23 100644 --- a/.github/workflows/phpunit-tests-run.yml +++ b/.github/workflows/phpunit-tests-run.yml @@ -124,7 +124,6 @@ jobs: node --version curl --version git --version - svn --version composer --version locale -a diff --git a/.github/workflows/test-coverage.yml b/.github/workflows/test-coverage.yml index 82449a8f0e374..5d1e6b2f2af85 100644 --- a/.github/workflows/test-coverage.yml +++ b/.github/workflows/test-coverage.yml @@ -117,7 +117,6 @@ jobs: node --version curl --version git --version - svn --version composer --version locale -a From 71cb3f861573f065c6d7d7ef1975bf98532239b4 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Mon, 8 Jan 2024 18:36:56 +0000 Subject: [PATCH 14/35] Build/Test Tools: Increase the max old space size in Node. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Test Build Processes workflow started failing recently on MacOS runners due to “JavaScript heap out of memory” errors (see https://github.com/WordPress/wordpress-develop/actions/runs/7421385568/job/20209241826#step:8:82). This increases the maximum memory size of the old memory section in Node from the default of 4GB to 8GB (specified in megabytes) to avoid unnecessary failures while ways to optimize the Gutenberg build process are explored. Props dmsnell, joemcgill, hellofromTonya, isabel_brison. See #59805. git-svn-id: https://develop.svn.wordpress.org/trunk@57250 602fd350-edb4-49c9-b593-d223f7449a82 --- .github/workflows/callable-test-gutenberg-build-process.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/callable-test-gutenberg-build-process.yml b/.github/workflows/callable-test-gutenberg-build-process.yml index 0e747a059a93a..ed45a4f2ac032 100644 --- a/.github/workflows/callable-test-gutenberg-build-process.yml +++ b/.github/workflows/callable-test-gutenberg-build-process.yml @@ -20,6 +20,7 @@ on: env: GUTENBERG_DIRECTORY: ${{ inputs.directory == 'build' && 'build' || 'src' }}/wp-content/plugins/gutenberg PUPPETEER_SKIP_DOWNLOAD: ${{ true }} + NODE_OPTIONS: '--max-old-space-size=8192' jobs: # Verifies that installing npm dependencies and building the Gutenberg plugin works as expected. From 868f2ef1fdfbf8873487f655862d1c1987a1d4ff Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 8 Jan 2024 22:42:49 +0000 Subject: [PATCH 15/35] Taxonomy: Check for empty term after DB sanitization in `wp_insert_term()`. When inserting a new term in the database, `wp_insert_term()` will check if the term is empty and return a corresponding error. Afterwards the term is sanitized and inserted in the database. However, there is a chance the term is empty after the DB sanitization. This commit adds a check for an empty term name after the term is sanitized, returning an error in that case. Follow-up to [5726], [8393]. Props fgiannar, kraftbj. Fixes #59995. git-svn-id: https://develop.svn.wordpress.org/trunk@57251 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/taxonomy.php | 5 +++++ tests/phpunit/tests/term/wpInsertTerm.php | 13 +++++++++++++ 2 files changed, 18 insertions(+) diff --git a/src/wp-includes/taxonomy.php b/src/wp-includes/taxonomy.php index eaadaad65c4af..b64a2f08db3ee 100644 --- a/src/wp-includes/taxonomy.php +++ b/src/wp-includes/taxonomy.php @@ -2434,6 +2434,11 @@ function wp_insert_term( $term, $taxonomy, $args = array() ) { $description = wp_unslash( $args['description'] ); $parent = (int) $args['parent']; + // Sanitization could clean the name to an empty string that must be checked again. + if ( '' === $name ) { + return new WP_Error( 'invalid_term_name', __( 'Invalid term name.' ) ); + } + $slug_provided = ! empty( $args['slug'] ); if ( ! $slug_provided ) { $slug = sanitize_title( $name ); diff --git a/tests/phpunit/tests/term/wpInsertTerm.php b/tests/phpunit/tests/term/wpInsertTerm.php index d99593b1d5f2e..798db9233bfc8 100644 --- a/tests/phpunit/tests/term/wpInsertTerm.php +++ b/tests/phpunit/tests/term/wpInsertTerm.php @@ -895,6 +895,19 @@ public function test_wp_insert_term_with_null_description() { $this->assertSame( '', $term_object->description ); } + /** + * @ticket 59995 + */ + public function test_wp_insert_term_with_empty_name_after_db_sanitization() { + $term = wp_insert_term( + '', + 'post_tag' + ); + + $this->assertWPError( $term ); + $this->assertSame( 'invalid_term_name', $term->get_error_code() ); + } + /** Helpers */ public function deleted_term_cb( $term, $tt_id, $taxonomy, $deleted_term, $object_ids ) { From fa421cac119b52e458a1778c8604bdcdb22b633f Mon Sep 17 00:00:00 2001 From: Aaron Jorbin Date: Mon, 8 Jan 2024 23:17:48 +0000 Subject: [PATCH 16/35] Upgrade/Install: Check theme compatibility during bulk upgrades. Previously, bulk upgrades did not verify that a theme package was compatible with the site's WordPress version or the server's PHP version. This was previusly done for plugins in #59198, but themes were missed. Follow-up to: [56525]. Props salcode, lakshmananphp. Fixes #59758. git-svn-id: https://develop.svn.wordpress.org/trunk@57252 602fd350-edb4-49c9-b593-d223f7449a82 --- .../includes/class-theme-upgrader.php | 68 ++++++++++++++----- 1 file changed, 52 insertions(+), 16 deletions(-) diff --git a/src/wp-admin/includes/class-theme-upgrader.php b/src/wp-admin/includes/class-theme-upgrader.php index b1cf6778396b3..869bf64220fdf 100644 --- a/src/wp-admin/includes/class-theme-upgrader.php +++ b/src/wp-admin/includes/class-theme-upgrader.php @@ -371,6 +371,8 @@ public function upgrade( $theme, $args = array() ) { * @since 3.0.0 * @since 3.7.0 The `$args` parameter was added, making clearing the update cache optional. * + * @global string $wp_version The WordPress version string. + * * @param string[] $themes Array of the theme slugs. * @param array $args { * Optional. Other arguments for upgrading several themes at once. Default empty array. @@ -381,6 +383,8 @@ public function upgrade( $theme, $args = array() ) { * @return array[]|false An array of results, or false if unable to connect to the filesystem. */ public function bulk_upgrade( $themes, $args = array() ) { + global $wp_version; + $defaults = array( 'clear_update_cache' => true, ); @@ -442,23 +446,55 @@ public function bulk_upgrade( $themes, $args = array() ) { // Get the URL to the zip file. $r = $current->response[ $theme ]; - $result = $this->run( - array( - 'package' => $r['package'], - 'destination' => get_theme_root( $theme ), - 'clear_destination' => true, - 'clear_working' => true, - 'is_multi' => true, - 'hook_extra' => array( - 'theme' => $theme, - 'temp_backup' => array( - 'slug' => $theme, - 'src' => get_theme_root( $theme ), - 'dir' => 'themes', + if ( isset( $r['requires'] ) && ! is_wp_version_compatible( $r['requires'] ) ) { + $result = new WP_Error( + 'incompatible_wp_required_version', + sprintf( + /* translators: 1: Current WordPress version, 2: WordPress version required by the new theme version. */ + __( 'Your WordPress version is %1$s, however the new theme version requires %2$s.' ), + $wp_version, + $r['requires'] + ) + ); + + $this->skin->before( $result ); + $this->skin->error( $result ); + $this->skin->after(); + } elseif ( isset( $r['requires_php'] ) && ! is_php_version_compatible( $r['requires_php'] ) ) { + $result = new WP_Error( + 'incompatible_php_required_version', + sprintf( + /* translators: 1: Current PHP version, 2: PHP version required by the new theme version. */ + __( 'The PHP version on your server is %1$s, however the new theme version requires %2$s.' ), + PHP_VERSION, + $r['requires_php'] + ) + ); + + $this->skin->before( $result ); + $this->skin->error( $result ); + $this->skin->after(); + } else { + add_filter( 'upgrader_source_selection', array( $this, 'check_package' ) ); + $result = $this->run( + array( + 'package' => $r['package'], + 'destination' => get_theme_root( $theme ), + 'clear_destination' => true, + 'clear_working' => true, + 'is_multi' => true, + 'hook_extra' => array( + 'theme' => $theme, + 'temp_backup' => array( + 'slug' => $theme, + 'src' => get_theme_root( $theme ), + 'dir' => 'themes', + ), ), - ), - ) - ); + ) + ); + remove_filter( 'upgrader_source_selection', array( $this, 'check_package' ) ); + } $results[ $theme ] = $result; From 2d764b410183b3230f8b8f94cbf3ed9b7983c5ab Mon Sep 17 00:00:00 2001 From: Isabel Brison Date: Tue, 9 Jan 2024 02:43:48 +0000 Subject: [PATCH 17/35] Editor: add CSS var parsing for fontSize and fontFamily. Adds capability to parse CSS custom properties for fontSize and fontFamily in `WP_Style_Engine`. Props ramonopoly. Fixes #59982. git-svn-id: https://develop.svn.wordpress.org/trunk@57253 602fd350-edb4-49c9-b593-d223f7449a82 --- .../style-engine/class-wp-style-engine.php | 6 ++++++ tests/phpunit/tests/style-engine/styleEngine.php | 15 +++++++++++---- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/src/wp-includes/style-engine/class-wp-style-engine.php b/src/wp-includes/style-engine/class-wp-style-engine.php index 121bac2d927ba..12a6ea844123d 100644 --- a/src/wp-includes/style-engine/class-wp-style-engine.php +++ b/src/wp-includes/style-engine/class-wp-style-engine.php @@ -215,6 +215,9 @@ final class WP_Style_Engine { 'default' => 'font-size', ), 'path' => array( 'typography', 'fontSize' ), + 'css_vars' => array( + 'font-size' => '--wp--preset--font-size--$slug', + ), 'classnames' => array( 'has-$slug-font-size' => 'font-size', ), @@ -223,6 +226,9 @@ final class WP_Style_Engine { 'property_keys' => array( 'default' => 'font-family', ), + 'css_vars' => array( + 'font-family' => '--wp--preset--font-family--$slug', + ), 'path' => array( 'typography', 'fontFamily' ), 'classnames' => array( 'has-$slug-font-family' => 'font-family', diff --git a/tests/phpunit/tests/style-engine/styleEngine.php b/tests/phpunit/tests/style-engine/styleEngine.php index b1a01563c2097..e4551eccf7694 100644 --- a/tests/phpunit/tests/style-engine/styleEngine.php +++ b/tests/phpunit/tests/style-engine/styleEngine.php @@ -252,19 +252,26 @@ public function data_wp_style_engine_get_styles() { 'elements_with_css_var_value' => array( 'block_styles' => array( - 'color' => array( + 'color' => array( 'text' => 'var:preset|color|my-little-pony', ), + 'typography' => array( + 'fontSize' => 'var:preset|font-size|cabbage-patch', + 'fontFamily' => 'var:preset|font-family|transformers', + ), ), 'options' => array( 'selector' => '.wp-selector', ), 'expected_output' => array( - 'css' => '.wp-selector{color:var(--wp--preset--color--my-little-pony);}', + 'css' => '.wp-selector{color:var(--wp--preset--color--my-little-pony);font-size:var(--wp--preset--font-size--cabbage-patch);font-family:var(--wp--preset--font-family--transformers);}', 'declarations' => array( - 'color' => 'var(--wp--preset--color--my-little-pony)', + 'color' => 'var(--wp--preset--color--my-little-pony)', + 'font-size' => 'var(--wp--preset--font-size--cabbage-patch)', + 'font-family' => 'var(--wp--preset--font-family--transformers)', + ), - 'classnames' => 'has-text-color has-my-little-pony-color', + 'classnames' => 'has-text-color has-my-little-pony-color has-cabbage-patch-font-size has-transformers-font-family', ), ), From 15b5be2acd8bb2a30964331b9ca3ac395cd56ed4 Mon Sep 17 00:00:00 2001 From: Isabel Brison Date: Tue, 9 Jan 2024 06:10:09 +0000 Subject: [PATCH 18/35] Editor: add size and repeat to background image support. Adds background size and background repeat style processing to the background image block support and `WP_Style_Engine` definitions. Props andrewserong, mukesh27. Fixes #60175. git-svn-id: https://develop.svn.wordpress.org/trunk@57254 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/block-supports/background.php | 24 ++++++++++++++-- src/wp-includes/class-wp-theme-json.php | 6 +++- .../style-engine/class-wp-style-engine.php | 17 +++++++++-- .../wpRenderBackgroundSupport.php | 28 +++++++++++++++---- .../tests/style-engine/styleEngine.php | 15 ++++++---- tests/phpunit/tests/theme/wpThemeJson.php | 2 ++ 6 files changed, 77 insertions(+), 15 deletions(-) diff --git a/src/wp-includes/block-supports/background.php b/src/wp-includes/block-supports/background.php index a8de0c6b63b20..283833991f57b 100644 --- a/src/wp-includes/block-supports/background.php +++ b/src/wp-includes/block-supports/background.php @@ -40,6 +40,7 @@ function wp_register_background_support( $block_type ) { * it is also applied to non-server-rendered blocks. * * @since 6.4.0 + * @since 6.5.0 Added support for `backgroundPosition` and `backgroundRepeat` output. * @access private * * @param string $block_content Rendered block content. @@ -64,9 +65,20 @@ function wp_render_background_support( $block_content, $block ) { $background_image_url = isset( $block_attributes['style']['background']['backgroundImage']['url'] ) ? $block_attributes['style']['background']['backgroundImage']['url'] : null; + + if ( ! $background_image_source && ! $background_image_url ) { + return $block_content; + } + $background_size = isset( $block_attributes['style']['background']['backgroundSize'] ) ? $block_attributes['style']['background']['backgroundSize'] : 'cover'; + $background_position = isset( $block_attributes['style']['background']['backgroundPosition'] ) + ? $block_attributes['style']['background']['backgroundPosition'] + : null; + $background_repeat = isset( $block_attributes['style']['background']['backgroundRepeat'] ) + ? $block_attributes['style']['background']['backgroundRepeat'] + : null; $background_block_styles = array(); @@ -76,8 +88,15 @@ function wp_render_background_support( $block_content, $block ) { ) { // Set file based background URL. $background_block_styles['backgroundImage']['url'] = $background_image_url; - // Only output the background size when an image url is set. - $background_block_styles['backgroundSize'] = $background_size; + // Only output the background size and repeat when an image url is set. + $background_block_styles['backgroundSize'] = $background_size; + $background_block_styles['backgroundRepeat'] = $background_repeat; + $background_block_styles['backgroundPosition'] = $background_position; + + // If the background size is set to `contain` and no position is set, set the position to `center`. + if ( 'contain' === $background_size && ! isset( $background_position ) ) { + $background_block_styles['backgroundPosition'] = 'center'; + } } $styles = wp_style_engine_get_styles( array( 'background' => $background_block_styles ) ); @@ -99,6 +118,7 @@ function wp_render_background_support( $block_content, $block ) { $updated_style .= $styles['css']; $tags->set_attribute( 'style', $updated_style ); + $tags->add_class( 'has-background' ); } return $tags->get_updated_html(); diff --git a/src/wp-includes/class-wp-theme-json.php b/src/wp-includes/class-wp-theme-json.php index 4826de8648acd..37f4d11ce9fb4 100644 --- a/src/wp-includes/class-wp-theme-json.php +++ b/src/wp-includes/class-wp-theme-json.php @@ -344,7 +344,8 @@ class WP_Theme_JSON { * @since 6.3.0 Added support for `typography.textColumns`, removed `layout.definitions`. * @since 6.4.0 Added support for `layout.allowEditing`, `background.backgroundImage`, * `typography.writingMode`, `lightbox.enabled` and `lightbox.allowEditing`. - * @since 6.5.0 Added support for `layout.allowCustomContentAndWideSize`. + * @since 6.5.0 Added support for `layout.allowCustomContentAndWideSize` and + * `background.backgroundSize`. * @var array */ const VALID_SETTINGS = array( @@ -352,6 +353,7 @@ class WP_Theme_JSON { 'useRootPaddingAwareAlignments' => null, 'background' => array( 'backgroundImage' => null, + 'backgroundSize' => null, ), 'border' => array( 'color' => null, @@ -573,10 +575,12 @@ public static function get_element_class_name( $element ) { * @since 6.0.0 * @since 6.2.0 Added `dimensions.minHeight` and `position.sticky`. * @since 6.4.0 Added `background.backgroundImage`. + * @since 6.5.0 Added `background.backgroundSize`. * @var array */ const APPEARANCE_TOOLS_OPT_INS = array( array( 'background', 'backgroundImage' ), + array( 'background', 'backgroundSize' ), array( 'border', 'color' ), array( 'border', 'radius' ), array( 'border', 'style' ), diff --git a/src/wp-includes/style-engine/class-wp-style-engine.php b/src/wp-includes/style-engine/class-wp-style-engine.php index 12a6ea844123d..790e33f38c0e3 100644 --- a/src/wp-includes/style-engine/class-wp-style-engine.php +++ b/src/wp-includes/style-engine/class-wp-style-engine.php @@ -23,6 +23,7 @@ * @since 6.1.0 * @since 6.3.0 Added support for text-columns. * @since 6.4.0 Added support for background.backgroundImage. + * @since 6.5.0 Added support for background.backgroundPosition and background.backgroundRepeat. */ #[AllowDynamicProperties] final class WP_Style_Engine { @@ -48,14 +49,26 @@ final class WP_Style_Engine { */ const BLOCK_STYLE_DEFINITIONS_METADATA = array( 'background' => array( - 'backgroundImage' => array( + 'backgroundImage' => array( 'property_keys' => array( 'default' => 'background-image', ), 'value_func' => array( self::class, 'get_url_or_value_css_declaration' ), 'path' => array( 'background', 'backgroundImage' ), ), - 'backgroundSize' => array( + 'backgroundPosition' => array( + 'property_keys' => array( + 'default' => 'background-position', + ), + 'path' => array( 'background', 'backgroundPosition' ), + ), + 'backgroundRepeat' => array( + 'property_keys' => array( + 'default' => 'background-repeat', + ), + 'path' => array( 'background', 'backgroundRepeat' ), + ), + 'backgroundSize' => array( 'property_keys' => array( 'default' => 'background-size', ), diff --git a/tests/phpunit/tests/block-supports/wpRenderBackgroundSupport.php b/tests/phpunit/tests/block-supports/wpRenderBackgroundSupport.php index 4f38db87ab317..83ea7cd47c972 100644 --- a/tests/phpunit/tests/block-supports/wpRenderBackgroundSupport.php +++ b/tests/phpunit/tests/block-supports/wpRenderBackgroundSupport.php @@ -67,6 +67,7 @@ public function filter_set_theme_root() { * Tests that background image block support works as expected. * * @ticket 59357 + * @ticket 60175 * * @covers ::wp_render_background_support * @@ -135,7 +136,24 @@ public function data_background_block_support() { 'source' => 'file', ), ), - 'expected_wrapper' => '
Content
', + 'expected_wrapper' => '
Content
', + 'wrapper' => '
Content
', + ), + 'background image style with contain, position, and repeat is applied' => array( + 'theme_name' => 'block-theme-child-with-fluid-typography', + 'block_name' => 'test/background-rules-are-output', + 'background_settings' => array( + 'backgroundImage' => true, + ), + 'background_style' => array( + 'backgroundImage' => array( + 'url' => 'https://example.com/image.jpg', + 'source' => 'file', + ), + 'backgroundRepeat' => 'no-repeat', + 'backgroundSize' => 'contain', + ), + 'expected_wrapper' => '
Content
', 'wrapper' => '
Content
', ), 'background image style is appended if a style attribute already exists' => array( @@ -150,8 +168,8 @@ public function data_background_block_support() { 'source' => 'file', ), ), - 'expected_wrapper' => '
Content
', - 'wrapper' => '
Content
', + 'expected_wrapper' => '
Content
', + 'wrapper' => '
Content
', ), 'background image style is appended if a style attribute containing multiple styles already exists' => array( 'theme_name' => 'block-theme-child-with-fluid-typography', @@ -165,8 +183,8 @@ public function data_background_block_support() { 'source' => 'file', ), ), - 'expected_wrapper' => '
Content
', - 'wrapper' => '
Content
', + 'expected_wrapper' => '
Content
', + 'wrapper' => '
Content
', ), 'background image style is not applied if the block does not support background image' => array( 'theme_name' => 'block-theme-child-with-fluid-typography', diff --git a/tests/phpunit/tests/style-engine/styleEngine.php b/tests/phpunit/tests/style-engine/styleEngine.php index e4551eccf7694..b208e4ef0575a 100644 --- a/tests/phpunit/tests/style-engine/styleEngine.php +++ b/tests/phpunit/tests/style-engine/styleEngine.php @@ -27,6 +27,7 @@ public function tear_down() { * @ticket 56467 * @ticket 58549 * @ticket 58590 + * @ticket 60175 * * @covers ::wp_style_engine_get_styles * @@ -520,18 +521,22 @@ public function data_wp_style_engine_get_styles() { 'inline_background_image_url_with_background_size' => array( 'block_styles' => array( 'background' => array( - 'backgroundImage' => array( + 'backgroundImage' => array( 'url' => 'https://example.com/image.jpg', ), - 'backgroundSize' => 'cover', + 'backgroundPosition' => 'center', + 'backgroundRepeat' => 'no-repeat', + 'backgroundSize' => 'cover', ), ), 'options' => array(), 'expected_output' => array( - 'css' => "background-image:url('https://example.com/image.jpg');background-size:cover;", + 'css' => "background-image:url('https://example.com/image.jpg');background-position:center;background-repeat:no-repeat;background-size:cover;", 'declarations' => array( - 'background-image' => "url('https://example.com/image.jpg')", - 'background-size' => 'cover', + 'background-image' => "url('https://example.com/image.jpg')", + 'background-position' => 'center', + 'background-repeat' => 'no-repeat', + 'background-size' => 'cover', ), ), ), diff --git a/tests/phpunit/tests/theme/wpThemeJson.php b/tests/phpunit/tests/theme/wpThemeJson.php index 6da723583ba45..49e1661844b10 100644 --- a/tests/phpunit/tests/theme/wpThemeJson.php +++ b/tests/phpunit/tests/theme/wpThemeJson.php @@ -264,6 +264,7 @@ public function test_get_settings_appearance_true_opts_in() { $expected = array( 'background' => array( 'backgroundImage' => true, + 'backgroundSize' => true, ), 'border' => array( 'width' => true, @@ -300,6 +301,7 @@ public function test_get_settings_appearance_true_opts_in() { 'core/group' => array( 'background' => array( 'backgroundImage' => true, + 'backgroundSize' => true, ), 'border' => array( 'width' => true, From cb564055e04ef607673a4bffe2d1359cafcd3abb Mon Sep 17 00:00:00 2001 From: Isabel Brison Date: Tue, 9 Jan 2024 06:24:44 +0000 Subject: [PATCH 19/35] Themes: Add theme support for appearance tools. Reapplies the patch reverted in #57649 as the original patch was no longer applying cleanly. Adds theme support for appearance tools to `WP_Theme_JSON_Resolver`. Props andrewserong, mukesh27, noisysocks. Fixes #60118. git-svn-id: https://develop.svn.wordpress.org/trunk@57255 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class-wp-theme-json-resolver.php | 5 +++++ tests/phpunit/tests/theme/wpThemeJsonResolver.php | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/src/wp-includes/class-wp-theme-json-resolver.php b/src/wp-includes/class-wp-theme-json-resolver.php index 90710a5c1b2f4..5a785612ce185 100644 --- a/src/wp-includes/class-wp-theme-json-resolver.php +++ b/src/wp-includes/class-wp-theme-json-resolver.php @@ -327,6 +327,11 @@ public static function get_theme_data( $deprecated = array(), $options = array() $theme_support_data['settings']['border']['style'] = true; $theme_support_data['settings']['border']['width'] = true; } + + // Allow themes to enable appearance tools via theme_support. + if ( current_theme_supports( 'appearance-tools' ) ) { + $theme_support_data['settings']['appearanceTools'] = true; + } } $with_theme_supports = new WP_Theme_JSON( $theme_support_data ); $with_theme_supports->merge( static::$theme ); diff --git a/tests/phpunit/tests/theme/wpThemeJsonResolver.php b/tests/phpunit/tests/theme/wpThemeJsonResolver.php index cc7cfa2f65238..dd5fff2bff8ef 100644 --- a/tests/phpunit/tests/theme/wpThemeJsonResolver.php +++ b/tests/phpunit/tests/theme/wpThemeJsonResolver.php @@ -433,6 +433,9 @@ public function data_get_core_data() { /** * @ticket 54336 + * @ticket 60118 + * + * @covers ::add_theme_support */ public function test_add_theme_supports_are_loaded_for_themes_without_theme_json() { switch_theme( 'default' ); @@ -455,15 +458,18 @@ public function test_add_theme_supports_are_loaded_for_themes_without_theme_json ); add_theme_support( 'editor-color-palette', $color_palette ); add_theme_support( 'custom-line-height' ); + add_theme_support( 'appearance-tools' ); $settings = WP_Theme_JSON_Resolver::get_theme_data()->get_settings(); remove_theme_support( 'custom-line-height' ); remove_theme_support( 'editor-color-palette' ); + remove_theme_support( 'appearance-tools' ); $this->assertFalse( wp_theme_has_theme_json() ); $this->assertTrue( $settings['typography']['lineHeight'] ); $this->assertSame( $color_palette, $settings['color']['palette']['theme'] ); + $this->assertTrue( $settings['border']['color'], 'Support for "appearance-tools" was not added.' ); } /** From 20f8b300cbc4c99ad58109506469849b7f983be2 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 9 Jan 2024 11:39:16 +0000 Subject: [PATCH 20/35] Docs: Add a mention of `appearance-tools` as a possible value for `add_theme_support()`. Follow-up to [57255]. See #60118. git-svn-id: https://develop.svn.wordpress.org/trunk@57256 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/theme.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/wp-includes/theme.php b/src/wp-includes/theme.php index 1638128b4cf26..040275e0f8377 100644 --- a/src/wp-includes/theme.php +++ b/src/wp-includes/theme.php @@ -2617,12 +2617,15 @@ function get_theme_starter_content() { * @since 5.6.0 The `post-formats` feature warns if no array is passed as the second parameter. * @since 5.8.0 The `widgets-block-editor` feature enables the Widgets block editor. * @since 6.0.0 The `html5` feature warns if no array is passed as the second parameter. + * @since 6.5.0 The `appearance-tools` feature enables a few design tools for blocks, + * see `WP_Theme_JSON::APPEARANCE_TOOLS_OPT_INS` for a complete list. * * @global array $_wp_theme_features * * @param string $feature The feature being added. Likely core values include: * - 'admin-bar' * - 'align-wide' + * - 'appearance-tools' * - 'automatic-feed-links' * - 'core-block-patterns' * - 'custom-background' From 52720efeced127ee3d58fb3c4ca23b38f396c35e Mon Sep 17 00:00:00 2001 From: Tonya Mork Date: Tue, 9 Jan 2024 16:32:14 +0000 Subject: [PATCH 21/35] Tests: Add hook priority call order tests. Adds happy (integer) and unhappy (non-integer) tests for validating the priority call order for: * `do_action()` * `WP_Hook::do_action()` * `apply_filters()` * `WP_Hook::apply_filters()` As each of these functions have differing code, the tests are added to each to ensure expected results and protect against future regressions. Follow-up to [53804], [52010], [25002], [25/tests], [62/tests]. Props hellofromTonya, mukesh27, dd32, valendesigns, drrobotnik. Fixes #60193. git-svn-id: https://develop.svn.wordpress.org/trunk@57257 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/actions.php | 138 +++++++++++++++++--- tests/phpunit/tests/filters.php | 142 +++++++++++++++++---- tests/phpunit/tests/hooks/applyFilters.php | 128 +++++++++++++++++++ tests/phpunit/tests/hooks/doAction.php | 128 +++++++++++++++++++ 4 files changed, 493 insertions(+), 43 deletions(-) diff --git a/tests/phpunit/tests/actions.php b/tests/phpunit/tests/actions.php index 8b57382b9c545..e25183f75913d 100644 --- a/tests/phpunit/tests/actions.php +++ b/tests/phpunit/tests/actions.php @@ -229,35 +229,133 @@ public function test_action_args_with_php4_syntax() { $this->assertSame( array( $val ), array_pop( $argsvar ) ); } - public function test_action_priority() { - $a = new MockAction(); + /** + * @ticket 60193 + * + * @dataProvider data_priority_callback_order_with_integers + * @dataProvider data_priority_callback_order_with_unhappy_path_nonintegers + * + * @covers ::do_action + * + * @param array $priorities { + * Indexed array of the priorities for the MockAction callbacks. + * + * @type mixed $0 Priority for 'action' callback. + * @type mixed $1 Priority for 'action2' callback. + * } + * @param array $expected_call_order An array of callback names in expected call order. + * @param string $expected_deprecation Optional. Deprecation message. Default ''. + */ + public function test_priority_callback_order( $priorities, $expected_call_order, $expected_deprecation = '' ) { + $mock = new MockAction(); $hook_name = __FUNCTION__; - add_action( $hook_name, array( &$a, 'action' ), 10 ); - add_action( $hook_name, array( &$a, 'action2' ), 9 ); + if ( $expected_deprecation && PHP_VERSION_ID >= 80100 ) { + $this->expectDeprecation(); + $this->expectDeprecationMessage( $expected_deprecation ); + } + + add_action( $hook_name, array( $mock, 'action' ), $priorities[0] ); + add_action( $hook_name, array( $mock, 'action2' ), $priorities[1] ); do_action( $hook_name ); - // Two events, one per action. - $this->assertSame( 2, $a->get_call_count() ); + $this->assertSame( 2, $mock->get_call_count(), 'The number of call counts does not match' ); + + $actual_call_order = wp_list_pluck( $mock->get_events(), 'action' ); + $this->assertSame( $expected_call_order, $actual_call_order, 'The action callback order does not match the expected order' ); + } - $expected = array( - // 'action2' is called first because it has priority 9. - array( - 'action' => 'action2', - 'hook_name' => $hook_name, - 'tag' => $hook_name, // Back compat. - 'args' => array( '' ), + /** + * Happy path data provider. + * + * @return array[] + */ + public function data_priority_callback_order_with_integers() { + return array( + 'int DESC' => array( + 'priorities' => array( 10, 9 ), + 'expected_call_order' => array( 'action2', 'action' ), ), - // 'action' is called second. - array( - 'action' => 'action', - 'hook_name' => $hook_name, - 'tag' => $hook_name, // Back compat. - 'args' => array( '' ), + 'int ASC' => array( + 'priorities' => array( 9, 10 ), + 'expected_call_order' => array( 'action', 'action2' ), ), ); + } + + /** + * Unhappy path data provider. + * + * @return array[] + */ + public function data_priority_callback_order_with_unhappy_path_nonintegers() { + return array( + // Numbers as strings and floats. + 'int as string DESC' => array( + 'priorities' => array( '10', '9' ), + 'expected_call_order' => array( 'action2', 'action' ), + ), + 'int as string ASC' => array( + 'priorities' => array( '9', '10' ), + 'expected_call_order' => array( 'action', 'action2' ), + ), + 'float DESC' => array( + 'priorities' => array( 10.0, 9.5 ), + 'expected_call_order' => array( 'action2', 'action' ), + 'expected_deprecation' => 'Implicit conversion from float 9.5 to int loses precision', + ), + 'float ASC' => array( + 'priorities' => array( 9.5, 10.0 ), + 'expected_call_order' => array( 'action', 'action2' ), + 'expected_deprecation' => 'Implicit conversion from float 9.5 to int loses precision', + ), + 'float as string DESC' => array( + 'priorities' => array( '10.0', '9.5' ), + 'expected_call_order' => array( 'action2', 'action' ), + ), + 'float as string ASC' => array( + 'priorities' => array( '9.5', '10.0' ), + 'expected_call_order' => array( 'action', 'action2' ), + ), - $this->assertSame( $expected, $a->get_events() ); + // Non-numeric. + 'null' => array( + 'priorities' => array( null, null ), + 'expected_call_order' => array( 'action', 'action2' ), + ), + 'bool DESC' => array( + 'priorities' => array( true, false ), + 'expected_call_order' => array( 'action2', 'action' ), + ), + 'bool ASC' => array( + 'priorities' => array( false, true ), + 'expected_call_order' => array( 'action', 'action2' ), + ), + 'non-numerical string DESC' => array( + 'priorities' => array( 'test1', 'test2' ), + 'expected_call_order' => array( 'action', 'action2' ), + ), + 'non-numerical string ASC' => array( + 'priorities' => array( 'test1', 'test2' ), + 'expected_call_order' => array( 'action', 'action2' ), + ), + 'int, non-numerical string DESC' => array( + 'priorities' => array( 10, 'test' ), + 'expected_call_order' => array( 'action2', 'action' ), + ), + 'int, non-numerical string ASC' => array( + 'priorities' => array( 'test', 10 ), + 'expected_call_order' => array( 'action', 'action2' ), + ), + 'float, non-numerical string DESC' => array( + 'priorities' => array( 10.0, 'test' ), + 'expected_call_order' => array( 'action2', 'action' ), + ), + 'float, non-numerical string ASC' => array( + 'priorities' => array( 'test', 10.0 ), + 'expected_call_order' => array( 'action', 'action2' ), + ), + ); } /** diff --git a/tests/phpunit/tests/filters.php b/tests/phpunit/tests/filters.php index 04a5f9e915030..6d512a19acb64 100644 --- a/tests/phpunit/tests/filters.php +++ b/tests/phpunit/tests/filters.php @@ -118,37 +118,133 @@ public function test_filter_args_2() { $this->assertSame( array( $val ), array_pop( $argsvar2 ) ); } - public function test_filter_priority() { - $a = new MockAction(); + /** + * @ticket 60193 + * + * @dataProvider data_priority_callback_order_with_integers + * @dataProvider data_priority_callback_order_with_unhappy_path_nonintegers + * + * @covers ::apply_filters + * + * @param array $priorities { + * Indexed array of the priorities for the MockAction callbacks. + * + * @type mixed $0 Priority for 'action' callback. + * @type mixed $1 Priority for 'action2' callback. + * } + * @param array $expected_call_order An array of callback names in expected call order. + * @param string $expected_deprecation Optional. Deprecation message. Default ''. + */ + public function test_priority_callback_order( $priorities, $expected_call_order, $expected_deprecation = '' ) { + $mock = new MockAction(); $hook_name = __FUNCTION__; - $val = __FUNCTION__ . '_val'; - // Make two filters with different priorities. - add_filter( $hook_name, array( $a, 'filter' ), 10 ); - add_filter( $hook_name, array( $a, 'filter2' ), 9 ); - $this->assertSame( $val, apply_filters( $hook_name, $val ) ); + if ( $expected_deprecation && PHP_VERSION_ID >= 80100 ) { + $this->expectDeprecation(); + $this->expectDeprecationMessage( $expected_deprecation ); + } + + add_filter( $hook_name, array( $mock, 'filter' ), $priorities[0] ); + add_filter( $hook_name, array( $mock, 'filter2' ), $priorities[1] ); + apply_filters( $hook_name, __FUNCTION__ . '_val' ); + + $this->assertSame( 2, $mock->get_call_count(), 'The number of call counts does not match' ); - // There should be two events, one per filter. - $this->assertSame( 2, $a->get_call_count() ); + $actual_call_order = wp_list_pluck( $mock->get_events(), 'filter' ); + $this->assertSame( $expected_call_order, $actual_call_order, 'The filter callback order does not match the expected order' ); + } - $expected = array( - // 'filter2' is called first because it has priority 9. - array( - 'filter' => 'filter2', - 'hook_name' => $hook_name, - 'tag' => $hook_name, // Back compat. - 'args' => array( $val ), + /** + * Happy path data provider. + * + * @return array[] + */ + public function data_priority_callback_order_with_integers() { + return array( + 'int DESC' => array( + 'priorities' => array( 10, 9 ), + 'expected_call_order' => array( 'filter2', 'filter' ), ), - // 'filter' is called second. - array( - 'filter' => 'filter', - 'hook_name' => $hook_name, - 'tag' => $hook_name, // Back compat. - 'args' => array( $val ), + 'int ASC' => array( + 'priorities' => array( 9, 10 ), + 'expected_call_order' => array( 'filter', 'filter2' ), ), ); + } - $this->assertSame( $expected, $a->get_events() ); + /** + * Unhappy path data provider. + * + * @return array[] + */ + public function data_priority_callback_order_with_unhappy_path_nonintegers() { + return array( + // Numbers as strings and floats. + 'int as string DESC' => array( + 'priorities' => array( '10', '9' ), + 'expected_call_order' => array( 'filter2', 'filter' ), + ), + 'int as string ASC' => array( + 'priorities' => array( '9', '10' ), + 'expected_call_order' => array( 'filter', 'filter2' ), + ), + 'float DESC' => array( + 'priorities' => array( 10.0, 9.5 ), + 'expected_call_order' => array( 'filter2', 'filter' ), + 'expected_deprecation' => 'Implicit conversion from float 9.5 to int loses precision', + ), + 'float ASC' => array( + 'priorities' => array( 9.5, 10.0 ), + 'expected_call_order' => array( 'filter', 'filter2' ), + 'expected_deprecation' => 'Implicit conversion from float 9.5 to int loses precision', + ), + 'float as string DESC' => array( + 'priorities' => array( '10.0', '9.5' ), + 'expected_call_order' => array( 'filter2', 'filter' ), + ), + 'float as string ASC' => array( + 'priorities' => array( '9.5', '10.0' ), + 'expected_call_order' => array( 'filter', 'filter2' ), + ), + + // Non-numeric. + 'null' => array( + 'priorities' => array( null, null ), + 'expected_call_order' => array( 'filter', 'filter2' ), + ), + 'bool DESC' => array( + 'priorities' => array( true, false ), + 'expected_call_order' => array( 'filter2', 'filter' ), + ), + 'bool ASC' => array( + 'priorities' => array( false, true ), + 'expected_call_order' => array( 'filter', 'filter2' ), + ), + 'non-numerical string DESC' => array( + 'priorities' => array( 'test1', 'test2' ), + 'expected_call_order' => array( 'filter', 'filter2' ), + ), + 'non-numerical string ASC' => array( + 'priorities' => array( 'test1', 'test2' ), + 'expected_call_order' => array( 'filter', 'filter2' ), + ), + 'int, non-numerical string DESC' => array( + 'priorities' => array( 10, 'test' ), + 'expected_call_order' => array( 'filter2', 'filter' ), + ), + 'int, non-numerical string ASC' => array( + 'priorities' => array( 'test', 10 ), + 'expected_call_order' => array( 'filter', 'filter2' ), + ), + 'float, non-numerical string DESC' => array( + 'priorities' => array( 10.0, 'test' ), + 'expected_call_order' => array( 'filter2', 'filter' ), + ), + 'float, non-numerical string ASC' => array( + 'priorities' => array( 'test', 10.0 ), + 'expected_call_order' => array( 'filter', 'filter2' ), + ), + ); } /** diff --git a/tests/phpunit/tests/hooks/applyFilters.php b/tests/phpunit/tests/hooks/applyFilters.php index 4c3a594aa98e0..50c35e3498a96 100644 --- a/tests/phpunit/tests/hooks/applyFilters.php +++ b/tests/phpunit/tests/hooks/applyFilters.php @@ -42,4 +42,132 @@ public function test_apply_filters_with_multiple_calls() { $this->assertSame( $returned_two, $arg ); $this->assertSame( 2, $a->get_call_count() ); } + + /** + * @ticket 60193 + * + * @dataProvider data_priority_callback_order_with_integers + * @dataProvider data_priority_callback_order_with_unhappy_path_nonintegers + * + * @param array $priorities { + * Indexed array of the priorities for the MockAction callbacks. + * + * @type mixed $0 Priority for 'action' callback. + * @type mixed $1 Priority for 'action2' callback. + * } + * @param array $expected_call_order An array of callback names in expected call order. + * @param string $expected_deprecation Optional. Deprecation message. Default ''. + */ + public function test_priority_callback_order( $priorities, $expected_call_order, $expected_deprecation = '' ) { + $mock = new MockAction(); + $hook = new WP_Hook(); + $hook_name = __FUNCTION__; + + if ( $expected_deprecation && PHP_VERSION_ID >= 80100 ) { + $this->expectDeprecation(); + $this->expectDeprecationMessage( $expected_deprecation ); + } + + $hook->add_filter( $hook_name, array( $mock, 'filter' ), $priorities[0], 1 ); + $hook->add_filter( $hook_name, array( $mock, 'filter2' ), $priorities[1], 1 ); + $hook->apply_filters( __FUNCTION__ . '_val', array( '' ) ); + + $this->assertSame( 2, $mock->get_call_count(), 'The number of call counts does not match' ); + + $actual_call_order = wp_list_pluck( $mock->get_events(), 'filter' ); + $this->assertSame( $expected_call_order, $actual_call_order, 'The filter callback order does not match the expected order' ); + } + + /** + * Happy path data provider. + * + * @return array[] + */ + public function data_priority_callback_order_with_integers() { + return array( + 'int DESC' => array( + 'priorities' => array( 10, 9 ), + 'expected_call_order' => array( 'filter2', 'filter' ), + ), + 'int ASC' => array( + 'priorities' => array( 9, 10 ), + 'expected_call_order' => array( 'filter', 'filter2' ), + ), + ); + } + + /** + * Unhappy path data provider. + * + * @return array[] + */ + public function data_priority_callback_order_with_unhappy_path_nonintegers() { + return array( + // Numbers as strings and floats. + 'int as string DESC' => array( + 'priorities' => array( '10', '9' ), + 'expected_call_order' => array( 'filter2', 'filter' ), + ), + 'int as string ASC' => array( + 'priorities' => array( '9', '10' ), + 'expected_call_order' => array( 'filter', 'filter2' ), + ), + 'float DESC' => array( + 'priorities' => array( 10.0, 9.5 ), + 'expected_call_order' => array( 'filter2', 'filter' ), + 'expected_deprecation' => 'Implicit conversion from float 9.5 to int loses precision', + ), + 'float ASC' => array( + 'priorities' => array( 9.5, 10.0 ), + 'expected_call_order' => array( 'filter', 'filter2' ), + 'expected_deprecation' => 'Implicit conversion from float 9.5 to int loses precision', + ), + 'float as string DESC' => array( + 'priorities' => array( '10.0', '9.5' ), + 'expected_call_order' => array( 'filter2', 'filter' ), + ), + 'float as string ASC' => array( + 'priorities' => array( '9.5', '10.0' ), + 'expected_call_order' => array( 'filter', 'filter2' ), + ), + + // Non-numeric. + 'null' => array( + 'priorities' => array( null, null ), + 'expected_call_order' => array( 'filter', 'filter2' ), + ), + 'bool DESC' => array( + 'priorities' => array( true, false ), + 'expected_call_order' => array( 'filter2', 'filter' ), + ), + 'bool ASC' => array( + 'priorities' => array( false, true ), + 'expected_call_order' => array( 'filter', 'filter2' ), + ), + 'non-numerical string DESC' => array( + 'priorities' => array( 'test1', 'test2' ), + 'expected_call_order' => array( 'filter', 'filter2' ), + ), + 'non-numerical string ASC' => array( + 'priorities' => array( 'test1', 'test2' ), + 'expected_call_order' => array( 'filter', 'filter2' ), + ), + 'int, non-numerical string DESC' => array( + 'priorities' => array( 10, 'test' ), + 'expected_call_order' => array( 'filter2', 'filter' ), + ), + 'int, non-numerical string ASC' => array( + 'priorities' => array( 'test', 10 ), + 'expected_call_order' => array( 'filter', 'filter2' ), + ), + 'float, non-numerical string DESC' => array( + 'priorities' => array( 10.0, 'test' ), + 'expected_call_order' => array( 'filter2', 'filter' ), + ), + 'float, non-numerical string ASC' => array( + 'priorities' => array( 'test', 10.0 ), + 'expected_call_order' => array( 'filter', 'filter2' ), + ), + ); + } } diff --git a/tests/phpunit/tests/hooks/doAction.php b/tests/phpunit/tests/hooks/doAction.php index 858917fdcede1..c9767f865df26 100644 --- a/tests/phpunit/tests/hooks/doAction.php +++ b/tests/phpunit/tests/hooks/doAction.php @@ -85,6 +85,134 @@ public function test_do_action_with_multiple_callbacks_on_different_priorities() $this->assertSame( 1, $a->get_call_count() ); } + /** + * @ticket 60193 + * + * @dataProvider data_priority_callback_order_with_integers + * @dataProvider data_priority_callback_order_with_unhappy_path_nonintegers + * + * @param array $priorities { + * Indexed array of the priorities for the MockAction callbacks. + * + * @type mixed $0 Priority for 'action' callback. + * @type mixed $1 Priority for 'action2' callback. + * } + * @param array $expected_call_order An array of callback names in expected call order. + * @param string $expected_deprecation Optional. Deprecation message. Default ''. + */ + public function test_priority_callback_order( $priorities, $expected_call_order, $expected_deprecation = '' ) { + $mock = new MockAction(); + $hook = new WP_Hook(); + $hook_name = __FUNCTION__; + + if ( $expected_deprecation && PHP_VERSION_ID >= 80100 ) { + $this->expectDeprecation(); + $this->expectDeprecationMessage( $expected_deprecation ); + } + + $hook->add_filter( $hook_name, array( $mock, 'action' ), $priorities[0], 1 ); + $hook->add_filter( $hook_name, array( $mock, 'action2' ), $priorities[1], 1 ); + $hook->do_action( array( '' ) ); + + $this->assertSame( 2, $mock->get_call_count(), 'The number of call counts does not match' ); + + $actual_call_order = wp_list_pluck( $mock->get_events(), 'action' ); + $this->assertSame( $expected_call_order, $actual_call_order, 'The action callback order does not match the expected order' ); + } + + /** + * Happy path data provider. + * + * @return array[] + */ + public function data_priority_callback_order_with_integers() { + return array( + 'int DESC' => array( + 'priorities' => array( 10, 9 ), + 'expected_call_order' => array( 'action2', 'action' ), + ), + 'int ASC' => array( + 'priorities' => array( 9, 10 ), + 'expected_call_order' => array( 'action', 'action2' ), + ), + ); + } + + /** + * Unhappy path data provider. + * + * @return array[] + */ + public function data_priority_callback_order_with_unhappy_path_nonintegers() { + return array( + // Numbers as strings and floats. + 'int as string DESC' => array( + 'priorities' => array( '10', '9' ), + 'expected_call_order' => array( 'action2', 'action' ), + ), + 'int as string ASC' => array( + 'priorities' => array( '9', '10' ), + 'expected_call_order' => array( 'action', 'action2' ), + ), + 'float DESC' => array( + 'priorities' => array( 10.0, 9.5 ), + 'expected_call_order' => array( 'action2', 'action' ), + 'expected_deprecation' => 'Implicit conversion from float 9.5 to int loses precision', + ), + 'float ASC' => array( + 'priorities' => array( 9.5, 10.0 ), + 'expected_call_order' => array( 'action', 'action2' ), + 'expected_deprecation' => 'Implicit conversion from float 9.5 to int loses precision', + ), + 'float as string DESC' => array( + 'priorities' => array( '10.0', '9.5' ), + 'expected_call_order' => array( 'action2', 'action' ), + ), + 'float as string ASC' => array( + 'priorities' => array( '9.5', '10.0' ), + 'expected_call_order' => array( 'action', 'action2' ), + ), + + // Non-numeric. + 'null' => array( + 'priorities' => array( null, null ), + 'expected_call_order' => array( 'action', 'action2' ), + ), + 'bool DESC' => array( + 'priorities' => array( true, false ), + 'expected_call_order' => array( 'action2', 'action' ), + ), + 'bool ASC' => array( + 'priorities' => array( false, true ), + 'expected_call_order' => array( 'action', 'action2' ), + ), + 'non-numerical string DESC' => array( + 'priorities' => array( 'test1', 'test2' ), + 'expected_call_order' => array( 'action', 'action2' ), + ), + 'non-numerical string ASC' => array( + 'priorities' => array( 'test1', 'test2' ), + 'expected_call_order' => array( 'action', 'action2' ), + ), + 'int, non-numerical string DESC' => array( + 'priorities' => array( 10, 'test' ), + 'expected_call_order' => array( 'action2', 'action' ), + ), + 'int, non-numerical string ASC' => array( + 'priorities' => array( 'test', 10 ), + 'expected_call_order' => array( 'action', 'action2' ), + ), + 'float, non-numerical string DESC' => array( + 'priorities' => array( 10.0, 'test' ), + 'expected_call_order' => array( 'action2', 'action' ), + ), + 'float, non-numerical string ASC' => array( + 'priorities' => array( 'test', 10.0 ), + 'expected_call_order' => array( 'action', 'action2' ), + ), + ); + } + public function test_do_action_with_no_accepted_args() { $callback = array( $this, '_action_callback' ); $hook = new WP_Hook(); From 18cacc0abbf746f58489d6f975897e2f12ffb86b Mon Sep 17 00:00:00 2001 From: Aaron Jorbin Date: Tue, 9 Jan 2024 20:15:30 +0000 Subject: [PATCH 22/35] Editor: update npm packages in trunk for 6.4.3. Package Update includes fixes for: - Image Block: Enable image block to be selected correctly when clicked. - Reduce specificity of default Cover text color styles. - Image Block: Fix deprecation when width/height attribute is number. - Text selection: show CSS hack to Safari only. - SlotFill: Allow contextual SlotFillProviders. See: https://github.com/WordPress/wordpress-develop/pull/5696 See: https://github.com/WordPress/gutenberg/commit/bd6767b8a4f9461153a6db6374110f723ed0d05c See: https://github.com/WordPress/gutenberg/pull/56043 See: https://github.com/WordPress/gutenberg/pull/56411 See: https://github.com/WordPress/gutenberg/pull/57063 See: https://github.com/WordPress/gutenberg/pull/57300 See: https://github.com/WordPress/gutenberg/pull/56779 Props mikachan, wildworks, alexstine, poena, isabel_brison, andrewserong, czapla, andraganescu, joen, ellatrix, youknowriad, ntsekouras. Fixes #59943, #59943. git-svn-id: https://develop.svn.wordpress.org/trunk@57258 602fd350-edb4-49c9-b593-d223f7449a82 --- package-lock.json | 652 +++++++++--------- package.json | 44 +- .../assets/script-loader-packages.min.php | 2 +- 3 files changed, 349 insertions(+), 349 deletions(-) diff --git a/package-lock.json b/package-lock.json index 44201c006d4b5..620787e67eea9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,55 +16,55 @@ "@wordpress/api-fetch": "6.39.13", "@wordpress/autop": "3.42.13", "@wordpress/blob": "3.42.13", - "@wordpress/block-directory": "4.19.13", - "@wordpress/block-editor": "12.10.13", - "@wordpress/block-library": "8.19.13", + "@wordpress/block-directory": "4.19.16", + "@wordpress/block-editor": "12.10.14", + "@wordpress/block-library": "8.19.16", "@wordpress/block-serialization-default-parser": "4.42.13", "@wordpress/blocks": "12.19.13", - "@wordpress/commands": "0.13.13", - "@wordpress/components": "25.8.13", + "@wordpress/commands": "0.13.14", + "@wordpress/components": "25.8.14", "@wordpress/compose": "6.19.13", - "@wordpress/core-commands": "0.11.13", - "@wordpress/core-data": "6.19.13", - "@wordpress/customize-widgets": "4.19.13", + "@wordpress/core-commands": "0.11.14", + "@wordpress/core-data": "6.19.14", + "@wordpress/customize-widgets": "4.19.16", "@wordpress/data": "9.12.13", "@wordpress/data-controls": "3.11.13", "@wordpress/date": "4.42.13", "@wordpress/deprecated": "3.42.13", "@wordpress/dom": "3.42.13", "@wordpress/dom-ready": "3.42.13", - "@wordpress/edit-post": "7.19.13", - "@wordpress/edit-site": "5.19.13", - "@wordpress/edit-widgets": "5.19.13", - "@wordpress/editor": "13.19.13", + "@wordpress/edit-post": "7.19.16", + "@wordpress/edit-site": "5.19.16", + "@wordpress/edit-widgets": "5.19.16", + "@wordpress/editor": "13.19.14", "@wordpress/element": "5.19.13", "@wordpress/escape-html": "2.42.13", - "@wordpress/format-library": "4.19.13", + "@wordpress/format-library": "4.19.14", "@wordpress/hooks": "3.42.13", "@wordpress/html-entities": "3.42.13", "@wordpress/i18n": "4.42.13", "@wordpress/icons": "9.33.13", "@wordpress/interactivity": "2.3.13", - "@wordpress/interface": "5.19.13", + "@wordpress/interface": "5.19.14", "@wordpress/is-shallow-equal": "4.42.13", "@wordpress/keyboard-shortcuts": "4.19.13", "@wordpress/keycodes": "3.42.13", - "@wordpress/list-reusable-blocks": "4.19.13", + "@wordpress/list-reusable-blocks": "4.19.14", "@wordpress/media-utils": "4.33.13", "@wordpress/notices": "4.10.13", - "@wordpress/nux": "8.4.13", - "@wordpress/patterns": "1.3.13", - "@wordpress/plugins": "6.10.13", - "@wordpress/preferences": "3.19.13", + "@wordpress/nux": "8.4.14", + "@wordpress/patterns": "1.3.14", + "@wordpress/plugins": "6.10.14", + "@wordpress/preferences": "3.19.14", "@wordpress/preferences-persistence": "1.34.13", "@wordpress/primitives": "3.40.13", "@wordpress/priority-queue": "2.42.13", "@wordpress/private-apis": "0.24.13", "@wordpress/redux-routine": "4.42.13", - "@wordpress/reusable-blocks": "4.19.13", + "@wordpress/reusable-blocks": "4.19.14", "@wordpress/rich-text": "6.19.13", "@wordpress/router": "0.11.13", - "@wordpress/server-side-render": "4.19.13", + "@wordpress/server-side-render": "4.19.14", "@wordpress/shortcode": "3.42.13", "@wordpress/style-engine": "1.25.13", "@wordpress/sync": "0.4.13", @@ -73,7 +73,7 @@ "@wordpress/url": "3.43.13", "@wordpress/viewport": "5.19.13", "@wordpress/warning": "2.42.13", - "@wordpress/widgets": "3.19.13", + "@wordpress/widgets": "3.19.14", "@wordpress/wordcount": "3.42.13", "backbone": "1.5.0", "clipboard": "2.0.11", @@ -6460,28 +6460,28 @@ } }, "node_modules/@wordpress/block-directory": { - "version": "4.19.13", - "resolved": "https://registry.npmjs.org/@wordpress/block-directory/-/block-directory-4.19.13.tgz", - "integrity": "sha512-NM+bec+5CmPOcqLgYqtOZoTdagDHgVhgQk0/3vHqLQZcCyP0PUDNupbvcg2q/KMP78CjL+oWt6aiw4q1eQ7yLw==", + "version": "4.19.16", + "resolved": "https://registry.npmjs.org/@wordpress/block-directory/-/block-directory-4.19.16.tgz", + "integrity": "sha512-7YOqeZt8ExyMidbblzht7x5jnfpZVD6N69VuDrvdlB/8eB7gl62tKZdNXHwWoZccSWJb+xUTZL01k2HpJulcPQ==", "dependencies": { "@babel/runtime": "^7.16.0", "@wordpress/a11y": "^3.42.13", "@wordpress/api-fetch": "^6.39.13", - "@wordpress/block-editor": "^12.10.13", + "@wordpress/block-editor": "^12.10.14", "@wordpress/blocks": "^12.19.13", - "@wordpress/components": "^25.8.13", + "@wordpress/components": "^25.8.14", "@wordpress/compose": "^6.19.13", - "@wordpress/core-data": "^6.19.13", + "@wordpress/core-data": "^6.19.14", "@wordpress/data": "^9.12.13", - "@wordpress/edit-post": "^7.19.13", - "@wordpress/editor": "^13.19.13", + "@wordpress/edit-post": "^7.19.16", + "@wordpress/editor": "^13.19.14", "@wordpress/element": "^5.19.13", "@wordpress/hooks": "^3.42.13", "@wordpress/html-entities": "^3.42.13", "@wordpress/i18n": "^4.42.13", "@wordpress/icons": "^9.33.13", "@wordpress/notices": "^4.10.13", - "@wordpress/plugins": "^6.10.13", + "@wordpress/plugins": "^6.10.14", "@wordpress/url": "^3.43.13", "change-case": "^4.1.2" }, @@ -6494,9 +6494,9 @@ } }, "node_modules/@wordpress/block-editor": { - "version": "12.10.13", - "resolved": "https://registry.npmjs.org/@wordpress/block-editor/-/block-editor-12.10.13.tgz", - "integrity": "sha512-QT5NSgU9WYAmEK3QcDM2W0ChoukeiKRivg3upbbfJh/Njo3VvBROyoziL1Nvor/4nABXl+PRTBBxdsVtMWLtiA==", + "version": "12.10.14", + "resolved": "https://registry.npmjs.org/@wordpress/block-editor/-/block-editor-12.10.14.tgz", + "integrity": "sha512-x56FPZZfJPk/Vd1aKIdpBIllrUuAVgwom+mYH0OohCmUzCBp1Eg8Urg5nshZpiLXpHt2dXycQCLu2Mpb+YpOJw==", "dependencies": { "@babel/runtime": "^7.16.0", "@emotion/react": "^11.7.1", @@ -6506,8 +6506,8 @@ "@wordpress/api-fetch": "^6.39.13", "@wordpress/blob": "^3.42.13", "@wordpress/blocks": "^12.19.13", - "@wordpress/commands": "^0.13.13", - "@wordpress/components": "^25.8.13", + "@wordpress/commands": "^0.13.14", + "@wordpress/components": "^25.8.14", "@wordpress/compose": "^6.19.13", "@wordpress/data": "^9.12.13", "@wordpress/date": "^4.42.13", @@ -6523,7 +6523,7 @@ "@wordpress/keyboard-shortcuts": "^4.19.13", "@wordpress/keycodes": "^3.42.13", "@wordpress/notices": "^4.10.13", - "@wordpress/preferences": "^3.19.13", + "@wordpress/preferences": "^3.19.14", "@wordpress/private-apis": "^0.24.13", "@wordpress/rich-text": "^6.19.13", "@wordpress/shortcode": "^3.42.13", @@ -6555,20 +6555,20 @@ } }, "node_modules/@wordpress/block-library": { - "version": "8.19.13", - "resolved": "https://registry.npmjs.org/@wordpress/block-library/-/block-library-8.19.13.tgz", - "integrity": "sha512-JasXSCmRfQsmLjGNWWH6z4+m8a/sv4dn3uuw4i+BgMo5JTg6CIQy85rHz2YWzkMqd+P20978GjJKtkwE4gc/JQ==", + "version": "8.19.16", + "resolved": "https://registry.npmjs.org/@wordpress/block-library/-/block-library-8.19.16.tgz", + "integrity": "sha512-6NqTHjEYk3X+jzw6JS3pOgVYl2HPlr0iAI3Ch9sdOxozAm1+VrE5DKeM//rf9QpR7wWJ6je4F/eNjZ2WJIYTfw==", "dependencies": { "@babel/runtime": "^7.16.0", "@wordpress/a11y": "^3.42.13", "@wordpress/api-fetch": "^6.39.13", "@wordpress/autop": "^3.42.13", "@wordpress/blob": "^3.42.13", - "@wordpress/block-editor": "^12.10.13", + "@wordpress/block-editor": "^12.10.14", "@wordpress/blocks": "^12.19.13", - "@wordpress/components": "^25.8.13", + "@wordpress/components": "^25.8.14", "@wordpress/compose": "^6.19.13", - "@wordpress/core-data": "^6.19.13", + "@wordpress/core-data": "^6.19.14", "@wordpress/data": "^9.12.13", "@wordpress/date": "^4.42.13", "@wordpress/deprecated": "^3.42.13", @@ -6584,9 +6584,9 @@ "@wordpress/notices": "^4.10.13", "@wordpress/primitives": "^3.40.13", "@wordpress/private-apis": "^0.24.13", - "@wordpress/reusable-blocks": "^4.19.13", + "@wordpress/reusable-blocks": "^4.19.14", "@wordpress/rich-text": "^6.19.13", - "@wordpress/server-side-render": "^4.19.13", + "@wordpress/server-side-render": "^4.19.14", "@wordpress/url": "^3.43.13", "@wordpress/viewport": "^5.19.13", "@wordpress/wordcount": "^3.42.13", @@ -6669,12 +6669,12 @@ } }, "node_modules/@wordpress/commands": { - "version": "0.13.13", - "resolved": "https://registry.npmjs.org/@wordpress/commands/-/commands-0.13.13.tgz", - "integrity": "sha512-Z+g7X7csCHD5qJCkJhdc/q3Dg5BLTH5M9fp/80Z5xfHhDjsZz+uVqS2xWavAk6QyIqJlLMnk/9vLxqO1PJJqnw==", + "version": "0.13.14", + "resolved": "https://registry.npmjs.org/@wordpress/commands/-/commands-0.13.14.tgz", + "integrity": "sha512-aSOuRbsr+YYFvRbkXaubHdlAtf/xpG1mUWXEw9VMWCag77hiK6vk04Xb3N8ad8eo8am0N/iRgn8V8IS4LyBTyA==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/components": "^25.8.13", + "@wordpress/components": "^25.8.14", "@wordpress/data": "^9.12.13", "@wordpress/element": "^5.19.13", "@wordpress/i18n": "^4.42.13", @@ -6694,9 +6694,9 @@ } }, "node_modules/@wordpress/components": { - "version": "25.8.13", - "resolved": "https://registry.npmjs.org/@wordpress/components/-/components-25.8.13.tgz", - "integrity": "sha512-Q3A1mZDgkCounVWawCzbqEbc1nAbm6L74GBNYllO5pxsccNsjcDHAtAEmx9BJzKd4SHEU6bYrgponWvhvLouFA==", + "version": "25.8.14", + "resolved": "https://registry.npmjs.org/@wordpress/components/-/components-25.8.14.tgz", + "integrity": "sha512-wRQSRlLXsL4bEd1JhCQPSdIb0bO4WDAloQufeyIbXUIK9CDgN/jmkv+vrgKrpP3Nqu1sBAFzW1qd9WEXfSBgXw==", "dependencies": { "@ariakit/react": "^0.2.12", "@babel/runtime": "^7.16.0", @@ -6783,14 +6783,14 @@ } }, "node_modules/@wordpress/core-commands": { - "version": "0.11.13", - "resolved": "https://registry.npmjs.org/@wordpress/core-commands/-/core-commands-0.11.13.tgz", - "integrity": "sha512-gwiorFZSPeq+UItsPsWOrypfDddTF33+idK6cz18f1PIl6MoGLwNKuiq3A9f28tG4yFLrv5awHATF5PT4vjvKg==", + "version": "0.11.14", + "resolved": "https://registry.npmjs.org/@wordpress/core-commands/-/core-commands-0.11.14.tgz", + "integrity": "sha512-f2DA9lUji96OC5UD85Gbv2vz14R0TR+FSXzXAa68F/EBPFkiaxs2huhruhRvZKbasxugk/vjTBbQuwZ8rinROA==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/block-editor": "^12.10.13", - "@wordpress/commands": "^0.13.13", - "@wordpress/core-data": "^6.19.13", + "@wordpress/block-editor": "^12.10.14", + "@wordpress/commands": "^0.13.14", + "@wordpress/core-data": "^6.19.14", "@wordpress/data": "^9.12.13", "@wordpress/element": "^5.19.13", "@wordpress/i18n": "^4.42.13", @@ -6808,13 +6808,13 @@ } }, "node_modules/@wordpress/core-data": { - "version": "6.19.13", - "resolved": "https://registry.npmjs.org/@wordpress/core-data/-/core-data-6.19.13.tgz", - "integrity": "sha512-rScMXJkasThvyFea8w+ajGUiOuaR+fEir1oh/obRaKxrYpSMqaf5gKuvpBGxAeMJMsg0yGn5/E4FXGF4TGuX9Q==", + "version": "6.19.14", + "resolved": "https://registry.npmjs.org/@wordpress/core-data/-/core-data-6.19.14.tgz", + "integrity": "sha512-wdstu/qMBKwXnFRX4wMeTkxvHsOgbXm7ZJ0Lgtj+jE86O086Ook7suxacOdMcCaAKNCfMqoGBHtjsNQk3SWE1Q==", "dependencies": { "@babel/runtime": "^7.16.0", "@wordpress/api-fetch": "^6.39.13", - "@wordpress/block-editor": "^12.10.13", + "@wordpress/block-editor": "^12.10.14", "@wordpress/blocks": "^12.19.13", "@wordpress/compose": "^6.19.13", "@wordpress/data": "^9.12.13", @@ -6843,31 +6843,31 @@ } }, "node_modules/@wordpress/customize-widgets": { - "version": "4.19.13", - "resolved": "https://registry.npmjs.org/@wordpress/customize-widgets/-/customize-widgets-4.19.13.tgz", - "integrity": "sha512-Wwur4j8tuwV6/KHaZwcSZtqdrOZdWLIn9jL4tK5nTEGv4u1OV+SzucYxqvVqCu6otsyU2lVrRX9kTyiYkJGyJw==", + "version": "4.19.16", + "resolved": "https://registry.npmjs.org/@wordpress/customize-widgets/-/customize-widgets-4.19.16.tgz", + "integrity": "sha512-UK4RrEBFwdn8WcY7qXXbRcncuWXLMpB9gjiBVhwPmM5m1//A0wsOQu2kAkZeACuhYoEJ/N6g4yZh2ZnldJVR3w==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/block-editor": "^12.10.13", - "@wordpress/block-library": "^8.19.13", + "@wordpress/block-editor": "^12.10.14", + "@wordpress/block-library": "^8.19.16", "@wordpress/blocks": "^12.19.13", - "@wordpress/components": "^25.8.13", + "@wordpress/components": "^25.8.14", "@wordpress/compose": "^6.19.13", - "@wordpress/core-data": "^6.19.13", + "@wordpress/core-data": "^6.19.14", "@wordpress/data": "^9.12.13", "@wordpress/dom": "^3.42.13", "@wordpress/element": "^5.19.13", "@wordpress/hooks": "^3.42.13", "@wordpress/i18n": "^4.42.13", "@wordpress/icons": "^9.33.13", - "@wordpress/interface": "^5.19.13", + "@wordpress/interface": "^5.19.14", "@wordpress/is-shallow-equal": "^4.42.13", "@wordpress/keyboard-shortcuts": "^4.19.13", "@wordpress/keycodes": "^3.42.13", "@wordpress/media-utils": "^4.33.13", - "@wordpress/preferences": "^3.19.13", + "@wordpress/preferences": "^3.19.14", "@wordpress/private-apis": "^0.24.13", - "@wordpress/widgets": "^3.19.13", + "@wordpress/widgets": "^3.19.14", "classnames": "^2.3.1", "fast-deep-equal": "^3.1.3" }, @@ -7148,41 +7148,41 @@ } }, "node_modules/@wordpress/edit-post": { - "version": "7.19.13", - "resolved": "https://registry.npmjs.org/@wordpress/edit-post/-/edit-post-7.19.13.tgz", - "integrity": "sha512-iOSnEZdEY1O661vkwG22BC/Si0+QJ6Xo8dgrOSrJmoGeEcN7OrfBaw9JeT/if5Tn0U4dRCI7YtCyUwqtvCicwQ==", + "version": "7.19.16", + "resolved": "https://registry.npmjs.org/@wordpress/edit-post/-/edit-post-7.19.16.tgz", + "integrity": "sha512-PK0XVHLrn6Bg47O8sq7UIBykJOJGF2xsbkOjhRVniD+6EYdYifpGYHTC9nHogEfw691xcz+vAqS87D01x3SfEQ==", "dependencies": { "@babel/runtime": "^7.16.0", "@wordpress/a11y": "^3.42.13", "@wordpress/api-fetch": "^6.39.13", - "@wordpress/block-editor": "^12.10.13", - "@wordpress/block-library": "^8.19.13", + "@wordpress/block-editor": "^12.10.14", + "@wordpress/block-library": "^8.19.16", "@wordpress/blocks": "^12.19.13", - "@wordpress/commands": "^0.13.13", - "@wordpress/components": "^25.8.13", + "@wordpress/commands": "^0.13.14", + "@wordpress/components": "^25.8.14", "@wordpress/compose": "^6.19.13", - "@wordpress/core-commands": "^0.11.13", - "@wordpress/core-data": "^6.19.13", + "@wordpress/core-commands": "^0.11.14", + "@wordpress/core-data": "^6.19.14", "@wordpress/data": "^9.12.13", "@wordpress/deprecated": "^3.42.13", "@wordpress/dom": "^3.42.13", - "@wordpress/editor": "^13.19.13", + "@wordpress/editor": "^13.19.14", "@wordpress/element": "^5.19.13", "@wordpress/hooks": "^3.42.13", "@wordpress/i18n": "^4.42.13", "@wordpress/icons": "^9.33.13", - "@wordpress/interface": "^5.19.13", + "@wordpress/interface": "^5.19.14", "@wordpress/keyboard-shortcuts": "^4.19.13", "@wordpress/keycodes": "^3.42.13", "@wordpress/media-utils": "^4.33.13", "@wordpress/notices": "^4.10.13", - "@wordpress/plugins": "^6.10.13", - "@wordpress/preferences": "^3.19.13", + "@wordpress/plugins": "^6.10.14", + "@wordpress/preferences": "^3.19.14", "@wordpress/private-apis": "^0.24.13", "@wordpress/url": "^3.43.13", "@wordpress/viewport": "^5.19.13", "@wordpress/warning": "^2.42.13", - "@wordpress/widgets": "^3.19.13", + "@wordpress/widgets": "^3.19.14", "classnames": "^2.3.1", "memize": "^2.1.0", "rememo": "^4.0.2" @@ -7196,48 +7196,48 @@ } }, "node_modules/@wordpress/edit-site": { - "version": "5.19.13", - "resolved": "https://registry.npmjs.org/@wordpress/edit-site/-/edit-site-5.19.13.tgz", - "integrity": "sha512-0xKu7FQw3h6EBj6fwP2KkeZqa6IaCwTuDx0ZQ5Mur03OsxH6UvuVm/KhNW7ONcw3V0mYsL87pcmJNhw/+L1yvQ==", + "version": "5.19.16", + "resolved": "https://registry.npmjs.org/@wordpress/edit-site/-/edit-site-5.19.16.tgz", + "integrity": "sha512-shraoCd4LCNngtBn9E7U6Na/l+zrU0nTXztgZSuVsqSGktAgHBi7pXMUTsCGqO/vp9fnmW9LU3tQ9XgLEogjkg==", "dependencies": { "@babel/runtime": "^7.16.0", "@wordpress/a11y": "^3.42.13", "@wordpress/api-fetch": "^6.39.13", - "@wordpress/block-editor": "^12.10.13", - "@wordpress/block-library": "^8.19.13", + "@wordpress/block-editor": "^12.10.14", + "@wordpress/block-library": "^8.19.16", "@wordpress/blocks": "^12.19.13", - "@wordpress/commands": "^0.13.13", - "@wordpress/components": "^25.8.13", + "@wordpress/commands": "^0.13.14", + "@wordpress/components": "^25.8.14", "@wordpress/compose": "^6.19.13", - "@wordpress/core-commands": "^0.11.13", - "@wordpress/core-data": "^6.19.13", + "@wordpress/core-commands": "^0.11.14", + "@wordpress/core-data": "^6.19.14", "@wordpress/data": "^9.12.13", "@wordpress/date": "^4.42.13", "@wordpress/deprecated": "^3.42.13", "@wordpress/dom": "^3.42.13", - "@wordpress/editor": "^13.19.13", + "@wordpress/editor": "^13.19.14", "@wordpress/element": "^5.19.13", "@wordpress/escape-html": "^2.42.13", "@wordpress/hooks": "^3.42.13", "@wordpress/html-entities": "^3.42.13", "@wordpress/i18n": "^4.42.13", "@wordpress/icons": "^9.33.13", - "@wordpress/interface": "^5.19.13", + "@wordpress/interface": "^5.19.14", "@wordpress/keyboard-shortcuts": "^4.19.13", "@wordpress/keycodes": "^3.42.13", "@wordpress/media-utils": "^4.33.13", "@wordpress/notices": "^4.10.13", - "@wordpress/patterns": "^1.3.13", - "@wordpress/plugins": "^6.10.13", - "@wordpress/preferences": "^3.19.13", + "@wordpress/patterns": "^1.3.14", + "@wordpress/plugins": "^6.10.14", + "@wordpress/preferences": "^3.19.14", "@wordpress/primitives": "^3.40.13", "@wordpress/private-apis": "^0.24.13", - "@wordpress/reusable-blocks": "^4.19.13", + "@wordpress/reusable-blocks": "^4.19.14", "@wordpress/router": "^0.11.13", "@wordpress/style-engine": "^1.25.13", "@wordpress/url": "^3.43.13", "@wordpress/viewport": "^5.19.13", - "@wordpress/widgets": "^3.19.13", + "@wordpress/widgets": "^3.19.14", "@wordpress/wordcount": "^3.42.13", "change-case": "^4.1.2", "classnames": "^2.3.1", @@ -7260,18 +7260,18 @@ } }, "node_modules/@wordpress/edit-widgets": { - "version": "5.19.13", - "resolved": "https://registry.npmjs.org/@wordpress/edit-widgets/-/edit-widgets-5.19.13.tgz", - "integrity": "sha512-SFdDXp2o6I+jNDMF0ncnOE55vuKj3TSUae6D31yzjzsIYLjLWwiv7EFOmNnqBKR6704UvZPAOwin2KojecdMqw==", + "version": "5.19.16", + "resolved": "https://registry.npmjs.org/@wordpress/edit-widgets/-/edit-widgets-5.19.16.tgz", + "integrity": "sha512-1yTkLHQjf/LEmxlw2y0bqgkZcqO2Gs0H8QK1JHEJdHrAK+R5nBd55Jq4Wb2IU+QsUAaGvQzuF+FfHAA4YkLUwQ==", "dependencies": { "@babel/runtime": "^7.16.0", "@wordpress/api-fetch": "^6.39.13", - "@wordpress/block-editor": "^12.10.13", - "@wordpress/block-library": "^8.19.13", + "@wordpress/block-editor": "^12.10.14", + "@wordpress/block-library": "^8.19.16", "@wordpress/blocks": "^12.19.13", - "@wordpress/components": "^25.8.13", + "@wordpress/components": "^25.8.14", "@wordpress/compose": "^6.19.13", - "@wordpress/core-data": "^6.19.13", + "@wordpress/core-data": "^6.19.14", "@wordpress/data": "^9.12.13", "@wordpress/deprecated": "^3.42.13", "@wordpress/dom": "^3.42.13", @@ -7279,18 +7279,18 @@ "@wordpress/hooks": "^3.42.13", "@wordpress/i18n": "^4.42.13", "@wordpress/icons": "^9.33.13", - "@wordpress/interface": "^5.19.13", + "@wordpress/interface": "^5.19.14", "@wordpress/keyboard-shortcuts": "^4.19.13", "@wordpress/keycodes": "^3.42.13", "@wordpress/media-utils": "^4.33.13", "@wordpress/notices": "^4.10.13", - "@wordpress/patterns": "^1.3.13", - "@wordpress/plugins": "^6.10.13", - "@wordpress/preferences": "^3.19.13", + "@wordpress/patterns": "^1.3.14", + "@wordpress/plugins": "^6.10.14", + "@wordpress/preferences": "^3.19.14", "@wordpress/private-apis": "^0.24.13", - "@wordpress/reusable-blocks": "^4.19.13", + "@wordpress/reusable-blocks": "^4.19.14", "@wordpress/url": "^3.43.13", - "@wordpress/widgets": "^3.19.13", + "@wordpress/widgets": "^3.19.14", "classnames": "^2.3.1" }, "engines": { @@ -7302,19 +7302,19 @@ } }, "node_modules/@wordpress/editor": { - "version": "13.19.13", - "resolved": "https://registry.npmjs.org/@wordpress/editor/-/editor-13.19.13.tgz", - "integrity": "sha512-8df51NC4+pCE45AL1NFo8RXq7rND97yxHjb1rECLRvYUetq08pUX2m+kYWmxxSHaVHNytOmMtERpkYGNC7sAXQ==", + "version": "13.19.14", + "resolved": "https://registry.npmjs.org/@wordpress/editor/-/editor-13.19.14.tgz", + "integrity": "sha512-t1RFJl0Bf+qJpBHtiUl0qoxJjpNNGcpSZLejnhR97+i32l/4ewg8+z69zwFtW4ChNQjLnAFnpQZ5pT/CqkkKpQ==", "dependencies": { "@babel/runtime": "^7.16.0", "@wordpress/a11y": "^3.42.13", "@wordpress/api-fetch": "^6.39.13", "@wordpress/blob": "^3.42.13", - "@wordpress/block-editor": "^12.10.13", + "@wordpress/block-editor": "^12.10.14", "@wordpress/blocks": "^12.19.13", - "@wordpress/components": "^25.8.13", + "@wordpress/components": "^25.8.14", "@wordpress/compose": "^6.19.13", - "@wordpress/core-data": "^6.19.13", + "@wordpress/core-data": "^6.19.14", "@wordpress/data": "^9.12.13", "@wordpress/date": "^4.42.13", "@wordpress/deprecated": "^3.42.13", @@ -7328,12 +7328,12 @@ "@wordpress/keycodes": "^3.42.13", "@wordpress/media-utils": "^4.33.13", "@wordpress/notices": "^4.10.13", - "@wordpress/patterns": "^1.3.13", - "@wordpress/preferences": "^3.19.13", + "@wordpress/patterns": "^1.3.14", + "@wordpress/preferences": "^3.19.14", "@wordpress/private-apis": "^0.24.13", - "@wordpress/reusable-blocks": "^4.19.13", + "@wordpress/reusable-blocks": "^4.19.14", "@wordpress/rich-text": "^6.19.13", - "@wordpress/server-side-render": "^4.19.13", + "@wordpress/server-side-render": "^4.19.14", "@wordpress/url": "^3.43.13", "@wordpress/wordcount": "^3.42.13", "classnames": "^2.3.1", @@ -7439,14 +7439,14 @@ } }, "node_modules/@wordpress/format-library": { - "version": "4.19.13", - "resolved": "https://registry.npmjs.org/@wordpress/format-library/-/format-library-4.19.13.tgz", - "integrity": "sha512-EY8oCHXbfRogyKvRkF5z58O04o8MzQDY6Ms1mqZ95FGdAt9TJ6sfJgPXbj8a9bR7WAbx74h5eo6t2K1m3HZu6A==", + "version": "4.19.14", + "resolved": "https://registry.npmjs.org/@wordpress/format-library/-/format-library-4.19.14.tgz", + "integrity": "sha512-NyJ1nmb6PODE5hXM9oOEBlYA48k6c2DlGcUTXkSzDcdLPRVinTeWDfPL4kpze30JcQPv9m6Y5/EfWp48bDnByA==", "dependencies": { "@babel/runtime": "^7.16.0", "@wordpress/a11y": "^3.42.13", - "@wordpress/block-editor": "^12.10.13", - "@wordpress/components": "^25.8.13", + "@wordpress/block-editor": "^12.10.14", + "@wordpress/components": "^25.8.14", "@wordpress/compose": "^6.19.13", "@wordpress/data": "^9.12.13", "@wordpress/element": "^5.19.13", @@ -7532,21 +7532,21 @@ } }, "node_modules/@wordpress/interface": { - "version": "5.19.13", - "resolved": "https://registry.npmjs.org/@wordpress/interface/-/interface-5.19.13.tgz", - "integrity": "sha512-TdE6B3FlZoYqf9WBFPh8g34ciAABaQR4uBHgGv4uXxsgu8sCBx3zIKJZuMLTv6StsivKFYn4pBFZRD/SZGx49w==", + "version": "5.19.14", + "resolved": "https://registry.npmjs.org/@wordpress/interface/-/interface-5.19.14.tgz", + "integrity": "sha512-WsIsSKJuhAcXD3YbmUoncL1JZ6hKAJXs7Lb/bjrOJxCts/YOy5yMF3/I05r8f1Tfw/pS8wlHMRjIXH/gvnvWVA==", "dependencies": { "@babel/runtime": "^7.16.0", "@wordpress/a11y": "^3.42.13", - "@wordpress/components": "^25.8.13", + "@wordpress/components": "^25.8.14", "@wordpress/compose": "^6.19.13", "@wordpress/data": "^9.12.13", "@wordpress/deprecated": "^3.42.13", "@wordpress/element": "^5.19.13", "@wordpress/i18n": "^4.42.13", "@wordpress/icons": "^9.33.13", - "@wordpress/plugins": "^6.10.13", - "@wordpress/preferences": "^3.19.13", + "@wordpress/plugins": "^6.10.14", + "@wordpress/preferences": "^3.19.14", "@wordpress/viewport": "^5.19.13", "classnames": "^2.3.1" }, @@ -7634,13 +7634,13 @@ } }, "node_modules/@wordpress/list-reusable-blocks": { - "version": "4.19.13", - "resolved": "https://registry.npmjs.org/@wordpress/list-reusable-blocks/-/list-reusable-blocks-4.19.13.tgz", - "integrity": "sha512-OnLlQq2sQ4xj5/UhmbC5eTSSTGf8iAfHGOvPi3OZF1Ig9otGsonjSrATgJSskomZFkjetWUQfBOVBxA23Ni7cA==", + "version": "4.19.14", + "resolved": "https://registry.npmjs.org/@wordpress/list-reusable-blocks/-/list-reusable-blocks-4.19.14.tgz", + "integrity": "sha512-GuorU374D0Ft7RtIZWWc7ltIkV3ThjU/u+LwbNzh5y7iaVs4l64qvqopqoj/IoRVdahpnLEO3MNxj9InlUiNeg==", "dependencies": { "@babel/runtime": "^7.16.0", "@wordpress/api-fetch": "^6.39.13", - "@wordpress/components": "^25.8.13", + "@wordpress/components": "^25.8.14", "@wordpress/compose": "^6.19.13", "@wordpress/element": "^5.19.13", "@wordpress/i18n": "^4.42.13", @@ -7698,12 +7698,12 @@ } }, "node_modules/@wordpress/nux": { - "version": "8.4.13", - "resolved": "https://registry.npmjs.org/@wordpress/nux/-/nux-8.4.13.tgz", - "integrity": "sha512-xWG622MaEfIr1Z735GGnW5/CYbX9qnJPHzTOsATtbSUUTPEWiPXcUkPTVPvWry1Lj5Y8ib6jNgSEQJQJJaXzmw==", + "version": "8.4.14", + "resolved": "https://registry.npmjs.org/@wordpress/nux/-/nux-8.4.14.tgz", + "integrity": "sha512-JcxUtWOzl7lTuv39BWRwzwPDvVEhFECGzK819i3kExbTjmsVHCHtsdB7khPrdAYZOm2GXzR1le+/UFfkGuHS2Q==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/components": "^25.8.13", + "@wordpress/components": "^25.8.14", "@wordpress/compose": "^6.19.13", "@wordpress/data": "^9.12.13", "@wordpress/deprecated": "^3.42.13", @@ -7721,17 +7721,17 @@ } }, "node_modules/@wordpress/patterns": { - "version": "1.3.13", - "resolved": "https://registry.npmjs.org/@wordpress/patterns/-/patterns-1.3.13.tgz", - "integrity": "sha512-ATonHUTQk6dXea+hdSr8BLGE9OryHsnRn2MXNQLzr2kebV4BSmqXATNnC8k+I5F6CwMIQGo+LSsx614ht5vkFg==", + "version": "1.3.14", + "resolved": "https://registry.npmjs.org/@wordpress/patterns/-/patterns-1.3.14.tgz", + "integrity": "sha512-eaZWZlaF/MlxqDY7KYzL8cApY4b4f89wuqHVSmjv52UfvaqxW0vd09ddX+jwkcXysDHFzwM63takIIVZwYn9Lg==", "dependencies": { "@babel/runtime": "^7.16.0", "@wordpress/a11y": "^3.42.13", - "@wordpress/block-editor": "^12.10.13", + "@wordpress/block-editor": "^12.10.14", "@wordpress/blocks": "^12.19.13", - "@wordpress/components": "^25.8.13", + "@wordpress/components": "^25.8.14", "@wordpress/compose": "^6.19.13", - "@wordpress/core-data": "^6.19.13", + "@wordpress/core-data": "^6.19.14", "@wordpress/data": "^9.12.13", "@wordpress/element": "^5.19.13", "@wordpress/html-entities": "^3.42.13", @@ -7750,12 +7750,12 @@ } }, "node_modules/@wordpress/plugins": { - "version": "6.10.13", - "resolved": "https://registry.npmjs.org/@wordpress/plugins/-/plugins-6.10.13.tgz", - "integrity": "sha512-1fb9iRwU7yDJ95j0ms8F43DMk/bxrtwoNXPU/qcvxMyjJg3WFFOgnrW7jvm3Y7T9KG2o4LJlQF0znCdGX1TOMQ==", + "version": "6.10.14", + "resolved": "https://registry.npmjs.org/@wordpress/plugins/-/plugins-6.10.14.tgz", + "integrity": "sha512-Duxh0OxpSuUFTMHa500iitrD21/JeTklc8/Hf3ApCpn4SdDzFR4IrwUdoJk0jGDY79cTwBVeWts5GhObbJByng==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/components": "^25.8.13", + "@wordpress/components": "^25.8.14", "@wordpress/compose": "^6.19.13", "@wordpress/element": "^5.19.13", "@wordpress/hooks": "^3.42.13", @@ -7788,13 +7788,13 @@ } }, "node_modules/@wordpress/preferences": { - "version": "3.19.13", - "resolved": "https://registry.npmjs.org/@wordpress/preferences/-/preferences-3.19.13.tgz", - "integrity": "sha512-+Rd3zBy8IlpSNg9l5JetIhtZKagQz5xb/QC9spIIHKqjzApeS9jIuQXBnrHY1LDdXR8KgiRR4Iu+7Ls4myOckQ==", + "version": "3.19.14", + "resolved": "https://registry.npmjs.org/@wordpress/preferences/-/preferences-3.19.14.tgz", + "integrity": "sha512-xLu+G22Vlm4KajE/Eimq8qLzBoxMZ7BJLp8WobFC3yyzdU9R785dug9t9et4r45NxWJr8aVWkFzhEBzAadHjnA==", "dependencies": { "@babel/runtime": "^7.16.0", "@wordpress/a11y": "^3.42.13", - "@wordpress/components": "^25.8.13", + "@wordpress/components": "^25.8.14", "@wordpress/data": "^9.12.13", "@wordpress/element": "^5.19.13", "@wordpress/i18n": "^4.42.13", @@ -7887,15 +7887,15 @@ } }, "node_modules/@wordpress/reusable-blocks": { - "version": "4.19.13", - "resolved": "https://registry.npmjs.org/@wordpress/reusable-blocks/-/reusable-blocks-4.19.13.tgz", - "integrity": "sha512-LWfMG2sgH3oP8gKRyOWRm6sX2sZx41hvfHnf6wkfd+Jz0mI4y/hHx4pVW/Y6qIxVQZodALSdPI3P1djqt6pZ/A==", + "version": "4.19.14", + "resolved": "https://registry.npmjs.org/@wordpress/reusable-blocks/-/reusable-blocks-4.19.14.tgz", + "integrity": "sha512-WhQNDtq2ohGlGlodNyEbvMux631D+7jRABwodvoC42dVJyHR3lH1O8uhnQeKyPl91YWLxJ6+mHmrPInEo2fAcQ==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/block-editor": "^12.10.13", + "@wordpress/block-editor": "^12.10.14", "@wordpress/blocks": "^12.19.13", - "@wordpress/components": "^25.8.13", - "@wordpress/core-data": "^6.19.13", + "@wordpress/components": "^25.8.14", + "@wordpress/core-data": "^6.19.14", "@wordpress/data": "^9.12.13", "@wordpress/element": "^5.19.13", "@wordpress/i18n": "^4.42.13", @@ -8371,14 +8371,14 @@ } }, "node_modules/@wordpress/server-side-render": { - "version": "4.19.13", - "resolved": "https://registry.npmjs.org/@wordpress/server-side-render/-/server-side-render-4.19.13.tgz", - "integrity": "sha512-gE8CgLtfiXAKsVU9lJttSwTRMLDdMuIY8bpvqaO73WrpeMVFHS97KgaYD+DK8Yi7UByn3oz5O+mGTNfz4t0GLw==", + "version": "4.19.14", + "resolved": "https://registry.npmjs.org/@wordpress/server-side-render/-/server-side-render-4.19.14.tgz", + "integrity": "sha512-As3Xc3TDM0R0siAFaldobRdZnPfQQMXvlQxalFJgs/kSoYOmcdc46mR5Wgmfn7r0Kc/Z5uOHLbvm4mWekE0a2A==", "dependencies": { "@babel/runtime": "^7.16.0", "@wordpress/api-fetch": "^6.39.13", "@wordpress/blocks": "^12.19.13", - "@wordpress/components": "^25.8.13", + "@wordpress/components": "^25.8.14", "@wordpress/compose": "^6.19.13", "@wordpress/data": "^9.12.13", "@wordpress/deprecated": "^3.42.13", @@ -8510,17 +8510,17 @@ } }, "node_modules/@wordpress/widgets": { - "version": "3.19.13", - "resolved": "https://registry.npmjs.org/@wordpress/widgets/-/widgets-3.19.13.tgz", - "integrity": "sha512-+IwGEDSy17PD7ghfP3d4+25q3EDw9NFUDnLsGR4nao3tAJT+Eyi8/BJkimR0CQXFcBHGt7PqI9SAEKTs1qqBHA==", + "version": "3.19.14", + "resolved": "https://registry.npmjs.org/@wordpress/widgets/-/widgets-3.19.14.tgz", + "integrity": "sha512-nFyXrCBVp24joFa96sAdNwkWnnf23t960ebnoW+Wk+lMT0PsGfGjiMIRmtks2cfqbQuQYFdO/8go+DSE54ekAg==", "dependencies": { "@babel/runtime": "^7.16.0", "@wordpress/api-fetch": "^6.39.13", - "@wordpress/block-editor": "^12.10.13", + "@wordpress/block-editor": "^12.10.14", "@wordpress/blocks": "^12.19.13", - "@wordpress/components": "^25.8.13", + "@wordpress/components": "^25.8.14", "@wordpress/compose": "^6.19.13", - "@wordpress/core-data": "^6.19.13", + "@wordpress/core-data": "^6.19.14", "@wordpress/data": "^9.12.13", "@wordpress/element": "^5.19.13", "@wordpress/i18n": "^4.42.13", @@ -38630,36 +38630,36 @@ } }, "@wordpress/block-directory": { - "version": "4.19.13", - "resolved": "https://registry.npmjs.org/@wordpress/block-directory/-/block-directory-4.19.13.tgz", - "integrity": "sha512-NM+bec+5CmPOcqLgYqtOZoTdagDHgVhgQk0/3vHqLQZcCyP0PUDNupbvcg2q/KMP78CjL+oWt6aiw4q1eQ7yLw==", + "version": "4.19.16", + "resolved": "https://registry.npmjs.org/@wordpress/block-directory/-/block-directory-4.19.16.tgz", + "integrity": "sha512-7YOqeZt8ExyMidbblzht7x5jnfpZVD6N69VuDrvdlB/8eB7gl62tKZdNXHwWoZccSWJb+xUTZL01k2HpJulcPQ==", "requires": { "@babel/runtime": "^7.16.0", "@wordpress/a11y": "^3.42.13", "@wordpress/api-fetch": "^6.39.13", - "@wordpress/block-editor": "^12.10.13", + "@wordpress/block-editor": "^12.10.14", "@wordpress/blocks": "^12.19.13", - "@wordpress/components": "^25.8.13", + "@wordpress/components": "^25.8.14", "@wordpress/compose": "^6.19.13", - "@wordpress/core-data": "^6.19.13", + "@wordpress/core-data": "^6.19.14", "@wordpress/data": "^9.12.13", - "@wordpress/edit-post": "^7.19.13", - "@wordpress/editor": "^13.19.13", + "@wordpress/edit-post": "^7.19.16", + "@wordpress/editor": "^13.19.14", "@wordpress/element": "^5.19.13", "@wordpress/hooks": "^3.42.13", "@wordpress/html-entities": "^3.42.13", "@wordpress/i18n": "^4.42.13", "@wordpress/icons": "^9.33.13", "@wordpress/notices": "^4.10.13", - "@wordpress/plugins": "^6.10.13", + "@wordpress/plugins": "^6.10.14", "@wordpress/url": "^3.43.13", "change-case": "^4.1.2" } }, "@wordpress/block-editor": { - "version": "12.10.13", - "resolved": "https://registry.npmjs.org/@wordpress/block-editor/-/block-editor-12.10.13.tgz", - "integrity": "sha512-QT5NSgU9WYAmEK3QcDM2W0ChoukeiKRivg3upbbfJh/Njo3VvBROyoziL1Nvor/4nABXl+PRTBBxdsVtMWLtiA==", + "version": "12.10.14", + "resolved": "https://registry.npmjs.org/@wordpress/block-editor/-/block-editor-12.10.14.tgz", + "integrity": "sha512-x56FPZZfJPk/Vd1aKIdpBIllrUuAVgwom+mYH0OohCmUzCBp1Eg8Urg5nshZpiLXpHt2dXycQCLu2Mpb+YpOJw==", "requires": { "@babel/runtime": "^7.16.0", "@emotion/react": "^11.7.1", @@ -38669,8 +38669,8 @@ "@wordpress/api-fetch": "^6.39.13", "@wordpress/blob": "^3.42.13", "@wordpress/blocks": "^12.19.13", - "@wordpress/commands": "^0.13.13", - "@wordpress/components": "^25.8.13", + "@wordpress/commands": "^0.13.14", + "@wordpress/components": "^25.8.14", "@wordpress/compose": "^6.19.13", "@wordpress/data": "^9.12.13", "@wordpress/date": "^4.42.13", @@ -38686,7 +38686,7 @@ "@wordpress/keyboard-shortcuts": "^4.19.13", "@wordpress/keycodes": "^3.42.13", "@wordpress/notices": "^4.10.13", - "@wordpress/preferences": "^3.19.13", + "@wordpress/preferences": "^3.19.14", "@wordpress/private-apis": "^0.24.13", "@wordpress/rich-text": "^6.19.13", "@wordpress/shortcode": "^3.42.13", @@ -38711,20 +38711,20 @@ } }, "@wordpress/block-library": { - "version": "8.19.13", - "resolved": "https://registry.npmjs.org/@wordpress/block-library/-/block-library-8.19.13.tgz", - "integrity": "sha512-JasXSCmRfQsmLjGNWWH6z4+m8a/sv4dn3uuw4i+BgMo5JTg6CIQy85rHz2YWzkMqd+P20978GjJKtkwE4gc/JQ==", + "version": "8.19.16", + "resolved": "https://registry.npmjs.org/@wordpress/block-library/-/block-library-8.19.16.tgz", + "integrity": "sha512-6NqTHjEYk3X+jzw6JS3pOgVYl2HPlr0iAI3Ch9sdOxozAm1+VrE5DKeM//rf9QpR7wWJ6je4F/eNjZ2WJIYTfw==", "requires": { "@babel/runtime": "^7.16.0", "@wordpress/a11y": "^3.42.13", "@wordpress/api-fetch": "^6.39.13", "@wordpress/autop": "^3.42.13", "@wordpress/blob": "^3.42.13", - "@wordpress/block-editor": "^12.10.13", + "@wordpress/block-editor": "^12.10.14", "@wordpress/blocks": "^12.19.13", - "@wordpress/components": "^25.8.13", + "@wordpress/components": "^25.8.14", "@wordpress/compose": "^6.19.13", - "@wordpress/core-data": "^6.19.13", + "@wordpress/core-data": "^6.19.14", "@wordpress/data": "^9.12.13", "@wordpress/date": "^4.42.13", "@wordpress/deprecated": "^3.42.13", @@ -38740,9 +38740,9 @@ "@wordpress/notices": "^4.10.13", "@wordpress/primitives": "^3.40.13", "@wordpress/private-apis": "^0.24.13", - "@wordpress/reusable-blocks": "^4.19.13", + "@wordpress/reusable-blocks": "^4.19.14", "@wordpress/rich-text": "^6.19.13", - "@wordpress/server-side-render": "^4.19.13", + "@wordpress/server-side-render": "^4.19.14", "@wordpress/url": "^3.43.13", "@wordpress/viewport": "^5.19.13", "@wordpress/wordcount": "^3.42.13", @@ -38806,12 +38806,12 @@ "dev": true }, "@wordpress/commands": { - "version": "0.13.13", - "resolved": "https://registry.npmjs.org/@wordpress/commands/-/commands-0.13.13.tgz", - "integrity": "sha512-Z+g7X7csCHD5qJCkJhdc/q3Dg5BLTH5M9fp/80Z5xfHhDjsZz+uVqS2xWavAk6QyIqJlLMnk/9vLxqO1PJJqnw==", + "version": "0.13.14", + "resolved": "https://registry.npmjs.org/@wordpress/commands/-/commands-0.13.14.tgz", + "integrity": "sha512-aSOuRbsr+YYFvRbkXaubHdlAtf/xpG1mUWXEw9VMWCag77hiK6vk04Xb3N8ad8eo8am0N/iRgn8V8IS4LyBTyA==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/components": "^25.8.13", + "@wordpress/components": "^25.8.14", "@wordpress/data": "^9.12.13", "@wordpress/element": "^5.19.13", "@wordpress/i18n": "^4.42.13", @@ -38824,9 +38824,9 @@ } }, "@wordpress/components": { - "version": "25.8.13", - "resolved": "https://registry.npmjs.org/@wordpress/components/-/components-25.8.13.tgz", - "integrity": "sha512-Q3A1mZDgkCounVWawCzbqEbc1nAbm6L74GBNYllO5pxsccNsjcDHAtAEmx9BJzKd4SHEU6bYrgponWvhvLouFA==", + "version": "25.8.14", + "resolved": "https://registry.npmjs.org/@wordpress/components/-/components-25.8.14.tgz", + "integrity": "sha512-wRQSRlLXsL4bEd1JhCQPSdIb0bO4WDAloQufeyIbXUIK9CDgN/jmkv+vrgKrpP3Nqu1sBAFzW1qd9WEXfSBgXw==", "requires": { "@ariakit/react": "^0.2.12", "@babel/runtime": "^7.16.0", @@ -38900,14 +38900,14 @@ } }, "@wordpress/core-commands": { - "version": "0.11.13", - "resolved": "https://registry.npmjs.org/@wordpress/core-commands/-/core-commands-0.11.13.tgz", - "integrity": "sha512-gwiorFZSPeq+UItsPsWOrypfDddTF33+idK6cz18f1PIl6MoGLwNKuiq3A9f28tG4yFLrv5awHATF5PT4vjvKg==", + "version": "0.11.14", + "resolved": "https://registry.npmjs.org/@wordpress/core-commands/-/core-commands-0.11.14.tgz", + "integrity": "sha512-f2DA9lUji96OC5UD85Gbv2vz14R0TR+FSXzXAa68F/EBPFkiaxs2huhruhRvZKbasxugk/vjTBbQuwZ8rinROA==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/block-editor": "^12.10.13", - "@wordpress/commands": "^0.13.13", - "@wordpress/core-data": "^6.19.13", + "@wordpress/block-editor": "^12.10.14", + "@wordpress/commands": "^0.13.14", + "@wordpress/core-data": "^6.19.14", "@wordpress/data": "^9.12.13", "@wordpress/element": "^5.19.13", "@wordpress/i18n": "^4.42.13", @@ -38918,13 +38918,13 @@ } }, "@wordpress/core-data": { - "version": "6.19.13", - "resolved": "https://registry.npmjs.org/@wordpress/core-data/-/core-data-6.19.13.tgz", - "integrity": "sha512-rScMXJkasThvyFea8w+ajGUiOuaR+fEir1oh/obRaKxrYpSMqaf5gKuvpBGxAeMJMsg0yGn5/E4FXGF4TGuX9Q==", + "version": "6.19.14", + "resolved": "https://registry.npmjs.org/@wordpress/core-data/-/core-data-6.19.14.tgz", + "integrity": "sha512-wdstu/qMBKwXnFRX4wMeTkxvHsOgbXm7ZJ0Lgtj+jE86O086Ook7suxacOdMcCaAKNCfMqoGBHtjsNQk3SWE1Q==", "requires": { "@babel/runtime": "^7.16.0", "@wordpress/api-fetch": "^6.39.13", - "@wordpress/block-editor": "^12.10.13", + "@wordpress/block-editor": "^12.10.14", "@wordpress/blocks": "^12.19.13", "@wordpress/compose": "^6.19.13", "@wordpress/data": "^9.12.13", @@ -38946,31 +38946,31 @@ } }, "@wordpress/customize-widgets": { - "version": "4.19.13", - "resolved": "https://registry.npmjs.org/@wordpress/customize-widgets/-/customize-widgets-4.19.13.tgz", - "integrity": "sha512-Wwur4j8tuwV6/KHaZwcSZtqdrOZdWLIn9jL4tK5nTEGv4u1OV+SzucYxqvVqCu6otsyU2lVrRX9kTyiYkJGyJw==", + "version": "4.19.16", + "resolved": "https://registry.npmjs.org/@wordpress/customize-widgets/-/customize-widgets-4.19.16.tgz", + "integrity": "sha512-UK4RrEBFwdn8WcY7qXXbRcncuWXLMpB9gjiBVhwPmM5m1//A0wsOQu2kAkZeACuhYoEJ/N6g4yZh2ZnldJVR3w==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/block-editor": "^12.10.13", - "@wordpress/block-library": "^8.19.13", + "@wordpress/block-editor": "^12.10.14", + "@wordpress/block-library": "^8.19.16", "@wordpress/blocks": "^12.19.13", - "@wordpress/components": "^25.8.13", + "@wordpress/components": "^25.8.14", "@wordpress/compose": "^6.19.13", - "@wordpress/core-data": "^6.19.13", + "@wordpress/core-data": "^6.19.14", "@wordpress/data": "^9.12.13", "@wordpress/dom": "^3.42.13", "@wordpress/element": "^5.19.13", "@wordpress/hooks": "^3.42.13", "@wordpress/i18n": "^4.42.13", "@wordpress/icons": "^9.33.13", - "@wordpress/interface": "^5.19.13", + "@wordpress/interface": "^5.19.14", "@wordpress/is-shallow-equal": "^4.42.13", "@wordpress/keyboard-shortcuts": "^4.19.13", "@wordpress/keycodes": "^3.42.13", "@wordpress/media-utils": "^4.33.13", - "@wordpress/preferences": "^3.19.13", + "@wordpress/preferences": "^3.19.14", "@wordpress/private-apis": "^0.24.13", - "@wordpress/widgets": "^3.19.13", + "@wordpress/widgets": "^3.19.14", "classnames": "^2.3.1", "fast-deep-equal": "^3.1.3" } @@ -39175,89 +39175,89 @@ } }, "@wordpress/edit-post": { - "version": "7.19.13", - "resolved": "https://registry.npmjs.org/@wordpress/edit-post/-/edit-post-7.19.13.tgz", - "integrity": "sha512-iOSnEZdEY1O661vkwG22BC/Si0+QJ6Xo8dgrOSrJmoGeEcN7OrfBaw9JeT/if5Tn0U4dRCI7YtCyUwqtvCicwQ==", + "version": "7.19.16", + "resolved": "https://registry.npmjs.org/@wordpress/edit-post/-/edit-post-7.19.16.tgz", + "integrity": "sha512-PK0XVHLrn6Bg47O8sq7UIBykJOJGF2xsbkOjhRVniD+6EYdYifpGYHTC9nHogEfw691xcz+vAqS87D01x3SfEQ==", "requires": { "@babel/runtime": "^7.16.0", "@wordpress/a11y": "^3.42.13", "@wordpress/api-fetch": "^6.39.13", - "@wordpress/block-editor": "^12.10.13", - "@wordpress/block-library": "^8.19.13", + "@wordpress/block-editor": "^12.10.14", + "@wordpress/block-library": "^8.19.16", "@wordpress/blocks": "^12.19.13", - "@wordpress/commands": "^0.13.13", - "@wordpress/components": "^25.8.13", + "@wordpress/commands": "^0.13.14", + "@wordpress/components": "^25.8.14", "@wordpress/compose": "^6.19.13", - "@wordpress/core-commands": "^0.11.13", - "@wordpress/core-data": "^6.19.13", + "@wordpress/core-commands": "^0.11.14", + "@wordpress/core-data": "^6.19.14", "@wordpress/data": "^9.12.13", "@wordpress/deprecated": "^3.42.13", "@wordpress/dom": "^3.42.13", - "@wordpress/editor": "^13.19.13", + "@wordpress/editor": "^13.19.14", "@wordpress/element": "^5.19.13", "@wordpress/hooks": "^3.42.13", "@wordpress/i18n": "^4.42.13", "@wordpress/icons": "^9.33.13", - "@wordpress/interface": "^5.19.13", + "@wordpress/interface": "^5.19.14", "@wordpress/keyboard-shortcuts": "^4.19.13", "@wordpress/keycodes": "^3.42.13", "@wordpress/media-utils": "^4.33.13", "@wordpress/notices": "^4.10.13", - "@wordpress/plugins": "^6.10.13", - "@wordpress/preferences": "^3.19.13", + "@wordpress/plugins": "^6.10.14", + "@wordpress/preferences": "^3.19.14", "@wordpress/private-apis": "^0.24.13", "@wordpress/url": "^3.43.13", "@wordpress/viewport": "^5.19.13", "@wordpress/warning": "^2.42.13", - "@wordpress/widgets": "^3.19.13", + "@wordpress/widgets": "^3.19.14", "classnames": "^2.3.1", "memize": "^2.1.0", "rememo": "^4.0.2" } }, "@wordpress/edit-site": { - "version": "5.19.13", - "resolved": "https://registry.npmjs.org/@wordpress/edit-site/-/edit-site-5.19.13.tgz", - "integrity": "sha512-0xKu7FQw3h6EBj6fwP2KkeZqa6IaCwTuDx0ZQ5Mur03OsxH6UvuVm/KhNW7ONcw3V0mYsL87pcmJNhw/+L1yvQ==", + "version": "5.19.16", + "resolved": "https://registry.npmjs.org/@wordpress/edit-site/-/edit-site-5.19.16.tgz", + "integrity": "sha512-shraoCd4LCNngtBn9E7U6Na/l+zrU0nTXztgZSuVsqSGktAgHBi7pXMUTsCGqO/vp9fnmW9LU3tQ9XgLEogjkg==", "requires": { "@babel/runtime": "^7.16.0", "@wordpress/a11y": "^3.42.13", "@wordpress/api-fetch": "^6.39.13", - "@wordpress/block-editor": "^12.10.13", - "@wordpress/block-library": "^8.19.13", + "@wordpress/block-editor": "^12.10.14", + "@wordpress/block-library": "^8.19.16", "@wordpress/blocks": "^12.19.13", - "@wordpress/commands": "^0.13.13", - "@wordpress/components": "^25.8.13", + "@wordpress/commands": "^0.13.14", + "@wordpress/components": "^25.8.14", "@wordpress/compose": "^6.19.13", - "@wordpress/core-commands": "^0.11.13", - "@wordpress/core-data": "^6.19.13", + "@wordpress/core-commands": "^0.11.14", + "@wordpress/core-data": "^6.19.14", "@wordpress/data": "^9.12.13", "@wordpress/date": "^4.42.13", "@wordpress/deprecated": "^3.42.13", "@wordpress/dom": "^3.42.13", - "@wordpress/editor": "^13.19.13", + "@wordpress/editor": "^13.19.14", "@wordpress/element": "^5.19.13", "@wordpress/escape-html": "^2.42.13", "@wordpress/hooks": "^3.42.13", "@wordpress/html-entities": "^3.42.13", "@wordpress/i18n": "^4.42.13", "@wordpress/icons": "^9.33.13", - "@wordpress/interface": "^5.19.13", + "@wordpress/interface": "^5.19.14", "@wordpress/keyboard-shortcuts": "^4.19.13", "@wordpress/keycodes": "^3.42.13", "@wordpress/media-utils": "^4.33.13", "@wordpress/notices": "^4.10.13", - "@wordpress/patterns": "^1.3.13", - "@wordpress/plugins": "^6.10.13", - "@wordpress/preferences": "^3.19.13", + "@wordpress/patterns": "^1.3.14", + "@wordpress/plugins": "^6.10.14", + "@wordpress/preferences": "^3.19.14", "@wordpress/primitives": "^3.40.13", "@wordpress/private-apis": "^0.24.13", - "@wordpress/reusable-blocks": "^4.19.13", + "@wordpress/reusable-blocks": "^4.19.14", "@wordpress/router": "^0.11.13", "@wordpress/style-engine": "^1.25.13", "@wordpress/url": "^3.43.13", "@wordpress/viewport": "^5.19.13", - "@wordpress/widgets": "^3.19.13", + "@wordpress/widgets": "^3.19.14", "@wordpress/wordcount": "^3.42.13", "change-case": "^4.1.2", "classnames": "^2.3.1", @@ -39273,18 +39273,18 @@ } }, "@wordpress/edit-widgets": { - "version": "5.19.13", - "resolved": "https://registry.npmjs.org/@wordpress/edit-widgets/-/edit-widgets-5.19.13.tgz", - "integrity": "sha512-SFdDXp2o6I+jNDMF0ncnOE55vuKj3TSUae6D31yzjzsIYLjLWwiv7EFOmNnqBKR6704UvZPAOwin2KojecdMqw==", + "version": "5.19.16", + "resolved": "https://registry.npmjs.org/@wordpress/edit-widgets/-/edit-widgets-5.19.16.tgz", + "integrity": "sha512-1yTkLHQjf/LEmxlw2y0bqgkZcqO2Gs0H8QK1JHEJdHrAK+R5nBd55Jq4Wb2IU+QsUAaGvQzuF+FfHAA4YkLUwQ==", "requires": { "@babel/runtime": "^7.16.0", "@wordpress/api-fetch": "^6.39.13", - "@wordpress/block-editor": "^12.10.13", - "@wordpress/block-library": "^8.19.13", + "@wordpress/block-editor": "^12.10.14", + "@wordpress/block-library": "^8.19.16", "@wordpress/blocks": "^12.19.13", - "@wordpress/components": "^25.8.13", + "@wordpress/components": "^25.8.14", "@wordpress/compose": "^6.19.13", - "@wordpress/core-data": "^6.19.13", + "@wordpress/core-data": "^6.19.14", "@wordpress/data": "^9.12.13", "@wordpress/deprecated": "^3.42.13", "@wordpress/dom": "^3.42.13", @@ -39292,35 +39292,35 @@ "@wordpress/hooks": "^3.42.13", "@wordpress/i18n": "^4.42.13", "@wordpress/icons": "^9.33.13", - "@wordpress/interface": "^5.19.13", + "@wordpress/interface": "^5.19.14", "@wordpress/keyboard-shortcuts": "^4.19.13", "@wordpress/keycodes": "^3.42.13", "@wordpress/media-utils": "^4.33.13", "@wordpress/notices": "^4.10.13", - "@wordpress/patterns": "^1.3.13", - "@wordpress/plugins": "^6.10.13", - "@wordpress/preferences": "^3.19.13", + "@wordpress/patterns": "^1.3.14", + "@wordpress/plugins": "^6.10.14", + "@wordpress/preferences": "^3.19.14", "@wordpress/private-apis": "^0.24.13", - "@wordpress/reusable-blocks": "^4.19.13", + "@wordpress/reusable-blocks": "^4.19.14", "@wordpress/url": "^3.43.13", - "@wordpress/widgets": "^3.19.13", + "@wordpress/widgets": "^3.19.14", "classnames": "^2.3.1" } }, "@wordpress/editor": { - "version": "13.19.13", - "resolved": "https://registry.npmjs.org/@wordpress/editor/-/editor-13.19.13.tgz", - "integrity": "sha512-8df51NC4+pCE45AL1NFo8RXq7rND97yxHjb1rECLRvYUetq08pUX2m+kYWmxxSHaVHNytOmMtERpkYGNC7sAXQ==", + "version": "13.19.14", + "resolved": "https://registry.npmjs.org/@wordpress/editor/-/editor-13.19.14.tgz", + "integrity": "sha512-t1RFJl0Bf+qJpBHtiUl0qoxJjpNNGcpSZLejnhR97+i32l/4ewg8+z69zwFtW4ChNQjLnAFnpQZ5pT/CqkkKpQ==", "requires": { "@babel/runtime": "^7.16.0", "@wordpress/a11y": "^3.42.13", "@wordpress/api-fetch": "^6.39.13", "@wordpress/blob": "^3.42.13", - "@wordpress/block-editor": "^12.10.13", + "@wordpress/block-editor": "^12.10.14", "@wordpress/blocks": "^12.19.13", - "@wordpress/components": "^25.8.13", + "@wordpress/components": "^25.8.14", "@wordpress/compose": "^6.19.13", - "@wordpress/core-data": "^6.19.13", + "@wordpress/core-data": "^6.19.14", "@wordpress/data": "^9.12.13", "@wordpress/date": "^4.42.13", "@wordpress/deprecated": "^3.42.13", @@ -39334,12 +39334,12 @@ "@wordpress/keycodes": "^3.42.13", "@wordpress/media-utils": "^4.33.13", "@wordpress/notices": "^4.10.13", - "@wordpress/patterns": "^1.3.13", - "@wordpress/preferences": "^3.19.13", + "@wordpress/patterns": "^1.3.14", + "@wordpress/preferences": "^3.19.14", "@wordpress/private-apis": "^0.24.13", - "@wordpress/reusable-blocks": "^4.19.13", + "@wordpress/reusable-blocks": "^4.19.14", "@wordpress/rich-text": "^6.19.13", - "@wordpress/server-side-render": "^4.19.13", + "@wordpress/server-side-render": "^4.19.14", "@wordpress/url": "^3.43.13", "@wordpress/wordcount": "^3.42.13", "classnames": "^2.3.1", @@ -39410,14 +39410,14 @@ } }, "@wordpress/format-library": { - "version": "4.19.13", - "resolved": "https://registry.npmjs.org/@wordpress/format-library/-/format-library-4.19.13.tgz", - "integrity": "sha512-EY8oCHXbfRogyKvRkF5z58O04o8MzQDY6Ms1mqZ95FGdAt9TJ6sfJgPXbj8a9bR7WAbx74h5eo6t2K1m3HZu6A==", + "version": "4.19.14", + "resolved": "https://registry.npmjs.org/@wordpress/format-library/-/format-library-4.19.14.tgz", + "integrity": "sha512-NyJ1nmb6PODE5hXM9oOEBlYA48k6c2DlGcUTXkSzDcdLPRVinTeWDfPL4kpze30JcQPv9m6Y5/EfWp48bDnByA==", "requires": { "@babel/runtime": "^7.16.0", "@wordpress/a11y": "^3.42.13", - "@wordpress/block-editor": "^12.10.13", - "@wordpress/components": "^25.8.13", + "@wordpress/block-editor": "^12.10.14", + "@wordpress/components": "^25.8.14", "@wordpress/compose": "^6.19.13", "@wordpress/data": "^9.12.13", "@wordpress/element": "^5.19.13", @@ -39478,21 +39478,21 @@ } }, "@wordpress/interface": { - "version": "5.19.13", - "resolved": "https://registry.npmjs.org/@wordpress/interface/-/interface-5.19.13.tgz", - "integrity": "sha512-TdE6B3FlZoYqf9WBFPh8g34ciAABaQR4uBHgGv4uXxsgu8sCBx3zIKJZuMLTv6StsivKFYn4pBFZRD/SZGx49w==", + "version": "5.19.14", + "resolved": "https://registry.npmjs.org/@wordpress/interface/-/interface-5.19.14.tgz", + "integrity": "sha512-WsIsSKJuhAcXD3YbmUoncL1JZ6hKAJXs7Lb/bjrOJxCts/YOy5yMF3/I05r8f1Tfw/pS8wlHMRjIXH/gvnvWVA==", "requires": { "@babel/runtime": "^7.16.0", "@wordpress/a11y": "^3.42.13", - "@wordpress/components": "^25.8.13", + "@wordpress/components": "^25.8.14", "@wordpress/compose": "^6.19.13", "@wordpress/data": "^9.12.13", "@wordpress/deprecated": "^3.42.13", "@wordpress/element": "^5.19.13", "@wordpress/i18n": "^4.42.13", "@wordpress/icons": "^9.33.13", - "@wordpress/plugins": "^6.10.13", - "@wordpress/preferences": "^3.19.13", + "@wordpress/plugins": "^6.10.14", + "@wordpress/preferences": "^3.19.14", "@wordpress/viewport": "^5.19.13", "classnames": "^2.3.1" } @@ -39548,13 +39548,13 @@ } }, "@wordpress/list-reusable-blocks": { - "version": "4.19.13", - "resolved": "https://registry.npmjs.org/@wordpress/list-reusable-blocks/-/list-reusable-blocks-4.19.13.tgz", - "integrity": "sha512-OnLlQq2sQ4xj5/UhmbC5eTSSTGf8iAfHGOvPi3OZF1Ig9otGsonjSrATgJSskomZFkjetWUQfBOVBxA23Ni7cA==", + "version": "4.19.14", + "resolved": "https://registry.npmjs.org/@wordpress/list-reusable-blocks/-/list-reusable-blocks-4.19.14.tgz", + "integrity": "sha512-GuorU374D0Ft7RtIZWWc7ltIkV3ThjU/u+LwbNzh5y7iaVs4l64qvqopqoj/IoRVdahpnLEO3MNxj9InlUiNeg==", "requires": { "@babel/runtime": "^7.16.0", "@wordpress/api-fetch": "^6.39.13", - "@wordpress/components": "^25.8.13", + "@wordpress/components": "^25.8.14", "@wordpress/compose": "^6.19.13", "@wordpress/element": "^5.19.13", "@wordpress/i18n": "^4.42.13", @@ -39590,12 +39590,12 @@ "dev": true }, "@wordpress/nux": { - "version": "8.4.13", - "resolved": "https://registry.npmjs.org/@wordpress/nux/-/nux-8.4.13.tgz", - "integrity": "sha512-xWG622MaEfIr1Z735GGnW5/CYbX9qnJPHzTOsATtbSUUTPEWiPXcUkPTVPvWry1Lj5Y8ib6jNgSEQJQJJaXzmw==", + "version": "8.4.14", + "resolved": "https://registry.npmjs.org/@wordpress/nux/-/nux-8.4.14.tgz", + "integrity": "sha512-JcxUtWOzl7lTuv39BWRwzwPDvVEhFECGzK819i3kExbTjmsVHCHtsdB7khPrdAYZOm2GXzR1le+/UFfkGuHS2Q==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/components": "^25.8.13", + "@wordpress/components": "^25.8.14", "@wordpress/compose": "^6.19.13", "@wordpress/data": "^9.12.13", "@wordpress/deprecated": "^3.42.13", @@ -39606,17 +39606,17 @@ } }, "@wordpress/patterns": { - "version": "1.3.13", - "resolved": "https://registry.npmjs.org/@wordpress/patterns/-/patterns-1.3.13.tgz", - "integrity": "sha512-ATonHUTQk6dXea+hdSr8BLGE9OryHsnRn2MXNQLzr2kebV4BSmqXATNnC8k+I5F6CwMIQGo+LSsx614ht5vkFg==", + "version": "1.3.14", + "resolved": "https://registry.npmjs.org/@wordpress/patterns/-/patterns-1.3.14.tgz", + "integrity": "sha512-eaZWZlaF/MlxqDY7KYzL8cApY4b4f89wuqHVSmjv52UfvaqxW0vd09ddX+jwkcXysDHFzwM63takIIVZwYn9Lg==", "requires": { "@babel/runtime": "^7.16.0", "@wordpress/a11y": "^3.42.13", - "@wordpress/block-editor": "^12.10.13", + "@wordpress/block-editor": "^12.10.14", "@wordpress/blocks": "^12.19.13", - "@wordpress/components": "^25.8.13", + "@wordpress/components": "^25.8.14", "@wordpress/compose": "^6.19.13", - "@wordpress/core-data": "^6.19.13", + "@wordpress/core-data": "^6.19.14", "@wordpress/data": "^9.12.13", "@wordpress/element": "^5.19.13", "@wordpress/html-entities": "^3.42.13", @@ -39628,12 +39628,12 @@ } }, "@wordpress/plugins": { - "version": "6.10.13", - "resolved": "https://registry.npmjs.org/@wordpress/plugins/-/plugins-6.10.13.tgz", - "integrity": "sha512-1fb9iRwU7yDJ95j0ms8F43DMk/bxrtwoNXPU/qcvxMyjJg3WFFOgnrW7jvm3Y7T9KG2o4LJlQF0znCdGX1TOMQ==", + "version": "6.10.14", + "resolved": "https://registry.npmjs.org/@wordpress/plugins/-/plugins-6.10.14.tgz", + "integrity": "sha512-Duxh0OxpSuUFTMHa500iitrD21/JeTklc8/Hf3ApCpn4SdDzFR4IrwUdoJk0jGDY79cTwBVeWts5GhObbJByng==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/components": "^25.8.13", + "@wordpress/components": "^25.8.14", "@wordpress/compose": "^6.19.13", "@wordpress/element": "^5.19.13", "@wordpress/hooks": "^3.42.13", @@ -39653,13 +39653,13 @@ } }, "@wordpress/preferences": { - "version": "3.19.13", - "resolved": "https://registry.npmjs.org/@wordpress/preferences/-/preferences-3.19.13.tgz", - "integrity": "sha512-+Rd3zBy8IlpSNg9l5JetIhtZKagQz5xb/QC9spIIHKqjzApeS9jIuQXBnrHY1LDdXR8KgiRR4Iu+7Ls4myOckQ==", + "version": "3.19.14", + "resolved": "https://registry.npmjs.org/@wordpress/preferences/-/preferences-3.19.14.tgz", + "integrity": "sha512-xLu+G22Vlm4KajE/Eimq8qLzBoxMZ7BJLp8WobFC3yyzdU9R785dug9t9et4r45NxWJr8aVWkFzhEBzAadHjnA==", "requires": { "@babel/runtime": "^7.16.0", "@wordpress/a11y": "^3.42.13", - "@wordpress/components": "^25.8.13", + "@wordpress/components": "^25.8.14", "@wordpress/data": "^9.12.13", "@wordpress/element": "^5.19.13", "@wordpress/i18n": "^4.42.13", @@ -39721,15 +39721,15 @@ } }, "@wordpress/reusable-blocks": { - "version": "4.19.13", - "resolved": "https://registry.npmjs.org/@wordpress/reusable-blocks/-/reusable-blocks-4.19.13.tgz", - "integrity": "sha512-LWfMG2sgH3oP8gKRyOWRm6sX2sZx41hvfHnf6wkfd+Jz0mI4y/hHx4pVW/Y6qIxVQZodALSdPI3P1djqt6pZ/A==", + "version": "4.19.14", + "resolved": "https://registry.npmjs.org/@wordpress/reusable-blocks/-/reusable-blocks-4.19.14.tgz", + "integrity": "sha512-WhQNDtq2ohGlGlodNyEbvMux631D+7jRABwodvoC42dVJyHR3lH1O8uhnQeKyPl91YWLxJ6+mHmrPInEo2fAcQ==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/block-editor": "^12.10.13", + "@wordpress/block-editor": "^12.10.14", "@wordpress/blocks": "^12.19.13", - "@wordpress/components": "^25.8.13", - "@wordpress/core-data": "^6.19.13", + "@wordpress/components": "^25.8.14", + "@wordpress/core-data": "^6.19.14", "@wordpress/data": "^9.12.13", "@wordpress/element": "^5.19.13", "@wordpress/i18n": "^4.42.13", @@ -40060,14 +40060,14 @@ } }, "@wordpress/server-side-render": { - "version": "4.19.13", - "resolved": "https://registry.npmjs.org/@wordpress/server-side-render/-/server-side-render-4.19.13.tgz", - "integrity": "sha512-gE8CgLtfiXAKsVU9lJttSwTRMLDdMuIY8bpvqaO73WrpeMVFHS97KgaYD+DK8Yi7UByn3oz5O+mGTNfz4t0GLw==", + "version": "4.19.14", + "resolved": "https://registry.npmjs.org/@wordpress/server-side-render/-/server-side-render-4.19.14.tgz", + "integrity": "sha512-As3Xc3TDM0R0siAFaldobRdZnPfQQMXvlQxalFJgs/kSoYOmcdc46mR5Wgmfn7r0Kc/Z5uOHLbvm4mWekE0a2A==", "requires": { "@babel/runtime": "^7.16.0", "@wordpress/api-fetch": "^6.39.13", "@wordpress/blocks": "^12.19.13", - "@wordpress/components": "^25.8.13", + "@wordpress/components": "^25.8.14", "@wordpress/compose": "^6.19.13", "@wordpress/data": "^9.12.13", "@wordpress/deprecated": "^3.42.13", @@ -40159,17 +40159,17 @@ "integrity": "sha512-SYi37xiR7Wq4Vde4JBkCYJIyfUQzyuABrwh7aon1XwcUhWP072tv4/LKP6F+zWYC5M8pPdRqjznxgwZ2mNzcyw==" }, "@wordpress/widgets": { - "version": "3.19.13", - "resolved": "https://registry.npmjs.org/@wordpress/widgets/-/widgets-3.19.13.tgz", - "integrity": "sha512-+IwGEDSy17PD7ghfP3d4+25q3EDw9NFUDnLsGR4nao3tAJT+Eyi8/BJkimR0CQXFcBHGt7PqI9SAEKTs1qqBHA==", + "version": "3.19.14", + "resolved": "https://registry.npmjs.org/@wordpress/widgets/-/widgets-3.19.14.tgz", + "integrity": "sha512-nFyXrCBVp24joFa96sAdNwkWnnf23t960ebnoW+Wk+lMT0PsGfGjiMIRmtks2cfqbQuQYFdO/8go+DSE54ekAg==", "requires": { "@babel/runtime": "^7.16.0", "@wordpress/api-fetch": "^6.39.13", - "@wordpress/block-editor": "^12.10.13", + "@wordpress/block-editor": "^12.10.14", "@wordpress/blocks": "^12.19.13", - "@wordpress/components": "^25.8.13", + "@wordpress/components": "^25.8.14", "@wordpress/compose": "^6.19.13", - "@wordpress/core-data": "^6.19.13", + "@wordpress/core-data": "^6.19.14", "@wordpress/data": "^9.12.13", "@wordpress/element": "^5.19.13", "@wordpress/i18n": "^4.42.13", diff --git a/package.json b/package.json index a25758279c0cd..6a9db6624057d 100644 --- a/package.json +++ b/package.json @@ -84,55 +84,55 @@ "@wordpress/api-fetch": "6.39.13", "@wordpress/autop": "3.42.13", "@wordpress/blob": "3.42.13", - "@wordpress/block-directory": "4.19.13", - "@wordpress/block-editor": "12.10.13", - "@wordpress/block-library": "8.19.13", + "@wordpress/block-directory": "4.19.16", + "@wordpress/block-editor": "12.10.14", + "@wordpress/block-library": "8.19.16", "@wordpress/block-serialization-default-parser": "4.42.13", "@wordpress/blocks": "12.19.13", - "@wordpress/commands": "0.13.13", - "@wordpress/components": "25.8.13", + "@wordpress/commands": "0.13.14", + "@wordpress/components": "25.8.14", "@wordpress/compose": "6.19.13", - "@wordpress/core-commands": "0.11.13", - "@wordpress/core-data": "6.19.13", - "@wordpress/customize-widgets": "4.19.13", + "@wordpress/core-commands": "0.11.14", + "@wordpress/core-data": "6.19.14", + "@wordpress/customize-widgets": "4.19.16", "@wordpress/data": "9.12.13", "@wordpress/data-controls": "3.11.13", "@wordpress/date": "4.42.13", "@wordpress/deprecated": "3.42.13", "@wordpress/dom": "3.42.13", "@wordpress/dom-ready": "3.42.13", - "@wordpress/edit-post": "7.19.13", - "@wordpress/edit-site": "5.19.13", - "@wordpress/edit-widgets": "5.19.13", - "@wordpress/editor": "13.19.13", + "@wordpress/edit-post": "7.19.16", + "@wordpress/edit-site": "5.19.16", + "@wordpress/edit-widgets": "5.19.16", + "@wordpress/editor": "13.19.14", "@wordpress/element": "5.19.13", "@wordpress/escape-html": "2.42.13", - "@wordpress/format-library": "4.19.13", + "@wordpress/format-library": "4.19.14", "@wordpress/hooks": "3.42.13", "@wordpress/html-entities": "3.42.13", "@wordpress/i18n": "4.42.13", "@wordpress/icons": "9.33.13", "@wordpress/interactivity": "2.3.13", - "@wordpress/interface": "5.19.13", + "@wordpress/interface": "5.19.14", "@wordpress/is-shallow-equal": "4.42.13", "@wordpress/keyboard-shortcuts": "4.19.13", "@wordpress/keycodes": "3.42.13", - "@wordpress/list-reusable-blocks": "4.19.13", + "@wordpress/list-reusable-blocks": "4.19.14", "@wordpress/media-utils": "4.33.13", "@wordpress/notices": "4.10.13", - "@wordpress/nux": "8.4.13", - "@wordpress/patterns": "1.3.13", - "@wordpress/plugins": "6.10.13", - "@wordpress/preferences": "3.19.13", + "@wordpress/nux": "8.4.14", + "@wordpress/patterns": "1.3.14", + "@wordpress/plugins": "6.10.14", + "@wordpress/preferences": "3.19.14", "@wordpress/preferences-persistence": "1.34.13", "@wordpress/primitives": "3.40.13", "@wordpress/priority-queue": "2.42.13", "@wordpress/private-apis": "0.24.13", "@wordpress/redux-routine": "4.42.13", - "@wordpress/reusable-blocks": "4.19.13", + "@wordpress/reusable-blocks": "4.19.14", "@wordpress/rich-text": "6.19.13", "@wordpress/router": "0.11.13", - "@wordpress/server-side-render": "4.19.13", + "@wordpress/server-side-render": "4.19.14", "@wordpress/shortcode": "3.42.13", "@wordpress/style-engine": "1.25.13", "@wordpress/sync": "0.4.13", @@ -141,7 +141,7 @@ "@wordpress/url": "3.43.13", "@wordpress/viewport": "5.19.13", "@wordpress/warning": "2.42.13", - "@wordpress/widgets": "3.19.13", + "@wordpress/widgets": "3.19.14", "@wordpress/wordcount": "3.42.13", "backbone": "1.5.0", "clipboard": "2.0.11", diff --git a/src/wp-includes/assets/script-loader-packages.min.php b/src/wp-includes/assets/script-loader-packages.min.php index 895d165864d11..11257c8d1e0c0 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' => '8a51b57fcf89fa4f37b2'), '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' => '44e27c1179c5c75367af'), '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' => '4bffbe88e13f0ade6d22'), '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' => '99b262137df116eb6013'), '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' => 'dc5f255634f3da29c8d5'), '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' => 'c25cbb9d6b28255c1cb6'), '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' => '5abe10197275cf7808ee'), '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' => 'efcce5c1b2c28e8b2865'), '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' => 'f43df5cec4d4061a74f0'), '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' => '8a070b748cf406a8d42e'), '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' => '9c5365423f60fac3c287'), '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' => '387d6480ace3103ccd8b'), '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' => '99b262137df116eb6013'), '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' => 'dc5f255634f3da29c8d5'), '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' => 'c25cbb9d6b28255c1cb6'), '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' => '5abe10197275cf7808ee'), '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' => 'efcce5c1b2c28e8b2865'), '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' => 'f43df5cec4d4061a74f0'), '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')); From 788d709a56e75bce8843f0f25c02d96cd9b92842 Mon Sep 17 00:00:00 2001 From: Isabel Brison Date: Tue, 9 Jan 2024 23:30:10 +0000 Subject: [PATCH 23/35] Editor: output palette presets when appearance tools or border are enabled. Adds color palette presets to global styles output if current theme supports either appearance tools or border. Props andrewserong, noisysocks. Fixes #60134. git-svn-id: https://develop.svn.wordpress.org/trunk@57259 602fd350-edb4-49c9-b593-d223f7449a82 --- .../global-styles-and-settings.php | 8 ++- .../tests/rest-api/rest-themes-controller.php | 3 + .../tests/theme/wpGetGlobalStylesheet.php | 71 +++++++++++++++++++ 3 files changed, 81 insertions(+), 1 deletion(-) diff --git a/src/wp-includes/global-styles-and-settings.php b/src/wp-includes/global-styles-and-settings.php index 1258f1f4e37f1..032913db44c11 100644 --- a/src/wp-includes/global-styles-and-settings.php +++ b/src/wp-includes/global-styles-and-settings.php @@ -222,7 +222,13 @@ function wp_get_global_stylesheet( $types = array() ) { * @see wp_add_global_styles_for_blocks */ $origins = array( 'default', 'theme', 'custom' ); - if ( ! $supports_theme_json ) { + /* + * If the theme doesn't have theme.json but supports both appearance tools and color palette, + * the 'theme' origin should be included so color palette presets are also output. + */ + if ( ! $supports_theme_json && ( current_theme_supports( 'appearance-tools' ) || current_theme_supports( 'border' ) ) && current_theme_supports( 'editor-color-palette' ) ) { + $origins = array( 'default', 'theme' ); + } elseif ( ! $supports_theme_json ) { $origins = array( 'default' ); } $styles_rest = $tree->get_stylesheet( $types, $origins ); diff --git a/tests/phpunit/tests/rest-api/rest-themes-controller.php b/tests/phpunit/tests/rest-api/rest-themes-controller.php index 24b564debb6bc..7a5438951cd4d 100644 --- a/tests/phpunit/tests/rest-api/rest-themes-controller.php +++ b/tests/phpunit/tests/rest-api/rest-themes-controller.php @@ -127,6 +127,9 @@ public static function wpTearDownAfterClass() { self::delete_user( self::$subscriber_id ); self::delete_user( self::$contributor_id ); self::delete_user( self::$admin_id ); + + remove_theme_support( 'editor-gradient-presets' ); + remove_theme_support( 'editor-color-palette' ); } /** diff --git a/tests/phpunit/tests/theme/wpGetGlobalStylesheet.php b/tests/phpunit/tests/theme/wpGetGlobalStylesheet.php index 3035467a0161a..a3b6ce0c2f511 100644 --- a/tests/phpunit/tests/theme/wpGetGlobalStylesheet.php +++ b/tests/phpunit/tests/theme/wpGetGlobalStylesheet.php @@ -18,6 +18,13 @@ class Tests_Theme_WpGetGlobalStylesheet extends WP_Theme_UnitTestCase { */ private $remove_theme_support_at_teardown = false; + /** + * Flag to indicate whether to remove 'border' theme support at tear_down(). + * + * @var bool + */ + private $remove_border_support_at_teardown = false; + /** * Flag to indicate whether to switch back to the default theme at tear down. * @@ -40,6 +47,12 @@ public function tear_down() { switch_theme( WP_DEFAULT_THEME ); } + if ( $this->remove_border_support_at_teardown ) { + $this->remove_border_support_at_teardown = false; + remove_theme_support( 'border' ); + remove_theme_support( 'editor-color-palette' ); + } + parent::tear_down(); } @@ -246,6 +259,64 @@ public function test_caching_is_used_when_developing_theme() { $this->assertNotSame( $css, wp_get_global_stylesheet(), 'Caching was used despite theme development mode' ); } + /** + * Tests that theme color palette presets are output when appearance tools are enabled via theme support. + * + * @ticket 60134 + */ + public function test_theme_color_palette_presets_output_when_border_support_enabled() { + + $args = array( + array( + 'name' => 'Black', + 'slug' => 'nice-black', + 'color' => '#000000', + ), + array( + 'name' => 'Dark Gray', + 'slug' => 'dark-gray', + 'color' => '#28303D', + ), + array( + 'name' => 'Green', + 'slug' => 'haunted-green', + 'color' => '#D1E4DD', + ), + array( + 'name' => 'Blue', + 'slug' => 'soft-blue', + 'color' => '#D1DFE4', + ), + array( + 'name' => 'Purple', + 'slug' => 'cool-purple', + 'color' => '#D1D1E4', + ), + ); + + // Add theme support for appearance tools. + add_theme_support( 'border' ); + add_theme_support( 'editor-color-palette', $args ); + $this->remove_border_support_at_teardown = true; + + // Check for both the variable declaration and its use as a value. + $variables = wp_get_global_stylesheet( array( 'variables' ) ); + + $this->assertStringContainsString( '--wp--preset--color--nice-black: #000000', $variables ); + $this->assertStringContainsString( '--wp--preset--color--dark-gray: #28303D', $variables ); + $this->assertStringContainsString( '--wp--preset--color--haunted-green: #D1E4DD', $variables ); + $this->assertStringContainsString( '--wp--preset--color--soft-blue: #D1DFE4', $variables ); + $this->assertStringContainsString( '--wp--preset--color--cool-purple: #D1D1E4', $variables ); + + $presets = wp_get_global_stylesheet( array( 'presets' ) ); + + $this->assertStringContainsString( 'var(--wp--preset--color--nice-black)', $presets ); + $this->assertStringContainsString( 'var(--wp--preset--color--dark-gray)', $presets ); + $this->assertStringContainsString( 'var(--wp--preset--color--haunted-green)', $presets ); + $this->assertStringContainsString( 'var(--wp--preset--color--soft-blue)', $presets ); + $this->assertStringContainsString( 'var(--wp--preset--color--cool-purple)', $presets ); + } + /** * Adds the 'editor-font-sizes' theme support with custom font sizes. * From ca241962334ecb339b31fcffbe33674d67b015e5 Mon Sep 17 00:00:00 2001 From: Isabel Brison Date: Wed, 10 Jan 2024 00:25:19 +0000 Subject: [PATCH 24/35] Editor: Allow default duotone styles if not explicitly disabled in theme.json. Removes setting that disabled default duotone palette from being output in themes without theme.json. Props andrewserong. Fixes #60136. git-svn-id: https://develop.svn.wordpress.org/trunk@57260 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class-wp-theme-json-resolver.php | 3 --- .../phpunit/tests/theme/wpThemeJsonResolver.php | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/src/wp-includes/class-wp-theme-json-resolver.php b/src/wp-includes/class-wp-theme-json-resolver.php index 5a785612ce185..44db8364f1092 100644 --- a/src/wp-includes/class-wp-theme-json-resolver.php +++ b/src/wp-includes/class-wp-theme-json-resolver.php @@ -312,9 +312,6 @@ public static function get_theme_data( $deprecated = array(), $options = array() } $theme_support_data['settings']['color']['defaultGradients'] = $default_gradients; - // Classic themes without a theme.json don't support global duotone. - $theme_support_data['settings']['color']['defaultDuotone'] = false; - // Allow themes to enable link color setting via theme_support. if ( current_theme_supports( 'link-color' ) ) { $theme_support_data['settings']['color']['link'] = true; diff --git a/tests/phpunit/tests/theme/wpThemeJsonResolver.php b/tests/phpunit/tests/theme/wpThemeJsonResolver.php index dd5fff2bff8ef..d595b3a908ae1 100644 --- a/tests/phpunit/tests/theme/wpThemeJsonResolver.php +++ b/tests/phpunit/tests/theme/wpThemeJsonResolver.php @@ -472,6 +472,22 @@ public function test_add_theme_supports_are_loaded_for_themes_without_theme_json $this->assertTrue( $settings['border']['color'], 'Support for "appearance-tools" was not added.' ); } + /** + * Tests that classic themes still get core default settings such as color palette and duotone. + * + * @ticket 60136 + */ + public function test_core_default_settings_are_loaded_for_themes_without_theme_json() { + switch_theme( 'default' ); + + $settings = WP_Theme_JSON_Resolver::get_merged_data( 'theme' )->get_settings(); + + $this->assertFalse( wp_theme_has_theme_json() ); + $this->assertTrue( $settings['color']['defaultPalette'] ); + $this->assertTrue( $settings['color']['defaultDuotone'] ); + $this->assertTrue( $settings['color']['defaultGradients'] ); + } + /** * @ticket 54336 * @ticket 56611 From 57597d9cccc68943fe706c8bb3148a2c71ac2105 Mon Sep 17 00:00:00 2001 From: Isabel Brison Date: Wed, 10 Jan 2024 04:07:32 +0000 Subject: [PATCH 25/35] Editor: fix inline comment formatting. Correctly formats inline comment in `wp_get_global_stylesheet`. Follow-up to [57259]. Props mukesh27. See #60134. git-svn-id: https://develop.svn.wordpress.org/trunk@57261 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/global-styles-and-settings.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wp-includes/global-styles-and-settings.php b/src/wp-includes/global-styles-and-settings.php index 032913db44c11..acca33be1e844 100644 --- a/src/wp-includes/global-styles-and-settings.php +++ b/src/wp-includes/global-styles-and-settings.php @@ -223,9 +223,9 @@ function wp_get_global_stylesheet( $types = array() ) { */ $origins = array( 'default', 'theme', 'custom' ); /* - * If the theme doesn't have theme.json but supports both appearance tools and color palette, - * the 'theme' origin should be included so color palette presets are also output. - */ + * If the theme doesn't have theme.json but supports both appearance tools and color palette, + * the 'theme' origin should be included so color palette presets are also output. + */ if ( ! $supports_theme_json && ( current_theme_supports( 'appearance-tools' ) || current_theme_supports( 'border' ) ) && current_theme_supports( 'editor-color-palette' ) ) { $origins = array( 'default', 'theme' ); } elseif ( ! $supports_theme_json ) { From 3da32969b272aa80abcc45537a121482362b2c30 Mon Sep 17 00:00:00 2001 From: Colin Stewart Date: Wed, 10 Jan 2024 11:11:02 +0000 Subject: [PATCH 26/35] Customize: Correct a typo in a console warning message. This corrects a typo from "instantating" to "instantiating". Follow-up to [41374]. Props benniledl, mukesh27, Presskopp. Fixes #60222. git-svn-id: https://develop.svn.wordpress.org/trunk@57262 602fd350-edb4-49c9-b593-d223f7449a82 --- src/js/_enqueues/wp/customize/controls.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/_enqueues/wp/customize/controls.js b/src/js/_enqueues/wp/customize/controls.js index b6786b4d38d0e..650ac8a161052 100644 --- a/src/js/_enqueues/wp/customize/controls.js +++ b/src/js/_enqueues/wp/customize/controls.js @@ -3866,7 +3866,7 @@ var control = this, container, notifications, hasError = false; if ( 'undefined' !== typeof console && console.warn ) { - console.warn( '[DEPRECATED] wp.customize.Control.prototype.renderNotifications() is deprecated in favor of instantating a wp.customize.Notifications and calling its render() method.' ); + console.warn( '[DEPRECATED] wp.customize.Control.prototype.renderNotifications() is deprecated in favor of instantiating a wp.customize.Notifications and calling its render() method.' ); } container = control.getNotificationsContainerElement(); From eff1a3d24bc5308604992c11effc26ef2a6c6cbf Mon Sep 17 00:00:00 2001 From: Colin Stewart Date: Wed, 10 Jan 2024 11:55:04 +0000 Subject: [PATCH 27/35] Docs: Correct some typos in docblocks and inline comments. This corrects several typos in documentation, including: - "imput" -> "input" - "proessing" -> "processing" - "instantating" -> "instantiating" - "filtersing" -> "filtering" - "officaly" -> "officially" Follow-up to [8852], [25307], [26191], [37488], [54416]. Props benniledl, mukesh27, jayadevankbh, Presskopp. Fixes #60069. See #59651. git-svn-id: https://develop.svn.wordpress.org/trunk@57263 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/class-wp-filesystem-ssh2.php | 2 +- src/wp-admin/includes/class-wp-users-list-table.php | 2 +- src/wp-admin/includes/deprecated.php | 4 ++-- src/wp-includes/formatting.php | 2 +- src/wp-includes/media.php | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/wp-admin/includes/class-wp-filesystem-ssh2.php b/src/wp-admin/includes/class-wp-filesystem-ssh2.php index 6979a92c2f2f1..b8daad1ab1c3f 100644 --- a/src/wp-admin/includes/class-wp-filesystem-ssh2.php +++ b/src/wp-admin/includes/class-wp-filesystem-ssh2.php @@ -6,7 +6,7 @@ * * {@link http://kevin.vanzonneveld.net/techblog/article/make_ssh_connections_with_php/ - Installation Notes} * - * Compile libssh2 (Note: Only 0.14 is officaly working with PHP 5.2.6+ right now, But many users have found the latest versions work) + * Compile libssh2 (Note: Only 0.14 is officially working with PHP 5.2.6+ right now, But many users have found the latest versions work) * * cd /usr/src * wget https://www.libssh2.org/download/libssh2-0.14.tar.gz diff --git a/src/wp-admin/includes/class-wp-users-list-table.php b/src/wp-admin/includes/class-wp-users-list-table.php index ecb8eb4b6d292..8dfe3ce1a3e14 100644 --- a/src/wp-admin/includes/class-wp-users-list-table.php +++ b/src/wp-admin/includes/class-wp-users-list-table.php @@ -163,7 +163,7 @@ public function no_items() { * with this table. * * Provides a list of roles and user count for that role for easy - * Filtersing of the user table. + * filtering of the user table. * * @since 3.1.0 * diff --git a/src/wp-admin/includes/deprecated.php b/src/wp-admin/includes/deprecated.php index d588ad4f54fc2..f7805b4cc7034 100644 --- a/src/wp-admin/includes/deprecated.php +++ b/src/wp-admin/includes/deprecated.php @@ -1152,7 +1152,7 @@ function wp_nav_menu_locations_meta_box() { /** * This was once used to kick-off the Core Updater. * - * Deprecated in favor of instantating a Core_Upgrader instance directly, + * Deprecated in favor of instantiating a Core_Upgrader instance directly, * and calling the 'upgrade' method. * * @since 2.7.0 @@ -1174,7 +1174,7 @@ function wp_update_core($current, $feedback = '') { /** * This was once used to kick-off the Plugin Updater. * - * Deprecated in favor of instantating a Plugin_Upgrader instance directly, + * Deprecated in favor of instantiating a Plugin_Upgrader instance directly, * and calling the 'upgrade' method. * Unused since 2.8.0. * diff --git a/src/wp-includes/formatting.php b/src/wp-includes/formatting.php index bc150c8a537cb..83938306b0774 100644 --- a/src/wp-includes/formatting.php +++ b/src/wp-includes/formatting.php @@ -3506,7 +3506,7 @@ function convert_smilies( $text ) { $textarr = preg_split( '/(<.*>)/U', $text, -1, PREG_SPLIT_DELIM_CAPTURE ); // Capture the tags as well as in between. $stop = count( $textarr ); // Loop stuff. - // Ignore proessing of specific tags. + // Ignore processing of specific tags. $tags_to_ignore = 'code|pre|style|script|textarea'; $ignore_block_element = ''; diff --git a/src/wp-includes/media.php b/src/wp-includes/media.php index 224d8a18caf98..9cf301e95c11a 100644 --- a/src/wp-includes/media.php +++ b/src/wp-includes/media.php @@ -4133,7 +4133,7 @@ function _wp_image_editor_choose( $args = array() ) { ! call_user_func( array( $implementation, 'supports_mime_type' ), $args['output_mime_type'] ) ) { /* - * This implementation supports the imput type but not the output type. + * This implementation supports the input type but not the output type. * Keep looking to see if we can find an implementation that supports both. */ $supports_input = $implementation; From 7c1c48c1412b7f7c620f5f56b0e3db820df23da5 Mon Sep 17 00:00:00 2001 From: Dennis Snell Date: Wed, 10 Jan 2024 14:03:57 +0000 Subject: [PATCH 28/35] HTML API: Add support for list elements. Adds support for the following HTML elements to the HTML Processor: - LI, OL, UL. - DD, DL, DT. Previously, these elements were not supported and the HTML Processor would bail when encountering them. With this patch it will proceed to parse an HTML document when encountering those tags as long as other normal conditions don't cause it to bail (such as complicated format reconstruction). Props audrasjb, jonsurrell, bernhard-reiter. Fixes #60215. git-svn-id: https://develop.svn.wordpress.org/trunk@57264 602fd350-edb4-49c9-b593-d223f7449a82 --- phpcs.xml.dist | 9 + .../html-api/class-wp-html-open-elements.php | 32 +- .../html-api/class-wp-html-processor.php | 115 ++++- .../tests/html-api/wpHtmlProcessor.php | 5 - .../html-api/wpHtmlProcessorBreadcrumbs.php | 40 +- .../html-api/wpHtmlProcessorSemanticRules.php | 103 +++++ ...HtmlProcessorSemanticRulesListElements.php | 431 ++++++++++++++++++ .../wpHtmlSupportRequiredHtmlProcessor.php | 6 - .../wpHtmlSupportRequiredOpenElements.php | 7 - 9 files changed, 704 insertions(+), 44 deletions(-) create mode 100644 tests/phpunit/tests/html-api/wpHtmlProcessorSemanticRulesListElements.php diff --git a/phpcs.xml.dist b/phpcs.xml.dist index 3defbc290a6b2..ccb04303218ae 100644 --- a/phpcs.xml.dist +++ b/phpcs.xml.dist @@ -250,6 +250,15 @@ /wp-tests-config-sample\.php + + + /wp-includes/html-api/class-wp-html-processor\.php + + diff --git a/src/wp-includes/html-api/class-wp-html-open-elements.php b/src/wp-includes/html-api/class-wp-html-open-elements.php index 55c4d3a663c5b..1234abcb9dfe4 100644 --- a/src/wp-includes/html-api/class-wp-html-open-elements.php +++ b/src/wp-includes/html-api/class-wp-html-open-elements.php @@ -129,7 +129,7 @@ public function has_element_in_specific_scope( $tag_name, $termination_list ) { } if ( in_array( $node->node_name, $termination_list, true ) ) { - return true; + return false; } } @@ -166,18 +166,22 @@ public function has_element_in_scope( $tag_name ) { * Returns whether a particular element is in list item scope. * * @since 6.4.0 + * @since 6.5.0 Implemented: no longer throws on every invocation. * * @see https://html.spec.whatwg.org/#has-an-element-in-list-item-scope * - * @throws WP_HTML_Unsupported_Exception Always until this function is implemented. - * * @param string $tag_name Name of tag to check. * @return bool Whether given element is in scope. */ public function has_element_in_list_item_scope( $tag_name ) { - throw new WP_HTML_Unsupported_Exception( 'Cannot process elements depending on list item scope.' ); - - return false; // The linter requires this unreachable code until the function is implemented and can return. + return $this->has_element_in_specific_scope( + $tag_name, + array( + // There are more elements that belong here which aren't currently supported. + 'OL', + 'UL', + ) + ); } /** @@ -375,10 +379,22 @@ public function walk_down() { * see WP_HTML_Open_Elements::walk_down(). * * @since 6.4.0 + * @since 6.5.0 Accepts $above_this_node to start traversal above a given node, if it exists. + * + * @param ?WP_HTML_Token $above_this_node Start traversing above this node, if provided and if the node exists. */ - public function walk_up() { + public function walk_up( $above_this_node = null ) { + $has_found_node = null === $above_this_node; + for ( $i = count( $this->stack ) - 1; $i >= 0; $i-- ) { - yield $this->stack[ $i ]; + $node = $this->stack[ $i ]; + + if ( ! $has_found_node ) { + $has_found_node = $node === $above_this_node; + continue; + } + + yield $node; } } diff --git a/src/wp-includes/html-api/class-wp-html-processor.php b/src/wp-includes/html-api/class-wp-html-processor.php index 41823af00ff93..cce26a60c5350 100644 --- a/src/wp-includes/html-api/class-wp-html-processor.php +++ b/src/wp-includes/html-api/class-wp-html-processor.php @@ -105,7 +105,7 @@ * - Formatting elements: B, BIG, CODE, EM, FONT, I, SMALL, STRIKE, STRONG, TT, U. * - Heading elements: H1, H2, H3, H4, H5, H6, HGROUP. * - Links: A. - * - Lists: DL. + * - Lists: DD, DL, DT, LI, OL, LI. * - Media elements: AUDIO, CANVAS, FIGCAPTION, FIGURE, IMG, MAP, PICTURE, VIDEO. * - Paragraph: P. * - Phrasing elements: ABBR, BDI, BDO, CITE, DATA, DEL, DFN, INS, MARK, OUTPUT, Q, SAMP, SUB, SUP, TIME, VAR. @@ -648,10 +648,12 @@ private function step_in_body() { case '+MAIN': case '+MENU': case '+NAV': + case '+OL': case '+P': case '+SEARCH': case '+SECTION': case '+SUMMARY': + case '+UL': if ( $this->state->stack_of_open_elements->has_p_in_button_scope() ) { $this->close_a_p_element(); } @@ -685,9 +687,11 @@ private function step_in_body() { case '-MAIN': case '-MENU': case '-NAV': + case '-OL': case '-SEARCH': case '-SECTION': case '-SUMMARY': + case '-UL': if ( ! $this->state->stack_of_open_elements->has_element_in_scope( $tag_name ) ) { // @todo Report parse error. // Ignore the token. @@ -755,6 +759,109 @@ private function step_in_body() { $this->state->stack_of_open_elements->pop_until( '(internal: H1 through H6 - do not use)' ); return true; + /* + * > A start tag whose tag name is "li" + * > A start tag whose tag name is one of: "dd", "dt" + */ + case '+DD': + case '+DT': + case '+LI': + $this->state->frameset_ok = false; + $node = $this->state->stack_of_open_elements->current_node(); + $is_li = 'LI' === $tag_name; + + in_body_list_loop: + /* + * The logic for LI and DT/DD is the same except for one point: LI elements _only_ + * close other LI elements, but a DT or DD element closes _any_ open DT or DD element. + */ + if ( $is_li ? 'LI' === $node->node_name : ( 'DD' === $node->node_name || 'DT' === $node->node_name ) ) { + $node_name = $is_li ? 'LI' : $node->node_name; + $this->generate_implied_end_tags( $node_name ); + if ( $node_name !== $this->state->stack_of_open_elements->current_node()->node_name ) { + // @todo Indicate a parse error once it's possible. This error does not impact the logic here. + } + + $this->state->stack_of_open_elements->pop_until( $node_name ); + goto in_body_list_done; + } + + if ( + 'ADDRESS' !== $node->node_name && + 'DIV' !== $node->node_name && + 'P' !== $node->node_name && + $this->is_special( $node->node_name ) + ) { + /* + * > If node is in the special category, but is not an address, div, + * > or p element, then jump to the step labeled done below. + */ + goto in_body_list_done; + } else { + /* + * > Otherwise, set node to the previous entry in the stack of open elements + * > and return to the step labeled loop. + */ + foreach ( $this->state->stack_of_open_elements->walk_up( $node ) as $item ) { + $node = $item; + break; + } + goto in_body_list_loop; + } + + in_body_list_done: + if ( $this->state->stack_of_open_elements->has_p_in_button_scope() ) { + $this->close_a_p_element(); + } + + $this->insert_html_element( $this->state->current_token ); + return true; + + /* + * > An end tag whose tag name is "li" + * > An end tag whose tag name is one of: "dd", "dt" + */ + case '-DD': + case '-DT': + case '-LI': + if ( + /* + * An end tag whose tag name is "li": + * If the stack of open elements does not have an li element in list item scope, + * then this is a parse error; ignore the token. + */ + ( + 'LI' === $tag_name && + ! $this->state->stack_of_open_elements->has_element_in_list_item_scope( 'LI' ) + ) || + /* + * An end tag whose tag name is one of: "dd", "dt": + * If the stack of open elements does not have an element in scope that is an + * HTML element with the same tag name as that of the token, then this is a + * parse error; ignore the token. + */ + ( + 'LI' !== $tag_name && + ! $this->state->stack_of_open_elements->has_element_in_scope( $tag_name ) + ) + ) { + /* + * This is a parse error, ignore the token. + * + * @todo Indicate a parse error once it's possible. + */ + return $this->step(); + } + + $this->generate_implied_end_tags( $tag_name ); + + if ( $tag_name !== $this->state->stack_of_open_elements->current_node()->node_name ) { + // @todo Indicate a parse error once it's possible. This error does not impact the logic here. + } + + $this->state->stack_of_open_elements->pop_until( $tag_name ); + return true; + /* * > An end tag whose tag name is "p" */ @@ -1223,6 +1330,9 @@ private function close_a_p_element() { */ private function generate_implied_end_tags( $except_for_this_element = null ) { $elements_with_implied_end_tags = array( + 'DD', + 'DT', + 'LI', 'P', ); @@ -1248,6 +1358,9 @@ private function generate_implied_end_tags( $except_for_this_element = null ) { */ private function generate_implied_end_tags_thoroughly() { $elements_with_implied_end_tags = array( + 'DD', + 'DT', + 'LI', 'P', ); diff --git a/tests/phpunit/tests/html-api/wpHtmlProcessor.php b/tests/phpunit/tests/html-api/wpHtmlProcessor.php index 2e5565c9734fa..d9f1357b5c66f 100644 --- a/tests/phpunit/tests/html-api/wpHtmlProcessor.php +++ b/tests/phpunit/tests/html-api/wpHtmlProcessor.php @@ -168,8 +168,6 @@ public function data_unsupported_special_in_body_tags() { 'CAPTION' => array( 'CAPTION' ), 'COL' => array( 'COL' ), 'COLGROUP' => array( 'COLGROUP' ), - 'DD' => array( 'DD' ), - 'DT' => array( 'DT' ), 'EMBED' => array( 'EMBED' ), 'FORM' => array( 'FORM' ), 'FRAME' => array( 'FRAME' ), @@ -180,7 +178,6 @@ public function data_unsupported_special_in_body_tags() { 'IFRAME' => array( 'IFRAME' ), 'INPUT' => array( 'INPUT' ), 'KEYGEN' => array( 'KEYGEN' ), - 'LI' => array( 'LI' ), 'LINK' => array( 'LINK' ), 'LISTING' => array( 'LISTING' ), 'MARQUEE' => array( 'MARQUEE' ), @@ -191,7 +188,6 @@ public function data_unsupported_special_in_body_tags() { 'NOFRAMES' => array( 'NOFRAMES' ), 'NOSCRIPT' => array( 'NOSCRIPT' ), 'OBJECT' => array( 'OBJECT' ), - 'OL' => array( 'OL' ), 'OPTGROUP' => array( 'OPTGROUP' ), 'OPTION' => array( 'OPTION' ), 'PARAM' => array( 'PARAM' ), @@ -218,7 +214,6 @@ public function data_unsupported_special_in_body_tags() { 'TITLE' => array( 'TITLE' ), 'TR' => array( 'TR' ), 'TRACK' => array( 'TRACK' ), - 'UL' => array( 'UL' ), 'WBR' => array( 'WBR' ), 'XMP' => array( 'XMP' ), ); diff --git a/tests/phpunit/tests/html-api/wpHtmlProcessorBreadcrumbs.php b/tests/phpunit/tests/html-api/wpHtmlProcessorBreadcrumbs.php index 3b339e4f82ee9..15d38d6f70c6c 100644 --- a/tests/phpunit/tests/html-api/wpHtmlProcessorBreadcrumbs.php +++ b/tests/phpunit/tests/html-api/wpHtmlProcessorBreadcrumbs.php @@ -38,7 +38,7 @@ public function data_single_tag_of_supported_elements() { $supported_elements = array( 'A', 'ABBR', - 'ACRONYM', // Neutralized + 'ACRONYM', // Neutralized. 'ADDRESS', 'ARTICLE', 'ASIDE', @@ -47,13 +47,14 @@ public function data_single_tag_of_supported_elements() { 'BDI', 'BDO', 'BIG', - 'BLINK', // Deprecated + 'BLINK', // Deprecated. 'BUTTON', 'CANVAS', - 'CENTER', // Neutralized + 'CENTER', // Neutralized. 'CITE', 'CODE', 'DATA', + 'DD', 'DATALIST', 'DFN', 'DEL', @@ -62,6 +63,7 @@ public function data_single_tag_of_supported_elements() { 'DIR', 'DIV', 'DL', + 'DT', 'EM', 'FIELDSET', 'FIGCAPTION', @@ -79,6 +81,7 @@ public function data_single_tag_of_supported_elements() { 'I', 'IMG', 'INS', + 'LI', 'ISINDEX', // Deprecated 'KBD', 'LABEL', @@ -91,6 +94,7 @@ public function data_single_tag_of_supported_elements() { 'MULTICOL', // Deprecated 'NAV', 'NEXTID', // Deprecated + 'OL', 'OUTPUT', 'P', 'PICTURE', @@ -112,6 +116,7 @@ public function data_single_tag_of_supported_elements() { 'TIME', 'TT', 'U', + 'UL', 'VAR', 'VIDEO', ); @@ -156,7 +161,7 @@ public function test_fails_when_encountering_unsupported_tag( $html ) { */ public function data_unsupported_elements() { $unsupported_elements = array( - 'APPLET', // Deprecated + 'APPLET', // Deprecated. 'AREA', 'BASE', 'BGSOUND', // Deprecated; self-closing if self-closing flag provided, otherwise normal. @@ -165,8 +170,6 @@ public function data_unsupported_elements() { 'CAPTION', 'COL', 'COLGROUP', - 'DD', - 'DT', 'EMBED', 'FORM', 'FRAME', @@ -176,27 +179,25 @@ public function data_unsupported_elements() { 'HTML', 'IFRAME', 'INPUT', - 'KEYGEN', // Deprecated; void - 'LI', + 'KEYGEN', // Deprecated; void. 'LINK', 'LISTING', // Deprecated, use PRE instead. - 'MARQUEE', // Deprecated + 'MARQUEE', // Deprecated. 'MATH', 'META', - 'NOBR', // Neutralized - 'NOEMBED', // Neutralized - 'NOFRAMES', // Neutralized + 'NOBR', // Neutralized. + 'NOEMBED', // Neutralized. + 'NOFRAMES', // Neutralized. 'NOSCRIPT', 'OBJECT', - 'OL', 'OPTGROUP', 'OPTION', - 'PLAINTEXT', // Neutralized + 'PLAINTEXT', // Neutralized. 'PRE', - 'RB', // Neutralized + 'RB', // Neutralized. 'RP', 'RT', - 'RTC', // Neutralized + 'RTC', // Neutralized. 'SCRIPT', 'SELECT', 'SOURCE', @@ -213,7 +214,6 @@ public function data_unsupported_elements() { 'TITLE', 'TR', 'TRACK', - 'UL', 'WBR', 'XMP', // Deprecated, use PRE instead. ); @@ -348,6 +348,12 @@ public function data_html_target_with_breadcrumbs() { ), 'MAIN inside MAIN inside SPAN' => array( '
', array( 'HTML', 'BODY', 'SPAN', 'MAIN', 'MAIN' ), 1 ), 'MAIN next to unclosed P' => array( '

', array( 'HTML', 'BODY', 'MAIN' ), 1 ), + 'LI after unclosed LI' => array( '
  • one
  • two
  • three', array( 'HTML', 'BODY', 'LI' ), 3 ), + 'LI in UL in LI' => array( '
    • one
      • two', array( 'HTML', 'BODY', 'UL', 'LI', 'UL', 'LI' ), 1 ), + 'DD and DT mutually close, LI self-closes (dt 2)' => array( '
      • ', array( 'HTML', 'BODY', 'DT' ), 2 ), + 'DD and DT mutually close, LI self-closes (dd 3)' => array( '
      • ', array( 'HTML', 'BODY', 'DD' ), 3 ), + 'DD and DT mutually close, LI self-closes (li 1)' => array( '
      • ', array( 'HTML', 'BODY', 'DD', 'LI' ), 1 ), + 'DD and DT mutually close, LI self-closes (li 2)' => array( '
      • ', array( 'HTML', 'BODY', 'DD', 'LI' ), 2 ), // H1 - H6 close out _any_ H1 - H6 when encountering _any_ of H1 - H6, making this section surprising. 'EM inside H3 after unclosed P' => array( '

        Important Message

        ', array( 'HTML', 'BODY', 'H3', 'EM' ), 1 ), diff --git a/tests/phpunit/tests/html-api/wpHtmlProcessorSemanticRules.php b/tests/phpunit/tests/html-api/wpHtmlProcessorSemanticRules.php index bd3996d51d7b7..c1adf9a71a3f8 100644 --- a/tests/phpunit/tests/html-api/wpHtmlProcessorSemanticRules.php +++ b/tests/phpunit/tests/html-api/wpHtmlProcessorSemanticRules.php @@ -224,6 +224,109 @@ public function test_in_body_button_with_button_in_scope_as_ancestor() { $this->assertSame( array( 'HTML', 'BODY', 'BUTTON' ), $p->get_breadcrumbs(), 'Failed to produce expected DOM nesting for third button.' ); } + /** + * Verifies that H1 through H6 elements close an open P element. + * + * @ticket 60215 + * + * @dataProvider data_heading_elements + * + * @param string $tag_name Name of H1 - H6 element under test. + */ + public function test_in_body_heading_element_closes_open_p_tag( $tag_name ) { + $processor = WP_HTML_Processor::create_fragment( + "

        Open<{$tag_name}>Closed P

        " + ); + + $processor->next_tag( $tag_name ); + $this->assertSame( + array( 'HTML', 'BODY', $tag_name ), + $processor->get_breadcrumbs(), + "Expected {$tag_name} to be a direct child of the BODY, having closed the open P element." + ); + + $processor->next_tag( 'IMG' ); + $this->assertSame( + array( 'HTML', 'BODY', 'IMG' ), + $processor->get_breadcrumbs(), + 'Expected IMG to be a direct child of BODY, having closed the open P element.' + ); + } + + /** + * Data provider. + * + * @return array[]. + */ + public function data_heading_elements() { + return array( + 'H1' => array( 'H1' ), + 'H2' => array( 'H2' ), + 'H3' => array( 'H3' ), + 'H4' => array( 'H4' ), + 'H5' => array( 'H5' ), + 'H6' => array( 'H5' ), + ); + } + + /** + * Verifies that H1 through H6 elements close an open H1 through H6 element. + * + * @ticket 60215 + * + * @dataProvider data_heading_combinations + * + * @param string $first_heading H1 - H6 element appearing (unclosed) before the second. + * @param string $second_heading H1 - H6 element appearing after the first. + */ + public function test_in_body_heading_element_closes_other_heading_elements( $first_heading, $second_heading ) { + $processor = WP_HTML_Processor::create_fragment( + "
        <{$first_heading} first> then <{$second_heading} second> and end
        " + ); + + while ( $processor->next_tag() && null === $processor->get_attribute( 'second' ) ) { + continue; + } + + $this->assertTrue( + $processor->get_attribute( 'second' ), + "Failed to find expected {$second_heading} tag." + ); + + $this->assertSame( + array( 'HTML', 'BODY', 'DIV', $second_heading ), + $processor->get_breadcrumbs(), + "Expected {$second_heading} to be a direct child of the DIV, having closed the open {$first_heading} element." + ); + + $processor->next_tag( 'IMG' ); + $this->assertSame( + array( 'HTML', 'BODY', 'DIV', 'IMG' ), + $processor->get_breadcrumbs(), + "Expected IMG to be a direct child of DIV, having closed the open {$first_heading} element." + ); + } + + /** + * Data provider. + * + * @return array[] + */ + public function data_heading_combinations() { + $headings = array( 'H1', 'H2', 'H3', 'H4', 'H5', 'H6' ); + + $combinations = array(); + + // Create all unique pairs of H1 - H6 elements. + foreach ( $headings as $first_tag ) { + foreach ( $headings as $second_tag ) { + $combinations[ "{$first_tag} then {$second_tag}" ] = array( $first_tag, $second_tag ); + } + } + + return $combinations; + } + /** * Verifies that when "in body" and encountering "any other end tag" * that the HTML processor ignores the end tag if there's a special diff --git a/tests/phpunit/tests/html-api/wpHtmlProcessorSemanticRulesListElements.php b/tests/phpunit/tests/html-api/wpHtmlProcessorSemanticRulesListElements.php new file mode 100644 index 0000000000000..0c7e3422f09fc --- /dev/null +++ b/tests/phpunit/tests/html-api/wpHtmlProcessorSemanticRulesListElements.php @@ -0,0 +1,431 @@ +
      • ' ); + + while ( + null === $processor->get_attribute( 'target' ) && + $processor->next_tag() + ) { + continue; + } + + $this->assertTrue( + $processor->get_attribute( 'target' ), + 'Failed to find target node.' + ); + + $this->assertSame( + array( 'HTML', 'BODY', 'LI' ), + $processor->get_breadcrumbs(), + "LI should have closed open LI, but didn't." + ); + } + + /** + * Ensures that an opening LI element implicitly closes other open elements with optional closing tags. + * + * @ticket 60215 + */ + public function test_in_body_li_generates_implied_end_tags_inside_open_li() { + $processor = WP_HTML_Processor::create_fragment( '
      • ' ); + + while ( + null === $processor->get_attribute( 'target' ) && + $processor->next_tag() + ) { + continue; + } + + $this->assertTrue( + $processor->get_attribute( 'target' ), + 'Failed to find target node.' + ); + + $this->assertSame( + array( 'HTML', 'BODY', 'LI' ), + $processor->get_breadcrumbs(), + "LI should have closed open LI, but didn't." + ); + } + + /** + * Ensures that when closing tags with optional tag closers, an opening LI tag doesn't close beyond a special boundary. + * + * @ticket 60215 + */ + public function test_in_body_li_generates_implied_end_tags_inside_open_li_but_stopping_at_special_tags() { + $processor = WP_HTML_Processor::create_fragment( '
      • ' ); + + while ( + null === $processor->get_attribute( 'target' ) && + $processor->next_tag() + ) { + continue; + } + + $this->assertTrue( + $processor->get_attribute( 'target' ), + 'Failed to find target node.' + ); + + $this->assertSame( + array( 'HTML', 'BODY', 'LI', 'BLOCKQUOTE', 'LI' ), + $processor->get_breadcrumbs(), + 'LI should have left the BLOCKQOUTE open, but closed it.' + ); + } + + /** + * Ensures that an opening LI closes an open P in button scope. + * + * @ticket 60215 + */ + public function test_in_body_li_in_li_closes_p_in_button_scope() { + $processor = WP_HTML_Processor::create_fragment( '