From dfd9b1afd2d58c430838a767d7b21524db9c118c Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Fri, 16 Feb 2024 10:26:14 +0000 Subject: [PATCH 001/251] I18N: Prevent incorrect language dropdown entries when there are `.l10n.php` files. In [57516], the just-in-time translation loading logic was enhanced to support cases where only `.l10n.php` translation exist but no `.mo` or `.po` files. This caused a slight regression in `get_available_languages()`, which uses the list of files to populate the language dropdown list on the settings page. To address this, the new file extension is now properly stripped off, and the resulting file list is de-duplicated. New test files are added to allow the existing tests to cover this new scenario. See #59656. Fixes #60553. git-svn-id: https://develop.svn.wordpress.org/trunk@57639 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class-wp-textdomain-registry.php | 1 + src/wp-includes/l10n.php | 9 ++++++--- tests/phpunit/data/languages/admin-en_GB.l10n.php | 2 ++ tests/phpunit/data/languages/admin-es_ES.l10n.php | 2 ++ .../phpunit/data/languages/admin-network-en_GB.l10n.php | 2 ++ .../phpunit/data/languages/admin-network-es_ES.l10n.php | 2 ++ .../data/languages/continents-cities-es_ES.l10n.php | 2 ++ tests/phpunit/data/languages/de_DE.l10n.php | 2 ++ tests/phpunit/data/languages/en_GB.l10n.php | 2 ++ tests/phpunit/data/languages/es_ES.l10n.php | 2 ++ tests/phpunit/data/languages/ja_JP.l10n.php | 2 ++ 11 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 tests/phpunit/data/languages/admin-en_GB.l10n.php create mode 100644 tests/phpunit/data/languages/admin-es_ES.l10n.php create mode 100644 tests/phpunit/data/languages/admin-network-en_GB.l10n.php create mode 100644 tests/phpunit/data/languages/admin-network-es_ES.l10n.php create mode 100644 tests/phpunit/data/languages/continents-cities-es_ES.l10n.php create mode 100644 tests/phpunit/data/languages/de_DE.l10n.php create mode 100644 tests/phpunit/data/languages/en_GB.l10n.php create mode 100644 tests/phpunit/data/languages/es_ES.l10n.php create mode 100644 tests/phpunit/data/languages/ja_JP.l10n.php diff --git a/src/wp-includes/class-wp-textdomain-registry.php b/src/wp-includes/class-wp-textdomain-registry.php index b2cbd72fa52bb..113ef3bd653f8 100644 --- a/src/wp-includes/class-wp-textdomain-registry.php +++ b/src/wp-includes/class-wp-textdomain-registry.php @@ -314,6 +314,7 @@ private function get_path_from_lang_dir( $domain, $locale ) { if ( $file_path === $mo_path || $file_path === $php_path ) { $found_location = rtrim( $location, '/' ) . '/'; + break 2; } } } diff --git a/src/wp-includes/l10n.php b/src/wp-includes/l10n.php index 8191b88cee840..38c30b84e8a0f 100644 --- a/src/wp-includes/l10n.php +++ b/src/wp-includes/l10n.php @@ -1435,19 +1435,20 @@ function translate_user_role( $name, $domain = 'default' ) { } /** - * Gets all available languages based on the presence of *.mo files in a given directory. + * Gets all available languages based on the presence of *.mo and *.l10n.php files in a given directory. * * The default directory is WP_LANG_DIR. * * @since 3.0.0 * @since 4.7.0 The results are now filterable with the {@see 'get_available_languages'} filter. + * @since 6.5.0 The initial file list is now cached and also takes into account *.l10n.php files. * * @global WP_Textdomain_Registry $wp_textdomain_registry WordPress Textdomain Registry. * * @param string $dir A directory to search for language files. * Default WP_LANG_DIR. * @return string[] An array of language codes or an empty array if no languages are present. - * Language codes are formed by stripping the .mo extension from the language file names. + * Language codes are formed by stripping the file extension from the language file names. */ function get_available_languages( $dir = null ) { global $wp_textdomain_registry; @@ -1460,6 +1461,8 @@ function get_available_languages( $dir = null ) { if ( $lang_files ) { foreach ( $lang_files as $lang_file ) { $lang_file = basename( $lang_file, '.mo' ); + $lang_file = basename( $lang_file, '.l10n.php' ); + if ( ! str_starts_with( $lang_file, 'continents-cities' ) && ! str_starts_with( $lang_file, 'ms-' ) && ! str_starts_with( $lang_file, 'admin-' ) ) { $languages[] = $lang_file; @@ -1475,7 +1478,7 @@ function get_available_languages( $dir = null ) { * @param string[] $languages An array of available language codes. * @param string $dir The directory where the language files were found. */ - return apply_filters( 'get_available_languages', $languages, $dir ); + return apply_filters( 'get_available_languages', array_unique( $languages ), $dir ); } /** diff --git a/tests/phpunit/data/languages/admin-en_GB.l10n.php b/tests/phpunit/data/languages/admin-en_GB.l10n.php new file mode 100644 index 0000000000000..ca1d62f6637ed --- /dev/null +++ b/tests/phpunit/data/languages/admin-en_GB.l10n.php @@ -0,0 +1,2 @@ +NULL,'plural-forms'=>'nplurals=2; plural=n != 1;','messages'=>['Thank you for updating! WordPress %s makes your site more connected and responsive.'=>'Thank you for updating! WordPress %s makes your site more connected and responsive.','New %1$s, %2$s, and %3$s objects make interacting with terms, comments, and networks more predictable and intuitive in code.'=>'New %1$s, %2$s, and %3$s objects make interacting with terms, comments, and networks more predictable and intuitive in code.','Comment queries now have cache handling to improve performance. New arguments in %s make crafting robust comment queries simpler.'=>'Comment queries now have cache handling to improve performance. New arguments in %s make crafting robust comment queries simpler.','Term, comment, and network objects'=>'Term, comment, and network objects','Comment query improvements'=>'Comment query improvements'],'language'=>'en_GB','x-generator'=>'Poedit 1.8.10']; \ No newline at end of file diff --git a/tests/phpunit/data/languages/admin-es_ES.l10n.php b/tests/phpunit/data/languages/admin-es_ES.l10n.php new file mode 100644 index 0000000000000..27df773c214ae --- /dev/null +++ b/tests/phpunit/data/languages/admin-es_ES.l10n.php @@ -0,0 +1,2 @@ +NULL,'plural-forms'=>'nplurals=2; plural=n != 1;','messages'=>['Thank you for updating! WordPress %s makes your site more connected and responsive.'=>'¡Gracias por actualizar! WordPress %s hace que tu sitio esté más conectado y sea más adaptable.','New %1$s, %2$s, and %3$s objects make interacting with terms, comments, and networks more predictable and intuitive in code.'=>'Ahora los objetos %1$s, %2$s y %3$s hacen que interactuar con términos, comentarios y redes sea más predecible y que el código sea más intuitivo.','Comment queries now have cache handling to improve performance. New arguments in %s make crafting robust comment queries simpler.'=>'Las consultas de comentarios ahora tiene una caché que mejora el rendimiento. Nuevos argumentos en %s hacen que sea más fácil crear consultas robustas.','Term, comment, and network objects'=>'Objetos de término, comentario y red','Comment query improvements'=>'Mejoras en las consultas de comentarios'],'language'=>'es_ES','x-generator'=>'Poedit 1.8.10']; \ No newline at end of file diff --git a/tests/phpunit/data/languages/admin-network-en_GB.l10n.php b/tests/phpunit/data/languages/admin-network-en_GB.l10n.php new file mode 100644 index 0000000000000..05171a7e49011 --- /dev/null +++ b/tests/phpunit/data/languages/admin-network-en_GB.l10n.php @@ -0,0 +1,2 @@ +NULL,'plural-forms'=>'nplurals=2; plural=n != 1;','messages'=>['A password reset link will be sent to the user via email.'=>'A password reset link will be sent to the user via email.','If registration is disabled, please set %1$s in %2$s to a URL you will redirect visitors to if they visit a non-existent site.'=>'If registration is disabled, please set %1$s in %2$s to a URL you will redirect visitors to if they visit a non-existent site.','Site users list'=>'Site users list','Site users list navigation'=>'Site users list navigation','Sites list'=>'Sites list'],'language'=>'en_GB','x-generator'=>'Poedit 1.8.10']; \ No newline at end of file diff --git a/tests/phpunit/data/languages/admin-network-es_ES.l10n.php b/tests/phpunit/data/languages/admin-network-es_ES.l10n.php new file mode 100644 index 0000000000000..0e8f9d4fad0cb --- /dev/null +++ b/tests/phpunit/data/languages/admin-network-es_ES.l10n.php @@ -0,0 +1,2 @@ +NULL,'plural-forms'=>'nplurals=2; plural=n != 1;','messages'=>['A password reset link will be sent to the user via email.'=>'Se te enviará un enlace por email para que puedas cambiar la contraseña.','If registration is disabled, please set %1$s in %2$s to a URL you will redirect visitors to if they visit a non-existent site.'=>'Si el registro de usuarios está desactivado , establece como valor de %1$s en %2$s una URL donde redirigir a los visitantes que accedan a un sitio inexistente.','Site users list navigation'=>'Navegación por la lista de usuarios del sitio','Site users list'=>'Lista de usuarios del sitio','Sites list navigation'=>'Navegación por la lista de sitios'],'language'=>'es_ES','x-generator'=>'Poedit 1.8.10']; \ No newline at end of file diff --git a/tests/phpunit/data/languages/continents-cities-es_ES.l10n.php b/tests/phpunit/data/languages/continents-cities-es_ES.l10n.php new file mode 100644 index 0000000000000..11a692aa5d09f --- /dev/null +++ b/tests/phpunit/data/languages/continents-cities-es_ES.l10n.php @@ -0,0 +1,2 @@ +NULL,'plural-forms'=>'nplurals=2; plural=n != 1;','messages'=>['Vincennes'=>'Vincennes','Winamac'=>'Winamac','Inuvik'=>'Inuvik','Iqaluit'=>'Iqaluit','Jamaica'=>'Jamaica'],'language'=>'es_ES','x-generator'=>'Poedit 1.8.10']; \ No newline at end of file diff --git a/tests/phpunit/data/languages/de_DE.l10n.php b/tests/phpunit/data/languages/de_DE.l10n.php new file mode 100644 index 0000000000000..8eef01d79ce00 --- /dev/null +++ b/tests/phpunit/data/languages/de_DE.l10n.php @@ -0,0 +1,2 @@ +NULL,'plural-forms'=>'nplurals=2; plural=n != 1;','messages'=>['html_lang_attribute'=>'de-DE','text directionltr'=>'ltr','number_format_decimal_point'=>',','number_format_thousands_sep'=>'.','Update %s now'=>'Jetzt %s aktualisieren','[%1$s] Confirm Action: %2$s'=>'[%1$s] Aktion bestätigen: %2$s','[%s] Erasure Request Fulfilled'=>'[%s] Löschauftrag ausgeführt','[%s] Personal Data Export'=>'[%s] Export personenbezogener Daten'],'language'=>'de_DE','x-generator'=>'Poedit 2.2.1']; \ No newline at end of file diff --git a/tests/phpunit/data/languages/en_GB.l10n.php b/tests/phpunit/data/languages/en_GB.l10n.php new file mode 100644 index 0000000000000..265e1f670f881 --- /dev/null +++ b/tests/phpunit/data/languages/en_GB.l10n.php @@ -0,0 +1,2 @@ +NULL,'plural-forms'=>'nplurals=2; plural=n != 1;','messages'=>['text directionltr'=>'ltr','ERROR: Sorry, that username is not allowed.'=>'ERROR: Sorry, that username is not allowed.','Invalid parameter.'=>'Invalid parameter.','menu location(Current: %s)'=>'(Current: %s)','menu(Currently set to: %s)'=>'(Currently set to: %s)'],'language'=>'en_GB','x-generator'=>'Poedit 1.8.10']; \ No newline at end of file diff --git a/tests/phpunit/data/languages/es_ES.l10n.php b/tests/phpunit/data/languages/es_ES.l10n.php new file mode 100644 index 0000000000000..827f1f766b1e1 --- /dev/null +++ b/tests/phpunit/data/languages/es_ES.l10n.php @@ -0,0 +1,2 @@ +NULL,'plural-forms'=>'nplurals=2; plural=n != 1;','messages'=>['text directionltr'=>'ltr','ERROR: Sorry, that username is not allowed.'=>'ERROR: Lo siento, ese nombre de usuario no está permitido.','Invalid parameter.'=>'Parámetro no válido. ','menu location(Current: %s)'=>'(Actual: %s)','menu(Currently set to: %s)'=>'(Actualmente fijado en: %s)','[%1$s] Confirm Action: %2$s'=>'[%1$s] Confirmar la acción: %2$s','[%s] Erasure Request Fulfilled'=>'[%s] Solicitud de borrado completada','[%s] Personal Data Export'=>'[%s] Exportación de datos personales'],'language'=>'es_ES','x-generator'=>'Poedit 2.3']; \ No newline at end of file diff --git a/tests/phpunit/data/languages/ja_JP.l10n.php b/tests/phpunit/data/languages/ja_JP.l10n.php new file mode 100644 index 0000000000000..e8872714ac5cb --- /dev/null +++ b/tests/phpunit/data/languages/ja_JP.l10n.php @@ -0,0 +1,2 @@ +NULL,'plural-forms'=>'nplurals=2; plural=n != 1;','messages'=>['html_lang_attribute'=>'ja','text directionltr'=>'ltr','number_format_decimal_point'=>'number_format_decimal_point','number_format_thousands_sep'=>'number_format_thousands_sep','Update %s now'=>'今すぐ %s を更新','Word count type. Do not translate!words'=>'characters_including_spaces','excerpt_length55'=>'110','comment_excerpt_length20'=>'40','draft_length10'=>'40'],'language'=>'ja_JP','x-generator'=>'Poedit 1.8.10']; \ No newline at end of file From 556604e2c9f40f5f23801d566e935086923e8b90 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Fri, 16 Feb 2024 11:55:34 +0000 Subject: [PATCH 002/251] Build/Test Tools: Ignore `src/wp-content/fonts` from version control. Props ironprogrammer, afercia. Fixes #60337. git-svn-id: https://develop.svn.wordpress.org/trunk@57640 602fd350-edb4-49c9-b593-d223f7449a82 --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 0a02b30a1548d..44c3769ee314d 100644 --- a/.gitignore +++ b/.gitignore @@ -43,6 +43,7 @@ wp-tests-config.php # Files and folders that get created in wp-content /src/wp-content/blogs.dir +/src/wp-content/fonts /src/wp-content/languages /src/wp-content/mu-plugins /src/wp-content/plugins From 928f7247875ce875e2bcdd3ba86d506af262b56c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Greg=20Zi=C3=83=C2=B3=C3=85=E2=80=9Akowski?= Date: Fri, 16 Feb 2024 12:53:16 +0000 Subject: [PATCH 003/251] Editor: Merge `uses_context` defined by block bindings sources with block types Adds logic that fixes the limitation for souces by allowing merging the `uses_context` defined by block bindings sources into supported block types. Each source defines the context it needs and it is added to the block types that are using the block bindings API. Fixes #60525. Props santosguillamot, gziolo, czapla, thekt12. git-svn-id: https://develop.svn.wordpress.org/trunk@57641 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/block-bindings.php | 25 +++--- .../block-bindings/pattern-overrides.php | 1 + src/wp-includes/block-bindings/post-meta.php | 19 ++-- .../class-wp-block-bindings-registry.php | 89 +++++++++++++++---- .../class-wp-block-bindings-source.php | 15 +++- src/wp-includes/class-wp-block-type.php | 32 +++++-- src/wp-includes/class-wp-block.php | 18 ++-- tests/phpunit/tests/block-bindings/render.php | 43 +++++++++ .../wpBlockBindingsRegistry.php | 70 +++++++++++++++ 9 files changed, 254 insertions(+), 58 deletions(-) diff --git a/src/wp-includes/block-bindings.php b/src/wp-includes/block-bindings.php index d1f0421621bab..cee00e246d8c1 100644 --- a/src/wp-includes/block-bindings.php +++ b/src/wp-includes/block-bindings.php @@ -75,18 +75,19 @@ * @param array $source_properties { * The array of arguments that are used to register a source. * - * @type string $label The label of the source. - * @type callback $get_value_callback A callback executed when the source is processed during block rendering. - * The callback should have the following signature: - * - * `function ($source_args, $block_instance,$attribute_name): mixed` - * - @param array $source_args Array containing source arguments - * used to look up the override value, - * i.e. {"key": "foo"}. - * - @param WP_Block $block_instance The block instance. - * - @param string $attribute_name The name of an attribute . - * The callback has a mixed return type; it may return a string to override - * the block's original value, null, false to remove an attribute, etc. + * @type string $label The label of the source. + * @type callback $get_value_callback A callback executed when the source is processed during block rendering. + * The callback should have the following signature: + * + * `function ($source_args, $block_instance,$attribute_name): mixed` + * - @param array $source_args Array containing source arguments + * used to look up the override value, + * i.e. {"key": "foo"}. + * - @param WP_Block $block_instance The block instance. + * - @param string $attribute_name The name of an attribute . + * The callback has a mixed return type; it may return a string to override + * the block's original value, null, false to remove an attribute, etc. + * @type array $uses_context (optional) Array of values to add to block `uses_context` needed by the source. * } * @return WP_Block_Bindings_Source|false Source when the registration was successful, or `false` on failure. */ diff --git a/src/wp-includes/block-bindings/pattern-overrides.php b/src/wp-includes/block-bindings/pattern-overrides.php index eabd874660b29..eae865e221628 100644 --- a/src/wp-includes/block-bindings/pattern-overrides.php +++ b/src/wp-includes/block-bindings/pattern-overrides.php @@ -39,6 +39,7 @@ function _register_block_bindings_pattern_overrides_source() { array( 'label' => _x( 'Pattern Overrides', 'block bindings source' ), 'get_value_callback' => '_block_bindings_pattern_overrides_get_value', + 'uses_context' => array( 'pattern/overrides' ), ) ); } diff --git a/src/wp-includes/block-bindings/post-meta.php b/src/wp-includes/block-bindings/post-meta.php index 4be1ae96b7620..5aa6bf048d07d 100644 --- a/src/wp-includes/block-bindings/post-meta.php +++ b/src/wp-includes/block-bindings/post-meta.php @@ -13,22 +13,20 @@ * @since 6.5.0 * @access private * - * @param array $source_args Array containing source arguments used to look up the override value. - * Example: array( "key" => "foo" ). + * @param array $source_args Array containing source arguments used to look up the override value. + * Example: array( "key" => "foo" ). + * @param WP_Block $block_instance The block instance. * @return mixed The value computed for the source. */ -function _block_bindings_post_meta_get_value( array $source_args ) { - if ( ! isset( $source_args['key'] ) ) { +function _block_bindings_post_meta_get_value( array $source_args, $block_instance ) { + if ( empty( $source_args['key'] ) ) { return null; } - // Use the postId attribute if available. - if ( isset( $source_args['postId'] ) ) { - $post_id = $source_args['postId']; - } else { - // $block_instance->context['postId'] is not available in the Image block. - $post_id = get_the_ID(); + if ( empty( $block_instance->context['postId'] ) ) { + return null; } + $post_id = $block_instance->context['postId']; // If a post isn't public, we need to prevent unauthorized users from accessing the post meta. $post = get_post( $post_id ); @@ -51,6 +49,7 @@ function _register_block_bindings_post_meta_source() { array( 'label' => _x( 'Post Meta', 'block bindings source' ), 'get_value_callback' => '_block_bindings_post_meta_get_value', + 'uses_context' => array( 'postId', 'postType' ), ) ); } diff --git a/src/wp-includes/class-wp-block-bindings-registry.php b/src/wp-includes/class-wp-block-bindings-registry.php index de6a9d89e409f..6ec5ac81bb7c9 100644 --- a/src/wp-includes/class-wp-block-bindings-registry.php +++ b/src/wp-includes/class-wp-block-bindings-registry.php @@ -32,6 +32,31 @@ final class WP_Block_Bindings_Registry { */ private static $instance = null; + /** + * Supported source properties that can be passed to the registered source. + * + * @since 6.5.0 + * @var array + */ + private $allowed_source_properties = array( + 'label', + 'get_value_callback', + 'uses_context', + ); + + /** + * Supported blocks that can use the block bindings API. + * + * @since 6.5.0 + * @var array + */ + private $supported_blocks = array( + 'core/paragraph', + 'core/heading', + 'core/image', + 'core/button', + ); + /** * Registers a new block bindings source. * @@ -53,18 +78,19 @@ final class WP_Block_Bindings_Registry { * @param array $source_properties { * The array of arguments that are used to register a source. * - * @type string $label The label of the source. - * @type callback $get_value_callback A callback executed when the source is processed during block rendering. - * The callback should have the following signature: - * - * `function ($source_args, $block_instance,$attribute_name): mixed` - * - @param array $source_args Array containing source arguments - * used to look up the override value, - * i.e. {"key": "foo"}. - * - @param WP_Block $block_instance The block instance. - * - @param string $attribute_name The name of the target attribute. - * The callback has a mixed return type; it may return a string to override - * the block's original value, null, false to remove an attribute, etc. + * @type string $label The label of the source. + * @type callback $get_value_callback A callback executed when the source is processed during block rendering. + * The callback should have the following signature: + * + * `function ($source_args, $block_instance,$attribute_name): mixed` + * - @param array $source_args Array containing source arguments + * used to look up the override value, + * i.e. {"key": "foo"}. + * - @param WP_Block $block_instance The block instance. + * - @param string $attribute_name The name of the target attribute. + * The callback has a mixed return type; it may return a string to override + * the block's original value, null, false to remove an attribute, etc. + * @type array $uses_context (optional) Array of values to add to block `uses_context` needed by the source. * } * @return WP_Block_Bindings_Source|false Source when the registration was successful, or `false` on failure. */ @@ -107,7 +133,7 @@ public function register( string $source_name, array $source_properties ) { return false; } - /* Validate that the source properties contain the label */ + // Validates that the source properties contain the label. if ( ! isset( $source_properties['label'] ) ) { _doing_it_wrong( __METHOD__, @@ -117,7 +143,7 @@ public function register( string $source_name, array $source_properties ) { return false; } - /* Validate that the source properties contain the get_value_callback */ + // Validates that the source properties contain the get_value_callback. if ( ! isset( $source_properties['get_value_callback'] ) ) { _doing_it_wrong( __METHOD__, @@ -127,7 +153,7 @@ public function register( string $source_name, array $source_properties ) { return false; } - /* Validate that the get_value_callback is a valid callback */ + // Validates that the get_value_callback is a valid callback. if ( ! is_callable( $source_properties['get_value_callback'] ) ) { _doing_it_wrong( __METHOD__, @@ -137,6 +163,25 @@ public function register( string $source_name, array $source_properties ) { return false; } + // Validates that the uses_context parameter is an array. + if ( isset( $source_properties['uses_context'] ) && ! is_array( $source_properties['uses_context'] ) ) { + _doing_it_wrong( + __METHOD__, + __( 'The "uses_context" parameter must be an array.' ), + '6.5.0' + ); + return false; + } + + if ( ! empty( array_diff( array_keys( $source_properties ), $this->allowed_source_properties ) ) ) { + _doing_it_wrong( + __METHOD__, + __( 'The $source_properties array contains invalid properties.' ), + '6.5.0' + ); + return false; + } + $source = new WP_Block_Bindings_Source( $source_name, $source_properties @@ -144,6 +189,20 @@ public function register( string $source_name, array $source_properties ) { $this->sources[ $source_name ] = $source; + // Adds `uses_context` defined by block bindings sources. + add_filter( + 'get_block_type_uses_context', + function ( $uses_context, $block_type ) use ( $source ) { + if ( ! in_array( $block_type->name, $this->supported_blocks, true ) || empty( $source->uses_context ) ) { + return $uses_context; + } + // Use array_values to reset the array keys. + return array_values( array_unique( array_merge( $uses_context, $source->uses_context ) ) ); + }, + 10, + 2 + ); + return $source; } diff --git a/src/wp-includes/class-wp-block-bindings-source.php b/src/wp-includes/class-wp-block-bindings-source.php index c2a3d4f8ae2b8..036e17c3dd578 100644 --- a/src/wp-includes/class-wp-block-bindings-source.php +++ b/src/wp-includes/class-wp-block-bindings-source.php @@ -45,6 +45,14 @@ final class WP_Block_Bindings_Source { */ private $get_value_callback; + /** + * The context added to the blocks needed by the source. + * + * @since 6.5.0 + * @var array|null + */ + public $uses_context = null; + /** * Constructor. * @@ -57,9 +65,10 @@ final class WP_Block_Bindings_Source { * @param array $source_properties The properties of the source. */ public function __construct( string $name, array $source_properties ) { - $this->name = $name; - $this->label = $source_properties['label']; - $this->get_value_callback = $source_properties['get_value_callback']; + $this->name = $name; + foreach ( $source_properties as $property_name => $property_value ) { + $this->$property_name = $property_value; + } } /** diff --git a/src/wp-includes/class-wp-block-type.php b/src/wp-includes/class-wp-block-type.php index 63496d41029e3..32426535288a0 100644 --- a/src/wp-includes/class-wp-block-type.php +++ b/src/wp-includes/class-wp-block-type.php @@ -180,7 +180,7 @@ class WP_Block_Type { * @since 5.5.0 * @var string[] */ - public $uses_context = array(); + private $uses_context = array(); /** * Context provided by blocks of this type. @@ -366,6 +366,10 @@ public function __get( $name ) { return $this->get_variations(); } + if ( 'uses_context' === $name ) { + return $this->get_uses_context(); + } + if ( ! in_array( $name, $this->deprecated_properties, true ) ) { return; } @@ -394,7 +398,7 @@ public function __get( $name ) { * or false otherwise. */ public function __isset( $name ) { - if ( 'variations' === $name ) { + if ( in_array( $name, array( 'variations', 'uses_context' ), true ) ) { return true; } @@ -417,11 +421,6 @@ public function __isset( $name ) { * @param mixed $value Property value. */ public function __set( $name, $value ) { - if ( 'variations' === $name ) { - $this->variations = $value; - return; - } - if ( ! in_array( $name, $this->deprecated_properties, true ) ) { $this->{$name} = $value; return; @@ -616,4 +615,23 @@ public function get_variations() { */ return apply_filters( 'get_block_type_variations', $this->variations, $this ); } + + /** + * Get block uses context. + * + * @since 6.5.0 + * + * @return array[] + */ + public function get_uses_context() { + /** + * Filters the registered uses context for a block type. + * + * @since 6.5.0 + * + * @param array $uses_context Array of registered uses context for a block type. + * @param WP_Block_Type $block_type The full block type object. + */ + return apply_filters( 'get_block_type_uses_context', $this->uses_context, $this ); + } } diff --git a/src/wp-includes/class-wp-block.php b/src/wp-includes/class-wp-block.php index 0145ba436902f..8d11eba20dc4b 100644 --- a/src/wp-includes/class-wp-block.php +++ b/src/wp-includes/class-wp-block.php @@ -231,23 +231,19 @@ public function __get( $name ) { * @return array The computed block attributes for the provided block bindings. */ private function process_block_bindings() { - $parsed_block = $this->parsed_block; - - $computed_attributes = array(); - - // Allowed blocks that support block bindings. - // TODO: Look for a mechanism to opt-in for this. Maybe adding a property to block attributes? - $allowed_blocks = array( + $parsed_block = $this->parsed_block; + $computed_attributes = array(); + $supported_block_attributes = array( 'core/paragraph' => array( 'content' ), 'core/heading' => array( 'content' ), 'core/image' => array( 'url', 'title', 'alt' ), 'core/button' => array( 'url', 'text', 'linkTarget', 'rel' ), ); - // If the block doesn't have the bindings property, isn't one of the allowed + // If the block doesn't have the bindings property, isn't one of the supported // block types, or the bindings property is not an array, return the block content. if ( - ! isset( $allowed_blocks[ $this->name ] ) || + ! isset( $supported_block_attributes[ $this->name ] ) || empty( $parsed_block['attrs']['metadata']['bindings'] ) || ! is_array( $parsed_block['attrs']['metadata']['bindings'] ) ) { @@ -255,8 +251,8 @@ private function process_block_bindings() { } foreach ( $parsed_block['attrs']['metadata']['bindings'] as $attribute_name => $block_binding ) { - // If the attribute is not in the allowed list, process next attribute. - if ( ! in_array( $attribute_name, $allowed_blocks[ $this->name ], true ) ) { + // If the attribute is not in the supported list, process next attribute. + if ( ! in_array( $attribute_name, $supported_block_attributes[ $this->name ], true ) ) { continue; } // If no source is provided, or that source is not registered, process next attribute. diff --git a/tests/phpunit/tests/block-bindings/render.php b/tests/phpunit/tests/block-bindings/render.php index d26927d9ca890..03da454e87b3d 100644 --- a/tests/phpunit/tests/block-bindings/render.php +++ b/tests/phpunit/tests/block-bindings/render.php @@ -114,6 +114,49 @@ public function test_passing_arguments_to_source() { ); } + /** + * Tests passing `uses_context` as argument to the source. + * + * @ticket 60525 + * + * @covers ::register_block_bindings_source + */ + public function test_passing_uses_context_to_source() { + $get_value_callback = function ( $source_args, $block_instance, $attribute_name ) { + $value = $block_instance->context['sourceContext']; + return "Value: $value"; + }; + + register_block_bindings_source( + self::SOURCE_NAME, + array( + 'label' => self::SOURCE_LABEL, + 'get_value_callback' => $get_value_callback, + 'uses_context' => array( 'sourceContext' ), + ) + ); + + $block_content = << +

This should not appear

+ +HTML; + $parsed_blocks = parse_blocks( $block_content ); + $block = new WP_Block( $parsed_blocks[0], array( 'sourceContext' => 'source context value' ) ); + $result = $block->render(); + + $this->assertSame( + 'Value: source context value', + $block->attributes['content'], + "The 'content' should be updated with the value of the source context." + ); + $this->assertSame( + '

Value: source context value

', + trim( $result ), + 'The block content should be updated with the value of the source context.' + ); + } + /** * Tests if the block content is updated with the value returned by the source * for the Image block in the placeholder state. diff --git a/tests/phpunit/tests/block-bindings/wpBlockBindingsRegistry.php b/tests/phpunit/tests/block-bindings/wpBlockBindingsRegistry.php index 554058f4606c8..28e1a5b4bb033 100644 --- a/tests/phpunit/tests/block-bindings/wpBlockBindingsRegistry.php +++ b/tests/phpunit/tests/block-bindings/wpBlockBindingsRegistry.php @@ -39,6 +39,7 @@ public function set_up() { 'get_value_callback' => function () { return 'test-value'; }, + 'uses_context' => array( 'sourceContext' ), ); } @@ -162,6 +163,23 @@ public function test_register_invalid_incorrect_callback_type() { $this->assertFalse( $result ); } + /** + * Should reject block bindings registration if `uses_context` is not an array. + * + * @ticket 60525 + * + * @covers WP_Block_Bindings_Registry::register + * + * @expectedIncorrectUsage WP_Block_Bindings_Registry::register + */ + public function test_register_invalid_string_uses_context() { + + self::$test_source_properties['uses_context'] = 'not-an-array'; + + $result = $this->registry->register( self::$test_source_name, self::$test_source_properties ); + $this->assertFalse( $result ); + } + /** * Should accept valid block binding source. * @@ -179,6 +197,13 @@ public function test_register_block_binding_source() { ), $result ); + $this->assertSame( 'test/source', $result->name ); + $this->assertSame( 'Test source', $result->label ); + $this->assertSame( + 'test-value', + $result->get_value( array(), null, '' ) + ); + $this->assertEquals( array( 'sourceContext' ), $result->uses_context ); } /** @@ -321,4 +346,49 @@ public function test_is_registered_for_known_source() { $result = $this->registry->is_registered( self::$test_source_name ); $this->assertTrue( $result ); } + + /** + * Tests merging `uses_context` from multiple sources. + * + * @ticket 60525 + * + * @covers ::register_block_bindings_source + * @covers WP_Block_Type::get_uses_context + */ + public function test_merging_uses_context_from_multiple_sources() { + $get_value_callback = function () { + return 'Anything'; + }; + + $block_registry = WP_Block_Type_Registry::get_instance(); + $original_uses_context = $block_registry->get_registered( 'core/paragraph' )->uses_context; + + register_block_bindings_source( + 'test/source-one', + array( + 'label' => 'Test Source One', + 'get_value_callback' => $get_value_callback, + 'uses_context' => array( 'commonContext', 'sourceOneContext' ), + ) + ); + + register_block_bindings_source( + 'test/source-two', + array( + 'label' => 'Test Source Two', + 'get_value_callback' => $get_value_callback, + 'uses_context' => array( 'commonContext', 'sourceTwoContext' ), + ) + ); + + $new_uses_context = $block_registry->get_registered( 'core/paragraph' )->uses_context; + // Checks that the resulting `uses_context` contains the values from both sources. + $this->assertContains( 'commonContext', $new_uses_context ); + $this->assertContains( 'sourceOneContext', $new_uses_context ); + $this->assertContains( 'sourceTwoContext', $new_uses_context ); + // Checks that the resulting `uses_context` added 3 unique items. + $this->assertSame( count( $original_uses_context ) + 3, count( $new_uses_context ) ); + // Checks that the array isn't sparse to prevent issues in the editor. + $this->assertSame( array_key_last( $new_uses_context ), count( $new_uses_context ) - 1 ); + } } From 1d924aefe955e04b6bd3af0baafaeb961ddf2b97 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 16 Feb 2024 13:13:06 +0000 Subject: [PATCH 004/251] Twenty Twenty-Four: Increase the color contrast of the Ember style variation. This ensures that the color contrast passes the WCAG AA contrast ratio for normal text. Follow-up to [56951]. Props poena, Anlino, richtabor, huzaifaalmesbah, shailu25, itpathsolutions. Fixes #60459. git-svn-id: https://develop.svn.wordpress.org/trunk@57642 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-content/themes/twentytwentyfour/styles/ember.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/wp-content/themes/twentytwentyfour/styles/ember.json b/src/wp-content/themes/twentytwentyfour/styles/ember.json index 37e9c418a42a6..f4e612ca62ba4 100644 --- a/src/wp-content/themes/twentytwentyfour/styles/ember.json +++ b/src/wp-content/themes/twentytwentyfour/styles/ember.json @@ -7,8 +7,8 @@ "duotone": [ { "colors": [ - "#FF3C00", - "#F4F0E6" + "#D73301", + "#F9F8F5" ], "slug": "duotone-2", "name": "Orange and white" @@ -78,12 +78,12 @@ ], "palette": [ { - "color": "#F4F0E6", + "color": "#F9F8F5", "name": "Base", "slug": "base" }, { - "color": "#FF3C00", + "color": "#D73301", "name": "Contrast / 2", "slug": "contrast-2" }, From 490f99ae37fec213f44119ee296cf368bd373476 Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Fri, 16 Feb 2024 21:33:02 +0000 Subject: [PATCH 005/251] REST API: Clarify documentation for methods and filters relating to REST API search endpoints. See #59651 git-svn-id: https://develop.svn.wordpress.org/trunk@57643 602fd350-edb4-49c9-b593-d223f7449a82 --- ...ass-wp-rest-post-format-search-handler.php | 24 +++++++++++----- .../class-wp-rest-post-search-handler.php | 28 +++++++++++++------ .../class-wp-rest-term-search-handler.php | 21 +++++++++----- 3 files changed, 50 insertions(+), 23 deletions(-) diff --git a/src/wp-includes/rest-api/search/class-wp-rest-post-format-search-handler.php b/src/wp-includes/rest-api/search/class-wp-rest-post-format-search-handler.php index b2192816c7fd1..8d815b1491b70 100644 --- a/src/wp-includes/rest-api/search/class-wp-rest-post-format-search-handler.php +++ b/src/wp-includes/rest-api/search/class-wp-rest-post-format-search-handler.php @@ -26,14 +26,17 @@ public function __construct() { } /** - * Searches the object type content for a given search request. + * Searches the post formats for a given search request. * * @since 5.6.0 * * @param WP_REST_Request $request Full REST request. - * @return array Associative array containing an `WP_REST_Search_Handler::RESULT_IDS` containing - * an array of found IDs and `WP_REST_Search_Handler::RESULT_TOTAL` containing the - * total count for the matching search results. + * @return array { + * Associative array containing found IDs and total count for the matching search results. + * + * @type string[] $ids Array containing slugs for the matching post formats. + * @type int $total Total count for the matching search results. + * } */ public function search_items( WP_REST_Request $request ) { $format_strings = get_post_format_strings(); @@ -46,7 +49,7 @@ public function search_items( WP_REST_Request $request ) { } /** - * Filters the query arguments for a REST API search request. + * Filters the query arguments for a REST API post format search request. * * Enables adding extra arguments or setting defaults for a post format search request. * @@ -84,13 +87,20 @@ public function search_items( WP_REST_Request $request ) { } /** - * Prepares the search result for a given ID. + * Prepares the search result for a given post format. * * @since 5.6.0 * * @param string $id Item ID, the post format slug. * @param array $fields Fields to include for the item. - * @return array Associative array containing all fields for the item. + * @return array { + * Associative array containing fields for the post format based on the `$fields` parameter. + * + * @type string $id Optional. Post format slug. + * @type string $title Optional. Post format name. + * @type string $url Optional. Post format permalink URL. + * @type string $type Optional. String 'post-format'. + *} */ public function prepare_item( $id, array $fields ) { $data = array(); diff --git a/src/wp-includes/rest-api/search/class-wp-rest-post-search-handler.php b/src/wp-includes/rest-api/search/class-wp-rest-post-search-handler.php index fb85fce2e2cca..1d47723b41488 100644 --- a/src/wp-includes/rest-api/search/class-wp-rest-post-search-handler.php +++ b/src/wp-includes/rest-api/search/class-wp-rest-post-search-handler.php @@ -40,14 +40,17 @@ public function __construct() { } /** - * Searches the object type content for a given search request. + * Searches posts for a given search request. * * @since 5.0.0 * * @param WP_REST_Request $request Full REST request. - * @return array Associative array containing an `WP_REST_Search_Handler::RESULT_IDS` containing - * an array of found IDs and `WP_REST_Search_Handler::RESULT_TOTAL` containing the - * total count for the matching search results. + * @return array { + * Associative array containing found IDs and total count for the matching search results. + * + * @type int[] $ids Array containing the matching post IDs. + * @type int $total Total count for the matching search results. + * } */ public function search_items( WP_REST_Request $request ) { @@ -78,7 +81,7 @@ public function search_items( WP_REST_Request $request ) { } /** - * Filters the query arguments for a REST API search request. + * Filters the query arguments for a REST API post search request. * * Enables adding extra arguments or setting defaults for a post search request. * @@ -102,13 +105,20 @@ public function search_items( WP_REST_Request $request ) { } /** - * Prepares the search result for a given ID. + * Prepares the search result for a given post ID. * * @since 5.0.0 * - * @param int $id Item ID. - * @param array $fields Fields to include for the item. - * @return array Associative array containing all fields for the item. + * @param int $id Post ID. + * @param array $fields Fields to include for the post. + * @return array { + * Associative array containing fields for the post based on the `$fields` parameter. + * + * @type int $id Optional. Post ID. + * @type string $title Optional. Post title. + * @type string $url Optional. Post permalink URL. + * @type string $type Optional. Post type. + * } */ public function prepare_item( $id, array $fields ) { $post = get_post( $id ); diff --git a/src/wp-includes/rest-api/search/class-wp-rest-term-search-handler.php b/src/wp-includes/rest-api/search/class-wp-rest-term-search-handler.php index eed35e7470618..6527697208bbb 100644 --- a/src/wp-includes/rest-api/search/class-wp-rest-term-search-handler.php +++ b/src/wp-includes/rest-api/search/class-wp-rest-term-search-handler.php @@ -36,7 +36,7 @@ public function __construct() { } /** - * Searches the object type content for a given search request. + * Searches terms for a given search request. * * @since 5.6.0 * @@ -44,7 +44,7 @@ public function __construct() { * @return array { * Associative array containing found IDs and total count for the matching search results. * - * @type int[] $ids Found IDs. + * @type int[] $ids Found term IDs. * @type string|int|WP_Error $total Numeric string containing the number of terms in that * taxonomy, 0 if there are no results, or WP_Error if * the requested taxonomy does not exist. @@ -79,7 +79,7 @@ public function search_items( WP_REST_Request $request ) { } /** - * Filters the query arguments for a REST API search request. + * Filters the query arguments for a REST API term search request. * * Enables adding extra arguments or setting defaults for a term search request. * @@ -110,13 +110,20 @@ public function search_items( WP_REST_Request $request ) { } /** - * Prepares the search result for a given ID. + * Prepares the search result for a given term ID. * * @since 5.6.0 * - * @param int $id Item ID. - * @param array $fields Fields to include for the item. - * @return array Associative array containing all fields for the item. + * @param int $id Term ID. + * @param array $fields Fields to include for the term. + * @return array { + * Associative array containing fields for the term based on the `$fields` parameter. + * + * @type int $id Optional. Term ID. + * @type string $title Optional. Term name. + * @type string $url Optional. Term permalink URL. + * @type string $type Optional. Term taxonomy name. + * } */ public function prepare_item( $id, array $fields ) { $term = get_term( $id ); From 9485fde409cb02aff9c1651a892e0a2429f43853 Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Fri, 16 Feb 2024 21:45:18 +0000 Subject: [PATCH 006/251] Docs: Various improvements and corrections to inline documentation. See #59651 git-svn-id: https://develop.svn.wordpress.org/trunk@57644 602fd350-edb4-49c9-b593-d223f7449a82 --- ...ss-wp-application-passwords-list-table.php | 2 +- .../includes/class-wp-comments-list-table.php | 2 +- .../includes/class-wp-filesystem-base.php | 2 +- .../includes/class-wp-filesystem-direct.php | 2 +- .../includes/class-wp-filesystem-ftpext.php | 2 +- .../class-wp-filesystem-ftpsockets.php | 2 +- .../includes/class-wp-filesystem-ssh2.php | 2 +- src/wp-admin/includes/class-wp-list-table.php | 6 ++-- .../includes/class-wp-ms-sites-list-table.php | 8 ++--- src/wp-admin/includes/plugin.php | 17 +++++++--- src/wp-admin/includes/revision.php | 2 +- src/wp-admin/includes/theme.php | 2 +- src/wp-admin/includes/update.php | 4 +-- src/wp-includes/block-template-utils.php | 32 +++++++++---------- src/wp-includes/blocks.php | 1 + .../class-wp-customize-nav-menus.php | 8 ++--- src/wp-includes/class-wp-date-query.php | 2 +- src/wp-includes/class-wp-http.php | 6 ++-- .../class-wp-paused-extensions-storage.php | 2 +- src/wp-includes/class-wp-script-modules.php | 4 +-- src/wp-includes/class-wp-site-query.php | 10 +++--- src/wp-includes/class-wp-tax-query.php | 2 +- src/wp-includes/class-wp-user.php | 2 +- src/wp-includes/comment.php | 2 +- src/wp-includes/general-template.php | 14 ++++---- src/wp-includes/post.php | 2 +- src/wp-includes/script-modules.php | 4 +-- src/wp-includes/taxonomy.php | 2 +- 28 files changed, 78 insertions(+), 68 deletions(-) diff --git a/src/wp-admin/includes/class-wp-application-passwords-list-table.php b/src/wp-admin/includes/class-wp-application-passwords-list-table.php index 6c0bf26f76b65..9a60853016fc5 100644 --- a/src/wp-admin/includes/class-wp-application-passwords-list-table.php +++ b/src/wp-admin/includes/class-wp-application-passwords-list-table.php @@ -146,7 +146,7 @@ protected function column_default( $item, $column_name ) { * * @since 5.6.0 * - * @param string $which The location of the bulk actions: 'top' or 'bottom'. + * @param string $which The location of the bulk actions: Either 'top' or 'bottom'. */ protected function display_tablenav( $which ) { ?> diff --git a/src/wp-admin/includes/class-wp-comments-list-table.php b/src/wp-admin/includes/class-wp-comments-list-table.php index 993fb7cafcd05..d4970e2f59bae 100644 --- a/src/wp-admin/includes/class-wp-comments-list-table.php +++ b/src/wp-admin/includes/class-wp-comments-list-table.php @@ -437,7 +437,7 @@ protected function extra_tablenav( $which ) { * @since 5.6.0 The `$which` parameter was added. * * @param string $comment_status The comment status name. Default 'All'. - * @param string $which The location of the extra table nav markup: 'top' or 'bottom'. + * @param string $which The location of the extra table nav markup: Either 'top' or 'bottom'. */ do_action( 'manage_comments_nav', $comment_status, $which ); diff --git a/src/wp-admin/includes/class-wp-filesystem-base.php b/src/wp-admin/includes/class-wp-filesystem-base.php index 8b291279e172e..125c2d3b9a8b0 100644 --- a/src/wp-admin/includes/class-wp-filesystem-base.php +++ b/src/wp-admin/includes/class-wp-filesystem-base.php @@ -836,7 +836,7 @@ public function rmdir( $path, $recursive = false ) { * @return array|false { * Array of arrays containing file information. False if unable to list directory contents. * - * @type array $0... { + * @type array ...$0 { * Array of file information. Note that some elements may not be available on all filesystems. * * @type string $name Name of the file or directory. diff --git a/src/wp-admin/includes/class-wp-filesystem-direct.php b/src/wp-admin/includes/class-wp-filesystem-direct.php index 9fdfeb95cbf66..2efd5b000ab07 100644 --- a/src/wp-admin/includes/class-wp-filesystem-direct.php +++ b/src/wp-admin/includes/class-wp-filesystem-direct.php @@ -599,7 +599,7 @@ public function rmdir( $path, $recursive = false ) { * @return array|false { * Array of arrays containing file information. False if unable to list directory contents. * - * @type array $0... { + * @type array ...$0 { * Array of file information. Note that some elements may not be available on all filesystems. * * @type string $name Name of the file or directory. diff --git a/src/wp-admin/includes/class-wp-filesystem-ftpext.php b/src/wp-admin/includes/class-wp-filesystem-ftpext.php index 7db0685fc5166..0294720ccd040 100644 --- a/src/wp-admin/includes/class-wp-filesystem-ftpext.php +++ b/src/wp-admin/includes/class-wp-filesystem-ftpext.php @@ -731,7 +731,7 @@ public function parselisting( $line ) { * @return array|false { * Array of arrays containing file information. False if unable to list directory contents. * - * @type array $0... { + * @type array ...$0 { * Array of file information. Note that some elements may not be available on all filesystems. * * @type string $name Name of the file or directory. diff --git a/src/wp-admin/includes/class-wp-filesystem-ftpsockets.php b/src/wp-admin/includes/class-wp-filesystem-ftpsockets.php index c69d8012cad58..9a37d88c116dd 100644 --- a/src/wp-admin/includes/class-wp-filesystem-ftpsockets.php +++ b/src/wp-admin/includes/class-wp-filesystem-ftpsockets.php @@ -625,7 +625,7 @@ public function rmdir( $path, $recursive = false ) { * @return array|false { * Array of arrays containing file information. False if unable to list directory contents. * - * @type array $0... { + * @type array ...$0 { * Array of file information. Note that some elements may not be available on all filesystems. * * @type string $name Name of the file or directory. diff --git a/src/wp-admin/includes/class-wp-filesystem-ssh2.php b/src/wp-admin/includes/class-wp-filesystem-ssh2.php index b8daad1ab1c3f..9e0cb885b0bcc 100644 --- a/src/wp-admin/includes/class-wp-filesystem-ssh2.php +++ b/src/wp-admin/includes/class-wp-filesystem-ssh2.php @@ -745,7 +745,7 @@ public function rmdir( $path, $recursive = false ) { * @return array|false { * Array of arrays containing file information. False if unable to list directory contents. * - * @type array $0... { + * @type array ...$0 { * Array of file information. Note that some elements may not be available on all filesystems. * * @type string $name Name of the file or directory. diff --git a/src/wp-admin/includes/class-wp-list-table.php b/src/wp-admin/includes/class-wp-list-table.php index 30d7c854cb63c..4b86a9b286d10 100644 --- a/src/wp-admin/includes/class-wp-list-table.php +++ b/src/wp-admin/includes/class-wp-list-table.php @@ -564,7 +564,7 @@ protected function get_bulk_actions() { * * @since 3.1.0 * - * @param string $which The location of the bulk actions: 'top' or 'bottom'. + * @param string $which The location of the bulk actions: Either 'top' or 'bottom'. * This is designated as optional for backward compatibility. */ protected function bulk_actions( $which = '' ) { @@ -1012,7 +1012,7 @@ protected function get_items_per_page( $option, $default_value = 20 ) { * * @since 3.1.0 * - * @param string $which + * @param string $which The location of the pagination: Either 'top' or 'bottom'. */ protected function pagination( $which ) { if ( empty( $this->_pagination_args ) ) { @@ -1663,7 +1663,7 @@ protected function get_table_classes() { * Generates the table navigation above or below the table * * @since 3.1.0 - * @param string $which + * @param string $which The location of the navigation: Either 'top' or 'bottom'. */ protected function display_tablenav( $which ) { if ( 'top' === $which ) { diff --git a/src/wp-admin/includes/class-wp-ms-sites-list-table.php b/src/wp-admin/includes/class-wp-ms-sites-list-table.php index ffa22318cefeb..c0d65a60d401b 100644 --- a/src/wp-admin/includes/class-wp-ms-sites-list-table.php +++ b/src/wp-admin/includes/class-wp-ms-sites-list-table.php @@ -302,7 +302,7 @@ protected function get_bulk_actions() { /** * @global string $mode List table view mode. * - * @param string $which The location of the pagination nav markup: 'top' or 'bottom'. + * @param string $which The location of the pagination nav markup: Either 'top' or 'bottom'. */ protected function pagination( $which ) { global $mode; @@ -319,7 +319,7 @@ protected function pagination( $which ) { * * @since 5.3.0 * - * @param string $which The location of the extra table nav markup: 'top' or 'bottom'. + * @param string $which The location of the extra table nav markup: Either 'top' or 'bottom'. */ protected function extra_tablenav( $which ) { ?> @@ -333,7 +333,7 @@ protected function extra_tablenav( $which ) { * * @since 5.3.0 * - * @param string $which The location of the extra table nav markup: 'top' or 'bottom'. + * @param string $which The location of the extra table nav markup: Either 'top' or 'bottom'. */ do_action( 'restrict_manage_sites', $which ); @@ -353,7 +353,7 @@ protected function extra_tablenav( $which ) { * * @since 5.3.0 * - * @param string $which The location of the extra table nav markup: 'top' or 'bottom'. + * @param string $which The location of the extra table nav markup: Either 'top' or 'bottom'. */ do_action( 'manage_sites_extra_tablenav', $which ); } diff --git a/src/wp-admin/includes/plugin.php b/src/wp-admin/includes/plugin.php index af5f085b2ed6a..fa3fa09f09dd3 100644 --- a/src/wp-admin/includes/plugin.php +++ b/src/wp-admin/includes/plugin.php @@ -493,14 +493,23 @@ function get_dropins() { } /** - * Returns drop-ins that WordPress uses. + * Returns drop-in plugins that WordPress uses. * * Includes Multisite drop-ins only when is_multisite() * * @since 3.0.0 - * @return array[] Key is file name. The value is an array, with the first value the - * purpose of the drop-in and the second value the name of the constant that must be - * true for the drop-in to be used, or true if no constant is required. + * + * @return array[] { + * Key is file name. The value is an array of data about the drop-in. + * + * @type array ...$0 { + * Data about the drop-in. + * + * @type string $0 The purpose of the drop-in. + * @type string|true $1 Name of the constant that must be true for the drop-in + * to be used, or true if no constant is required. + * } + * } */ function _get_dropins() { $dropins = array( diff --git a/src/wp-admin/includes/revision.php b/src/wp-admin/includes/revision.php index 8ed45fd19304e..a0f2c0e875e30 100644 --- a/src/wp-admin/includes/revision.php +++ b/src/wp-admin/includes/revision.php @@ -85,7 +85,7 @@ function wp_get_revision_ui_diff( $post, $compare_from, $compare_to ) { * @param string $field The current revision field. * @param WP_Post $compare_from The revision post object to compare to or from. * @param string $context The context of whether the current revision is the old - * or the new one. Values are 'to' or 'from'. + * or the new one. Either 'to' or 'from'. */ $content_from = $compare_from ? apply_filters( "_wp_post_revision_field_{$field}", $compare_from->$field, $field, $compare_from, 'from' ) : ''; diff --git a/src/wp-admin/includes/theme.php b/src/wp-admin/includes/theme.php index 70abab68ad799..0249fb4fe18d7 100644 --- a/src/wp-admin/includes/theme.php +++ b/src/wp-admin/includes/theme.php @@ -448,7 +448,7 @@ function get_theme_feature_list( $api = true ) { * * @since 2.8.0 * - * @param string $action API action to perform: 'query_themes', 'theme_information', + * @param string $action API action to perform: Accepts 'query_themes', 'theme_information', * 'hot_tags' or 'feature_list'. * @param array|object $args { * Optional. Array or object of arguments to serialize for the Themes API. Default empty array. diff --git a/src/wp-admin/includes/update.php b/src/wp-admin/includes/update.php index 7e68440b8e833..ba27ddd0c1dc0 100644 --- a/src/wp-admin/includes/update.php +++ b/src/wp-admin/includes/update.php @@ -1076,7 +1076,7 @@ function wp_recovery_mode_nag() { * * @since 5.5.0 * - * @param string $type The type of update being checked: 'theme' or 'plugin'. + * @param string $type The type of update being checked: Either 'theme' or 'plugin'. * @return bool True if auto-updates are enabled for `$type`, false otherwise. */ function wp_is_auto_update_enabled_for_type( $type ) { @@ -1116,7 +1116,7 @@ function wp_is_auto_update_enabled_for_type( $type ) { * * @since 5.6.0 * - * @param string $type The type of update being checked: 'theme' or 'plugin'. + * @param string $type The type of update being checked: Either 'theme' or 'plugin'. * @param bool|null $update Whether to update. The value of null is internally used * to detect whether nothing has hooked into this filter. * @param object $item The update offer. diff --git a/src/wp-includes/block-template-utils.php b/src/wp-includes/block-template-utils.php index 89a2f04fb2dd3..01416c19c6b39 100644 --- a/src/wp-includes/block-template-utils.php +++ b/src/wp-includes/block-template-utils.php @@ -174,7 +174,7 @@ function get_default_block_template_types() { ); /** - * Filters the list of template types. + * Filters the list of default template types. * * @since 5.9.0 * @@ -248,7 +248,7 @@ function _get_block_templates_paths( $base_directory ) { * @since 5.9.0 * @access private * - * @param string $template_type 'wp_template' or 'wp_template_part'. + * @param string $template_type Template type. Either 'wp_template' or 'wp_template_part'. * @param string $slug Template slug. * @return array|null { * Array with template metadata if $template_type is one of 'wp_template' or 'wp_template_part', @@ -305,7 +305,7 @@ function _get_block_template_file( $template_type, $slug ) { * @since 6.3.0 Added the `$query` parameter. * @access private * - * @param string $template_type 'wp_template' or 'wp_template_part'. + * @param string $template_type Template type. Either 'wp_template' or 'wp_template_part'. * @param array $query { * Arguments to retrieve templates. Optional, empty by default. * @@ -520,7 +520,7 @@ function _remove_theme_attribute_from_template_part_block( &$block ) { * @access private * * @param array $template_file Theme file. - * @param string $template_type 'wp_template' or 'wp_template_part'. + * @param string $template_type Template type. Either 'wp_template' or 'wp_template_part'. * @return WP_Block_Template Template. */ function _build_block_template_result_from_file( $template_file, $template_type ) { @@ -925,7 +925,7 @@ function _build_block_template_result_from_post( $post ) { * @type string $area A 'wp_template_part_area' taxonomy value to filter by (for 'wp_template_part' template type only). * @type string $post_type Post type to get the templates for. * } - * @param string $template_type 'wp_template' or 'wp_template_part'. + * @param string $template_type Template type. Either 'wp_template' or 'wp_template_part'. * @return WP_Block_Template[] Array of block templates. */ function get_block_templates( $query = array(), $template_type = 'wp_template' ) { @@ -946,7 +946,7 @@ function get_block_templates( $query = array(), $template_type = 'wp_template' ) * @type string $area A 'wp_template_part_area' taxonomy value to filter by (for 'wp_template_part' template type only). * @type string $post_type Post type to get the templates for. * } - * @param string $template_type 'wp_template' or 'wp_template_part'. + * @param string $template_type Template type. Either 'wp_template' or 'wp_template_part'. */ $templates = apply_filters( 'pre_get_block_templates', null, $query, $template_type ); if ( ! is_null( $templates ) ) { @@ -1051,7 +1051,7 @@ function get_block_templates( $query = array(), $template_type = 'wp_template' ) * @since 5.8.0 * * @param string $id Template unique identifier (example: 'theme_slug//template_slug'). - * @param string $template_type Optional. Template type: 'wp_template' or 'wp_template_part'. + * @param string $template_type Optional. Template type. Either 'wp_template' or 'wp_template_part'. * Default 'wp_template'. * @return WP_Block_Template|null Template. */ @@ -1066,7 +1066,7 @@ function get_block_template( $id, $template_type = 'wp_template' ) { * @param WP_Block_Template|null $block_template Return block template object to short-circuit the default query, * or null to allow WP to run its normal queries. * @param string $id Template unique identifier (example: 'theme_slug//template_slug'). - * @param string $template_type Template type: 'wp_template' or 'wp_template_part'. + * @param string $template_type Template type. Either 'wp_template' or 'wp_template_part'. */ $block_template = apply_filters( 'pre_get_block_template', null, $id, $template_type ); if ( ! is_null( $block_template ) ) { @@ -1112,7 +1112,7 @@ function get_block_template( $id, $template_type = 'wp_template' ) { * * @param WP_Block_Template|null $block_template The found block template, or null if there isn't one. * @param string $id Template unique identifier (example: 'theme_slug//template_slug'). - * @param array $template_type Template type: 'wp_template' or 'wp_template_part'. + * @param string $template_type Template type. Either 'wp_template' or 'wp_template_part'. */ return apply_filters( 'get_block_template', $block_template, $id, $template_type ); } @@ -1125,7 +1125,7 @@ function get_block_template( $id, $template_type = 'wp_template' ) { * @since 5.9.0 * * @param string $id Template unique identifier (example: 'theme_slug//template_slug'). - * @param string $template_type Optional. Template type: 'wp_template' or 'wp_template_part'. + * @param string $template_type Optional. Template type. Either 'wp_template' or 'wp_template_part'. * Default 'wp_template'. * @return WP_Block_Template|null The found block template, or null if there isn't one. */ @@ -1140,7 +1140,7 @@ function get_block_file_template( $id, $template_type = 'wp_template' ) { * @param WP_Block_Template|null $block_template Return block template object to short-circuit the default query, * or null to allow WP to run its normal queries. * @param string $id Template unique identifier (example: 'theme_slug//template_slug'). - * @param string $template_type Template type: 'wp_template' or 'wp_template_part'. + * @param string $template_type Template type. Either 'wp_template' or 'wp_template_part'. */ $block_template = apply_filters( 'pre_get_block_file_template', null, $id, $template_type ); if ( ! is_null( $block_template ) ) { @@ -1174,7 +1174,7 @@ function get_block_file_template( $id, $template_type = 'wp_template' ) { * * @param WP_Block_Template|null $block_template The found block template, or null if there is none. * @param string $id Template unique identifier (example: 'theme_slug//template_slug'). - * @param string $template_type Template type: 'wp_template' or 'wp_template_part'. + * @param string $template_type Template type. Either 'wp_template' or 'wp_template_part'. */ return apply_filters( 'get_block_file_template', $block_template, $id, $template_type ); } @@ -1184,7 +1184,7 @@ function get_block_file_template( $id, $template_type = 'wp_template' ) { * * @since 5.9.0 * - * @param string $part The block template part to print. Use "header" or "footer". + * @param string $part The block template part to print. Either 'header' or 'footer'. */ function block_template_part( $part ) { $template_part = get_block_template( get_stylesheet() . '//' . $part, 'wp_template_part' ); @@ -1218,7 +1218,7 @@ function block_footer_area() { * @since 6.0.0 * * @param string $path The path of the file in the theme. - * @return Bool Whether this file is in an ignored directory. + * @return bool Whether this file is in an ignored directory. */ function wp_is_theme_directory_ignored( $path ) { $directories_to_ignore = array( '.DS_Store', '.svn', '.git', '.hg', '.bzr', 'node_modules', 'vendor' ); @@ -1347,8 +1347,8 @@ function wp_generate_block_templates_export_file() { * * @since 6.1.0 * - * @param string $slug The template slug to be created. - * @param boolean $is_custom Optional. Indicates if a template is custom or + * @param string $slug The template slug to be created. + * @param bool $is_custom Optional. Indicates if a template is custom or * part of the template hierarchy. Default false. * @param string $template_prefix Optional. The template prefix for the created template. * Used to extract the main template type, e.g. diff --git a/src/wp-includes/blocks.php b/src/wp-includes/blocks.php index 7b981d2e69316..7931061086065 100644 --- a/src/wp-includes/blocks.php +++ b/src/wp-includes/blocks.php @@ -1757,6 +1757,7 @@ function block_version( $content ) { * @param array $style_properties Array containing the properties of the style name, label, * style_handle (name of the stylesheet to be enqueued), * inline_style (string containing the CSS to be added). + * See WP_Block_Styles_Registry::register(). * @return bool True if the block style was registered with success and false otherwise. */ function register_block_style( $block_name, $style_properties ) { diff --git a/src/wp-includes/class-wp-customize-nav-menus.php b/src/wp-includes/class-wp-customize-nav-menus.php index 20f88f8440fc7..019ebe71288e7 100644 --- a/src/wp-includes/class-wp-customize-nav-menus.php +++ b/src/wp-includes/class-wp-customize-nav-menus.php @@ -937,10 +937,10 @@ public function available_item_types() { * @param array $postarr { * Post array. Note that post_status is overridden to be `auto-draft`. * - * @var string $post_title Post title. Required. - * @var string $post_type Post type. Required. - * @var string $post_name Post name. - * @var string $post_content Post content. + * @type string $post_title Post title. Required. + * @type string $post_type Post type. Required. + * @type string $post_name Post name. + * @type string $post_content Post content. * } * @return WP_Post|WP_Error Inserted auto-draft post object or error. */ diff --git a/src/wp-includes/class-wp-date-query.php b/src/wp-includes/class-wp-date-query.php index 751bab187dbeb..b8ae95461c1a9 100644 --- a/src/wp-includes/class-wp-date-query.php +++ b/src/wp-includes/class-wp-date-query.php @@ -1057,7 +1057,7 @@ public function build_time_query( $column, $compare, $hour = null, $minute = nul * @since 6.0.3 * * @param string $relation Raw relation key from the query argument. - * @return string Sanitized relation ('AND' or 'OR'). + * @return string Sanitized relation. Either 'AND' or 'OR'. */ public function sanitize_relation( $relation ) { if ( 'OR' === strtoupper( $relation ) ) { diff --git a/src/wp-includes/class-wp-http.php b/src/wp-includes/class-wp-http.php index bbb6dd41ae0ec..48580680ba777 100644 --- a/src/wp-includes/class-wp-http.php +++ b/src/wp-includes/class-wp-http.php @@ -611,7 +611,7 @@ private function _dispatch_request( $url, $args ) { * @param string $url The request URL. * @param string|array $args Optional. Override the defaults. * @return array|WP_Error Array containing 'headers', 'body', 'response', 'cookies', 'filename'. - * A WP_Error instance upon error. + * A WP_Error instance upon error. See WP_Http::response() for details. */ public function post( $url, $args = array() ) { $defaults = array( 'method' => 'POST' ); @@ -629,7 +629,7 @@ public function post( $url, $args = array() ) { * @param string $url The request URL. * @param string|array $args Optional. Override the defaults. * @return array|WP_Error Array containing 'headers', 'body', 'response', 'cookies', 'filename'. - * A WP_Error instance upon error. + * A WP_Error instance upon error. See WP_Http::response() for details. */ public function get( $url, $args = array() ) { $defaults = array( 'method' => 'GET' ); @@ -647,7 +647,7 @@ public function get( $url, $args = array() ) { * @param string $url The request URL. * @param string|array $args Optional. Override the defaults. * @return array|WP_Error Array containing 'headers', 'body', 'response', 'cookies', 'filename'. - * A WP_Error instance upon error. + * A WP_Error instance upon error. See WP_Http::response() for details. */ public function head( $url, $args = array() ) { $defaults = array( 'method' => 'HEAD' ); diff --git a/src/wp-includes/class-wp-paused-extensions-storage.php b/src/wp-includes/class-wp-paused-extensions-storage.php index 4658277289e49..a1b2b6d5ae85d 100644 --- a/src/wp-includes/class-wp-paused-extensions-storage.php +++ b/src/wp-includes/class-wp-paused-extensions-storage.php @@ -15,7 +15,7 @@ class WP_Paused_Extensions_Storage { /** - * Type of extension. Used to key extension storage. + * Type of extension. Used to key extension storage. Either 'plugin' or 'theme'. * * @since 5.2.0 * @var string diff --git a/src/wp-includes/class-wp-script-modules.php b/src/wp-includes/class-wp-script-modules.php index 6770597c1bcaa..9bf6ce33e7420 100644 --- a/src/wp-includes/class-wp-script-modules.php +++ b/src/wp-includes/class-wp-script-modules.php @@ -44,7 +44,7 @@ class WP_Script_Modules { * @param array $deps { * Optional. List of dependencies. * - * @type string|array $0... { + * @type string|array ...$0 { * An array of script module identifiers of the dependencies of this script * module. The dependencies can be strings or arrays. If they are arrays, * they need an `id` key with the script module identifier, and can contain @@ -109,7 +109,7 @@ public function register( string $id, string $src, array $deps = array(), $versi * @param array $deps { * Optional. List of dependencies. * - * @type string|array $0... { + * @type string|array ...$0 { * An array of script module identifiers of the dependencies of this script * module. The dependencies can be strings or arrays. If they are arrays, * they need an `id` key with the script module identifier, and can contain diff --git a/src/wp-includes/class-wp-site-query.php b/src/wp-includes/class-wp-site-query.php index 6598866162445..10a9b18339cb0 100644 --- a/src/wp-includes/class-wp-site-query.php +++ b/src/wp-includes/class-wp-site-query.php @@ -158,11 +158,11 @@ class WP_Site_Query { * @type string $path Limit results to those affiliated with a given path. Default empty. * @type string[] $path__in Array of paths to include affiliated sites for. Default empty. * @type string[] $path__not_in Array of paths to exclude affiliated sites for. Default empty. - * @type int $public Limit results to public sites. Accepts '1' or '0'. Default empty. - * @type int $archived Limit results to archived sites. Accepts '1' or '0'. Default empty. - * @type int $mature Limit results to mature sites. Accepts '1' or '0'. Default empty. - * @type int $spam Limit results to spam sites. Accepts '1' or '0'. Default empty. - * @type int $deleted Limit results to deleted sites. Accepts '1' or '0'. Default empty. + * @type int $public Limit results to public sites. Accepts 1 or 0. Default empty. + * @type int $archived Limit results to archived sites. Accepts 1 or 0. Default empty. + * @type int $mature Limit results to mature sites. Accepts 1 or 0. Default empty. + * @type int $spam Limit results to spam sites. Accepts 1 or 0. Default empty. + * @type int $deleted Limit results to deleted sites. Accepts 1 or 0. Default empty. * @type int $lang_id Limit results to a language ID. Default empty. * @type string[] $lang__in Array of language IDs to include affiliated sites for. Default empty. * @type string[] $lang__not_in Array of language IDs to exclude affiliated sites for. Default empty. diff --git a/src/wp-includes/class-wp-tax-query.php b/src/wp-includes/class-wp-tax-query.php index 58e53ea4a2c75..5a489f5662e65 100644 --- a/src/wp-includes/class-wp-tax-query.php +++ b/src/wp-includes/class-wp-tax-query.php @@ -202,7 +202,7 @@ public function sanitize_query( $queries ) { * @since 4.1.0 * * @param string $relation Raw relation key from the query argument. - * @return string Sanitized relation ('AND' or 'OR'). + * @return string Sanitized relation. Either 'AND' or 'OR'. */ public function sanitize_relation( $relation ) { if ( 'OR' === strtoupper( $relation ) ) { diff --git a/src/wp-includes/class-wp-user.php b/src/wp-includes/class-wp-user.php index a3e40df16491c..0be1b3ed02e86 100644 --- a/src/wp-includes/class-wp-user.php +++ b/src/wp-includes/class-wp-user.php @@ -191,7 +191,7 @@ public function init( $data, $site_id = '' ) { * * @global wpdb $wpdb WordPress database abstraction object. * - * @param string $field The field to query against: 'id', 'ID', 'slug', 'email' or 'login'. + * @param string $field The field to query against: Accepts 'id', 'ID', 'slug', 'email' or 'login'. * @param string|int $value The field value. * @return object|false Raw user object. */ diff --git a/src/wp-includes/comment.php b/src/wp-includes/comment.php index 37d36364ce3da..3d11867b07d6b 100644 --- a/src/wp-includes/comment.php +++ b/src/wp-includes/comment.php @@ -278,7 +278,7 @@ function get_comment_statuses() { * * @param string $post_type Optional. Post type. Default 'post'. * @param string $comment_type Optional. Comment type. Default 'comment'. - * @return string Expected return value is 'open' or 'closed'. + * @return string Either 'open' or 'closed'. */ function get_default_comment_status( $post_type = 'post', $comment_type = 'comment' ) { switch ( $comment_type ) { diff --git a/src/wp-includes/general-template.php b/src/wp-includes/general-template.php index ddc34db34ff3a..702c4345ff5ca 100644 --- a/src/wp-includes/general-template.php +++ b/src/wp-includes/general-template.php @@ -1319,7 +1319,7 @@ function _wp_render_title_tag() { * @param string $sep Optional. How to separate the various items within the page title. * Default '»'. * @param bool $display Optional. Whether to display or retrieve title. Default true. - * @param string $seplocation Optional. Location of the separator ('left' or 'right'). + * @param string $seplocation Optional. Location of the separator (either 'left' or 'right'). * @return string|void String when `$display` is false, nothing otherwise. */ function wp_title( $sep = '»', $display = true, $seplocation = '' ) { @@ -1439,7 +1439,7 @@ function wp_title( $sep = '»', $display = true, $seplocation = '' ) { * * @param string $title Page title. * @param string $sep Title separator. - * @param string $seplocation Location of the separator ('left' or 'right'). + * @param string $seplocation Location of the separator (either 'left' or 'right'). */ $title = apply_filters( 'wp_title', $title, $sep, $seplocation ); @@ -3463,7 +3463,7 @@ function wp_resource_hints() { $unique_urls = array(); /** - * Filters domains and URLs for resource hints of relation type. + * Filters domains and URLs for resource hints of the given relation type. * * @since 4.6.0 * @since 4.7.0 The `$urls` parameter accepts arrays of specific HTML attributes @@ -3483,8 +3483,8 @@ function wp_resource_hints() { * @type string $type Type of the resource (`text/html`, `text/css`, etc). * } * } - * @param string $relation_type The relation type the URLs are printed for, - * e.g. 'preconnect' or 'prerender'. + * @param string $relation_type The relation type the URLs are printed for. One of + * 'dns-prefetch', 'preconnect', 'prefetch', or 'prerender'. */ $urls = apply_filters( 'wp_resource_hints', $urls, $relation_type ); @@ -3757,12 +3757,12 @@ function user_can_richedit() { /** * Finds out which editor should be displayed by default. * - * Works out which of the two editors to display as the current editor for a + * Works out which of the editors to display as the current editor for a * user. The 'html' setting is for the "Text" editor tab. * * @since 2.5.0 * - * @return string Either 'tinymce', or 'html', or 'test' + * @return string Either 'tinymce', 'html', or 'test' */ function wp_default_editor() { $r = user_can_richedit() ? 'tinymce' : 'html'; // Defaults. diff --git a/src/wp-includes/post.php b/src/wp-includes/post.php index 90b8df4f6efc2..04fb143a1df0f 100644 --- a/src/wp-includes/post.php +++ b/src/wp-includes/post.php @@ -1600,7 +1600,7 @@ function get_post_type_object( $post_type ) { * * @param array|string $args Optional. An array of key => value arguments to match against * the post type objects. Default empty array. - * @param string $output Optional. The type of output to return. Accepts post type 'names' + * @param string $output Optional. The type of output to return. Either 'names' * or 'objects'. Default 'names'. * @param string $operator Optional. The logical operation to perform. 'or' means only one * element from the array needs to match; 'and' means all elements diff --git a/src/wp-includes/script-modules.php b/src/wp-includes/script-modules.php index f8efb9484b891..0aceb51f62050 100644 --- a/src/wp-includes/script-modules.php +++ b/src/wp-includes/script-modules.php @@ -44,7 +44,7 @@ function wp_script_modules(): WP_Script_Modules { * @param array $deps { * Optional. List of dependencies. * - * @type string|array $0... { + * @type string|array ...$0 { * An array of script module identifiers of the dependencies of this script * module. The dependencies can be strings or arrays. If they are arrays, * they need an `id` key with the script module identifier, and can contain @@ -81,7 +81,7 @@ function wp_register_script_module( string $id, string $src, array $deps = array * @param array $deps { * Optional. List of dependencies. * - * @type string|array $0... { + * @type string|array ...$0 { * An array of script module identifiers of the dependencies of this script * module. The dependencies can be strings or arrays. If they are arrays, * they need an `id` key with the script module identifier, and can contain diff --git a/src/wp-includes/taxonomy.php b/src/wp-includes/taxonomy.php index 6943f2b303dfb..85ca5c30daf45 100644 --- a/src/wp-includes/taxonomy.php +++ b/src/wp-includes/taxonomy.php @@ -272,7 +272,7 @@ function create_initial_taxonomies() { * * @param array $args Optional. An array of `key => value` arguments to match against the taxonomy objects. * Default empty array. - * @param string $output Optional. The type of output to return in the array. Accepts either taxonomy 'names' + * @param string $output Optional. The type of output to return in the array. Either 'names' * or 'objects'. Default 'names'. * @param string $operator Optional. The logical operation to perform. Accepts 'and' or 'or'. 'or' means only * one element from the array needs to match; 'and' means all elements must match. From 96de28cc29774aeb4577b0d314e6b1724c1804ae Mon Sep 17 00:00:00 2001 From: Peter Wilson Date: Fri, 16 Feb 2024 23:32:48 +0000 Subject: [PATCH 007/251] Canonical: Limit post types searched by `redirect_guess_404_permalink()`. Limit the post types searched in `redirect_guess_404_permalink()` to public, searchable post types. This prevents redirects to 404 pages and the exposure of private post type slugs. Props francescocarlucci, peterwilsoncc, rajinsharwar. Fixes #59795. git-svn-id: https://develop.svn.wordpress.org/trunk@57645 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/canonical.php | 13 ++++- tests/phpunit/tests/canonical.php | 81 ++++++++++++++++++++++++++----- 2 files changed, 80 insertions(+), 14 deletions(-) diff --git a/src/wp-includes/canonical.php b/src/wp-includes/canonical.php index 093493731f91a..849e15ac76dcf 100644 --- a/src/wp-includes/canonical.php +++ b/src/wp-includes/canonical.php @@ -949,6 +949,9 @@ function redirect_guess_404_permalink() { } if ( get_query_var( 'name' ) ) { + $publicly_viewable_statuses = array_filter( get_post_stati(), 'is_post_status_viewable' ); + $publicly_viewable_post_types = array_filter( get_post_types( array( 'exclude_from_search' => false ) ), 'is_post_type_viewable' ); + /** * Filters whether to perform a strict guess for a 404 redirect. * @@ -969,12 +972,19 @@ function redirect_guess_404_permalink() { // If any of post_type, year, monthnum, or day are set, use them to refine the query. if ( get_query_var( 'post_type' ) ) { if ( is_array( get_query_var( 'post_type' ) ) ) { + $post_types = array_intersect( get_query_var( 'post_type' ), $publicly_viewable_post_types ); + if ( empty( $post_types ) ) { + return false; + } $where .= " AND post_type IN ('" . join( "', '", esc_sql( get_query_var( 'post_type' ) ) ) . "')"; } else { + if ( ! in_array( get_query_var( 'post_type' ), $publicly_viewable_post_types, true ) ) { + return false; + } $where .= $wpdb->prepare( ' AND post_type = %s', get_query_var( 'post_type' ) ); } } else { - $where .= " AND post_type IN ('" . implode( "', '", get_post_types( array( 'public' => true ) ) ) . "')"; + $where .= " AND post_type IN ('" . implode( "', '", esc_sql( $publicly_viewable_post_types ) ) . "')"; } if ( get_query_var( 'year' ) ) { @@ -987,7 +997,6 @@ function redirect_guess_404_permalink() { $where .= $wpdb->prepare( ' AND DAYOFMONTH(post_date) = %d', get_query_var( 'day' ) ); } - $publicly_viewable_statuses = array_filter( get_post_stati(), 'is_post_status_viewable' ); // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared $post_id = $wpdb->get_var( "SELECT ID FROM $wpdb->posts WHERE $where AND post_status IN ('" . implode( "', '", esc_sql( $publicly_viewable_statuses ) ) . "')" ); diff --git a/tests/phpunit/tests/canonical.php b/tests/phpunit/tests/canonical.php index 4a0a85d1ad198..b83e9563d1fa0 100644 --- a/tests/phpunit/tests/canonical.php +++ b/tests/phpunit/tests/canonical.php @@ -10,13 +10,47 @@ */ class Tests_Canonical extends WP_Canonical_UnitTestCase { + public static $private_cpt_post; + + public static function wpSetUpBeforeClass( WP_UnitTest_Factory $factory ) { + // Set up fixtures in WP_Canonical_UnitTestCase. + parent::wpSetUpBeforeClass( $factory ); + + self::set_up_custom_post_types(); + self::$private_cpt_post = $factory->post->create( + array( + 'post_type' => 'wp_tests_private', + 'post_title' => 'private-cpt-post', + ) + ); + } + public function set_up() { parent::set_up(); wp_set_current_user( self::$author_id ); + self::set_up_custom_post_types(); update_option( 'wp_attachment_pages_enabled', 1 ); } + /** + * Register custom post type for tests. + * + * Register non publicly queryable post type with public set to true. + * + * These arguments are intentionally contradictory for the test associated + * with ticket #59795. + */ + public static function set_up_custom_post_types() { + register_post_type( + 'wp_tests_private', + array( + 'public' => true, + 'publicly_queryable' => false, + ) + ); + } + /** * @dataProvider data_canonical */ @@ -343,20 +377,43 @@ public function data_redirect_guess_404_permalink_with_custom_statuses() { * Ensure multiple post types do not throw a notice. * * @ticket 43056 + * @ticket 59795 + * + * @dataProvider data_redirect_guess_404_permalink_post_types */ - public function test_redirect_guess_404_permalink_post_types() { - /* - * Sample-page is intentionally missspelt as sample-pag to ensure - * the 404 post permalink guessing runs. - * - * Please do not correct the apparent typo. - */ + public function test_redirect_guess_404_permalink_post_types( $original_url, $expected ) { + $this->assertCanonical( $original_url, $expected ); + } - // String format post type. - $this->assertCanonical( '/?name=sample-pag&post_type=page', '/sample-page/' ); - // Array formatted post type or types. - $this->assertCanonical( '/?name=sample-pag&post_type[]=page', '/sample-page/' ); - $this->assertCanonical( '/?name=sample-pag&post_type[]=page&post_type[]=post', '/sample-page/' ); + /** + * Data provider for test_redirect_guess_404_permalink_post_types(). + * + * In the original URLs the post names are intentionally misspelled + * to test the redirection. + * + * Please do not correct the apparent typos. + * + * @return array[] + */ + public function data_redirect_guess_404_permalink_post_types() { + return array( + 'single string formatted post type' => array( + 'original_url' => '/?name=sample-pag&post_type=page', + 'expected' => '/sample-page/', + ), + 'single array formatted post type' => array( + 'original_url' => '/?name=sample-pag&post_type[]=page', + 'expected' => '/sample-page/', + ), + 'multiple array formatted post type' => array( + 'original_url' => '/?name=sample-pag&post_type[]=page&post_type[]=post', + 'expected' => '/sample-page/', + ), + 'do not redirect to private post type' => array( + 'original_url' => '/?name=private-cpt-po&post_type[]=wp_tests_private', + 'expected' => '/?name=private-cpt-po&post_type[]=wp_tests_private', + ), + ); } /** From d0cb4ca0470069a9b00f77e5c6f3f717deb62dc1 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Sat, 17 Feb 2024 13:17:27 +0000 Subject: [PATCH 008/251] Interactivity API: Use string instead of object in `data-wp-interactive` attribute. The server directive processing, integrated in [57563], supports a simplified format for passing the namespace to `data-wp-interactive`. Props cbravobernal, gziolo. Fixes #60542. See #60356. git-svn-id: https://develop.svn.wordpress.org/trunk@57646 602fd350-edb4-49c9-b593-d223f7449a82 --- .../interactivity-api/class-wp-interactivity-api.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/interactivity-api/class-wp-interactivity-api.php b/src/wp-includes/interactivity-api/class-wp-interactivity-api.php index bb491a54f4ee2..536b6623e24df 100644 --- a/src/wp-includes/interactivity-api/class-wp-interactivity-api.php +++ b/src/wp-includes/interactivity-api/class-wp-interactivity-api.php @@ -799,14 +799,14 @@ public function print_router_loading_and_screen_reader_markup() { echo <<
HTML; From c6e41c412b7b779d959002e62b2b51e7bf7cfe1b Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Sat, 17 Feb 2024 13:23:28 +0000 Subject: [PATCH 009/251] General: Further improve language in SimplePie code comments. Follow-up to [57584]. Props manfcarlo. Fixes #60247. git-svn-id: https://develop.svn.wordpress.org/trunk@57647 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class-simplepie.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/wp-includes/class-simplepie.php b/src/wp-includes/class-simplepie.php index 1dabbbd2c3d1e..976ce72cbbdfc 100644 --- a/src/wp-includes/class-simplepie.php +++ b/src/wp-includes/class-simplepie.php @@ -340,7 +340,6 @@ function wp_simplepie_autoload( $class ) { /** * RSS 2.0 Namespace - * (I know, but I'm certain it will confuse people less with support.) */ define('SIMPLEPIE_NAMESPACE_RSS_20', ''); @@ -1205,12 +1204,12 @@ public function set_cache_name_function($function = 'md5') } /** - * Set options to make SP as fast as possible + * Set options to make SimplePie as fast as possible. * - * Forgoes a substantial amount of data sanitization in favor of speed. This - * turns SimplePie into an dumb parser of feeds. + * Forgoes a substantial amount of data sanitization in favor of speed. + * This turns SimplePie into a less clever parser of feeds. * - * @param bool $set Whether to set them or not + * @param bool $set Whether to set them or not. */ public function set_stupidly_fast($set = false) { From 81e3bcfb7d8de6e9fe4d0850b85724836e99fc96 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Sat, 17 Feb 2024 15:22:37 +0000 Subject: [PATCH 010/251] General: Consistently cast return value to `int` in functions that use `ceil()`. The return value of `ceil()` is still of type `float` as the value range of `float` is usually bigger than that of `int`. Props crstauf, audrasjb. Fixes #58683. git-svn-id: https://develop.svn.wordpress.org/trunk@57648 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/ajax-actions.php | 8 ++++---- src/wp-admin/includes/class-wp-list-table.php | 2 +- src/wp-admin/includes/media.php | 2 +- src/wp-admin/includes/nav-menu.php | 2 +- src/wp-includes/class-wp-comment-query.php | 2 +- src/wp-includes/class-wp-network-query.php | 2 +- src/wp-includes/class-wp-query.php | 2 +- src/wp-includes/class-wp-site-query.php | 2 +- src/wp-includes/class-wp-walker.php | 4 ++-- src/wp-includes/comment-template.php | 2 +- src/wp-includes/comment.php | 4 ++-- src/wp-includes/embed.php | 4 ++-- .../endpoints/class-wp-rest-comments-controller.php | 2 +- .../class-wp-rest-font-collections-controller.php | 2 +- .../class-wp-rest-global-styles-revisions-controller.php | 2 +- .../rest-api/endpoints/class-wp-rest-posts-controller.php | 2 +- .../endpoints/class-wp-rest-revisions-controller.php | 2 +- .../endpoints/class-wp-rest-search-controller.php | 2 +- .../rest-api/endpoints/class-wp-rest-terms-controller.php | 6 +++--- .../rest-api/endpoints/class-wp-rest-users-controller.php | 6 +++--- 20 files changed, 30 insertions(+), 30 deletions(-) diff --git a/src/wp-admin/includes/ajax-actions.php b/src/wp-admin/includes/ajax-actions.php index 7541b28d51fdc..f8b6ac45898ff 100644 --- a/src/wp-admin/includes/ajax-actions.php +++ b/src/wp-admin/includes/ajax-actions.php @@ -561,8 +561,8 @@ function _wp_ajax_delete_comment_response( $comment_id, $delta = -1 ) { 'postId' => $comment ? $comment->comment_post_ID : '', /* translators: %s: Number of comments. */ 'total_items_i18n' => sprintf( _n( '%s item', '%s items', $total ), number_format_i18n( $total ) ), - 'total_pages' => ceil( $total / $per_page ), - 'total_pages_i18n' => number_format_i18n( ceil( $total / $per_page ) ), + 'total_pages' => (int) ceil( $total / $per_page ), + 'total_pages_i18n' => number_format_i18n( (int) ceil( $total / $per_page ) ), 'total' => $total, 'time' => $time, 'in_moderation' => $counts->moderated, @@ -3089,10 +3089,10 @@ function wp_ajax_query_attachments() { $posts_per_page = (int) $attachments_query->get( 'posts_per_page' ); - $max_pages = $posts_per_page ? ceil( $total_posts / $posts_per_page ) : 0; + $max_pages = $posts_per_page ? (int) ceil( $total_posts / $posts_per_page ) : 0; header( 'X-WP-Total: ' . (int) $total_posts ); - header( 'X-WP-TotalPages: ' . (int) $max_pages ); + header( 'X-WP-TotalPages: ' . $max_pages ); wp_send_json_success( $posts ); } diff --git a/src/wp-admin/includes/class-wp-list-table.php b/src/wp-admin/includes/class-wp-list-table.php index 4b86a9b286d10..4e6aaa48544f1 100644 --- a/src/wp-admin/includes/class-wp-list-table.php +++ b/src/wp-admin/includes/class-wp-list-table.php @@ -319,7 +319,7 @@ protected function set_pagination_args( $args ) { ); if ( ! $args['total_pages'] && $args['per_page'] > 0 ) { - $args['total_pages'] = ceil( $args['total_items'] / $args['per_page'] ); + $args['total_pages'] = (int) ceil( $args['total_items'] / $args['per_page'] ); } // Redirect if page number is invalid and headers are not already sent. diff --git a/src/wp-admin/includes/media.php b/src/wp-admin/includes/media.php index 193e67f7dd641..3de25dc548476 100644 --- a/src/wp-admin/includes/media.php +++ b/src/wp-admin/includes/media.php @@ -2832,7 +2832,7 @@ function media_upload_library_form( $errors ) { 'format' => '', 'prev_text' => __( '«' ), 'next_text' => __( '»' ), - 'total' => ceil( $wp_query->found_posts / 10 ), + 'total' => (int) ceil( $wp_query->found_posts / 10 ), 'current' => $q['paged'], ) ); diff --git a/src/wp-admin/includes/nav-menu.php b/src/wp-admin/includes/nav-menu.php index 704f0316dbb5b..8f18057c238f5 100644 --- a/src/wp-admin/includes/nav-menu.php +++ b/src/wp-admin/includes/nav-menu.php @@ -874,7 +874,7 @@ function wp_nav_menu_item_taxonomy_meta_box( $data_object, $box ) { return; } - $num_pages = ceil( + $num_pages = (int) ceil( wp_count_terms( array_merge( $args, diff --git a/src/wp-includes/class-wp-comment-query.php b/src/wp-includes/class-wp-comment-query.php index e2ea55a22c2c6..448b7994d805c 100644 --- a/src/wp-includes/class-wp-comment-query.php +++ b/src/wp-includes/class-wp-comment-query.php @@ -470,7 +470,7 @@ public function get_comments() { } if ( $this->found_comments && $this->query_vars['number'] ) { - $this->max_num_pages = ceil( $this->found_comments / $this->query_vars['number'] ); + $this->max_num_pages = (int) ceil( $this->found_comments / $this->query_vars['number'] ); } // If querying for a count only, there's nothing more to do. diff --git a/src/wp-includes/class-wp-network-query.php b/src/wp-includes/class-wp-network-query.php index 7199ec03a1a15..9dc2984f2eba7 100644 --- a/src/wp-includes/class-wp-network-query.php +++ b/src/wp-includes/class-wp-network-query.php @@ -269,7 +269,7 @@ public function get_networks() { } if ( $this->found_networks && $this->query_vars['number'] ) { - $this->max_num_pages = ceil( $this->found_networks / $this->query_vars['number'] ); + $this->max_num_pages = (int) ceil( $this->found_networks / $this->query_vars['number'] ); } // If querying for a count only, there's nothing more to do. diff --git a/src/wp-includes/class-wp-query.php b/src/wp-includes/class-wp-query.php index f683a52bd1080..a826dda5ec90e 100644 --- a/src/wp-includes/class-wp-query.php +++ b/src/wp-includes/class-wp-query.php @@ -3624,7 +3624,7 @@ private function set_found_posts( $q, $limits ) { $this->found_posts = (int) apply_filters_ref_array( 'found_posts', array( $this->found_posts, &$this ) ); if ( ! empty( $limits ) ) { - $this->max_num_pages = ceil( $this->found_posts / $q['posts_per_page'] ); + $this->max_num_pages = (int) ceil( $this->found_posts / $q['posts_per_page'] ); } } diff --git a/src/wp-includes/class-wp-site-query.php b/src/wp-includes/class-wp-site-query.php index 10a9b18339cb0..bda2c0cb2a979 100644 --- a/src/wp-includes/class-wp-site-query.php +++ b/src/wp-includes/class-wp-site-query.php @@ -377,7 +377,7 @@ public function get_sites() { } if ( $this->found_sites && $this->query_vars['number'] ) { - $this->max_num_pages = ceil( $this->found_sites / $this->query_vars['number'] ); + $this->max_num_pages = (int) ceil( $this->found_sites / $this->query_vars['number'] ); } // If querying for a count only, there's nothing more to do. diff --git a/src/wp-includes/class-wp-walker.php b/src/wp-includes/class-wp-walker.php index d8c00a372322a..e44907ee70884 100644 --- a/src/wp-includes/class-wp-walker.php +++ b/src/wp-includes/class-wp-walker.php @@ -310,7 +310,7 @@ public function paged_walk( $elements, $max_depth, $page_num, $per_page, ...$arg $start = ( (int) $page_num - 1 ) * (int) $per_page; $end = $start + $per_page; if ( -1 == $max_depth ) { - $this->max_pages = ceil( $total_top / $per_page ); + $this->max_pages = (int) ceil( $total_top / $per_page ); } } @@ -354,7 +354,7 @@ public function paged_walk( $elements, $max_depth, $page_num, $per_page, ...$arg $total_top = count( $top_level_elements ); if ( $paging ) { - $this->max_pages = ceil( $total_top / $per_page ); + $this->max_pages = (int) ceil( $total_top / $per_page ); } else { $end = $total_top; } diff --git a/src/wp-includes/comment-template.php b/src/wp-includes/comment-template.php index a1005d56e2393..29f440f3a7867 100644 --- a/src/wp-includes/comment-template.php +++ b/src/wp-includes/comment-template.php @@ -1515,7 +1515,7 @@ function comments_template( $file = '/comments.php', $separate_comments = false $top_level_count = $top_level_query->query( $top_level_args ); - $comment_args['offset'] = ( ceil( $top_level_count / $per_page ) - 1 ) * $per_page; + $comment_args['offset'] = ( (int) ceil( $top_level_count / $per_page ) - 1 ) * $per_page; } } diff --git a/src/wp-includes/comment.php b/src/wp-includes/comment.php index 3d11867b07d6b..cca3901207775 100644 --- a/src/wp-includes/comment.php +++ b/src/wp-includes/comment.php @@ -1031,7 +1031,7 @@ function get_comment_pages_count( $comments = null, $per_page = null, $threaded $count = ceil( count( $comments ) / $per_page ); } - return $count; + return (int) $count; } /** @@ -1170,7 +1170,7 @@ function get_page_of_comment( $comment_id, $args = array() ) { // Divide comments older than this one by comments per page to get this comment's page number. } else { - $page = ceil( ( $older_comment_count + 1 ) / $args['per_page'] ); + $page = (int) ceil( ( $older_comment_count + 1 ) / $args['per_page'] ); } } diff --git a/src/wp-includes/embed.php b/src/wp-includes/embed.php index 9e59f1abc05b4..82cb45d314a31 100644 --- a/src/wp-includes/embed.php +++ b/src/wp-includes/embed.php @@ -73,7 +73,7 @@ function wp_embed_defaults( $url = '' ) { $width = 500; } - $height = min( ceil( $width * 1.5 ), 1000 ); + $height = min( (int) ceil( $width * 1.5 ), 1000 ); /** * Filters the default array of embed dimensions. @@ -577,7 +577,7 @@ function get_oembed_response_data( $post, $width ) { ); $width = min( max( $min_max_width['min'], $width ), $min_max_width['max'] ); - $height = max( ceil( $width / 16 * 9 ), 200 ); + $height = max( (int) ceil( $width / 16 * 9 ), 200 ); $data = array( 'version' => '1.0', diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php index 3a367e7e22c5a..c129ef6e130c4 100644 --- a/src/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php +++ b/src/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php @@ -300,7 +300,7 @@ public function get_items( $request ) { $prepared_args['orderby'] = 'none'; $total_comments = $query->query( $prepared_args ); - $max_pages = ceil( $total_comments / $request['per_page'] ); + $max_pages = (int) ceil( $total_comments / $request['per_page'] ); } $response = rest_ensure_response( $comments ); diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-font-collections-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-font-collections-controller.php index 05ef0c7b11b64..3ede1dacdc031 100644 --- a/src/wp-includes/rest-api/endpoints/class-wp-rest-font-collections-controller.php +++ b/src/wp-includes/rest-api/endpoints/class-wp-rest-font-collections-controller.php @@ -77,7 +77,7 @@ public function get_items( $request ) { $page = $request['page']; $per_page = $request['per_page']; $total_items = count( $collections_all ); - $max_pages = ceil( $total_items / $per_page ); + $max_pages = (int) ceil( $total_items / $per_page ); if ( $page > $max_pages && $total_items > 0 ) { return new WP_Error( diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-global-styles-revisions-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-global-styles-revisions-controller.php index db1be197e5ab4..5f5ae8441ce31 100644 --- a/src/wp-includes/rest-api/endpoints/class-wp-rest-global-styles-revisions-controller.php +++ b/src/wp-includes/rest-api/endpoints/class-wp-rest-global-styles-revisions-controller.php @@ -206,7 +206,7 @@ public function get_items( $request ) { } if ( $revisions_query->query_vars['posts_per_page'] > 0 ) { - $max_pages = ceil( $total_revisions / (int) $revisions_query->query_vars['posts_per_page'] ); + $max_pages = (int) ceil( $total_revisions / (int) $revisions_query->query_vars['posts_per_page'] ); } else { $max_pages = $total_revisions > 0 ? 1 : 0; } diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php index ce99d0dde1409..4501e47a24dfe 100644 --- a/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php +++ b/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php @@ -403,7 +403,7 @@ public function get_items( $request ) { $total_posts = $count_query->found_posts; } - $max_pages = ceil( $total_posts / (int) $posts_query->query_vars['posts_per_page'] ); + $max_pages = (int) ceil( $total_posts / (int) $posts_query->query_vars['posts_per_page'] ); if ( $page > $max_pages && $total_posts > 0 ) { return new WP_Error( diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-revisions-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-revisions-controller.php index 62dff71c16234..fb5fa29231a4f 100644 --- a/src/wp-includes/rest-api/endpoints/class-wp-rest-revisions-controller.php +++ b/src/wp-includes/rest-api/endpoints/class-wp-rest-revisions-controller.php @@ -308,7 +308,7 @@ public function get_items( $request ) { } if ( $revisions_query->query_vars['posts_per_page'] > 0 ) { - $max_pages = ceil( $total_revisions / (int) $revisions_query->query_vars['posts_per_page'] ); + $max_pages = (int) ceil( $total_revisions / (int) $revisions_query->query_vars['posts_per_page'] ); } else { $max_pages = $total_revisions > 0 ? 1 : 0; } diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-search-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-search-controller.php index 4c44f67578600..cc1c302b9c42b 100644 --- a/src/wp-includes/rest-api/endpoints/class-wp-rest-search-controller.php +++ b/src/wp-includes/rest-api/endpoints/class-wp-rest-search-controller.php @@ -152,7 +152,7 @@ public function get_items( $request ) { $total = (int) $result[ WP_REST_Search_Handler::RESULT_TOTAL ]; $page = (int) $request['page']; $per_page = (int) $request['per_page']; - $max_pages = ceil( $total / $per_page ); + $max_pages = (int) ceil( $total / $per_page ); if ( $page > $max_pages && $total > 0 ) { return new WP_Error( diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php index cf9dc917c49d2..8ffc6ade6eadf 100644 --- a/src/wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php +++ b/src/wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php @@ -348,13 +348,13 @@ public function get_items( $request ) { // Store pagination values for headers. $per_page = (int) $prepared_args['number']; - $page = ceil( ( ( (int) $prepared_args['offset'] ) / $per_page ) + 1 ); + $page = (int) ceil( ( ( (int) $prepared_args['offset'] ) / $per_page ) + 1 ); $response->header( 'X-WP-Total', (int) $total_terms ); - $max_pages = ceil( $total_terms / $per_page ); + $max_pages = (int) ceil( $total_terms / $per_page ); - $response->header( 'X-WP-TotalPages', (int) $max_pages ); + $response->header( 'X-WP-TotalPages', $max_pages ); $request_params = $request->get_query_params(); $collection_url = rest_url( rest_get_route_for_taxonomy_items( $this->taxonomy ) ); diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php index 9b3847063163e..c2e0db83c539d 100644 --- a/src/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php +++ b/src/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php @@ -348,7 +348,7 @@ public function get_items( $request ) { // Store pagination values for headers then unset for count query. $per_page = (int) $prepared_args['number']; - $page = ceil( ( ( (int) $prepared_args['offset'] ) / $per_page ) + 1 ); + $page = (int) ceil( ( ( (int) $prepared_args['offset'] ) / $per_page ) + 1 ); $prepared_args['fields'] = 'ID'; @@ -363,9 +363,9 @@ public function get_items( $request ) { $response->header( 'X-WP-Total', (int) $total_users ); - $max_pages = ceil( $total_users / $per_page ); + $max_pages = (int) ceil( $total_users / $per_page ); - $response->header( 'X-WP-TotalPages', (int) $max_pages ); + $response->header( 'X-WP-TotalPages', $max_pages ); $base = add_query_arg( urlencode_deep( $request->get_query_params() ), rest_url( sprintf( '%s/%s', $this->namespace, $this->rest_base ) ) ); if ( $page > 1 ) { From 55a14eae8befd649a30a17e094e06e0c460fe3ec Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Sat, 17 Feb 2024 15:26:43 +0000 Subject: [PATCH 011/251] Interactivity API: Skip instead of bail out if HTML contains `SVG` or `MATH`. Addresses an issue with server-side processing of directives when there is e.g. an SVG icon a navigation menu. Props cbravobernal, westonruter, dmsnell, swissspidy. Fixes #60517. git-svn-id: https://develop.svn.wordpress.org/trunk@57649 602fd350-edb4-49c9-b593-d223f7449a82 --- ...interactivity-api-directives-processor.php | 33 +++++ .../class-wp-interactivity-api.php | 9 +- .../interactivity-api/wpInteractivityAPI.php | 119 +++++++++++++++--- .../wpInteractivityAPIDirectivesProcessor.php | 49 +++++++- 4 files changed, 188 insertions(+), 22 deletions(-) diff --git a/src/wp-includes/interactivity-api/class-wp-interactivity-api-directives-processor.php b/src/wp-includes/interactivity-api/class-wp-interactivity-api-directives-processor.php index 24201e82fdd0a..3b2dcb1237971 100644 --- a/src/wp-includes/interactivity-api/class-wp-interactivity-api-directives-processor.php +++ b/src/wp-includes/interactivity-api/class-wp-interactivity-api-directives-processor.php @@ -180,6 +180,39 @@ private function get_balanced_tag_bookmarks() { return array( $opener_tag, $closer_tag ); } + /** + * Skips processing the content between tags. + * + * It positions the cursor in the closer tag of the foreign element, if it + * exists. + * + * This function is intended to skip processing SVG and MathML inner content + * instead of bailing out the whole processing. + * + * @since 6.5.0 + * + * @access private + * + * @return bool Whether the foreign content was successfully skipped. + */ + public function skip_to_tag_closer(): bool { + $depth = 1; + $tag_name = $this->get_tag(); + while ( $depth > 0 && $this->next_tag( + array( + 'tag_name' => $tag_name, + 'tag_closers' => 'visit', + ) + ) ) { + if ( $this->has_self_closing_flag() ) { + continue; + } + $depth += $this->is_tag_closer() ? -1 : 1; + } + + return 0 === $depth; + } + /** * Finds the matching closing tag for an opening tag. * diff --git a/src/wp-includes/interactivity-api/class-wp-interactivity-api.php b/src/wp-includes/interactivity-api/class-wp-interactivity-api.php index 536b6623e24df..9e5b1be1fa5ed 100644 --- a/src/wp-includes/interactivity-api/class-wp-interactivity-api.php +++ b/src/wp-includes/interactivity-api/class-wp-interactivity-api.php @@ -235,9 +235,14 @@ private function process_directives_args( string $html, array &$context_stack, a while ( $p->next_tag( array( 'tag_closers' => 'visit' ) ) ) { $tag_name = $p->get_tag(); + /* + * Directives inside SVG and MATH tags are not processed, + * as they are not compatible with the Tag Processor yet. + * We still process the rest of the HTML. + */ if ( 'SVG' === $tag_name || 'MATH' === $tag_name ) { - $unbalanced = true; - break; + $p->skip_to_tag_closer(); + continue; } if ( $p->is_tag_closer() ) { diff --git a/tests/phpunit/tests/interactivity-api/wpInteractivityAPI.php b/tests/phpunit/tests/interactivity-api/wpInteractivityAPI.php index 5e8298a77e449..25b8379acd016 100644 --- a/tests/phpunit/tests/interactivity-api/wpInteractivityAPI.php +++ b/tests/phpunit/tests/interactivity-api/wpInteractivityAPI.php @@ -11,7 +11,7 @@ * * @coversDefaultClass WP_Interactivity_API */ -class Tests_WP_Interactivity_API extends WP_UnitTestCase { +class Tests_Interactivity_API_WpInteractivityAPI extends WP_UnitTestCase { /** * Instance of WP_Interactivity_API. * @@ -508,50 +508,131 @@ public function test_process_directives_doesnt_change_html_if_contains_unbalance } /** - * Tests that the `process_directives` returns the same HTML if it finds an - * SVG tag. + * Tests that the `process_directives` process the HTML outside a SVG tag. * - * @ticket 60356 + * @ticket 60517 * * @covers ::process_directives */ - public function test_process_directives_doesnt_change_html_if_contains_svgs() { - $this->interactivity->state( 'myPlugin', array( 'id' => 'some-id' ) ); + public function test_process_directives_changes_html_if_contains_svgs() { + $this->interactivity->state( + 'myPlugin', + array( + 'id' => 'some-id', + 'width' => '100', + ) + ); $html = ' -
- +
+ + Red Circle - -
+ +
+
+ '; $processed_html = $this->interactivity->process_directives( $html ); $p = new WP_HTML_Tag_Processor( $processed_html ); - $p->next_tag(); + $p->next_tag( 'svg' ); + $this->assertNull( $p->get_attribute( 'width' ) ); + $p->next_tag( 'div' ); + $this->assertEquals( 'some-id', $p->get_attribute( 'id' ) ); + $p->next_tag( 'div' ); + $this->assertEquals( '100', $p->get_attribute( 'id' ) ); + } + + /** + * Tests that the `process_directives` does not process the HTML + * inside SVG tags. + * + * @ticket 60517 + * + * @covers ::process_directives + */ + public function test_process_directives_does_not_change_inner_html_in_svgs() { + $this->interactivity->state( + 'myPlugin', + array( + 'id' => 'some-id', + ) + ); + $html = ' +
+ + + + +
+ '; + $processed_html = $this->interactivity->process_directives( $html ); + $p = new WP_HTML_Tag_Processor( $processed_html ); + $p->next_tag( 'div' ); $this->assertNull( $p->get_attribute( 'id' ) ); } /** - * Tests that the `process_directives` returns the same HTML if it finds an + * Tests that the `process_directives` process the HTML outside the * MathML tag. * - * @ticket 60356 + * @ticket 60517 * * @covers ::process_directives */ - public function test_process_directives_doesnt_change_html_if_contains_math() { - $this->interactivity->state( 'myPlugin', array( 'id' => 'some-id' ) ); + public function test_process_directives_change_html_if_contains_math() { + $this->interactivity->state( + 'myPlugin', + array( + 'id' => 'some-id', + 'math' => 'ml-id', + ) + ); $html = ' -
- +
+ x = 1 -
+
+ '; $processed_html = $this->interactivity->process_directives( $html ); $p = new WP_HTML_Tag_Processor( $processed_html ); - $p->next_tag(); + $p->next_tag( 'math' ); + $this->assertNull( $p->get_attribute( 'id' ) ); + $p->next_tag( 'div' ); + $this->assertEquals( 'some-id', $p->get_attribute( 'id' ) ); + } + + /** + * Tests that the `process_directives` does not process the HTML + * inside MathML tags. + * + * @ticket 60517 + * + * @covers ::process_directives + */ + public function test_process_directives_does_not_change_inner_html_in_math() { + $this->interactivity->state( + 'myPlugin', + array( + 'id' => 'some-id', + ) + ); + $html = ' +
+ + + x + = + 1 + +
+ '; + $processed_html = $this->interactivity->process_directives( $html ); + $p = new WP_HTML_Tag_Processor( $processed_html ); + $p->next_tag( 'div' ); $this->assertNull( $p->get_attribute( 'id' ) ); } diff --git a/tests/phpunit/tests/interactivity-api/wpInteractivityAPIDirectivesProcessor.php b/tests/phpunit/tests/interactivity-api/wpInteractivityAPIDirectivesProcessor.php index bf2225597c0ae..e7395b5f38009 100644 --- a/tests/phpunit/tests/interactivity-api/wpInteractivityAPIDirectivesProcessor.php +++ b/tests/phpunit/tests/interactivity-api/wpInteractivityAPIDirectivesProcessor.php @@ -11,7 +11,7 @@ * * @coversDefaultClass WP_Interactivity_API_Directives_Processor */ -class Tests_WP_Interactivity_API_Directives_Processor extends WP_UnitTestCase { +class Tests_Interactivity_API_WpInteractivityAPIDirectivesProcessor extends WP_UnitTestCase { /** * Tests the `get_content_between_balanced_template_tags` method on template * tags. @@ -778,4 +778,51 @@ public function test_next_balanced_tag_closer_tag_on_closing_tag() { $p->next_tag( array( 'tag_closers' => 'visit' ) ); $this->assertFalse( $p->next_balanced_tag_closer_tag() ); } + + /** + * Tests that skip_to_tag_closer skips to the next tag, + * independant of the content. + * + * @ticket 60517 + * + * @covers ::skip_to_tag_closer + */ + public function test_skip_to_tag_closer() { + $content = '
Not closed
'; + $p = new WP_Interactivity_API_Directives_Processor( $content ); + $p->next_tag(); + $this->assertTrue( $p->skip_to_tag_closer() ); + $this->assertTrue( $p->is_tag_closer() ); + $this->assertEquals( 'DIV', $p->get_tag() ); + } + + /** + * Tests that skip_to_tag_closer does not skip to the + * next tag if there is no closing tag. + * + * @ticket 60517 + * + * @covers ::skip_to_tag_closer + */ + public function test_skip_to_tag_closer_bails_not_closed() { + $content = '
Not closed parent'; + $p = new WP_Interactivity_API_Directives_Processor( $content ); + $p->next_tag(); + $this->assertFalse( $p->skip_to_tag_closer() ); + } + + /** + * Tests that skip_to_tag_closer does not skip to the next + * tag if the closing tag is different from the current tag. + * + * @ticket 60517 + * + * @covers ::skip_to_tag_closer + */ + public function test_skip_to_tag_closer_bails_different_tags() { + $content = '
'; + $p = new WP_Interactivity_API_Directives_Processor( $content ); + $p->next_tag(); + $this->assertFalse( $p->skip_to_tag_closer() ); + } } From 8fc144ab27470b3d47dcffe7d4eaecf9318e78ad Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sat, 17 Feb 2024 16:32:37 +0000 Subject: [PATCH 012/251] Tests: Use `assertSame()` in `get_comment_pages_count()` 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 [27055], [48937], [54402], [57244], [57648]. Props costdev. See #58683, #59655. git-svn-id: https://develop.svn.wordpress.org/trunk@57650 602fd350-edb4-49c9-b593-d223f7449a82 --- .../tests/comment/getCommentsPagesCount.php | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/tests/phpunit/tests/comment/getCommentsPagesCount.php b/tests/phpunit/tests/comment/getCommentsPagesCount.php index a3c815f8c47d3..146def6fd5af1 100644 --- a/tests/phpunit/tests/comment/getCommentsPagesCount.php +++ b/tests/phpunit/tests/comment/getCommentsPagesCount.php @@ -78,9 +78,9 @@ public function test_threaded_comments() { self::factory()->comment->create_post_comments( $post->ID, 6, array( 'comment_parent' => $comments[0] ) ); $comments = get_comments( array( 'post_id' => $post->ID ) ); - $this->assertEquals( 3, get_comment_pages_count( $comments, 10, false ) ); - $this->assertEquals( 2, get_comment_pages_count( $comments, 10, true ) ); - $this->assertEquals( 4, get_comment_pages_count( $comments, 4, true ) ); + $this->assertSame( 3, get_comment_pages_count( $comments, 10, false ) ); + $this->assertSame( 2, get_comment_pages_count( $comments, 10, true ) ); + $this->assertSame( 4, get_comment_pages_count( $comments, 4, true ) ); } /** @@ -101,17 +101,17 @@ public function test_option_thread_comments() { update_option( 'thread_comments', false ); - $this->assertEquals( 3, get_comment_pages_count( $comments, 10, false ) ); - $this->assertEquals( 2, get_comment_pages_count( $comments, 10, true ) ); - $this->assertEquals( 3, get_comment_pages_count( $comments, 10, null ) ); - $this->assertEquals( 3, get_comment_pages_count( $comments, 10 ) ); + $this->assertSame( 3, get_comment_pages_count( $comments, 10, false ) ); + $this->assertSame( 2, get_comment_pages_count( $comments, 10, true ) ); + $this->assertSame( 3, get_comment_pages_count( $comments, 10, null ) ); + $this->assertSame( 3, get_comment_pages_count( $comments, 10 ) ); update_option( 'thread_comments', true ); - $this->assertEquals( 3, get_comment_pages_count( $comments, 10, false ) ); - $this->assertEquals( 2, get_comment_pages_count( $comments, 10, true ) ); - $this->assertEquals( 2, get_comment_pages_count( $comments, 10, null ) ); - $this->assertEquals( 2, get_comment_pages_count( $comments, 10 ) ); + $this->assertSame( 3, get_comment_pages_count( $comments, 10, false ) ); + $this->assertSame( 2, get_comment_pages_count( $comments, 10, true ) ); + $this->assertSame( 2, get_comment_pages_count( $comments, 10, null ) ); + $this->assertSame( 2, get_comment_pages_count( $comments, 10 ) ); } /** @@ -140,8 +140,8 @@ public function test_wp_query_comments_per_page() { update_option( 'comments_per_page', 25 ); - $this->assertEquals( 3, get_comment_pages_count() ); - $this->assertEquals( 2, get_comment_pages_count( null, 20 ) ); + $this->assertSame( 3, get_comment_pages_count() ); + $this->assertSame( 2, get_comment_pages_count( null, 20 ) ); $wp_query = new WP_Query( array( @@ -151,16 +151,16 @@ public function test_wp_query_comments_per_page() { ) ); - $this->assertEquals( 1, get_comment_pages_count() ); - $this->assertEquals( 5, get_comment_pages_count( null, 5 ) ); + $this->assertSame( 1, get_comment_pages_count() ); + $this->assertSame( 5, get_comment_pages_count( null, 5 ) ); $wp_query->query_vars['comments_per_page'] = null; update_option( 'comments_per_page', 5 ); - $this->assertEquals( 5, get_comment_pages_count() ); - $this->assertEquals( 3, get_comment_pages_count( null, 11 ) ); - $this->assertEquals( 5, get_comment_pages_count( null, 0 ) ); + $this->assertSame( 5, get_comment_pages_count() ); + $this->assertSame( 3, get_comment_pages_count( null, 11 ) ); + $this->assertSame( 5, get_comment_pages_count( null, 0 ) ); } /** From a1d6aa3644e3bc17221077b1bffb7b2f9ac3875d Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Sun, 18 Feb 2024 14:43:42 +0000 Subject: [PATCH 013/251] Canonical: Rename `admin_canonical_url` filter to `wp_admin_canonical_url`. This improves consistency as it matches the name of the function it is used in. Props peterwilsoncc, shailu25. Fixes #59545. git-svn-id: https://develop.svn.wordpress.org/trunk@57651 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/misc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-admin/includes/misc.php b/src/wp-admin/includes/misc.php index 13552d56cf928..f950821b1d53f 100644 --- a/src/wp-admin/includes/misc.php +++ b/src/wp-admin/includes/misc.php @@ -1405,7 +1405,7 @@ function wp_admin_canonical_url() { * * @param string $filtered_url The admin canonical url value. */ - $filtered_url = apply_filters( 'admin_canonical_url', $filtered_url ); + $filtered_url = apply_filters( 'wp_admin_canonical_url', $filtered_url ); ?> \n ", 'expected' => '"Rock 3D"', ), + 'data_font_family_with_generic_names' => array( + 'font_family' => 'generic(kai), generic(font[name]), generic(fangsong), Rock 3D', + 'expected' => 'generic(kai), "generic(font[name])", generic(fangsong), "Rock 3D"', + ), ); } } diff --git a/tests/phpunit/tests/fonts/font-library/wpRestFontFamiliesController.php b/tests/phpunit/tests/fonts/font-library/wpRestFontFamiliesController.php index 0676c3ce4b88d..c78efdf03e449 100644 --- a/tests/phpunit/tests/fonts/font-library/wpRestFontFamiliesController.php +++ b/tests/phpunit/tests/fonts/font-library/wpRestFontFamiliesController.php @@ -681,7 +681,7 @@ public function test_update_item() { $settings = array( 'name' => 'Open Sans', - 'fontFamily' => '"Open Sans, "Noto Sans", sans-serif', + 'fontFamily' => 'Open Sans, "Noto Sans", sans-serif', 'preview' => 'https://s.w.org/images/fonts/16.9/previews/open-sans/open-sans-400-normal.svg', ); @@ -700,7 +700,7 @@ public function test_update_item() { $expected_settings = array( 'name' => $settings['name'], 'slug' => 'open-sans-2', - 'fontFamily' => $settings['fontFamily'], + 'fontFamily' => '"Open Sans", "Noto Sans", sans-serif', 'preview' => $settings['preview'], ); $this->assertSame( $expected_settings, $data['font_family_settings'], 'The response font_family_settings should match expected settings.' ); From 9173f8baa965a0d21e328cdd551e803842f5b783 Mon Sep 17 00:00:00 2001 From: Colin Stewart Date: Tue, 20 Feb 2024 07:25:38 +0000 Subject: [PATCH 020/251] Plugin Dependencies: Remove auto-deactivation and bootstrapping logic. Automatic deactivation of dependents with unmet dependencies requires a write operation to the database. This was performed during Core's bootstrap, which risked the database and cache becoming out-of-sync on sites with heavy traffic. No longer loading plugins that have unmet requirements has not had a final approach decided core-wide, and is still in discussion in #60491 to be handled in a future release. The `plugin_data` option, used to persistently store plugin data for detecting unmet dependencies during Core's bootstrap, is no longer needed. Follow-up to [57545], [57592], [57606], [57617]. Props dd32, azaozz, swissspidy, desrosj, afragen, pbiron, zunaid321, costdev. Fixes #60457. See #60491, #60510, #60518. git-svn-id: https://develop.svn.wordpress.org/trunk@57658 602fd350-edb4-49c9-b593-d223f7449a82 --- .../includes/class-plugin-upgrader.php | 17 +- src/wp-admin/includes/plugin-install.php | 2 +- src/wp-admin/includes/plugin.php | 17 +- src/wp-admin/plugin-install.php | 2 +- src/wp-admin/plugins.php | 3 +- .../class-wp-plugin-dependencies.php | 149 +++-------------- src/wp-settings.php | 99 +---------- .../tests/admin/plugin-dependencies/base.php | 7 +- .../getDependencyFilepath.php | 24 +++ .../hasCircularDependency.php | 38 +++++ .../admin/plugin-dependencies/initialize.php | 157 +++++++----------- 11 files changed, 163 insertions(+), 352 deletions(-) diff --git a/src/wp-admin/includes/class-plugin-upgrader.php b/src/wp-admin/includes/class-plugin-upgrader.php index 97343fcf9ded8..091cfebc188ff 100644 --- a/src/wp-admin/includes/class-plugin-upgrader.php +++ b/src/wp-admin/includes/class-plugin-upgrader.php @@ -155,12 +155,6 @@ public function install( $package, $args = array() ) { // Force refresh of plugin update information. wp_clean_plugins_cache( $parsed_args['clear_update_cache'] ); - $all_plugin_data = get_option( 'plugin_data', array() ); - $plugin_file = $this->new_plugin_data['file']; - unset( $this->new_plugin_data['file'] ); - $all_plugin_data[ $plugin_file ] = $this->new_plugin_data; - update_option( 'plugin_data', $all_plugin_data ); - if ( $parsed_args['overwrite_package'] ) { /** * Fires when the upgrader has successfully overwritten a currently installed @@ -488,16 +482,7 @@ public function check_package( $source ) { foreach ( $files as $file ) { $info = get_plugin_data( $file, false, false ); if ( ! empty( $info['Name'] ) ) { - $basename = basename( $file ); - $dirname = basename( dirname( $file ) ); - - if ( '.' === $dirname ) { - $plugin_file = $basename; - } else { - $plugin_file = "$dirname/$basename"; - } - $this->new_plugin_data = ( $info ); - $this->new_plugin_data['file'] = $plugin_file; + $this->new_plugin_data = $info; break; } } diff --git a/src/wp-admin/includes/plugin-install.php b/src/wp-admin/includes/plugin-install.php index 2de2aabbc3a01..2399ffc807c63 100644 --- a/src/wp-admin/includes/plugin-install.php +++ b/src/wp-admin/includes/plugin-install.php @@ -927,7 +927,7 @@ function wp_get_plugin_action_button( $name, $data, $compatible_php, $compatible // Determine the status of plugin dependencies. $installed_plugins = get_plugins(); - $active_plugins = get_option( 'active_plugins' ); + $active_plugins = get_option( 'active_plugins', array() ); $plugin_dependencies_count = count( $requires_plugins ); $installed_plugin_dependencies_count = 0; $active_plugin_dependencies_count = 0; diff --git a/src/wp-admin/includes/plugin.php b/src/wp-admin/includes/plugin.php index fa3fa09f09dd3..680f4a77284a9 100644 --- a/src/wp-admin/includes/plugin.php +++ b/src/wp-admin/includes/plugin.php @@ -333,7 +333,6 @@ function get_plugins( $plugin_folder = '' ) { return $wp_plugins; } - $new_plugin_data = array(); foreach ( $plugin_files as $plugin_file ) { if ( ! is_readable( "$plugin_root/$plugin_file" ) ) { continue; @@ -346,13 +345,6 @@ function get_plugins( $plugin_folder = '' ) { continue; } - $new_plugin_file = str_replace( - trailingslashit( WP_PLUGIN_DIR ), - '', - "$plugin_root/$plugin_file" - ); - - $new_plugin_data[ $new_plugin_file ] = $plugin_data; $wp_plugins[ plugin_basename( $plugin_file ) ] = $plugin_data; } @@ -361,10 +353,6 @@ function get_plugins( $plugin_folder = '' ) { $cache_plugins[ $plugin_folder ] = $wp_plugins; wp_cache_set( 'plugins', $cache_plugins, 'plugins' ); - if ( ! wp_installing() ) { - update_option( 'plugin_data', $new_plugin_data ); - } - return $wp_plugins; } @@ -975,7 +963,6 @@ function delete_plugins( $plugins, $deprecated = '' ) { $plugins_dir = trailingslashit( $plugins_dir ); $plugin_translations = wp_get_installed_translations( 'plugins' ); - $all_plugin_data = get_option( 'plugin_data', array() ); $errors = array(); @@ -1020,7 +1007,6 @@ function delete_plugins( $plugins, $deprecated = '' ) { $errors[] = $plugin_file; continue; } - unset( $all_plugin_data[ $plugin_file ] ); $plugin_slug = dirname( $plugin_file ); @@ -1069,7 +1055,6 @@ function delete_plugins( $plugins, $deprecated = '' ) { return new WP_Error( 'could_not_remove_plugin', sprintf( $message, implode( ', ', $errors ) ) ); } - update_option( 'plugin_data', $all_plugin_data ); return true; } @@ -1214,6 +1199,8 @@ function validate_plugin_requirements( $plugin ) { ); } + WP_Plugin_Dependencies::initialize(); + if ( WP_Plugin_Dependencies::has_unmet_dependencies( $plugin ) ) { $dependencies = WP_Plugin_Dependencies::get_dependencies( $plugin ); $unmet_dependencies = array(); diff --git a/src/wp-admin/plugin-install.php b/src/wp-admin/plugin-install.php index a8beb8249bbc7..5c8be143bf332 100644 --- a/src/wp-admin/plugin-install.php +++ b/src/wp-admin/plugin-install.php @@ -135,8 +135,8 @@ */ require_once ABSPATH . 'wp-admin/admin-header.php'; +WP_Plugin_Dependencies::initialize(); WP_Plugin_Dependencies::display_admin_notice_for_unmet_dependencies(); -WP_Plugin_Dependencies::display_admin_notice_for_deactivated_dependents(); WP_Plugin_Dependencies::display_admin_notice_for_circular_dependencies(); ?>
"> diff --git a/src/wp-admin/plugins.php b/src/wp-admin/plugins.php index 5c9f72328374e..e8f1074a71b2b 100644 --- a/src/wp-admin/plugins.php +++ b/src/wp-admin/plugins.php @@ -40,6 +40,8 @@ wp_enqueue_script( 'updates' ); +WP_Plugin_Dependencies::initialize(); + if ( $action ) { switch ( $action ) { @@ -741,7 +743,6 @@ ?> -

diff --git a/src/wp-includes/class-wp-plugin-dependencies.php b/src/wp-includes/class-wp-plugin-dependencies.php index d7332b4186f93..b0ad17faea767 100644 --- a/src/wp-includes/class-wp-plugin-dependencies.php +++ b/src/wp-includes/class-wp-plugin-dependencies.php @@ -105,15 +105,25 @@ class WP_Plugin_Dependencies { protected static $circular_dependencies_slugs; /** - * Initializes by fetching plugin header and plugin API data, - * and deactivating dependents with unmet dependencies. + * Whether Plugin Dependencies have been initialized. + * + * @since 6.5.0 + * + * @var bool + */ + protected static $initialized = false; + + /** + * Initializes by fetching plugin header and plugin API data. * * @since 6.5.0 */ public static function initialize() { - self::read_dependencies_from_plugin_headers(); - self::get_dependency_api_data(); - self::deactivate_dependents_with_unmet_dependencies(); + if ( false === self::$initialized ) { + self::read_dependencies_from_plugin_headers(); + self::get_dependency_api_data(); + self::$initialized = true; + } } /** @@ -125,7 +135,7 @@ public static function initialize() { * @return bool Whether the plugin has plugins that depend on it. */ public static function has_dependents( $plugin_file ) { - return in_array( self::convert_to_slug( $plugin_file ), self::$dependency_slugs, true ); + return in_array( self::convert_to_slug( $plugin_file ), (array) self::$dependency_slugs, true ); } /** @@ -172,7 +182,7 @@ public static function has_active_dependents( $plugin_file ) { public static function get_dependents( $slug ) { $dependents = array(); - foreach ( self::$dependencies as $dependent => $dependencies ) { + foreach ( (array) self::$dependencies as $dependent => $dependencies ) { if ( in_array( $slug, $dependencies, true ) ) { $dependents[] = $dependent; } @@ -368,36 +378,6 @@ public static function display_admin_notice_for_unmet_dependencies() { } } - /** - * Displays an admin notice if dependencies have been deactivated. - * - * @since 6.5.0 - */ - public static function display_admin_notice_for_deactivated_dependents() { - /* - * Plugin deactivated if dependencies not met. - * Transient on a 10 second timeout. - */ - $deactivate_requires = get_site_transient( 'wp_plugin_dependencies_deactivated_plugins' ); - if ( ! empty( $deactivate_requires ) ) { - $deactivated_plugins = ''; - foreach ( $deactivate_requires as $deactivated ) { - $deactivated_plugins .= '
  • ' . esc_html( self::$plugins[ $deactivated ]['Name'] ) . '
  • '; - } - wp_admin_notice( - sprintf( - /* translators: 1: plugin names */ - __( 'The following plugin(s) have been deactivated due to uninstalled or inactive dependencies: %s' ), - "
      $deactivated_plugins
    " - ), - array( - 'type' => 'error', - 'dismissible' => true, - ) - ); - } - } - /** * Displays an admin notice if circular dependencies are installed. * @@ -543,14 +523,8 @@ protected static function get_plugins() { return self::$plugins; } - $all_plugin_data = get_option( 'plugin_data', array() ); - - if ( empty( $all_plugin_data ) ) { - require_once ABSPATH . '/wp-admin/includes/plugin.php'; - $all_plugin_data = get_plugins(); - } - - self::$plugins = $all_plugin_data; + require_once ABSPATH . '/wp-admin/includes/plugin.php'; + self::$plugins = get_plugins(); return self::$plugins; } @@ -620,83 +594,6 @@ protected static function sanitize_dependency_slugs( $slugs ) { return $sanitized_slugs; } - /** - * Gets plugin filepaths for active plugins that depend on the dependency. - * - * Recurses for each dependent that is also a dependency. - * - * @param string $plugin_file The dependency's filepath, relative to the plugin directory. - * @return string[] An array of active dependent plugin filepaths, relative to the plugin directory. - */ - protected static function get_active_dependents_in_dependency_tree( $plugin_file ) { - $all_dependents = array(); - $dependents = self::get_dependents( self::convert_to_slug( $plugin_file ) ); - - if ( empty( $dependents ) ) { - return $all_dependents; - } - - require_once ABSPATH . '/wp-admin/includes/plugin.php'; - foreach ( $dependents as $dependent ) { - if ( is_plugin_active( $dependent ) ) { - $all_dependents[] = $dependent; - $all_dependents = array_merge( - $all_dependents, - self::get_active_dependents_in_dependency_tree( $dependent ) - ); - } - } - - return $all_dependents; - } - - /** - * Deactivates dependent plugins with unmet dependencies. - * - * @since 6.5.0 - */ - protected static function deactivate_dependents_with_unmet_dependencies() { - $dependents_to_deactivate = array(); - $circular_dependencies = array_reduce( - self::get_circular_dependencies(), - function ( $all_circular, $circular_pair ) { - return array_merge( $all_circular, $circular_pair ); - }, - array() - ); - - require_once ABSPATH . '/wp-admin/includes/plugin.php'; - foreach ( self::$dependencies as $dependent => $dependencies ) { - // Skip dependents that are no longer installed or aren't active. - if ( ! array_key_exists( $dependent, self::$plugins ) || is_plugin_inactive( $dependent ) ) { - continue; - } - - // Skip plugins within a circular dependency tree or plugins that have no unmet dependencies. - if ( in_array( $dependent, $circular_dependencies, true ) || ! self::has_unmet_dependencies( $dependent ) ) { - continue; - } - - $dependents_to_deactivate[] = $dependent; - - // Also add any plugins that rely on any of this plugin's dependents. - $dependents_to_deactivate = array_merge( - $dependents_to_deactivate, - self::get_active_dependents_in_dependency_tree( $dependent ) - ); - } - - // Bail early if there are no dependents to deactivate. - if ( empty( $dependents_to_deactivate ) ) { - return; - } - - $dependents_to_deactivate = array_unique( $dependents_to_deactivate ); - - deactivate_plugins( $dependents_to_deactivate ); - set_site_transient( 'wp_plugin_dependencies_deactivated_plugins', $dependents_to_deactivate, 10 ); - } - /** * Gets the filepath of installed dependencies. * If a dependency is not installed, the filepath defaults to false. @@ -710,6 +607,10 @@ protected static function get_dependency_filepaths() { return self::$dependency_filepaths; } + if ( null === self::$dependency_slugs ) { + return array(); + } + self::$dependency_filepaths = array(); $plugin_dirnames = self::get_plugin_dirnames(); @@ -846,6 +747,10 @@ protected static function get_circular_dependencies() { return self::$circular_dependencies_pairs; } + if ( null === self::$dependencies ) { + return array(); + } + self::$circular_dependencies_slugs = array(); self::$circular_dependencies_pairs = array(); diff --git a/src/wp-settings.php b/src/wp-settings.php index 2772568dee824..fe2aef2479349 100644 --- a/src/wp-settings.php +++ b/src/wp-settings.php @@ -388,6 +388,7 @@ require ABSPATH . WPINC . '/interactivity-api/class-wp-interactivity-api.php'; require ABSPATH . WPINC . '/interactivity-api/class-wp-interactivity-api-directives-processor.php'; require ABSPATH . WPINC . '/interactivity-api/interactivity-api.php'; +require ABSPATH . WPINC . '/class-wp-plugin-dependencies.php'; wp_script_modules()->add_hooks(); wp_interactivity()->add_hooks(); @@ -419,12 +420,6 @@ $GLOBALS['wp_plugin_paths'] = array(); -// Load and initialize WP_Plugin_Dependencies. -require_once ABSPATH . WPINC . '/class-wp-plugin-dependencies.php'; -if ( ! defined( 'WP_RUN_CORE_TESTS' ) ) { - WP_Plugin_Dependencies::initialize(); -} - // Load must-use plugins. foreach ( wp_get_mu_plugins() as $mu_plugin ) { $_wp_plugin_file = $mu_plugin; @@ -499,85 +494,7 @@ } // Load active plugins. -$all_plugin_data = get_option( 'plugin_data', array() ); -$failed_plugins = array(); -$plugins_dir_strlen = strlen( trailingslashit( WP_PLUGIN_DIR ) ); foreach ( wp_get_active_and_valid_plugins() as $plugin ) { - $plugin_file = substr( $plugin, $plugins_dir_strlen ); - - /* - * Skip any plugins that have not been added to the 'plugin_data' option yet. - * - * Some plugin files may be added locally and activated, but will not yet be - * added to the 'plugin_data' option. This causes the 'active_plugins' option - * and the 'plugin_data' option to be temporarily out of sync until the next - * call to `get_plugins()`. - */ - if ( isset( $all_plugin_data[ $plugin_file ] ) ) { - $plugin_headers = $all_plugin_data[ $plugin_file ]; - $errors = array(); - $requirements = array( - 'requires' => ! empty( $plugin_headers['RequiresWP'] ) ? $plugin_headers['RequiresWP'] : '', - 'requires_php' => ! empty( $plugin_headers['RequiresPHP'] ) ? $plugin_headers['RequiresPHP'] : '', - ); - $compatible_wp = is_wp_version_compatible( $requirements['requires'] ); - $compatible_php = is_php_version_compatible( $requirements['requires_php'] ); - - $php_update_message = '

    ' . sprintf( - /* translators: %s: URL to Update PHP page. */ - __( 'Learn more about updating PHP.' ), - esc_url( wp_get_update_php_url() ) - ); - - $annotation = wp_get_update_php_annotation(); - - if ( $annotation ) { - $php_update_message .= '

    ' . $annotation . ''; - } - - if ( ! $compatible_wp && ! $compatible_php ) { - $errors[] = sprintf( - /* translators: 1: Current WordPress version, 2: Current PHP version, 3: Plugin name, 4: Required WordPress version, 5: Required PHP version. */ - _x( 'Error: Current versions of WordPress (%1$s) and PHP (%2$s) do not meet minimum requirements for %3$s. The plugin requires WordPress %4$s and PHP %5$s.', 'plugin' ), - get_bloginfo( 'version' ), - PHP_VERSION, - $plugin_headers['Name'], - $requirements['requires'], - $requirements['requires_php'] - ) . $php_update_message; - } elseif ( ! $compatible_php ) { - $errors[] = sprintf( - /* translators: 1: Current PHP version, 2: Plugin name, 3: Required PHP version. */ - _x( 'Error: Current PHP version (%1$s) does not meet minimum requirements for %2$s. The plugin requires PHP %3$s.', 'plugin' ), - PHP_VERSION, - $plugin_headers['Name'], - $requirements['requires_php'] - ) . $php_update_message; - } elseif ( ! $compatible_wp ) { - $errors[] = sprintf( - /* translators: 1: Current WordPress version, 2: Plugin name, 3: Required WordPress version. */ - _x( 'Error: Current WordPress version (%1$s) does not meet minimum requirements for %2$s. The plugin requires WordPress %3$s.', 'plugin' ), - get_bloginfo( 'version' ), - $plugin_headers['Name'], - $requirements['requires'] - ); - } - - if ( ! empty( $errors ) ) { - $failed_plugins[ $plugin_file ] = ''; - foreach ( $errors as $error ) { - $failed_plugins[ $plugin_file ] .= wp_get_admin_notice( - $error, - array( - 'type' => 'error', - 'dismissible' => true, - ) - ); - } - continue; - } - } - wp_register_plugin_realpath( $plugin ); $_wp_plugin_file = $plugin; @@ -595,20 +512,6 @@ } unset( $plugin, $_wp_plugin_file ); -if ( ! empty( $failed_plugins ) ) { - add_action( - 'admin_notices', - function () use ( $failed_plugins ) { - global $pagenow; - - if ( 'index.php' === $pagenow || 'plugins.php' === $pagenow ) { - echo implode( '', $failed_plugins ); - } - } - ); -} -unset( $failed_plugins ); - // Load pluggable functions. require ABSPATH . WPINC . '/pluggable.php'; require ABSPATH . WPINC . '/pluggable-deprecated.php'; diff --git a/tests/phpunit/tests/admin/plugin-dependencies/base.php b/tests/phpunit/tests/admin/plugin-dependencies/base.php index a35ed6f0967a3..a827b4b1e7451 100644 --- a/tests/phpunit/tests/admin/plugin-dependencies/base.php +++ b/tests/phpunit/tests/admin/plugin-dependencies/base.php @@ -32,6 +32,7 @@ abstract class WP_PluginDependencies_UnitTestCase extends WP_UnitTestCase { 'dependency_filepaths' => null, 'circular_dependencies_pairs' => null, 'circular_dependencies_slugs' => null, + 'initialized' => false, ); /** @@ -62,12 +63,12 @@ public static function tear_down_after_class() { /** * Resets all static properties to a default value after each test. */ - public function set_up() { - parent::set_up(); - + public function tear_down() { foreach ( self::$static_properties as $name => $default_value ) { $this->set_property_value( $name, $default_value ); } + + parent::tear_down(); } /** diff --git a/tests/phpunit/tests/admin/plugin-dependencies/getDependencyFilepath.php b/tests/phpunit/tests/admin/plugin-dependencies/getDependencyFilepath.php index 473609f0fb2b7..04b4948e63f72 100644 --- a/tests/phpunit/tests/admin/plugin-dependencies/getDependencyFilepath.php +++ b/tests/phpunit/tests/admin/plugin-dependencies/getDependencyFilepath.php @@ -17,6 +17,30 @@ */ class Tests_Admin_WPPluginDependencies_GetDependencyFilepath extends WP_PluginDependencies_UnitTestCase { + /** + * Tests that false is returned if Plugin Dependencies has not been initialized. + * + * @ticket 60457 + */ + public function test_should_return_false_before_initialization() { + // Ensure Plugin Dependencies has not been initialized. + $this->assertFalse( + $this->get_property_value( 'initialized' ), + 'Plugin Dependencies has been initialized.' + ); + + $this->assertSame( + self::$static_properties['dependency_slugs'], + $this->get_property_value( 'dependency_slugs' ), + '"dependency_slugs" was not set to its default value.' + ); + + $this->assertFalse( + self::$instance->get_dependency_filepath( 'dependency' ), + 'false was not returned before initialization.' + ); + } + /** * Tests that the expected dependency filepaths are retrieved for installed dependencies. * diff --git a/tests/phpunit/tests/admin/plugin-dependencies/hasCircularDependency.php b/tests/phpunit/tests/admin/plugin-dependencies/hasCircularDependency.php index 7e86303c5f956..10d00d96b7637 100644 --- a/tests/phpunit/tests/admin/plugin-dependencies/hasCircularDependency.php +++ b/tests/phpunit/tests/admin/plugin-dependencies/hasCircularDependency.php @@ -17,6 +17,44 @@ */ class Tests_Admin_WPPluginDependencies_HasCircularDependency extends WP_PluginDependencies_UnitTestCase { + /** + * Tests that false is returned if Plugin Dependencies has not been initialized. + * + * @ticket 60457 + */ + public function test_should_return_false_before_initialization() { + $this->set_property_value( + 'plugins', + array( + 'dependent/dependent.php' => array( + 'Name' => 'Dependent', + 'RequiresPlugins' => 'dependency', + ), + 'dependency/dependency.php' => array( + 'Name' => 'Dependency', + 'RequiresPlugins' => 'dependent', + ), + ) + ); + + // Ensure Plugin Dependencies has not been initialized. + $this->assertFalse( + $this->get_property_value( 'initialized' ), + 'Plugin Dependencies has been initialized.' + ); + + $this->assertSame( + self::$static_properties['circular_dependencies_slugs'], + $this->get_property_value( 'circular_dependencies_slugs' ), + '"circular_dependencies_slugs" was not set to its default value.' + ); + + $this->assertFalse( + self::$instance->has_circular_dependency( 'dependency' ), + 'false was not returned before initialization.' + ); + } + /** * Tests that a plugin with a circular dependency will return true. * diff --git a/tests/phpunit/tests/admin/plugin-dependencies/initialize.php b/tests/phpunit/tests/admin/plugin-dependencies/initialize.php index fe15cd218821a..375e30c4bd6e2 100644 --- a/tests/phpunit/tests/admin/plugin-dependencies/initialize.php +++ b/tests/phpunit/tests/admin/plugin-dependencies/initialize.php @@ -15,6 +15,68 @@ */ class Tests_Admin_WPPluginDependencies_Initialize extends WP_PluginDependencies_UnitTestCase { + /** + * Tests that initialization runs only once. + * + * @ticket 60457 + * + * @dataProvider data_static_properties_set_during_initialization + * + * @param string $property_name The name of the property to check. + */ + public function test_should_only_initialize_once( $property_name ) { + $this->assertFalse( + $this->get_property_value( 'initialized' ), + 'Plugin Dependencies has already been initialized.' + ); + + self::$instance->initialize(); + + $this->assertTrue( + $this->get_property_value( 'initialized' ), + '"initialized" was not set to true during initialization.' + ); + + $default_value = self::$static_properties[ $property_name ]; + + $this->assertNotSame( + $default_value, + $this->get_property_value( $property_name ), + "\"{$property_name}\" was not set during initialization." + ); + + // Reset it to its default. + $this->set_property_value( $property_name, self::$static_properties[ $property_name ] ); + + self::$instance->initialize(); + + $this->assertSame( + $default_value, + $this->get_property_value( $property_name ), + "\"{$property_name}\" was set during the second initialization attempt." + ); + } + + /** + * Data provider. + * + * @return array[] + */ + public function data_static_properties_set_during_initialization() { + /* + * This does not include 'dependency_api_data' as it is only set + * on certain pages. This is tested later. + */ + return self::text_array_to_dataprovider( + array( + 'plugins', + 'dependencies', + 'dependency_slugs', + 'dependent_slugs', + ) + ); + } + /** * Tests that `$dependency_api_data` is set on certain screens. * @@ -238,99 +300,4 @@ public function test_should_slugify_dependent_files() { self::$instance->initialize(); $this->assertSame( $expected_slugs, $this->get_property_value( 'dependent_slugs' ) ); } - - /** - * Tests that dependents with unmet dependencies are deactivated. - * - * @ticket 22316 - * - * @covers WP_Plugin_Dependencies::deactivate_dependents_with_unmet_dependencies - * @covers WP_Plugin_Dependencies::has_unmet_dependencies - * @covers WP_Plugin_Dependencies::get_active_dependents_in_dependency_tree - * - * @dataProvider data_should_only_deactivate_dependents_with_unmet_dependencies - * - * @param array $active_plugins An array of active plugin paths. - * @param array $plugins An array of installed plugins. - * @param array $expected The expected value of 'active_plugins' after initialization. - */ - public function test_should_deactivate_dependents_with_uninstalled_dependencies( $active_plugins, $plugins, $expected ) { - update_option( 'active_plugins', $active_plugins ); - - $this->set_property_value( 'plugins', $plugins ); - self::$instance::initialize(); - - $this->assertSame( $expected, array_values( get_option( 'active_plugins', array() ) ) ); - } - - /** - * Data provider. - * - * @return array[] - */ - public function data_should_only_deactivate_dependents_with_unmet_dependencies() { - return array( - 'a dependent with an uninstalled dependency' => array( - 'active_plugins' => array( 'dependent/dependent.php' ), - 'plugins' => array( - 'dependent/dependent.php' => array( 'RequiresPlugins' => 'dependency' ), - ), - 'expected' => array(), - ), - 'a dependent with an inactive dependency' => array( - 'active_plugins' => array( 'dependent/dependent.php' ), - 'plugins' => array( - 'dependent/dependent.php' => array( 'RequiresPlugins' => 'dependency' ), - 'dependency/dependency.php' => array( 'RequiresPlugins' => '' ), - ), - 'expected' => array(), - ), - 'a dependent with two dependencies, one uninstalled, one inactive' => array( - 'active_plugins' => array( 'dependent/dependent.php' ), - 'plugins' => array( - 'dependent/dependent.php' => array( 'RequiresPlugins' => 'dependency, dependency2' ), - 'dependency2/dependency2.php' => array( 'RequiresPlugins' => '' ), - ), - 'expected' => array(), - ), - 'a dependent with a dependency that is installed and active' => array( - 'active_plugins' => array( 'dependent/dependent.php', 'dependency/dependency.php' ), - 'plugins' => array( - 'dependent/dependent.php' => array( 'RequiresPlugins' => 'dependency' ), - 'dependency/dependency.php' => array( 'RequiresPlugins' => '' ), - ), - 'expected' => array( 'dependent/dependent.php', 'dependency/dependency.php' ), - ), - 'one dependent with two dependencies that are installed and active' => array( - 'active_plugins' => array( - 'dependent/dependent.php', - 'dependency/dependency.php', - 'dependency2/dependency2.php', - ), - 'plugins' => array( - 'dependent/dependent.php' => array( 'RequiresPlugins' => 'dependency, dependency2' ), - 'dependency/dependency.php' => array( 'RequiresPlugins' => '' ), - 'dependency2/dependency2.php' => array( 'RequiresPlugins' => '' ), - ), - 'expected' => array( - 'dependent/dependent.php', - 'dependency/dependency.php', - 'dependency2/dependency2.php', - ), - ), - 'two dependents, one with an uninstalled dependency, and one with an active dependency' => array( - 'active_plugins' => array( - 'dependent/dependent.php', - 'dependent2/dependent2.php', - 'dependency2/dependency2.php', - ), - 'plugins' => array( - 'dependent/dependent.php' => array( 'RequiresPlugins' => 'dependency' ), - 'dependent2/dependent2.php' => array( 'RequiresPlugins' => 'dependency2' ), - 'dependency2/dependency2.php' => array( 'RequiresPlugins' => '' ), - ), - 'expected' => array( 'dependent2/dependent2.php', 'dependency2/dependency2.php' ), - ), - ); - } } From 51f0dd6bd8f89ffd1ce8774e42c4572812da0a1b Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Tue, 20 Feb 2024 09:08:10 +0000 Subject: [PATCH 021/251] REST API: Pass correct context to embedded items. Fixes a regression introduced in [57623] where navigation embed items were missing `raw` property values. Props mamaduka, swissspidy, youknowriad, timothyblynjacobs. Fixes #43439. git-svn-id: https://develop.svn.wordpress.org/trunk@57659 602fd350-edb4-49c9-b593-d223f7449a82 --- .../rest-api/class-wp-rest-server.php | 10 +++---- .../rest-navigation-fallback-controller.php | 26 ++++++------------- 2 files changed, 13 insertions(+), 23 deletions(-) diff --git a/src/wp-includes/rest-api/class-wp-rest-server.php b/src/wp-includes/rest-api/class-wp-rest-server.php index 380eea2ca326f..b85c020b0f112 100644 --- a/src/wp-includes/rest-api/class-wp-rest-server.php +++ b/src/wp-includes/rest-api/class-wp-rest-server.php @@ -743,6 +743,11 @@ protected function embed_links( $data, $embed = true ) { continue; } + // Embedded resources get passed context=embed. + if ( empty( $request['context'] ) ) { + $request['context'] = 'embed'; + } + if ( empty( $request['per_page'] ) ) { $matched = $this->match_request_to_handler( $request ); if ( ! is_wp_error( $matched ) && isset( $matched[1]['args']['per_page']['maximum'] ) ) { @@ -750,11 +755,6 @@ protected function embed_links( $data, $embed = true ) { } } - // Embedded resources get passed context=embed. - if ( empty( $request['context'] ) ) { - $request['context'] = 'embed'; - } - $response = $this->dispatch( $request ); /** This filter is documented in wp-includes/rest-api/class-wp-rest-server.php */ diff --git a/tests/phpunit/tests/rest-api/rest-navigation-fallback-controller.php b/tests/phpunit/tests/rest-api/rest-navigation-fallback-controller.php index b8d7c25c32fe7..3be0bba59f26f 100644 --- a/tests/phpunit/tests/rest-api/rest-navigation-fallback-controller.php +++ b/tests/phpunit/tests/rest-api/rest-navigation-fallback-controller.php @@ -160,30 +160,20 @@ public function test_embedded_navigation_post_contains_required_fields() { // First we'll use the navigation fallback to get a link to the navigation endpoint. $request = new WP_REST_Request( 'GET', '/wp-block-editor/v1/navigation-fallback' ); $response = rest_get_server()->dispatch( $request ); - $links = $response->get_links(); - - // Extract the navigation endpoint URL from the response. - $embedded_navigation_href = $links['self'][0]['href']; - preg_match( '/\?rest_route=(.*)/', $embedded_navigation_href, $matches ); - $navigation_endpoint = $matches[1]; - - // Fetch the "linked" navigation post from the endpoint, with the context parameter set to 'embed' to simulate fetching embedded links. - $request = new WP_REST_Request( 'GET', $navigation_endpoint ); - $request->set_param( 'context', 'embed' ); - $response = rest_get_server()->dispatch( $request ); - $data = $response->get_data(); + $data = rest_get_server()->response_to_data( $response, true ); + $embedded = $data['_embedded']['self'][0]; // Verify that the additional status field is present. - $this->assertArrayHasKey( 'status', $data, 'Response title should contain a "status" field.' ); + $this->assertArrayHasKey( 'status', $embedded, 'Response title should contain a "status" field.' ); // Verify that the additional content fields are present. - $this->assertArrayHasKey( 'content', $data, 'Response should contain a "content" field.' ); - $this->assertArrayHasKey( 'raw', $data['content'], 'Response content should contain a "raw" field.' ); - $this->assertArrayHasKey( 'rendered', $data['content'], 'Response content should contain a "rendered" field.' ); - $this->assertArrayHasKey( 'block_version', $data['content'], 'Response should contain a "block_version" field.' ); + $this->assertArrayHasKey( 'content', $embedded, 'Response should contain a "content" field.' ); + $this->assertArrayHasKey( 'raw', $embedded['content'], 'Response content should contain a "raw" field.' ); + $this->assertArrayHasKey( 'rendered', $embedded['content'], 'Response content should contain a "rendered" field.' ); + $this->assertArrayHasKey( 'block_version', $embedded['content'], 'Response should contain a "block_version" field.' ); // Verify that the additional title.raw field is present. - $this->assertArrayHasKey( 'raw', $data['title'], 'Response title should contain a "raw" key.' ); + $this->assertArrayHasKey( 'raw', $embedded['title'], 'Response title should contain a "raw" key.' ); } private function get_navigations_in_database() { From 1280d7a3b52102af0fa920c1e049b6600bc2ad3b Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Tue, 20 Feb 2024 09:25:09 +0000 Subject: [PATCH 022/251] Block Hooks: Introduce a new `hooked_block` filter. This is a counterpart to the dynamic `hooked_block_{$block_type}` filter introduced in [57354], which makes it easier to modify all hooked blocks prior to insertion. Also adds the hooked block type as an additional argument to both filters for consistency. Props bernhard-reiter, swissspidy. Fixes #60574. git-svn-id: https://develop.svn.wordpress.org/trunk@57660 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/blocks.php | 21 ++++++++++++++++--- .../tests/blocks/insertHookedBlocks.php | 8 +++---- 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/src/wp-includes/blocks.php b/src/wp-includes/blocks.php index 7931061086065..81207da795707 100644 --- a/src/wp-includes/blocks.php +++ b/src/wp-includes/blocks.php @@ -892,6 +892,20 @@ function insert_hooked_blocks( &$parsed_anchor_block, $relative_position, $hooke 'innerContent' => array(), ); + /** + * Filters the parsed block array for a given hooked block. + * + * @since 6.5.0 + * + * @param array $parsed_hooked_block The parsed block array for the given hooked block type. + * @param string $hooked_block_type The hooked block type name. + * @param string $relative_position The relative position of the hooked block. + * @param array $parsed_anchor_block The anchor block, in parsed block array format. + * @param WP_Block_Template|WP_Post|array $context The block template, template part, `wp_navigation` post type, + * or pattern that the anchor block belongs to. + */ + $parsed_hooked_block = apply_filters( 'hooked_block', $parsed_hooked_block, $hooked_block_type, $relative_position, $parsed_anchor_block, $context ); + /** * Filters the parsed block array for a given hooked block. * @@ -900,15 +914,16 @@ function insert_hooked_blocks( &$parsed_anchor_block, $relative_position, $hooke * @since 6.5.0 * * @param array $parsed_hooked_block The parsed block array for the given hooked block type. + * @param string $hooked_block_type The hooked block type name. * @param string $relative_position The relative position of the hooked block. * @param array $parsed_anchor_block The anchor block, in parsed block array format. * @param WP_Block_Template|WP_Post|array $context The block template, template part, `wp_navigation` post type, * or pattern that the anchor block belongs to. */ - $parsed_hooked_block = apply_filters( "hooked_block_{$hooked_block_type}", $parsed_hooked_block, $relative_position, $parsed_anchor_block, $context ); + $parsed_hooked_block = apply_filters( "hooked_block_{$hooked_block_type}", $parsed_hooked_block, $hooked_block_type, $relative_position, $parsed_anchor_block, $context ); - // It's possible that the `hooked_block_{$hooked_block_type}` filter returned a block of a different type, - // so we explicitly look for the original `$hooked_block_type` in the `ignoredHookedBlocks` metadata. + // It's possible that the filter returned a block of a different type, so we explicitly + // look for the original `$hooked_block_type` in the `ignoredHookedBlocks` metadata. if ( ! isset( $parsed_anchor_block['attrs']['metadata']['ignoredHookedBlocks'] ) || ! in_array( $hooked_block_type, $parsed_anchor_block['attrs']['metadata']['ignoredHookedBlocks'], true ) diff --git a/tests/phpunit/tests/blocks/insertHookedBlocks.php b/tests/phpunit/tests/blocks/insertHookedBlocks.php index 945466e61de8d..d4f5d1450213c 100644 --- a/tests/phpunit/tests/blocks/insertHookedBlocks.php +++ b/tests/phpunit/tests/blocks/insertHookedBlocks.php @@ -110,7 +110,7 @@ public function test_insert_hooked_blocks_filter_can_set_attributes() { 'innerContent' => array(), ); - $filter = function ( $parsed_hooked_block, $relative_position, $parsed_anchor_block ) { + $filter = function ( $parsed_hooked_block, $hooked_block_type, $relative_position, $parsed_anchor_block ) { // Is the hooked block adjacent to the anchor block? if ( 'before' !== $relative_position && 'after' !== $relative_position ) { return $parsed_hooked_block; @@ -124,9 +124,9 @@ public function test_insert_hooked_blocks_filter_can_set_attributes() { return $parsed_hooked_block; }; - add_filter( 'hooked_block_' . self::HOOKED_BLOCK_TYPE, $filter, 10, 3 ); + add_filter( 'hooked_block_' . self::HOOKED_BLOCK_TYPE, $filter, 10, 4 ); $actual = insert_hooked_blocks( $anchor_block, 'after', self::HOOKED_BLOCKS, array() ); - remove_filter( 'hooked_block_' . self::HOOKED_BLOCK_TYPE, $filter, 10, 3 ); + remove_filter( 'hooked_block_' . self::HOOKED_BLOCK_TYPE, $filter ); $this->assertSame( '', @@ -172,7 +172,7 @@ public function test_insert_hooked_blocks_filter_can_wrap_block() { }; add_filter( 'hooked_block_' . self::HOOKED_BLOCK_TYPE, $filter, 10, 3 ); $actual = insert_hooked_blocks( $anchor_block, 'after', self::HOOKED_BLOCKS, array() ); - remove_filter( 'hooked_block_' . self::HOOKED_BLOCK_TYPE, $filter, 10, 3 ); + remove_filter( 'hooked_block_' . self::HOOKED_BLOCK_TYPE, $filter ); $this->assertSame( '

    ', From 977653e0f92b3e1236b35870285ed618f793b9ff Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Tue, 20 Feb 2024 09:41:48 +0000 Subject: [PATCH 023/251] Script Loader: Add hooks for script modules and interactivity API only on `after_setup_theme`. Ensures that `wp_is_block_theme()` is not called too early before the themes are fully setup. This addresses an issue where a parent theme was mistakenly marked as being missing. Props scruffian, youknowriad, swissspidy, poena, dennysdionigi, bgardner, westonruter. Fixes #60411. git-svn-id: https://develop.svn.wordpress.org/trunk@57661 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-settings.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-settings.php b/src/wp-settings.php index fe2aef2479349..a341cbccdb2c0 100644 --- a/src/wp-settings.php +++ b/src/wp-settings.php @@ -390,8 +390,8 @@ require ABSPATH . WPINC . '/interactivity-api/interactivity-api.php'; require ABSPATH . WPINC . '/class-wp-plugin-dependencies.php'; -wp_script_modules()->add_hooks(); -wp_interactivity()->add_hooks(); +add_action( 'after_setup_theme', array( wp_script_modules(), 'add_hooks' ) ); +add_action( 'after_setup_theme', array( wp_interactivity(), 'add_hooks' ) ); $GLOBALS['wp_embed'] = new WP_Embed(); From 18b21c34c80d86e835caa0b1fa6022c60ec95a67 Mon Sep 17 00:00:00 2001 From: Riad Benguella Date: Tue, 20 Feb 2024 09:53:11 +0000 Subject: [PATCH 024/251] Tests: Synchronize Theme.JSON unit test between Core and Gutenberg. Merges the changes from Core and Gutenberg for the following tests: - WP_REST_Global_Styles_Controller_Test - Tests_Theme_wpThemeJsonResolver - Tests_Theme_wpThemeJsonSchema - Tests_Theme_wpThemeJson This will help ensure the stability of the theme.json style generation. Props ajlende, scruffian, aaronrobertshaw, get_dave, youknowriad. Fixes #60387. git-svn-id: https://develop.svn.wordpress.org/trunk@57662 602fd350-edb4-49c9-b593-d223f7449a82 --- .../block-theme-child/styles/variation-a.json | 18 + .../themedir1/block-theme-child/theme.json | 2 +- .../block-theme/styles/variation-a.json | 18 + .../data/themedir1/block-theme/theme.json | 14 +- .../rest-global-styles-controller.php | 236 +-- tests/phpunit/tests/theme/wpThemeJson.php | 1472 +++++++++-------- .../tests/theme/wpThemeJsonResolver.php | 95 +- .../phpunit/tests/theme/wpThemeJsonSchema.php | 9 +- 8 files changed, 1029 insertions(+), 835 deletions(-) create mode 100644 tests/phpunit/data/themedir1/block-theme-child/styles/variation-a.json create mode 100644 tests/phpunit/data/themedir1/block-theme/styles/variation-a.json diff --git a/tests/phpunit/data/themedir1/block-theme-child/styles/variation-a.json b/tests/phpunit/data/themedir1/block-theme-child/styles/variation-a.json new file mode 100644 index 0000000000000..a9d5ade894692 --- /dev/null +++ b/tests/phpunit/data/themedir1/block-theme-child/styles/variation-a.json @@ -0,0 +1,18 @@ +{ + "version": 2, + "settings": { + "blocks": { + "core/paragraph": { + "color": { + "palette": [ + { + "slug": "dark", + "name": "Dark", + "color": "#010101" + } + ] + } + } + } + } +} diff --git a/tests/phpunit/data/themedir1/block-theme-child/theme.json b/tests/phpunit/data/themedir1/block-theme-child/theme.json index 6a13dbd43ab24..1157fa9128030 100644 --- a/tests/phpunit/data/themedir1/block-theme-child/theme.json +++ b/tests/phpunit/data/themedir1/block-theme-child/theme.json @@ -1,6 +1,6 @@ { "$schema": "https://schemas.wp.org/trunk/theme.json", - "version": 1, + "version": 2, "settings": { "color": { "palette": [ diff --git a/tests/phpunit/data/themedir1/block-theme/styles/variation-a.json b/tests/phpunit/data/themedir1/block-theme/styles/variation-a.json new file mode 100644 index 0000000000000..42c20fc63b592 --- /dev/null +++ b/tests/phpunit/data/themedir1/block-theme/styles/variation-a.json @@ -0,0 +1,18 @@ +{ + "version": 2, + "settings": { + "blocks": { + "core/paragraph": { + "color": { + "palette": [ + { + "slug": "light", + "name": "Light", + "color": "#f2f2f2" + } + ] + } + } + } + } +} diff --git a/tests/phpunit/data/themedir1/block-theme/theme.json b/tests/phpunit/data/themedir1/block-theme/theme.json index 06d1c44c1353e..212ef5df78f7e 100644 --- a/tests/phpunit/data/themedir1/block-theme/theme.json +++ b/tests/phpunit/data/themedir1/block-theme/theme.json @@ -1,6 +1,6 @@ { "$schema": "https://schemas.wp.org/trunk/theme.json", - "version": 1, + "version": 2, "title": "Block theme", "settings": { "color": { @@ -42,11 +42,11 @@ } ], "customFontSize": false, - "customLineHeight": true + "lineHeight": true }, "spacing": { - "units": ["rem"], - "customPadding": true, + "units": [ "rem" ], + "padding": true, "blockGap": true }, "blocks": { @@ -63,8 +63,8 @@ } } }, - "styles" : { - "blocks" :{ + "styles": { + "blocks": { "core/post-featured-image": { "shadow": "10px 10px 5px 0px rgba(0,0,0,0.66)", "filter": { @@ -122,7 +122,7 @@ { "name": "custom-single-post-template", "title": "Custom Single Post template", - "postTypes": ["post"] + "postTypes": [ "post" ] } ], "templateParts": [ diff --git a/tests/phpunit/tests/rest-api/rest-global-styles-controller.php b/tests/phpunit/tests/rest-api/rest-global-styles-controller.php index 07050a0515e17..efc4fdb463d36 100644 --- a/tests/phpunit/tests/rest-api/rest-global-styles-controller.php +++ b/tests/phpunit/tests/rest-api/rest-global-styles-controller.php @@ -31,17 +31,6 @@ class WP_REST_Global_Styles_Controller_Test extends WP_Test_REST_Controller_Test */ protected static $post_id; - private function find_and_normalize_global_styles_by_id( $global_styles, $id ) { - foreach ( $global_styles as $style ) { - if ( $style['id'] === $id ) { - unset( $style['_links'] ); - return $style; - } - } - - return null; - } - public function set_up() { parent::set_up(); switch_theme( 'tt1-blocks' ); @@ -130,6 +119,89 @@ public function test_context_param() { // Controller does not use get_context_param(). } + public function test_get_theme_items() { + wp_set_current_user( self::$admin_id ); + switch_theme( 'block-theme' ); + $request = new WP_REST_Request( 'GET', '/wp/v2/global-styles/themes/block-theme/variations' ); + $response = rest_get_server()->dispatch( $request ); + $data = $response->get_data(); + $expected = array( + array( + 'version' => 2, + 'title' => 'variation-a', + 'settings' => array( + 'blocks' => array( + 'core/paragraph' => array( + 'color' => array( + 'palette' => array( + 'theme' => array( + array( + 'slug' => 'light', + 'name' => 'Light', + 'color' => '#f2f2f2', + ), + ), + ), + ), + ), + ), + ), + ), + array( + 'version' => 2, + 'title' => 'variation-b', + 'settings' => array( + 'blocks' => array( + 'core/post-title' => array( + 'color' => array( + 'palette' => array( + 'theme' => array( + array( + 'slug' => 'light', + 'name' => 'Light', + 'color' => '#f1f1f1', + ), + ), + ), + ), + ), + ), + ), + ), + array( + 'version' => 2, + 'title' => 'Block theme variation', + 'settings' => array( + 'color' => array( + 'palette' => array( + 'theme' => array( + array( + 'slug' => 'foreground', + 'color' => '#3F67C6', + 'name' => 'Foreground', + ), + ), + ), + ), + ), + 'styles' => array( + 'blocks' => array( + 'core/post-title' => array( + 'typography' => array( + 'fontWeight' => '700', + ), + ), + ), + ), + ), + ); + + wp_recursive_ksort( $data ); + wp_recursive_ksort( $expected ); + + $this->assertSameSets( $expected, $data ); + } + /** * @doesNotPerformAssertions */ @@ -411,7 +483,6 @@ public function test_update_item() { $this->assertSame( 'My new global styles title', $data['title']['raw'] ); } - /** * @covers WP_REST_Global_Styles_Controller::update_item * @ticket 54516 @@ -445,6 +516,45 @@ public function test_update_item_permission_check() { $this->assertErrorResponse( 'rest_cannot_edit', $response, 403 ); } + /** + * @covers WP_REST_Global_Styles_Controller::update_item + * @ticket 57536 + */ + public function test_update_item_valid_styles_css() { + wp_set_current_user( self::$admin_id ); + if ( is_multisite() ) { + grant_super_admin( self::$admin_id ); + } + $request = new WP_REST_Request( 'PUT', '/wp/v2/global-styles/' . self::$global_styles_id ); + $request->set_body_params( + array( + 'styles' => array( 'css' => 'body { color: red; }' ), + ) + ); + $response = rest_get_server()->dispatch( $request ); + $data = $response->get_data(); + $this->assertSame( 'body { color: red; }', $data['styles']['css'] ); + } + + /** + * @covers WP_REST_Global_Styles_Controller::update_item + * @ticket 57536 + */ + public function test_update_item_invalid_styles_css() { + wp_set_current_user( self::$admin_id ); + if ( is_multisite() ) { + grant_super_admin( self::$admin_id ); + } + $request = new WP_REST_Request( 'PUT', '/wp/v2/global-styles/' . self::$global_styles_id ); + $request->set_body_params( + array( + 'styles' => array( 'css' => '

    test

    body { color: red; }' ), + ) + ); + $response = rest_get_server()->dispatch( $request ); + $this->assertErrorResponse( 'rest_custom_css_illegal_markup', $response, 400 ); + } + /** * @doesNotPerformAssertions */ @@ -475,69 +585,6 @@ public function test_get_item_schema() { $this->assertArrayHasKey( 'title', $properties, 'Schema properties array does not have "title" key' ); } - - public function test_get_theme_items() { - wp_set_current_user( self::$admin_id ); - switch_theme( 'block-theme' ); - $request = new WP_REST_Request( 'GET', '/wp/v2/global-styles/themes/block-theme/variations' ); - $response = rest_get_server()->dispatch( $request ); - $data = $response->get_data(); - $expected = array( - array( - 'version' => 2, - 'title' => 'variation-b', - 'settings' => array( - 'blocks' => array( - 'core/post-title' => array( - 'color' => array( - 'palette' => array( - 'theme' => array( - array( - 'slug' => 'light', - 'name' => 'Light', - 'color' => '#f1f1f1', - ), - ), - ), - ), - ), - ), - ), - ), - array( - 'version' => 2, - 'title' => 'Block theme variation', - 'settings' => array( - 'color' => array( - 'palette' => array( - 'theme' => array( - array( - 'slug' => 'foreground', - 'color' => '#3F67C6', - 'name' => 'Foreground', - ), - ), - ), - ), - ), - 'styles' => array( - 'blocks' => array( - 'core/post-title' => array( - 'typography' => array( - 'fontWeight' => '700', - ), - ), - ), - ), - ), - ); - - wp_recursive_ksort( $data ); - wp_recursive_ksort( $expected ); - - $this->assertSameSets( $data, $expected ); - } - /** * @covers WP_REST_Global_Styles_Controller::get_available_actions */ @@ -556,43 +603,4 @@ public function test_assign_edit_css_action_admin() { $this->assertArrayHasKey( 'https://api.w.org/action-edit-css', $links ); } } - - /** - * @covers WP_REST_Global_Styles_Controller::update_item - * @ticket 57536 - */ - public function test_update_item_valid_styles_css() { - wp_set_current_user( self::$admin_id ); - if ( is_multisite() ) { - grant_super_admin( self::$admin_id ); - } - $request = new WP_REST_Request( 'PUT', '/wp/v2/global-styles/' . self::$global_styles_id ); - $request->set_body_params( - array( - 'styles' => array( 'css' => 'body { color: red; }' ), - ) - ); - $response = rest_get_server()->dispatch( $request ); - $data = $response->get_data(); - $this->assertSame( 'body { color: red; }', $data['styles']['css'] ); - } - - /** - * @covers WP_REST_Global_Styles_Controller::update_item - * @ticket 57536 - */ - public function test_update_item_invalid_styles_css() { - wp_set_current_user( self::$admin_id ); - if ( is_multisite() ) { - grant_super_admin( self::$admin_id ); - } - $request = new WP_REST_Request( 'PUT', '/wp/v2/global-styles/' . self::$global_styles_id ); - $request->set_body_params( - array( - 'styles' => array( 'css' => '

    test

    body { color: red; }' ), - ) - ); - $response = rest_get_server()->dispatch( $request ); - $this->assertErrorResponse( 'rest_custom_css_illegal_markup', $response, 400 ); - } } diff --git a/tests/phpunit/tests/theme/wpThemeJson.php b/tests/phpunit/tests/theme/wpThemeJson.php index 25c1d58a62f6b..f5b2017e1a842 100644 --- a/tests/phpunit/tests/theme/wpThemeJson.php +++ b/tests/phpunit/tests/theme/wpThemeJson.php @@ -386,111 +386,6 @@ public function test_get_settings_appearance_false_does_not_opt_in() { $this->assertEqualSetsWithIndex( $expected, $actual ); } - /** - * @ticket 54336 - * @ticket 58550 - */ - public function test_get_stylesheet_support_for_shorthand_and_longhand_values() { - $theme_json = new WP_Theme_JSON( - array( - 'version' => WP_Theme_JSON::LATEST_SCHEMA, - 'styles' => array( - 'blocks' => array( - 'core/group' => array( - 'border' => array( - 'radius' => '10px', - ), - 'spacing' => array( - 'padding' => '24px', - 'margin' => '1em', - ), - ), - 'core/image' => array( - 'border' => array( - 'radius' => array( - 'topLeft' => '10px', - 'bottomRight' => '1em', - ), - ), - 'spacing' => array( - 'padding' => array( - 'top' => '15px', - ), - 'margin' => array( - 'bottom' => '30px', - ), - ), - ), - ), - ), - ) - ); - - $styles = 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){max-width: var(--wp--style--global--content-size);margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignwide{max-width: var(--wp--style--global--wide-size);}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}.wp-block-group{border-radius: 10px;margin: 1em;padding: 24px;}.wp-block-image{margin-bottom: 30px;padding-top: 15px;}.wp-block-image img, .wp-block-image .wp-block-image__crop-area, .wp-block-image .components-placeholder{border-top-left-radius: 10px;border-bottom-right-radius: 1em;}'; - $this->assertSame( $styles, $theme_json->get_stylesheet() ); - $this->assertSame( $styles, $theme_json->get_stylesheet( array( 'styles' ) ) ); - } - - /** - * @ticket 54336 - * @ticket 58550 - */ - public function test_get_stylesheet_skips_disabled_protected_properties() { - $theme_json = new WP_Theme_JSON( - array( - 'version' => WP_Theme_JSON::LATEST_SCHEMA, - 'settings' => array( - 'spacing' => array( - 'blockGap' => null, - ), - ), - 'styles' => array( - 'spacing' => array( - 'blockGap' => '1em', - ), - 'blocks' => array( - 'core/columns' => array( - 'spacing' => array( - 'blockGap' => '24px', - ), - ), - ), - ), - ) - ); - - $expected = 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){max-width: var(--wp--style--global--content-size);margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignwide{max-width: var(--wp--style--global--wide-size);}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}:where(.wp-block-columns.is-layout-flex){gap: 2em;}:where(.wp-block-columns.is-layout-grid){gap: 2em;}'; - $this->assertSame( $expected, $theme_json->get_stylesheet() ); - $this->assertSame( $expected, $theme_json->get_stylesheet( array( 'styles' ) ) ); - } - - /** - * @ticket 54336 - * @ticket 58548 - * @ticket 58550 - */ - public function test_get_stylesheet_renders_enabled_protected_properties() { - $theme_json = new WP_Theme_JSON( - array( - 'version' => WP_Theme_JSON::LATEST_SCHEMA, - 'settings' => array( - 'spacing' => array( - 'blockGap' => true, - ), - ), - 'styles' => array( - 'spacing' => array( - 'blockGap' => '1em', - ), - ), - ) - ); - - $expected = 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.wp-site-blocks) > * { margin-block-start: 1em; margin-block-end: 0; }:where(.wp-site-blocks) > :first-child:first-child { margin-block-start: 0; }:where(.wp-site-blocks) > :last-child:last-child { margin-block-end: 0; }body { --wp--style--block-gap: 1em; }:where(body .is-layout-flow) > :first-child:first-child{margin-block-start: 0;}:where(body .is-layout-flow) > :last-child:last-child{margin-block-end: 0;}:where(body .is-layout-flow) > *{margin-block-start: 1em;margin-block-end: 0;}:where(body .is-layout-constrained) > :first-child:first-child{margin-block-start: 0;}:where(body .is-layout-constrained) > :last-child:last-child{margin-block-end: 0;}:where(body .is-layout-constrained) > *{margin-block-start: 1em;margin-block-end: 0;}:where(body .is-layout-flex) {gap: 1em;}:where(body .is-layout-grid) {gap: 1em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){max-width: var(--wp--style--global--content-size);margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignwide{max-width: var(--wp--style--global--wide-size);}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}'; - $this->assertSame( $expected, $theme_json->get_stylesheet() ); - $this->assertSame( $expected, $theme_json->get_stylesheet( array( 'styles' ) ) ); - } - /** * @ticket 53175 * @ticket 54336 @@ -583,20 +478,23 @@ public function test_get_stylesheet() { ), ), 'core/group' => array( - 'color' => array( + 'color' => array( 'gradient' => 'var:preset|gradient|custom-gradient', ), - 'border' => array( + 'border' => array( 'radius' => '10px', ), - 'elements' => array( + 'dimensions' => array( + 'minHeight' => '50vh', + ), + 'elements' => array( 'link' => array( 'color' => array( 'text' => '#111', ), ), ), - 'spacing' => array( + 'spacing' => array( 'padding' => '24px', ), ), @@ -660,13 +558,119 @@ public function test_get_stylesheet() { ); $variables = 'body{--wp--preset--color--grey: grey;--wp--preset--gradient--custom-gradient: linear-gradient(135deg,rgba(0,0,0) 0%,rgb(0,0,0) 100%);--wp--preset--font-size--small: 14px;--wp--preset--font-size--big: 41px;--wp--preset--font-family--arial: Arial, serif;}.wp-block-group{--wp--custom--base-font: 16;--wp--custom--line-height--small: 1.2;--wp--custom--line-height--medium: 1.4;--wp--custom--line-height--large: 1.8;}'; - $styles = 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){max-width: var(--wp--style--global--content-size);margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignwide{max-width: var(--wp--style--global--wide-size);}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}body{color: var(--wp--preset--color--grey);}a:where(:not(.wp-element-button)){background-color: #333;color: #111;}.wp-element-button, .wp-block-button__link{box-shadow: 10px 10px 5px 0px rgba(0,0,0,0.66);}.wp-block-cover{min-height: unset;aspect-ratio: 16/9;}.wp-block-group{background: var(--wp--preset--gradient--custom-gradient);border-radius: 10px;padding: 24px;}.wp-block-group a:where(:not(.wp-element-button)){color: #111;}.wp-block-heading{color: #123456;}.wp-block-heading a:where(:not(.wp-element-button)){background-color: #333;color: #111;font-size: 60px;}.wp-block-post-date{color: #123456;}.wp-block-post-date a:where(:not(.wp-element-button)){background-color: #777;color: #555;}.wp-block-post-excerpt{column-count: 2;}.wp-block-image{margin-bottom: 30px;}.wp-block-image img, .wp-block-image .wp-block-image__crop-area, .wp-block-image .components-placeholder{border-top-left-radius: 10px;border-bottom-right-radius: 1em;}.wp-block-image img, .wp-block-image .components-placeholder{filter: var(--wp--preset--duotone--custom-duotone);}'; + $styles = 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){max-width: var(--wp--style--global--content-size);margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignwide{max-width: var(--wp--style--global--wide-size);}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}body{color: var(--wp--preset--color--grey);}a:where(:not(.wp-element-button)){background-color: #333;color: #111;}.wp-element-button, .wp-block-button__link{box-shadow: 10px 10px 5px 0px rgba(0,0,0,0.66);}.wp-block-cover{min-height: unset;aspect-ratio: 16/9;}.wp-block-group{background: var(--wp--preset--gradient--custom-gradient);border-radius: 10px;min-height: 50vh;padding: 24px;}.wp-block-group a:where(:not(.wp-element-button)){color: #111;}.wp-block-heading{color: #123456;}.wp-block-heading a:where(:not(.wp-element-button)){background-color: #333;color: #111;font-size: 60px;}.wp-block-post-date{color: #123456;}.wp-block-post-date a:where(:not(.wp-element-button)){background-color: #777;color: #555;}.wp-block-post-excerpt{column-count: 2;}.wp-block-image{margin-bottom: 30px;}.wp-block-image img, .wp-block-image .wp-block-image__crop-area, .wp-block-image .components-placeholder{border-top-left-radius: 10px;border-bottom-right-radius: 1em;}.wp-block-image img, .wp-block-image .components-placeholder{filter: var(--wp--preset--duotone--custom-duotone);}'; $presets = '.has-grey-color{color: var(--wp--preset--color--grey) !important;}.has-grey-background-color{background-color: var(--wp--preset--color--grey) !important;}.has-grey-border-color{border-color: var(--wp--preset--color--grey) !important;}.has-custom-gradient-gradient-background{background: var(--wp--preset--gradient--custom-gradient) !important;}.has-small-font-size{font-size: var(--wp--preset--font-size--small) !important;}.has-big-font-size{font-size: var(--wp--preset--font-size--big) !important;}.has-arial-font-family{font-family: var(--wp--preset--font-family--arial) !important;}'; $all = $variables . $styles . $presets; - $this->assertSame( $all, $theme_json->get_stylesheet() ); + + $this->assertSame( $variables, $theme_json->get_stylesheet( array( 'variables' ) ) ); $this->assertSame( $styles, $theme_json->get_stylesheet( array( 'styles' ) ) ); $this->assertSame( $presets, $theme_json->get_stylesheet( array( 'presets' ) ) ); - $this->assertSame( $variables, $theme_json->get_stylesheet( array( 'variables' ) ) ); + $this->assertSame( $all, $theme_json->get_stylesheet() ); + } + + /** + * @ticket 54336 + * @ticket 58550 + */ + public function test_get_stylesheet_support_for_shorthand_and_longhand_values() { + $theme_json = new WP_Theme_JSON( + array( + 'version' => WP_Theme_JSON::LATEST_SCHEMA, + 'styles' => array( + 'blocks' => array( + 'core/group' => array( + 'border' => array( + 'radius' => '10px', + ), + 'spacing' => array( + 'padding' => '24px', + 'margin' => '1em', + ), + ), + 'core/image' => array( + 'border' => array( + 'radius' => array( + 'topLeft' => '10px', + 'bottomRight' => '1em', + ), + ), + 'spacing' => array( + 'padding' => array( + 'top' => '15px', + ), + 'margin' => array( + 'bottom' => '30px', + ), + ), + ), + ), + ), + ) + ); + + $styles = 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){max-width: var(--wp--style--global--content-size);margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignwide{max-width: var(--wp--style--global--wide-size);}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}.wp-block-group{border-radius: 10px;margin: 1em;padding: 24px;}.wp-block-image{margin-bottom: 30px;padding-top: 15px;}.wp-block-image img, .wp-block-image .wp-block-image__crop-area, .wp-block-image .components-placeholder{border-top-left-radius: 10px;border-bottom-right-radius: 1em;}'; + $this->assertSame( $styles, $theme_json->get_stylesheet() ); + $this->assertSame( $styles, $theme_json->get_stylesheet( array( 'styles' ) ) ); + } + + /** + * @ticket 54336 + * @ticket 58550 + */ + public function test_get_stylesheet_skips_disabled_protected_properties() { + $theme_json = new WP_Theme_JSON( + array( + 'version' => WP_Theme_JSON::LATEST_SCHEMA, + 'settings' => array( + 'spacing' => array( + 'blockGap' => null, + ), + ), + 'styles' => array( + 'spacing' => array( + 'blockGap' => '1em', + ), + 'blocks' => array( + 'core/columns' => array( + 'spacing' => array( + 'blockGap' => '24px', + ), + ), + ), + ), + ) + ); + + $expected = 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){max-width: var(--wp--style--global--content-size);margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignwide{max-width: var(--wp--style--global--wide-size);}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}:where(.wp-block-columns.is-layout-flex){gap: 2em;}:where(.wp-block-columns.is-layout-grid){gap: 2em;}'; + $this->assertSame( $expected, $theme_json->get_stylesheet() ); + $this->assertSame( $expected, $theme_json->get_stylesheet( array( 'styles' ) ) ); + } + + /** + * @ticket 54336 + * @ticket 58548 + * @ticket 58550 + */ + public function test_get_stylesheet_renders_enabled_protected_properties() { + $theme_json = new WP_Theme_JSON( + array( + 'version' => WP_Theme_JSON::LATEST_SCHEMA, + 'settings' => array( + 'spacing' => array( + 'blockGap' => true, + ), + ), + 'styles' => array( + 'spacing' => array( + 'blockGap' => '1em', + ), + ), + ) + ); + + $expected = 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.wp-site-blocks) > * { margin-block-start: 1em; margin-block-end: 0; }:where(.wp-site-blocks) > :first-child:first-child { margin-block-start: 0; }:where(.wp-site-blocks) > :last-child:last-child { margin-block-end: 0; }body { --wp--style--block-gap: 1em; }:where(body .is-layout-flow) > :first-child:first-child{margin-block-start: 0;}:where(body .is-layout-flow) > :last-child:last-child{margin-block-end: 0;}:where(body .is-layout-flow) > *{margin-block-start: 1em;margin-block-end: 0;}:where(body .is-layout-constrained) > :first-child:first-child{margin-block-start: 0;}:where(body .is-layout-constrained) > :last-child:last-child{margin-block-end: 0;}:where(body .is-layout-constrained) > *{margin-block-start: 1em;margin-block-end: 0;}:where(body .is-layout-flex) {gap: 1em;}:where(body .is-layout-grid) {gap: 1em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){max-width: var(--wp--style--global--content-size);margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignwide{max-width: var(--wp--style--global--wide-size);}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}'; + $this->assertSame( $expected, $theme_json->get_stylesheet() ); + $this->assertSame( $expected, $theme_json->get_stylesheet( array( 'styles' ) ) ); } /** @@ -738,7 +742,9 @@ public function test_get_stylesheet_preset_rules_come_after_block_rules() { $styles = 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){max-width: var(--wp--style--global--content-size);margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignwide{max-width: var(--wp--style--global--wide-size);}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}.wp-block-group{color: red;}'; $presets = '.wp-block-group.has-grey-color{color: var(--wp--preset--color--grey) !important;}.wp-block-group.has-grey-background-color{background-color: var(--wp--preset--color--grey) !important;}.wp-block-group.has-grey-border-color{border-color: var(--wp--preset--color--grey) !important;}'; $variables = '.wp-block-group{--wp--preset--color--grey: grey;}'; - $all = $variables . $styles . $presets; + + $all = $variables . $styles . $presets; + $this->assertSame( $all, $theme_json->get_stylesheet() ); $this->assertSame( $styles, $theme_json->get_stylesheet( array( 'styles' ) ) ); $this->assertSame( $presets, $theme_json->get_stylesheet( array( 'presets' ) ) ); @@ -1113,39 +1119,355 @@ public function test_get_stylesheet_handles_whitelisted_block_level_element_pseu } /** - * @ticket 52991 - * @ticket 54336 + * @ticket 56467 + * @ticket 58548 + * @ticket 58550 */ - public function test_merge_incoming_data() { + public function test_get_stylesheet_generates_layout_styles() { $theme_json = new WP_Theme_JSON( array( 'version' => WP_Theme_JSON::LATEST_SCHEMA, 'settings' => array( - 'color' => array( - 'custom' => false, - 'palette' => array( - array( - 'slug' => 'red', - 'color' => 'red', - ), - array( - 'slug' => 'green', - 'color' => 'green', - ), - ), - ), - 'blocks' => array( - 'core/paragraph' => array( - 'color' => array( - 'custom' => false, - ), - ), + 'spacing' => array( + 'blockGap' => true, ), ), 'styles' => array( - 'typography' => array( - 'fontSize' => '12', - ), + 'spacing' => array( + 'blockGap' => '1em', + ), + ), + ), + 'default' + ); + + // Results also include root site blocks styles. + $this->assertSame( + 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.wp-site-blocks) > * { margin-block-start: 1em; margin-block-end: 0; }:where(.wp-site-blocks) > :first-child:first-child { margin-block-start: 0; }:where(.wp-site-blocks) > :last-child:last-child { margin-block-end: 0; }body { --wp--style--block-gap: 1em; }:where(body .is-layout-flow) > :first-child:first-child{margin-block-start: 0;}:where(body .is-layout-flow) > :last-child:last-child{margin-block-end: 0;}:where(body .is-layout-flow) > *{margin-block-start: 1em;margin-block-end: 0;}:where(body .is-layout-constrained) > :first-child:first-child{margin-block-start: 0;}:where(body .is-layout-constrained) > :last-child:last-child{margin-block-end: 0;}:where(body .is-layout-constrained) > *{margin-block-start: 1em;margin-block-end: 0;}:where(body .is-layout-flex) {gap: 1em;}:where(body .is-layout-grid) {gap: 1em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){max-width: var(--wp--style--global--content-size);margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignwide{max-width: var(--wp--style--global--wide-size);}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}', + $theme_json->get_stylesheet( array( 'styles' ) ) + ); + } + + /** + * @ticket 56467 + * @ticket 58548 + * @ticket 58550 + */ + public function test_get_stylesheet_generates_layout_styles_with_spacing_presets() { + $theme_json = new WP_Theme_JSON( + array( + 'version' => WP_Theme_JSON::LATEST_SCHEMA, + 'settings' => array( + 'spacing' => array( + 'blockGap' => true, + ), + ), + 'styles' => array( + 'spacing' => array( + 'blockGap' => 'var:preset|spacing|60', + ), + ), + ), + 'default' + ); + + // Results also include root site blocks styles. + $this->assertSame( + 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.wp-site-blocks) > * { margin-block-start: var(--wp--preset--spacing--60); margin-block-end: 0; }:where(.wp-site-blocks) > :first-child:first-child { margin-block-start: 0; }:where(.wp-site-blocks) > :last-child:last-child { margin-block-end: 0; }body { --wp--style--block-gap: var(--wp--preset--spacing--60); }:where(body .is-layout-flow) > :first-child:first-child{margin-block-start: 0;}:where(body .is-layout-flow) > :last-child:last-child{margin-block-end: 0;}:where(body .is-layout-flow) > *{margin-block-start: var(--wp--preset--spacing--60);margin-block-end: 0;}:where(body .is-layout-constrained) > :first-child:first-child{margin-block-start: 0;}:where(body .is-layout-constrained) > :last-child:last-child{margin-block-end: 0;}:where(body .is-layout-constrained) > *{margin-block-start: var(--wp--preset--spacing--60);margin-block-end: 0;}:where(body .is-layout-flex) {gap: var(--wp--preset--spacing--60);}:where(body .is-layout-grid) {gap: var(--wp--preset--spacing--60);}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){max-width: var(--wp--style--global--content-size);margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignwide{max-width: var(--wp--style--global--wide-size);}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}', + $theme_json->get_stylesheet( array( 'styles' ) ) + ); + } + + /** + * @ticket 56467 + * @ticket 58550 + */ + public function test_get_stylesheet_generates_fallback_gap_layout_styles() { + $theme_json = new WP_Theme_JSON( + array( + 'version' => WP_Theme_JSON::LATEST_SCHEMA, + 'settings' => array( + 'spacing' => array( + 'blockGap' => null, + ), + ), + 'styles' => array( + 'spacing' => array( + 'blockGap' => '1em', + ), + ), + ), + 'default' + ); + $stylesheet = $theme_json->get_stylesheet( array( 'styles' ) ); + + // Results also include root site blocks styles. + $this->assertSame( + 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){max-width: var(--wp--style--global--content-size);margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignwide{max-width: var(--wp--style--global--wide-size);}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}', + $stylesheet + ); + } + + /** + * @ticket 56467 + * @ticket 58550 + */ + public function test_get_stylesheet_generates_base_fallback_gap_layout_styles() { + $theme_json = new WP_Theme_JSON( + array( + 'version' => WP_Theme_JSON::LATEST_SCHEMA, + 'settings' => array( + 'spacing' => array( + 'blockGap' => null, + ), + ), + ), + 'default' + ); + $stylesheet = $theme_json->get_stylesheet( array( 'base-layout-styles' ) ); + + // Note the `base-layout-styles` includes a fallback gap for the Columns block for backwards compatibility. + $this->assertSame( + ':where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){max-width: var(--wp--style--global--content-size);margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignwide{max-width: var(--wp--style--global--wide-size);}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}:where(.wp-block-columns.is-layout-flex){gap: 2em;}:where(.wp-block-columns.is-layout-grid){gap: 2em;}:where(.wp-block-post-template.is-layout-flex){gap: 1.25em;}:where(.wp-block-post-template.is-layout-grid){gap: 1.25em;}', + $stylesheet + ); + } + + /** + * @ticket 56467 + * @ticket 58550 + */ + public function test_get_stylesheet_skips_layout_styles() { + add_theme_support( 'disable-layout-styles' ); + $theme_json = new WP_Theme_JSON( + array( + 'version' => WP_Theme_JSON::LATEST_SCHEMA, + 'settings' => array( + 'spacing' => array( + 'blockGap' => null, + ), + ), + ), + 'default' + ); + $stylesheet = $theme_json->get_stylesheet( array( 'base-layout-styles' ) ); + remove_theme_support( 'disable-layout-styles' ); + + // All Layout styles should be skipped. + $this->assertSame( + '', + $stylesheet + ); + } + + /** + * @ticket 56467 + * @ticket 58550 + */ + public function test_get_stylesheet_generates_valid_block_gap_values_and_skips_null_or_false_values() { + $theme_json = new WP_Theme_JSON( + array( + 'version' => WP_Theme_JSON::LATEST_SCHEMA, + 'settings' => array( + 'spacing' => array( + 'blockGap' => true, + ), + ), + 'styles' => array( + 'spacing' => array( + 'blockGap' => '1rem', + ), + 'blocks' => array( + 'core/post-content' => array( + 'color' => array( + 'text' => 'gray', // This value should not render block layout styles. + ), + ), + 'core/social-links' => array( + 'spacing' => array( + 'blockGap' => '0', // This value should render block layout gap as zero. + ), + ), + 'core/buttons' => array( + 'spacing' => array( + 'blockGap' => 0, // This value should render block layout gap as zero. + ), + ), + 'core/columns' => array( + 'spacing' => array( + 'blockGap' => false, // This value should be ignored. The block will use the global layout value. + ), + ), + ), + ), + ), + 'default' + ); + + $this->assertSame( + 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.wp-site-blocks) > * { margin-block-start: 1rem; margin-block-end: 0; }:where(.wp-site-blocks) > :first-child:first-child { margin-block-start: 0; }:where(.wp-site-blocks) > :last-child:last-child { margin-block-end: 0; }body { --wp--style--block-gap: 1rem; }:where(body .is-layout-flow) > :first-child:first-child{margin-block-start: 0;}:where(body .is-layout-flow) > :last-child:last-child{margin-block-end: 0;}:where(body .is-layout-flow) > *{margin-block-start: 1rem;margin-block-end: 0;}:where(body .is-layout-constrained) > :first-child:first-child{margin-block-start: 0;}:where(body .is-layout-constrained) > :last-child:last-child{margin-block-end: 0;}:where(body .is-layout-constrained) > *{margin-block-start: 1rem;margin-block-end: 0;}:where(body .is-layout-flex) {gap: 1rem;}:where(body .is-layout-grid) {gap: 1rem;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){max-width: var(--wp--style--global--content-size);margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignwide{max-width: var(--wp--style--global--wide-size);}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}.wp-block-post-content{color: gray;}.wp-block-social-links-is-layout-flow > :first-child:first-child{margin-block-start: 0;}.wp-block-social-links-is-layout-flow > :last-child:last-child{margin-block-end: 0;}.wp-block-social-links-is-layout-flow > *{margin-block-start: 0;margin-block-end: 0;}.wp-block-social-links-is-layout-constrained > :first-child:first-child{margin-block-start: 0;}.wp-block-social-links-is-layout-constrained > :last-child:last-child{margin-block-end: 0;}.wp-block-social-links-is-layout-constrained > *{margin-block-start: 0;margin-block-end: 0;}.wp-block-social-links-is-layout-flex{gap: 0;}.wp-block-social-links-is-layout-grid{gap: 0;}.wp-block-buttons-is-layout-flow > :first-child:first-child{margin-block-start: 0;}.wp-block-buttons-is-layout-flow > :last-child:last-child{margin-block-end: 0;}.wp-block-buttons-is-layout-flow > *{margin-block-start: 0;margin-block-end: 0;}.wp-block-buttons-is-layout-constrained > :first-child:first-child{margin-block-start: 0;}.wp-block-buttons-is-layout-constrained > :last-child:last-child{margin-block-end: 0;}.wp-block-buttons-is-layout-constrained > *{margin-block-start: 0;margin-block-end: 0;}.wp-block-buttons-is-layout-flex{gap: 0;}.wp-block-buttons-is-layout-grid{gap: 0;}', + $theme_json->get_stylesheet() + ); + } + + /** + * @ticket 57354 + * @ticket 58550 + */ + public function test_get_stylesheet_returns_outline_styles() { + $theme_json = new WP_Theme_JSON( + array( + 'version' => WP_Theme_JSON::LATEST_SCHEMA, + 'styles' => array( + 'elements' => array( + 'button' => array( + 'outline' => array( + 'offset' => '3px', + 'width' => '3px', + 'style' => 'dashed', + 'color' => 'red', + ), + ':hover' => array( + 'outline' => array( + 'offset' => '3px', + 'width' => '3px', + 'style' => 'solid', + 'color' => 'blue', + ), + ), + ), + ), + ), + ) + ); + + $base_styles = 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){max-width: var(--wp--style--global--content-size);margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignwide{max-width: var(--wp--style--global--wide-size);}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}'; + + $element_styles = '.wp-element-button, .wp-block-button__link{outline-color: red;outline-offset: 3px;outline-style: dashed;outline-width: 3px;}.wp-element-button:hover, .wp-block-button__link:hover{outline-color: blue;outline-offset: 3px;outline-style: solid;outline-width: 3px;}'; + + $expected = $base_styles . $element_styles; + $this->assertSame( $expected, $theme_json->get_stylesheet() ); + } + + /** + * Tests that a custom root selector is correctly applied when generating a stylesheet. + * + * @ticket 60343 + */ + public function test_get_stylesheet_custom_root_selector() { + $theme_json = new WP_Theme_JSON( + array( + 'version' => WP_Theme_JSON::LATEST_SCHEMA, + 'styles' => array( + 'color' => array( + 'text' => 'teal', + ), + ), + ), + 'default' + ); + + $options = array( 'root_selector' => '.custom' ); + $actual = $theme_json->get_stylesheet( array( 'styles' ), null, $options ); + + // Results also include root site blocks styles which hard code + // `body { margin: 0; }`. + $this->assertSame( + 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }.custom{color: teal;}', + $actual + ); + } + + public function test_allow_indirect_properties() { + $actual = WP_Theme_JSON::remove_insecure_properties( + array( + 'version' => WP_Theme_JSON::LATEST_SCHEMA, + 'styles' => array( + 'blocks' => array( + 'core/social-links' => array( + 'spacing' => array( + 'blockGap' => array( + 'top' => '1em', + 'left' => '2em', + ), + ), + ), + ), + 'spacing' => array( + 'blockGap' => '3em', + ), + ), + 'settings' => array( + 'layout' => array( + 'contentSize' => '800px', + 'wideSize' => '1000px', + ), + ), + ) + ); + + $expected = array( + 'version' => WP_Theme_JSON::LATEST_SCHEMA, + 'styles' => array( + 'blocks' => array( + 'core/social-links' => array( + 'spacing' => array( + 'blockGap' => array( + 'top' => '1em', + 'left' => '2em', + ), + ), + ), + ), + 'spacing' => array( + 'blockGap' => '3em', + ), + ), + 'settings' => array( + 'layout' => array( + 'contentSize' => '800px', + 'wideSize' => '1000px', + ), + ), + ); + + $this->assertEqualSetsWithIndex( $expected, $actual ); + } + + /** + * @ticket 52991 + * @ticket 54336 + */ + public function test_merge_incoming_data() { + $theme_json = new WP_Theme_JSON( + array( + 'version' => WP_Theme_JSON::LATEST_SCHEMA, + 'settings' => array( + 'color' => array( + 'custom' => false, + 'palette' => array( + array( + 'slug' => 'red', + 'color' => 'red', + ), + array( + 'slug' => 'green', + 'color' => 'green', + ), + ), + ), + 'blocks' => array( + 'core/paragraph' => array( + 'color' => array( + 'custom' => false, + ), + ), + ), + ), + 'styles' => array( + 'typography' => array( + 'fontSize' => '12', + ), ), ) ); @@ -2554,6 +2876,11 @@ public function test_remove_invalid_element_pseudo_selectors() { 'background' => 'blue', ), ), + ':seen' => array( + 'color' => array( + 'background' => 'ivory', + ), + ), ), ), ), @@ -2821,65 +3148,22 @@ public function test_get_editor_settings_custom_units_can_be_enabled() { ); $this->assertEqualSetsWithIndex( $expected, $actual['settings']['spacing'] ); - } - - /** - * @ticket 52991 - * @ticket 54336 - */ - public function test_get_editor_settings_custom_units_can_be_filtered() { - add_theme_support( 'custom-units', 'rem', 'em' ); - $actual = WP_Theme_JSON::get_from_editor_settings( get_classic_theme_supports_block_editor_settings() ); - remove_theme_support( 'custom-units' ); - - $expected = array( - 'units' => array( 'rem', 'em' ), - 'padding' => false, - ); - $this->assertEqualSetsWithIndex( $expected, $actual['settings']['spacing'] ); - } - - /** - * @ticket 54487 - */ - public function test_sanitization() { - $theme_json = new WP_Theme_JSON( - array( - 'version' => 2, - 'styles' => array( - 'spacing' => array( - 'blockGap' => 'valid value', - ), - 'blocks' => array( - 'core/group' => array( - 'spacing' => array( - 'margin' => 'valid value', - 'display' => 'none', - ), - ), - ), - ), - ) - ); - - $actual = $theme_json->get_raw_data(); - $expected = array( - 'version' => 2, - 'styles' => array( - 'spacing' => array( - 'blockGap' => 'valid value', - ), - 'blocks' => array( - 'core/group' => array( - 'spacing' => array( - 'margin' => 'valid value', - ), - ), - ), - ), - ); + } - $this->assertEqualSetsWithIndex( $expected, $actual ); + /** + * @ticket 52991 + * @ticket 54336 + */ + public function test_get_editor_settings_custom_units_can_be_filtered() { + add_theme_support( 'custom-units', 'rem', 'em' ); + $actual = WP_Theme_JSON::get_from_editor_settings( get_classic_theme_supports_block_editor_settings() ); + remove_theme_support( 'custom-units' ); + + $expected = array( + 'units' => array( 'rem', 'em' ), + 'padding' => false, + ); + $this->assertEqualSetsWithIndex( $expected, $actual['settings']['spacing'] ); } /** @@ -3154,6 +3438,51 @@ public function test_export_data_sets_use_root_padding_aware_alignments() { $this->assertEqualSetsWithIndex( $expected, $actual ); } + public function test_remove_invalid_font_family_settings() { + $actual = WP_Theme_JSON::remove_insecure_properties( + array( + 'version' => WP_Theme_JSON::LATEST_SCHEMA, + 'settings' => array( + 'typography' => array( + 'fontFamilies' => array( + 'custom' => array( + array( + 'name' => 'Open Sans', + 'slug' => 'open-sans', + 'fontFamily' => '"Open Sans", sans-serif', + ), + array( + 'name' => 'Arial', + 'slug' => 'arial', + 'fontFamily' => 'Arial, serif', + ), + ), + ), + ), + ), + ), + true + ); + + $expected = array( + 'version' => WP_Theme_JSON::LATEST_SCHEMA, + 'settings' => array( + 'typography' => array( + 'fontFamilies' => array( + 'custom' => array( + array( + 'name' => 'Arial', + 'slug' => 'arial', + 'fontFamily' => 'Arial, serif', + ), + ), + ), + ), + ), + ); + + $this->assertEqualSetsWithIndex( $expected, $actual ); + } /** * @ticket 56467 @@ -3203,7 +3532,9 @@ public function test_get_property_value_valid() { ) ); - $expected = 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){max-width: var(--wp--style--global--content-size);margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignwide{max-width: var(--wp--style--global--wide-size);}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}body{background-color: #ffffff;color: #000000;}.wp-element-button, .wp-block-button__link{background-color: #000000;color: #ffffff;}'; + $base_styles = 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){max-width: var(--wp--style--global--content-size);margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignwide{max-width: var(--wp--style--global--wide-size);}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}'; + $color_styles = 'body{background-color: #ffffff;color: #000000;}.wp-element-button, .wp-block-button__link{background-color: #000000;color: #ffffff;}'; + $expected = $base_styles . $color_styles; $this->assertSame( $expected, $theme_json->get_stylesheet() ); } @@ -3255,7 +3586,8 @@ public function data_get_property_value_should_return_string_for_invalid_paths_o } /** - * Testing that dynamic properties in theme.json that refer to other dynamic properties in a loop + * Testing that dynamic properties in theme.json that + * refer to other dynamic properties in a loop * should be left untouched. * * @ticket 56467 @@ -3279,262 +3611,77 @@ public function test_get_property_value_loop() { ), ), ), - ), - ) - ); - - $expected = 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){max-width: var(--wp--style--global--content-size);margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignwide{max-width: var(--wp--style--global--wide-size);}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}body{background-color: #ffffff;}.wp-element-button, .wp-block-button__link{color: #ffffff;}'; - $this->assertSame( $expected, $theme_json->get_stylesheet() ); - } - - /** - * Testing that dynamic properties in theme.json that refer to other dynamic properties - * should be left unprocessed. - * - * @ticket 56467 - * @ticket 58550 - * @expectedIncorrectUsage get_property_value - */ - public function test_get_property_value_recursion() { - $theme_json = new WP_Theme_JSON( - array( - 'version' => 2, - 'styles' => array( - 'color' => array( - 'background' => '#ffffff', - 'text' => array( 'ref' => 'styles.color.background' ), - ), - 'elements' => array( - 'button' => array( - 'color' => array( - 'background' => array( 'ref' => 'styles.color.text' ), - 'text' => array( 'ref' => 'styles.color.background' ), - ), - ), - ), - ), - ) - ); - - $expected = 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){max-width: var(--wp--style--global--content-size);margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignwide{max-width: var(--wp--style--global--wide-size);}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}body{background-color: #ffffff;color: #ffffff;}.wp-element-button, .wp-block-button__link{color: #ffffff;}'; - $this->assertSame( $expected, $theme_json->get_stylesheet() ); - } - - /** - * Testing that dynamic properties in theme.json that refer to themselves - * should be left unprocessed. - * - * @ticket 56467 - * @ticket 58550 - * @expectedIncorrectUsage get_property_value - */ - public function test_get_property_value_self() { - $theme_json = new WP_Theme_JSON( - array( - 'version' => 2, - 'styles' => array( - 'color' => array( - 'background' => '#ffffff', - 'text' => array( 'ref' => 'styles.color.text' ), - ), - ), - ) - ); - - $expected = 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){max-width: var(--wp--style--global--content-size);margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignwide{max-width: var(--wp--style--global--wide-size);}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}body{background-color: #ffffff;}'; - $this->assertSame( $expected, $theme_json->get_stylesheet() ); - } - - /** - * @ticket 56467 - * @ticket 58548 - * @ticket 58550 - */ - public function test_get_stylesheet_generates_layout_styles() { - $theme_json = new WP_Theme_JSON( - array( - 'version' => WP_Theme_JSON::LATEST_SCHEMA, - 'settings' => array( - 'spacing' => array( - 'blockGap' => true, - ), - ), - 'styles' => array( - 'spacing' => array( - 'blockGap' => '1em', - ), - ), - ), - 'default' - ); - - // Results also include root site blocks styles. - $this->assertSame( - 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.wp-site-blocks) > * { margin-block-start: 1em; margin-block-end: 0; }:where(.wp-site-blocks) > :first-child:first-child { margin-block-start: 0; }:where(.wp-site-blocks) > :last-child:last-child { margin-block-end: 0; }body { --wp--style--block-gap: 1em; }:where(body .is-layout-flow) > :first-child:first-child{margin-block-start: 0;}:where(body .is-layout-flow) > :last-child:last-child{margin-block-end: 0;}:where(body .is-layout-flow) > *{margin-block-start: 1em;margin-block-end: 0;}:where(body .is-layout-constrained) > :first-child:first-child{margin-block-start: 0;}:where(body .is-layout-constrained) > :last-child:last-child{margin-block-end: 0;}:where(body .is-layout-constrained) > *{margin-block-start: 1em;margin-block-end: 0;}:where(body .is-layout-flex) {gap: 1em;}:where(body .is-layout-grid) {gap: 1em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){max-width: var(--wp--style--global--content-size);margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignwide{max-width: var(--wp--style--global--wide-size);}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}', - $theme_json->get_stylesheet( array( 'styles' ) ) - ); - } - - /** - * @ticket 56467 - * @ticket 58548 - * @ticket 58550 - */ - public function test_get_stylesheet_generates_layout_styles_with_spacing_presets() { - $theme_json = new WP_Theme_JSON( - array( - 'version' => WP_Theme_JSON::LATEST_SCHEMA, - 'settings' => array( - 'spacing' => array( - 'blockGap' => true, - ), - ), - 'styles' => array( - 'spacing' => array( - 'blockGap' => 'var:preset|spacing|60', - ), - ), - ), - 'default' - ); - - // Results also include root site blocks styles. - $this->assertSame( - 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.wp-site-blocks) > * { margin-block-start: var(--wp--preset--spacing--60); margin-block-end: 0; }:where(.wp-site-blocks) > :first-child:first-child { margin-block-start: 0; }:where(.wp-site-blocks) > :last-child:last-child { margin-block-end: 0; }body { --wp--style--block-gap: var(--wp--preset--spacing--60); }:where(body .is-layout-flow) > :first-child:first-child{margin-block-start: 0;}:where(body .is-layout-flow) > :last-child:last-child{margin-block-end: 0;}:where(body .is-layout-flow) > *{margin-block-start: var(--wp--preset--spacing--60);margin-block-end: 0;}:where(body .is-layout-constrained) > :first-child:first-child{margin-block-start: 0;}:where(body .is-layout-constrained) > :last-child:last-child{margin-block-end: 0;}:where(body .is-layout-constrained) > *{margin-block-start: var(--wp--preset--spacing--60);margin-block-end: 0;}:where(body .is-layout-flex) {gap: var(--wp--preset--spacing--60);}:where(body .is-layout-grid) {gap: var(--wp--preset--spacing--60);}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){max-width: var(--wp--style--global--content-size);margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignwide{max-width: var(--wp--style--global--wide-size);}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}', - $theme_json->get_stylesheet( array( 'styles' ) ) - ); - } - - /** - * @ticket 56467 - * @ticket 58550 - */ - public function test_get_stylesheet_generates_fallback_gap_layout_styles() { - $theme_json = new WP_Theme_JSON( - array( - 'version' => WP_Theme_JSON::LATEST_SCHEMA, - 'settings' => array( - 'spacing' => array( - 'blockGap' => null, - ), - ), - 'styles' => array( - 'spacing' => array( - 'blockGap' => '1em', - ), - ), - ), - 'default' - ); - $stylesheet = $theme_json->get_stylesheet( array( 'styles' ) ); - - // Results also include root site blocks styles. - $this->assertSame( - 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){max-width: var(--wp--style--global--content-size);margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignwide{max-width: var(--wp--style--global--wide-size);}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}', - $stylesheet - ); - } - - /** - * @ticket 56467 - * @ticket 58550 - */ - public function test_get_stylesheet_generates_base_fallback_gap_layout_styles() { - $theme_json = new WP_Theme_JSON( - array( - 'version' => WP_Theme_JSON::LATEST_SCHEMA, - 'settings' => array( - 'spacing' => array( - 'blockGap' => null, - ), - ), - ), - 'default' - ); - $stylesheet = $theme_json->get_stylesheet( array( 'base-layout-styles' ) ); - - // Note the `base-layout-styles` includes a fallback gap for the Columns block for backwards compatibility. - $this->assertSame( - ':where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){max-width: var(--wp--style--global--content-size);margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignwide{max-width: var(--wp--style--global--wide-size);}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}:where(.wp-block-columns.is-layout-flex){gap: 2em;}:where(.wp-block-columns.is-layout-grid){gap: 2em;}:where(.wp-block-post-template.is-layout-flex){gap: 1.25em;}:where(.wp-block-post-template.is-layout-grid){gap: 1.25em;}', - $stylesheet - ); - } - - /** - * @ticket 56467 - * @ticket 58550 - */ - public function test_get_stylesheet_skips_layout_styles() { - add_theme_support( 'disable-layout-styles' ); - $theme_json = new WP_Theme_JSON( - array( - 'version' => WP_Theme_JSON::LATEST_SCHEMA, - 'settings' => array( - 'spacing' => array( - 'blockGap' => null, - ), - ), - ), - 'default' - ); - $stylesheet = $theme_json->get_stylesheet( array( 'base-layout-styles' ) ); - remove_theme_support( 'disable-layout-styles' ); - - // All Layout styles should be skipped. - $this->assertSame( - '', - $stylesheet + ), + ) ); + + $base_styles = 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){max-width: var(--wp--style--global--content-size);margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignwide{max-width: var(--wp--style--global--wide-size);}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}'; + $color_styles = 'body{background-color: #ffffff;}.wp-element-button, .wp-block-button__link{color: #ffffff;}'; + $expected = $base_styles . $color_styles; + $this->assertSame( $expected, $theme_json->get_stylesheet() ); } /** + * Testing that dynamic properties in theme.json that + * refer to other dynamic properties + * should be left unprocessed. + * * @ticket 56467 * @ticket 58550 + * @expectedIncorrectUsage get_property_value */ - public function test_get_stylesheet_generates_valid_block_gap_values_and_skips_null_or_false_values() { + public function test_get_property_value_recursion() { $theme_json = new WP_Theme_JSON( array( - 'version' => WP_Theme_JSON::LATEST_SCHEMA, - 'settings' => array( - 'spacing' => array( - 'blockGap' => true, - ), - ), - 'styles' => array( - 'spacing' => array( - 'blockGap' => '1rem', + 'version' => 2, + 'styles' => array( + 'color' => array( + 'background' => '#ffffff', + 'text' => array( 'ref' => 'styles.color.background' ), ), - 'blocks' => array( - 'core/post-content' => array( + 'elements' => array( + 'button' => array( 'color' => array( - 'text' => 'gray', // This value should not render block layout styles. - ), - ), - 'core/social-links' => array( - 'spacing' => array( - 'blockGap' => '0', // This value should render block layout gap as zero. - ), - ), - 'core/buttons' => array( - 'spacing' => array( - 'blockGap' => 0, // This value should render block layout gap as zero. - ), - ), - 'core/columns' => array( - 'spacing' => array( - 'blockGap' => false, // This value should be ignored. The block will use the global layout value. + 'background' => array( 'ref' => 'styles.color.text' ), + 'text' => array( 'ref' => 'styles.color.background' ), ), ), ), ), - ), - 'default' + ) ); - $this->assertSame( - 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.wp-site-blocks) > * { margin-block-start: 1rem; margin-block-end: 0; }:where(.wp-site-blocks) > :first-child:first-child { margin-block-start: 0; }:where(.wp-site-blocks) > :last-child:last-child { margin-block-end: 0; }body { --wp--style--block-gap: 1rem; }:where(body .is-layout-flow) > :first-child:first-child{margin-block-start: 0;}:where(body .is-layout-flow) > :last-child:last-child{margin-block-end: 0;}:where(body .is-layout-flow) > *{margin-block-start: 1rem;margin-block-end: 0;}:where(body .is-layout-constrained) > :first-child:first-child{margin-block-start: 0;}:where(body .is-layout-constrained) > :last-child:last-child{margin-block-end: 0;}:where(body .is-layout-constrained) > *{margin-block-start: 1rem;margin-block-end: 0;}:where(body .is-layout-flex) {gap: 1rem;}:where(body .is-layout-grid) {gap: 1rem;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){max-width: var(--wp--style--global--content-size);margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignwide{max-width: var(--wp--style--global--wide-size);}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}.wp-block-post-content{color: gray;}.wp-block-social-links-is-layout-flow > :first-child:first-child{margin-block-start: 0;}.wp-block-social-links-is-layout-flow > :last-child:last-child{margin-block-end: 0;}.wp-block-social-links-is-layout-flow > *{margin-block-start: 0;margin-block-end: 0;}.wp-block-social-links-is-layout-constrained > :first-child:first-child{margin-block-start: 0;}.wp-block-social-links-is-layout-constrained > :last-child:last-child{margin-block-end: 0;}.wp-block-social-links-is-layout-constrained > *{margin-block-start: 0;margin-block-end: 0;}.wp-block-social-links-is-layout-flex{gap: 0;}.wp-block-social-links-is-layout-grid{gap: 0;}.wp-block-buttons-is-layout-flow > :first-child:first-child{margin-block-start: 0;}.wp-block-buttons-is-layout-flow > :last-child:last-child{margin-block-end: 0;}.wp-block-buttons-is-layout-flow > *{margin-block-start: 0;margin-block-end: 0;}.wp-block-buttons-is-layout-constrained > :first-child:first-child{margin-block-start: 0;}.wp-block-buttons-is-layout-constrained > :last-child:last-child{margin-block-end: 0;}.wp-block-buttons-is-layout-constrained > *{margin-block-start: 0;margin-block-end: 0;}.wp-block-buttons-is-layout-flex{gap: 0;}.wp-block-buttons-is-layout-grid{gap: 0;}', - $theme_json->get_stylesheet() + $base_styles = 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){max-width: var(--wp--style--global--content-size);margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignwide{max-width: var(--wp--style--global--wide-size);}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}'; + $color_styles = 'body{background-color: #ffffff;color: #ffffff;}.wp-element-button, .wp-block-button__link{color: #ffffff;}'; + $expected = $base_styles . $color_styles; + $this->assertSame( $expected, $theme_json->get_stylesheet() ); + } + + /** + * Testing that dynamic properties in theme.json that + * refer to themselves should be left unprocessed. + * + * @ticket 56467 + * @ticket 58550 + * @expectedIncorrectUsage get_property_value + */ + public function test_get_property_value_self() { + $theme_json = new WP_Theme_JSON( + array( + 'version' => 2, + 'styles' => array( + 'color' => array( + 'background' => '#ffffff', + 'text' => array( 'ref' => 'styles.color.text' ), + ), + ), + ) ); + + $base_styles = 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){max-width: var(--wp--style--global--content-size);margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignwide{max-width: var(--wp--style--global--wide-size);}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}'; + $color_styles = 'body{background-color: #ffffff;}'; + $expected = $base_styles . $color_styles; + $this->assertSame( $expected, $theme_json->get_stylesheet() ); } /** @@ -3632,6 +3779,74 @@ public function test_get_styles_for_block_with_content_width() { $this->assertSame( $expected, $root_rules . $style_rules ); } + /** + * @ticket 56611 + * @ticket 58548 + * @ticket 58550 + */ + public function test_get_styles_with_appearance_tools() { + $theme_json = new WP_Theme_JSON( + array( + 'version' => 2, + 'settings' => array( + 'appearanceTools' => true, + ), + ) + ); + + $metadata = array( + 'path' => array( 'settings' ), + 'selector' => 'body', + ); + + $expected = 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.wp-site-blocks) > * { margin-block-start: ; margin-block-end: 0; }:where(.wp-site-blocks) > :first-child:first-child { margin-block-start: 0; }:where(.wp-site-blocks) > :last-child:last-child { margin-block-end: 0; }body { --wp--style--block-gap: ; }:where(body .is-layout-flow) > :first-child:first-child{margin-block-start: 0;}:where(body .is-layout-flow) > :last-child:last-child{margin-block-end: 0;}:where(body .is-layout-flow) > *{margin-block-start: 1;margin-block-end: 0;}:where(body .is-layout-constrained) > :first-child:first-child{margin-block-start: 0;}:where(body .is-layout-constrained) > :last-child:last-child{margin-block-end: 0;}:where(body .is-layout-constrained) > *{margin-block-start: 1;margin-block-end: 0;}:where(body .is-layout-flex) {gap: 1;}:where(body .is-layout-grid) {gap: 1;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){max-width: var(--wp--style--global--content-size);margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignwide{max-width: var(--wp--style--global--wide-size);}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}'; + $root_rules = $theme_json->get_root_layout_rules( WP_Theme_JSON::ROOT_BLOCK_SELECTOR, $metadata ); + $this->assertSame( $expected, $root_rules ); + } + + /** + * @ticket 54487 + */ + public function test_sanitization() { + $theme_json = new WP_Theme_JSON( + array( + 'version' => 2, + 'styles' => array( + 'spacing' => array( + 'blockGap' => 'valid value', + ), + 'blocks' => array( + 'core/group' => array( + 'spacing' => array( + 'margin' => 'valid value', + 'display' => 'none', + ), + ), + ), + ), + ) + ); + + $actual = $theme_json->get_raw_data(); + $expected = array( + 'version' => 2, + 'styles' => array( + 'spacing' => array( + 'blockGap' => 'valid value', + ), + 'blocks' => array( + 'core/group' => array( + 'spacing' => array( + 'margin' => 'valid value', + ), + ), + ), + ), + ); + + $this->assertEqualSetsWithIndex( $expected, $actual ); + } + /* * @ticket 58462 */ @@ -3767,6 +3982,141 @@ public function data_sanitize_for_block_with_style_variations() { ); } + /** + * Tests that invalid properties are removed from the theme.json inside indexed arrays as settings.typography.fontFamilies. + * + * @ticket 60360 + */ + public function test_sanitize_indexed_arrays() { + $theme_json = new WP_Theme_JSON( + array( + 'version' => '2', + 'badKey2' => 'I am Evil!', + 'settings' => array( + 'badKey3' => 'I am Evil!', + 'typography' => array( + 'badKey4' => 'I am Evil!', + 'fontFamilies' => array( + 'custom' => array( + array( + 'badKey4' => 'I am Evil!', + 'name' => 'Arial', + 'slug' => 'arial', + 'fontFamily' => 'Arial, sans-serif', + ), + ), + 'theme' => array( + array( + 'badKey5' => 'I am Evil!', + 'name' => 'Piazzolla', + 'slug' => 'piazzolla', + 'fontFamily' => 'Piazzolla', + 'fontFace' => array( + array( + 'badKey6' => 'I am Evil!', + 'fontFamily' => 'Piazzolla', + 'fontStyle' => 'italic', + 'fontWeight' => '400', + 'src' => 'https://example.com/font.ttf', + ), + array( + 'badKey7' => 'I am Evil!', + 'fontFamily' => 'Piazzolla', + 'fontStyle' => 'italic', + 'fontWeight' => '400', + 'src' => 'https://example.com/font.ttf', + ), + ), + ), + array( + 'badKey8' => 'I am Evil!', + 'name' => 'Inter', + 'slug' => 'Inter', + 'fontFamily' => 'Inter', + 'fontFace' => array( + array( + 'badKey9' => 'I am Evil!', + 'fontFamily' => 'Inter', + 'fontStyle' => 'italic', + 'fontWeight' => '400', + 'src' => 'https://example.com/font.ttf', + ), + array( + 'badKey10' => 'I am Evil!', + 'fontFamily' => 'Inter', + 'fontStyle' => 'italic', + 'fontWeight' => '400', + 'src' => 'https://example.com/font.ttf', + ), + ), + ), + ), + ), + ), + ), + ) + ); + + $expected_sanitized = array( + 'version' => '2', + 'settings' => array( + 'typography' => array( + 'fontFamilies' => array( + 'custom' => array( + array( + 'name' => 'Arial', + 'slug' => 'arial', + 'fontFamily' => 'Arial, sans-serif', + ), + ), + 'theme' => array( + array( + 'name' => 'Piazzolla', + 'slug' => 'piazzolla', + 'fontFamily' => 'Piazzolla', + 'fontFace' => array( + array( + 'fontFamily' => 'Piazzolla', + 'fontStyle' => 'italic', + 'fontWeight' => '400', + 'src' => 'https://example.com/font.ttf', + ), + array( + 'fontFamily' => 'Piazzolla', + 'fontStyle' => 'italic', + 'fontWeight' => '400', + 'src' => 'https://example.com/font.ttf', + ), + ), + ), + array( + 'name' => 'Inter', + 'slug' => 'Inter', + 'fontFamily' => 'Inter', + 'fontFace' => array( + array( + 'fontFamily' => 'Inter', + 'fontStyle' => 'italic', + 'fontWeight' => '400', + 'src' => 'https://example.com/font.ttf', + ), + array( + 'fontFamily' => 'Inter', + 'fontStyle' => 'italic', + 'fontWeight' => '400', + 'src' => 'https://example.com/font.ttf', + ), + ), + ), + ), + ), + ), + ), + ); + $sanitized_theme_json = $theme_json->get_raw_data(); + $this->assertSameSetsWithIndex( $expected_sanitized, $sanitized_theme_json, 'Sanitized theme.json does not match' ); + } + /** * @ticket 57583 * @@ -3968,42 +4318,14 @@ public function test_block_style_variations_with_invalid_properties() { $this->assertSameSetsWithIndex( $expected, $actual ); } - /** - * @ticket 56611 - * @ticket 58548 - * @ticket 58550 - */ - public function test_get_styles_with_appearance_tools() { - $theme_json = new WP_Theme_JSON( - array( - 'version' => 2, - 'settings' => array( - 'appearanceTools' => true, - ), - ) - ); - - $metadata = array( - 'path' => array( 'settings' ), - 'selector' => 'body', - ); - - $expected = 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.wp-site-blocks) > * { margin-block-start: ; margin-block-end: 0; }:where(.wp-site-blocks) > :first-child:first-child { margin-block-start: 0; }:where(.wp-site-blocks) > :last-child:last-child { margin-block-end: 0; }body { --wp--style--block-gap: ; }:where(body .is-layout-flow) > :first-child:first-child{margin-block-start: 0;}:where(body .is-layout-flow) > :last-child:last-child{margin-block-end: 0;}:where(body .is-layout-flow) > *{margin-block-start: 1;margin-block-end: 0;}:where(body .is-layout-constrained) > :first-child:first-child{margin-block-start: 0;}:where(body .is-layout-constrained) > :last-child:last-child{margin-block-end: 0;}:where(body .is-layout-constrained) > *{margin-block-start: 1;margin-block-end: 0;}:where(body .is-layout-flex) {gap: 1;}:where(body .is-layout-grid) {gap: 1;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){max-width: var(--wp--style--global--content-size);margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignwide{max-width: var(--wp--style--global--wide-size);}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}'; - $root_rules = $theme_json->get_root_layout_rules( WP_Theme_JSON::ROOT_BLOCK_SELECTOR, $metadata ); - $this->assertSame( $expected, $root_rules ); - } - /** * Tests generating the spacing presets array based on the spacing scale provided. * * @ticket 56467 * - * @dataProvider data_generate_spacing_scale_fixtures - * - * @param array $spacing_scale Example spacing scale definitions from the data provider. - * @param array $expected_output Expected output from data provider. + * @dataProvider data_set_spacing_sizes */ - public function test_should_set_spacing_sizes( $spacing_scale, $expected_output ) { + public function test_set_spacing_sizes( $spacing_scale, $expected_output ) { $theme_json = new WP_Theme_JSON( array( 'version' => 2, @@ -4026,7 +4348,7 @@ public function test_should_set_spacing_sizes( $spacing_scale, $expected_output * * @return array */ - public function data_generate_spacing_scale_fixtures() { + public function data_set_spacing_sizes() { return array( 'only one value when single step in spacing scale' => array( 'spacing_scale' => array( @@ -4294,7 +4616,7 @@ public function data_generate_spacing_scale_fixtures() { * @param array $spacing_scale Example spacing scale definitions from the data provider. * @param array $expected_output Expected output from data provider. */ - public function test_set_spacing_sizes_should_detect_invalid_spacing_scale( $spacing_scale, $expected_output ) { + public function test_set_spacing_sizes_when_invalid( $spacing_scale, $expected_output ) { $this->expectException( Exception::class ); $this->expectExceptionMessage( 'Some of the theme.json settings.spacing.spacingScale values are invalid' ); @@ -4479,45 +4801,6 @@ public function data_update_separator_declarations() { ); } - /** - * @ticket 57354 - * @ticket 58550 - */ - public function test_get_stylesheet_returns_outline_styles() { - $theme_json = new WP_Theme_JSON( - array( - 'version' => WP_Theme_JSON::LATEST_SCHEMA, - 'styles' => array( - 'elements' => array( - 'button' => array( - 'outline' => array( - 'offset' => '3px', - 'width' => '3px', - 'style' => 'dashed', - 'color' => 'red', - ), - ':hover' => array( - 'outline' => array( - 'offset' => '3px', - 'width' => '3px', - 'style' => 'solid', - 'color' => 'blue', - ), - ), - ), - ), - ), - ) - ); - - $base_styles = 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){max-width: var(--wp--style--global--content-size);margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignwide{max-width: var(--wp--style--global--wide-size);}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}'; - - $element_styles = '.wp-element-button, .wp-block-button__link{outline-color: red;outline-offset: 3px;outline-style: dashed;outline-width: 3px;}.wp-element-button:hover, .wp-block-button__link:hover{outline-color: blue;outline-offset: 3px;outline-style: solid;outline-width: 3px;}'; - - $expected = $base_styles . $element_styles; - $this->assertSame( $expected, $theme_json->get_stylesheet() ); - } - /** * @ticket 57559 */ @@ -4586,7 +4869,6 @@ public function test_get_shadow_styles_for_blocks() { $global_styles = 'body{--wp--preset--shadow--natural: 5px 5px 0 0 black;}body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){max-width: var(--wp--style--global--content-size);margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignwide{max-width: var(--wp--style--global--wide-size);}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}'; $element_styles = 'a:where(:not(.wp-element-button)){box-shadow: var(--wp--preset--shadow--natural);}.wp-element-button, .wp-block-button__link{box-shadow: var(--wp--preset--shadow--natural);}p{box-shadow: var(--wp--preset--shadow--natural);}'; $expected_styles = $global_styles . $element_styles; - $this->assertSame( $expected_styles, $theme_json->get_stylesheet() ); } @@ -4598,11 +4880,17 @@ public function test_get_custom_css_handles_global_custom_css() { array( 'version' => WP_Theme_JSON::LATEST_SCHEMA, 'styles' => array( - 'css' => 'body { color:purple; }', + 'css' => 'body {color:purple;}', + 'blocks' => array( + 'core/paragraph' => array( + 'css' => 'color:red;', + ), + ), ), ) ); - $custom_css = 'body { color:purple; }'; + + $custom_css = 'body {color:purple;}p{color:red;}'; $this->assertSame( $custom_css, $theme_json->get_custom_css() ); } @@ -4957,170 +5245,6 @@ public function test_resolve_variables() { $this->assertEquals( $secondary_color, $styles['blocks']['core/quote']['variations']['plain']['color']['background'], 'Block variations: color' ); } - /** - * Tests that a custom root selector is correctly applied when generating a stylesheet. - * - * @ticket 60343 - */ - public function test_get_stylesheet_custom_root_selector() { - $theme_json = new WP_Theme_JSON( - array( - 'version' => WP_Theme_JSON::LATEST_SCHEMA, - 'styles' => array( - 'color' => array( - 'text' => 'teal', - ), - ), - ), - 'default' - ); - - $options = array( 'root_selector' => '.custom' ); - $actual = $theme_json->get_stylesheet( array( 'styles' ), null, $options ); - - // Results also include root site blocks styles which hard code - // `body { margin: 0;}`. - $this->assertEquals( - 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }.custom{color: teal;}', - $actual - ); - } - - /** - * Tests that invalid properties are removed from the theme.json inside indexed arrays as settings.typography.fontFamilies. - * - * @ticket 60360 - */ - public function test_sanitize_indexed_arrays() { - $theme_json = new WP_Theme_JSON( - array( - 'version' => '2', - 'badKey2' => 'I am Evil!', - 'settings' => array( - 'badKey3' => 'I am Evil!', - 'typography' => array( - 'badKey4' => 'I am Evil!', - 'fontFamilies' => array( - 'custom' => array( - array( - 'badKey4' => 'I am Evil!', - 'name' => 'Arial', - 'slug' => 'arial', - 'fontFamily' => 'Arial, sans-serif', - ), - ), - 'theme' => array( - array( - 'badKey5' => 'I am Evil!', - 'name' => 'Piazzolla', - 'slug' => 'piazzolla', - 'fontFamily' => 'Piazzolla', - 'fontFace' => array( - array( - 'badKey6' => 'I am Evil!', - 'fontFamily' => 'Piazzolla', - 'fontStyle' => 'italic', - 'fontWeight' => '400', - 'src' => 'https://example.com/font.ttf', - ), - array( - 'badKey7' => 'I am Evil!', - 'fontFamily' => 'Piazzolla', - 'fontStyle' => 'italic', - 'fontWeight' => '400', - 'src' => 'https://example.com/font.ttf', - ), - ), - ), - array( - 'badKey8' => 'I am Evil!', - 'name' => 'Inter', - 'slug' => 'Inter', - 'fontFamily' => 'Inter', - 'fontFace' => array( - array( - 'badKey9' => 'I am Evil!', - 'fontFamily' => 'Inter', - 'fontStyle' => 'italic', - 'fontWeight' => '400', - 'src' => 'https://example.com/font.ttf', - ), - array( - 'badKey10' => 'I am Evil!', - 'fontFamily' => 'Inter', - 'fontStyle' => 'italic', - 'fontWeight' => '400', - 'src' => 'https://example.com/font.ttf', - ), - ), - ), - ), - ), - ), - ), - ) - ); - - $expected_sanitized = array( - 'version' => '2', - 'settings' => array( - 'typography' => array( - 'fontFamilies' => array( - 'custom' => array( - array( - 'name' => 'Arial', - 'slug' => 'arial', - 'fontFamily' => 'Arial, sans-serif', - ), - ), - 'theme' => array( - array( - 'name' => 'Piazzolla', - 'slug' => 'piazzolla', - 'fontFamily' => 'Piazzolla', - 'fontFace' => array( - array( - 'fontFamily' => 'Piazzolla', - 'fontStyle' => 'italic', - 'fontWeight' => '400', - 'src' => 'https://example.com/font.ttf', - ), - array( - 'fontFamily' => 'Piazzolla', - 'fontStyle' => 'italic', - 'fontWeight' => '400', - 'src' => 'https://example.com/font.ttf', - ), - ), - ), - array( - 'name' => 'Inter', - 'slug' => 'Inter', - 'fontFamily' => 'Inter', - 'fontFace' => array( - array( - 'fontFamily' => 'Inter', - 'fontStyle' => 'italic', - 'fontWeight' => '400', - 'src' => 'https://example.com/font.ttf', - ), - array( - 'fontFamily' => 'Inter', - 'fontStyle' => 'italic', - 'fontWeight' => '400', - 'src' => 'https://example.com/font.ttf', - ), - ), - ), - ), - ), - ), - ), - ); - $sanitized_theme_json = $theme_json->get_raw_data(); - $this->assertSameSetsWithIndex( $expected_sanitized, $sanitized_theme_json, 'Sanitized theme.json does not match' ); - } - /** * Tests the correct application of a block style variation's selector to * a block's selector. diff --git a/tests/phpunit/tests/theme/wpThemeJsonResolver.php b/tests/phpunit/tests/theme/wpThemeJsonResolver.php index d595b3a908ae1..0e91e27bc2e45 100644 --- a/tests/phpunit/tests/theme/wpThemeJsonResolver.php +++ b/tests/phpunit/tests/theme/wpThemeJsonResolver.php @@ -19,20 +19,6 @@ class Tests_Theme_wpThemeJsonResolver extends WP_UnitTestCase { */ protected static $administrator_id; - /** - * Theme root directory. - * - * @var string - */ - private $theme_root; - - /** - * Original theme directory. - * - * @var string - */ - private $orig_theme_dir; - /** * WP_Theme_JSON_Resolver::$blocks_cache property. * @@ -61,6 +47,25 @@ class Tests_Theme_wpThemeJsonResolver extends WP_UnitTestCase { */ private static $property_core_orig_value; + /** + * Theme root directory. + * + * @var string|null + */ + private $theme_root; + + /** + * Original theme directory. + * + * @var array|null + */ + private $orig_theme_dir; + + /** + * @var array|null + */ + private $queries; + public static function set_up_before_class() { parent::set_up_before_class(); @@ -98,7 +103,7 @@ public function set_up() { add_filter( 'theme_root', array( $this, 'filter_set_theme_root' ) ); add_filter( 'stylesheet_root', array( $this, 'filter_set_theme_root' ) ); add_filter( 'template_root', array( $this, 'filter_set_theme_root' ) ); - + $this->queries = array(); // Clear caches. wp_clean_themes_cache(); unset( $GLOBALS['wp_themes'] ); @@ -140,7 +145,7 @@ public function test_translations_are_applied() { $this->assertSame( 'block-theme', wp_get_theme()->get( 'TextDomain' ) ); $this->assertSame( 'Motyw blokowy', $theme_data->get_data()['title'] ); - $this->assertSameSets( + $this->assertSame( array( 'color' => array( 'custom' => false, @@ -218,12 +223,13 @@ public function test_translations_are_applied() { $custom_templates = $theme_data->get_custom_templates(); $this->assertArrayHasKey( 'page-home', $custom_templates ); $this->assertSame( - $custom_templates['page-home'], array( 'title' => 'Szablon strony głównej', 'postTypes' => array( 'page' ), - ) + ), + $custom_templates['page-home'] ); + $this->assertSameSets( array( 'small-header' => array( @@ -233,9 +239,10 @@ public function test_translations_are_applied() { ), $theme_data->get_template_parts() ); + $this->assertSame( 'Wariant motywu blokowego', - $style_variations[1]['title'] + $style_variations[2]['title'] ); } @@ -257,8 +264,8 @@ private function get_registered_block_names( $hard_reset = false ) { } /** - * Tests when WP_Theme_JSON_Resolver::$blocks_cache is empty or does not match - * the all registered blocks. + * Tests when WP_Theme_JSON_Resolver::$blocks_cache is empty or + * does not match the all registered blocks. * * Though this is a non-public method, it is vital to other functionality. * Therefore, tests are provided to validate it functions as expected. @@ -331,8 +338,8 @@ public function data_has_same_registered_blocks_when_all_blocks_not_cached() { } /** - * Tests when WP_Theme_JSON_Resolver::$blocks_cache is empty or does not match - * the all registered blocks. + * Tests when WP_Theme_JSON_Resolver::$blocks_cache is empty or + * does not match the all registered blocks. * * Though this is a non-public method, it is vital to other functionality. * Therefore, tests are provided to validate it functions as expected. @@ -596,7 +603,6 @@ public function test_merges_child_theme_json_into_parent_theme_json() { ); $this->assertSame( - WP_Theme_JSON_Resolver::get_theme_data()->get_custom_templates(), array( 'page-home' => array( 'title' => 'Homepage', @@ -606,7 +612,8 @@ public function test_merges_child_theme_json_into_parent_theme_json() { 'title' => 'Custom Single Post template', 'postTypes' => array( 'post' ), ), - ) + ), + WP_Theme_JSON_Resolver::get_theme_data()->get_custom_templates() ); } @@ -749,6 +756,8 @@ public function test_get_user_data_from_wp_global_styles_filter_state() { * @covers WP_Theme_JSON_Resolver::get_theme_data */ public function test_get_theme_data_theme_supports_overrides_theme_json() { + switch_theme( 'default' ); + // Test that get_theme_data() returns a WP_Theme_JSON object. $theme_json_resolver = new WP_Theme_JSON_Resolver(); $theme_json_resolver->get_merged_data(); @@ -762,10 +771,12 @@ public function test_get_theme_data_theme_supports_overrides_theme_json() { $previous_settings = $theme_data->get_settings(); $previous_line_height = $previous_settings['typography']['lineHeight']; $this->assertFalse( $previous_line_height, 'lineHeight setting from theme.json should be false.' ); + add_theme_support( 'custom-line-height' ); $current_settings = $theme_json_resolver->get_theme_data()->get_settings(); $line_height = $current_settings['typography']['lineHeight']; $this->assertTrue( $line_height, 'lineHeight setting after add_theme_support() should be true.' ); + remove_theme_support( 'custom-line-height' ); } /** @@ -809,15 +820,15 @@ public function test_get_theme_data_does_not_parse_theme_json_if_not_present() { * @param string $block_styles_text Message. * @param bool $theme_palette Whether the theme palette is present. * @param string $theme_palette_text Message. - * @param bool $user_palette Whether the user palette is present. - * @param string $user_palette_text Message. + * @param bool $user_palette Whether the user palette is present. + * @param string $user_palette_text Message. */ public function test_get_merged_data_returns_origin( $origin, $core_palette, $core_palette_text, $block_styles, $block_styles_text, $theme_palette, $theme_palette_text, $user_palette, $user_palette_text ) { // Make sure there is data from the blocks origin. register_block_type( 'my/block-with-styles', array( - 'api_version' => 2, + 'api_version' => 3, 'attributes' => array( 'borderColor' => array( 'type' => 'string', @@ -877,7 +888,6 @@ static function ( $element ) { * @ticket 57824 * * @covers WP_Theme_JSON_Resolver::get_merged_data - * */ public function test_get_merged_data_returns_origin_proper() { // Make sure the theme has a theme.json @@ -914,7 +924,7 @@ public function test_get_merged_data_returns_origin_proper() { } /** - * Data provider. + * Data provider for test_get_merged_data_returns_origin. * * @return array[] */ @@ -983,7 +993,28 @@ public function test_get_style_variations_returns_all_variations() { $actual_settings = WP_Theme_JSON_Resolver::get_style_variations(); $expected_settings = array( array( - 'version' => 2, + 'version' => WP_Theme_JSON::LATEST_SCHEMA, + 'title' => 'variation-a', + 'settings' => array( + 'blocks' => array( + 'core/paragraph' => array( + 'color' => array( + 'palette' => array( + 'theme' => array( + array( + 'slug' => 'dark', + 'name' => 'Dark', + 'color' => '#010101', + ), + ), + ), + ), + ), + ), + ), + ), + array( + 'version' => WP_Theme_JSON::LATEST_SCHEMA, 'title' => 'variation-b', 'settings' => array( 'blocks' => array( @@ -1004,7 +1035,7 @@ public function test_get_style_variations_returns_all_variations() { ), ), array( - 'version' => 2, + 'version' => WP_Theme_JSON::LATEST_SCHEMA, 'title' => 'Block theme variation', 'settings' => array( 'color' => array( diff --git a/tests/phpunit/tests/theme/wpThemeJsonSchema.php b/tests/phpunit/tests/theme/wpThemeJsonSchema.php index e93ef0673a3c8..cb5bb41780c68 100644 --- a/tests/phpunit/tests/theme/wpThemeJsonSchema.php +++ b/tests/phpunit/tests/theme/wpThemeJsonSchema.php @@ -11,15 +11,10 @@ * @group themes */ class Tests_Theme_wpThemeJsonSchema extends WP_UnitTestCase { - /** - * The current theme.json schema version. - */ - const LATEST_SCHEMA_VERSION = WP_Theme_JSON::LATEST_SCHEMA; - /** * @ticket 54336 */ - public function test_migrate_v1_to_v2() { + public function test_migrate_v1_to_latest() { $theme_json_v1 = array( 'version' => 1, 'settings' => array( @@ -106,7 +101,7 @@ public function test_migrate_v1_to_v2() { $actual = WP_Theme_JSON_Schema::migrate( $theme_json_v1 ); $expected = array( - 'version' => self::LATEST_SCHEMA_VERSION, + 'version' => WP_Theme_JSON::LATEST_SCHEMA, 'settings' => array( 'color' => array( 'palette' => array( From c84cddb432f8703f97ba7db98b39fd533e6a8d4a Mon Sep 17 00:00:00 2001 From: Riad Benguella Date: Tue, 20 Feb 2024 11:14:50 +0000 Subject: [PATCH 025/251] Editor: Update Packages with the latest bug fixes for 6.5 beta 2. It includes all the backports from this Gutenberg PR https://github.com/WordPress/gutenberg/pull/59197 Props youknowriad, get_dave. See #60315. git-svn-id: https://develop.svn.wordpress.org/trunk@57663 602fd350-edb4-49c9-b593-d223f7449a82 --- package-lock.json | 3573 +++++++++-------- package.json | 144 +- .../assets/script-loader-packages.min.php | 2 +- src/wp-includes/blocks/blocks-json.php | 12 +- src/wp-includes/blocks/button/block.json | 1 - src/wp-includes/blocks/footnotes.php | 35 +- src/wp-includes/blocks/heading/block.json | 1 - src/wp-includes/blocks/image/block.json | 7 +- src/wp-includes/blocks/navigation-link.php | 1 - src/wp-includes/blocks/navigation.php | 149 +- src/wp-includes/blocks/paragraph/block.json | 2 +- src/wp-includes/blocks/search.php | 2 +- 12 files changed, 1994 insertions(+), 1935 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3392e1fe6d744..798385410f919 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,72 +9,72 @@ "version": "6.5.0", "license": "GPL-2.0-or-later", "dependencies": { - "@wordpress/a11y": "3.51.0", - "@wordpress/annotations": "2.51.1", - "@wordpress/api-fetch": "6.48.0", - "@wordpress/autop": "3.51.0", - "@wordpress/blob": "3.51.0", - "@wordpress/block-directory": "4.28.1", - "@wordpress/block-editor": "12.19.1", - "@wordpress/block-library": "8.28.1", - "@wordpress/block-serialization-default-parser": "4.51.0", - "@wordpress/blocks": "12.28.1", - "@wordpress/commands": "0.22.1", - "@wordpress/components": "26.0.1", - "@wordpress/compose": "6.28.0", - "@wordpress/core-commands": "0.20.1", - "@wordpress/core-data": "6.28.1", - "@wordpress/customize-widgets": "4.28.1", - "@wordpress/data": "9.21.0", - "@wordpress/data-controls": "3.20.0", - "@wordpress/dataviews": "0.5.1", - "@wordpress/date": "4.51.0", - "@wordpress/deprecated": "3.51.0", - "@wordpress/dom": "3.51.0", - "@wordpress/dom-ready": "3.51.0", - "@wordpress/edit-post": "7.28.1", - "@wordpress/edit-site": "5.28.1", - "@wordpress/edit-widgets": "5.28.1", - "@wordpress/editor": "13.28.1", - "@wordpress/element": "5.28.0", - "@wordpress/escape-html": "2.51.0", - "@wordpress/format-library": "4.28.1", - "@wordpress/hooks": "3.51.0", - "@wordpress/html-entities": "3.51.0", - "@wordpress/i18n": "4.51.0", - "@wordpress/icons": "9.42.0", - "@wordpress/interactivity": "5.0.0", - "@wordpress/interactivity-router": "1.1.0", - "@wordpress/interface": "5.28.1", - "@wordpress/is-shallow-equal": "4.51.0", - "@wordpress/keyboard-shortcuts": "4.28.0", - "@wordpress/keycodes": "3.51.0", - "@wordpress/list-reusable-blocks": "4.28.1", - "@wordpress/media-utils": "4.42.0", - "@wordpress/notices": "4.19.0", - "@wordpress/nux": "8.13.1", - "@wordpress/patterns": "1.12.1", - "@wordpress/plugins": "6.19.1", - "@wordpress/preferences": "3.28.1", - "@wordpress/preferences-persistence": "1.43.0", - "@wordpress/primitives": "3.49.0", - "@wordpress/priority-queue": "2.51.0", - "@wordpress/private-apis": "0.33.0", - "@wordpress/redux-routine": "4.51.0", - "@wordpress/reusable-blocks": "4.28.1", - "@wordpress/rich-text": "6.28.1", - "@wordpress/router": "0.20.0", - "@wordpress/server-side-render": "4.28.1", - "@wordpress/shortcode": "3.51.0", - "@wordpress/style-engine": "1.34.0", - "@wordpress/sync": "0.13.0", - "@wordpress/token-list": "2.51.0", - "@wordpress/undo-manager": "0.11.0", - "@wordpress/url": "3.52.0", - "@wordpress/viewport": "5.28.0", - "@wordpress/warning": "2.51.0", - "@wordpress/widgets": "3.28.1", - "@wordpress/wordcount": "3.51.0", + "@wordpress/a11y": "3.51.1", + "@wordpress/annotations": "2.51.2", + "@wordpress/api-fetch": "6.48.1", + "@wordpress/autop": "3.51.1", + "@wordpress/blob": "3.51.1", + "@wordpress/block-directory": "4.28.2", + "@wordpress/block-editor": "12.19.2", + "@wordpress/block-library": "8.28.2", + "@wordpress/block-serialization-default-parser": "4.51.1", + "@wordpress/blocks": "12.28.2", + "@wordpress/commands": "0.22.2", + "@wordpress/components": "26.0.2", + "@wordpress/compose": "6.28.1", + "@wordpress/core-commands": "0.20.2", + "@wordpress/core-data": "6.28.2", + "@wordpress/customize-widgets": "4.28.2", + "@wordpress/data": "9.21.1", + "@wordpress/data-controls": "3.20.1", + "@wordpress/dataviews": "0.5.2", + "@wordpress/date": "4.51.1", + "@wordpress/deprecated": "3.51.1", + "@wordpress/dom": "3.51.1", + "@wordpress/dom-ready": "3.51.1", + "@wordpress/edit-post": "7.28.2", + "@wordpress/edit-site": "5.28.2", + "@wordpress/edit-widgets": "5.28.2", + "@wordpress/editor": "13.28.2", + "@wordpress/element": "5.28.1", + "@wordpress/escape-html": "2.51.1", + "@wordpress/format-library": "4.28.2", + "@wordpress/hooks": "3.51.1", + "@wordpress/html-entities": "3.51.1", + "@wordpress/i18n": "4.51.1", + "@wordpress/icons": "9.42.1", + "@wordpress/interactivity": "5.0.1", + "@wordpress/interactivity-router": "1.1.1", + "@wordpress/interface": "5.28.2", + "@wordpress/is-shallow-equal": "4.51.1", + "@wordpress/keyboard-shortcuts": "4.28.1", + "@wordpress/keycodes": "3.51.1", + "@wordpress/list-reusable-blocks": "4.28.2", + "@wordpress/media-utils": "4.42.1", + "@wordpress/notices": "4.19.1", + "@wordpress/nux": "8.13.2", + "@wordpress/patterns": "1.12.2", + "@wordpress/plugins": "6.19.2", + "@wordpress/preferences": "3.28.2", + "@wordpress/preferences-persistence": "1.43.1", + "@wordpress/primitives": "3.49.1", + "@wordpress/priority-queue": "2.51.1", + "@wordpress/private-apis": "0.33.1", + "@wordpress/redux-routine": "4.51.1", + "@wordpress/reusable-blocks": "4.28.2", + "@wordpress/rich-text": "6.28.2", + "@wordpress/router": "0.20.1", + "@wordpress/server-side-render": "4.28.2", + "@wordpress/shortcode": "3.51.1", + "@wordpress/style-engine": "1.34.1", + "@wordpress/sync": "0.13.1", + "@wordpress/token-list": "2.51.1", + "@wordpress/undo-manager": "0.11.1", + "@wordpress/url": "3.52.1", + "@wordpress/viewport": "5.28.1", + "@wordpress/warning": "2.51.1", + "@wordpress/widgets": "3.28.2", + "@wordpress/wordcount": "3.51.1", "backbone": "1.5.0", "clipboard": "2.0.11", "core-js-url-browser": "3.6.4", @@ -105,12 +105,12 @@ "@lodder/grunt-postcss": "^3.1.1", "@playwright/test": "1.32.0", "@pmmmwh/react-refresh-webpack-plugin": "0.5.11", - "@wordpress/babel-preset-default": "7.35.0", - "@wordpress/dependency-extraction-webpack-plugin": "5.2.0", - "@wordpress/e2e-test-utils": "10.22.0", - "@wordpress/e2e-test-utils-playwright": "0.19.0", - "@wordpress/prettier-config": "3.8.0", - "@wordpress/scripts": "27.2.0", + "@wordpress/babel-preset-default": "7.35.1", + "@wordpress/dependency-extraction-webpack-plugin": "5.2.1", + "@wordpress/e2e-test-utils": "10.22.1", + "@wordpress/e2e-test-utils-playwright": "0.19.1", + "@wordpress/prettier-config": "3.8.1", + "@wordpress/scripts": "27.2.1", "autoprefixer": "10.4.17", "chalk": "5.3.0", "check-node-version": "4.2.1", @@ -5478,9 +5478,9 @@ "integrity": "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==" }, "node_modules/@types/semver": { - "version": "7.5.6", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.6.tgz", - "integrity": "sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A==", + "version": "7.5.7", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.7.tgz", + "integrity": "sha512-/wdoPq1QqkSj9/QOeKkFquEuPzQbHTWAMPH/PaUMB+JuR31lXhlWXRZ52IpfDYVlDOUBvX09uBrPwxGT1hjNBg==", "dev": true }, "node_modules/@types/send": { @@ -6082,28 +6082,28 @@ } }, "node_modules/@wordpress/a11y": { - "version": "3.51.0", - "resolved": "https://registry.npmjs.org/@wordpress/a11y/-/a11y-3.51.0.tgz", - "integrity": "sha512-sq7dflOxrSAvtEb7Ae1VmLyEYESlRlrwCBrWeAyYwekQ08Da1ph7EyvYMM1Yoq7xCbnLpPvAt/oGO05Mhkv2dg==", + "version": "3.51.1", + "resolved": "https://registry.npmjs.org/@wordpress/a11y/-/a11y-3.51.1.tgz", + "integrity": "sha512-qZ9H4qdCL7CR4oGMbzu7jJNjxxkZyDT4TZmLcHpg+fNwjAHNKNvtcVNnkR/dGKNIiENWD0qfmZqNNxm7QxHFcA==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/dom-ready": "^3.51.0", - "@wordpress/i18n": "^4.51.0" + "@wordpress/dom-ready": "^3.51.1", + "@wordpress/i18n": "^4.51.1" }, "engines": { "node": ">=12" } }, "node_modules/@wordpress/annotations": { - "version": "2.51.1", - "resolved": "https://registry.npmjs.org/@wordpress/annotations/-/annotations-2.51.1.tgz", - "integrity": "sha512-uFLMEEzv3/8iOFekrFWOSRI/MxrEw4hNztNK1xy8kClzkR3c96Rj1+4xxTSOSHOUtS0d3Kx4O8zugSYALO1GLQ==", + "version": "2.51.2", + "resolved": "https://registry.npmjs.org/@wordpress/annotations/-/annotations-2.51.2.tgz", + "integrity": "sha512-zGjZJjN9ySItGX1yZkPL2zfGjUWu+kFoHTPyvkBFfKBTIm3Pb0OwpO+teRilzz+tWeSc+dNMpdOry6KxCtC1Qw==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/data": "^9.21.0", - "@wordpress/hooks": "^3.51.0", - "@wordpress/i18n": "^4.51.0", - "@wordpress/rich-text": "^6.28.1", + "@wordpress/data": "^9.21.1", + "@wordpress/hooks": "^3.51.1", + "@wordpress/i18n": "^4.51.1", + "@wordpress/rich-text": "^6.28.2", "rememo": "^4.0.2", "uuid": "^9.0.1" }, @@ -6115,22 +6115,22 @@ } }, "node_modules/@wordpress/api-fetch": { - "version": "6.48.0", - "resolved": "https://registry.npmjs.org/@wordpress/api-fetch/-/api-fetch-6.48.0.tgz", - "integrity": "sha512-Yo9kpwf07OXt/xV82EfYlnR4Dl6T/VnhKbo0wtmOO7fLxhfOrF0rFgJM4X78WEWBYcjnGwQD5c5ufad7X5XK1A==", + "version": "6.48.1", + "resolved": "https://registry.npmjs.org/@wordpress/api-fetch/-/api-fetch-6.48.1.tgz", + "integrity": "sha512-3EEmItYDi1hNujIkX2MT6LVbZEj2xCStI50QUTqWKLvDa/qOS2L9l1yV+Ol330ZRErIRNBZds/PuujGKA0LZQw==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/i18n": "^4.51.0", - "@wordpress/url": "^3.52.0" + "@wordpress/i18n": "^4.51.1", + "@wordpress/url": "^3.52.1" }, "engines": { "node": ">=12" } }, "node_modules/@wordpress/autop": { - "version": "3.51.0", - "resolved": "https://registry.npmjs.org/@wordpress/autop/-/autop-3.51.0.tgz", - "integrity": "sha512-n33dunOrA3lLNXlHHVzU0f5Sns67XvxHTYd86cdBLZFLDeScfCnFzJ4+5K4l+1ayuNK511Njf+76Z0vYKrGc9w==", + "version": "3.51.1", + "resolved": "https://registry.npmjs.org/@wordpress/autop/-/autop-3.51.1.tgz", + "integrity": "sha512-WI4r+Ne9tCx4g9PU1PXkiKWUc7w9H+FMVR8QLgVt04RzmN5MKhMs9Z30lVBv/eHnfpBSqdMqqh4TsgITg3C9rA==", "dependencies": { "@babel/runtime": "^7.16.0" }, @@ -6139,9 +6139,9 @@ } }, "node_modules/@wordpress/babel-plugin-import-jsx-pragma": { - "version": "4.34.0", - "resolved": "https://registry.npmjs.org/@wordpress/babel-plugin-import-jsx-pragma/-/babel-plugin-import-jsx-pragma-4.34.0.tgz", - "integrity": "sha512-DOoUJKvfUc8rdiGqcZND5lauoY4B5+cCuuHLh9AztE1t2DlQJBy6DtP6t1bUZb7BYUWOoWgRflMLtOK3ZTf0cg==", + "version": "4.34.1", + "resolved": "https://registry.npmjs.org/@wordpress/babel-plugin-import-jsx-pragma/-/babel-plugin-import-jsx-pragma-4.34.1.tgz", + "integrity": "sha512-PUM+TQUfwKlV4P/CkqoJTYhTF3M6z3tItr6LcANxaZbj7Ru4vuiL1La3KsMrDfE9OQB5jxiQIiL9/k4eBRJS1Q==", "dev": true, "engines": { "node": ">=14" @@ -6151,9 +6151,9 @@ } }, "node_modules/@wordpress/babel-preset-default": { - "version": "7.35.0", - "resolved": "https://registry.npmjs.org/@wordpress/babel-preset-default/-/babel-preset-default-7.35.0.tgz", - "integrity": "sha512-wgZOezNvzbrJTHn0Cyt8+Si7sb5aJJ+akHOrEgvUUv576LfgWUKHPRz8Ecu1fFlupEp35r1uoQ5J+UviLWrvEg==", + "version": "7.35.1", + "resolved": "https://registry.npmjs.org/@wordpress/babel-preset-default/-/babel-preset-default-7.35.1.tgz", + "integrity": "sha512-fA/XOt6cxd6YdD8jBgbYRswse1GuoWdrVM5QruIZMoQMIqHqvRMzN1pdi5RccS5s11WM64J9pdVZ5lTy6wQcjg==", "dev": true, "dependencies": { "@babel/core": "^7.16.0", @@ -6162,9 +6162,9 @@ "@babel/preset-env": "^7.16.0", "@babel/preset-typescript": "^7.16.0", "@babel/runtime": "^7.16.0", - "@wordpress/babel-plugin-import-jsx-pragma": "^4.34.0", - "@wordpress/browserslist-config": "^5.34.0", - "@wordpress/warning": "^2.51.0", + "@wordpress/babel-plugin-import-jsx-pragma": "^4.34.1", + "@wordpress/browserslist-config": "^5.34.1", + "@wordpress/warning": "^2.51.1", "browserslist": "^4.21.10", "core-js": "^3.31.0", "react": "^18.2.0" @@ -6174,15 +6174,15 @@ } }, "node_modules/@wordpress/base-styles": { - "version": "4.42.0", - "resolved": "https://registry.npmjs.org/@wordpress/base-styles/-/base-styles-4.42.0.tgz", - "integrity": "sha512-CD8nFUg45v70BTsKuS9f/sJsdF8xOkJb2oXd0HikWtuJJ24YQB8bzkeIg+TvD5LnK4pwZeDskODo4QFBsoCwIw==", + "version": "4.42.1", + "resolved": "https://registry.npmjs.org/@wordpress/base-styles/-/base-styles-4.42.1.tgz", + "integrity": "sha512-PHG0QRUP94K6rdzYGDF5703yMZSwgIFQ7Uyrs/jFt/XbHLDoqoL85DCEXQvT+TsstfeLBnSgy4UNraNZb8BHCA==", "dev": true }, "node_modules/@wordpress/blob": { - "version": "3.51.0", - "resolved": "https://registry.npmjs.org/@wordpress/blob/-/blob-3.51.0.tgz", - "integrity": "sha512-DICMSq7Y6gI6Lz+euG1v1xsIExIFrQ8bcINmnUmwcujgHckm0BaJwAKXXO4CHQVwNLWbHZiu5ySuzorw5rhG8w==", + "version": "3.51.1", + "resolved": "https://registry.npmjs.org/@wordpress/blob/-/blob-3.51.1.tgz", + "integrity": "sha512-zALHVOBRQBr7FoQEkJEzZ+oQZJ9H8E1FevVpyIpte1F78EXWfJoyN2AOLfWoKCUy8Fue2Di/Jp+cDn7NWzV2XQ==", "dependencies": { "@babel/runtime": "^7.16.0" }, @@ -6191,30 +6191,30 @@ } }, "node_modules/@wordpress/block-directory": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/@wordpress/block-directory/-/block-directory-4.28.1.tgz", - "integrity": "sha512-Ed53YdwrDhZ5NhHSiaTx+OIt2CjvgtlXwD2L23GRUQODLifRq6WOmPVk8hISP7k2SXI5B7Y2QkG0P0D8VKK9UA==", + "version": "4.28.2", + "resolved": "https://registry.npmjs.org/@wordpress/block-directory/-/block-directory-4.28.2.tgz", + "integrity": "sha512-dCbSM19uKDvQzAGFZjYwtE0wW1L+2ghziKbZXX/e1uEOfP4AfwDvx4nRR2/rg27GP4TLEBW+v/1GfuYu6MkojA==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/a11y": "^3.51.0", - "@wordpress/api-fetch": "^6.48.0", - "@wordpress/block-editor": "^12.19.1", - "@wordpress/blocks": "^12.28.1", - "@wordpress/components": "^26.0.1", - "@wordpress/compose": "^6.28.0", - "@wordpress/core-data": "^6.28.1", - "@wordpress/data": "^9.21.0", - "@wordpress/edit-post": "^7.28.1", - "@wordpress/editor": "^13.28.1", - "@wordpress/element": "^5.28.0", - "@wordpress/hooks": "^3.51.0", - "@wordpress/html-entities": "^3.51.0", - "@wordpress/i18n": "^4.51.0", - "@wordpress/icons": "^9.42.0", - "@wordpress/notices": "^4.19.0", - "@wordpress/plugins": "^6.19.1", - "@wordpress/private-apis": "^0.33.0", - "@wordpress/url": "^3.52.0", + "@wordpress/a11y": "^3.51.1", + "@wordpress/api-fetch": "^6.48.1", + "@wordpress/block-editor": "^12.19.2", + "@wordpress/blocks": "^12.28.2", + "@wordpress/components": "^26.0.2", + "@wordpress/compose": "^6.28.1", + "@wordpress/core-data": "^6.28.2", + "@wordpress/data": "^9.21.1", + "@wordpress/edit-post": "^7.28.2", + "@wordpress/editor": "^13.28.2", + "@wordpress/element": "^5.28.1", + "@wordpress/hooks": "^3.51.1", + "@wordpress/html-entities": "^3.51.1", + "@wordpress/i18n": "^4.51.1", + "@wordpress/icons": "^9.42.1", + "@wordpress/notices": "^4.19.1", + "@wordpress/plugins": "^6.19.2", + "@wordpress/private-apis": "^0.33.1", + "@wordpress/url": "^3.52.1", "change-case": "^4.1.2" }, "engines": { @@ -6226,43 +6226,43 @@ } }, "node_modules/@wordpress/block-editor": { - "version": "12.19.1", - "resolved": "https://registry.npmjs.org/@wordpress/block-editor/-/block-editor-12.19.1.tgz", - "integrity": "sha512-ZzG0XiakM5GHVvpJw0MTEYmX0WPJJwGegMTbhkSCrMnsAY0uRpYjrZwbSbPoweFdBpkIWdKs7W9BGIQ69WVcsA==", + "version": "12.19.2", + "resolved": "https://registry.npmjs.org/@wordpress/block-editor/-/block-editor-12.19.2.tgz", + "integrity": "sha512-d1zprLFZ7QxDyQ1CJQSuIWh6tPLzFgiLvsBmCkbXlbX+0aEJxhoWsC/7avfeVWmf7Af2anID9imu5PoMLU8ztA==", "dependencies": { "@babel/runtime": "^7.16.0", "@emotion/react": "^11.7.1", "@emotion/styled": "^11.6.0", "@react-spring/web": "^9.4.5", - "@wordpress/a11y": "^3.51.0", - "@wordpress/api-fetch": "^6.48.0", - "@wordpress/blob": "^3.51.0", - "@wordpress/blocks": "^12.28.1", - "@wordpress/commands": "^0.22.1", - "@wordpress/components": "^26.0.1", - "@wordpress/compose": "^6.28.0", - "@wordpress/data": "^9.21.0", - "@wordpress/date": "^4.51.0", - "@wordpress/deprecated": "^3.51.0", - "@wordpress/dom": "^3.51.0", - "@wordpress/element": "^5.28.0", - "@wordpress/escape-html": "^2.51.0", - "@wordpress/hooks": "^3.51.0", - "@wordpress/html-entities": "^3.51.0", - "@wordpress/i18n": "^4.51.0", - "@wordpress/icons": "^9.42.0", - "@wordpress/is-shallow-equal": "^4.51.0", - "@wordpress/keyboard-shortcuts": "^4.28.0", - "@wordpress/keycodes": "^3.51.0", - "@wordpress/notices": "^4.19.0", - "@wordpress/preferences": "^3.28.1", - "@wordpress/private-apis": "^0.33.0", - "@wordpress/rich-text": "^6.28.1", - "@wordpress/style-engine": "^1.34.0", - "@wordpress/token-list": "^2.51.0", - "@wordpress/url": "^3.52.0", - "@wordpress/warning": "^2.51.0", - "@wordpress/wordcount": "^3.51.0", + "@wordpress/a11y": "^3.51.1", + "@wordpress/api-fetch": "^6.48.1", + "@wordpress/blob": "^3.51.1", + "@wordpress/blocks": "^12.28.2", + "@wordpress/commands": "^0.22.2", + "@wordpress/components": "^26.0.2", + "@wordpress/compose": "^6.28.1", + "@wordpress/data": "^9.21.1", + "@wordpress/date": "^4.51.1", + "@wordpress/deprecated": "^3.51.1", + "@wordpress/dom": "^3.51.1", + "@wordpress/element": "^5.28.1", + "@wordpress/escape-html": "^2.51.1", + "@wordpress/hooks": "^3.51.1", + "@wordpress/html-entities": "^3.51.1", + "@wordpress/i18n": "^4.51.1", + "@wordpress/icons": "^9.42.1", + "@wordpress/is-shallow-equal": "^4.51.1", + "@wordpress/keyboard-shortcuts": "^4.28.1", + "@wordpress/keycodes": "^3.51.1", + "@wordpress/notices": "^4.19.1", + "@wordpress/preferences": "^3.28.2", + "@wordpress/private-apis": "^0.33.1", + "@wordpress/rich-text": "^6.28.2", + "@wordpress/style-engine": "^1.34.1", + "@wordpress/token-list": "^2.51.1", + "@wordpress/url": "^3.52.1", + "@wordpress/warning": "^2.51.1", + "@wordpress/wordcount": "^3.51.1", "change-case": "^4.1.2", "classnames": "^2.3.1", "colord": "^2.7.0", @@ -6288,43 +6288,43 @@ } }, "node_modules/@wordpress/block-library": { - "version": "8.28.1", - "resolved": "https://registry.npmjs.org/@wordpress/block-library/-/block-library-8.28.1.tgz", - "integrity": "sha512-3JcTbuDIkZFkC9jFF4jVZNzvCx4FZOpn6QSqXwQ0mKS784u6U4AqZ850uSc7qeXpGl4LX6g8yig0WbX/FZCsWQ==", + "version": "8.28.2", + "resolved": "https://registry.npmjs.org/@wordpress/block-library/-/block-library-8.28.2.tgz", + "integrity": "sha512-xLI0p2esgaNlzxZWrk406vzly78vmL1je1mXWt33iaIeTMC7RqAkgQKDF9b2K/pYJkud/tvHAg9gHOrKfzhoSw==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/a11y": "^3.51.0", - "@wordpress/api-fetch": "^6.48.0", - "@wordpress/autop": "^3.51.0", - "@wordpress/blob": "^3.51.0", - "@wordpress/block-editor": "^12.19.1", - "@wordpress/blocks": "^12.28.1", - "@wordpress/components": "^26.0.1", - "@wordpress/compose": "^6.28.0", - "@wordpress/core-data": "^6.28.1", - "@wordpress/data": "^9.21.0", - "@wordpress/date": "^4.51.0", - "@wordpress/deprecated": "^3.51.0", - "@wordpress/dom": "^3.51.0", - "@wordpress/element": "^5.28.0", - "@wordpress/escape-html": "^2.51.0", - "@wordpress/hooks": "^3.51.0", - "@wordpress/html-entities": "^3.51.0", - "@wordpress/i18n": "^4.51.0", - "@wordpress/icons": "^9.42.0", - "@wordpress/interactivity": "^5.0.0", - "@wordpress/interactivity-router": "^1.1.0", - "@wordpress/keycodes": "^3.51.0", - "@wordpress/notices": "^4.19.0", - "@wordpress/patterns": "^1.12.1", - "@wordpress/primitives": "^3.49.0", - "@wordpress/private-apis": "^0.33.0", - "@wordpress/reusable-blocks": "^4.28.1", - "@wordpress/rich-text": "^6.28.1", - "@wordpress/server-side-render": "^4.28.1", - "@wordpress/url": "^3.52.0", - "@wordpress/viewport": "^5.28.0", - "@wordpress/wordcount": "^3.51.0", + "@wordpress/a11y": "^3.51.1", + "@wordpress/api-fetch": "^6.48.1", + "@wordpress/autop": "^3.51.1", + "@wordpress/blob": "^3.51.1", + "@wordpress/block-editor": "^12.19.2", + "@wordpress/blocks": "^12.28.2", + "@wordpress/components": "^26.0.2", + "@wordpress/compose": "^6.28.1", + "@wordpress/core-data": "^6.28.2", + "@wordpress/data": "^9.21.1", + "@wordpress/date": "^4.51.1", + "@wordpress/deprecated": "^3.51.1", + "@wordpress/dom": "^3.51.1", + "@wordpress/element": "^5.28.1", + "@wordpress/escape-html": "^2.51.1", + "@wordpress/hooks": "^3.51.1", + "@wordpress/html-entities": "^3.51.1", + "@wordpress/i18n": "^4.51.1", + "@wordpress/icons": "^9.42.1", + "@wordpress/interactivity": "^5.0.1", + "@wordpress/interactivity-router": "^1.1.1", + "@wordpress/keycodes": "^3.51.1", + "@wordpress/notices": "^4.19.1", + "@wordpress/patterns": "^1.12.2", + "@wordpress/primitives": "^3.49.1", + "@wordpress/private-apis": "^0.33.1", + "@wordpress/reusable-blocks": "^4.28.2", + "@wordpress/rich-text": "^6.28.2", + "@wordpress/server-side-render": "^4.28.2", + "@wordpress/url": "^3.52.1", + "@wordpress/viewport": "^5.28.1", + "@wordpress/wordcount": "^3.51.1", "change-case": "^4.1.2", "classnames": "^2.3.1", "colord": "^2.7.0", @@ -6344,9 +6344,9 @@ } }, "node_modules/@wordpress/block-serialization-default-parser": { - "version": "4.51.0", - "resolved": "https://registry.npmjs.org/@wordpress/block-serialization-default-parser/-/block-serialization-default-parser-4.51.0.tgz", - "integrity": "sha512-GQQ6hu7exCmk8KN7wW2Mvmo1CZjBC8sVZZ87lwciKYs963AKrFSySS6JIvI1fxJagHVAddP1MbW5xLYrFt+ISg==", + "version": "4.51.1", + "resolved": "https://registry.npmjs.org/@wordpress/block-serialization-default-parser/-/block-serialization-default-parser-4.51.1.tgz", + "integrity": "sha512-5qvbGVRaHBZCt8UmFvC0dJbcBOUlrpGj495rs1XzqH7hp0GItYkTHcH6LFnEYbURJXjyCmNlhZISGU5Z+Iql3w==", "dependencies": { "@babel/runtime": "^7.16.0" }, @@ -6355,26 +6355,26 @@ } }, "node_modules/@wordpress/blocks": { - "version": "12.28.1", - "resolved": "https://registry.npmjs.org/@wordpress/blocks/-/blocks-12.28.1.tgz", - "integrity": "sha512-eOmNQQyaXiYQLyW5U+pTkX/+2nFcRc+hGJKQhCbPzotWlFeOexTu1J7X9drfN7ikfFSYxtG2EGWMgHcY2PtU5A==", + "version": "12.28.2", + "resolved": "https://registry.npmjs.org/@wordpress/blocks/-/blocks-12.28.2.tgz", + "integrity": "sha512-WgGChxUWQx48ofMgNjZE3c14Ysr8T7AjBetww6zxxvUkRgmGgRFLWUD5syVZ3Zv7lXPOh5IL8PeL9stNw8/+uw==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/autop": "^3.51.0", - "@wordpress/blob": "^3.51.0", - "@wordpress/block-serialization-default-parser": "^4.51.0", - "@wordpress/compose": "^6.28.0", - "@wordpress/data": "^9.21.0", - "@wordpress/deprecated": "^3.51.0", - "@wordpress/dom": "^3.51.0", - "@wordpress/element": "^5.28.0", - "@wordpress/hooks": "^3.51.0", - "@wordpress/html-entities": "^3.51.0", - "@wordpress/i18n": "^4.51.0", - "@wordpress/is-shallow-equal": "^4.51.0", - "@wordpress/private-apis": "^0.33.0", - "@wordpress/rich-text": "^6.28.1", - "@wordpress/shortcode": "^3.51.0", + "@wordpress/autop": "^3.51.1", + "@wordpress/blob": "^3.51.1", + "@wordpress/block-serialization-default-parser": "^4.51.1", + "@wordpress/compose": "^6.28.1", + "@wordpress/data": "^9.21.1", + "@wordpress/deprecated": "^3.51.1", + "@wordpress/dom": "^3.51.1", + "@wordpress/element": "^5.28.1", + "@wordpress/hooks": "^3.51.1", + "@wordpress/html-entities": "^3.51.1", + "@wordpress/i18n": "^4.51.1", + "@wordpress/is-shallow-equal": "^4.51.1", + "@wordpress/private-apis": "^0.33.1", + "@wordpress/rich-text": "^6.28.2", + "@wordpress/shortcode": "^3.51.1", "change-case": "^4.1.2", "colord": "^2.7.0", "fast-deep-equal": "^3.1.3", @@ -6396,27 +6396,27 @@ } }, "node_modules/@wordpress/browserslist-config": { - "version": "5.34.0", - "resolved": "https://registry.npmjs.org/@wordpress/browserslist-config/-/browserslist-config-5.34.0.tgz", - "integrity": "sha512-LafF3XoetOAN99bktOzc9hSOv7cPoQEe0/KPgiw24t77xvRqLuWww+zYbiHAHYSzdBGngrlNwRLgloSifnp+hg==", + "version": "5.34.1", + "resolved": "https://registry.npmjs.org/@wordpress/browserslist-config/-/browserslist-config-5.34.1.tgz", + "integrity": "sha512-n2Tnqsg2JpoTgo/TvmbuX6XhGCH88dNxYI3vkLsfeWQmm3eHUZ/bIcAvINQh+j2nGmASFQLXGm/H4cWLSKO3jw==", "dev": true, "engines": { "node": ">=14" } }, "node_modules/@wordpress/commands": { - "version": "0.22.1", - "resolved": "https://registry.npmjs.org/@wordpress/commands/-/commands-0.22.1.tgz", - "integrity": "sha512-lA5LH7fyV0ov8QgZ1cetstTH9pQL+3b0RAYoR/MJJLOzlEdg7NXbb2vIKTYZ13oF1Oo4oIdrG+JDUeL94wVVvQ==", + "version": "0.22.2", + "resolved": "https://registry.npmjs.org/@wordpress/commands/-/commands-0.22.2.tgz", + "integrity": "sha512-S+OLVQEG2lWMU4mcDQ2sP3lgRkTzSna2ETarKorOLtA1JjkjDPRZdo8rky8vB9DzycIFiYs3VrArUIhe8NgAVw==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/components": "^26.0.1", - "@wordpress/data": "^9.21.0", - "@wordpress/element": "^5.28.0", - "@wordpress/i18n": "^4.51.0", - "@wordpress/icons": "^9.42.0", - "@wordpress/keyboard-shortcuts": "^4.28.0", - "@wordpress/private-apis": "^0.33.0", + "@wordpress/components": "^26.0.2", + "@wordpress/data": "^9.21.1", + "@wordpress/element": "^5.28.1", + "@wordpress/i18n": "^4.51.1", + "@wordpress/icons": "^9.42.1", + "@wordpress/keyboard-shortcuts": "^4.28.1", + "@wordpress/private-apis": "^0.33.1", "classnames": "^2.3.1", "cmdk": "^0.2.0", "rememo": "^4.0.2" @@ -6430,9 +6430,9 @@ } }, "node_modules/@wordpress/components": { - "version": "26.0.1", - "resolved": "https://registry.npmjs.org/@wordpress/components/-/components-26.0.1.tgz", - "integrity": "sha512-kHrQVm109nXYHfoea0KlIKa8RIIMrx/vgnUb0mKKA4BGhg/kGaNW+vYnWVE5W/kGEDk+7Y8fiDnwicc5AisuBg==", + "version": "26.0.2", + "resolved": "https://registry.npmjs.org/@wordpress/components/-/components-26.0.2.tgz", + "integrity": "sha512-wBcWcbkIGqa5iZmbV3mcxGImNmZroKQOSuN1c71qaogISxfV6QlV8+Ww7fzk43FflZQG77NOoN/lc0Mnwkobtg==", "dependencies": { "@ariakit/react": "^0.3.12", "@babel/runtime": "^7.16.0", @@ -6446,23 +6446,23 @@ "@types/gradient-parser": "0.1.3", "@types/highlight-words-core": "1.2.1", "@use-gesture/react": "^10.2.24", - "@wordpress/a11y": "^3.51.0", - "@wordpress/compose": "^6.28.0", - "@wordpress/date": "^4.51.0", - "@wordpress/deprecated": "^3.51.0", - "@wordpress/dom": "^3.51.0", - "@wordpress/element": "^5.28.0", - "@wordpress/escape-html": "^2.51.0", - "@wordpress/hooks": "^3.51.0", - "@wordpress/html-entities": "^3.51.0", - "@wordpress/i18n": "^4.51.0", - "@wordpress/icons": "^9.42.0", - "@wordpress/is-shallow-equal": "^4.51.0", - "@wordpress/keycodes": "^3.51.0", - "@wordpress/primitives": "^3.49.0", - "@wordpress/private-apis": "^0.33.0", - "@wordpress/rich-text": "^6.28.1", - "@wordpress/warning": "^2.51.0", + "@wordpress/a11y": "^3.51.1", + "@wordpress/compose": "^6.28.1", + "@wordpress/date": "^4.51.1", + "@wordpress/deprecated": "^3.51.1", + "@wordpress/dom": "^3.51.1", + "@wordpress/element": "^5.28.1", + "@wordpress/escape-html": "^2.51.1", + "@wordpress/hooks": "^3.51.1", + "@wordpress/html-entities": "^3.51.1", + "@wordpress/i18n": "^4.51.1", + "@wordpress/icons": "^9.42.1", + "@wordpress/is-shallow-equal": "^4.51.1", + "@wordpress/keycodes": "^3.51.1", + "@wordpress/primitives": "^3.49.1", + "@wordpress/private-apis": "^0.33.1", + "@wordpress/rich-text": "^6.28.2", + "@wordpress/warning": "^2.51.1", "change-case": "^4.1.2", "classnames": "^2.3.1", "colord": "^2.7.0", @@ -6493,19 +6493,19 @@ } }, "node_modules/@wordpress/compose": { - "version": "6.28.0", - "resolved": "https://registry.npmjs.org/@wordpress/compose/-/compose-6.28.0.tgz", - "integrity": "sha512-Vx1SDgG3wIaiB/sUZcYB6csG0s5H3Lv5p9oKy8NDkA9dVfHoUz/XLwdx/yzsB3mqvDcZqReEQeoYHP7F4HeWqA==", + "version": "6.28.1", + "resolved": "https://registry.npmjs.org/@wordpress/compose/-/compose-6.28.1.tgz", + "integrity": "sha512-ex5cd0JqmH1RTPmk0Q1KdqQHTBNlWGa2d3VjLg2RjXVmfdJf5CR0QTSo9Id40NpUrGQ4Dne7koaMi2r6P32OuA==", "dependencies": { "@babel/runtime": "^7.16.0", "@types/mousetrap": "^1.6.8", - "@wordpress/deprecated": "^3.51.0", - "@wordpress/dom": "^3.51.0", - "@wordpress/element": "^5.28.0", - "@wordpress/is-shallow-equal": "^4.51.0", - "@wordpress/keycodes": "^3.51.0", - "@wordpress/priority-queue": "^2.51.0", - "@wordpress/undo-manager": "^0.11.0", + "@wordpress/deprecated": "^3.51.1", + "@wordpress/dom": "^3.51.1", + "@wordpress/element": "^5.28.1", + "@wordpress/is-shallow-equal": "^4.51.1", + "@wordpress/keycodes": "^3.51.1", + "@wordpress/priority-queue": "^2.51.1", + "@wordpress/undo-manager": "^0.11.1", "change-case": "^4.1.2", "clipboard": "^2.0.11", "mousetrap": "^1.6.5", @@ -6519,22 +6519,22 @@ } }, "node_modules/@wordpress/core-commands": { - "version": "0.20.1", - "resolved": "https://registry.npmjs.org/@wordpress/core-commands/-/core-commands-0.20.1.tgz", - "integrity": "sha512-HwyCMCuhR5Fjzmgnca9+rvoUrPu2PZS9lCKEdy2i8vv8fRKWSYtHPTGZJpxAGDh29roJTCDUcSlciJyEt+f6kA==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@wordpress/core-commands/-/core-commands-0.20.2.tgz", + "integrity": "sha512-F2kRVV3C029qmiOrgKF5Xa/ZyGOcnWmrH0p9jzCCGNRVRLo8SVbraOzIB9jyyCDwMHyOWRJDUZ2+tCO431Dy1Q==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/block-editor": "^12.19.1", - "@wordpress/commands": "^0.22.1", - "@wordpress/compose": "^6.28.0", - "@wordpress/core-data": "^6.28.1", - "@wordpress/data": "^9.21.0", - "@wordpress/element": "^5.28.0", - "@wordpress/i18n": "^4.51.0", - "@wordpress/icons": "^9.42.0", - "@wordpress/private-apis": "^0.33.0", - "@wordpress/router": "^0.20.0", - "@wordpress/url": "^3.52.0" + "@wordpress/block-editor": "^12.19.2", + "@wordpress/commands": "^0.22.2", + "@wordpress/compose": "^6.28.1", + "@wordpress/core-data": "^6.28.2", + "@wordpress/data": "^9.21.1", + "@wordpress/element": "^5.28.1", + "@wordpress/i18n": "^4.51.1", + "@wordpress/icons": "^9.42.1", + "@wordpress/private-apis": "^0.33.1", + "@wordpress/router": "^0.20.1", + "@wordpress/url": "^3.52.1" }, "engines": { "node": ">=12" @@ -6545,26 +6545,26 @@ } }, "node_modules/@wordpress/core-data": { - "version": "6.28.1", - "resolved": "https://registry.npmjs.org/@wordpress/core-data/-/core-data-6.28.1.tgz", - "integrity": "sha512-nsWF83Ssf7QH+jPSkxv5w1PYTC7yZ281kcQBJHWcb27NWsJu0iJ6qPO/h94PItU8yOdeWQ7e6zOJ2gWSvZVtHg==", + "version": "6.28.2", + "resolved": "https://registry.npmjs.org/@wordpress/core-data/-/core-data-6.28.2.tgz", + "integrity": "sha512-sHvYV3yYYzeEtpdElAVKwW+ZW2Hcn70g69opiyMDqGGL3/HbdUp56RjxEV7wCsnXUYlfeKrTV8TL61+uYZyktw==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/api-fetch": "^6.48.0", - "@wordpress/block-editor": "^12.19.1", - "@wordpress/blocks": "^12.28.1", - "@wordpress/compose": "^6.28.0", - "@wordpress/data": "^9.21.0", - "@wordpress/deprecated": "^3.51.0", - "@wordpress/element": "^5.28.0", - "@wordpress/html-entities": "^3.51.0", - "@wordpress/i18n": "^4.51.0", - "@wordpress/is-shallow-equal": "^4.51.0", - "@wordpress/private-apis": "^0.33.0", - "@wordpress/rich-text": "^6.28.1", - "@wordpress/sync": "^0.13.0", - "@wordpress/undo-manager": "^0.11.0", - "@wordpress/url": "^3.52.0", + "@wordpress/api-fetch": "^6.48.1", + "@wordpress/block-editor": "^12.19.2", + "@wordpress/blocks": "^12.28.2", + "@wordpress/compose": "^6.28.1", + "@wordpress/data": "^9.21.1", + "@wordpress/deprecated": "^3.51.1", + "@wordpress/element": "^5.28.1", + "@wordpress/html-entities": "^3.51.1", + "@wordpress/i18n": "^4.51.1", + "@wordpress/is-shallow-equal": "^4.51.1", + "@wordpress/private-apis": "^0.33.1", + "@wordpress/rich-text": "^6.28.2", + "@wordpress/sync": "^0.13.1", + "@wordpress/undo-manager": "^0.11.1", + "@wordpress/url": "^3.52.1", "change-case": "^4.1.2", "equivalent-key-map": "^0.2.2", "fast-deep-equal": "^3.1.3", @@ -6581,31 +6581,31 @@ } }, "node_modules/@wordpress/customize-widgets": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/@wordpress/customize-widgets/-/customize-widgets-4.28.1.tgz", - "integrity": "sha512-JmTTzMvW84RuoNf6kEA+itKyJkNSsHw/8iB1mb67yd+c2G+48IFsPk3D296RBg4TmiMFRg3VbIYz/oJcS/s3Kw==", + "version": "4.28.2", + "resolved": "https://registry.npmjs.org/@wordpress/customize-widgets/-/customize-widgets-4.28.2.tgz", + "integrity": "sha512-iNAR6z8IrZkL9b/dbJcM0TudbmPH1p32BJeqOAazLn8tBvBrLIjEuuNfJuUJla9zs877URDC8PEF+lHtPbm9cA==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/block-editor": "^12.19.1", - "@wordpress/block-library": "^8.28.1", - "@wordpress/blocks": "^12.28.1", - "@wordpress/components": "^26.0.1", - "@wordpress/compose": "^6.28.0", - "@wordpress/core-data": "^6.28.1", - "@wordpress/data": "^9.21.0", - "@wordpress/dom": "^3.51.0", - "@wordpress/element": "^5.28.0", - "@wordpress/hooks": "^3.51.0", - "@wordpress/i18n": "^4.51.0", - "@wordpress/icons": "^9.42.0", - "@wordpress/interface": "^5.28.1", - "@wordpress/is-shallow-equal": "^4.51.0", - "@wordpress/keyboard-shortcuts": "^4.28.0", - "@wordpress/keycodes": "^3.51.0", - "@wordpress/media-utils": "^4.42.0", - "@wordpress/preferences": "^3.28.1", - "@wordpress/private-apis": "^0.33.0", - "@wordpress/widgets": "^3.28.1", + "@wordpress/block-editor": "^12.19.2", + "@wordpress/block-library": "^8.28.2", + "@wordpress/blocks": "^12.28.2", + "@wordpress/components": "^26.0.2", + "@wordpress/compose": "^6.28.1", + "@wordpress/core-data": "^6.28.2", + "@wordpress/data": "^9.21.1", + "@wordpress/dom": "^3.51.1", + "@wordpress/element": "^5.28.1", + "@wordpress/hooks": "^3.51.1", + "@wordpress/i18n": "^4.51.1", + "@wordpress/icons": "^9.42.1", + "@wordpress/interface": "^5.28.2", + "@wordpress/is-shallow-equal": "^4.51.1", + "@wordpress/keyboard-shortcuts": "^4.28.1", + "@wordpress/keycodes": "^3.51.1", + "@wordpress/media-utils": "^4.42.1", + "@wordpress/preferences": "^3.28.2", + "@wordpress/private-apis": "^0.33.1", + "@wordpress/widgets": "^3.28.2", "classnames": "^2.3.1", "fast-deep-equal": "^3.1.3" }, @@ -6618,18 +6618,18 @@ } }, "node_modules/@wordpress/data": { - "version": "9.21.0", - "resolved": "https://registry.npmjs.org/@wordpress/data/-/data-9.21.0.tgz", - "integrity": "sha512-jEAWHcR+xlnI+V0l5N2WLZrZ7THZ+wQjIs5gDHg1wcRLWo7oxe8JHPQ4sIf0zqNaCwj3/svXFvg7pkaJqkDHAw==", + "version": "9.21.1", + "resolved": "https://registry.npmjs.org/@wordpress/data/-/data-9.21.1.tgz", + "integrity": "sha512-7B9ABDvs0V0fb/GvrL5T14KauZNI133u/v5IBAuq89YvZPBUOAFiO/h8DxdkdV1Rr/q79knxAfDxxarjbFzBiw==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/compose": "^6.28.0", - "@wordpress/deprecated": "^3.51.0", - "@wordpress/element": "^5.28.0", - "@wordpress/is-shallow-equal": "^4.51.0", - "@wordpress/priority-queue": "^2.51.0", - "@wordpress/private-apis": "^0.33.0", - "@wordpress/redux-routine": "^4.51.0", + "@wordpress/compose": "^6.28.1", + "@wordpress/deprecated": "^3.51.1", + "@wordpress/element": "^5.28.1", + "@wordpress/is-shallow-equal": "^4.51.1", + "@wordpress/priority-queue": "^2.51.1", + "@wordpress/private-apis": "^0.33.1", + "@wordpress/redux-routine": "^4.51.1", "deepmerge": "^4.3.0", "equivalent-key-map": "^0.2.2", "is-plain-object": "^5.0.0", @@ -6646,14 +6646,14 @@ } }, "node_modules/@wordpress/data-controls": { - "version": "3.20.0", - "resolved": "https://registry.npmjs.org/@wordpress/data-controls/-/data-controls-3.20.0.tgz", - "integrity": "sha512-sLjZi681AsA5RQ7eke6svKaqRQ08Vv3ufINHgWBKhf2E3iUuZhOMsGB7i+GBAed1IcroWQX1QfQ8C46c8EL2xA==", + "version": "3.20.1", + "resolved": "https://registry.npmjs.org/@wordpress/data-controls/-/data-controls-3.20.1.tgz", + "integrity": "sha512-ty5PCiE21iuWqVpC7XmkgUjP3jq6jKi2K8CZZWpdBA3wcEpKWbB/qCJ5Y3K1bofxkAjvudsrIdczvcUPk2/KCg==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/api-fetch": "^6.48.0", - "@wordpress/data": "^9.21.0", - "@wordpress/deprecated": "^3.51.0" + "@wordpress/api-fetch": "^6.48.1", + "@wordpress/data": "^9.21.1", + "@wordpress/deprecated": "^3.51.1" }, "engines": { "node": ">=12" @@ -6663,21 +6663,21 @@ } }, "node_modules/@wordpress/dataviews": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/@wordpress/dataviews/-/dataviews-0.5.1.tgz", - "integrity": "sha512-BJbgCux+zqCOhUz0yJFcPbL/fxcQG1xDqdwDK1noOfNIA+iR9VPy7IuBt0sbNRiO9tLJRQsM757zVkOOVy6glA==", + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/@wordpress/dataviews/-/dataviews-0.5.2.tgz", + "integrity": "sha512-1WZzxuTm2OvKwa7WwwP/eX0Q8ia8MZ1CXZz7pUhVGYPKBVzRUTFEeGdkGudC0WIBEpAOlYLi5DT/T5v7xxPlnQ==", "dependencies": { "@ariakit/react": "^0.3.12", "@babel/runtime": "^7.16.0", - "@wordpress/a11y": "^3.51.0", - "@wordpress/components": "^26.0.1", - "@wordpress/compose": "^6.28.0", - "@wordpress/element": "^5.28.0", - "@wordpress/i18n": "^4.51.0", - "@wordpress/icons": "^9.42.0", - "@wordpress/keycodes": "^3.51.0", - "@wordpress/primitives": "^3.49.0", - "@wordpress/private-apis": "^0.33.0", + "@wordpress/a11y": "^3.51.1", + "@wordpress/components": "^26.0.2", + "@wordpress/compose": "^6.28.1", + "@wordpress/element": "^5.28.1", + "@wordpress/i18n": "^4.51.1", + "@wordpress/icons": "^9.42.1", + "@wordpress/keycodes": "^3.51.1", + "@wordpress/primitives": "^3.49.1", + "@wordpress/private-apis": "^0.33.1", "classnames": "^2.3.1", "remove-accents": "^0.5.0" }, @@ -6689,12 +6689,12 @@ } }, "node_modules/@wordpress/date": { - "version": "4.51.0", - "resolved": "https://registry.npmjs.org/@wordpress/date/-/date-4.51.0.tgz", - "integrity": "sha512-RqnaIJa8gJ2F8Hj2SLbjk7V4dSRObxIhud+/xneSi4PoPi0pYL3sIGoppXXpyZINhCfMiVZ2JIc8Ryt0zgYxAw==", + "version": "4.51.1", + "resolved": "https://registry.npmjs.org/@wordpress/date/-/date-4.51.1.tgz", + "integrity": "sha512-Pb1o2ANcoOhLguOxMldkAuGmrnn2EoaQrxYdKxTjXHbOQo1ttU/5zAz1RiTvWpNcq+PNJfjQ7bFyFWRMDd06oA==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/deprecated": "^3.51.0", + "@wordpress/deprecated": "^3.51.1", "moment": "^2.29.4", "moment-timezone": "^0.5.40" }, @@ -6703,9 +6703,9 @@ } }, "node_modules/@wordpress/dependency-extraction-webpack-plugin": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@wordpress/dependency-extraction-webpack-plugin/-/dependency-extraction-webpack-plugin-5.2.0.tgz", - "integrity": "sha512-BOwGopKL5MocUnmrum9tS+HttzFaY3z5CE6sE2DsoM9BWo6OomM6XC5iNGjbv7KDTmxdxjKr0Yzr6YUeSbNrRA==", + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/@wordpress/dependency-extraction-webpack-plugin/-/dependency-extraction-webpack-plugin-5.2.1.tgz", + "integrity": "sha512-vFLbMsexjD42ONf4xP9vViAQwtvqWoQMKCCQwui8FWYlM1iHYEvI/NxwheFLV/I2kpEDODfCDrWNq4N98aSRCQ==", "dev": true, "dependencies": { "json2php": "^0.0.7" @@ -6718,33 +6718,33 @@ } }, "node_modules/@wordpress/deprecated": { - "version": "3.51.0", - "resolved": "https://registry.npmjs.org/@wordpress/deprecated/-/deprecated-3.51.0.tgz", - "integrity": "sha512-jbhK5/zhn2D6xW0WqEFitxowgrlIL03CdG0gMQ9JJNlewvI2qg+4fj9k/ORQh8l5UpBUfkwUHVMaGQswtUUaeQ==", + "version": "3.51.1", + "resolved": "https://registry.npmjs.org/@wordpress/deprecated/-/deprecated-3.51.1.tgz", + "integrity": "sha512-rg+uzNFPQxoZS4essv1jZuJXcWfGs3S9yBsUMPywjSNp0lefHl5jFxqLriYbTX8VlwjgdITU4y5eWheTHq7WnQ==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/hooks": "^3.51.0" + "@wordpress/hooks": "^3.51.1" }, "engines": { "node": ">=12" } }, "node_modules/@wordpress/dom": { - "version": "3.51.0", - "resolved": "https://registry.npmjs.org/@wordpress/dom/-/dom-3.51.0.tgz", - "integrity": "sha512-5L8iQCq2t+4qHpo4MBZqMg5MqmVZI/U/BaF50yhtTZQSGyhR2SzlixnL8udwatm8KQFteWj8Zwmmu+3GXRTB2Q==", + "version": "3.51.1", + "resolved": "https://registry.npmjs.org/@wordpress/dom/-/dom-3.51.1.tgz", + "integrity": "sha512-EfrgZ1BUr5sesgtzFFWjX4TJfDmL8/1PgGN48P6C3heykocH2/R9ECQvlOKvMrAcJuKKlkvdM8z93pTwFaArxw==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/deprecated": "^3.51.0" + "@wordpress/deprecated": "^3.51.1" }, "engines": { "node": ">=12" } }, "node_modules/@wordpress/dom-ready": { - "version": "3.51.0", - "resolved": "https://registry.npmjs.org/@wordpress/dom-ready/-/dom-ready-3.51.0.tgz", - "integrity": "sha512-k8+UhRu7moBPWUa1EAfqF+r5VT8EnBGr4zxV+jJJZZg0tTN61RD/mJ0kSzu/0PVQQsAiDgAhxWrfVy2FwFdpCw==", + "version": "3.51.1", + "resolved": "https://registry.npmjs.org/@wordpress/dom-ready/-/dom-ready-3.51.1.tgz", + "integrity": "sha512-YgmuBqBW25RHio+m7qsSV8NYFcpTX3pxsK4FLWui6WMwUrKslZc9MZHB332Cfn2dOlR/fFEtcDO28KYT7AzCOQ==", "dependencies": { "@babel/runtime": "^7.16.0" }, @@ -6753,15 +6753,15 @@ } }, "node_modules/@wordpress/e2e-test-utils": { - "version": "10.22.0", - "resolved": "https://registry.npmjs.org/@wordpress/e2e-test-utils/-/e2e-test-utils-10.22.0.tgz", - "integrity": "sha512-y+JWxgHuTgRwomApfbgHyDj//iYFuerL7BwoxYAfA/dk59C10H3nfqRPxtrca1vh1249e5w76xOM+Y353BleJg==", + "version": "10.22.1", + "resolved": "https://registry.npmjs.org/@wordpress/e2e-test-utils/-/e2e-test-utils-10.22.1.tgz", + "integrity": "sha512-BBSqwuLkrW4T+hH5cfWQ+GFjZXZx/MhNfML9IsCbFkYokEGLlVW+ImC4JFJ4Q3cA97ZgBKPew33iEocq7K2Vtg==", "dev": true, "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/api-fetch": "^6.48.0", - "@wordpress/keycodes": "^3.51.0", - "@wordpress/url": "^3.52.0", + "@wordpress/api-fetch": "^6.48.1", + "@wordpress/keycodes": "^3.51.1", + "@wordpress/url": "^3.52.1", "change-case": "^4.1.2", "form-data": "^4.0.0", "node-fetch": "^2.6.0" @@ -6775,14 +6775,14 @@ } }, "node_modules/@wordpress/e2e-test-utils-playwright": { - "version": "0.19.0", - "resolved": "https://registry.npmjs.org/@wordpress/e2e-test-utils-playwright/-/e2e-test-utils-playwright-0.19.0.tgz", - "integrity": "sha512-iNg5t+fqNZwzBULhe9kMGd36nVlX/WmNeB75wDUKX37fms2ZhiMppj7lt5VGQ82nWDvM+Fq/h89wfioeJKiHhA==", + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@wordpress/e2e-test-utils-playwright/-/e2e-test-utils-playwright-0.19.1.tgz", + "integrity": "sha512-/UIOhYpb8wBSRMIpZyjkDv4Sb7//lHrLRqe6B8tNUhTBfkLl0PDPedZZubnW3L4x0nagEl3v/6B+2JomIW3n+g==", "dev": true, "dependencies": { - "@wordpress/api-fetch": "^6.48.0", - "@wordpress/keycodes": "^3.51.0", - "@wordpress/url": "^3.52.0", + "@wordpress/api-fetch": "^6.48.1", + "@wordpress/keycodes": "^3.51.1", + "@wordpress/url": "^3.52.1", "change-case": "^4.1.2", "form-data": "^4.0.0", "get-port": "^5.1.1", @@ -6838,41 +6838,41 @@ } }, "node_modules/@wordpress/edit-post": { - "version": "7.28.1", - "resolved": "https://registry.npmjs.org/@wordpress/edit-post/-/edit-post-7.28.1.tgz", - "integrity": "sha512-CadJAEJBw94awjIbPFm1kM8qaGYmQSscWaQmC8WVQn3qXz0tkNHEhdnW9y0kLCKoq1B+5cXm04WKEUzfw0Ei5g==", + "version": "7.28.2", + "resolved": "https://registry.npmjs.org/@wordpress/edit-post/-/edit-post-7.28.2.tgz", + "integrity": "sha512-MbVtKym3EPxTh0cKVZYRGD+Qq6vY+RTLQ691Qoqafw0e7IYMv5naKD9OQvHU/nj9SNUQam+/2a5ByLy3L+Q22Q==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/a11y": "^3.51.0", - "@wordpress/api-fetch": "^6.48.0", - "@wordpress/block-editor": "^12.19.1", - "@wordpress/block-library": "^8.28.1", - "@wordpress/blocks": "^12.28.1", - "@wordpress/commands": "^0.22.1", - "@wordpress/components": "^26.0.1", - "@wordpress/compose": "^6.28.0", - "@wordpress/core-commands": "^0.20.1", - "@wordpress/core-data": "^6.28.1", - "@wordpress/data": "^9.21.0", - "@wordpress/deprecated": "^3.51.0", - "@wordpress/dom": "^3.51.0", - "@wordpress/editor": "^13.28.1", - "@wordpress/element": "^5.28.0", - "@wordpress/hooks": "^3.51.0", - "@wordpress/i18n": "^4.51.0", - "@wordpress/icons": "^9.42.0", - "@wordpress/interface": "^5.28.1", - "@wordpress/keyboard-shortcuts": "^4.28.0", - "@wordpress/keycodes": "^3.51.0", - "@wordpress/media-utils": "^4.42.0", - "@wordpress/notices": "^4.19.0", - "@wordpress/plugins": "^6.19.1", - "@wordpress/preferences": "^3.28.1", - "@wordpress/private-apis": "^0.33.0", - "@wordpress/url": "^3.52.0", - "@wordpress/viewport": "^5.28.0", - "@wordpress/warning": "^2.51.0", - "@wordpress/widgets": "^3.28.1", + "@wordpress/a11y": "^3.51.1", + "@wordpress/api-fetch": "^6.48.1", + "@wordpress/block-editor": "^12.19.2", + "@wordpress/block-library": "^8.28.2", + "@wordpress/blocks": "^12.28.2", + "@wordpress/commands": "^0.22.2", + "@wordpress/components": "^26.0.2", + "@wordpress/compose": "^6.28.1", + "@wordpress/core-commands": "^0.20.2", + "@wordpress/core-data": "^6.28.2", + "@wordpress/data": "^9.21.1", + "@wordpress/deprecated": "^3.51.1", + "@wordpress/dom": "^3.51.1", + "@wordpress/editor": "^13.28.2", + "@wordpress/element": "^5.28.1", + "@wordpress/hooks": "^3.51.1", + "@wordpress/i18n": "^4.51.1", + "@wordpress/icons": "^9.42.1", + "@wordpress/interface": "^5.28.2", + "@wordpress/keyboard-shortcuts": "^4.28.1", + "@wordpress/keycodes": "^3.51.1", + "@wordpress/media-utils": "^4.42.1", + "@wordpress/notices": "^4.19.1", + "@wordpress/plugins": "^6.19.2", + "@wordpress/preferences": "^3.28.2", + "@wordpress/private-apis": "^0.33.1", + "@wordpress/url": "^3.52.1", + "@wordpress/viewport": "^5.28.1", + "@wordpress/warning": "^2.51.1", + "@wordpress/widgets": "^3.28.2", "classnames": "^2.3.1", "memize": "^2.1.0", "rememo": "^4.0.2" @@ -6886,51 +6886,51 @@ } }, "node_modules/@wordpress/edit-site": { - "version": "5.28.1", - "resolved": "https://registry.npmjs.org/@wordpress/edit-site/-/edit-site-5.28.1.tgz", - "integrity": "sha512-IX87ujYhDSapXyNBafHqgc1IUdZVH7xdyGLSjjFMpfseRavqdpyQ3bAqG0b8/0XdoKU9Nf8k+a++4eZ60hMIQw==", + "version": "5.28.2", + "resolved": "https://registry.npmjs.org/@wordpress/edit-site/-/edit-site-5.28.2.tgz", + "integrity": "sha512-JivIgorNdhxvqWT8DOqIcF/aUuERRdlVDvq01ISZzD2JcQLeMBWzblQuEb42a+VH4c77xH8bQVuhSCmaV6G+iA==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/a11y": "^3.51.0", - "@wordpress/api-fetch": "^6.48.0", - "@wordpress/blob": "^3.51.0", - "@wordpress/block-editor": "^12.19.1", - "@wordpress/block-library": "^8.28.1", - "@wordpress/blocks": "^12.28.1", - "@wordpress/commands": "^0.22.1", - "@wordpress/components": "^26.0.1", - "@wordpress/compose": "^6.28.0", - "@wordpress/core-commands": "^0.20.1", - "@wordpress/core-data": "^6.28.1", - "@wordpress/data": "^9.21.0", - "@wordpress/dataviews": "^0.5.1", - "@wordpress/date": "^4.51.0", - "@wordpress/deprecated": "^3.51.0", - "@wordpress/dom": "^3.51.0", - "@wordpress/editor": "^13.28.1", - "@wordpress/element": "^5.28.0", - "@wordpress/escape-html": "^2.51.0", - "@wordpress/hooks": "^3.51.0", - "@wordpress/html-entities": "^3.51.0", - "@wordpress/i18n": "^4.51.0", - "@wordpress/icons": "^9.42.0", - "@wordpress/interface": "^5.28.1", - "@wordpress/keyboard-shortcuts": "^4.28.0", - "@wordpress/keycodes": "^3.51.0", - "@wordpress/media-utils": "^4.42.0", - "@wordpress/notices": "^4.19.0", - "@wordpress/patterns": "^1.12.1", - "@wordpress/plugins": "^6.19.1", - "@wordpress/preferences": "^3.28.1", - "@wordpress/primitives": "^3.49.0", - "@wordpress/private-apis": "^0.33.0", - "@wordpress/reusable-blocks": "^4.28.1", - "@wordpress/router": "^0.20.0", - "@wordpress/style-engine": "^1.34.0", - "@wordpress/url": "^3.52.0", - "@wordpress/viewport": "^5.28.0", - "@wordpress/widgets": "^3.28.1", - "@wordpress/wordcount": "^3.51.0", + "@wordpress/a11y": "^3.51.1", + "@wordpress/api-fetch": "^6.48.1", + "@wordpress/blob": "^3.51.1", + "@wordpress/block-editor": "^12.19.2", + "@wordpress/block-library": "^8.28.2", + "@wordpress/blocks": "^12.28.2", + "@wordpress/commands": "^0.22.2", + "@wordpress/components": "^26.0.2", + "@wordpress/compose": "^6.28.1", + "@wordpress/core-commands": "^0.20.2", + "@wordpress/core-data": "^6.28.2", + "@wordpress/data": "^9.21.1", + "@wordpress/dataviews": "^0.5.2", + "@wordpress/date": "^4.51.1", + "@wordpress/deprecated": "^3.51.1", + "@wordpress/dom": "^3.51.1", + "@wordpress/editor": "^13.28.2", + "@wordpress/element": "^5.28.1", + "@wordpress/escape-html": "^2.51.1", + "@wordpress/hooks": "^3.51.1", + "@wordpress/html-entities": "^3.51.1", + "@wordpress/i18n": "^4.51.1", + "@wordpress/icons": "^9.42.1", + "@wordpress/interface": "^5.28.2", + "@wordpress/keyboard-shortcuts": "^4.28.1", + "@wordpress/keycodes": "^3.51.1", + "@wordpress/media-utils": "^4.42.1", + "@wordpress/notices": "^4.19.1", + "@wordpress/patterns": "^1.12.2", + "@wordpress/plugins": "^6.19.2", + "@wordpress/preferences": "^3.28.2", + "@wordpress/primitives": "^3.49.1", + "@wordpress/private-apis": "^0.33.1", + "@wordpress/reusable-blocks": "^4.28.2", + "@wordpress/router": "^0.20.1", + "@wordpress/style-engine": "^1.34.1", + "@wordpress/url": "^3.52.1", + "@wordpress/viewport": "^5.28.1", + "@wordpress/widgets": "^3.28.2", + "@wordpress/wordcount": "^3.51.1", "change-case": "^4.1.2", "classnames": "^2.3.1", "colord": "^2.9.2", @@ -6951,37 +6951,37 @@ } }, "node_modules/@wordpress/edit-widgets": { - "version": "5.28.1", - "resolved": "https://registry.npmjs.org/@wordpress/edit-widgets/-/edit-widgets-5.28.1.tgz", - "integrity": "sha512-/eDYnVQ1HXz/QGvqfj2uaIbzoxyiNCxhfarnGcd9DeLdM5nU47cexEDRfkQUd4vQL2S9GlOep03dWnw3hTVVXA==", + "version": "5.28.2", + "resolved": "https://registry.npmjs.org/@wordpress/edit-widgets/-/edit-widgets-5.28.2.tgz", + "integrity": "sha512-8dC6Jthv10hIePrIluyb2hl7fUPIIHksHpvieKGJGLZHxA4+Lcp7JFIeC9/rys00xX5GVItKTNqDOn1FUQT/Cw==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/api-fetch": "^6.48.0", - "@wordpress/block-editor": "^12.19.1", - "@wordpress/block-library": "^8.28.1", - "@wordpress/blocks": "^12.28.1", - "@wordpress/components": "^26.0.1", - "@wordpress/compose": "^6.28.0", - "@wordpress/core-data": "^6.28.1", - "@wordpress/data": "^9.21.0", - "@wordpress/deprecated": "^3.51.0", - "@wordpress/dom": "^3.51.0", - "@wordpress/element": "^5.28.0", - "@wordpress/hooks": "^3.51.0", - "@wordpress/i18n": "^4.51.0", - "@wordpress/icons": "^9.42.0", - "@wordpress/interface": "^5.28.1", - "@wordpress/keyboard-shortcuts": "^4.28.0", - "@wordpress/keycodes": "^3.51.0", - "@wordpress/media-utils": "^4.42.0", - "@wordpress/notices": "^4.19.0", - "@wordpress/patterns": "^1.12.1", - "@wordpress/plugins": "^6.19.1", - "@wordpress/preferences": "^3.28.1", - "@wordpress/private-apis": "^0.33.0", - "@wordpress/reusable-blocks": "^4.28.1", - "@wordpress/url": "^3.52.0", - "@wordpress/widgets": "^3.28.1", + "@wordpress/api-fetch": "^6.48.1", + "@wordpress/block-editor": "^12.19.2", + "@wordpress/block-library": "^8.28.2", + "@wordpress/blocks": "^12.28.2", + "@wordpress/components": "^26.0.2", + "@wordpress/compose": "^6.28.1", + "@wordpress/core-data": "^6.28.2", + "@wordpress/data": "^9.21.1", + "@wordpress/deprecated": "^3.51.1", + "@wordpress/dom": "^3.51.1", + "@wordpress/element": "^5.28.1", + "@wordpress/hooks": "^3.51.1", + "@wordpress/i18n": "^4.51.1", + "@wordpress/icons": "^9.42.1", + "@wordpress/interface": "^5.28.2", + "@wordpress/keyboard-shortcuts": "^4.28.1", + "@wordpress/keycodes": "^3.51.1", + "@wordpress/media-utils": "^4.42.1", + "@wordpress/notices": "^4.19.1", + "@wordpress/patterns": "^1.12.2", + "@wordpress/plugins": "^6.19.2", + "@wordpress/preferences": "^3.28.2", + "@wordpress/private-apis": "^0.33.1", + "@wordpress/reusable-blocks": "^4.28.2", + "@wordpress/url": "^3.52.1", + "@wordpress/widgets": "^3.28.2", "classnames": "^2.3.1", "rememo": "^4.0.2" }, @@ -6994,41 +6994,41 @@ } }, "node_modules/@wordpress/editor": { - "version": "13.28.1", - "resolved": "https://registry.npmjs.org/@wordpress/editor/-/editor-13.28.1.tgz", - "integrity": "sha512-KqNOI3iaPUAkPSp7i/IxnOl1TCLrQ4win9NzRMXg7DN7G5KiobpFYYWre1NrbDbBbRMxpu/G12uN1jWGIvGQKQ==", + "version": "13.28.2", + "resolved": "https://registry.npmjs.org/@wordpress/editor/-/editor-13.28.2.tgz", + "integrity": "sha512-RMySLg1d8WRp6RKU02urpTGXBNwzc7nvieeSGvq8Ga+e7DbUUTJbpwcbpXIyJvfB69+MKk+A2RTJVUmyBxU6pQ==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/a11y": "^3.51.0", - "@wordpress/api-fetch": "^6.48.0", - "@wordpress/blob": "^3.51.0", - "@wordpress/block-editor": "^12.19.1", - "@wordpress/blocks": "^12.28.1", - "@wordpress/commands": "^0.22.1", - "@wordpress/components": "^26.0.1", - "@wordpress/compose": "^6.28.0", - "@wordpress/core-data": "^6.28.1", - "@wordpress/data": "^9.21.0", - "@wordpress/date": "^4.51.0", - "@wordpress/deprecated": "^3.51.0", - "@wordpress/dom": "^3.51.0", - "@wordpress/element": "^5.28.0", - "@wordpress/hooks": "^3.51.0", - "@wordpress/html-entities": "^3.51.0", - "@wordpress/i18n": "^4.51.0", - "@wordpress/icons": "^9.42.0", - "@wordpress/keyboard-shortcuts": "^4.28.0", - "@wordpress/keycodes": "^3.51.0", - "@wordpress/media-utils": "^4.42.0", - "@wordpress/notices": "^4.19.0", - "@wordpress/patterns": "^1.12.1", - "@wordpress/preferences": "^3.28.1", - "@wordpress/private-apis": "^0.33.0", - "@wordpress/reusable-blocks": "^4.28.1", - "@wordpress/rich-text": "^6.28.1", - "@wordpress/server-side-render": "^4.28.1", - "@wordpress/url": "^3.52.0", - "@wordpress/wordcount": "^3.51.0", + "@wordpress/a11y": "^3.51.1", + "@wordpress/api-fetch": "^6.48.1", + "@wordpress/blob": "^3.51.1", + "@wordpress/block-editor": "^12.19.2", + "@wordpress/blocks": "^12.28.2", + "@wordpress/commands": "^0.22.2", + "@wordpress/components": "^26.0.2", + "@wordpress/compose": "^6.28.1", + "@wordpress/core-data": "^6.28.2", + "@wordpress/data": "^9.21.1", + "@wordpress/date": "^4.51.1", + "@wordpress/deprecated": "^3.51.1", + "@wordpress/dom": "^3.51.1", + "@wordpress/element": "^5.28.1", + "@wordpress/hooks": "^3.51.1", + "@wordpress/html-entities": "^3.51.1", + "@wordpress/i18n": "^4.51.1", + "@wordpress/icons": "^9.42.1", + "@wordpress/keyboard-shortcuts": "^4.28.1", + "@wordpress/keycodes": "^3.51.1", + "@wordpress/media-utils": "^4.42.1", + "@wordpress/notices": "^4.19.1", + "@wordpress/patterns": "^1.12.2", + "@wordpress/preferences": "^3.28.2", + "@wordpress/private-apis": "^0.33.1", + "@wordpress/reusable-blocks": "^4.28.2", + "@wordpress/rich-text": "^6.28.2", + "@wordpress/server-side-render": "^4.28.2", + "@wordpress/url": "^3.52.1", + "@wordpress/wordcount": "^3.51.1", "classnames": "^2.3.1", "date-fns": "^2.28.0", "memize": "^2.1.0", @@ -7045,14 +7045,14 @@ } }, "node_modules/@wordpress/element": { - "version": "5.28.0", - "resolved": "https://registry.npmjs.org/@wordpress/element/-/element-5.28.0.tgz", - "integrity": "sha512-NEoT3mgF+pJvnhnaTQeLuhSgC6ThfooMfl7OoEyIthRZpUtgKFakmMUU2T6ODzP2+k2DV/jNCfoBZ/Haekmwew==", + "version": "5.28.1", + "resolved": "https://registry.npmjs.org/@wordpress/element/-/element-5.28.1.tgz", + "integrity": "sha512-qV+KxwtqFGe9ua+TUuH3SHMLxX8A6A7W2rkmMwaNMmxIWfJOrwXuwY0Ukm68LVWylnm/ltiNnuSFO6R5Hf/THg==", "dependencies": { "@babel/runtime": "^7.16.0", "@types/react": "^18.0.21", "@types/react-dom": "^18.0.6", - "@wordpress/escape-html": "^2.51.0", + "@wordpress/escape-html": "^2.51.1", "change-case": "^4.1.2", "is-plain-object": "^5.0.0", "react": "^18.2.0", @@ -7063,9 +7063,9 @@ } }, "node_modules/@wordpress/escape-html": { - "version": "2.51.0", - "resolved": "https://registry.npmjs.org/@wordpress/escape-html/-/escape-html-2.51.0.tgz", - "integrity": "sha512-sDDSyctW5yON2IaEkaMGIfk2LiQ3Jpz8xAnElKjKpnFhbHQBIG2B2NS2UQ5DzsPGZrfCPHt13E20fGwWj+lthw==", + "version": "2.51.1", + "resolved": "https://registry.npmjs.org/@wordpress/escape-html/-/escape-html-2.51.1.tgz", + "integrity": "sha512-k0zxeXZufc+QMLstvwkFj5Gea348MFnJ4g1dAVl9TI2wcv2dDm8wK5Bc3wS+WbX0GwqVrbNl0kgZhabIdmIJ3g==", "dependencies": { "@babel/runtime": "^7.16.0" }, @@ -7074,16 +7074,16 @@ } }, "node_modules/@wordpress/eslint-plugin": { - "version": "17.8.0", - "resolved": "https://registry.npmjs.org/@wordpress/eslint-plugin/-/eslint-plugin-17.8.0.tgz", - "integrity": "sha512-Ob0WR21Y9AcX7AFKhj0RtJ1l5odp9+Uq0W5tOMVY0jZBAW0oVF6YeZMbc0zbynPss5PnWljtk0YX3CJCae2p3Q==", + "version": "17.8.1", + "resolved": "https://registry.npmjs.org/@wordpress/eslint-plugin/-/eslint-plugin-17.8.1.tgz", + "integrity": "sha512-YcDYdQ+/QdrhJbrBnp36YLMcSRYi8Gm0ePm6/PJ+DG5BECymoYACCzKUajL28jWdlfXsuycrC264HP/WFL/trg==", "dev": true, "dependencies": { "@babel/eslint-parser": "^7.16.0", "@typescript-eslint/eslint-plugin": "^6.4.1", "@typescript-eslint/parser": "^6.4.1", - "@wordpress/babel-preset-default": "^7.35.0", - "@wordpress/prettier-config": "^3.8.0", + "@wordpress/babel-preset-default": "^7.35.1", + "@wordpress/prettier-config": "^3.8.1", "cosmiconfig": "^7.0.0", "eslint-config-prettier": "^8.3.0", "eslint-plugin-import": "^2.25.2", @@ -7132,23 +7132,23 @@ } }, "node_modules/@wordpress/format-library": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/@wordpress/format-library/-/format-library-4.28.1.tgz", - "integrity": "sha512-JiDdXs7K6wZYa5iTzYFM6e+o1eF74n2W0Aor256huhkeSF7+7MYobRUvC/6aXQo+hM6/eAJnwE6B1YOdO2c4UA==", + "version": "4.28.2", + "resolved": "https://registry.npmjs.org/@wordpress/format-library/-/format-library-4.28.2.tgz", + "integrity": "sha512-snd/2NaPSY1Vi1aJY57hD9jJV4zdoo5ZkFL7YZ/CRQVoG5F2wwtD1dXhGe/dGid8LVZTXCo79oRzFeUxt9BLMg==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/a11y": "^3.51.0", - "@wordpress/block-editor": "^12.19.1", - "@wordpress/components": "^26.0.1", - "@wordpress/compose": "^6.28.0", - "@wordpress/data": "^9.21.0", - "@wordpress/element": "^5.28.0", - "@wordpress/html-entities": "^3.51.0", - "@wordpress/i18n": "^4.51.0", - "@wordpress/icons": "^9.42.0", - "@wordpress/private-apis": "^0.33.0", - "@wordpress/rich-text": "^6.28.1", - "@wordpress/url": "^3.52.0" + "@wordpress/a11y": "^3.51.1", + "@wordpress/block-editor": "^12.19.2", + "@wordpress/components": "^26.0.2", + "@wordpress/compose": "^6.28.1", + "@wordpress/data": "^9.21.1", + "@wordpress/element": "^5.28.1", + "@wordpress/html-entities": "^3.51.1", + "@wordpress/i18n": "^4.51.1", + "@wordpress/icons": "^9.42.1", + "@wordpress/private-apis": "^0.33.1", + "@wordpress/rich-text": "^6.28.2", + "@wordpress/url": "^3.52.1" }, "engines": { "node": ">=12" @@ -7159,9 +7159,9 @@ } }, "node_modules/@wordpress/hooks": { - "version": "3.51.0", - "resolved": "https://registry.npmjs.org/@wordpress/hooks/-/hooks-3.51.0.tgz", - "integrity": "sha512-u//qLJCfgmGBLEdAtZx5C1KzmhcCYDIk46feYGBR9DHB1/fqdvMpxc20un62i8QgYvJyF7GChmerkPbssa6a8w==", + "version": "3.51.1", + "resolved": "https://registry.npmjs.org/@wordpress/hooks/-/hooks-3.51.1.tgz", + "integrity": "sha512-LmSwXzd6FdQfB771lOtGFK0deTbP3Bstm/DX2IuJ4ywpgREzGjLJ9A/Yje4GiEYJJkiJT3mmq57crkVj4jNlkQ==", "dependencies": { "@babel/runtime": "^7.16.0" }, @@ -7170,9 +7170,9 @@ } }, "node_modules/@wordpress/html-entities": { - "version": "3.51.0", - "resolved": "https://registry.npmjs.org/@wordpress/html-entities/-/html-entities-3.51.0.tgz", - "integrity": "sha512-3LBqSN5d0aTa0MKgen60RfuwZZnANrUw3tQ3pI4H+hXWSazSi1joyxBPmM1fxNuEO7QMnq1I3pU6ywF9Ok6OOw==", + "version": "3.51.1", + "resolved": "https://registry.npmjs.org/@wordpress/html-entities/-/html-entities-3.51.1.tgz", + "integrity": "sha512-hRCEFtL/7TgmnMhylAkHqq4yluX9z/+8FxhFosHIo/CqVF9wuHDfD8/SsHB2cQjTUF69T1kWLUTARnb3fjuXEA==", "dependencies": { "@babel/runtime": "^7.16.0" }, @@ -7181,12 +7181,12 @@ } }, "node_modules/@wordpress/i18n": { - "version": "4.51.0", - "resolved": "https://registry.npmjs.org/@wordpress/i18n/-/i18n-4.51.0.tgz", - "integrity": "sha512-JiMEstT98R1e4bgI8DA+XVCXUSis/6eZ7+RF5nHuDiseIyQ68B2D2FzYoEFaw/zaVebvtWA0lZ8HbHihgsSVPQ==", + "version": "4.51.1", + "resolved": "https://registry.npmjs.org/@wordpress/i18n/-/i18n-4.51.1.tgz", + "integrity": "sha512-5dGvFOewlpw6d7Rf6sGt0MBJrRDxQr/fGreQQKU5mfYKeTLE6JKI/JIiGuyJ3nqeUGUEPgO53nKC1Sgt63xpHg==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/hooks": "^3.51.0", + "@wordpress/hooks": "^3.51.1", "gettext-parser": "^1.3.1", "memize": "^2.1.0", "sprintf-js": "^1.1.1", @@ -7200,22 +7200,22 @@ } }, "node_modules/@wordpress/icons": { - "version": "9.42.0", - "resolved": "https://registry.npmjs.org/@wordpress/icons/-/icons-9.42.0.tgz", - "integrity": "sha512-hOLLSsjWFjqV/drgKY2r5wica9dzaqmFcwfB3V/QQAEKrFR3CG2atskDWBRqFfHQIH8nNxSceoGl8PJjiEvi/g==", + "version": "9.42.1", + "resolved": "https://registry.npmjs.org/@wordpress/icons/-/icons-9.42.1.tgz", + "integrity": "sha512-w1nc0azDrgNPglKiBqE6C5k7XjwTBrqHeCNsE6sjNTfUd5TLjpoQIyY5qvsf+3QFlbK/UO48cmCKi7DISMAlZA==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/element": "^5.28.0", - "@wordpress/primitives": "^3.49.0" + "@wordpress/element": "^5.28.1", + "@wordpress/primitives": "^3.49.1" }, "engines": { "node": ">=12" } }, "node_modules/@wordpress/interactivity": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@wordpress/interactivity/-/interactivity-5.0.0.tgz", - "integrity": "sha512-QfRKMlq3kb4HWevSGjcZU7TcP1+CrzOdbtuhti+RcF3lo4TkgL89AZiY7JAshyMq0XnLxa8LEdFhXrkvzD6ZXQ==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@wordpress/interactivity/-/interactivity-5.0.1.tgz", + "integrity": "sha512-V61j4r+T56rkXAqL27kF1y7ih2eccpFknP5A9Bl4LRRTuQ/Xb1HiJgh97/rOUTWY0DQGTQCi4lOKxc7xAiB6AA==", "dependencies": { "@preact/signals": "^1.2.2", "deepsignal": "^1.4.0", @@ -7226,34 +7226,34 @@ } }, "node_modules/@wordpress/interactivity-router": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@wordpress/interactivity-router/-/interactivity-router-1.1.0.tgz", - "integrity": "sha512-dYXdTVkFf5LwdIUAFS64C7OYZR3M/8ZwcHSeLtnQEDcTc+hRwHKHfeGUkL4+NbIK2oOeAuT/b+lk/i+xteOjtg==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@wordpress/interactivity-router/-/interactivity-router-1.1.1.tgz", + "integrity": "sha512-AP1tz9o/OQi5b/b/7J8ltefiif/R3gbYuaVUYP6OLqj2Fbw6EmPdDsb0w3lwmnjcAGvgS9/S9AYP9KuutYk/tw==", "dependencies": { - "@wordpress/interactivity": "^5.0.0" + "@wordpress/interactivity": "^5.0.1" }, "engines": { "node": ">=12" } }, "node_modules/@wordpress/interface": { - "version": "5.28.1", - "resolved": "https://registry.npmjs.org/@wordpress/interface/-/interface-5.28.1.tgz", - "integrity": "sha512-zravxzTabfjfjf1ytEv3zAOrH2Jgc0c2VUpdo9iByssu90BHwUk4hrf2wjDytJK6V3f+/v5Tki+7diO8iBK2wA==", + "version": "5.28.2", + "resolved": "https://registry.npmjs.org/@wordpress/interface/-/interface-5.28.2.tgz", + "integrity": "sha512-DZ8Y9AKtKk8DnB4z50R+9iED0WiPhoM3EDTNw7f4Z7UpyV/23gS4M81gRTm/Z30vej6kJ0KieTe1D8ArZWPvYQ==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/a11y": "^3.51.0", - "@wordpress/components": "^26.0.1", - "@wordpress/compose": "^6.28.0", - "@wordpress/data": "^9.21.0", - "@wordpress/deprecated": "^3.51.0", - "@wordpress/element": "^5.28.0", - "@wordpress/i18n": "^4.51.0", - "@wordpress/icons": "^9.42.0", - "@wordpress/plugins": "^6.19.1", - "@wordpress/preferences": "^3.28.1", - "@wordpress/private-apis": "^0.33.0", - "@wordpress/viewport": "^5.28.0", + "@wordpress/a11y": "^3.51.1", + "@wordpress/components": "^26.0.2", + "@wordpress/compose": "^6.28.1", + "@wordpress/data": "^9.21.1", + "@wordpress/deprecated": "^3.51.1", + "@wordpress/element": "^5.28.1", + "@wordpress/i18n": "^4.51.1", + "@wordpress/icons": "^9.42.1", + "@wordpress/plugins": "^6.19.2", + "@wordpress/preferences": "^3.28.2", + "@wordpress/private-apis": "^0.33.1", + "@wordpress/viewport": "^5.28.1", "classnames": "^2.3.1" }, "engines": { @@ -7265,9 +7265,9 @@ } }, "node_modules/@wordpress/is-shallow-equal": { - "version": "4.51.0", - "resolved": "https://registry.npmjs.org/@wordpress/is-shallow-equal/-/is-shallow-equal-4.51.0.tgz", - "integrity": "sha512-/Rik1HF5XoLEuodtwvSMFsAMsLC40aRnFei+vzEsaSjcS4/z2kmzgGcIpc8Ca3HEJgtdx6MuziODG1hU9bKRtg==", + "version": "4.51.1", + "resolved": "https://registry.npmjs.org/@wordpress/is-shallow-equal/-/is-shallow-equal-4.51.1.tgz", + "integrity": "sha512-+dZMtdRt3Xs10RFvAML1u/8RiBNVvAlx6cyzcej5bom019hmo1qdvVfSKjnKWNU8GB55AVMPoq2H5e/i+k/rRg==", "dependencies": { "@babel/runtime": "^7.16.0" }, @@ -7276,9 +7276,9 @@ } }, "node_modules/@wordpress/jest-console": { - "version": "7.22.0", - "resolved": "https://registry.npmjs.org/@wordpress/jest-console/-/jest-console-7.22.0.tgz", - "integrity": "sha512-vuTq/VwmXXTDlZzHiFlYQDCAq8xTg/99pHBiKcJwKe13LZgxEwbUtjKp18JzbXb5qS9KPW/EynTiYxpTLn1o7w==", + "version": "7.22.1", + "resolved": "https://registry.npmjs.org/@wordpress/jest-console/-/jest-console-7.22.1.tgz", + "integrity": "sha512-faDmCtkb8JGVUhw0XlPn0XFlSA5KkWKeM2xDkJ6yUA/rmCuXDUNnMENtUQr5DFj5QlKcozhw3/sY+zof3p5P3g==", "dev": true, "dependencies": { "@babel/runtime": "^7.16.0", @@ -7292,12 +7292,12 @@ } }, "node_modules/@wordpress/jest-preset-default": { - "version": "11.22.0", - "resolved": "https://registry.npmjs.org/@wordpress/jest-preset-default/-/jest-preset-default-11.22.0.tgz", - "integrity": "sha512-OSKGvYOQDWynaA78AUzwMpj8kkUrBSJF/Z8InH84RHV1w30DUMQ0b7pSJzOiPPo72uXDcTiit4hYHvSK20BqbA==", + "version": "11.22.1", + "resolved": "https://registry.npmjs.org/@wordpress/jest-preset-default/-/jest-preset-default-11.22.1.tgz", + "integrity": "sha512-QxUO/kmhdqqHpTZtevP/V/kynfHxyyKPX7co7cZwffElDIZagB4DBcfFSDlhDaK1r3XEIlBdt+jFD4nMjcsXcw==", "dev": true, "dependencies": { - "@wordpress/jest-console": "^7.22.0", + "@wordpress/jest-console": "^7.22.1", "babel-jest": "^29.6.2" }, "engines": { @@ -7309,14 +7309,14 @@ } }, "node_modules/@wordpress/keyboard-shortcuts": { - "version": "4.28.0", - "resolved": "https://registry.npmjs.org/@wordpress/keyboard-shortcuts/-/keyboard-shortcuts-4.28.0.tgz", - "integrity": "sha512-mywx2ExlpraMt2cjHmxC4cHXLErSwJ7OkFR+6byJ7BpxQEhv9tDYrKN6LBAMtYpUeyMtdGavyNCUlFtv/r325Q==", + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/@wordpress/keyboard-shortcuts/-/keyboard-shortcuts-4.28.1.tgz", + "integrity": "sha512-3GMGJI7qrntTJoloIUBOPVyfXRcdFcmZ54hFi54/bxbBNHs6uXe2iwHS40goQsarakYlRW3a5Qh3G7aUeSKM9w==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/data": "^9.21.0", - "@wordpress/element": "^5.28.0", - "@wordpress/keycodes": "^3.51.0", + "@wordpress/data": "^9.21.1", + "@wordpress/element": "^5.28.1", + "@wordpress/keycodes": "^3.51.1", "rememo": "^4.0.2" }, "engines": { @@ -7327,29 +7327,29 @@ } }, "node_modules/@wordpress/keycodes": { - "version": "3.51.0", - "resolved": "https://registry.npmjs.org/@wordpress/keycodes/-/keycodes-3.51.0.tgz", - "integrity": "sha512-wudlftpjZ/2tZ2gKY7w2m7BG4LBhmEvDn2K48IbTcMtEyFJidIB0IFpT+skR1aFhIekGDZ7W8UXPQVbjwbWhwA==", + "version": "3.51.1", + "resolved": "https://registry.npmjs.org/@wordpress/keycodes/-/keycodes-3.51.1.tgz", + "integrity": "sha512-gY362TVIgP6WL8xwvLZRylbang0B4FKf5Lu1OWiisuT0Roaq4nZ2+Pqhlw4MKvxf0AF4SVzuVJDrPJioUJtnPg==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/i18n": "^4.51.0" + "@wordpress/i18n": "^4.51.1" }, "engines": { "node": ">=12" } }, "node_modules/@wordpress/list-reusable-blocks": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/@wordpress/list-reusable-blocks/-/list-reusable-blocks-4.28.1.tgz", - "integrity": "sha512-xTTSoexrV5MfyYK481d/igpmIV6dZJNM8FPS07ljf8slOb/MRxS/oUfdYyB8OnZSRU5/PBjjKd4blK8PAqukKA==", + "version": "4.28.2", + "resolved": "https://registry.npmjs.org/@wordpress/list-reusable-blocks/-/list-reusable-blocks-4.28.2.tgz", + "integrity": "sha512-M/eaDCm7VD7ueHxGDz5oj5V5gL2zkZJz+Y4G/wQI5Cr0nFMWR89TudVZgItgQHDhg3e1aV3qlFoXK+md/4HsHg==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/api-fetch": "^6.48.0", - "@wordpress/blob": "^3.51.0", - "@wordpress/components": "^26.0.1", - "@wordpress/compose": "^6.28.0", - "@wordpress/element": "^5.28.0", - "@wordpress/i18n": "^4.51.0", + "@wordpress/api-fetch": "^6.48.1", + "@wordpress/blob": "^3.51.1", + "@wordpress/components": "^26.0.2", + "@wordpress/compose": "^6.28.1", + "@wordpress/element": "^5.28.1", + "@wordpress/i18n": "^4.51.1", "change-case": "^4.1.2" }, "engines": { @@ -7361,28 +7361,28 @@ } }, "node_modules/@wordpress/media-utils": { - "version": "4.42.0", - "resolved": "https://registry.npmjs.org/@wordpress/media-utils/-/media-utils-4.42.0.tgz", - "integrity": "sha512-gUKtF94RmFJwlGSoRKaRB/NipM7u1OVYR4UepMFtLB7La8UBWaklTZfpYGjOHfnFkhxiFTULk1j/7b0OVkPMSw==", + "version": "4.42.1", + "resolved": "https://registry.npmjs.org/@wordpress/media-utils/-/media-utils-4.42.1.tgz", + "integrity": "sha512-L9JEBSydd516PiQ2bwYEzJhkwfV9vyfnOs2lSYkYYqBe1H/1HPNpqUNBw9LtaaoGGk5gIjN2qTaZQJtNwXJCFg==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/api-fetch": "^6.48.0", - "@wordpress/blob": "^3.51.0", - "@wordpress/element": "^5.28.0", - "@wordpress/i18n": "^4.51.0" + "@wordpress/api-fetch": "^6.48.1", + "@wordpress/blob": "^3.51.1", + "@wordpress/element": "^5.28.1", + "@wordpress/i18n": "^4.51.1" }, "engines": { "node": ">=12" } }, "node_modules/@wordpress/notices": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@wordpress/notices/-/notices-4.19.0.tgz", - "integrity": "sha512-9Em2R+YsdMsaOXvWkZWyi/tbDP1JHxpIgASMpoRWIteA422s01NWafwizQwY1f0kvw4JbbyMF283UXmjWnzxQw==", + "version": "4.19.1", + "resolved": "https://registry.npmjs.org/@wordpress/notices/-/notices-4.19.1.tgz", + "integrity": "sha512-HKk655060zaVMLrqKk4WkzXVX2+olT8kR2g6WvpdKGjjY0HLkEA7FpvsSNGhSzHIs51nCAGnYrm5cI2HZb3b2g==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/a11y": "^3.51.0", - "@wordpress/data": "^9.21.0" + "@wordpress/a11y": "^3.51.1", + "@wordpress/data": "^9.21.1" }, "engines": { "node": ">=12" @@ -7392,9 +7392,9 @@ } }, "node_modules/@wordpress/npm-package-json-lint-config": { - "version": "4.36.0", - "resolved": "https://registry.npmjs.org/@wordpress/npm-package-json-lint-config/-/npm-package-json-lint-config-4.36.0.tgz", - "integrity": "sha512-//BDDFVMHxtXC3JC+76DR8ZbJPI3ltzJ3XLbcn8myG9rlQegbSSqmltVcYoR3CGKFI+IbxY1P8CuzJGRN5EIRA==", + "version": "4.36.1", + "resolved": "https://registry.npmjs.org/@wordpress/npm-package-json-lint-config/-/npm-package-json-lint-config-4.36.1.tgz", + "integrity": "sha512-ASWlcMcTjBYTOSkf136lC+KJtoMPm1jMIW862zasmMrgYnHQjvXekgZAG64dbX/QYpVXAgGriQ3U19z2KwTnCw==", "dev": true, "engines": { "node": ">=14" @@ -7404,18 +7404,18 @@ } }, "node_modules/@wordpress/nux": { - "version": "8.13.1", - "resolved": "https://registry.npmjs.org/@wordpress/nux/-/nux-8.13.1.tgz", - "integrity": "sha512-W9hL5SI4jiuQe2LoXpyVorvmCOg9yYPGaSVfC0mHeGt/FO7RGmgcZPRiyofYkXHNP0PHY7+vbjJ7CvdAe4a1Yg==", + "version": "8.13.2", + "resolved": "https://registry.npmjs.org/@wordpress/nux/-/nux-8.13.2.tgz", + "integrity": "sha512-oG+0xYLf5FEkUOOZ1uuOyMM9aikaCNEQM7x7hRT4QXOtBbFc3cCpfrgHpPPR7FBDfJiS+JUORiv+6sLXdg3v2g==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/components": "^26.0.1", - "@wordpress/compose": "^6.28.0", - "@wordpress/data": "^9.21.0", - "@wordpress/deprecated": "^3.51.0", - "@wordpress/element": "^5.28.0", - "@wordpress/i18n": "^4.51.0", - "@wordpress/icons": "^9.42.0", + "@wordpress/components": "^26.0.2", + "@wordpress/compose": "^6.28.1", + "@wordpress/data": "^9.21.1", + "@wordpress/deprecated": "^3.51.1", + "@wordpress/element": "^5.28.1", + "@wordpress/i18n": "^4.51.1", + "@wordpress/icons": "^9.42.1", "rememo": "^4.0.2" }, "engines": { @@ -7427,25 +7427,25 @@ } }, "node_modules/@wordpress/patterns": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@wordpress/patterns/-/patterns-1.12.1.tgz", - "integrity": "sha512-7WcnfGeGVYa2QiRgES04NGf+dqJD4qinx9nPQowkTGxNmblC5ySl0v74IuTXkibPw94bw4ivpXsinHvJa1dyVQ==", + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@wordpress/patterns/-/patterns-1.12.2.tgz", + "integrity": "sha512-ysLL/SIcOQFXfxD5JaxsSIqrHeveJKlJo/lzB8R+JAj3i+04xVwTnhjRrTn4SemCEhkI6YoLT29zbv6IKNWlog==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/a11y": "^3.51.0", - "@wordpress/block-editor": "^12.19.1", - "@wordpress/blocks": "^12.28.1", - "@wordpress/components": "^26.0.1", - "@wordpress/compose": "^6.28.0", - "@wordpress/core-data": "^6.28.1", - "@wordpress/data": "^9.21.0", - "@wordpress/element": "^5.28.0", - "@wordpress/html-entities": "^3.51.0", - "@wordpress/i18n": "^4.51.0", - "@wordpress/icons": "^9.42.0", - "@wordpress/notices": "^4.19.0", - "@wordpress/private-apis": "^0.33.0", - "@wordpress/url": "^3.52.0", + "@wordpress/a11y": "^3.51.1", + "@wordpress/block-editor": "^12.19.2", + "@wordpress/blocks": "^12.28.2", + "@wordpress/components": "^26.0.2", + "@wordpress/compose": "^6.28.1", + "@wordpress/core-data": "^6.28.2", + "@wordpress/data": "^9.21.1", + "@wordpress/element": "^5.28.1", + "@wordpress/html-entities": "^3.51.1", + "@wordpress/i18n": "^4.51.1", + "@wordpress/icons": "^9.42.1", + "@wordpress/notices": "^4.19.1", + "@wordpress/private-apis": "^0.33.1", + "@wordpress/url": "^3.52.1", "nanoid": "^3.3.4" }, "engines": { @@ -7457,17 +7457,17 @@ } }, "node_modules/@wordpress/plugins": { - "version": "6.19.1", - "resolved": "https://registry.npmjs.org/@wordpress/plugins/-/plugins-6.19.1.tgz", - "integrity": "sha512-2TAIhzknhRXKcrIK87T6IJR5HkPb4cV8pmsRvcbw6D04euQBPzWR66D+cTVN/nj/Qoqf4YPcfgrahFOV8FHthA==", + "version": "6.19.2", + "resolved": "https://registry.npmjs.org/@wordpress/plugins/-/plugins-6.19.2.tgz", + "integrity": "sha512-ykHWRkgC+hK6Qm56//yEEQaC+lJHMv5jCM6utzispREYoPlR37SP/6Xaq6PWNeVZJ453vm23kYN0tWjBoqlEOg==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/components": "^26.0.1", - "@wordpress/compose": "^6.28.0", - "@wordpress/element": "^5.28.0", - "@wordpress/hooks": "^3.51.0", - "@wordpress/icons": "^9.42.0", - "@wordpress/is-shallow-equal": "^4.51.0", + "@wordpress/components": "^26.0.2", + "@wordpress/compose": "^6.28.1", + "@wordpress/element": "^5.28.1", + "@wordpress/hooks": "^3.51.1", + "@wordpress/icons": "^9.42.1", + "@wordpress/is-shallow-equal": "^4.51.1", "memize": "^2.0.1" }, "engines": { @@ -7479,12 +7479,12 @@ } }, "node_modules/@wordpress/postcss-plugins-preset": { - "version": "4.35.0", - "resolved": "https://registry.npmjs.org/@wordpress/postcss-plugins-preset/-/postcss-plugins-preset-4.35.0.tgz", - "integrity": "sha512-+DiPMZMZXN/U/7mCY/oYEnttjCx2A+m7WOk3hWZt4JP0zDud10iHGMt+VzYPcQBQqABhK9CfPFWhz0WXinJQCw==", + "version": "4.35.1", + "resolved": "https://registry.npmjs.org/@wordpress/postcss-plugins-preset/-/postcss-plugins-preset-4.35.1.tgz", + "integrity": "sha512-vAgqLCwffQ/TBj1P1Q3+ZEUceqzT/9dyOaG3va9yiAqytDJZMtRVcSQ2HJ++S1tSNn3zBP+20sOgAhLjdi2mgw==", "dev": true, "dependencies": { - "@wordpress/base-styles": "^4.42.0", + "@wordpress/base-styles": "^4.42.1", "autoprefixer": "^10.2.5" }, "engines": { @@ -7495,20 +7495,20 @@ } }, "node_modules/@wordpress/preferences": { - "version": "3.28.1", - "resolved": "https://registry.npmjs.org/@wordpress/preferences/-/preferences-3.28.1.tgz", - "integrity": "sha512-fDhp7lIAnCSHQBg5HeCQLvUh4O+VKNproMSAphLx9XpVgjak781G41Hi4Vj9/sozp24DeK1J+ONUfiYQJBh67A==", + "version": "3.28.2", + "resolved": "https://registry.npmjs.org/@wordpress/preferences/-/preferences-3.28.2.tgz", + "integrity": "sha512-DaDWA78dF8Q15h7NuMoaIF6z7fSdgBH2/Sj7PAP/NaSVageSkU/2T/fbQ7Fou20gYd7F+l+fy80L0i1RuqnX4g==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/a11y": "^3.51.0", - "@wordpress/components": "^26.0.1", - "@wordpress/compose": "^6.28.0", - "@wordpress/data": "^9.21.0", - "@wordpress/deprecated": "^3.51.0", - "@wordpress/element": "^5.28.0", - "@wordpress/i18n": "^4.51.0", - "@wordpress/icons": "^9.42.0", - "@wordpress/private-apis": "^0.33.0", + "@wordpress/a11y": "^3.51.1", + "@wordpress/components": "^26.0.2", + "@wordpress/compose": "^6.28.1", + "@wordpress/data": "^9.21.1", + "@wordpress/deprecated": "^3.51.1", + "@wordpress/element": "^5.28.1", + "@wordpress/i18n": "^4.51.1", + "@wordpress/icons": "^9.42.1", + "@wordpress/private-apis": "^0.33.1", "classnames": "^2.3.1" }, "engines": { @@ -7520,21 +7520,21 @@ } }, "node_modules/@wordpress/preferences-persistence": { - "version": "1.43.0", - "resolved": "https://registry.npmjs.org/@wordpress/preferences-persistence/-/preferences-persistence-1.43.0.tgz", - "integrity": "sha512-+P8GAuCWwvHDN7P7AAvVo0q9hxm8J475qHShJZ4ZysVcnOJMCGV8oE7aJw8q+WTQgDOe0TO9qYKayWQ0LjIY0g==", + "version": "1.43.1", + "resolved": "https://registry.npmjs.org/@wordpress/preferences-persistence/-/preferences-persistence-1.43.1.tgz", + "integrity": "sha512-KkVd4alfSQc80EI61IvKeUaCkS5ThG7Nm70t1yedVJELxTpQ8VX3lg7KmLb5DZR7M6rFW6ju8sW4WGanO2G4gw==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/api-fetch": "^6.48.0" + "@wordpress/api-fetch": "^6.48.1" }, "engines": { "node": ">=12" } }, "node_modules/@wordpress/prettier-config": { - "version": "3.8.0", - "resolved": "https://registry.npmjs.org/@wordpress/prettier-config/-/prettier-config-3.8.0.tgz", - "integrity": "sha512-xKhhI73uTM3UeK7MYjCeyqGgyZvXic4t0rXKiERN6j4aBH7TdAflKli1zj9Xiy0AxFwLJcy0SZqxqLcw0JHSzA==", + "version": "3.8.1", + "resolved": "https://registry.npmjs.org/@wordpress/prettier-config/-/prettier-config-3.8.1.tgz", + "integrity": "sha512-QWHd1G03SgzDP8JiRZ6W/RyXoySvEAWEcwtFXihCOHyeHdV1SJTya25xmRgVsIClKIAldvqBsLWbkSilNXjD/w==", "dev": true, "engines": { "node": ">=14" @@ -7544,12 +7544,12 @@ } }, "node_modules/@wordpress/primitives": { - "version": "3.49.0", - "resolved": "https://registry.npmjs.org/@wordpress/primitives/-/primitives-3.49.0.tgz", - "integrity": "sha512-ekcL5fcrEiKOT8pTdi74k+zm7dRBpGW7bPw5bmI8jeJiDNR8HxCLpJQn2O3kI0QK5MenelNJS0j74QKO5noLxw==", + "version": "3.49.1", + "resolved": "https://registry.npmjs.org/@wordpress/primitives/-/primitives-3.49.1.tgz", + "integrity": "sha512-5/oWDxpUTuVdYTT4bwBoc7tMFpwOhQw+SSZ+jZZ9r05NxLmiv6s30jQ9HOdwEQKkJF2pK6yqvp+F5F/GH/K+8w==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/element": "^5.28.0", + "@wordpress/element": "^5.28.1", "classnames": "^2.3.1" }, "engines": { @@ -7557,9 +7557,9 @@ } }, "node_modules/@wordpress/priority-queue": { - "version": "2.51.0", - "resolved": "https://registry.npmjs.org/@wordpress/priority-queue/-/priority-queue-2.51.0.tgz", - "integrity": "sha512-eu5kFXJT1GfZU+g/7VeLi1p0dMt4SAj5qnHxnA1OWdsRd8CSx0ne7VdZxZroeGif1/x/IliBtdb28A8WEZM59A==", + "version": "2.51.1", + "resolved": "https://registry.npmjs.org/@wordpress/priority-queue/-/priority-queue-2.51.1.tgz", + "integrity": "sha512-SizB9UgowckWghvnaIBDswsygOMq/nyrllX08OhUVjrGYsQu8mEm1Ldflw2PkSdov8vTZCbc1diLJBWjt98Ogw==", "dependencies": { "@babel/runtime": "^7.16.0", "requestidlecallback": "^0.3.0" @@ -7569,9 +7569,9 @@ } }, "node_modules/@wordpress/private-apis": { - "version": "0.33.0", - "resolved": "https://registry.npmjs.org/@wordpress/private-apis/-/private-apis-0.33.0.tgz", - "integrity": "sha512-Dc8y7m17gAKnDVFOPDqPcb2jo9cDhDNikLdepTkRXLywYUPT2PFH4GrXsVK87BLc+nCIqgs3DFU/AJx1db4y/w==", + "version": "0.33.1", + "resolved": "https://registry.npmjs.org/@wordpress/private-apis/-/private-apis-0.33.1.tgz", + "integrity": "sha512-I7nxWUtZJ243vBC7cRRTId7FK0+c82RlIUZ1DVzutojJlg5a66RfFlMygWg/jVBWEmQqfcGSB4zPiGhi7JVBAg==", "dependencies": { "@babel/runtime": "^7.16.0" }, @@ -7580,9 +7580,9 @@ } }, "node_modules/@wordpress/redux-routine": { - "version": "4.51.0", - "resolved": "https://registry.npmjs.org/@wordpress/redux-routine/-/redux-routine-4.51.0.tgz", - "integrity": "sha512-lMEkB4yg0H/P0kvmgWrPcD55ib9lPUROABdgy569ERtIq6F3Ig7Q2SJoGM91VgIVBDb4ZFvJ9Wa/+a2HIHJMuQ==", + "version": "4.51.1", + "resolved": "https://registry.npmjs.org/@wordpress/redux-routine/-/redux-routine-4.51.1.tgz", + "integrity": "sha512-FEuQSTurYmG6Vu/eZJiCbvOhyQ0PO5kGZK8YULbV/4iY5TeXuqmh4ybuzBqBeakwQLUX1+7PTZcFhTMCdIjNNA==", "dependencies": { "@babel/runtime": "^7.16.0", "is-plain-object": "^5.0.0", @@ -7597,22 +7597,22 @@ } }, "node_modules/@wordpress/reusable-blocks": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/@wordpress/reusable-blocks/-/reusable-blocks-4.28.1.tgz", - "integrity": "sha512-+d6Yal7cIYbUPaDRsRxg3L3pNUR1Aa5bWTIi9kdyYMsB9rcrWDNjpIFG9olLedVFk5j3Dn/dG10wTrp39YxyqA==", + "version": "4.28.2", + "resolved": "https://registry.npmjs.org/@wordpress/reusable-blocks/-/reusable-blocks-4.28.2.tgz", + "integrity": "sha512-qy20aeRtI8TxSb5hkIkCeBhYOL9SHZpiZ+wmeQf6Jzra6W5D1mhJXDGmDSdYEl9M6nXHeSay3qOISTnJTrgRng==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/block-editor": "^12.19.1", - "@wordpress/blocks": "^12.28.1", - "@wordpress/components": "^26.0.1", - "@wordpress/core-data": "^6.28.1", - "@wordpress/data": "^9.21.0", - "@wordpress/element": "^5.28.0", - "@wordpress/i18n": "^4.51.0", - "@wordpress/icons": "^9.42.0", - "@wordpress/notices": "^4.19.0", - "@wordpress/private-apis": "^0.33.0", - "@wordpress/url": "^3.52.0" + "@wordpress/block-editor": "^12.19.2", + "@wordpress/blocks": "^12.28.2", + "@wordpress/components": "^26.0.2", + "@wordpress/core-data": "^6.28.2", + "@wordpress/data": "^9.21.1", + "@wordpress/element": "^5.28.1", + "@wordpress/i18n": "^4.51.1", + "@wordpress/icons": "^9.42.1", + "@wordpress/notices": "^4.19.1", + "@wordpress/private-apis": "^0.33.1", + "@wordpress/url": "^3.52.1" }, "engines": { "node": ">=12" @@ -7623,19 +7623,19 @@ } }, "node_modules/@wordpress/rich-text": { - "version": "6.28.1", - "resolved": "https://registry.npmjs.org/@wordpress/rich-text/-/rich-text-6.28.1.tgz", - "integrity": "sha512-cdMpzhnRQMBCw2SewaZt1SLaUGApb+IfQjQFAW9WXwh5GbJEi5xZX6DRulMoU0Jd7lOepq/w0gbwxDePUegyCA==", + "version": "6.28.2", + "resolved": "https://registry.npmjs.org/@wordpress/rich-text/-/rich-text-6.28.2.tgz", + "integrity": "sha512-jBvQdCPeRI/zoWTBL3IEF6Y8YN/f6Xv6R94G3b2FldLFVbJoMTRFD4rd8vDHN8AeVOyA0+VIWziLw88ZVD8Qgw==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/a11y": "^3.51.0", - "@wordpress/compose": "^6.28.0", - "@wordpress/data": "^9.21.0", - "@wordpress/deprecated": "^3.51.0", - "@wordpress/element": "^5.28.0", - "@wordpress/escape-html": "^2.51.0", - "@wordpress/i18n": "^4.51.0", - "@wordpress/keycodes": "^3.51.0", + "@wordpress/a11y": "^3.51.1", + "@wordpress/compose": "^6.28.1", + "@wordpress/data": "^9.21.1", + "@wordpress/deprecated": "^3.51.1", + "@wordpress/element": "^5.28.1", + "@wordpress/escape-html": "^2.51.1", + "@wordpress/i18n": "^4.51.1", + "@wordpress/keycodes": "^3.51.1", "memize": "^2.1.0", "rememo": "^4.0.2" }, @@ -7647,14 +7647,14 @@ } }, "node_modules/@wordpress/router": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@wordpress/router/-/router-0.20.0.tgz", - "integrity": "sha512-DK9FuZOr1nN1+wdMyuNFa+MNDN5RQ+ZQi2Hbl8NkngKwmu+b5AyP/PgKVcVStX+W6wpYsejvhDNYNKxWDKuQIQ==", + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@wordpress/router/-/router-0.20.1.tgz", + "integrity": "sha512-toHdvNSzBvsdy3boUtIkmMNBMyrf0H8qoKVz06KoA8KWCwDtiLqZIOg+KPVWGNAHO1nCaljAVkManRrmNkvChQ==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/element": "^5.28.0", - "@wordpress/private-apis": "^0.33.0", - "@wordpress/url": "^3.52.0", + "@wordpress/element": "^5.28.1", + "@wordpress/private-apis": "^0.33.1", + "@wordpress/url": "^3.52.1", "history": "^5.1.0" }, "engines": { @@ -7665,24 +7665,24 @@ } }, "node_modules/@wordpress/scripts": { - "version": "27.2.0", - "resolved": "https://registry.npmjs.org/@wordpress/scripts/-/scripts-27.2.0.tgz", - "integrity": "sha512-xkrNYRuXxtkCkxtBWq7H46cgvbBHzfy8VdELqXn5XwK8S+ytDVOe3YUXqhisn9VdPurrjgfgAa/qNMA3xPr90Q==", + "version": "27.2.1", + "resolved": "https://registry.npmjs.org/@wordpress/scripts/-/scripts-27.2.1.tgz", + "integrity": "sha512-fPl7CrMKZxj5/Grcew0XVGuW/+wx9I1GWdYzV5CrHtMKgEspvDfbpoGLVybyw5lVmgfmaLq577yZUgbyGwt86w==", "dev": true, "dependencies": { "@babel/core": "^7.16.0", "@pmmmwh/react-refresh-webpack-plugin": "^0.5.11", "@svgr/webpack": "^8.0.1", - "@wordpress/babel-preset-default": "^7.35.0", - "@wordpress/browserslist-config": "^5.34.0", - "@wordpress/dependency-extraction-webpack-plugin": "^5.2.0", - "@wordpress/e2e-test-utils-playwright": "^0.19.0", - "@wordpress/eslint-plugin": "^17.8.0", - "@wordpress/jest-preset-default": "^11.22.0", - "@wordpress/npm-package-json-lint-config": "^4.36.0", - "@wordpress/postcss-plugins-preset": "^4.35.0", - "@wordpress/prettier-config": "^3.8.0", - "@wordpress/stylelint-config": "^21.34.0", + "@wordpress/babel-preset-default": "^7.35.1", + "@wordpress/browserslist-config": "^5.34.1", + "@wordpress/dependency-extraction-webpack-plugin": "^5.2.1", + "@wordpress/e2e-test-utils-playwright": "^0.19.1", + "@wordpress/eslint-plugin": "^17.8.1", + "@wordpress/jest-preset-default": "^11.22.1", + "@wordpress/npm-package-json-lint-config": "^4.36.1", + "@wordpress/postcss-plugins-preset": "^4.35.1", + "@wordpress/prettier-config": "^3.8.1", + "@wordpress/stylelint-config": "^21.34.1", "adm-zip": "^0.5.9", "babel-jest": "^29.6.2", "babel-loader": "^8.2.3", @@ -8084,20 +8084,20 @@ } }, "node_modules/@wordpress/server-side-render": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/@wordpress/server-side-render/-/server-side-render-4.28.1.tgz", - "integrity": "sha512-xXGUOvsDZ+QV3NcqMm1ag8kREV8WQz15+bntd4PUus24qvexvqBO+KzfxNSjgfrJw/vl1kgSgATBHtaOUMCmcQ==", + "version": "4.28.2", + "resolved": "https://registry.npmjs.org/@wordpress/server-side-render/-/server-side-render-4.28.2.tgz", + "integrity": "sha512-ATsWCIubgEQMRwJmimThonW1aT3/iNs66F3NbjxN9sTDrtPTqcmmeDWM9lfDKZWRFvaQ4gnENof58/0fSL/oMg==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/api-fetch": "^6.48.0", - "@wordpress/blocks": "^12.28.1", - "@wordpress/components": "^26.0.1", - "@wordpress/compose": "^6.28.0", - "@wordpress/data": "^9.21.0", - "@wordpress/deprecated": "^3.51.0", - "@wordpress/element": "^5.28.0", - "@wordpress/i18n": "^4.51.0", - "@wordpress/url": "^3.52.0", + "@wordpress/api-fetch": "^6.48.1", + "@wordpress/blocks": "^12.28.2", + "@wordpress/components": "^26.0.2", + "@wordpress/compose": "^6.28.1", + "@wordpress/data": "^9.21.1", + "@wordpress/deprecated": "^3.51.1", + "@wordpress/element": "^5.28.1", + "@wordpress/i18n": "^4.51.1", + "@wordpress/url": "^3.52.1", "fast-deep-equal": "^3.1.3" }, "engines": { @@ -8109,9 +8109,9 @@ } }, "node_modules/@wordpress/shortcode": { - "version": "3.51.0", - "resolved": "https://registry.npmjs.org/@wordpress/shortcode/-/shortcode-3.51.0.tgz", - "integrity": "sha512-t5GHbDY3awJEcQfeb2fXK6y34RBcZUFgjSUrdFBlGmjHcdnQnyWba41mesk+chTVRiK8URogtZ52WrQsMb0Cvw==", + "version": "3.51.1", + "resolved": "https://registry.npmjs.org/@wordpress/shortcode/-/shortcode-3.51.1.tgz", + "integrity": "sha512-1HRcX7wTuxN7tYKQdYOJdE9rvP7FHCvzSkZdksDDykB2iYK2nagzdYBqZTZi9yRl/+X/Jgsuwwfelznh/oVo8A==", "dependencies": { "@babel/runtime": "^7.16.0", "memize": "^2.0.1" @@ -8121,9 +8121,9 @@ } }, "node_modules/@wordpress/style-engine": { - "version": "1.34.0", - "resolved": "https://registry.npmjs.org/@wordpress/style-engine/-/style-engine-1.34.0.tgz", - "integrity": "sha512-CMSifFEg1YRpodUEZ8+1XTrKpu61idz/qa9Uz4yYS4aK23HfY8gPH+9FYYeRmtPUnKgAUwIMgKbyNXpCKmslUA==", + "version": "1.34.1", + "resolved": "https://registry.npmjs.org/@wordpress/style-engine/-/style-engine-1.34.1.tgz", + "integrity": "sha512-Hf9vU8i9wGAi7zWAV1BNdDBouKtZoBIihdL56yBm7fJwblaUI7+zncs24DnEPqlWcSRFcJJAoQcRuSIqxcqP9g==", "dependencies": { "@babel/runtime": "^7.16.0", "change-case": "^4.1.2" @@ -8133,9 +8133,9 @@ } }, "node_modules/@wordpress/stylelint-config": { - "version": "21.34.0", - "resolved": "https://registry.npmjs.org/@wordpress/stylelint-config/-/stylelint-config-21.34.0.tgz", - "integrity": "sha512-Zou/Y6vdMWnAMzcPNH4yZoKkd8h22DyYO4jyC58ChPEF3O7csvmjpbnDloAr5/MOgCz91hnSkZmiKG0zp8VE6w==", + "version": "21.34.1", + "resolved": "https://registry.npmjs.org/@wordpress/stylelint-config/-/stylelint-config-21.34.1.tgz", + "integrity": "sha512-Hb1e5yFQ+YnVbsBZg6fQ77bWTaXih5AjcN+OBc4dxN43MyeTll+IrPMBmsX612gsNbRm73mL32Ngbo+bXEa/Qg==", "dev": true, "dependencies": { "stylelint-config-recommended": "^6.0.0", @@ -8149,13 +8149,13 @@ } }, "node_modules/@wordpress/sync": { - "version": "0.13.0", - "resolved": "https://registry.npmjs.org/@wordpress/sync/-/sync-0.13.0.tgz", - "integrity": "sha512-elkzQmkf/7cU/0QQBnzb2akFgrt36ZSV4OEuheCp0iXR2sZdzZQ2UqkwdEmtdvAuU83eU51HM72ja9k+fr1VVw==", + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/@wordpress/sync/-/sync-0.13.1.tgz", + "integrity": "sha512-MHyXM+qALZvTI/eLyGmfImDU9mXZaeU2tkDSg5+l2fsg7iN2tGzy4PfRvOgUAHa47PBF1oar+yg2EbOq7K3uYg==", "dependencies": { "@babel/runtime": "^7.16.0", "@types/simple-peer": "^9.11.5", - "@wordpress/url": "^3.52.0", + "@wordpress/url": "^3.52.1", "import-locals": "^2.0.0", "lib0": "^0.2.42", "simple-peer": "^9.11.0", @@ -8169,9 +8169,9 @@ } }, "node_modules/@wordpress/token-list": { - "version": "2.51.0", - "resolved": "https://registry.npmjs.org/@wordpress/token-list/-/token-list-2.51.0.tgz", - "integrity": "sha512-5YsRinAlpy6mX4QJssebXp9sPCkpbvHqdLXdnYJoMP0ABffGqny6/9PuoRrDMLwljs2kZFBiTyQsH945LWkFqg==", + "version": "2.51.1", + "resolved": "https://registry.npmjs.org/@wordpress/token-list/-/token-list-2.51.1.tgz", + "integrity": "sha512-le8KsWmKshmEnfyhs7HArIs1mDlASQKWhS/MZNoJMHpwGP84q4y6CPT9PwhksMTuv9Q/TUs/ICUC9ThY3Q84qQ==", "dependencies": { "@babel/runtime": "^7.16.0" }, @@ -8180,21 +8180,21 @@ } }, "node_modules/@wordpress/undo-manager": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/@wordpress/undo-manager/-/undo-manager-0.11.0.tgz", - "integrity": "sha512-f9izRRzLlZRBXhve1OU9sBGWRvfGU94nhENN7gtf7l31q3xdsnrGf5NE/R1yhwCAHifUFF1dVcIGC1cfT2jQIg==", + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/@wordpress/undo-manager/-/undo-manager-0.11.1.tgz", + "integrity": "sha512-ukBF8sRDXmnLa0AEpoLSsZ7G8lUl/X41ZF+Cq7EiTC7ZQWVMd+e5THJUvSEuQO6d8Tttgm44J1eDd4Kydod5ZA==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/is-shallow-equal": "^4.51.0" + "@wordpress/is-shallow-equal": "^4.51.1" }, "engines": { "node": ">=12" } }, "node_modules/@wordpress/url": { - "version": "3.52.0", - "resolved": "https://registry.npmjs.org/@wordpress/url/-/url-3.52.0.tgz", - "integrity": "sha512-LkKQT7Hv+7ekCQ8fjDg2CK2FUtQhnzI/1PSCcmuL9guxsrQBKoiQFoGvsTUfXC4TtlkyV/gI/iB0zfoyq5t1Gg==", + "version": "3.52.1", + "resolved": "https://registry.npmjs.org/@wordpress/url/-/url-3.52.1.tgz", + "integrity": "sha512-6jyR4iln6PG28cGq9L8j4Ii8jGQA9IoyFN96wQnBHmqv3ou02lcsRC3IzgXeQSZG40ZM8DnlYP8lkkuzNlndbw==", "dependencies": { "@babel/runtime": "^7.16.0", "remove-accents": "^0.5.0" @@ -8204,14 +8204,14 @@ } }, "node_modules/@wordpress/viewport": { - "version": "5.28.0", - "resolved": "https://registry.npmjs.org/@wordpress/viewport/-/viewport-5.28.0.tgz", - "integrity": "sha512-HaSmMY2X2L9beLn+eDDDHrB2y43FRfNCSGBLaqILaqy9b2YHWrHZ8hAnKlhrJqbVCvH625eA0jsM8Ej8NPCCCA==", + "version": "5.28.1", + "resolved": "https://registry.npmjs.org/@wordpress/viewport/-/viewport-5.28.1.tgz", + "integrity": "sha512-+Y8gUaWPY9sgjNt4bFVnb/lmygf1RKxJAWqo28FZFDJwzt8ysWwbdTEg7s/axVlVMWYFJh6xvBYoxstI2g9xfw==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/compose": "^6.28.0", - "@wordpress/data": "^9.21.0", - "@wordpress/element": "^5.28.0" + "@wordpress/compose": "^6.28.1", + "@wordpress/data": "^9.21.1", + "@wordpress/element": "^5.28.1" }, "engines": { "node": ">=12" @@ -8221,30 +8221,30 @@ } }, "node_modules/@wordpress/warning": { - "version": "2.51.0", - "resolved": "https://registry.npmjs.org/@wordpress/warning/-/warning-2.51.0.tgz", - "integrity": "sha512-e+YbsQY4o/nTY0gT5Rr5766wU2xzwL5m/8S1HET9wBaeCRoZR/0IKyTOvPfihW13uT6FayBne3rqwT/h6F8w6Q==", + "version": "2.51.1", + "resolved": "https://registry.npmjs.org/@wordpress/warning/-/warning-2.51.1.tgz", + "integrity": "sha512-De1ftiM7vdlE6evA+d/jv2wES9wXdvbck4fKi7qr7ckDzWjqGg7nV8A3OzGInWiAn9qTQZucCOUwzUvlWedpTQ==", "engines": { "node": ">=12" } }, "node_modules/@wordpress/widgets": { - "version": "3.28.1", - "resolved": "https://registry.npmjs.org/@wordpress/widgets/-/widgets-3.28.1.tgz", - "integrity": "sha512-uXVi6DZga+ANfqzqBlfjwkH9UlcO6BcCUZ/meRmR8JDLjciBfkQ/l321GjVmq8cxQ6crSku07d/TmASXg/MO8w==", + "version": "3.28.2", + "resolved": "https://registry.npmjs.org/@wordpress/widgets/-/widgets-3.28.2.tgz", + "integrity": "sha512-9h1TAjqGVgf/KI0AvlFt8ZdzYSWMrtC//oddt/GhXvrL2CXbuk/xdtU0Lx8uJxww9ZrIVnz3fc3zYAsOVM64qw==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/api-fetch": "^6.48.0", - "@wordpress/block-editor": "^12.19.1", - "@wordpress/blocks": "^12.28.1", - "@wordpress/components": "^26.0.1", - "@wordpress/compose": "^6.28.0", - "@wordpress/core-data": "^6.28.1", - "@wordpress/data": "^9.21.0", - "@wordpress/element": "^5.28.0", - "@wordpress/i18n": "^4.51.0", - "@wordpress/icons": "^9.42.0", - "@wordpress/notices": "^4.19.0", + "@wordpress/api-fetch": "^6.48.1", + "@wordpress/block-editor": "^12.19.2", + "@wordpress/blocks": "^12.28.2", + "@wordpress/components": "^26.0.2", + "@wordpress/compose": "^6.28.1", + "@wordpress/core-data": "^6.28.2", + "@wordpress/data": "^9.21.1", + "@wordpress/element": "^5.28.1", + "@wordpress/i18n": "^4.51.1", + "@wordpress/icons": "^9.42.1", + "@wordpress/notices": "^4.19.1", "classnames": "^2.3.1" }, "peerDependencies": { @@ -8253,9 +8253,9 @@ } }, "node_modules/@wordpress/wordcount": { - "version": "3.51.0", - "resolved": "https://registry.npmjs.org/@wordpress/wordcount/-/wordcount-3.51.0.tgz", - "integrity": "sha512-H5pkrHjR2iJN5jZZQpPvC7VDb4t4EnYBBPjOVy29GUbX6ndbz0O9GcW2GKScW7napBNG0KjAS+YoJzceIr4c/Q==", + "version": "3.51.1", + "resolved": "https://registry.npmjs.org/@wordpress/wordcount/-/wordcount-3.51.1.tgz", + "integrity": "sha512-KYEX1NfDzYXqwDJ6zdrVemXUNOu61A00lCsREkaXwhX2h/tiT8M82dAjI0J0sC8jQoUxZ1n/ZK/SDEHc7AD48A==", "dependencies": { "@babel/runtime": "^7.16.0" }, @@ -10238,15 +10238,16 @@ } }, "node_modules/call-bind": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.6.tgz", - "integrity": "sha512-Mj50FLHtlsoVfRfnHaZvyrooHcrlceNZdL/QBvJJVd9Ta55qCQK0gs4ss2oZDeV9zFCs6ewzYgVE5yfVmfFpVg==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", "dev": true, "dependencies": { + "es-define-property": "^1.0.0", "es-errors": "^1.3.0", "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.3", - "set-function-length": "^1.2.0" + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" }, "engines": { "node": ">= 0.4" @@ -12431,18 +12432,20 @@ } }, "node_modules/define-data-property": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.2.tgz", - "integrity": "sha512-SRtsSqsDbgpJBbW3pABMCOt6rQyeM8s8RiyeSN8jYG8sYmt/kGJejbydttUsnDs1tadr19tvhT4ShwMyoqAm4g==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", "dev": true, "dependencies": { + "es-define-property": "^1.0.0", "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.2", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.1" + "gopd": "^1.0.1" }, "engines": { "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/define-lazy-prop": { @@ -13149,50 +13152,52 @@ } }, "node_modules/es-abstract": { - "version": "1.22.3", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.3.tgz", - "integrity": "sha512-eiiY8HQeYfYH2Con2berK+To6GrK2RxbPawDkGq4UiCQQfZHb6wX9qQqkbpPqaxQFcl8d9QzZqo0tGE0VcrdwA==", + "version": "1.22.4", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.4.tgz", + "integrity": "sha512-vZYJlk2u6qHYxBOTjAeg7qUxHdNfih64Uu2J8QqWgXZ2cri0ZpJAkzDUK/q593+mvKwlxyaxr6F1Q+3LKoQRgg==", "dev": true, "dependencies": { - "array-buffer-byte-length": "^1.0.0", - "arraybuffer.prototype.slice": "^1.0.2", - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.5", - "es-set-tostringtag": "^2.0.1", + "array-buffer-byte-length": "^1.0.1", + "arraybuffer.prototype.slice": "^1.0.3", + "available-typed-arrays": "^1.0.6", + "call-bind": "^1.0.7", + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "es-set-tostringtag": "^2.0.2", "es-to-primitive": "^1.2.1", "function.prototype.name": "^1.1.6", - "get-intrinsic": "^1.2.2", - "get-symbol-description": "^1.0.0", + "get-intrinsic": "^1.2.4", + "get-symbol-description": "^1.0.2", "globalthis": "^1.0.3", "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.0", + "has-property-descriptors": "^1.0.2", "has-proto": "^1.0.1", "has-symbols": "^1.0.3", - "hasown": "^2.0.0", - "internal-slot": "^1.0.5", - "is-array-buffer": "^3.0.2", + "hasown": "^2.0.1", + "internal-slot": "^1.0.7", + "is-array-buffer": "^3.0.4", "is-callable": "^1.2.7", "is-negative-zero": "^2.0.2", "is-regex": "^1.1.4", "is-shared-array-buffer": "^1.0.2", "is-string": "^1.0.7", - "is-typed-array": "^1.1.12", + "is-typed-array": "^1.1.13", "is-weakref": "^1.0.2", "object-inspect": "^1.13.1", "object-keys": "^1.1.1", - "object.assign": "^4.1.4", - "regexp.prototype.flags": "^1.5.1", - "safe-array-concat": "^1.0.1", - "safe-regex-test": "^1.0.0", + "object.assign": "^4.1.5", + "regexp.prototype.flags": "^1.5.2", + "safe-array-concat": "^1.1.0", + "safe-regex-test": "^1.0.3", "string.prototype.trim": "^1.2.8", "string.prototype.trimend": "^1.0.7", "string.prototype.trimstart": "^1.0.7", - "typed-array-buffer": "^1.0.0", + "typed-array-buffer": "^1.0.1", "typed-array-byte-length": "^1.0.0", "typed-array-byte-offset": "^1.0.0", "typed-array-length": "^1.0.4", "unbox-primitive": "^1.0.2", - "which-typed-array": "^1.1.13" + "which-typed-array": "^1.1.14" }, "engines": { "node": ">= 0.4" @@ -13207,6 +13212,18 @@ "integrity": "sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA==", "dev": true }, + "node_modules/es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/es-errors": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", @@ -13217,25 +13234,29 @@ } }, "node_modules/es-iterator-helpers": { - "version": "1.0.15", - "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.0.15.tgz", - "integrity": "sha512-GhoY8uYqd6iwUl2kgjTm4CZAf6oo5mHK7BPqx3rKgx893YSsy0LGHV6gfqqQvZt/8xM8xeOnfXBCfqclMKkJ5g==", + "version": "1.0.17", + "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.0.17.tgz", + "integrity": "sha512-lh7BsUqelv4KUbR5a/ZTaGGIMLCjPGPqJ6q+Oq24YP0RdyptX1uzm4vvaqzk7Zx3bpl/76YLTTDj9L7uYQ92oQ==", "dev": true, "dependencies": { "asynciterator.prototype": "^1.0.0", - "call-bind": "^1.0.2", + "call-bind": "^1.0.7", "define-properties": "^1.2.1", - "es-abstract": "^1.22.1", - "es-set-tostringtag": "^2.0.1", - "function-bind": "^1.1.1", - "get-intrinsic": "^1.2.1", + "es-abstract": "^1.22.4", + "es-errors": "^1.3.0", + "es-set-tostringtag": "^2.0.2", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", "globalthis": "^1.0.3", - "has-property-descriptors": "^1.0.0", + "has-property-descriptors": "^1.0.2", "has-proto": "^1.0.1", "has-symbols": "^1.0.3", - "internal-slot": "^1.0.5", + "internal-slot": "^1.0.7", "iterator.prototype": "^1.1.2", - "safe-array-concat": "^1.0.1" + "safe-array-concat": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" } }, "node_modules/es-module-lexer": { @@ -13250,14 +13271,14 @@ "integrity": "sha512-7vIYVzpOhXtpc3Yn03itB+GSgVZFW7oL4kdydA+iL+IEi7HiSLBUxM05QFw4SxTl6e++pMpGqZPo2+vdNs3TbA==" }, "node_modules/es-set-tostringtag": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz", - "integrity": "sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.2.tgz", + "integrity": "sha512-BuDyupZt65P9D2D2vA/zqcI3G5xRsklm5N3xCwuiy+/vKy8i0ifdsQP1sLgO4tZDSCaQUSnmC48khknGMV3D2Q==", "dev": true, "dependencies": { - "get-intrinsic": "^1.1.3", - "has": "^1.0.3", - "has-tostringtag": "^1.0.0" + "get-intrinsic": "^1.2.2", + "has-tostringtag": "^1.0.0", + "hasown": "^2.0.0" }, "engines": { "node": ">= 0.4" @@ -13542,9 +13563,9 @@ } }, "node_modules/eslint-plugin-jest": { - "version": "27.6.3", - "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-27.6.3.tgz", - "integrity": "sha512-+YsJFVH6R+tOiO3gCJon5oqn4KWc+mDq2leudk8mrp8RFubLOo9CVyi3cib4L7XMpxExmkmBZQTPDYVBzgpgOA==", + "version": "27.9.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-27.9.0.tgz", + "integrity": "sha512-QIT7FH7fNmd9n4se7FFKHbsLKGQiw885Ds6Y/sxKgCZ6natwCsXdgPOADnYVxN2QrRweF0FZWbJ6S7Rsn7llug==", "dev": true, "dependencies": { "@typescript-eslint/utils": "^5.10.0" @@ -13553,7 +13574,7 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" }, "peerDependencies": { - "@typescript-eslint/eslint-plugin": "^5.0.0 || ^6.0.0", + "@typescript-eslint/eslint-plugin": "^5.0.0 || ^6.0.0 || ^7.0.0", "eslint": "^7.0.0 || ^8.0.0", "jest": "*" }, @@ -16010,13 +16031,14 @@ } }, "node_modules/get-symbol-description": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", - "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.2.tgz", + "integrity": "sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.1" + "call-bind": "^1.0.5", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4" }, "engines": { "node": ">= 0.4" @@ -17483,18 +17505,6 @@ "node": ">=6" } }, - "node_modules/has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.1" - }, - "engines": { - "node": ">= 0.4.0" - } - }, "node_modules/has-ansi": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", @@ -17534,12 +17544,12 @@ } }, "node_modules/has-property-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz", - "integrity": "sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", "dev": true, "dependencies": { - "get-intrinsic": "^1.2.2" + "es-define-property": "^1.0.0" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -17647,9 +17657,9 @@ } }, "node_modules/hasown": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", - "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.1.tgz", + "integrity": "sha512-1/th4MHjnwncwXsIW6QMzlvYL9kG5e/CpVvLRZe4XPa8TOUNbCELqmvhDmnkNsAjwaG4+I8gJJL0JBvTTLO9qA==", "dependencies": { "function-bind": "^1.1.2" }, @@ -18496,13 +18506,13 @@ } }, "node_modules/internal-slot": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.5.tgz", - "integrity": "sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz", + "integrity": "sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==", "dev": true, "dependencies": { - "get-intrinsic": "^1.2.0", - "has": "^1.0.3", + "es-errors": "^1.3.0", + "hasown": "^2.0.0", "side-channel": "^1.0.4" }, "engines": { @@ -19174,12 +19184,12 @@ } }, "node_modules/is-typed-array": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.12.tgz", - "integrity": "sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==", + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz", + "integrity": "sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==", "dev": true, "dependencies": { - "which-typed-array": "^1.1.11" + "which-typed-array": "^1.1.14" }, "engines": { "node": ">= 0.4" @@ -22285,9 +22295,9 @@ } }, "node_modules/lib0": { - "version": "0.2.88", - "resolved": "https://registry.npmjs.org/lib0/-/lib0-0.2.88.tgz", - "integrity": "sha512-KyroiEvCeZcZEMx5Ys+b4u4eEBbA1ch7XUaBhYpwa/nPMrzTjUhI4RfcytmQfYoTBPcdyx+FX6WFNIoNuJzJfQ==", + "version": "0.2.89", + "resolved": "https://registry.npmjs.org/lib0/-/lib0-0.2.89.tgz", + "integrity": "sha512-5j19vcCjsQhvLG6mcDD+nprtJUCbmqLz5Hzt5xgi9SV6RIW/Dty7ZkVZHGBuPOADMKjQuKDvuQTH495wsmw8DQ==", "dependencies": { "isomorphic.js": "^0.2.4" }, @@ -25106,13 +25116,13 @@ } }, "node_modules/object.assign": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", - "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", + "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", "has-symbols": "^1.0.3", "object-keys": "^1.1.1" }, @@ -26876,9 +26886,9 @@ "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==" }, "node_modules/preact": { - "version": "10.19.4", - "resolved": "https://registry.npmjs.org/preact/-/preact-10.19.4.tgz", - "integrity": "sha512-dwaX5jAh0Ga8uENBX1hSOujmKWgx9RtL80KaKUFLc6jb4vCEAc3EeZ0rnQO/FO4VgjfPMfoLFWnNG8bHuZ9VLw==", + "version": "10.19.5", + "resolved": "https://registry.npmjs.org/preact/-/preact-10.19.5.tgz", + "integrity": "sha512-OPELkDmSVbKjbFqF9tgvOowiiQ9TmsJljIzXRyNE8nGiis94pwv1siF78rQkAP1Q1738Ce6pellRg/Ns/CtHqQ==", "funding": { "type": "opencollective", "url": "https://opencollective.com/preact" @@ -27785,14 +27795,15 @@ } }, "node_modules/regexp.prototype.flags": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.1.tgz", - "integrity": "sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg==", + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz", + "integrity": "sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "set-function-name": "^2.0.0" + "call-bind": "^1.0.6", + "define-properties": "^1.2.1", + "es-errors": "^1.3.0", + "set-function-name": "^2.0.1" }, "engines": { "node": ">= 0.4" @@ -28322,13 +28333,13 @@ } }, "node_modules/safe-array-concat": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.0.1.tgz", - "integrity": "sha512-6XbUAseYE2KtOuGueyeobCySj9L4+66Tn6KQMOPQJrAJEowYKW/YR/MGJZl7FdydUdaFu4LYyDZjxf4/Nmo23Q==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.0.tgz", + "integrity": "sha512-ZdQ0Jeb9Ofti4hbt5lX3T2JcAamT9hfzYU1MNB+z/jaEbB6wfFfPIR/zEORmZqobkCCJhSjodobH6WHNmJ97dg==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.1", + "call-bind": "^1.0.5", + "get-intrinsic": "^1.2.2", "has-symbols": "^1.0.3", "isarray": "^2.0.5" }, @@ -28380,15 +28391,18 @@ } }, "node_modules/safe-regex-test": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", - "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.3.tgz", + "integrity": "sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.3", + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", "is-regex": "^1.1.4" }, + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -28897,14 +28911,15 @@ } }, "node_modules/set-function-name": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.1.tgz", - "integrity": "sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", + "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", "dev": true, "dependencies": { - "define-data-property": "^1.0.1", + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", "functions-have-names": "^1.2.3", - "has-property-descriptors": "^1.0.0" + "has-property-descriptors": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -31457,14 +31472,14 @@ } }, "node_modules/typed-array-buffer": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.0.tgz", - "integrity": "sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz", + "integrity": "sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.1", - "is-typed-array": "^1.1.10" + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "is-typed-array": "^1.1.13" }, "engines": { "node": ">= 0.4" @@ -33163,9 +33178,9 @@ } }, "node_modules/yjs": { - "version": "13.6.11", - "resolved": "https://registry.npmjs.org/yjs/-/yjs-13.6.11.tgz", - "integrity": "sha512-FvRRJKX9u270dOLkllGF/UDCWwmIv2Z+ucM4v1QO1TuxdmoiMnSUXH1HAcOKOrkBEhQtPTkxep7tD2DrQB+l0g==", + "version": "13.6.12", + "resolved": "https://registry.npmjs.org/yjs/-/yjs-13.6.12.tgz", + "integrity": "sha512-KOT8ILoyVH2f/PxPadeu5kVVS055D1r3x1iFfJVJzFdnN98pVGM8H07NcKsO+fG3F7/0tf30Vnokf5YIqhU/iw==", "dependencies": { "lib0": "^0.2.86" }, @@ -37123,9 +37138,9 @@ "integrity": "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==" }, "@types/semver": { - "version": "7.5.6", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.6.tgz", - "integrity": "sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A==", + "version": "7.5.7", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.7.tgz", + "integrity": "sha512-/wdoPq1QqkSj9/QOeKkFquEuPzQbHTWAMPH/PaUMB+JuR31lXhlWXRZ52IpfDYVlDOUBvX09uBrPwxGT1hjNBg==", "dev": true }, "@types/send": { @@ -37598,57 +37613,57 @@ "dev": true }, "@wordpress/a11y": { - "version": "3.51.0", - "resolved": "https://registry.npmjs.org/@wordpress/a11y/-/a11y-3.51.0.tgz", - "integrity": "sha512-sq7dflOxrSAvtEb7Ae1VmLyEYESlRlrwCBrWeAyYwekQ08Da1ph7EyvYMM1Yoq7xCbnLpPvAt/oGO05Mhkv2dg==", + "version": "3.51.1", + "resolved": "https://registry.npmjs.org/@wordpress/a11y/-/a11y-3.51.1.tgz", + "integrity": "sha512-qZ9H4qdCL7CR4oGMbzu7jJNjxxkZyDT4TZmLcHpg+fNwjAHNKNvtcVNnkR/dGKNIiENWD0qfmZqNNxm7QxHFcA==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/dom-ready": "^3.51.0", - "@wordpress/i18n": "^4.51.0" + "@wordpress/dom-ready": "^3.51.1", + "@wordpress/i18n": "^4.51.1" } }, "@wordpress/annotations": { - "version": "2.51.1", - "resolved": "https://registry.npmjs.org/@wordpress/annotations/-/annotations-2.51.1.tgz", - "integrity": "sha512-uFLMEEzv3/8iOFekrFWOSRI/MxrEw4hNztNK1xy8kClzkR3c96Rj1+4xxTSOSHOUtS0d3Kx4O8zugSYALO1GLQ==", + "version": "2.51.2", + "resolved": "https://registry.npmjs.org/@wordpress/annotations/-/annotations-2.51.2.tgz", + "integrity": "sha512-zGjZJjN9ySItGX1yZkPL2zfGjUWu+kFoHTPyvkBFfKBTIm3Pb0OwpO+teRilzz+tWeSc+dNMpdOry6KxCtC1Qw==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/data": "^9.21.0", - "@wordpress/hooks": "^3.51.0", - "@wordpress/i18n": "^4.51.0", - "@wordpress/rich-text": "^6.28.1", + "@wordpress/data": "^9.21.1", + "@wordpress/hooks": "^3.51.1", + "@wordpress/i18n": "^4.51.1", + "@wordpress/rich-text": "^6.28.2", "rememo": "^4.0.2", "uuid": "^9.0.1" } }, "@wordpress/api-fetch": { - "version": "6.48.0", - "resolved": "https://registry.npmjs.org/@wordpress/api-fetch/-/api-fetch-6.48.0.tgz", - "integrity": "sha512-Yo9kpwf07OXt/xV82EfYlnR4Dl6T/VnhKbo0wtmOO7fLxhfOrF0rFgJM4X78WEWBYcjnGwQD5c5ufad7X5XK1A==", + "version": "6.48.1", + "resolved": "https://registry.npmjs.org/@wordpress/api-fetch/-/api-fetch-6.48.1.tgz", + "integrity": "sha512-3EEmItYDi1hNujIkX2MT6LVbZEj2xCStI50QUTqWKLvDa/qOS2L9l1yV+Ol330ZRErIRNBZds/PuujGKA0LZQw==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/i18n": "^4.51.0", - "@wordpress/url": "^3.52.0" + "@wordpress/i18n": "^4.51.1", + "@wordpress/url": "^3.52.1" } }, "@wordpress/autop": { - "version": "3.51.0", - "resolved": "https://registry.npmjs.org/@wordpress/autop/-/autop-3.51.0.tgz", - "integrity": "sha512-n33dunOrA3lLNXlHHVzU0f5Sns67XvxHTYd86cdBLZFLDeScfCnFzJ4+5K4l+1ayuNK511Njf+76Z0vYKrGc9w==", + "version": "3.51.1", + "resolved": "https://registry.npmjs.org/@wordpress/autop/-/autop-3.51.1.tgz", + "integrity": "sha512-WI4r+Ne9tCx4g9PU1PXkiKWUc7w9H+FMVR8QLgVt04RzmN5MKhMs9Z30lVBv/eHnfpBSqdMqqh4TsgITg3C9rA==", "requires": { "@babel/runtime": "^7.16.0" } }, "@wordpress/babel-plugin-import-jsx-pragma": { - "version": "4.34.0", - "resolved": "https://registry.npmjs.org/@wordpress/babel-plugin-import-jsx-pragma/-/babel-plugin-import-jsx-pragma-4.34.0.tgz", - "integrity": "sha512-DOoUJKvfUc8rdiGqcZND5lauoY4B5+cCuuHLh9AztE1t2DlQJBy6DtP6t1bUZb7BYUWOoWgRflMLtOK3ZTf0cg==", + "version": "4.34.1", + "resolved": "https://registry.npmjs.org/@wordpress/babel-plugin-import-jsx-pragma/-/babel-plugin-import-jsx-pragma-4.34.1.tgz", + "integrity": "sha512-PUM+TQUfwKlV4P/CkqoJTYhTF3M6z3tItr6LcANxaZbj7Ru4vuiL1La3KsMrDfE9OQB5jxiQIiL9/k4eBRJS1Q==", "dev": true }, "@wordpress/babel-preset-default": { - "version": "7.35.0", - "resolved": "https://registry.npmjs.org/@wordpress/babel-preset-default/-/babel-preset-default-7.35.0.tgz", - "integrity": "sha512-wgZOezNvzbrJTHn0Cyt8+Si7sb5aJJ+akHOrEgvUUv576LfgWUKHPRz8Ecu1fFlupEp35r1uoQ5J+UviLWrvEg==", + "version": "7.35.1", + "resolved": "https://registry.npmjs.org/@wordpress/babel-preset-default/-/babel-preset-default-7.35.1.tgz", + "integrity": "sha512-fA/XOt6cxd6YdD8jBgbYRswse1GuoWdrVM5QruIZMoQMIqHqvRMzN1pdi5RccS5s11WM64J9pdVZ5lTy6wQcjg==", "dev": true, "requires": { "@babel/core": "^7.16.0", @@ -37657,94 +37672,94 @@ "@babel/preset-env": "^7.16.0", "@babel/preset-typescript": "^7.16.0", "@babel/runtime": "^7.16.0", - "@wordpress/babel-plugin-import-jsx-pragma": "^4.34.0", - "@wordpress/browserslist-config": "^5.34.0", - "@wordpress/warning": "^2.51.0", + "@wordpress/babel-plugin-import-jsx-pragma": "^4.34.1", + "@wordpress/browserslist-config": "^5.34.1", + "@wordpress/warning": "^2.51.1", "browserslist": "^4.21.10", "core-js": "^3.31.0", "react": "^18.2.0" } }, "@wordpress/base-styles": { - "version": "4.42.0", - "resolved": "https://registry.npmjs.org/@wordpress/base-styles/-/base-styles-4.42.0.tgz", - "integrity": "sha512-CD8nFUg45v70BTsKuS9f/sJsdF8xOkJb2oXd0HikWtuJJ24YQB8bzkeIg+TvD5LnK4pwZeDskODo4QFBsoCwIw==", + "version": "4.42.1", + "resolved": "https://registry.npmjs.org/@wordpress/base-styles/-/base-styles-4.42.1.tgz", + "integrity": "sha512-PHG0QRUP94K6rdzYGDF5703yMZSwgIFQ7Uyrs/jFt/XbHLDoqoL85DCEXQvT+TsstfeLBnSgy4UNraNZb8BHCA==", "dev": true }, "@wordpress/blob": { - "version": "3.51.0", - "resolved": "https://registry.npmjs.org/@wordpress/blob/-/blob-3.51.0.tgz", - "integrity": "sha512-DICMSq7Y6gI6Lz+euG1v1xsIExIFrQ8bcINmnUmwcujgHckm0BaJwAKXXO4CHQVwNLWbHZiu5ySuzorw5rhG8w==", + "version": "3.51.1", + "resolved": "https://registry.npmjs.org/@wordpress/blob/-/blob-3.51.1.tgz", + "integrity": "sha512-zALHVOBRQBr7FoQEkJEzZ+oQZJ9H8E1FevVpyIpte1F78EXWfJoyN2AOLfWoKCUy8Fue2Di/Jp+cDn7NWzV2XQ==", "requires": { "@babel/runtime": "^7.16.0" } }, "@wordpress/block-directory": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/@wordpress/block-directory/-/block-directory-4.28.1.tgz", - "integrity": "sha512-Ed53YdwrDhZ5NhHSiaTx+OIt2CjvgtlXwD2L23GRUQODLifRq6WOmPVk8hISP7k2SXI5B7Y2QkG0P0D8VKK9UA==", + "version": "4.28.2", + "resolved": "https://registry.npmjs.org/@wordpress/block-directory/-/block-directory-4.28.2.tgz", + "integrity": "sha512-dCbSM19uKDvQzAGFZjYwtE0wW1L+2ghziKbZXX/e1uEOfP4AfwDvx4nRR2/rg27GP4TLEBW+v/1GfuYu6MkojA==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/a11y": "^3.51.0", - "@wordpress/api-fetch": "^6.48.0", - "@wordpress/block-editor": "^12.19.1", - "@wordpress/blocks": "^12.28.1", - "@wordpress/components": "^26.0.1", - "@wordpress/compose": "^6.28.0", - "@wordpress/core-data": "^6.28.1", - "@wordpress/data": "^9.21.0", - "@wordpress/edit-post": "^7.28.1", - "@wordpress/editor": "^13.28.1", - "@wordpress/element": "^5.28.0", - "@wordpress/hooks": "^3.51.0", - "@wordpress/html-entities": "^3.51.0", - "@wordpress/i18n": "^4.51.0", - "@wordpress/icons": "^9.42.0", - "@wordpress/notices": "^4.19.0", - "@wordpress/plugins": "^6.19.1", - "@wordpress/private-apis": "^0.33.0", - "@wordpress/url": "^3.52.0", + "@wordpress/a11y": "^3.51.1", + "@wordpress/api-fetch": "^6.48.1", + "@wordpress/block-editor": "^12.19.2", + "@wordpress/blocks": "^12.28.2", + "@wordpress/components": "^26.0.2", + "@wordpress/compose": "^6.28.1", + "@wordpress/core-data": "^6.28.2", + "@wordpress/data": "^9.21.1", + "@wordpress/edit-post": "^7.28.2", + "@wordpress/editor": "^13.28.2", + "@wordpress/element": "^5.28.1", + "@wordpress/hooks": "^3.51.1", + "@wordpress/html-entities": "^3.51.1", + "@wordpress/i18n": "^4.51.1", + "@wordpress/icons": "^9.42.1", + "@wordpress/notices": "^4.19.1", + "@wordpress/plugins": "^6.19.2", + "@wordpress/private-apis": "^0.33.1", + "@wordpress/url": "^3.52.1", "change-case": "^4.1.2" } }, "@wordpress/block-editor": { - "version": "12.19.1", - "resolved": "https://registry.npmjs.org/@wordpress/block-editor/-/block-editor-12.19.1.tgz", - "integrity": "sha512-ZzG0XiakM5GHVvpJw0MTEYmX0WPJJwGegMTbhkSCrMnsAY0uRpYjrZwbSbPoweFdBpkIWdKs7W9BGIQ69WVcsA==", + "version": "12.19.2", + "resolved": "https://registry.npmjs.org/@wordpress/block-editor/-/block-editor-12.19.2.tgz", + "integrity": "sha512-d1zprLFZ7QxDyQ1CJQSuIWh6tPLzFgiLvsBmCkbXlbX+0aEJxhoWsC/7avfeVWmf7Af2anID9imu5PoMLU8ztA==", "requires": { "@babel/runtime": "^7.16.0", "@emotion/react": "^11.7.1", "@emotion/styled": "^11.6.0", "@react-spring/web": "^9.4.5", - "@wordpress/a11y": "^3.51.0", - "@wordpress/api-fetch": "^6.48.0", - "@wordpress/blob": "^3.51.0", - "@wordpress/blocks": "^12.28.1", - "@wordpress/commands": "^0.22.1", - "@wordpress/components": "^26.0.1", - "@wordpress/compose": "^6.28.0", - "@wordpress/data": "^9.21.0", - "@wordpress/date": "^4.51.0", - "@wordpress/deprecated": "^3.51.0", - "@wordpress/dom": "^3.51.0", - "@wordpress/element": "^5.28.0", - "@wordpress/escape-html": "^2.51.0", - "@wordpress/hooks": "^3.51.0", - "@wordpress/html-entities": "^3.51.0", - "@wordpress/i18n": "^4.51.0", - "@wordpress/icons": "^9.42.0", - "@wordpress/is-shallow-equal": "^4.51.0", - "@wordpress/keyboard-shortcuts": "^4.28.0", - "@wordpress/keycodes": "^3.51.0", - "@wordpress/notices": "^4.19.0", - "@wordpress/preferences": "^3.28.1", - "@wordpress/private-apis": "^0.33.0", - "@wordpress/rich-text": "^6.28.1", - "@wordpress/style-engine": "^1.34.0", - "@wordpress/token-list": "^2.51.0", - "@wordpress/url": "^3.52.0", - "@wordpress/warning": "^2.51.0", - "@wordpress/wordcount": "^3.51.0", + "@wordpress/a11y": "^3.51.1", + "@wordpress/api-fetch": "^6.48.1", + "@wordpress/blob": "^3.51.1", + "@wordpress/blocks": "^12.28.2", + "@wordpress/commands": "^0.22.2", + "@wordpress/components": "^26.0.2", + "@wordpress/compose": "^6.28.1", + "@wordpress/data": "^9.21.1", + "@wordpress/date": "^4.51.1", + "@wordpress/deprecated": "^3.51.1", + "@wordpress/dom": "^3.51.1", + "@wordpress/element": "^5.28.1", + "@wordpress/escape-html": "^2.51.1", + "@wordpress/hooks": "^3.51.1", + "@wordpress/html-entities": "^3.51.1", + "@wordpress/i18n": "^4.51.1", + "@wordpress/icons": "^9.42.1", + "@wordpress/is-shallow-equal": "^4.51.1", + "@wordpress/keyboard-shortcuts": "^4.28.1", + "@wordpress/keycodes": "^3.51.1", + "@wordpress/notices": "^4.19.1", + "@wordpress/preferences": "^3.28.2", + "@wordpress/private-apis": "^0.33.1", + "@wordpress/rich-text": "^6.28.2", + "@wordpress/style-engine": "^1.34.1", + "@wordpress/token-list": "^2.51.1", + "@wordpress/url": "^3.52.1", + "@wordpress/warning": "^2.51.1", + "@wordpress/wordcount": "^3.51.1", "change-case": "^4.1.2", "classnames": "^2.3.1", "colord": "^2.7.0", @@ -37763,43 +37778,43 @@ } }, "@wordpress/block-library": { - "version": "8.28.1", - "resolved": "https://registry.npmjs.org/@wordpress/block-library/-/block-library-8.28.1.tgz", - "integrity": "sha512-3JcTbuDIkZFkC9jFF4jVZNzvCx4FZOpn6QSqXwQ0mKS784u6U4AqZ850uSc7qeXpGl4LX6g8yig0WbX/FZCsWQ==", + "version": "8.28.2", + "resolved": "https://registry.npmjs.org/@wordpress/block-library/-/block-library-8.28.2.tgz", + "integrity": "sha512-xLI0p2esgaNlzxZWrk406vzly78vmL1je1mXWt33iaIeTMC7RqAkgQKDF9b2K/pYJkud/tvHAg9gHOrKfzhoSw==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/a11y": "^3.51.0", - "@wordpress/api-fetch": "^6.48.0", - "@wordpress/autop": "^3.51.0", - "@wordpress/blob": "^3.51.0", - "@wordpress/block-editor": "^12.19.1", - "@wordpress/blocks": "^12.28.1", - "@wordpress/components": "^26.0.1", - "@wordpress/compose": "^6.28.0", - "@wordpress/core-data": "^6.28.1", - "@wordpress/data": "^9.21.0", - "@wordpress/date": "^4.51.0", - "@wordpress/deprecated": "^3.51.0", - "@wordpress/dom": "^3.51.0", - "@wordpress/element": "^5.28.0", - "@wordpress/escape-html": "^2.51.0", - "@wordpress/hooks": "^3.51.0", - "@wordpress/html-entities": "^3.51.0", - "@wordpress/i18n": "^4.51.0", - "@wordpress/icons": "^9.42.0", - "@wordpress/interactivity": "^5.0.0", - "@wordpress/interactivity-router": "^1.1.0", - "@wordpress/keycodes": "^3.51.0", - "@wordpress/notices": "^4.19.0", - "@wordpress/patterns": "^1.12.1", - "@wordpress/primitives": "^3.49.0", - "@wordpress/private-apis": "^0.33.0", - "@wordpress/reusable-blocks": "^4.28.1", - "@wordpress/rich-text": "^6.28.1", - "@wordpress/server-side-render": "^4.28.1", - "@wordpress/url": "^3.52.0", - "@wordpress/viewport": "^5.28.0", - "@wordpress/wordcount": "^3.51.0", + "@wordpress/a11y": "^3.51.1", + "@wordpress/api-fetch": "^6.48.1", + "@wordpress/autop": "^3.51.1", + "@wordpress/blob": "^3.51.1", + "@wordpress/block-editor": "^12.19.2", + "@wordpress/blocks": "^12.28.2", + "@wordpress/components": "^26.0.2", + "@wordpress/compose": "^6.28.1", + "@wordpress/core-data": "^6.28.2", + "@wordpress/data": "^9.21.1", + "@wordpress/date": "^4.51.1", + "@wordpress/deprecated": "^3.51.1", + "@wordpress/dom": "^3.51.1", + "@wordpress/element": "^5.28.1", + "@wordpress/escape-html": "^2.51.1", + "@wordpress/hooks": "^3.51.1", + "@wordpress/html-entities": "^3.51.1", + "@wordpress/i18n": "^4.51.1", + "@wordpress/icons": "^9.42.1", + "@wordpress/interactivity": "^5.0.1", + "@wordpress/interactivity-router": "^1.1.1", + "@wordpress/keycodes": "^3.51.1", + "@wordpress/notices": "^4.19.1", + "@wordpress/patterns": "^1.12.2", + "@wordpress/primitives": "^3.49.1", + "@wordpress/private-apis": "^0.33.1", + "@wordpress/reusable-blocks": "^4.28.2", + "@wordpress/rich-text": "^6.28.2", + "@wordpress/server-side-render": "^4.28.2", + "@wordpress/url": "^3.52.1", + "@wordpress/viewport": "^5.28.1", + "@wordpress/wordcount": "^3.51.1", "change-case": "^4.1.2", "classnames": "^2.3.1", "colord": "^2.7.0", @@ -37812,34 +37827,34 @@ } }, "@wordpress/block-serialization-default-parser": { - "version": "4.51.0", - "resolved": "https://registry.npmjs.org/@wordpress/block-serialization-default-parser/-/block-serialization-default-parser-4.51.0.tgz", - "integrity": "sha512-GQQ6hu7exCmk8KN7wW2Mvmo1CZjBC8sVZZ87lwciKYs963AKrFSySS6JIvI1fxJagHVAddP1MbW5xLYrFt+ISg==", + "version": "4.51.1", + "resolved": "https://registry.npmjs.org/@wordpress/block-serialization-default-parser/-/block-serialization-default-parser-4.51.1.tgz", + "integrity": "sha512-5qvbGVRaHBZCt8UmFvC0dJbcBOUlrpGj495rs1XzqH7hp0GItYkTHcH6LFnEYbURJXjyCmNlhZISGU5Z+Iql3w==", "requires": { "@babel/runtime": "^7.16.0" } }, "@wordpress/blocks": { - "version": "12.28.1", - "resolved": "https://registry.npmjs.org/@wordpress/blocks/-/blocks-12.28.1.tgz", - "integrity": "sha512-eOmNQQyaXiYQLyW5U+pTkX/+2nFcRc+hGJKQhCbPzotWlFeOexTu1J7X9drfN7ikfFSYxtG2EGWMgHcY2PtU5A==", + "version": "12.28.2", + "resolved": "https://registry.npmjs.org/@wordpress/blocks/-/blocks-12.28.2.tgz", + "integrity": "sha512-WgGChxUWQx48ofMgNjZE3c14Ysr8T7AjBetww6zxxvUkRgmGgRFLWUD5syVZ3Zv7lXPOh5IL8PeL9stNw8/+uw==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/autop": "^3.51.0", - "@wordpress/blob": "^3.51.0", - "@wordpress/block-serialization-default-parser": "^4.51.0", - "@wordpress/compose": "^6.28.0", - "@wordpress/data": "^9.21.0", - "@wordpress/deprecated": "^3.51.0", - "@wordpress/dom": "^3.51.0", - "@wordpress/element": "^5.28.0", - "@wordpress/hooks": "^3.51.0", - "@wordpress/html-entities": "^3.51.0", - "@wordpress/i18n": "^4.51.0", - "@wordpress/is-shallow-equal": "^4.51.0", - "@wordpress/private-apis": "^0.33.0", - "@wordpress/rich-text": "^6.28.1", - "@wordpress/shortcode": "^3.51.0", + "@wordpress/autop": "^3.51.1", + "@wordpress/blob": "^3.51.1", + "@wordpress/block-serialization-default-parser": "^4.51.1", + "@wordpress/compose": "^6.28.1", + "@wordpress/data": "^9.21.1", + "@wordpress/deprecated": "^3.51.1", + "@wordpress/dom": "^3.51.1", + "@wordpress/element": "^5.28.1", + "@wordpress/hooks": "^3.51.1", + "@wordpress/html-entities": "^3.51.1", + "@wordpress/i18n": "^4.51.1", + "@wordpress/is-shallow-equal": "^4.51.1", + "@wordpress/private-apis": "^0.33.1", + "@wordpress/rich-text": "^6.28.2", + "@wordpress/shortcode": "^3.51.1", "change-case": "^4.1.2", "colord": "^2.7.0", "fast-deep-equal": "^3.1.3", @@ -37855,33 +37870,33 @@ } }, "@wordpress/browserslist-config": { - "version": "5.34.0", - "resolved": "https://registry.npmjs.org/@wordpress/browserslist-config/-/browserslist-config-5.34.0.tgz", - "integrity": "sha512-LafF3XoetOAN99bktOzc9hSOv7cPoQEe0/KPgiw24t77xvRqLuWww+zYbiHAHYSzdBGngrlNwRLgloSifnp+hg==", + "version": "5.34.1", + "resolved": "https://registry.npmjs.org/@wordpress/browserslist-config/-/browserslist-config-5.34.1.tgz", + "integrity": "sha512-n2Tnqsg2JpoTgo/TvmbuX6XhGCH88dNxYI3vkLsfeWQmm3eHUZ/bIcAvINQh+j2nGmASFQLXGm/H4cWLSKO3jw==", "dev": true }, "@wordpress/commands": { - "version": "0.22.1", - "resolved": "https://registry.npmjs.org/@wordpress/commands/-/commands-0.22.1.tgz", - "integrity": "sha512-lA5LH7fyV0ov8QgZ1cetstTH9pQL+3b0RAYoR/MJJLOzlEdg7NXbb2vIKTYZ13oF1Oo4oIdrG+JDUeL94wVVvQ==", + "version": "0.22.2", + "resolved": "https://registry.npmjs.org/@wordpress/commands/-/commands-0.22.2.tgz", + "integrity": "sha512-S+OLVQEG2lWMU4mcDQ2sP3lgRkTzSna2ETarKorOLtA1JjkjDPRZdo8rky8vB9DzycIFiYs3VrArUIhe8NgAVw==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/components": "^26.0.1", - "@wordpress/data": "^9.21.0", - "@wordpress/element": "^5.28.0", - "@wordpress/i18n": "^4.51.0", - "@wordpress/icons": "^9.42.0", - "@wordpress/keyboard-shortcuts": "^4.28.0", - "@wordpress/private-apis": "^0.33.0", + "@wordpress/components": "^26.0.2", + "@wordpress/data": "^9.21.1", + "@wordpress/element": "^5.28.1", + "@wordpress/i18n": "^4.51.1", + "@wordpress/icons": "^9.42.1", + "@wordpress/keyboard-shortcuts": "^4.28.1", + "@wordpress/private-apis": "^0.33.1", "classnames": "^2.3.1", "cmdk": "^0.2.0", "rememo": "^4.0.2" } }, "@wordpress/components": { - "version": "26.0.1", - "resolved": "https://registry.npmjs.org/@wordpress/components/-/components-26.0.1.tgz", - "integrity": "sha512-kHrQVm109nXYHfoea0KlIKa8RIIMrx/vgnUb0mKKA4BGhg/kGaNW+vYnWVE5W/kGEDk+7Y8fiDnwicc5AisuBg==", + "version": "26.0.2", + "resolved": "https://registry.npmjs.org/@wordpress/components/-/components-26.0.2.tgz", + "integrity": "sha512-wBcWcbkIGqa5iZmbV3mcxGImNmZroKQOSuN1c71qaogISxfV6QlV8+Ww7fzk43FflZQG77NOoN/lc0Mnwkobtg==", "requires": { "@ariakit/react": "^0.3.12", "@babel/runtime": "^7.16.0", @@ -37895,23 +37910,23 @@ "@types/gradient-parser": "0.1.3", "@types/highlight-words-core": "1.2.1", "@use-gesture/react": "^10.2.24", - "@wordpress/a11y": "^3.51.0", - "@wordpress/compose": "^6.28.0", - "@wordpress/date": "^4.51.0", - "@wordpress/deprecated": "^3.51.0", - "@wordpress/dom": "^3.51.0", - "@wordpress/element": "^5.28.0", - "@wordpress/escape-html": "^2.51.0", - "@wordpress/hooks": "^3.51.0", - "@wordpress/html-entities": "^3.51.0", - "@wordpress/i18n": "^4.51.0", - "@wordpress/icons": "^9.42.0", - "@wordpress/is-shallow-equal": "^4.51.0", - "@wordpress/keycodes": "^3.51.0", - "@wordpress/primitives": "^3.49.0", - "@wordpress/private-apis": "^0.33.0", - "@wordpress/rich-text": "^6.28.1", - "@wordpress/warning": "^2.51.0", + "@wordpress/a11y": "^3.51.1", + "@wordpress/compose": "^6.28.1", + "@wordpress/date": "^4.51.1", + "@wordpress/deprecated": "^3.51.1", + "@wordpress/dom": "^3.51.1", + "@wordpress/element": "^5.28.1", + "@wordpress/escape-html": "^2.51.1", + "@wordpress/hooks": "^3.51.1", + "@wordpress/html-entities": "^3.51.1", + "@wordpress/i18n": "^4.51.1", + "@wordpress/icons": "^9.42.1", + "@wordpress/is-shallow-equal": "^4.51.1", + "@wordpress/keycodes": "^3.51.1", + "@wordpress/primitives": "^3.49.1", + "@wordpress/private-apis": "^0.33.1", + "@wordpress/rich-text": "^6.28.2", + "@wordpress/warning": "^2.51.1", "change-case": "^4.1.2", "classnames": "^2.3.1", "colord": "^2.7.0", @@ -37935,19 +37950,19 @@ } }, "@wordpress/compose": { - "version": "6.28.0", - "resolved": "https://registry.npmjs.org/@wordpress/compose/-/compose-6.28.0.tgz", - "integrity": "sha512-Vx1SDgG3wIaiB/sUZcYB6csG0s5H3Lv5p9oKy8NDkA9dVfHoUz/XLwdx/yzsB3mqvDcZqReEQeoYHP7F4HeWqA==", + "version": "6.28.1", + "resolved": "https://registry.npmjs.org/@wordpress/compose/-/compose-6.28.1.tgz", + "integrity": "sha512-ex5cd0JqmH1RTPmk0Q1KdqQHTBNlWGa2d3VjLg2RjXVmfdJf5CR0QTSo9Id40NpUrGQ4Dne7koaMi2r6P32OuA==", "requires": { "@babel/runtime": "^7.16.0", "@types/mousetrap": "^1.6.8", - "@wordpress/deprecated": "^3.51.0", - "@wordpress/dom": "^3.51.0", - "@wordpress/element": "^5.28.0", - "@wordpress/is-shallow-equal": "^4.51.0", - "@wordpress/keycodes": "^3.51.0", - "@wordpress/priority-queue": "^2.51.0", - "@wordpress/undo-manager": "^0.11.0", + "@wordpress/deprecated": "^3.51.1", + "@wordpress/dom": "^3.51.1", + "@wordpress/element": "^5.28.1", + "@wordpress/is-shallow-equal": "^4.51.1", + "@wordpress/keycodes": "^3.51.1", + "@wordpress/priority-queue": "^2.51.1", + "@wordpress/undo-manager": "^0.11.1", "change-case": "^4.1.2", "clipboard": "^2.0.11", "mousetrap": "^1.6.5", @@ -37955,45 +37970,45 @@ } }, "@wordpress/core-commands": { - "version": "0.20.1", - "resolved": "https://registry.npmjs.org/@wordpress/core-commands/-/core-commands-0.20.1.tgz", - "integrity": "sha512-HwyCMCuhR5Fjzmgnca9+rvoUrPu2PZS9lCKEdy2i8vv8fRKWSYtHPTGZJpxAGDh29roJTCDUcSlciJyEt+f6kA==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@wordpress/core-commands/-/core-commands-0.20.2.tgz", + "integrity": "sha512-F2kRVV3C029qmiOrgKF5Xa/ZyGOcnWmrH0p9jzCCGNRVRLo8SVbraOzIB9jyyCDwMHyOWRJDUZ2+tCO431Dy1Q==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/block-editor": "^12.19.1", - "@wordpress/commands": "^0.22.1", - "@wordpress/compose": "^6.28.0", - "@wordpress/core-data": "^6.28.1", - "@wordpress/data": "^9.21.0", - "@wordpress/element": "^5.28.0", - "@wordpress/i18n": "^4.51.0", - "@wordpress/icons": "^9.42.0", - "@wordpress/private-apis": "^0.33.0", - "@wordpress/router": "^0.20.0", - "@wordpress/url": "^3.52.0" + "@wordpress/block-editor": "^12.19.2", + "@wordpress/commands": "^0.22.2", + "@wordpress/compose": "^6.28.1", + "@wordpress/core-data": "^6.28.2", + "@wordpress/data": "^9.21.1", + "@wordpress/element": "^5.28.1", + "@wordpress/i18n": "^4.51.1", + "@wordpress/icons": "^9.42.1", + "@wordpress/private-apis": "^0.33.1", + "@wordpress/router": "^0.20.1", + "@wordpress/url": "^3.52.1" } }, "@wordpress/core-data": { - "version": "6.28.1", - "resolved": "https://registry.npmjs.org/@wordpress/core-data/-/core-data-6.28.1.tgz", - "integrity": "sha512-nsWF83Ssf7QH+jPSkxv5w1PYTC7yZ281kcQBJHWcb27NWsJu0iJ6qPO/h94PItU8yOdeWQ7e6zOJ2gWSvZVtHg==", + "version": "6.28.2", + "resolved": "https://registry.npmjs.org/@wordpress/core-data/-/core-data-6.28.2.tgz", + "integrity": "sha512-sHvYV3yYYzeEtpdElAVKwW+ZW2Hcn70g69opiyMDqGGL3/HbdUp56RjxEV7wCsnXUYlfeKrTV8TL61+uYZyktw==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/api-fetch": "^6.48.0", - "@wordpress/block-editor": "^12.19.1", - "@wordpress/blocks": "^12.28.1", - "@wordpress/compose": "^6.28.0", - "@wordpress/data": "^9.21.0", - "@wordpress/deprecated": "^3.51.0", - "@wordpress/element": "^5.28.0", - "@wordpress/html-entities": "^3.51.0", - "@wordpress/i18n": "^4.51.0", - "@wordpress/is-shallow-equal": "^4.51.0", - "@wordpress/private-apis": "^0.33.0", - "@wordpress/rich-text": "^6.28.1", - "@wordpress/sync": "^0.13.0", - "@wordpress/undo-manager": "^0.11.0", - "@wordpress/url": "^3.52.0", + "@wordpress/api-fetch": "^6.48.1", + "@wordpress/block-editor": "^12.19.2", + "@wordpress/blocks": "^12.28.2", + "@wordpress/compose": "^6.28.1", + "@wordpress/data": "^9.21.1", + "@wordpress/deprecated": "^3.51.1", + "@wordpress/element": "^5.28.1", + "@wordpress/html-entities": "^3.51.1", + "@wordpress/i18n": "^4.51.1", + "@wordpress/is-shallow-equal": "^4.51.1", + "@wordpress/private-apis": "^0.33.1", + "@wordpress/rich-text": "^6.28.2", + "@wordpress/sync": "^0.13.1", + "@wordpress/undo-manager": "^0.11.1", + "@wordpress/url": "^3.52.1", "change-case": "^4.1.2", "equivalent-key-map": "^0.2.2", "fast-deep-equal": "^3.1.3", @@ -38003,48 +38018,48 @@ } }, "@wordpress/customize-widgets": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/@wordpress/customize-widgets/-/customize-widgets-4.28.1.tgz", - "integrity": "sha512-JmTTzMvW84RuoNf6kEA+itKyJkNSsHw/8iB1mb67yd+c2G+48IFsPk3D296RBg4TmiMFRg3VbIYz/oJcS/s3Kw==", + "version": "4.28.2", + "resolved": "https://registry.npmjs.org/@wordpress/customize-widgets/-/customize-widgets-4.28.2.tgz", + "integrity": "sha512-iNAR6z8IrZkL9b/dbJcM0TudbmPH1p32BJeqOAazLn8tBvBrLIjEuuNfJuUJla9zs877URDC8PEF+lHtPbm9cA==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/block-editor": "^12.19.1", - "@wordpress/block-library": "^8.28.1", - "@wordpress/blocks": "^12.28.1", - "@wordpress/components": "^26.0.1", - "@wordpress/compose": "^6.28.0", - "@wordpress/core-data": "^6.28.1", - "@wordpress/data": "^9.21.0", - "@wordpress/dom": "^3.51.0", - "@wordpress/element": "^5.28.0", - "@wordpress/hooks": "^3.51.0", - "@wordpress/i18n": "^4.51.0", - "@wordpress/icons": "^9.42.0", - "@wordpress/interface": "^5.28.1", - "@wordpress/is-shallow-equal": "^4.51.0", - "@wordpress/keyboard-shortcuts": "^4.28.0", - "@wordpress/keycodes": "^3.51.0", - "@wordpress/media-utils": "^4.42.0", - "@wordpress/preferences": "^3.28.1", - "@wordpress/private-apis": "^0.33.0", - "@wordpress/widgets": "^3.28.1", + "@wordpress/block-editor": "^12.19.2", + "@wordpress/block-library": "^8.28.2", + "@wordpress/blocks": "^12.28.2", + "@wordpress/components": "^26.0.2", + "@wordpress/compose": "^6.28.1", + "@wordpress/core-data": "^6.28.2", + "@wordpress/data": "^9.21.1", + "@wordpress/dom": "^3.51.1", + "@wordpress/element": "^5.28.1", + "@wordpress/hooks": "^3.51.1", + "@wordpress/i18n": "^4.51.1", + "@wordpress/icons": "^9.42.1", + "@wordpress/interface": "^5.28.2", + "@wordpress/is-shallow-equal": "^4.51.1", + "@wordpress/keyboard-shortcuts": "^4.28.1", + "@wordpress/keycodes": "^3.51.1", + "@wordpress/media-utils": "^4.42.1", + "@wordpress/preferences": "^3.28.2", + "@wordpress/private-apis": "^0.33.1", + "@wordpress/widgets": "^3.28.2", "classnames": "^2.3.1", "fast-deep-equal": "^3.1.3" } }, "@wordpress/data": { - "version": "9.21.0", - "resolved": "https://registry.npmjs.org/@wordpress/data/-/data-9.21.0.tgz", - "integrity": "sha512-jEAWHcR+xlnI+V0l5N2WLZrZ7THZ+wQjIs5gDHg1wcRLWo7oxe8JHPQ4sIf0zqNaCwj3/svXFvg7pkaJqkDHAw==", + "version": "9.21.1", + "resolved": "https://registry.npmjs.org/@wordpress/data/-/data-9.21.1.tgz", + "integrity": "sha512-7B9ABDvs0V0fb/GvrL5T14KauZNI133u/v5IBAuq89YvZPBUOAFiO/h8DxdkdV1Rr/q79knxAfDxxarjbFzBiw==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/compose": "^6.28.0", - "@wordpress/deprecated": "^3.51.0", - "@wordpress/element": "^5.28.0", - "@wordpress/is-shallow-equal": "^4.51.0", - "@wordpress/priority-queue": "^2.51.0", - "@wordpress/private-apis": "^0.33.0", - "@wordpress/redux-routine": "^4.51.0", + "@wordpress/compose": "^6.28.1", + "@wordpress/deprecated": "^3.51.1", + "@wordpress/element": "^5.28.1", + "@wordpress/is-shallow-equal": "^4.51.1", + "@wordpress/priority-queue": "^2.51.1", + "@wordpress/private-apis": "^0.33.1", + "@wordpress/redux-routine": "^4.51.1", "deepmerge": "^4.3.0", "equivalent-key-map": "^0.2.2", "is-plain-object": "^5.0.0", @@ -38055,92 +38070,92 @@ } }, "@wordpress/data-controls": { - "version": "3.20.0", - "resolved": "https://registry.npmjs.org/@wordpress/data-controls/-/data-controls-3.20.0.tgz", - "integrity": "sha512-sLjZi681AsA5RQ7eke6svKaqRQ08Vv3ufINHgWBKhf2E3iUuZhOMsGB7i+GBAed1IcroWQX1QfQ8C46c8EL2xA==", + "version": "3.20.1", + "resolved": "https://registry.npmjs.org/@wordpress/data-controls/-/data-controls-3.20.1.tgz", + "integrity": "sha512-ty5PCiE21iuWqVpC7XmkgUjP3jq6jKi2K8CZZWpdBA3wcEpKWbB/qCJ5Y3K1bofxkAjvudsrIdczvcUPk2/KCg==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/api-fetch": "^6.48.0", - "@wordpress/data": "^9.21.0", - "@wordpress/deprecated": "^3.51.0" + "@wordpress/api-fetch": "^6.48.1", + "@wordpress/data": "^9.21.1", + "@wordpress/deprecated": "^3.51.1" } }, "@wordpress/dataviews": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/@wordpress/dataviews/-/dataviews-0.5.1.tgz", - "integrity": "sha512-BJbgCux+zqCOhUz0yJFcPbL/fxcQG1xDqdwDK1noOfNIA+iR9VPy7IuBt0sbNRiO9tLJRQsM757zVkOOVy6glA==", + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/@wordpress/dataviews/-/dataviews-0.5.2.tgz", + "integrity": "sha512-1WZzxuTm2OvKwa7WwwP/eX0Q8ia8MZ1CXZz7pUhVGYPKBVzRUTFEeGdkGudC0WIBEpAOlYLi5DT/T5v7xxPlnQ==", "requires": { "@ariakit/react": "^0.3.12", "@babel/runtime": "^7.16.0", - "@wordpress/a11y": "^3.51.0", - "@wordpress/components": "^26.0.1", - "@wordpress/compose": "^6.28.0", - "@wordpress/element": "^5.28.0", - "@wordpress/i18n": "^4.51.0", - "@wordpress/icons": "^9.42.0", - "@wordpress/keycodes": "^3.51.0", - "@wordpress/primitives": "^3.49.0", - "@wordpress/private-apis": "^0.33.0", + "@wordpress/a11y": "^3.51.1", + "@wordpress/components": "^26.0.2", + "@wordpress/compose": "^6.28.1", + "@wordpress/element": "^5.28.1", + "@wordpress/i18n": "^4.51.1", + "@wordpress/icons": "^9.42.1", + "@wordpress/keycodes": "^3.51.1", + "@wordpress/primitives": "^3.49.1", + "@wordpress/private-apis": "^0.33.1", "classnames": "^2.3.1", "remove-accents": "^0.5.0" } }, "@wordpress/date": { - "version": "4.51.0", - "resolved": "https://registry.npmjs.org/@wordpress/date/-/date-4.51.0.tgz", - "integrity": "sha512-RqnaIJa8gJ2F8Hj2SLbjk7V4dSRObxIhud+/xneSi4PoPi0pYL3sIGoppXXpyZINhCfMiVZ2JIc8Ryt0zgYxAw==", + "version": "4.51.1", + "resolved": "https://registry.npmjs.org/@wordpress/date/-/date-4.51.1.tgz", + "integrity": "sha512-Pb1o2ANcoOhLguOxMldkAuGmrnn2EoaQrxYdKxTjXHbOQo1ttU/5zAz1RiTvWpNcq+PNJfjQ7bFyFWRMDd06oA==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/deprecated": "^3.51.0", + "@wordpress/deprecated": "^3.51.1", "moment": "^2.29.4", "moment-timezone": "^0.5.40" } }, "@wordpress/dependency-extraction-webpack-plugin": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@wordpress/dependency-extraction-webpack-plugin/-/dependency-extraction-webpack-plugin-5.2.0.tgz", - "integrity": "sha512-BOwGopKL5MocUnmrum9tS+HttzFaY3z5CE6sE2DsoM9BWo6OomM6XC5iNGjbv7KDTmxdxjKr0Yzr6YUeSbNrRA==", + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/@wordpress/dependency-extraction-webpack-plugin/-/dependency-extraction-webpack-plugin-5.2.1.tgz", + "integrity": "sha512-vFLbMsexjD42ONf4xP9vViAQwtvqWoQMKCCQwui8FWYlM1iHYEvI/NxwheFLV/I2kpEDODfCDrWNq4N98aSRCQ==", "dev": true, "requires": { "json2php": "^0.0.7" } }, "@wordpress/deprecated": { - "version": "3.51.0", - "resolved": "https://registry.npmjs.org/@wordpress/deprecated/-/deprecated-3.51.0.tgz", - "integrity": "sha512-jbhK5/zhn2D6xW0WqEFitxowgrlIL03CdG0gMQ9JJNlewvI2qg+4fj9k/ORQh8l5UpBUfkwUHVMaGQswtUUaeQ==", + "version": "3.51.1", + "resolved": "https://registry.npmjs.org/@wordpress/deprecated/-/deprecated-3.51.1.tgz", + "integrity": "sha512-rg+uzNFPQxoZS4essv1jZuJXcWfGs3S9yBsUMPywjSNp0lefHl5jFxqLriYbTX8VlwjgdITU4y5eWheTHq7WnQ==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/hooks": "^3.51.0" + "@wordpress/hooks": "^3.51.1" } }, "@wordpress/dom": { - "version": "3.51.0", - "resolved": "https://registry.npmjs.org/@wordpress/dom/-/dom-3.51.0.tgz", - "integrity": "sha512-5L8iQCq2t+4qHpo4MBZqMg5MqmVZI/U/BaF50yhtTZQSGyhR2SzlixnL8udwatm8KQFteWj8Zwmmu+3GXRTB2Q==", + "version": "3.51.1", + "resolved": "https://registry.npmjs.org/@wordpress/dom/-/dom-3.51.1.tgz", + "integrity": "sha512-EfrgZ1BUr5sesgtzFFWjX4TJfDmL8/1PgGN48P6C3heykocH2/R9ECQvlOKvMrAcJuKKlkvdM8z93pTwFaArxw==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/deprecated": "^3.51.0" + "@wordpress/deprecated": "^3.51.1" } }, "@wordpress/dom-ready": { - "version": "3.51.0", - "resolved": "https://registry.npmjs.org/@wordpress/dom-ready/-/dom-ready-3.51.0.tgz", - "integrity": "sha512-k8+UhRu7moBPWUa1EAfqF+r5VT8EnBGr4zxV+jJJZZg0tTN61RD/mJ0kSzu/0PVQQsAiDgAhxWrfVy2FwFdpCw==", + "version": "3.51.1", + "resolved": "https://registry.npmjs.org/@wordpress/dom-ready/-/dom-ready-3.51.1.tgz", + "integrity": "sha512-YgmuBqBW25RHio+m7qsSV8NYFcpTX3pxsK4FLWui6WMwUrKslZc9MZHB332Cfn2dOlR/fFEtcDO28KYT7AzCOQ==", "requires": { "@babel/runtime": "^7.16.0" } }, "@wordpress/e2e-test-utils": { - "version": "10.22.0", - "resolved": "https://registry.npmjs.org/@wordpress/e2e-test-utils/-/e2e-test-utils-10.22.0.tgz", - "integrity": "sha512-y+JWxgHuTgRwomApfbgHyDj//iYFuerL7BwoxYAfA/dk59C10H3nfqRPxtrca1vh1249e5w76xOM+Y353BleJg==", + "version": "10.22.1", + "resolved": "https://registry.npmjs.org/@wordpress/e2e-test-utils/-/e2e-test-utils-10.22.1.tgz", + "integrity": "sha512-BBSqwuLkrW4T+hH5cfWQ+GFjZXZx/MhNfML9IsCbFkYokEGLlVW+ImC4JFJ4Q3cA97ZgBKPew33iEocq7K2Vtg==", "dev": true, "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/api-fetch": "^6.48.0", - "@wordpress/keycodes": "^3.51.0", - "@wordpress/url": "^3.52.0", + "@wordpress/api-fetch": "^6.48.1", + "@wordpress/keycodes": "^3.51.1", + "@wordpress/url": "^3.52.1", "change-case": "^4.1.2", "form-data": "^4.0.0", "node-fetch": "^2.6.0" @@ -38160,14 +38175,14 @@ } }, "@wordpress/e2e-test-utils-playwright": { - "version": "0.19.0", - "resolved": "https://registry.npmjs.org/@wordpress/e2e-test-utils-playwright/-/e2e-test-utils-playwright-0.19.0.tgz", - "integrity": "sha512-iNg5t+fqNZwzBULhe9kMGd36nVlX/WmNeB75wDUKX37fms2ZhiMppj7lt5VGQ82nWDvM+Fq/h89wfioeJKiHhA==", + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@wordpress/e2e-test-utils-playwright/-/e2e-test-utils-playwright-0.19.1.tgz", + "integrity": "sha512-/UIOhYpb8wBSRMIpZyjkDv4Sb7//lHrLRqe6B8tNUhTBfkLl0PDPedZZubnW3L4x0nagEl3v/6B+2JomIW3n+g==", "dev": true, "requires": { - "@wordpress/api-fetch": "^6.48.0", - "@wordpress/keycodes": "^3.51.0", - "@wordpress/url": "^3.52.0", + "@wordpress/api-fetch": "^6.48.1", + "@wordpress/keycodes": "^3.51.1", + "@wordpress/url": "^3.52.1", "change-case": "^4.1.2", "form-data": "^4.0.0", "get-port": "^5.1.1", @@ -38196,92 +38211,92 @@ } }, "@wordpress/edit-post": { - "version": "7.28.1", - "resolved": "https://registry.npmjs.org/@wordpress/edit-post/-/edit-post-7.28.1.tgz", - "integrity": "sha512-CadJAEJBw94awjIbPFm1kM8qaGYmQSscWaQmC8WVQn3qXz0tkNHEhdnW9y0kLCKoq1B+5cXm04WKEUzfw0Ei5g==", + "version": "7.28.2", + "resolved": "https://registry.npmjs.org/@wordpress/edit-post/-/edit-post-7.28.2.tgz", + "integrity": "sha512-MbVtKym3EPxTh0cKVZYRGD+Qq6vY+RTLQ691Qoqafw0e7IYMv5naKD9OQvHU/nj9SNUQam+/2a5ByLy3L+Q22Q==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/a11y": "^3.51.0", - "@wordpress/api-fetch": "^6.48.0", - "@wordpress/block-editor": "^12.19.1", - "@wordpress/block-library": "^8.28.1", - "@wordpress/blocks": "^12.28.1", - "@wordpress/commands": "^0.22.1", - "@wordpress/components": "^26.0.1", - "@wordpress/compose": "^6.28.0", - "@wordpress/core-commands": "^0.20.1", - "@wordpress/core-data": "^6.28.1", - "@wordpress/data": "^9.21.0", - "@wordpress/deprecated": "^3.51.0", - "@wordpress/dom": "^3.51.0", - "@wordpress/editor": "^13.28.1", - "@wordpress/element": "^5.28.0", - "@wordpress/hooks": "^3.51.0", - "@wordpress/i18n": "^4.51.0", - "@wordpress/icons": "^9.42.0", - "@wordpress/interface": "^5.28.1", - "@wordpress/keyboard-shortcuts": "^4.28.0", - "@wordpress/keycodes": "^3.51.0", - "@wordpress/media-utils": "^4.42.0", - "@wordpress/notices": "^4.19.0", - "@wordpress/plugins": "^6.19.1", - "@wordpress/preferences": "^3.28.1", - "@wordpress/private-apis": "^0.33.0", - "@wordpress/url": "^3.52.0", - "@wordpress/viewport": "^5.28.0", - "@wordpress/warning": "^2.51.0", - "@wordpress/widgets": "^3.28.1", + "@wordpress/a11y": "^3.51.1", + "@wordpress/api-fetch": "^6.48.1", + "@wordpress/block-editor": "^12.19.2", + "@wordpress/block-library": "^8.28.2", + "@wordpress/blocks": "^12.28.2", + "@wordpress/commands": "^0.22.2", + "@wordpress/components": "^26.0.2", + "@wordpress/compose": "^6.28.1", + "@wordpress/core-commands": "^0.20.2", + "@wordpress/core-data": "^6.28.2", + "@wordpress/data": "^9.21.1", + "@wordpress/deprecated": "^3.51.1", + "@wordpress/dom": "^3.51.1", + "@wordpress/editor": "^13.28.2", + "@wordpress/element": "^5.28.1", + "@wordpress/hooks": "^3.51.1", + "@wordpress/i18n": "^4.51.1", + "@wordpress/icons": "^9.42.1", + "@wordpress/interface": "^5.28.2", + "@wordpress/keyboard-shortcuts": "^4.28.1", + "@wordpress/keycodes": "^3.51.1", + "@wordpress/media-utils": "^4.42.1", + "@wordpress/notices": "^4.19.1", + "@wordpress/plugins": "^6.19.2", + "@wordpress/preferences": "^3.28.2", + "@wordpress/private-apis": "^0.33.1", + "@wordpress/url": "^3.52.1", + "@wordpress/viewport": "^5.28.1", + "@wordpress/warning": "^2.51.1", + "@wordpress/widgets": "^3.28.2", "classnames": "^2.3.1", "memize": "^2.1.0", "rememo": "^4.0.2" } }, "@wordpress/edit-site": { - "version": "5.28.1", - "resolved": "https://registry.npmjs.org/@wordpress/edit-site/-/edit-site-5.28.1.tgz", - "integrity": "sha512-IX87ujYhDSapXyNBafHqgc1IUdZVH7xdyGLSjjFMpfseRavqdpyQ3bAqG0b8/0XdoKU9Nf8k+a++4eZ60hMIQw==", + "version": "5.28.2", + "resolved": "https://registry.npmjs.org/@wordpress/edit-site/-/edit-site-5.28.2.tgz", + "integrity": "sha512-JivIgorNdhxvqWT8DOqIcF/aUuERRdlVDvq01ISZzD2JcQLeMBWzblQuEb42a+VH4c77xH8bQVuhSCmaV6G+iA==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/a11y": "^3.51.0", - "@wordpress/api-fetch": "^6.48.0", - "@wordpress/blob": "^3.51.0", - "@wordpress/block-editor": "^12.19.1", - "@wordpress/block-library": "^8.28.1", - "@wordpress/blocks": "^12.28.1", - "@wordpress/commands": "^0.22.1", - "@wordpress/components": "^26.0.1", - "@wordpress/compose": "^6.28.0", - "@wordpress/core-commands": "^0.20.1", - "@wordpress/core-data": "^6.28.1", - "@wordpress/data": "^9.21.0", - "@wordpress/dataviews": "^0.5.1", - "@wordpress/date": "^4.51.0", - "@wordpress/deprecated": "^3.51.0", - "@wordpress/dom": "^3.51.0", - "@wordpress/editor": "^13.28.1", - "@wordpress/element": "^5.28.0", - "@wordpress/escape-html": "^2.51.0", - "@wordpress/hooks": "^3.51.0", - "@wordpress/html-entities": "^3.51.0", - "@wordpress/i18n": "^4.51.0", - "@wordpress/icons": "^9.42.0", - "@wordpress/interface": "^5.28.1", - "@wordpress/keyboard-shortcuts": "^4.28.0", - "@wordpress/keycodes": "^3.51.0", - "@wordpress/media-utils": "^4.42.0", - "@wordpress/notices": "^4.19.0", - "@wordpress/patterns": "^1.12.1", - "@wordpress/plugins": "^6.19.1", - "@wordpress/preferences": "^3.28.1", - "@wordpress/primitives": "^3.49.0", - "@wordpress/private-apis": "^0.33.0", - "@wordpress/reusable-blocks": "^4.28.1", - "@wordpress/router": "^0.20.0", - "@wordpress/style-engine": "^1.34.0", - "@wordpress/url": "^3.52.0", - "@wordpress/viewport": "^5.28.0", - "@wordpress/widgets": "^3.28.1", - "@wordpress/wordcount": "^3.51.0", + "@wordpress/a11y": "^3.51.1", + "@wordpress/api-fetch": "^6.48.1", + "@wordpress/blob": "^3.51.1", + "@wordpress/block-editor": "^12.19.2", + "@wordpress/block-library": "^8.28.2", + "@wordpress/blocks": "^12.28.2", + "@wordpress/commands": "^0.22.2", + "@wordpress/components": "^26.0.2", + "@wordpress/compose": "^6.28.1", + "@wordpress/core-commands": "^0.20.2", + "@wordpress/core-data": "^6.28.2", + "@wordpress/data": "^9.21.1", + "@wordpress/dataviews": "^0.5.2", + "@wordpress/date": "^4.51.1", + "@wordpress/deprecated": "^3.51.1", + "@wordpress/dom": "^3.51.1", + "@wordpress/editor": "^13.28.2", + "@wordpress/element": "^5.28.1", + "@wordpress/escape-html": "^2.51.1", + "@wordpress/hooks": "^3.51.1", + "@wordpress/html-entities": "^3.51.1", + "@wordpress/i18n": "^4.51.1", + "@wordpress/icons": "^9.42.1", + "@wordpress/interface": "^5.28.2", + "@wordpress/keyboard-shortcuts": "^4.28.1", + "@wordpress/keycodes": "^3.51.1", + "@wordpress/media-utils": "^4.42.1", + "@wordpress/notices": "^4.19.1", + "@wordpress/patterns": "^1.12.2", + "@wordpress/plugins": "^6.19.2", + "@wordpress/preferences": "^3.28.2", + "@wordpress/primitives": "^3.49.1", + "@wordpress/private-apis": "^0.33.1", + "@wordpress/reusable-blocks": "^4.28.2", + "@wordpress/router": "^0.20.1", + "@wordpress/style-engine": "^1.34.1", + "@wordpress/url": "^3.52.1", + "@wordpress/viewport": "^5.28.1", + "@wordpress/widgets": "^3.28.2", + "@wordpress/wordcount": "^3.51.1", "change-case": "^4.1.2", "classnames": "^2.3.1", "colord": "^2.9.2", @@ -38295,77 +38310,77 @@ } }, "@wordpress/edit-widgets": { - "version": "5.28.1", - "resolved": "https://registry.npmjs.org/@wordpress/edit-widgets/-/edit-widgets-5.28.1.tgz", - "integrity": "sha512-/eDYnVQ1HXz/QGvqfj2uaIbzoxyiNCxhfarnGcd9DeLdM5nU47cexEDRfkQUd4vQL2S9GlOep03dWnw3hTVVXA==", + "version": "5.28.2", + "resolved": "https://registry.npmjs.org/@wordpress/edit-widgets/-/edit-widgets-5.28.2.tgz", + "integrity": "sha512-8dC6Jthv10hIePrIluyb2hl7fUPIIHksHpvieKGJGLZHxA4+Lcp7JFIeC9/rys00xX5GVItKTNqDOn1FUQT/Cw==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/api-fetch": "^6.48.0", - "@wordpress/block-editor": "^12.19.1", - "@wordpress/block-library": "^8.28.1", - "@wordpress/blocks": "^12.28.1", - "@wordpress/components": "^26.0.1", - "@wordpress/compose": "^6.28.0", - "@wordpress/core-data": "^6.28.1", - "@wordpress/data": "^9.21.0", - "@wordpress/deprecated": "^3.51.0", - "@wordpress/dom": "^3.51.0", - "@wordpress/element": "^5.28.0", - "@wordpress/hooks": "^3.51.0", - "@wordpress/i18n": "^4.51.0", - "@wordpress/icons": "^9.42.0", - "@wordpress/interface": "^5.28.1", - "@wordpress/keyboard-shortcuts": "^4.28.0", - "@wordpress/keycodes": "^3.51.0", - "@wordpress/media-utils": "^4.42.0", - "@wordpress/notices": "^4.19.0", - "@wordpress/patterns": "^1.12.1", - "@wordpress/plugins": "^6.19.1", - "@wordpress/preferences": "^3.28.1", - "@wordpress/private-apis": "^0.33.0", - "@wordpress/reusable-blocks": "^4.28.1", - "@wordpress/url": "^3.52.0", - "@wordpress/widgets": "^3.28.1", + "@wordpress/api-fetch": "^6.48.1", + "@wordpress/block-editor": "^12.19.2", + "@wordpress/block-library": "^8.28.2", + "@wordpress/blocks": "^12.28.2", + "@wordpress/components": "^26.0.2", + "@wordpress/compose": "^6.28.1", + "@wordpress/core-data": "^6.28.2", + "@wordpress/data": "^9.21.1", + "@wordpress/deprecated": "^3.51.1", + "@wordpress/dom": "^3.51.1", + "@wordpress/element": "^5.28.1", + "@wordpress/hooks": "^3.51.1", + "@wordpress/i18n": "^4.51.1", + "@wordpress/icons": "^9.42.1", + "@wordpress/interface": "^5.28.2", + "@wordpress/keyboard-shortcuts": "^4.28.1", + "@wordpress/keycodes": "^3.51.1", + "@wordpress/media-utils": "^4.42.1", + "@wordpress/notices": "^4.19.1", + "@wordpress/patterns": "^1.12.2", + "@wordpress/plugins": "^6.19.2", + "@wordpress/preferences": "^3.28.2", + "@wordpress/private-apis": "^0.33.1", + "@wordpress/reusable-blocks": "^4.28.2", + "@wordpress/url": "^3.52.1", + "@wordpress/widgets": "^3.28.2", "classnames": "^2.3.1", "rememo": "^4.0.2" } }, "@wordpress/editor": { - "version": "13.28.1", - "resolved": "https://registry.npmjs.org/@wordpress/editor/-/editor-13.28.1.tgz", - "integrity": "sha512-KqNOI3iaPUAkPSp7i/IxnOl1TCLrQ4win9NzRMXg7DN7G5KiobpFYYWre1NrbDbBbRMxpu/G12uN1jWGIvGQKQ==", + "version": "13.28.2", + "resolved": "https://registry.npmjs.org/@wordpress/editor/-/editor-13.28.2.tgz", + "integrity": "sha512-RMySLg1d8WRp6RKU02urpTGXBNwzc7nvieeSGvq8Ga+e7DbUUTJbpwcbpXIyJvfB69+MKk+A2RTJVUmyBxU6pQ==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/a11y": "^3.51.0", - "@wordpress/api-fetch": "^6.48.0", - "@wordpress/blob": "^3.51.0", - "@wordpress/block-editor": "^12.19.1", - "@wordpress/blocks": "^12.28.1", - "@wordpress/commands": "^0.22.1", - "@wordpress/components": "^26.0.1", - "@wordpress/compose": "^6.28.0", - "@wordpress/core-data": "^6.28.1", - "@wordpress/data": "^9.21.0", - "@wordpress/date": "^4.51.0", - "@wordpress/deprecated": "^3.51.0", - "@wordpress/dom": "^3.51.0", - "@wordpress/element": "^5.28.0", - "@wordpress/hooks": "^3.51.0", - "@wordpress/html-entities": "^3.51.0", - "@wordpress/i18n": "^4.51.0", - "@wordpress/icons": "^9.42.0", - "@wordpress/keyboard-shortcuts": "^4.28.0", - "@wordpress/keycodes": "^3.51.0", - "@wordpress/media-utils": "^4.42.0", - "@wordpress/notices": "^4.19.0", - "@wordpress/patterns": "^1.12.1", - "@wordpress/preferences": "^3.28.1", - "@wordpress/private-apis": "^0.33.0", - "@wordpress/reusable-blocks": "^4.28.1", - "@wordpress/rich-text": "^6.28.1", - "@wordpress/server-side-render": "^4.28.1", - "@wordpress/url": "^3.52.0", - "@wordpress/wordcount": "^3.51.0", + "@wordpress/a11y": "^3.51.1", + "@wordpress/api-fetch": "^6.48.1", + "@wordpress/blob": "^3.51.1", + "@wordpress/block-editor": "^12.19.2", + "@wordpress/blocks": "^12.28.2", + "@wordpress/commands": "^0.22.2", + "@wordpress/components": "^26.0.2", + "@wordpress/compose": "^6.28.1", + "@wordpress/core-data": "^6.28.2", + "@wordpress/data": "^9.21.1", + "@wordpress/date": "^4.51.1", + "@wordpress/deprecated": "^3.51.1", + "@wordpress/dom": "^3.51.1", + "@wordpress/element": "^5.28.1", + "@wordpress/hooks": "^3.51.1", + "@wordpress/html-entities": "^3.51.1", + "@wordpress/i18n": "^4.51.1", + "@wordpress/icons": "^9.42.1", + "@wordpress/keyboard-shortcuts": "^4.28.1", + "@wordpress/keycodes": "^3.51.1", + "@wordpress/media-utils": "^4.42.1", + "@wordpress/notices": "^4.19.1", + "@wordpress/patterns": "^1.12.2", + "@wordpress/preferences": "^3.28.2", + "@wordpress/private-apis": "^0.33.1", + "@wordpress/reusable-blocks": "^4.28.2", + "@wordpress/rich-text": "^6.28.2", + "@wordpress/server-side-render": "^4.28.2", + "@wordpress/url": "^3.52.1", + "@wordpress/wordcount": "^3.51.1", "classnames": "^2.3.1", "date-fns": "^2.28.0", "memize": "^2.1.0", @@ -38375,14 +38390,14 @@ } }, "@wordpress/element": { - "version": "5.28.0", - "resolved": "https://registry.npmjs.org/@wordpress/element/-/element-5.28.0.tgz", - "integrity": "sha512-NEoT3mgF+pJvnhnaTQeLuhSgC6ThfooMfl7OoEyIthRZpUtgKFakmMUU2T6ODzP2+k2DV/jNCfoBZ/Haekmwew==", + "version": "5.28.1", + "resolved": "https://registry.npmjs.org/@wordpress/element/-/element-5.28.1.tgz", + "integrity": "sha512-qV+KxwtqFGe9ua+TUuH3SHMLxX8A6A7W2rkmMwaNMmxIWfJOrwXuwY0Ukm68LVWylnm/ltiNnuSFO6R5Hf/THg==", "requires": { "@babel/runtime": "^7.16.0", "@types/react": "^18.0.21", "@types/react-dom": "^18.0.6", - "@wordpress/escape-html": "^2.51.0", + "@wordpress/escape-html": "^2.51.1", "change-case": "^4.1.2", "is-plain-object": "^5.0.0", "react": "^18.2.0", @@ -38390,24 +38405,24 @@ } }, "@wordpress/escape-html": { - "version": "2.51.0", - "resolved": "https://registry.npmjs.org/@wordpress/escape-html/-/escape-html-2.51.0.tgz", - "integrity": "sha512-sDDSyctW5yON2IaEkaMGIfk2LiQ3Jpz8xAnElKjKpnFhbHQBIG2B2NS2UQ5DzsPGZrfCPHt13E20fGwWj+lthw==", + "version": "2.51.1", + "resolved": "https://registry.npmjs.org/@wordpress/escape-html/-/escape-html-2.51.1.tgz", + "integrity": "sha512-k0zxeXZufc+QMLstvwkFj5Gea348MFnJ4g1dAVl9TI2wcv2dDm8wK5Bc3wS+WbX0GwqVrbNl0kgZhabIdmIJ3g==", "requires": { "@babel/runtime": "^7.16.0" } }, "@wordpress/eslint-plugin": { - "version": "17.8.0", - "resolved": "https://registry.npmjs.org/@wordpress/eslint-plugin/-/eslint-plugin-17.8.0.tgz", - "integrity": "sha512-Ob0WR21Y9AcX7AFKhj0RtJ1l5odp9+Uq0W5tOMVY0jZBAW0oVF6YeZMbc0zbynPss5PnWljtk0YX3CJCae2p3Q==", + "version": "17.8.1", + "resolved": "https://registry.npmjs.org/@wordpress/eslint-plugin/-/eslint-plugin-17.8.1.tgz", + "integrity": "sha512-YcDYdQ+/QdrhJbrBnp36YLMcSRYi8Gm0ePm6/PJ+DG5BECymoYACCzKUajL28jWdlfXsuycrC264HP/WFL/trg==", "dev": true, "requires": { "@babel/eslint-parser": "^7.16.0", "@typescript-eslint/eslint-plugin": "^6.4.1", "@typescript-eslint/parser": "^6.4.1", - "@wordpress/babel-preset-default": "^7.35.0", - "@wordpress/prettier-config": "^3.8.0", + "@wordpress/babel-preset-default": "^7.35.1", + "@wordpress/prettier-config": "^3.8.1", "cosmiconfig": "^7.0.0", "eslint-config-prettier": "^8.3.0", "eslint-plugin-import": "^2.25.2", @@ -38434,48 +38449,48 @@ } }, "@wordpress/format-library": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/@wordpress/format-library/-/format-library-4.28.1.tgz", - "integrity": "sha512-JiDdXs7K6wZYa5iTzYFM6e+o1eF74n2W0Aor256huhkeSF7+7MYobRUvC/6aXQo+hM6/eAJnwE6B1YOdO2c4UA==", + "version": "4.28.2", + "resolved": "https://registry.npmjs.org/@wordpress/format-library/-/format-library-4.28.2.tgz", + "integrity": "sha512-snd/2NaPSY1Vi1aJY57hD9jJV4zdoo5ZkFL7YZ/CRQVoG5F2wwtD1dXhGe/dGid8LVZTXCo79oRzFeUxt9BLMg==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/a11y": "^3.51.0", - "@wordpress/block-editor": "^12.19.1", - "@wordpress/components": "^26.0.1", - "@wordpress/compose": "^6.28.0", - "@wordpress/data": "^9.21.0", - "@wordpress/element": "^5.28.0", - "@wordpress/html-entities": "^3.51.0", - "@wordpress/i18n": "^4.51.0", - "@wordpress/icons": "^9.42.0", - "@wordpress/private-apis": "^0.33.0", - "@wordpress/rich-text": "^6.28.1", - "@wordpress/url": "^3.52.0" + "@wordpress/a11y": "^3.51.1", + "@wordpress/block-editor": "^12.19.2", + "@wordpress/components": "^26.0.2", + "@wordpress/compose": "^6.28.1", + "@wordpress/data": "^9.21.1", + "@wordpress/element": "^5.28.1", + "@wordpress/html-entities": "^3.51.1", + "@wordpress/i18n": "^4.51.1", + "@wordpress/icons": "^9.42.1", + "@wordpress/private-apis": "^0.33.1", + "@wordpress/rich-text": "^6.28.2", + "@wordpress/url": "^3.52.1" } }, "@wordpress/hooks": { - "version": "3.51.0", - "resolved": "https://registry.npmjs.org/@wordpress/hooks/-/hooks-3.51.0.tgz", - "integrity": "sha512-u//qLJCfgmGBLEdAtZx5C1KzmhcCYDIk46feYGBR9DHB1/fqdvMpxc20un62i8QgYvJyF7GChmerkPbssa6a8w==", + "version": "3.51.1", + "resolved": "https://registry.npmjs.org/@wordpress/hooks/-/hooks-3.51.1.tgz", + "integrity": "sha512-LmSwXzd6FdQfB771lOtGFK0deTbP3Bstm/DX2IuJ4ywpgREzGjLJ9A/Yje4GiEYJJkiJT3mmq57crkVj4jNlkQ==", "requires": { "@babel/runtime": "^7.16.0" } }, "@wordpress/html-entities": { - "version": "3.51.0", - "resolved": "https://registry.npmjs.org/@wordpress/html-entities/-/html-entities-3.51.0.tgz", - "integrity": "sha512-3LBqSN5d0aTa0MKgen60RfuwZZnANrUw3tQ3pI4H+hXWSazSi1joyxBPmM1fxNuEO7QMnq1I3pU6ywF9Ok6OOw==", + "version": "3.51.1", + "resolved": "https://registry.npmjs.org/@wordpress/html-entities/-/html-entities-3.51.1.tgz", + "integrity": "sha512-hRCEFtL/7TgmnMhylAkHqq4yluX9z/+8FxhFosHIo/CqVF9wuHDfD8/SsHB2cQjTUF69T1kWLUTARnb3fjuXEA==", "requires": { "@babel/runtime": "^7.16.0" } }, "@wordpress/i18n": { - "version": "4.51.0", - "resolved": "https://registry.npmjs.org/@wordpress/i18n/-/i18n-4.51.0.tgz", - "integrity": "sha512-JiMEstT98R1e4bgI8DA+XVCXUSis/6eZ7+RF5nHuDiseIyQ68B2D2FzYoEFaw/zaVebvtWA0lZ8HbHihgsSVPQ==", + "version": "4.51.1", + "resolved": "https://registry.npmjs.org/@wordpress/i18n/-/i18n-4.51.1.tgz", + "integrity": "sha512-5dGvFOewlpw6d7Rf6sGt0MBJrRDxQr/fGreQQKU5mfYKeTLE6JKI/JIiGuyJ3nqeUGUEPgO53nKC1Sgt63xpHg==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/hooks": "^3.51.0", + "@wordpress/hooks": "^3.51.1", "gettext-parser": "^1.3.1", "memize": "^2.1.0", "sprintf-js": "^1.1.1", @@ -38483,19 +38498,19 @@ } }, "@wordpress/icons": { - "version": "9.42.0", - "resolved": "https://registry.npmjs.org/@wordpress/icons/-/icons-9.42.0.tgz", - "integrity": "sha512-hOLLSsjWFjqV/drgKY2r5wica9dzaqmFcwfB3V/QQAEKrFR3CG2atskDWBRqFfHQIH8nNxSceoGl8PJjiEvi/g==", + "version": "9.42.1", + "resolved": "https://registry.npmjs.org/@wordpress/icons/-/icons-9.42.1.tgz", + "integrity": "sha512-w1nc0azDrgNPglKiBqE6C5k7XjwTBrqHeCNsE6sjNTfUd5TLjpoQIyY5qvsf+3QFlbK/UO48cmCKi7DISMAlZA==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/element": "^5.28.0", - "@wordpress/primitives": "^3.49.0" + "@wordpress/element": "^5.28.1", + "@wordpress/primitives": "^3.49.1" } }, "@wordpress/interactivity": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@wordpress/interactivity/-/interactivity-5.0.0.tgz", - "integrity": "sha512-QfRKMlq3kb4HWevSGjcZU7TcP1+CrzOdbtuhti+RcF3lo4TkgL89AZiY7JAshyMq0XnLxa8LEdFhXrkvzD6ZXQ==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@wordpress/interactivity/-/interactivity-5.0.1.tgz", + "integrity": "sha512-V61j4r+T56rkXAqL27kF1y7ih2eccpFknP5A9Bl4LRRTuQ/Xb1HiJgh97/rOUTWY0DQGTQCi4lOKxc7xAiB6AA==", "requires": { "@preact/signals": "^1.2.2", "deepsignal": "^1.4.0", @@ -38503,46 +38518,46 @@ } }, "@wordpress/interactivity-router": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@wordpress/interactivity-router/-/interactivity-router-1.1.0.tgz", - "integrity": "sha512-dYXdTVkFf5LwdIUAFS64C7OYZR3M/8ZwcHSeLtnQEDcTc+hRwHKHfeGUkL4+NbIK2oOeAuT/b+lk/i+xteOjtg==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@wordpress/interactivity-router/-/interactivity-router-1.1.1.tgz", + "integrity": "sha512-AP1tz9o/OQi5b/b/7J8ltefiif/R3gbYuaVUYP6OLqj2Fbw6EmPdDsb0w3lwmnjcAGvgS9/S9AYP9KuutYk/tw==", "requires": { - "@wordpress/interactivity": "^5.0.0" + "@wordpress/interactivity": "^5.0.1" } }, "@wordpress/interface": { - "version": "5.28.1", - "resolved": "https://registry.npmjs.org/@wordpress/interface/-/interface-5.28.1.tgz", - "integrity": "sha512-zravxzTabfjfjf1ytEv3zAOrH2Jgc0c2VUpdo9iByssu90BHwUk4hrf2wjDytJK6V3f+/v5Tki+7diO8iBK2wA==", + "version": "5.28.2", + "resolved": "https://registry.npmjs.org/@wordpress/interface/-/interface-5.28.2.tgz", + "integrity": "sha512-DZ8Y9AKtKk8DnB4z50R+9iED0WiPhoM3EDTNw7f4Z7UpyV/23gS4M81gRTm/Z30vej6kJ0KieTe1D8ArZWPvYQ==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/a11y": "^3.51.0", - "@wordpress/components": "^26.0.1", - "@wordpress/compose": "^6.28.0", - "@wordpress/data": "^9.21.0", - "@wordpress/deprecated": "^3.51.0", - "@wordpress/element": "^5.28.0", - "@wordpress/i18n": "^4.51.0", - "@wordpress/icons": "^9.42.0", - "@wordpress/plugins": "^6.19.1", - "@wordpress/preferences": "^3.28.1", - "@wordpress/private-apis": "^0.33.0", - "@wordpress/viewport": "^5.28.0", + "@wordpress/a11y": "^3.51.1", + "@wordpress/components": "^26.0.2", + "@wordpress/compose": "^6.28.1", + "@wordpress/data": "^9.21.1", + "@wordpress/deprecated": "^3.51.1", + "@wordpress/element": "^5.28.1", + "@wordpress/i18n": "^4.51.1", + "@wordpress/icons": "^9.42.1", + "@wordpress/plugins": "^6.19.2", + "@wordpress/preferences": "^3.28.2", + "@wordpress/private-apis": "^0.33.1", + "@wordpress/viewport": "^5.28.1", "classnames": "^2.3.1" } }, "@wordpress/is-shallow-equal": { - "version": "4.51.0", - "resolved": "https://registry.npmjs.org/@wordpress/is-shallow-equal/-/is-shallow-equal-4.51.0.tgz", - "integrity": "sha512-/Rik1HF5XoLEuodtwvSMFsAMsLC40aRnFei+vzEsaSjcS4/z2kmzgGcIpc8Ca3HEJgtdx6MuziODG1hU9bKRtg==", + "version": "4.51.1", + "resolved": "https://registry.npmjs.org/@wordpress/is-shallow-equal/-/is-shallow-equal-4.51.1.tgz", + "integrity": "sha512-+dZMtdRt3Xs10RFvAML1u/8RiBNVvAlx6cyzcej5bom019hmo1qdvVfSKjnKWNU8GB55AVMPoq2H5e/i+k/rRg==", "requires": { "@babel/runtime": "^7.16.0" } }, "@wordpress/jest-console": { - "version": "7.22.0", - "resolved": "https://registry.npmjs.org/@wordpress/jest-console/-/jest-console-7.22.0.tgz", - "integrity": "sha512-vuTq/VwmXXTDlZzHiFlYQDCAq8xTg/99pHBiKcJwKe13LZgxEwbUtjKp18JzbXb5qS9KPW/EynTiYxpTLn1o7w==", + "version": "7.22.1", + "resolved": "https://registry.npmjs.org/@wordpress/jest-console/-/jest-console-7.22.1.tgz", + "integrity": "sha512-faDmCtkb8JGVUhw0XlPn0XFlSA5KkWKeM2xDkJ6yUA/rmCuXDUNnMENtUQr5DFj5QlKcozhw3/sY+zof3p5P3g==", "dev": true, "requires": { "@babel/runtime": "^7.16.0", @@ -38550,207 +38565,207 @@ } }, "@wordpress/jest-preset-default": { - "version": "11.22.0", - "resolved": "https://registry.npmjs.org/@wordpress/jest-preset-default/-/jest-preset-default-11.22.0.tgz", - "integrity": "sha512-OSKGvYOQDWynaA78AUzwMpj8kkUrBSJF/Z8InH84RHV1w30DUMQ0b7pSJzOiPPo72uXDcTiit4hYHvSK20BqbA==", + "version": "11.22.1", + "resolved": "https://registry.npmjs.org/@wordpress/jest-preset-default/-/jest-preset-default-11.22.1.tgz", + "integrity": "sha512-QxUO/kmhdqqHpTZtevP/V/kynfHxyyKPX7co7cZwffElDIZagB4DBcfFSDlhDaK1r3XEIlBdt+jFD4nMjcsXcw==", "dev": true, "requires": { - "@wordpress/jest-console": "^7.22.0", + "@wordpress/jest-console": "^7.22.1", "babel-jest": "^29.6.2" } }, "@wordpress/keyboard-shortcuts": { - "version": "4.28.0", - "resolved": "https://registry.npmjs.org/@wordpress/keyboard-shortcuts/-/keyboard-shortcuts-4.28.0.tgz", - "integrity": "sha512-mywx2ExlpraMt2cjHmxC4cHXLErSwJ7OkFR+6byJ7BpxQEhv9tDYrKN6LBAMtYpUeyMtdGavyNCUlFtv/r325Q==", + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/@wordpress/keyboard-shortcuts/-/keyboard-shortcuts-4.28.1.tgz", + "integrity": "sha512-3GMGJI7qrntTJoloIUBOPVyfXRcdFcmZ54hFi54/bxbBNHs6uXe2iwHS40goQsarakYlRW3a5Qh3G7aUeSKM9w==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/data": "^9.21.0", - "@wordpress/element": "^5.28.0", - "@wordpress/keycodes": "^3.51.0", + "@wordpress/data": "^9.21.1", + "@wordpress/element": "^5.28.1", + "@wordpress/keycodes": "^3.51.1", "rememo": "^4.0.2" } }, "@wordpress/keycodes": { - "version": "3.51.0", - "resolved": "https://registry.npmjs.org/@wordpress/keycodes/-/keycodes-3.51.0.tgz", - "integrity": "sha512-wudlftpjZ/2tZ2gKY7w2m7BG4LBhmEvDn2K48IbTcMtEyFJidIB0IFpT+skR1aFhIekGDZ7W8UXPQVbjwbWhwA==", + "version": "3.51.1", + "resolved": "https://registry.npmjs.org/@wordpress/keycodes/-/keycodes-3.51.1.tgz", + "integrity": "sha512-gY362TVIgP6WL8xwvLZRylbang0B4FKf5Lu1OWiisuT0Roaq4nZ2+Pqhlw4MKvxf0AF4SVzuVJDrPJioUJtnPg==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/i18n": "^4.51.0" + "@wordpress/i18n": "^4.51.1" } }, "@wordpress/list-reusable-blocks": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/@wordpress/list-reusable-blocks/-/list-reusable-blocks-4.28.1.tgz", - "integrity": "sha512-xTTSoexrV5MfyYK481d/igpmIV6dZJNM8FPS07ljf8slOb/MRxS/oUfdYyB8OnZSRU5/PBjjKd4blK8PAqukKA==", + "version": "4.28.2", + "resolved": "https://registry.npmjs.org/@wordpress/list-reusable-blocks/-/list-reusable-blocks-4.28.2.tgz", + "integrity": "sha512-M/eaDCm7VD7ueHxGDz5oj5V5gL2zkZJz+Y4G/wQI5Cr0nFMWR89TudVZgItgQHDhg3e1aV3qlFoXK+md/4HsHg==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/api-fetch": "^6.48.0", - "@wordpress/blob": "^3.51.0", - "@wordpress/components": "^26.0.1", - "@wordpress/compose": "^6.28.0", - "@wordpress/element": "^5.28.0", - "@wordpress/i18n": "^4.51.0", + "@wordpress/api-fetch": "^6.48.1", + "@wordpress/blob": "^3.51.1", + "@wordpress/components": "^26.0.2", + "@wordpress/compose": "^6.28.1", + "@wordpress/element": "^5.28.1", + "@wordpress/i18n": "^4.51.1", "change-case": "^4.1.2" } }, "@wordpress/media-utils": { - "version": "4.42.0", - "resolved": "https://registry.npmjs.org/@wordpress/media-utils/-/media-utils-4.42.0.tgz", - "integrity": "sha512-gUKtF94RmFJwlGSoRKaRB/NipM7u1OVYR4UepMFtLB7La8UBWaklTZfpYGjOHfnFkhxiFTULk1j/7b0OVkPMSw==", + "version": "4.42.1", + "resolved": "https://registry.npmjs.org/@wordpress/media-utils/-/media-utils-4.42.1.tgz", + "integrity": "sha512-L9JEBSydd516PiQ2bwYEzJhkwfV9vyfnOs2lSYkYYqBe1H/1HPNpqUNBw9LtaaoGGk5gIjN2qTaZQJtNwXJCFg==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/api-fetch": "^6.48.0", - "@wordpress/blob": "^3.51.0", - "@wordpress/element": "^5.28.0", - "@wordpress/i18n": "^4.51.0" + "@wordpress/api-fetch": "^6.48.1", + "@wordpress/blob": "^3.51.1", + "@wordpress/element": "^5.28.1", + "@wordpress/i18n": "^4.51.1" } }, "@wordpress/notices": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@wordpress/notices/-/notices-4.19.0.tgz", - "integrity": "sha512-9Em2R+YsdMsaOXvWkZWyi/tbDP1JHxpIgASMpoRWIteA422s01NWafwizQwY1f0kvw4JbbyMF283UXmjWnzxQw==", + "version": "4.19.1", + "resolved": "https://registry.npmjs.org/@wordpress/notices/-/notices-4.19.1.tgz", + "integrity": "sha512-HKk655060zaVMLrqKk4WkzXVX2+olT8kR2g6WvpdKGjjY0HLkEA7FpvsSNGhSzHIs51nCAGnYrm5cI2HZb3b2g==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/a11y": "^3.51.0", - "@wordpress/data": "^9.21.0" + "@wordpress/a11y": "^3.51.1", + "@wordpress/data": "^9.21.1" } }, "@wordpress/npm-package-json-lint-config": { - "version": "4.36.0", - "resolved": "https://registry.npmjs.org/@wordpress/npm-package-json-lint-config/-/npm-package-json-lint-config-4.36.0.tgz", - "integrity": "sha512-//BDDFVMHxtXC3JC+76DR8ZbJPI3ltzJ3XLbcn8myG9rlQegbSSqmltVcYoR3CGKFI+IbxY1P8CuzJGRN5EIRA==", + "version": "4.36.1", + "resolved": "https://registry.npmjs.org/@wordpress/npm-package-json-lint-config/-/npm-package-json-lint-config-4.36.1.tgz", + "integrity": "sha512-ASWlcMcTjBYTOSkf136lC+KJtoMPm1jMIW862zasmMrgYnHQjvXekgZAG64dbX/QYpVXAgGriQ3U19z2KwTnCw==", "dev": true }, "@wordpress/nux": { - "version": "8.13.1", - "resolved": "https://registry.npmjs.org/@wordpress/nux/-/nux-8.13.1.tgz", - "integrity": "sha512-W9hL5SI4jiuQe2LoXpyVorvmCOg9yYPGaSVfC0mHeGt/FO7RGmgcZPRiyofYkXHNP0PHY7+vbjJ7CvdAe4a1Yg==", + "version": "8.13.2", + "resolved": "https://registry.npmjs.org/@wordpress/nux/-/nux-8.13.2.tgz", + "integrity": "sha512-oG+0xYLf5FEkUOOZ1uuOyMM9aikaCNEQM7x7hRT4QXOtBbFc3cCpfrgHpPPR7FBDfJiS+JUORiv+6sLXdg3v2g==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/components": "^26.0.1", - "@wordpress/compose": "^6.28.0", - "@wordpress/data": "^9.21.0", - "@wordpress/deprecated": "^3.51.0", - "@wordpress/element": "^5.28.0", - "@wordpress/i18n": "^4.51.0", - "@wordpress/icons": "^9.42.0", + "@wordpress/components": "^26.0.2", + "@wordpress/compose": "^6.28.1", + "@wordpress/data": "^9.21.1", + "@wordpress/deprecated": "^3.51.1", + "@wordpress/element": "^5.28.1", + "@wordpress/i18n": "^4.51.1", + "@wordpress/icons": "^9.42.1", "rememo": "^4.0.2" } }, "@wordpress/patterns": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@wordpress/patterns/-/patterns-1.12.1.tgz", - "integrity": "sha512-7WcnfGeGVYa2QiRgES04NGf+dqJD4qinx9nPQowkTGxNmblC5ySl0v74IuTXkibPw94bw4ivpXsinHvJa1dyVQ==", + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@wordpress/patterns/-/patterns-1.12.2.tgz", + "integrity": "sha512-ysLL/SIcOQFXfxD5JaxsSIqrHeveJKlJo/lzB8R+JAj3i+04xVwTnhjRrTn4SemCEhkI6YoLT29zbv6IKNWlog==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/a11y": "^3.51.0", - "@wordpress/block-editor": "^12.19.1", - "@wordpress/blocks": "^12.28.1", - "@wordpress/components": "^26.0.1", - "@wordpress/compose": "^6.28.0", - "@wordpress/core-data": "^6.28.1", - "@wordpress/data": "^9.21.0", - "@wordpress/element": "^5.28.0", - "@wordpress/html-entities": "^3.51.0", - "@wordpress/i18n": "^4.51.0", - "@wordpress/icons": "^9.42.0", - "@wordpress/notices": "^4.19.0", - "@wordpress/private-apis": "^0.33.0", - "@wordpress/url": "^3.52.0", + "@wordpress/a11y": "^3.51.1", + "@wordpress/block-editor": "^12.19.2", + "@wordpress/blocks": "^12.28.2", + "@wordpress/components": "^26.0.2", + "@wordpress/compose": "^6.28.1", + "@wordpress/core-data": "^6.28.2", + "@wordpress/data": "^9.21.1", + "@wordpress/element": "^5.28.1", + "@wordpress/html-entities": "^3.51.1", + "@wordpress/i18n": "^4.51.1", + "@wordpress/icons": "^9.42.1", + "@wordpress/notices": "^4.19.1", + "@wordpress/private-apis": "^0.33.1", + "@wordpress/url": "^3.52.1", "nanoid": "^3.3.4" } }, "@wordpress/plugins": { - "version": "6.19.1", - "resolved": "https://registry.npmjs.org/@wordpress/plugins/-/plugins-6.19.1.tgz", - "integrity": "sha512-2TAIhzknhRXKcrIK87T6IJR5HkPb4cV8pmsRvcbw6D04euQBPzWR66D+cTVN/nj/Qoqf4YPcfgrahFOV8FHthA==", + "version": "6.19.2", + "resolved": "https://registry.npmjs.org/@wordpress/plugins/-/plugins-6.19.2.tgz", + "integrity": "sha512-ykHWRkgC+hK6Qm56//yEEQaC+lJHMv5jCM6utzispREYoPlR37SP/6Xaq6PWNeVZJ453vm23kYN0tWjBoqlEOg==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/components": "^26.0.1", - "@wordpress/compose": "^6.28.0", - "@wordpress/element": "^5.28.0", - "@wordpress/hooks": "^3.51.0", - "@wordpress/icons": "^9.42.0", - "@wordpress/is-shallow-equal": "^4.51.0", + "@wordpress/components": "^26.0.2", + "@wordpress/compose": "^6.28.1", + "@wordpress/element": "^5.28.1", + "@wordpress/hooks": "^3.51.1", + "@wordpress/icons": "^9.42.1", + "@wordpress/is-shallow-equal": "^4.51.1", "memize": "^2.0.1" } }, "@wordpress/postcss-plugins-preset": { - "version": "4.35.0", - "resolved": "https://registry.npmjs.org/@wordpress/postcss-plugins-preset/-/postcss-plugins-preset-4.35.0.tgz", - "integrity": "sha512-+DiPMZMZXN/U/7mCY/oYEnttjCx2A+m7WOk3hWZt4JP0zDud10iHGMt+VzYPcQBQqABhK9CfPFWhz0WXinJQCw==", + "version": "4.35.1", + "resolved": "https://registry.npmjs.org/@wordpress/postcss-plugins-preset/-/postcss-plugins-preset-4.35.1.tgz", + "integrity": "sha512-vAgqLCwffQ/TBj1P1Q3+ZEUceqzT/9dyOaG3va9yiAqytDJZMtRVcSQ2HJ++S1tSNn3zBP+20sOgAhLjdi2mgw==", "dev": true, "requires": { - "@wordpress/base-styles": "^4.42.0", + "@wordpress/base-styles": "^4.42.1", "autoprefixer": "^10.2.5" } }, "@wordpress/preferences": { - "version": "3.28.1", - "resolved": "https://registry.npmjs.org/@wordpress/preferences/-/preferences-3.28.1.tgz", - "integrity": "sha512-fDhp7lIAnCSHQBg5HeCQLvUh4O+VKNproMSAphLx9XpVgjak781G41Hi4Vj9/sozp24DeK1J+ONUfiYQJBh67A==", + "version": "3.28.2", + "resolved": "https://registry.npmjs.org/@wordpress/preferences/-/preferences-3.28.2.tgz", + "integrity": "sha512-DaDWA78dF8Q15h7NuMoaIF6z7fSdgBH2/Sj7PAP/NaSVageSkU/2T/fbQ7Fou20gYd7F+l+fy80L0i1RuqnX4g==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/a11y": "^3.51.0", - "@wordpress/components": "^26.0.1", - "@wordpress/compose": "^6.28.0", - "@wordpress/data": "^9.21.0", - "@wordpress/deprecated": "^3.51.0", - "@wordpress/element": "^5.28.0", - "@wordpress/i18n": "^4.51.0", - "@wordpress/icons": "^9.42.0", - "@wordpress/private-apis": "^0.33.0", + "@wordpress/a11y": "^3.51.1", + "@wordpress/components": "^26.0.2", + "@wordpress/compose": "^6.28.1", + "@wordpress/data": "^9.21.1", + "@wordpress/deprecated": "^3.51.1", + "@wordpress/element": "^5.28.1", + "@wordpress/i18n": "^4.51.1", + "@wordpress/icons": "^9.42.1", + "@wordpress/private-apis": "^0.33.1", "classnames": "^2.3.1" } }, "@wordpress/preferences-persistence": { - "version": "1.43.0", - "resolved": "https://registry.npmjs.org/@wordpress/preferences-persistence/-/preferences-persistence-1.43.0.tgz", - "integrity": "sha512-+P8GAuCWwvHDN7P7AAvVo0q9hxm8J475qHShJZ4ZysVcnOJMCGV8oE7aJw8q+WTQgDOe0TO9qYKayWQ0LjIY0g==", + "version": "1.43.1", + "resolved": "https://registry.npmjs.org/@wordpress/preferences-persistence/-/preferences-persistence-1.43.1.tgz", + "integrity": "sha512-KkVd4alfSQc80EI61IvKeUaCkS5ThG7Nm70t1yedVJELxTpQ8VX3lg7KmLb5DZR7M6rFW6ju8sW4WGanO2G4gw==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/api-fetch": "^6.48.0" + "@wordpress/api-fetch": "^6.48.1" } }, "@wordpress/prettier-config": { - "version": "3.8.0", - "resolved": "https://registry.npmjs.org/@wordpress/prettier-config/-/prettier-config-3.8.0.tgz", - "integrity": "sha512-xKhhI73uTM3UeK7MYjCeyqGgyZvXic4t0rXKiERN6j4aBH7TdAflKli1zj9Xiy0AxFwLJcy0SZqxqLcw0JHSzA==", + "version": "3.8.1", + "resolved": "https://registry.npmjs.org/@wordpress/prettier-config/-/prettier-config-3.8.1.tgz", + "integrity": "sha512-QWHd1G03SgzDP8JiRZ6W/RyXoySvEAWEcwtFXihCOHyeHdV1SJTya25xmRgVsIClKIAldvqBsLWbkSilNXjD/w==", "dev": true }, "@wordpress/primitives": { - "version": "3.49.0", - "resolved": "https://registry.npmjs.org/@wordpress/primitives/-/primitives-3.49.0.tgz", - "integrity": "sha512-ekcL5fcrEiKOT8pTdi74k+zm7dRBpGW7bPw5bmI8jeJiDNR8HxCLpJQn2O3kI0QK5MenelNJS0j74QKO5noLxw==", + "version": "3.49.1", + "resolved": "https://registry.npmjs.org/@wordpress/primitives/-/primitives-3.49.1.tgz", + "integrity": "sha512-5/oWDxpUTuVdYTT4bwBoc7tMFpwOhQw+SSZ+jZZ9r05NxLmiv6s30jQ9HOdwEQKkJF2pK6yqvp+F5F/GH/K+8w==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/element": "^5.28.0", + "@wordpress/element": "^5.28.1", "classnames": "^2.3.1" } }, "@wordpress/priority-queue": { - "version": "2.51.0", - "resolved": "https://registry.npmjs.org/@wordpress/priority-queue/-/priority-queue-2.51.0.tgz", - "integrity": "sha512-eu5kFXJT1GfZU+g/7VeLi1p0dMt4SAj5qnHxnA1OWdsRd8CSx0ne7VdZxZroeGif1/x/IliBtdb28A8WEZM59A==", + "version": "2.51.1", + "resolved": "https://registry.npmjs.org/@wordpress/priority-queue/-/priority-queue-2.51.1.tgz", + "integrity": "sha512-SizB9UgowckWghvnaIBDswsygOMq/nyrllX08OhUVjrGYsQu8mEm1Ldflw2PkSdov8vTZCbc1diLJBWjt98Ogw==", "requires": { "@babel/runtime": "^7.16.0", "requestidlecallback": "^0.3.0" } }, "@wordpress/private-apis": { - "version": "0.33.0", - "resolved": "https://registry.npmjs.org/@wordpress/private-apis/-/private-apis-0.33.0.tgz", - "integrity": "sha512-Dc8y7m17gAKnDVFOPDqPcb2jo9cDhDNikLdepTkRXLywYUPT2PFH4GrXsVK87BLc+nCIqgs3DFU/AJx1db4y/w==", + "version": "0.33.1", + "resolved": "https://registry.npmjs.org/@wordpress/private-apis/-/private-apis-0.33.1.tgz", + "integrity": "sha512-I7nxWUtZJ243vBC7cRRTId7FK0+c82RlIUZ1DVzutojJlg5a66RfFlMygWg/jVBWEmQqfcGSB4zPiGhi7JVBAg==", "requires": { "@babel/runtime": "^7.16.0" } }, "@wordpress/redux-routine": { - "version": "4.51.0", - "resolved": "https://registry.npmjs.org/@wordpress/redux-routine/-/redux-routine-4.51.0.tgz", - "integrity": "sha512-lMEkB4yg0H/P0kvmgWrPcD55ib9lPUROABdgy569ERtIq6F3Ig7Q2SJoGM91VgIVBDb4ZFvJ9Wa/+a2HIHJMuQ==", + "version": "4.51.1", + "resolved": "https://registry.npmjs.org/@wordpress/redux-routine/-/redux-routine-4.51.1.tgz", + "integrity": "sha512-FEuQSTurYmG6Vu/eZJiCbvOhyQ0PO5kGZK8YULbV/4iY5TeXuqmh4ybuzBqBeakwQLUX1+7PTZcFhTMCdIjNNA==", "requires": { "@babel/runtime": "^7.16.0", "is-plain-object": "^5.0.0", @@ -38759,73 +38774,73 @@ } }, "@wordpress/reusable-blocks": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/@wordpress/reusable-blocks/-/reusable-blocks-4.28.1.tgz", - "integrity": "sha512-+d6Yal7cIYbUPaDRsRxg3L3pNUR1Aa5bWTIi9kdyYMsB9rcrWDNjpIFG9olLedVFk5j3Dn/dG10wTrp39YxyqA==", + "version": "4.28.2", + "resolved": "https://registry.npmjs.org/@wordpress/reusable-blocks/-/reusable-blocks-4.28.2.tgz", + "integrity": "sha512-qy20aeRtI8TxSb5hkIkCeBhYOL9SHZpiZ+wmeQf6Jzra6W5D1mhJXDGmDSdYEl9M6nXHeSay3qOISTnJTrgRng==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/block-editor": "^12.19.1", - "@wordpress/blocks": "^12.28.1", - "@wordpress/components": "^26.0.1", - "@wordpress/core-data": "^6.28.1", - "@wordpress/data": "^9.21.0", - "@wordpress/element": "^5.28.0", - "@wordpress/i18n": "^4.51.0", - "@wordpress/icons": "^9.42.0", - "@wordpress/notices": "^4.19.0", - "@wordpress/private-apis": "^0.33.0", - "@wordpress/url": "^3.52.0" + "@wordpress/block-editor": "^12.19.2", + "@wordpress/blocks": "^12.28.2", + "@wordpress/components": "^26.0.2", + "@wordpress/core-data": "^6.28.2", + "@wordpress/data": "^9.21.1", + "@wordpress/element": "^5.28.1", + "@wordpress/i18n": "^4.51.1", + "@wordpress/icons": "^9.42.1", + "@wordpress/notices": "^4.19.1", + "@wordpress/private-apis": "^0.33.1", + "@wordpress/url": "^3.52.1" } }, "@wordpress/rich-text": { - "version": "6.28.1", - "resolved": "https://registry.npmjs.org/@wordpress/rich-text/-/rich-text-6.28.1.tgz", - "integrity": "sha512-cdMpzhnRQMBCw2SewaZt1SLaUGApb+IfQjQFAW9WXwh5GbJEi5xZX6DRulMoU0Jd7lOepq/w0gbwxDePUegyCA==", + "version": "6.28.2", + "resolved": "https://registry.npmjs.org/@wordpress/rich-text/-/rich-text-6.28.2.tgz", + "integrity": "sha512-jBvQdCPeRI/zoWTBL3IEF6Y8YN/f6Xv6R94G3b2FldLFVbJoMTRFD4rd8vDHN8AeVOyA0+VIWziLw88ZVD8Qgw==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/a11y": "^3.51.0", - "@wordpress/compose": "^6.28.0", - "@wordpress/data": "^9.21.0", - "@wordpress/deprecated": "^3.51.0", - "@wordpress/element": "^5.28.0", - "@wordpress/escape-html": "^2.51.0", - "@wordpress/i18n": "^4.51.0", - "@wordpress/keycodes": "^3.51.0", + "@wordpress/a11y": "^3.51.1", + "@wordpress/compose": "^6.28.1", + "@wordpress/data": "^9.21.1", + "@wordpress/deprecated": "^3.51.1", + "@wordpress/element": "^5.28.1", + "@wordpress/escape-html": "^2.51.1", + "@wordpress/i18n": "^4.51.1", + "@wordpress/keycodes": "^3.51.1", "memize": "^2.1.0", "rememo": "^4.0.2" } }, "@wordpress/router": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@wordpress/router/-/router-0.20.0.tgz", - "integrity": "sha512-DK9FuZOr1nN1+wdMyuNFa+MNDN5RQ+ZQi2Hbl8NkngKwmu+b5AyP/PgKVcVStX+W6wpYsejvhDNYNKxWDKuQIQ==", + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@wordpress/router/-/router-0.20.1.tgz", + "integrity": "sha512-toHdvNSzBvsdy3boUtIkmMNBMyrf0H8qoKVz06KoA8KWCwDtiLqZIOg+KPVWGNAHO1nCaljAVkManRrmNkvChQ==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/element": "^5.28.0", - "@wordpress/private-apis": "^0.33.0", - "@wordpress/url": "^3.52.0", + "@wordpress/element": "^5.28.1", + "@wordpress/private-apis": "^0.33.1", + "@wordpress/url": "^3.52.1", "history": "^5.1.0" } }, "@wordpress/scripts": { - "version": "27.2.0", - "resolved": "https://registry.npmjs.org/@wordpress/scripts/-/scripts-27.2.0.tgz", - "integrity": "sha512-xkrNYRuXxtkCkxtBWq7H46cgvbBHzfy8VdELqXn5XwK8S+ytDVOe3YUXqhisn9VdPurrjgfgAa/qNMA3xPr90Q==", + "version": "27.2.1", + "resolved": "https://registry.npmjs.org/@wordpress/scripts/-/scripts-27.2.1.tgz", + "integrity": "sha512-fPl7CrMKZxj5/Grcew0XVGuW/+wx9I1GWdYzV5CrHtMKgEspvDfbpoGLVybyw5lVmgfmaLq577yZUgbyGwt86w==", "dev": true, "requires": { "@babel/core": "^7.16.0", "@pmmmwh/react-refresh-webpack-plugin": "^0.5.11", "@svgr/webpack": "^8.0.1", - "@wordpress/babel-preset-default": "^7.35.0", - "@wordpress/browserslist-config": "^5.34.0", - "@wordpress/dependency-extraction-webpack-plugin": "^5.2.0", - "@wordpress/e2e-test-utils-playwright": "^0.19.0", - "@wordpress/eslint-plugin": "^17.8.0", - "@wordpress/jest-preset-default": "^11.22.0", - "@wordpress/npm-package-json-lint-config": "^4.36.0", - "@wordpress/postcss-plugins-preset": "^4.35.0", - "@wordpress/prettier-config": "^3.8.0", - "@wordpress/stylelint-config": "^21.34.0", + "@wordpress/babel-preset-default": "^7.35.1", + "@wordpress/browserslist-config": "^5.34.1", + "@wordpress/dependency-extraction-webpack-plugin": "^5.2.1", + "@wordpress/e2e-test-utils-playwright": "^0.19.1", + "@wordpress/eslint-plugin": "^17.8.1", + "@wordpress/jest-preset-default": "^11.22.1", + "@wordpress/npm-package-json-lint-config": "^4.36.1", + "@wordpress/postcss-plugins-preset": "^4.35.1", + "@wordpress/prettier-config": "^3.8.1", + "@wordpress/stylelint-config": "^21.34.1", "adm-zip": "^0.5.9", "babel-jest": "^29.6.2", "babel-loader": "^8.2.3", @@ -39098,45 +39113,45 @@ } }, "@wordpress/server-side-render": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/@wordpress/server-side-render/-/server-side-render-4.28.1.tgz", - "integrity": "sha512-xXGUOvsDZ+QV3NcqMm1ag8kREV8WQz15+bntd4PUus24qvexvqBO+KzfxNSjgfrJw/vl1kgSgATBHtaOUMCmcQ==", + "version": "4.28.2", + "resolved": "https://registry.npmjs.org/@wordpress/server-side-render/-/server-side-render-4.28.2.tgz", + "integrity": "sha512-ATsWCIubgEQMRwJmimThonW1aT3/iNs66F3NbjxN9sTDrtPTqcmmeDWM9lfDKZWRFvaQ4gnENof58/0fSL/oMg==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/api-fetch": "^6.48.0", - "@wordpress/blocks": "^12.28.1", - "@wordpress/components": "^26.0.1", - "@wordpress/compose": "^6.28.0", - "@wordpress/data": "^9.21.0", - "@wordpress/deprecated": "^3.51.0", - "@wordpress/element": "^5.28.0", - "@wordpress/i18n": "^4.51.0", - "@wordpress/url": "^3.52.0", + "@wordpress/api-fetch": "^6.48.1", + "@wordpress/blocks": "^12.28.2", + "@wordpress/components": "^26.0.2", + "@wordpress/compose": "^6.28.1", + "@wordpress/data": "^9.21.1", + "@wordpress/deprecated": "^3.51.1", + "@wordpress/element": "^5.28.1", + "@wordpress/i18n": "^4.51.1", + "@wordpress/url": "^3.52.1", "fast-deep-equal": "^3.1.3" } }, "@wordpress/shortcode": { - "version": "3.51.0", - "resolved": "https://registry.npmjs.org/@wordpress/shortcode/-/shortcode-3.51.0.tgz", - "integrity": "sha512-t5GHbDY3awJEcQfeb2fXK6y34RBcZUFgjSUrdFBlGmjHcdnQnyWba41mesk+chTVRiK8URogtZ52WrQsMb0Cvw==", + "version": "3.51.1", + "resolved": "https://registry.npmjs.org/@wordpress/shortcode/-/shortcode-3.51.1.tgz", + "integrity": "sha512-1HRcX7wTuxN7tYKQdYOJdE9rvP7FHCvzSkZdksDDykB2iYK2nagzdYBqZTZi9yRl/+X/Jgsuwwfelznh/oVo8A==", "requires": { "@babel/runtime": "^7.16.0", "memize": "^2.0.1" } }, "@wordpress/style-engine": { - "version": "1.34.0", - "resolved": "https://registry.npmjs.org/@wordpress/style-engine/-/style-engine-1.34.0.tgz", - "integrity": "sha512-CMSifFEg1YRpodUEZ8+1XTrKpu61idz/qa9Uz4yYS4aK23HfY8gPH+9FYYeRmtPUnKgAUwIMgKbyNXpCKmslUA==", + "version": "1.34.1", + "resolved": "https://registry.npmjs.org/@wordpress/style-engine/-/style-engine-1.34.1.tgz", + "integrity": "sha512-Hf9vU8i9wGAi7zWAV1BNdDBouKtZoBIihdL56yBm7fJwblaUI7+zncs24DnEPqlWcSRFcJJAoQcRuSIqxcqP9g==", "requires": { "@babel/runtime": "^7.16.0", "change-case": "^4.1.2" } }, "@wordpress/stylelint-config": { - "version": "21.34.0", - "resolved": "https://registry.npmjs.org/@wordpress/stylelint-config/-/stylelint-config-21.34.0.tgz", - "integrity": "sha512-Zou/Y6vdMWnAMzcPNH4yZoKkd8h22DyYO4jyC58ChPEF3O7csvmjpbnDloAr5/MOgCz91hnSkZmiKG0zp8VE6w==", + "version": "21.34.1", + "resolved": "https://registry.npmjs.org/@wordpress/stylelint-config/-/stylelint-config-21.34.1.tgz", + "integrity": "sha512-Hb1e5yFQ+YnVbsBZg6fQ77bWTaXih5AjcN+OBc4dxN43MyeTll+IrPMBmsX612gsNbRm73mL32Ngbo+bXEa/Qg==", "dev": true, "requires": { "stylelint-config-recommended": "^6.0.0", @@ -39144,13 +39159,13 @@ } }, "@wordpress/sync": { - "version": "0.13.0", - "resolved": "https://registry.npmjs.org/@wordpress/sync/-/sync-0.13.0.tgz", - "integrity": "sha512-elkzQmkf/7cU/0QQBnzb2akFgrt36ZSV4OEuheCp0iXR2sZdzZQ2UqkwdEmtdvAuU83eU51HM72ja9k+fr1VVw==", + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/@wordpress/sync/-/sync-0.13.1.tgz", + "integrity": "sha512-MHyXM+qALZvTI/eLyGmfImDU9mXZaeU2tkDSg5+l2fsg7iN2tGzy4PfRvOgUAHa47PBF1oar+yg2EbOq7K3uYg==", "requires": { "@babel/runtime": "^7.16.0", "@types/simple-peer": "^9.11.5", - "@wordpress/url": "^3.52.0", + "@wordpress/url": "^3.52.1", "import-locals": "^2.0.0", "lib0": "^0.2.42", "simple-peer": "^9.11.0", @@ -39161,71 +39176,71 @@ } }, "@wordpress/token-list": { - "version": "2.51.0", - "resolved": "https://registry.npmjs.org/@wordpress/token-list/-/token-list-2.51.0.tgz", - "integrity": "sha512-5YsRinAlpy6mX4QJssebXp9sPCkpbvHqdLXdnYJoMP0ABffGqny6/9PuoRrDMLwljs2kZFBiTyQsH945LWkFqg==", + "version": "2.51.1", + "resolved": "https://registry.npmjs.org/@wordpress/token-list/-/token-list-2.51.1.tgz", + "integrity": "sha512-le8KsWmKshmEnfyhs7HArIs1mDlASQKWhS/MZNoJMHpwGP84q4y6CPT9PwhksMTuv9Q/TUs/ICUC9ThY3Q84qQ==", "requires": { "@babel/runtime": "^7.16.0" } }, "@wordpress/undo-manager": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/@wordpress/undo-manager/-/undo-manager-0.11.0.tgz", - "integrity": "sha512-f9izRRzLlZRBXhve1OU9sBGWRvfGU94nhENN7gtf7l31q3xdsnrGf5NE/R1yhwCAHifUFF1dVcIGC1cfT2jQIg==", + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/@wordpress/undo-manager/-/undo-manager-0.11.1.tgz", + "integrity": "sha512-ukBF8sRDXmnLa0AEpoLSsZ7G8lUl/X41ZF+Cq7EiTC7ZQWVMd+e5THJUvSEuQO6d8Tttgm44J1eDd4Kydod5ZA==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/is-shallow-equal": "^4.51.0" + "@wordpress/is-shallow-equal": "^4.51.1" } }, "@wordpress/url": { - "version": "3.52.0", - "resolved": "https://registry.npmjs.org/@wordpress/url/-/url-3.52.0.tgz", - "integrity": "sha512-LkKQT7Hv+7ekCQ8fjDg2CK2FUtQhnzI/1PSCcmuL9guxsrQBKoiQFoGvsTUfXC4TtlkyV/gI/iB0zfoyq5t1Gg==", + "version": "3.52.1", + "resolved": "https://registry.npmjs.org/@wordpress/url/-/url-3.52.1.tgz", + "integrity": "sha512-6jyR4iln6PG28cGq9L8j4Ii8jGQA9IoyFN96wQnBHmqv3ou02lcsRC3IzgXeQSZG40ZM8DnlYP8lkkuzNlndbw==", "requires": { "@babel/runtime": "^7.16.0", "remove-accents": "^0.5.0" } }, "@wordpress/viewport": { - "version": "5.28.0", - "resolved": "https://registry.npmjs.org/@wordpress/viewport/-/viewport-5.28.0.tgz", - "integrity": "sha512-HaSmMY2X2L9beLn+eDDDHrB2y43FRfNCSGBLaqILaqy9b2YHWrHZ8hAnKlhrJqbVCvH625eA0jsM8Ej8NPCCCA==", + "version": "5.28.1", + "resolved": "https://registry.npmjs.org/@wordpress/viewport/-/viewport-5.28.1.tgz", + "integrity": "sha512-+Y8gUaWPY9sgjNt4bFVnb/lmygf1RKxJAWqo28FZFDJwzt8ysWwbdTEg7s/axVlVMWYFJh6xvBYoxstI2g9xfw==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/compose": "^6.28.0", - "@wordpress/data": "^9.21.0", - "@wordpress/element": "^5.28.0" + "@wordpress/compose": "^6.28.1", + "@wordpress/data": "^9.21.1", + "@wordpress/element": "^5.28.1" } }, "@wordpress/warning": { - "version": "2.51.0", - "resolved": "https://registry.npmjs.org/@wordpress/warning/-/warning-2.51.0.tgz", - "integrity": "sha512-e+YbsQY4o/nTY0gT5Rr5766wU2xzwL5m/8S1HET9wBaeCRoZR/0IKyTOvPfihW13uT6FayBne3rqwT/h6F8w6Q==" + "version": "2.51.1", + "resolved": "https://registry.npmjs.org/@wordpress/warning/-/warning-2.51.1.tgz", + "integrity": "sha512-De1ftiM7vdlE6evA+d/jv2wES9wXdvbck4fKi7qr7ckDzWjqGg7nV8A3OzGInWiAn9qTQZucCOUwzUvlWedpTQ==" }, "@wordpress/widgets": { - "version": "3.28.1", - "resolved": "https://registry.npmjs.org/@wordpress/widgets/-/widgets-3.28.1.tgz", - "integrity": "sha512-uXVi6DZga+ANfqzqBlfjwkH9UlcO6BcCUZ/meRmR8JDLjciBfkQ/l321GjVmq8cxQ6crSku07d/TmASXg/MO8w==", + "version": "3.28.2", + "resolved": "https://registry.npmjs.org/@wordpress/widgets/-/widgets-3.28.2.tgz", + "integrity": "sha512-9h1TAjqGVgf/KI0AvlFt8ZdzYSWMrtC//oddt/GhXvrL2CXbuk/xdtU0Lx8uJxww9ZrIVnz3fc3zYAsOVM64qw==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/api-fetch": "^6.48.0", - "@wordpress/block-editor": "^12.19.1", - "@wordpress/blocks": "^12.28.1", - "@wordpress/components": "^26.0.1", - "@wordpress/compose": "^6.28.0", - "@wordpress/core-data": "^6.28.1", - "@wordpress/data": "^9.21.0", - "@wordpress/element": "^5.28.0", - "@wordpress/i18n": "^4.51.0", - "@wordpress/icons": "^9.42.0", - "@wordpress/notices": "^4.19.0", + "@wordpress/api-fetch": "^6.48.1", + "@wordpress/block-editor": "^12.19.2", + "@wordpress/blocks": "^12.28.2", + "@wordpress/components": "^26.0.2", + "@wordpress/compose": "^6.28.1", + "@wordpress/core-data": "^6.28.2", + "@wordpress/data": "^9.21.1", + "@wordpress/element": "^5.28.1", + "@wordpress/i18n": "^4.51.1", + "@wordpress/icons": "^9.42.1", + "@wordpress/notices": "^4.19.1", "classnames": "^2.3.1" } }, "@wordpress/wordcount": { - "version": "3.51.0", - "resolved": "https://registry.npmjs.org/@wordpress/wordcount/-/wordcount-3.51.0.tgz", - "integrity": "sha512-H5pkrHjR2iJN5jZZQpPvC7VDb4t4EnYBBPjOVy29GUbX6ndbz0O9GcW2GKScW7napBNG0KjAS+YoJzceIr4c/Q==", + "version": "3.51.1", + "resolved": "https://registry.npmjs.org/@wordpress/wordcount/-/wordcount-3.51.1.tgz", + "integrity": "sha512-KYEX1NfDzYXqwDJ6zdrVemXUNOu61A00lCsREkaXwhX2h/tiT8M82dAjI0J0sC8jQoUxZ1n/ZK/SDEHc7AD48A==", "requires": { "@babel/runtime": "^7.16.0" } @@ -40743,15 +40758,16 @@ } }, "call-bind": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.6.tgz", - "integrity": "sha512-Mj50FLHtlsoVfRfnHaZvyrooHcrlceNZdL/QBvJJVd9Ta55qCQK0gs4ss2oZDeV9zFCs6ewzYgVE5yfVmfFpVg==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", "dev": true, "requires": { + "es-define-property": "^1.0.0", "es-errors": "^1.3.0", "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.3", - "set-function-length": "^1.2.0" + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" } }, "call-me-maybe": { @@ -42433,15 +42449,14 @@ } }, "define-data-property": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.2.tgz", - "integrity": "sha512-SRtsSqsDbgpJBbW3pABMCOt6rQyeM8s8RiyeSN8jYG8sYmt/kGJejbydttUsnDs1tadr19tvhT4ShwMyoqAm4g==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", "dev": true, "requires": { + "es-define-property": "^1.0.0", "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.2", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.1" + "gopd": "^1.0.1" } }, "define-lazy-prop": { @@ -43003,50 +43018,52 @@ } }, "es-abstract": { - "version": "1.22.3", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.3.tgz", - "integrity": "sha512-eiiY8HQeYfYH2Con2berK+To6GrK2RxbPawDkGq4UiCQQfZHb6wX9qQqkbpPqaxQFcl8d9QzZqo0tGE0VcrdwA==", + "version": "1.22.4", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.4.tgz", + "integrity": "sha512-vZYJlk2u6qHYxBOTjAeg7qUxHdNfih64Uu2J8QqWgXZ2cri0ZpJAkzDUK/q593+mvKwlxyaxr6F1Q+3LKoQRgg==", "dev": true, "requires": { - "array-buffer-byte-length": "^1.0.0", - "arraybuffer.prototype.slice": "^1.0.2", - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.5", - "es-set-tostringtag": "^2.0.1", + "array-buffer-byte-length": "^1.0.1", + "arraybuffer.prototype.slice": "^1.0.3", + "available-typed-arrays": "^1.0.6", + "call-bind": "^1.0.7", + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "es-set-tostringtag": "^2.0.2", "es-to-primitive": "^1.2.1", "function.prototype.name": "^1.1.6", - "get-intrinsic": "^1.2.2", - "get-symbol-description": "^1.0.0", + "get-intrinsic": "^1.2.4", + "get-symbol-description": "^1.0.2", "globalthis": "^1.0.3", "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.0", + "has-property-descriptors": "^1.0.2", "has-proto": "^1.0.1", "has-symbols": "^1.0.3", - "hasown": "^2.0.0", - "internal-slot": "^1.0.5", - "is-array-buffer": "^3.0.2", + "hasown": "^2.0.1", + "internal-slot": "^1.0.7", + "is-array-buffer": "^3.0.4", "is-callable": "^1.2.7", "is-negative-zero": "^2.0.2", "is-regex": "^1.1.4", "is-shared-array-buffer": "^1.0.2", "is-string": "^1.0.7", - "is-typed-array": "^1.1.12", + "is-typed-array": "^1.1.13", "is-weakref": "^1.0.2", "object-inspect": "^1.13.1", "object-keys": "^1.1.1", - "object.assign": "^4.1.4", - "regexp.prototype.flags": "^1.5.1", - "safe-array-concat": "^1.0.1", - "safe-regex-test": "^1.0.0", + "object.assign": "^4.1.5", + "regexp.prototype.flags": "^1.5.2", + "safe-array-concat": "^1.1.0", + "safe-regex-test": "^1.0.3", "string.prototype.trim": "^1.2.8", "string.prototype.trimend": "^1.0.7", "string.prototype.trimstart": "^1.0.7", - "typed-array-buffer": "^1.0.0", + "typed-array-buffer": "^1.0.1", "typed-array-byte-length": "^1.0.0", "typed-array-byte-offset": "^1.0.0", "typed-array-length": "^1.0.4", "unbox-primitive": "^1.0.2", - "which-typed-array": "^1.1.13" + "which-typed-array": "^1.1.14" } }, "es-array-method-boxes-properly": { @@ -43055,6 +43072,15 @@ "integrity": "sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA==", "dev": true }, + "es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "dev": true, + "requires": { + "get-intrinsic": "^1.2.4" + } + }, "es-errors": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", @@ -43062,25 +43088,26 @@ "dev": true }, "es-iterator-helpers": { - "version": "1.0.15", - "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.0.15.tgz", - "integrity": "sha512-GhoY8uYqd6iwUl2kgjTm4CZAf6oo5mHK7BPqx3rKgx893YSsy0LGHV6gfqqQvZt/8xM8xeOnfXBCfqclMKkJ5g==", + "version": "1.0.17", + "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.0.17.tgz", + "integrity": "sha512-lh7BsUqelv4KUbR5a/ZTaGGIMLCjPGPqJ6q+Oq24YP0RdyptX1uzm4vvaqzk7Zx3bpl/76YLTTDj9L7uYQ92oQ==", "dev": true, "requires": { "asynciterator.prototype": "^1.0.0", - "call-bind": "^1.0.2", + "call-bind": "^1.0.7", "define-properties": "^1.2.1", - "es-abstract": "^1.22.1", - "es-set-tostringtag": "^2.0.1", - "function-bind": "^1.1.1", - "get-intrinsic": "^1.2.1", + "es-abstract": "^1.22.4", + "es-errors": "^1.3.0", + "es-set-tostringtag": "^2.0.2", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", "globalthis": "^1.0.3", - "has-property-descriptors": "^1.0.0", + "has-property-descriptors": "^1.0.2", "has-proto": "^1.0.1", "has-symbols": "^1.0.3", - "internal-slot": "^1.0.5", + "internal-slot": "^1.0.7", "iterator.prototype": "^1.1.2", - "safe-array-concat": "^1.0.1" + "safe-array-concat": "^1.1.0" } }, "es-module-lexer": { @@ -43095,14 +43122,14 @@ "integrity": "sha512-7vIYVzpOhXtpc3Yn03itB+GSgVZFW7oL4kdydA+iL+IEi7HiSLBUxM05QFw4SxTl6e++pMpGqZPo2+vdNs3TbA==" }, "es-set-tostringtag": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz", - "integrity": "sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.2.tgz", + "integrity": "sha512-BuDyupZt65P9D2D2vA/zqcI3G5xRsklm5N3xCwuiy+/vKy8i0ifdsQP1sLgO4tZDSCaQUSnmC48khknGMV3D2Q==", "dev": true, "requires": { - "get-intrinsic": "^1.1.3", - "has": "^1.0.3", - "has-tostringtag": "^1.0.0" + "get-intrinsic": "^1.2.2", + "has-tostringtag": "^1.0.0", + "hasown": "^2.0.0" } }, "es-shim-unscopables": { @@ -43532,9 +43559,9 @@ } }, "eslint-plugin-jest": { - "version": "27.6.3", - "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-27.6.3.tgz", - "integrity": "sha512-+YsJFVH6R+tOiO3gCJon5oqn4KWc+mDq2leudk8mrp8RFubLOo9CVyi3cib4L7XMpxExmkmBZQTPDYVBzgpgOA==", + "version": "27.9.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-27.9.0.tgz", + "integrity": "sha512-QIT7FH7fNmd9n4se7FFKHbsLKGQiw885Ds6Y/sxKgCZ6natwCsXdgPOADnYVxN2QrRweF0FZWbJ6S7Rsn7llug==", "dev": true, "requires": { "@typescript-eslint/utils": "^5.10.0" @@ -45143,13 +45170,14 @@ } }, "get-symbol-description": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", - "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.2.tgz", + "integrity": "sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==", "dev": true, "requires": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.1" + "call-bind": "^1.0.5", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4" } }, "get-uri": { @@ -46262,15 +46290,6 @@ "integrity": "sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==", "dev": true }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "requires": { - "function-bind": "^1.1.1" - } - }, "has-ansi": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", @@ -46300,12 +46319,12 @@ "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" }, "has-property-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz", - "integrity": "sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", "dev": true, "requires": { - "get-intrinsic": "^1.2.2" + "es-define-property": "^1.0.0" } }, "has-proto": { @@ -46379,9 +46398,9 @@ } }, "hasown": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", - "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.1.tgz", + "integrity": "sha512-1/th4MHjnwncwXsIW6QMzlvYL9kG5e/CpVvLRZe4XPa8TOUNbCELqmvhDmnkNsAjwaG4+I8gJJL0JBvTTLO9qA==", "requires": { "function-bind": "^1.1.2" } @@ -47046,13 +47065,13 @@ "dev": true }, "internal-slot": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.5.tgz", - "integrity": "sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz", + "integrity": "sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==", "dev": true, "requires": { - "get-intrinsic": "^1.2.0", - "has": "^1.0.3", + "es-errors": "^1.3.0", + "hasown": "^2.0.0", "side-channel": "^1.0.4" } }, @@ -47523,12 +47542,12 @@ } }, "is-typed-array": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.12.tgz", - "integrity": "sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==", + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz", + "integrity": "sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==", "dev": true, "requires": { - "which-typed-array": "^1.1.11" + "which-typed-array": "^1.1.14" } }, "is-typedarray": { @@ -49864,9 +49883,9 @@ } }, "lib0": { - "version": "0.2.88", - "resolved": "https://registry.npmjs.org/lib0/-/lib0-0.2.88.tgz", - "integrity": "sha512-KyroiEvCeZcZEMx5Ys+b4u4eEBbA1ch7XUaBhYpwa/nPMrzTjUhI4RfcytmQfYoTBPcdyx+FX6WFNIoNuJzJfQ==", + "version": "0.2.89", + "resolved": "https://registry.npmjs.org/lib0/-/lib0-0.2.89.tgz", + "integrity": "sha512-5j19vcCjsQhvLG6mcDD+nprtJUCbmqLz5Hzt5xgi9SV6RIW/Dty7ZkVZHGBuPOADMKjQuKDvuQTH495wsmw8DQ==", "requires": { "isomorphic.js": "^0.2.4" } @@ -52022,13 +52041,13 @@ } }, "object.assign": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", - "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", + "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", "dev": true, "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", "has-symbols": "^1.0.3", "object-keys": "^1.1.1" } @@ -53251,9 +53270,9 @@ "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==" }, "preact": { - "version": "10.19.4", - "resolved": "https://registry.npmjs.org/preact/-/preact-10.19.4.tgz", - "integrity": "sha512-dwaX5jAh0Ga8uENBX1hSOujmKWgx9RtL80KaKUFLc6jb4vCEAc3EeZ0rnQO/FO4VgjfPMfoLFWnNG8bHuZ9VLw==" + "version": "10.19.5", + "resolved": "https://registry.npmjs.org/preact/-/preact-10.19.5.tgz", + "integrity": "sha512-OPELkDmSVbKjbFqF9tgvOowiiQ9TmsJljIzXRyNE8nGiis94pwv1siF78rQkAP1Q1738Ce6pellRg/Ns/CtHqQ==" }, "prelude-ls": { "version": "1.2.1", @@ -53920,14 +53939,15 @@ } }, "regexp.prototype.flags": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.1.tgz", - "integrity": "sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg==", + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz", + "integrity": "sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==", "dev": true, "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "set-function-name": "^2.0.0" + "call-bind": "^1.0.6", + "define-properties": "^1.2.1", + "es-errors": "^1.3.0", + "set-function-name": "^2.0.1" } }, "regexpu-core": { @@ -54330,13 +54350,13 @@ } }, "safe-array-concat": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.0.1.tgz", - "integrity": "sha512-6XbUAseYE2KtOuGueyeobCySj9L4+66Tn6KQMOPQJrAJEowYKW/YR/MGJZl7FdydUdaFu4LYyDZjxf4/Nmo23Q==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.0.tgz", + "integrity": "sha512-ZdQ0Jeb9Ofti4hbt5lX3T2JcAamT9hfzYU1MNB+z/jaEbB6wfFfPIR/zEORmZqobkCCJhSjodobH6WHNmJ97dg==", "dev": true, "requires": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.1", + "call-bind": "^1.0.5", + "get-intrinsic": "^1.2.2", "has-symbols": "^1.0.3", "isarray": "^2.0.5" }, @@ -54370,13 +54390,13 @@ } }, "safe-regex-test": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", - "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.3.tgz", + "integrity": "sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==", "dev": true, "requires": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.3", + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", "is-regex": "^1.1.4" } }, @@ -54771,14 +54791,15 @@ } }, "set-function-name": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.1.tgz", - "integrity": "sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", + "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", "dev": true, "requires": { - "define-data-property": "^1.0.1", + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", "functions-have-names": "^1.2.3", - "has-property-descriptors": "^1.0.0" + "has-property-descriptors": "^1.0.2" } }, "set-value": { @@ -56766,14 +56787,14 @@ } }, "typed-array-buffer": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.0.tgz", - "integrity": "sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz", + "integrity": "sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==", "dev": true, "requires": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.1", - "is-typed-array": "^1.1.10" + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "is-typed-array": "^1.1.13" } }, "typed-array-byte-length": { @@ -57960,9 +57981,9 @@ } }, "yjs": { - "version": "13.6.11", - "resolved": "https://registry.npmjs.org/yjs/-/yjs-13.6.11.tgz", - "integrity": "sha512-FvRRJKX9u270dOLkllGF/UDCWwmIv2Z+ucM4v1QO1TuxdmoiMnSUXH1HAcOKOrkBEhQtPTkxep7tD2DrQB+l0g==", + "version": "13.6.12", + "resolved": "https://registry.npmjs.org/yjs/-/yjs-13.6.12.tgz", + "integrity": "sha512-KOT8ILoyVH2f/PxPadeu5kVVS055D1r3x1iFfJVJzFdnN98pVGM8H07NcKsO+fG3F7/0tf30Vnokf5YIqhU/iw==", "requires": { "lib0": "^0.2.86" } diff --git a/package.json b/package.json index 59de5925e49ba..462e1d7dacf71 100644 --- a/package.json +++ b/package.json @@ -27,12 +27,12 @@ "@lodder/grunt-postcss": "^3.1.1", "@playwright/test": "1.32.0", "@pmmmwh/react-refresh-webpack-plugin": "0.5.11", - "@wordpress/babel-preset-default": "7.35.0", - "@wordpress/dependency-extraction-webpack-plugin": "5.2.0", - "@wordpress/e2e-test-utils": "10.22.0", - "@wordpress/e2e-test-utils-playwright": "0.19.0", - "@wordpress/prettier-config": "3.8.0", - "@wordpress/scripts": "27.2.0", + "@wordpress/babel-preset-default": "7.35.1", + "@wordpress/dependency-extraction-webpack-plugin": "5.2.1", + "@wordpress/e2e-test-utils": "10.22.1", + "@wordpress/e2e-test-utils-playwright": "0.19.1", + "@wordpress/prettier-config": "3.8.1", + "@wordpress/scripts": "27.2.1", "autoprefixer": "10.4.17", "chalk": "5.3.0", "check-node-version": "4.2.1", @@ -78,72 +78,72 @@ "webpack-livereload-plugin": "3.0.2" }, "dependencies": { - "@wordpress/a11y": "3.51.0", - "@wordpress/annotations": "2.51.1", - "@wordpress/api-fetch": "6.48.0", - "@wordpress/autop": "3.51.0", - "@wordpress/blob": "3.51.0", - "@wordpress/block-directory": "4.28.1", - "@wordpress/block-editor": "12.19.1", - "@wordpress/block-library": "8.28.1", - "@wordpress/block-serialization-default-parser": "4.51.0", - "@wordpress/blocks": "12.28.1", - "@wordpress/commands": "0.22.1", - "@wordpress/components": "26.0.1", - "@wordpress/compose": "6.28.0", - "@wordpress/core-commands": "0.20.1", - "@wordpress/core-data": "6.28.1", - "@wordpress/customize-widgets": "4.28.1", - "@wordpress/data": "9.21.0", - "@wordpress/data-controls": "3.20.0", - "@wordpress/dataviews": "0.5.1", - "@wordpress/date": "4.51.0", - "@wordpress/deprecated": "3.51.0", - "@wordpress/dom": "3.51.0", - "@wordpress/dom-ready": "3.51.0", - "@wordpress/edit-post": "7.28.1", - "@wordpress/edit-site": "5.28.1", - "@wordpress/edit-widgets": "5.28.1", - "@wordpress/editor": "13.28.1", - "@wordpress/element": "5.28.0", - "@wordpress/escape-html": "2.51.0", - "@wordpress/format-library": "4.28.1", - "@wordpress/hooks": "3.51.0", - "@wordpress/html-entities": "3.51.0", - "@wordpress/i18n": "4.51.0", - "@wordpress/icons": "9.42.0", - "@wordpress/interactivity": "5.0.0", - "@wordpress/interactivity-router": "1.1.0", - "@wordpress/interface": "5.28.1", - "@wordpress/is-shallow-equal": "4.51.0", - "@wordpress/keyboard-shortcuts": "4.28.0", - "@wordpress/keycodes": "3.51.0", - "@wordpress/list-reusable-blocks": "4.28.1", - "@wordpress/media-utils": "4.42.0", - "@wordpress/notices": "4.19.0", - "@wordpress/nux": "8.13.1", - "@wordpress/patterns": "1.12.1", - "@wordpress/plugins": "6.19.1", - "@wordpress/preferences": "3.28.1", - "@wordpress/preferences-persistence": "1.43.0", - "@wordpress/primitives": "3.49.0", - "@wordpress/priority-queue": "2.51.0", - "@wordpress/private-apis": "0.33.0", - "@wordpress/redux-routine": "4.51.0", - "@wordpress/reusable-blocks": "4.28.1", - "@wordpress/rich-text": "6.28.1", - "@wordpress/router": "0.20.0", - "@wordpress/server-side-render": "4.28.1", - "@wordpress/shortcode": "3.51.0", - "@wordpress/style-engine": "1.34.0", - "@wordpress/sync": "0.13.0", - "@wordpress/token-list": "2.51.0", - "@wordpress/undo-manager": "0.11.0", - "@wordpress/url": "3.52.0", - "@wordpress/viewport": "5.28.0", - "@wordpress/warning": "2.51.0", - "@wordpress/widgets": "3.28.1", - "@wordpress/wordcount": "3.51.0", + "@wordpress/a11y": "3.51.1", + "@wordpress/annotations": "2.51.2", + "@wordpress/api-fetch": "6.48.1", + "@wordpress/autop": "3.51.1", + "@wordpress/blob": "3.51.1", + "@wordpress/block-directory": "4.28.2", + "@wordpress/block-editor": "12.19.2", + "@wordpress/block-library": "8.28.2", + "@wordpress/block-serialization-default-parser": "4.51.1", + "@wordpress/blocks": "12.28.2", + "@wordpress/commands": "0.22.2", + "@wordpress/components": "26.0.2", + "@wordpress/compose": "6.28.1", + "@wordpress/core-commands": "0.20.2", + "@wordpress/core-data": "6.28.2", + "@wordpress/customize-widgets": "4.28.2", + "@wordpress/data": "9.21.1", + "@wordpress/data-controls": "3.20.1", + "@wordpress/dataviews": "0.5.2", + "@wordpress/date": "4.51.1", + "@wordpress/deprecated": "3.51.1", + "@wordpress/dom": "3.51.1", + "@wordpress/dom-ready": "3.51.1", + "@wordpress/edit-post": "7.28.2", + "@wordpress/edit-site": "5.28.2", + "@wordpress/edit-widgets": "5.28.2", + "@wordpress/editor": "13.28.2", + "@wordpress/element": "5.28.1", + "@wordpress/escape-html": "2.51.1", + "@wordpress/format-library": "4.28.2", + "@wordpress/hooks": "3.51.1", + "@wordpress/html-entities": "3.51.1", + "@wordpress/i18n": "4.51.1", + "@wordpress/icons": "9.42.1", + "@wordpress/interactivity": "5.0.1", + "@wordpress/interactivity-router": "1.1.1", + "@wordpress/interface": "5.28.2", + "@wordpress/is-shallow-equal": "4.51.1", + "@wordpress/keyboard-shortcuts": "4.28.1", + "@wordpress/keycodes": "3.51.1", + "@wordpress/list-reusable-blocks": "4.28.2", + "@wordpress/media-utils": "4.42.1", + "@wordpress/notices": "4.19.1", + "@wordpress/nux": "8.13.2", + "@wordpress/patterns": "1.12.2", + "@wordpress/plugins": "6.19.2", + "@wordpress/preferences": "3.28.2", + "@wordpress/preferences-persistence": "1.43.1", + "@wordpress/primitives": "3.49.1", + "@wordpress/priority-queue": "2.51.1", + "@wordpress/private-apis": "0.33.1", + "@wordpress/redux-routine": "4.51.1", + "@wordpress/reusable-blocks": "4.28.2", + "@wordpress/rich-text": "6.28.2", + "@wordpress/router": "0.20.1", + "@wordpress/server-side-render": "4.28.2", + "@wordpress/shortcode": "3.51.1", + "@wordpress/style-engine": "1.34.1", + "@wordpress/sync": "0.13.1", + "@wordpress/token-list": "2.51.1", + "@wordpress/undo-manager": "0.11.1", + "@wordpress/url": "3.52.1", + "@wordpress/viewport": "5.28.1", + "@wordpress/warning": "2.51.1", + "@wordpress/widgets": "3.28.2", + "@wordpress/wordcount": "3.51.1", "backbone": "1.5.0", "clipboard": "2.0.11", "core-js-url-browser": "3.6.4", diff --git a/src/wp-includes/assets/script-loader-packages.min.php b/src/wp-includes/assets/script-loader-packages.min.php index 48b2b2f29aa74..e644b3a7daf02 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' => 'd90eebea464f6c09bfd5'), 'annotations.min.js' => array('dependencies' => array('wp-data', 'wp-hooks', 'wp-i18n', 'wp-polyfill', 'wp-rich-text'), 'version' => 'ffc4fc3374b0ab000805'), 'api-fetch.min.js' => array('dependencies' => array('wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '4c185334c5ec26e149cc'), 'autop.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '9fb50649848277dd318d'), 'blob.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '9113eed771d446f4a556'), 'block-directory.min.js' => array('dependencies' => array('react', '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-private-apis', 'wp-url'), 'version' => '9159053f41b8ec09d91b'), '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-style-engine', 'wp-token-list', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => '41fc862bf5f0a4bf836a'), 'block-library.min.js' => array('dependencies' => array('react', '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-patterns', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-viewport', 'wp-wordcount'), 'version' => 'aa2dd84c2a080047a14d'), 'block-serialization-default-parser.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '14d44daebf663d05d330'), 'blocks.min.js' => array('dependencies' => array('react', '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-rich-text', 'wp-shortcode'), 'version' => '74dcd3f5f5598b0e806b'), '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' => 'e4060e55811e7824feb9'), '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' => 'c3a06857b0e51f435ccb'), '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' => '1339d3318cd44440dccb'), 'core-commands.min.js' => array('dependencies' => array('react', 'wp-commands', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-router', 'wp-url'), 'version' => '4ee9c423b71a59459ca6'), 'core-data.min.js' => array('dependencies' => array('react', '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-rich-text', 'wp-url'), 'version' => 'ebc64bd0f29e121ccf46'), 'customize-widgets.min.js' => array('dependencies' => array('react', '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' => '137692724827d41c9fb5'), 'data.min.js' => array('dependencies' => array('react', 'wp-compose', 'wp-deprecated', 'wp-element', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-priority-queue', 'wp-private-apis', 'wp-redux-routine'), 'version' => 'e6595ba1a7cd34429f66'), 'data-controls.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-data', 'wp-deprecated', 'wp-polyfill'), 'version' => '49f5587e8b90f9e7cc7e'), 'date.min.js' => array('dependencies' => array('moment', 'wp-deprecated', 'wp-polyfill'), 'version' => 'aaca6387d1cf924acc51'), 'deprecated.min.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => 'e1f84915c5e8ae38964c'), 'dom.min.js' => array('dependencies' => array('wp-deprecated', 'wp-polyfill'), 'version' => '4ecffbffba91b10c5c7a'), 'dom-ready.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'f77871ff7694fffea381'), 'edit-post.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-deprecated', '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' => 'c03c0d8138895b6c1082'), 'edit-site.min.js' => array('dependencies' => array('react', 'react-dom', 'wp-a11y', 'wp-api-fetch', 'wp-blob', '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' => 'c461690a822ad152b731'), 'edit-widgets.min.js' => array('dependencies' => array('react', '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' => '96a3b30b85133de96871'), 'editor.min.js' => array('dependencies' => array('react', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-commands', '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' => '80092630876dbc9f96e9'), 'element.min.js' => array('dependencies' => array('react', 'react-dom', 'wp-escape-html', 'wp-polyfill'), 'version' => 'cb762d190aebbec25b27'), 'escape-html.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '6561a406d2d232a6fbd2'), 'format-library.min.js' => array('dependencies' => array('react', 'wp-a11y', 'wp-block-editor', 'wp-components', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-url'), 'version' => 'b82e922db010c201ba06'), 'hooks.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '2810c76e705dd1a53b18'), 'html-entities.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '2cd3358363e0675638fb'), 'i18n.min.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => '5e580eb46a90c2b997e6'), 'is-shallow-equal.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'e0f9f1d78d83f5196979'), 'keyboard-shortcuts.min.js' => array('dependencies' => array('react', 'wp-data', 'wp-element', 'wp-keycodes', 'wp-polyfill'), 'version' => '4d239ebc17efd846a168'), 'keycodes.min.js' => array('dependencies' => array('wp-i18n', 'wp-polyfill'), 'version' => '034ff647a54b018581d3'), 'list-reusable-blocks.min.js' => array('dependencies' => array('react', 'wp-api-fetch', 'wp-blob', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => 'b9d73b532124daefd2c7'), 'media-utils.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-blob', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '03fbd6c4f505a9385efe'), 'notices.min.js' => array('dependencies' => array('wp-data', 'wp-polyfill'), 'version' => '673a68a7ac2f556ed50b'), 'nux.min.js' => array('dependencies' => array('react', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => '46c93a71c3e2c2bf37f0'), 'patterns.min.js' => array('dependencies' => array('react', 'wp-a11y', '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' => 'cff39e622a11896a990a'), 'plugins.min.js' => array('dependencies' => array('react', 'wp-compose', 'wp-element', 'wp-hooks', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-primitives'), 'version' => '2d369cbfdcb887111e06'), 'preferences.min.js' => array('dependencies' => array('react', 'wp-a11y', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-private-apis'), 'version' => 'e1544c6f06a9639c4c31'), 'preferences-persistence.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-polyfill'), 'version' => '3f5184d775ed9dfb154f'), 'primitives.min.js' => array('dependencies' => array('wp-element', 'wp-polyfill'), 'version' => 'a41bfd5835f583ae838a'), 'priority-queue.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '9c21c957c7e50ffdbf48'), 'private-apis.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '5e7fdf55d04b8c2aadef'), 'redux-routine.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'b14553dce2bee5c0f064'), 'reusable-blocks.min.js' => array('dependencies' => array('react', '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' => '008366ba172a4f4b92b4'), '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' => '9a29c159ef23c787afd3'), 'router.min.js' => array('dependencies' => array('react', 'wp-element', 'wp-polyfill', 'wp-private-apis', 'wp-url'), 'version' => '92fd517f31b92695552a'), 'server-side-render.min.js' => array('dependencies' => array('react', 'wp-api-fetch', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '04ce502cc4eef9b49ce7'), 'shortcode.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'b7747eee0efafd2f0c3b'), 'style-engine.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '03f13c515060de24b556'), 'token-list.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '05f8a6df6258f0081718'), 'undo-manager.min.js' => array('dependencies' => array('wp-is-shallow-equal', 'wp-polyfill'), 'version' => 'f0698003cb0f0a7bd794'), 'url.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '421139b01f33e5b327d8'), 'viewport.min.js' => array('dependencies' => array('react', 'wp-compose', 'wp-data', 'wp-polyfill'), 'version' => 'e555fda1d93ecf1fb1e0'), 'warning.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'ed7c8b0940914f4fe44b'), 'widgets.min.js' => array('dependencies' => array('react', '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' => '4c7bfc488be9e26d6488'), 'wordcount.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '55d8c2bf3dc99e7ea5ec')); + array('dependencies' => array('wp-dom-ready', 'wp-i18n', 'wp-polyfill'), 'version' => 'd90eebea464f6c09bfd5'), 'annotations.min.js' => array('dependencies' => array('wp-data', 'wp-hooks', 'wp-i18n', 'wp-polyfill', 'wp-rich-text'), 'version' => 'ffc4fc3374b0ab000805'), 'api-fetch.min.js' => array('dependencies' => array('wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '4c185334c5ec26e149cc'), 'autop.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '9fb50649848277dd318d'), 'blob.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '9113eed771d446f4a556'), 'block-directory.min.js' => array('dependencies' => array('react', '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-private-apis', 'wp-url'), 'version' => '9159053f41b8ec09d91b'), '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-style-engine', 'wp-token-list', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => '275c5fc09a28e491bc46'), 'block-library.min.js' => array('dependencies' => array('react', '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-patterns', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-viewport', 'wp-wordcount'), 'version' => 'e58e6c7d873209489df9'), 'block-serialization-default-parser.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '14d44daebf663d05d330'), 'blocks.min.js' => array('dependencies' => array('react', '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-rich-text', 'wp-shortcode'), 'version' => '302b2bc9c9d882ce9a9f'), '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' => 'e4060e55811e7824feb9'), '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' => 'c3a06857b0e51f435ccb'), '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' => '1339d3318cd44440dccb'), 'core-commands.min.js' => array('dependencies' => array('react', 'wp-commands', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-router', 'wp-url'), 'version' => '4ee9c423b71a59459ca6'), 'core-data.min.js' => array('dependencies' => array('react', '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-rich-text', 'wp-url'), 'version' => '5511e161f3cff896a828'), 'customize-widgets.min.js' => array('dependencies' => array('react', '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' => '137692724827d41c9fb5'), 'data.min.js' => array('dependencies' => array('react', 'wp-compose', 'wp-deprecated', 'wp-element', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-priority-queue', 'wp-private-apis', 'wp-redux-routine'), 'version' => 'e6595ba1a7cd34429f66'), 'data-controls.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-data', 'wp-deprecated', 'wp-polyfill'), 'version' => '49f5587e8b90f9e7cc7e'), 'date.min.js' => array('dependencies' => array('moment', 'wp-deprecated', 'wp-polyfill'), 'version' => 'aaca6387d1cf924acc51'), 'deprecated.min.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => 'e1f84915c5e8ae38964c'), 'dom.min.js' => array('dependencies' => array('wp-deprecated', 'wp-polyfill'), 'version' => '4ecffbffba91b10c5c7a'), 'dom-ready.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'f77871ff7694fffea381'), 'edit-post.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-deprecated', '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' => 'c03c0d8138895b6c1082'), 'edit-site.min.js' => array('dependencies' => array('react', 'react-dom', 'wp-a11y', 'wp-api-fetch', 'wp-blob', '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' => 'c89953980305aea9eca5'), 'edit-widgets.min.js' => array('dependencies' => array('react', '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' => '96a3b30b85133de96871'), 'editor.min.js' => array('dependencies' => array('react', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-commands', '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' => 'a2e6243385fa886ffee0'), 'element.min.js' => array('dependencies' => array('react', 'react-dom', 'wp-escape-html', 'wp-polyfill'), 'version' => 'cb762d190aebbec25b27'), 'escape-html.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '6561a406d2d232a6fbd2'), 'format-library.min.js' => array('dependencies' => array('react', 'wp-a11y', 'wp-block-editor', 'wp-components', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-url'), 'version' => 'b82e922db010c201ba06'), 'hooks.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '2810c76e705dd1a53b18'), 'html-entities.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '2cd3358363e0675638fb'), 'i18n.min.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => '5e580eb46a90c2b997e6'), 'is-shallow-equal.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'e0f9f1d78d83f5196979'), 'keyboard-shortcuts.min.js' => array('dependencies' => array('react', 'wp-data', 'wp-element', 'wp-keycodes', 'wp-polyfill'), 'version' => '4d239ebc17efd846a168'), 'keycodes.min.js' => array('dependencies' => array('wp-i18n', 'wp-polyfill'), 'version' => '034ff647a54b018581d3'), 'list-reusable-blocks.min.js' => array('dependencies' => array('react', 'wp-api-fetch', 'wp-blob', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => 'b9d73b532124daefd2c7'), 'media-utils.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-blob', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '03fbd6c4f505a9385efe'), 'notices.min.js' => array('dependencies' => array('wp-data', 'wp-polyfill'), 'version' => '673a68a7ac2f556ed50b'), 'nux.min.js' => array('dependencies' => array('react', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => '46c93a71c3e2c2bf37f0'), 'patterns.min.js' => array('dependencies' => array('react', 'wp-a11y', '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' => '0b52ea54f9b5508217f5'), 'plugins.min.js' => array('dependencies' => array('react', 'wp-compose', 'wp-element', 'wp-hooks', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-primitives'), 'version' => '2d369cbfdcb887111e06'), 'preferences.min.js' => array('dependencies' => array('react', 'wp-a11y', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-private-apis'), 'version' => 'e1544c6f06a9639c4c31'), 'preferences-persistence.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-polyfill'), 'version' => '3f5184d775ed9dfb154f'), 'primitives.min.js' => array('dependencies' => array('wp-element', 'wp-polyfill'), 'version' => 'a41bfd5835f583ae838a'), 'priority-queue.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '9c21c957c7e50ffdbf48'), 'private-apis.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '5e7fdf55d04b8c2aadef'), 'redux-routine.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'b14553dce2bee5c0f064'), 'reusable-blocks.min.js' => array('dependencies' => array('react', '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' => '008366ba172a4f4b92b4'), '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' => '9a29c159ef23c787afd3'), 'router.min.js' => array('dependencies' => array('react', 'wp-element', 'wp-polyfill', 'wp-private-apis', 'wp-url'), 'version' => '92fd517f31b92695552a'), 'server-side-render.min.js' => array('dependencies' => array('react', 'wp-api-fetch', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '04ce502cc4eef9b49ce7'), 'shortcode.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'b7747eee0efafd2f0c3b'), 'style-engine.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '03f13c515060de24b556'), 'token-list.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '05f8a6df6258f0081718'), 'undo-manager.min.js' => array('dependencies' => array('wp-is-shallow-equal', 'wp-polyfill'), 'version' => 'f0698003cb0f0a7bd794'), 'url.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '421139b01f33e5b327d8'), 'viewport.min.js' => array('dependencies' => array('react', 'wp-compose', 'wp-data', 'wp-polyfill'), 'version' => 'e555fda1d93ecf1fb1e0'), 'warning.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'ed7c8b0940914f4fe44b'), 'widgets.min.js' => array('dependencies' => array('react', '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' => '4c7bfc488be9e26d6488'), 'wordcount.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '55d8c2bf3dc99e7ea5ec')); diff --git a/src/wp-includes/blocks/blocks-json.php b/src/wp-includes/blocks/blocks-json.php index ec7d1f062f7e5..ad2b43e25327f 100644 --- a/src/wp-includes/blocks/blocks-json.php +++ b/src/wp-includes/blocks/blocks-json.php @@ -234,9 +234,6 @@ 'link' ), 'textdomain' => 'default', - 'usesContext' => array( - 'pattern/overrides' - ), 'attributes' => array( 'tagName' => array( 'type' => 'string', @@ -2218,9 +2215,6 @@ 'subtitle' ), 'textdomain' => 'default', - 'usesContext' => array( - 'pattern/overrides' - ), 'attributes' => array( 'textAlign' => array( 'type' => 'string' @@ -2369,8 +2363,7 @@ 'usesContext' => array( 'allowResize', 'imageCrop', - 'fixedHeight', - 'pattern/overrides' + 'fixedHeight' ), 'description' => 'Insert an image to make a visual statement.', 'keywords' => array( @@ -3621,8 +3614,7 @@ ), 'textdomain' => 'default', 'usesContext' => array( - 'postId', - 'pattern/overrides' + 'postId' ), 'attributes' => array( 'align' => array( diff --git a/src/wp-includes/blocks/button/block.json b/src/wp-includes/blocks/button/block.json index c3d51c61a0999..ec9f042cf5bcf 100644 --- a/src/wp-includes/blocks/button/block.json +++ b/src/wp-includes/blocks/button/block.json @@ -8,7 +8,6 @@ "description": "Prompt visitors to take action with a button-style link.", "keywords": [ "link" ], "textdomain": "default", - "usesContext": [ "pattern/overrides" ], "attributes": { "tagName": { "type": "string", diff --git a/src/wp-includes/blocks/footnotes.php b/src/wp-includes/blocks/footnotes.php index 0cd2ad73ef3d4..86eaf694add4c 100644 --- a/src/wp-includes/blocks/footnotes.php +++ b/src/wp-includes/blocks/footnotes.php @@ -68,15 +68,30 @@ function render_block_core_footnotes( $attributes, $content, $block ) { * @since 6.3.0 */ function register_block_core_footnotes() { - $post_types = get_post_types( + register_block_type_from_metadata( + __DIR__ . '/footnotes', array( - 'show_in_rest' => true, - 'public' => true, + 'render_callback' => 'render_block_core_footnotes', ) ); +} +add_action( 'init', 'register_block_core_footnotes' ); + + +/** + * Registers the footnotes meta field required for footnotes to work. + * + * @since 6.5.0 + */ +function register_block_core_footnotes_post_meta() { + $post_types = get_post_types( array( 'show_in_rest' => true ) ); foreach ( $post_types as $post_type ) { // Only register the meta field if the post type supports the editor, custom fields, and revisions. - if ( post_type_supports( $post_type, 'editor' ) && post_type_supports( $post_type, 'custom-fields' ) && post_type_supports( $post_type, 'revisions' ) ) { + if ( + post_type_supports( $post_type, 'editor' ) && + post_type_supports( $post_type, 'custom-fields' ) && + post_type_supports( $post_type, 'revisions' ) + ) { register_post_meta( $post_type, 'footnotes', @@ -89,14 +104,12 @@ function register_block_core_footnotes() { ); } } - register_block_type_from_metadata( - __DIR__ . '/footnotes', - array( - 'render_callback' => 'render_block_core_footnotes', - ) - ); } -add_action( 'init', 'register_block_core_footnotes' ); +/** + * Most post types are registered at priority 10, so use priority 20 here in + * order to catch them. +*/ +add_action( 'init', 'register_block_core_footnotes_post_meta', 20 ); /** * Adds the footnotes field to the revisions display. diff --git a/src/wp-includes/blocks/heading/block.json b/src/wp-includes/blocks/heading/block.json index 90ef0d383af2c..9990ef582e2f4 100644 --- a/src/wp-includes/blocks/heading/block.json +++ b/src/wp-includes/blocks/heading/block.json @@ -7,7 +7,6 @@ "description": "Introduce new sections and organize content to help visitors (and search engines) understand the structure of your content.", "keywords": [ "title", "subtitle" ], "textdomain": "default", - "usesContext": [ "pattern/overrides" ], "attributes": { "textAlign": { "type": "string" diff --git a/src/wp-includes/blocks/image/block.json b/src/wp-includes/blocks/image/block.json index 7a46a34db591f..1076aad0f1798 100644 --- a/src/wp-includes/blocks/image/block.json +++ b/src/wp-includes/blocks/image/block.json @@ -4,12 +4,7 @@ "name": "core/image", "title": "Image", "category": "media", - "usesContext": [ - "allowResize", - "imageCrop", - "fixedHeight", - "pattern/overrides" - ], + "usesContext": [ "allowResize", "imageCrop", "fixedHeight" ], "description": "Insert an image to make a visual statement.", "keywords": [ "img", "photo", "picture" ], "textdomain": "default", diff --git a/src/wp-includes/blocks/navigation-link.php b/src/wp-includes/blocks/navigation-link.php index afd34dcae779b..4ed54fcc09bf4 100644 --- a/src/wp-includes/blocks/navigation-link.php +++ b/src/wp-includes/blocks/navigation-link.php @@ -392,7 +392,6 @@ function block_core_navigation_link_build_variations() { * Registers the navigation link block. * * @uses render_block_core_navigation_link() - * @uses build_navigation_link_block_variations() * @throws WP_Error An WP_Error exception parsing the block definition. */ function register_block_core_navigation_link() { diff --git a/src/wp-includes/blocks/navigation.php b/src/wp-includes/blocks/navigation.php index f1292e5d2e723..5dcada62f6feb 100644 --- a/src/wp-includes/blocks/navigation.php +++ b/src/wp-includes/blocks/navigation.php @@ -218,7 +218,7 @@ private static function get_inner_blocks_from_navigation_post( $attributes ) { // it encounters whitespace. This code strips it. $blocks = block_core_navigation_filter_out_empty_blocks( $parsed_blocks ); - if ( function_exists( 'get_hooked_block_markup' ) ) { + if ( function_exists( 'set_ignored_hooked_blocks_metadata' ) ) { // Run Block Hooks algorithm to inject hooked blocks. $markup = block_core_navigation_insert_hooked_blocks( $blocks, $navigation_post ); $root_nav_block = parse_blocks( $markup )[0]; @@ -390,25 +390,16 @@ private static function get_classes( $attributes ) { $text_decoration = $attributes['style']['typography']['textDecoration'] ?? null; $text_decoration_class = sprintf( 'has-text-decoration-%s', $text_decoration ); - // Sets the is-collapsed class when the navigation is set to always use the overlay. - // This saves us from needing to do this check in the view.js file (see the collapseNav function). - $is_collapsed_class = static::is_always_overlay( $attributes ) ? array( 'is-collapsed' ) : array(); - $classes = array_merge( $colors['css_classes'], $font_sizes['css_classes'], $is_responsive_menu ? array( 'is-responsive' ) : array(), $layout_class ? array( $layout_class ) : array(), - $text_decoration ? array( $text_decoration_class ) : array(), - $is_collapsed_class + $text_decoration ? array( $text_decoration_class ) : array() ); return implode( ' ', $classes ); } - private static function is_always_overlay( $attributes ) { - return isset( $attributes['overlayMenu'] ) && 'always' === $attributes['overlayMenu']; - } - /** * Get styles for the navigation block. * @@ -435,12 +426,16 @@ private static function get_responsive_container_markup( $attributes, $inner_blo $colors = block_core_navigation_build_css_colors( $attributes ); $modal_unique_id = wp_unique_id( 'modal-' ); + $is_hidden_by_default = isset( $attributes['overlayMenu'] ) && 'always' === $attributes['overlayMenu']; + $responsive_container_classes = array( 'wp-block-navigation__responsive-container', + $is_hidden_by_default ? 'hidden-by-default' : '', implode( ' ', $colors['overlay_css_classes'] ), ); $open_button_classes = array( 'wp-block-navigation__responsive-container-open', + $is_hidden_by_default ? 'always-shown' : '', ); $should_display_icon_label = isset( $attributes['hasIcon'] ) && true === $attributes['hasIcon']; @@ -538,7 +533,7 @@ private static function get_nav_wrapper_attributes( $attributes, $inner_blocks ) ); if ( $is_responsive_menu ) { - $nav_element_directives = static::get_nav_element_directives( $is_interactive, $attributes ); + $nav_element_directives = static::get_nav_element_directives( $is_interactive ); $wrapper_attributes .= ' ' . $nav_element_directives; } @@ -552,7 +547,7 @@ private static function get_nav_wrapper_attributes( $attributes, $inner_blocks ) * @param array $attributes The block attributes. * @return string the directives for the navigation element. */ - private static function get_nav_element_directives( $is_interactive, $attributes ) { + private static function get_nav_element_directives( $is_interactive ) { if ( ! $is_interactive ) { return ''; } @@ -569,16 +564,6 @@ private static function get_nav_element_directives( $is_interactive, $attributes data-wp-interactive="core/navigation"' . $nav_element_context; - /* - * When the navigation's 'overlayMenu' attribute is set to 'always', JavaScript - * is not needed for collapsing the menu because the class is set manually. - */ - if ( ! static::is_always_overlay( $attributes ) ) { - $nav_element_directives .= 'data-wp-init="callbacks.initNav"'; - $nav_element_directives .= ' '; // space separator - $nav_element_directives .= 'data-wp-class--is-collapsed="context.isCollapsed"'; - } - return $nav_element_directives; } @@ -1024,7 +1009,7 @@ function block_core_navigation_get_fallback_blocks() { // In this case default to the (Page List) fallback. $fallback_blocks = ! empty( $maybe_fallback ) ? $maybe_fallback : $fallback_blocks; - if ( function_exists( 'get_hooked_block_markup' ) ) { + if ( function_exists( 'set_ignored_hooked_blocks_metadata' ) ) { // Run Block Hooks algorithm to inject hooked blocks. // We have to run it here because we need the post ID of the Navigation block to track ignored hooked blocks. $markup = block_core_navigation_insert_hooked_blocks( $fallback_blocks, $navigation_post ); @@ -1369,25 +1354,28 @@ function block_core_navigation_get_most_recently_published_navigation() { } /** - * Insert hooked blocks into a Navigation block. - * - * Given a Navigation block's inner blocks and its corresponding `wp_navigation` post object, - * this function inserts hooked blocks into it, and returns the serialized inner blocks in a - * mock Navigation block wrapper. + * Accepts the serialized markup of a block and its inner blocks, and returns serialized markup of the inner blocks. * - * If there are any hooked blocks that need to be inserted as the Navigation block's first or last - * children, the `wp_navigation` post's `_wp_ignored_hooked_blocks` meta is checked to see if any - * of those hooked blocks should be exempted from insertion. + * @param string $serialized_block The serialized markup of a block and its inner blocks. + * @return string + */ +function block_core_navigation_remove_serialized_parent_block( $serialized_block ) { + $start = strpos( $serialized_block, '-->' ) + strlen( '-->' ); + $end = strrpos( $serialized_block, '' ) + strlen( '-->' ); - $end = strrpos( $content, '' . $string . ''; + $strings[ $key ] = "\n" . $string . "\n\n"; } - if ( str_starts_with( $string, '

    ' ) ) { - $strings[ $key ] = '' . $string . ''; + if ( str_starts_with( $string, '

    \n"; } } } From a92b25a34184760beab3488ed5d802fb2aeb4824 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Thu, 29 Feb 2024 12:26:19 +0000 Subject: [PATCH 103/251] Interactivity API: Rename `data_wp_context()` to `wp_interactivity_data_wp_context()`. Increases clarity about where the function belongs to, bringing it in line with other related functions. Props swissspidy, gziolo, cbravobernal, youknowriad, ankitmaru, westonruter, luisherranz, darerodz. Fixes #60575. git-svn-id: https://develop.svn.wordpress.org/trunk@57742 602fd350-edb4-49c9-b593-d223f7449a82 --- .../interactivity-api/interactivity-api.php | 4 +- .../interactivity-api/interactivity-api.php | 42 +++++++++---------- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/src/wp-includes/interactivity-api/interactivity-api.php b/src/wp-includes/interactivity-api/interactivity-api.php index 548fcc3638fb7..120551b7e273a 100644 --- a/src/wp-includes/interactivity-api/interactivity-api.php +++ b/src/wp-includes/interactivity-api/interactivity-api.php @@ -149,7 +149,7 @@ function wp_interactivity_config( string $store_namespace, array $config = array * * Example: * - *
    true, 'count' => 0 ) ); ?>> + *
    true, 'count' => 0 ) ); ?>> * * @since 6.5.0 * @@ -158,7 +158,7 @@ function wp_interactivity_config( string $store_namespace, array $config = array * @return string A complete `data-wp-context` directive with a JSON encoded value representing the context array and * the store namespace if specified. */ -function data_wp_context( array $context, string $store_namespace = '' ): string { +function wp_interactivity_data_wp_context( array $context, string $store_namespace = '' ): string { return 'data-wp-context=\'' . ( $store_namespace ? $store_namespace . '::' : '' ) . ( empty( $context ) ? '{}' : wp_json_encode( $context, JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_HEX_AMP ) ) . diff --git a/tests/phpunit/tests/interactivity-api/interactivity-api.php b/tests/phpunit/tests/interactivity-api/interactivity-api.php index c98d74f415350..7d74fda8eb448 100644 --- a/tests/phpunit/tests/interactivity-api/interactivity-api.php +++ b/tests/phpunit/tests/interactivity-api/interactivity-api.php @@ -314,18 +314,18 @@ public function test_process_directives_only_process_the_root_interactive_blocks } /** - * Tests that data_wp_context function correctly converts different array + * Tests that wp_interactivity_data_wp_context function correctly converts different array * structures to a JSON string. * * @ticket 60356 * - * @covers ::data_wp_context + * @covers ::wp_interactivity_data_wp_context */ - public function test_data_wp_context_with_different_arrays() { - $this->assertEquals( 'data-wp-context=\'{}\'', data_wp_context( array() ) ); + public function test_wp_interactivity_data_wp_context_with_different_arrays() { + $this->assertEquals( 'data-wp-context=\'{}\'', wp_interactivity_data_wp_context( array() ) ); $this->assertEquals( 'data-wp-context=\'{"a":1,"b":"2","c":true}\'', - data_wp_context( + wp_interactivity_data_wp_context( array( 'a' => 1, 'b' => '2', @@ -335,27 +335,27 @@ public function test_data_wp_context_with_different_arrays() { ); $this->assertEquals( 'data-wp-context=\'{"a":[1,2]}\'', - data_wp_context( array( 'a' => array( 1, 2 ) ) ) + wp_interactivity_data_wp_context( array( 'a' => array( 1, 2 ) ) ) ); $this->assertEquals( 'data-wp-context=\'[1,2]\'', - data_wp_context( array( 1, 2 ) ) + wp_interactivity_data_wp_context( array( 1, 2 ) ) ); } /** - * Tests that data_wp_context function correctly converts different array + * Tests that wp_interactivity_data_wp_context function correctly converts different array * structures to a JSON string and adds a namespace. * * @ticket 60356 * - * @covers ::data_wp_context + * @covers ::wp_interactivity_data_wp_context */ - public function test_data_wp_context_with_different_arrays_and_a_namespace() { - $this->assertEquals( 'data-wp-context=\'myPlugin::{}\'', data_wp_context( array(), 'myPlugin' ) ); + public function test_wp_interactivity_data_wp_context_with_different_arrays_and_a_namespace() { + $this->assertEquals( 'data-wp-context=\'myPlugin::{}\'', wp_interactivity_data_wp_context( array(), 'myPlugin' ) ); $this->assertEquals( 'data-wp-context=\'myPlugin::{"a":1,"b":"2","c":true}\'', - data_wp_context( + wp_interactivity_data_wp_context( array( 'a' => 1, 'b' => '2', @@ -366,28 +366,28 @@ public function test_data_wp_context_with_different_arrays_and_a_namespace() { ); $this->assertEquals( 'data-wp-context=\'myPlugin::{"a":[1,2]}\'', - data_wp_context( array( 'a' => array( 1, 2 ) ), 'myPlugin' ) + wp_interactivity_data_wp_context( array( 'a' => array( 1, 2 ) ), 'myPlugin' ) ); $this->assertEquals( 'data-wp-context=\'myPlugin::[1,2]\'', - data_wp_context( array( 1, 2 ), 'myPlugin' ) + wp_interactivity_data_wp_context( array( 1, 2 ), 'myPlugin' ) ); } /** - * Tests that data_wp_context function correctly applies the JSON encoding + * Tests that wp_interactivity_data_wp_context function correctly applies the JSON encoding * flags. This ensures that characters like `<`, `>`, `'`, or `&` are * properly escaped in the JSON-encoded string to prevent potential XSS * attacks. * * @ticket 60356 * - * @covers ::data_wp_context + * @covers ::wp_interactivity_data_wp_context */ - public function test_data_wp_context_with_json_flags() { - $this->assertEquals( 'data-wp-context=\'{"tag":"\u003Cfoo\u003E"}\'', data_wp_context( array( 'tag' => '' ) ) ); - $this->assertEquals( 'data-wp-context=\'{"apos":"\u0027bar\u0027"}\'', data_wp_context( array( 'apos' => "'bar'" ) ) ); - $this->assertEquals( 'data-wp-context=\'{"quot":"\u0022baz\u0022"}\'', data_wp_context( array( 'quot' => '"baz"' ) ) ); - $this->assertEquals( 'data-wp-context=\'{"amp":"T\u0026T"}\'', data_wp_context( array( 'amp' => 'T&T' ) ) ); + public function test_wp_interactivity_data_wp_context_with_json_flags() { + $this->assertEquals( 'data-wp-context=\'{"tag":"\u003Cfoo\u003E"}\'', wp_interactivity_data_wp_context( array( 'tag' => '' ) ) ); + $this->assertEquals( 'data-wp-context=\'{"apos":"\u0027bar\u0027"}\'', wp_interactivity_data_wp_context( array( 'apos' => "'bar'" ) ) ); + $this->assertEquals( 'data-wp-context=\'{"quot":"\u0022baz\u0022"}\'', wp_interactivity_data_wp_context( array( 'quot' => '"baz"' ) ) ); + $this->assertEquals( 'data-wp-context=\'{"amp":"T\u0026T"}\'', wp_interactivity_data_wp_context( array( 'amp' => 'T&T' ) ) ); } } From 56f1a37bbeba99ca1e8301354645e0113a3fcf11 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Thu, 29 Feb 2024 14:28:52 +0000 Subject: [PATCH 104/251] Interactivity API: Revert [57742] pending a Gutenberg package update. This function can only be renamed after updating Gutenberg npm packages, as some of the core blocks already use this function. See #60575. git-svn-id: https://develop.svn.wordpress.org/trunk@57743 602fd350-edb4-49c9-b593-d223f7449a82 --- .../interactivity-api/interactivity-api.php | 4 +- .../interactivity-api/interactivity-api.php | 42 +++++++++---------- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/src/wp-includes/interactivity-api/interactivity-api.php b/src/wp-includes/interactivity-api/interactivity-api.php index 120551b7e273a..548fcc3638fb7 100644 --- a/src/wp-includes/interactivity-api/interactivity-api.php +++ b/src/wp-includes/interactivity-api/interactivity-api.php @@ -149,7 +149,7 @@ function wp_interactivity_config( string $store_namespace, array $config = array * * Example: * - *
    true, 'count' => 0 ) ); ?>> + *
    true, 'count' => 0 ) ); ?>> * * @since 6.5.0 * @@ -158,7 +158,7 @@ function wp_interactivity_config( string $store_namespace, array $config = array * @return string A complete `data-wp-context` directive with a JSON encoded value representing the context array and * the store namespace if specified. */ -function wp_interactivity_data_wp_context( array $context, string $store_namespace = '' ): string { +function data_wp_context( array $context, string $store_namespace = '' ): string { return 'data-wp-context=\'' . ( $store_namespace ? $store_namespace . '::' : '' ) . ( empty( $context ) ? '{}' : wp_json_encode( $context, JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_HEX_AMP ) ) . diff --git a/tests/phpunit/tests/interactivity-api/interactivity-api.php b/tests/phpunit/tests/interactivity-api/interactivity-api.php index 7d74fda8eb448..c98d74f415350 100644 --- a/tests/phpunit/tests/interactivity-api/interactivity-api.php +++ b/tests/phpunit/tests/interactivity-api/interactivity-api.php @@ -314,18 +314,18 @@ public function test_process_directives_only_process_the_root_interactive_blocks } /** - * Tests that wp_interactivity_data_wp_context function correctly converts different array + * Tests that data_wp_context function correctly converts different array * structures to a JSON string. * * @ticket 60356 * - * @covers ::wp_interactivity_data_wp_context + * @covers ::data_wp_context */ - public function test_wp_interactivity_data_wp_context_with_different_arrays() { - $this->assertEquals( 'data-wp-context=\'{}\'', wp_interactivity_data_wp_context( array() ) ); + public function test_data_wp_context_with_different_arrays() { + $this->assertEquals( 'data-wp-context=\'{}\'', data_wp_context( array() ) ); $this->assertEquals( 'data-wp-context=\'{"a":1,"b":"2","c":true}\'', - wp_interactivity_data_wp_context( + data_wp_context( array( 'a' => 1, 'b' => '2', @@ -335,27 +335,27 @@ public function test_wp_interactivity_data_wp_context_with_different_arrays() { ); $this->assertEquals( 'data-wp-context=\'{"a":[1,2]}\'', - wp_interactivity_data_wp_context( array( 'a' => array( 1, 2 ) ) ) + data_wp_context( array( 'a' => array( 1, 2 ) ) ) ); $this->assertEquals( 'data-wp-context=\'[1,2]\'', - wp_interactivity_data_wp_context( array( 1, 2 ) ) + data_wp_context( array( 1, 2 ) ) ); } /** - * Tests that wp_interactivity_data_wp_context function correctly converts different array + * Tests that data_wp_context function correctly converts different array * structures to a JSON string and adds a namespace. * * @ticket 60356 * - * @covers ::wp_interactivity_data_wp_context + * @covers ::data_wp_context */ - public function test_wp_interactivity_data_wp_context_with_different_arrays_and_a_namespace() { - $this->assertEquals( 'data-wp-context=\'myPlugin::{}\'', wp_interactivity_data_wp_context( array(), 'myPlugin' ) ); + public function test_data_wp_context_with_different_arrays_and_a_namespace() { + $this->assertEquals( 'data-wp-context=\'myPlugin::{}\'', data_wp_context( array(), 'myPlugin' ) ); $this->assertEquals( 'data-wp-context=\'myPlugin::{"a":1,"b":"2","c":true}\'', - wp_interactivity_data_wp_context( + data_wp_context( array( 'a' => 1, 'b' => '2', @@ -366,28 +366,28 @@ public function test_wp_interactivity_data_wp_context_with_different_arrays_and_ ); $this->assertEquals( 'data-wp-context=\'myPlugin::{"a":[1,2]}\'', - wp_interactivity_data_wp_context( array( 'a' => array( 1, 2 ) ), 'myPlugin' ) + data_wp_context( array( 'a' => array( 1, 2 ) ), 'myPlugin' ) ); $this->assertEquals( 'data-wp-context=\'myPlugin::[1,2]\'', - wp_interactivity_data_wp_context( array( 1, 2 ), 'myPlugin' ) + data_wp_context( array( 1, 2 ), 'myPlugin' ) ); } /** - * Tests that wp_interactivity_data_wp_context function correctly applies the JSON encoding + * Tests that data_wp_context function correctly applies the JSON encoding * flags. This ensures that characters like `<`, `>`, `'`, or `&` are * properly escaped in the JSON-encoded string to prevent potential XSS * attacks. * * @ticket 60356 * - * @covers ::wp_interactivity_data_wp_context + * @covers ::data_wp_context */ - public function test_wp_interactivity_data_wp_context_with_json_flags() { - $this->assertEquals( 'data-wp-context=\'{"tag":"\u003Cfoo\u003E"}\'', wp_interactivity_data_wp_context( array( 'tag' => '' ) ) ); - $this->assertEquals( 'data-wp-context=\'{"apos":"\u0027bar\u0027"}\'', wp_interactivity_data_wp_context( array( 'apos' => "'bar'" ) ) ); - $this->assertEquals( 'data-wp-context=\'{"quot":"\u0022baz\u0022"}\'', wp_interactivity_data_wp_context( array( 'quot' => '"baz"' ) ) ); - $this->assertEquals( 'data-wp-context=\'{"amp":"T\u0026T"}\'', wp_interactivity_data_wp_context( array( 'amp' => 'T&T' ) ) ); + public function test_data_wp_context_with_json_flags() { + $this->assertEquals( 'data-wp-context=\'{"tag":"\u003Cfoo\u003E"}\'', data_wp_context( array( 'tag' => '' ) ) ); + $this->assertEquals( 'data-wp-context=\'{"apos":"\u0027bar\u0027"}\'', data_wp_context( array( 'apos' => "'bar'" ) ) ); + $this->assertEquals( 'data-wp-context=\'{"quot":"\u0022baz\u0022"}\'', data_wp_context( array( 'quot' => '"baz"' ) ) ); + $this->assertEquals( 'data-wp-context=\'{"amp":"T\u0026T"}\'', data_wp_context( array( 'amp' => 'T&T' ) ) ); } } From 0fb376ba9b4d441cbe92f31cdce037338b4e212d Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 29 Feb 2024 20:00:07 +0000 Subject: [PATCH 105/251] Tests: Use `assertSame()` in post meta revisioning 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. Includes correcting the test class name. Follow-up to [56714]. See #59655. git-svn-id: https://develop.svn.wordpress.org/trunk@57744 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/post/metaRevisions.php | 44 +++++++++++----------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/tests/phpunit/tests/post/metaRevisions.php b/tests/phpunit/tests/post/metaRevisions.php index 74442b53c82ad..a387678c34cdb 100644 --- a/tests/phpunit/tests/post/metaRevisions.php +++ b/tests/phpunit/tests/post/metaRevisions.php @@ -9,7 +9,7 @@ * @group meta * @group meta-revisions */ -class MetaRevisionTests extends WP_UnitTestCase { +class Tests_Post_MetaRevisions extends WP_UnitTestCase { /** * Callback function to add the revisioned keys. @@ -50,7 +50,7 @@ public function test_revisions_stores_meta_values_with_slashes( $passed, $expect // Store a custom meta value, which is not revisioned by default. update_post_meta( $post_id, 'meta_revision_test', wp_slash( $passed ) ); - $this->assertEquals( $expected, get_post_meta( $post_id, 'meta_revision_test', true ) ); + $this->assertSame( $expected, get_post_meta( $post_id, 'meta_revision_test', true ) ); // Update the post, storing a revision. wp_update_post( @@ -80,7 +80,7 @@ public function test_revisions_stores_meta_values_with_slashes( $passed, $expect // Restore! wp_restore_post_revision( $last_revision->ID ); - $this->assertEquals( $expected, get_post_meta( $post_id, 'meta_revision_test', true ) ); + $this->assertSame( $expected, get_post_meta( $post_id, 'meta_revision_test', true ) ); } /** @@ -188,7 +188,7 @@ public function test_revisions_stores_meta_values() { */ // Custom post meta should NOT be restored, orignal value should not be restored, value still 'update1'. - $this->assertEquals( 'update1', get_post_meta( $post_id, 'meta_revision_test', true ) ); + $this->assertSame( 'update1', get_post_meta( $post_id, 'meta_revision_test', true ) ); update_post_meta( $post_id, 'meta_revision_test', 'update2' ); @@ -209,7 +209,7 @@ public function test_revisions_stores_meta_values() { $revisions = array_values( wp_get_post_revisions( $post_id ) ); $this->assertCount( 5, $revisions ); - $this->assertEquals( 'update2', get_post_meta( $revisions[0]->ID, 'meta_revision_test', true ) ); + $this->assertSame( 'update2', get_post_meta( $revisions[0]->ID, 'meta_revision_test', true ) ); // Store custom meta values, which should now be revisioned. update_post_meta( $post_id, 'meta_revision_test', 'update3' ); @@ -231,7 +231,7 @@ public function test_revisions_stores_meta_values() { $this->assertCount( 6, $revisions ); // Verify that previous post meta is set. - $this->assertEquals( 'update3', get_post_meta( $post_id, 'meta_revision_test', true ) ); + $this->assertSame( 'update3', get_post_meta( $post_id, 'meta_revision_test', true ) ); // Restore the previous revision. $revisions = wp_get_post_revisions( $post_id ); @@ -244,7 +244,7 @@ public function test_revisions_stores_meta_values() { /* * Verify that previous post meta is restored. */ - $this->assertEquals( 'update2', get_post_meta( $post_id, 'meta_revision_test', true ) ); + $this->assertSame( 'update2', get_post_meta( $post_id, 'meta_revision_test', true ) ); // Try storing a blank meta. update_post_meta( $post_id, 'meta_revision_test', '' ); @@ -270,7 +270,7 @@ public function test_revisions_stores_meta_values() { /* * Verify that previous blank post meta is restored. */ - $this->assertEquals( '', get_post_meta( $post_id, 'meta_revision_test', true ) ); + $this->assertSame( '', get_post_meta( $post_id, 'meta_revision_test', true ) ); /* * Test not tracking a key - remove the key from the revisioned meta. @@ -302,7 +302,7 @@ public function test_revisions_stores_meta_values() { /* * Verify that previous post meta is NOT restored. */ - $this->assertEquals( 'update 6', get_post_meta( $post_id, 'meta_revision_test', true ) ); + $this->assertSame( 'update 6', get_post_meta( $post_id, 'meta_revision_test', true ) ); // Add the custom field to be revised via the wp_post_revision_meta_keys filter. add_filter( 'wp_post_revision_meta_keys', array( $this, 'add_revisioned_keys' ) ); @@ -330,7 +330,7 @@ public function test_revisions_stores_meta_values() { /* * Verify that multiple metas stored correctly. */ - $this->assertEquals( array( 'update 7', 'update 7 number 2', 'update 7 number 3' ), get_post_meta( $post_id, 'meta_revision_test' ) ); + $this->assertSame( array( 'update 7', 'update 7 number 2', 'update 7 number 3' ), get_post_meta( $post_id, 'meta_revision_test' ) ); /* * Test the revisioning of a multidimensional array. @@ -373,7 +373,7 @@ public function test_revisions_stores_meta_values() { * Verify multidimensional array stored correctly. */ $stored_array = get_post_meta( $post_id, 'meta_revision_test' ); - $this->assertEquals( $test_array, $stored_array[0] ); + $this->assertSame( $test_array, $stored_array[0] ); /* * Test multiple revisions on the same key. @@ -390,7 +390,7 @@ public function test_revisions_stores_meta_values() { $stored_array = get_post_meta( $post_id, 'meta_multiples_test' ); $expect = array( 'test1', 'test2', 'test3' ); - $this->assertEquals( $expect, $stored_array ); + $this->assertSame( $expect, $stored_array ); // Restore the previous revision. $revisions = wp_get_post_revisions( $post_id ); @@ -400,7 +400,7 @@ public function test_revisions_stores_meta_values() { $stored_array = get_post_meta( $post_id, 'meta_multiples_test' ); $expect = array( 'test1', 'test2', 'test3' ); - $this->assertEquals( $expect, $stored_array ); + $this->assertSame( $expect, $stored_array ); // Cleanup! wp_delete_post( $original_post_id ); @@ -482,14 +482,14 @@ public function blank_meta_is_revisioned() { $stored_array = get_post_meta( $post_id, 'meta_multiples_test' ); $expect = array( 'test1', 'test2', 'test3' ); - $this->assertEquals( $expect, $stored_array ); + $this->assertSame( $expect, $stored_array ); // Restore the previous revision. $revisions = wp_get_post_revisions( $post_id ); $last_revision = array_shift( $revisions ); wp_restore_post_revision( $last_revision->ID ); $stored_data = get_post_meta( $post_id, 'foo' ); - $this->assertEquals( '', $stored_data[0] ); + $this->assertSame( '', $stored_data[0] ); } /** @@ -526,13 +526,13 @@ public function test_revisionining_of_meta_with_default_value() { // Check that the meta is blank. $stored_data = get_post_meta( $post_id, 'meta_revision_test', true ); - $this->assertEquals( '', $stored_data ); + $this->assertSame( '', $stored_data ); // Also verify that the latest revision has blank stored for the meta. $revisions = wp_get_post_revisions( $post_id ); $last_revision = array_shift( $revisions ); $stored_data = get_post_meta( $last_revision->ID, 'meta_revision_test', true ); - $this->assertEquals( '', $stored_data ); + $this->assertSame( '', $stored_data ); // Delete the meta. delete_post_meta( $post_id, 'meta_revision_test' ); @@ -546,14 +546,14 @@ public function test_revisionining_of_meta_with_default_value() { ); // Check that the default meta value is returned. - $this->assertEquals( 'default value', get_post_meta( $post_id, 'meta_revision_test', true ) ); + $this->assertSame( 'default value', get_post_meta( $post_id, 'meta_revision_test', true ) ); // Also verify that the latest revision has the default value returned for the meta. $revisions = wp_get_post_revisions( $post_id ); $last_revision = array_shift( $revisions ); // No ,eta data should be stored in the revision. - $this->assertEquals( array(), get_post_meta( $last_revision->ID ) ); + $this->assertSame( array(), get_post_meta( $last_revision->ID ) ); // Set the test meta again. update_post_meta( $post_id, 'meta_revision_test', 'test' ); @@ -565,7 +565,7 @@ public function test_revisionining_of_meta_with_default_value() { wp_restore_post_revision( $last_revision->ID ); // Verify the default meta value is still returned. - $this->assertEquals( 'default value', get_post_meta( $post_id, 'meta_revision_test', true ) ); + $this->assertSame( 'default value', get_post_meta( $post_id, 'meta_revision_test', true ) ); } /** @@ -598,7 +598,7 @@ public function test_register_post_meta_supports_revisions( $post_type, $meta_ke $revisions = wp_get_post_revisions( $post_id ); $revision = array_shift( $revisions ); $revisioned_meta = get_post_meta( $revision->ID, $meta_key, true ); - $this->assertEquals( $expected_is_revisioned, 'bar' === $revisioned_meta ); + $this->assertSame( $expected_is_revisioned, 'bar' === $revisioned_meta ); // Reset global so subsequent data tests do not get polluted. $GLOBALS['wp_meta_keys'] = array(); @@ -690,7 +690,7 @@ public function test_revisions_stores_meta_values_page_and_cpt( $passed, $expect // Go back to load the previous revision. $last_revision = array_shift( $revisions ); wp_restore_post_revision( $last_revision->ID ); - $this->assertEquals( $expected, get_post_meta( $page_id, 'meta_revision_test', true ) ); + $this->assertSame( $expected, get_post_meta( $page_id, 'meta_revision_test', true ) ); } else { $this->assertEmpty( $revisions ); } From 186eeafb6888431fdf445b2abf2036f0606edcd5 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Thu, 29 Feb 2024 22:00:53 +0000 Subject: [PATCH 106/251] =?UTF-8?q?Quick/Bulk=20Edit:=20Ensure=20the=20?= =?UTF-8?q?=E2=80=9CAll=E2=80=9D=20checkbox=20is=20properly=20toggled=20in?= =?UTF-8?q?=20certain=20scenarios.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When removing a single item from the bulk edit box or when adding more items, the “All” checkboxes at the top and bottom of the posts list table should be properly toggled. Props hiteshtalpada, oglekler, webcommsat, ugyensupport, chaion07, Toru. Fixes #59121. git-svn-id: https://develop.svn.wordpress.org/trunk@57745 602fd350-edb4-49c9-b593-d223f7449a82 --- src/js/_enqueues/admin/common.js | 2 +- src/js/_enqueues/admin/inline-edit-post.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/js/_enqueues/admin/common.js b/src/js/_enqueues/admin/common.js index da7a7a3b07ac4..af6cedc2818db 100644 --- a/src/js/_enqueues/admin/common.js +++ b/src/js/_enqueues/admin/common.js @@ -1169,7 +1169,7 @@ $( function() { lastClicked = this; // Toggle the "Select all" checkboxes depending if the other ones are all checked or not. - var unchecked = $(this).closest('tbody').find(':checkbox').filter(':visible:enabled').not(':checked'); + var unchecked = $(this).closest('tbody').find('tr.iedit').find(':checkbox').filter(':visible:enabled').not(':checked'); /** * Determines if all checkboxes are checked. diff --git a/src/js/_enqueues/admin/inline-edit-post.js b/src/js/_enqueues/admin/inline-edit-post.js index 962f421448c5e..65cd342c284b2 100644 --- a/src/js/_enqueues/admin/inline-edit-post.js +++ b/src/js/_enqueues/admin/inline-edit-post.js @@ -268,6 +268,7 @@ window.wp = window.wp || {}; $prev = $this.parent().prev().children( '.ntdelbutton' ), $next = $this.parent().next().children( '.ntdelbutton' ); + $( 'input#cb-select-all-1, input#cb-select-all-2' ).prop( 'checked', false ); $( 'table.widefat input[value="' + id + '"]' ).prop( 'checked', false ); $( '#_' + id ).parent().remove(); wp.a11y.speak( wp.i18n.__( 'Item removed.' ), 'assertive' ); From bb7de8b138f3dfb3b0d2ca5d7f9990208c379af5 Mon Sep 17 00:00:00 2001 From: Joe Dolson Date: Fri, 1 Mar 2024 16:19:23 +0000 Subject: [PATCH 107/251] Customize: Accessibility: Label menu subitems when updating menus. Fix missing subitem indicator when menu items in the Customizer are children of parent menu items & add menu item original title to button text. Adds parity with the admin menu editor and fixes a bug where the button text was 'untitled' if the menu item title had not been edited. Props designsimply, afercia, celloexpressions, kushang78, joedolson, rcreators. Fixes #32728. git-svn-id: https://develop.svn.wordpress.org/trunk@57746 602fd350-edb4-49c9-b593-d223f7449a82 --- src/js/_enqueues/wp/customize/nav-menus.js | 13 +++++++++++++ .../class-wp-customize-nav-menu-item-control.php | 9 +++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/js/_enqueues/wp/customize/nav-menus.js b/src/js/_enqueues/wp/customize/nav-menus.js index 8930f15ddfcc7..9dad3e15aedf2 100644 --- a/src/js/_enqueues/wp/customize/nav-menus.js +++ b/src/js/_enqueues/wp/customize/nav-menus.js @@ -1664,6 +1664,8 @@ $reorderNav = control.container.find( '.menu-item-reorder-nav' ); $reorderNav.find( '.menus-move-up, .menus-move-down, .menus-move-left, .menus-move-right' ).on( 'click', function() { var moveBtn = $( this ); + control.params.depth = control.getDepth(); + moveBtn.focus(); var isMoveUp = moveBtn.is( '.menus-move-up' ), @@ -1677,8 +1679,19 @@ control.moveDown(); } else if ( isMoveLeft ) { control.moveLeft(); + if ( 1 === control.params.depth ) { + control.container.find( '.is-submenu' ).hide(); + } else { + control.container.find( '.is-submenu' ).show(); + } } else if ( isMoveRight ) { control.moveRight(); + control.params.depth += 1; + if ( 0 === control.params.depth ) { + control.container.find( '.is-submenu' ).hide(); + } else { + control.container.find( '.is-submenu' ).show(); + } } moveBtn.focus(); // Re-focus after the container was moved. diff --git a/src/wp-includes/customize/class-wp-customize-nav-menu-item-control.php b/src/wp-includes/customize/class-wp-customize-nav-menu-item-control.php index d6cae27b950b8..8915824ead5d7 100644 --- a/src/wp-includes/customize/class-wp-customize-nav-menu-item-control.php +++ b/src/wp-includes/customize/class-wp-customize-nav-menu-item-control.php @@ -69,18 +69,23 @@ public function content_template() { From 63a670d7f498b130e333d03e8c3a1e3b8179b0b1 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 1 Mar 2024 22:41:23 +0000 Subject: [PATCH 108/251] Docs: Correct the placement of `@global` tags in `wp-includes/admin-bar.php`. Follow-up to [38810], [56209]. Props shailu25, sabernhardt. See #60021. git-svn-id: https://develop.svn.wordpress.org/trunk@57747 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/admin-bar.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/admin-bar.php b/src/wp-includes/admin-bar.php index 975672ece751d..e0c0712d303fc 100644 --- a/src/wp-includes/admin-bar.php +++ b/src/wp-includes/admin-bar.php @@ -450,9 +450,9 @@ function wp_admin_bar_site_menu( $wp_admin_bar ) { * Adds the "Edit site" link to the Toolbar. * * @since 5.9.0 + * @since 6.3.0 Added `$_wp_current_template_id` global for editing of current template directly from the admin bar. * * @global string $_wp_current_template_id - * @since 6.3.0 Added `$_wp_current_template_id` global for editing of current template directly from the admin bar. * * @param WP_Admin_Bar $wp_admin_bar The WP_Admin_Bar instance. */ @@ -489,8 +489,9 @@ function wp_admin_bar_edit_site_menu( $wp_admin_bar ) { * * @since 4.3.0 * - * @param WP_Admin_Bar $wp_admin_bar The WP_Admin_Bar instance. * @global WP_Customize_Manager $wp_customize + * + * @param WP_Admin_Bar $wp_admin_bar The WP_Admin_Bar instance. */ function wp_admin_bar_customize_menu( $wp_admin_bar ) { global $wp_customize; From 3d8f3aa61088cb98b160d1faf2868dc07897d3e9 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sat, 2 Mar 2024 10:45:27 +0000 Subject: [PATCH 109/251] Docs: Document some globals in `wp-settings.php`. Follow-up to [18532], [18993], [27158], [38362]. Props upadalavipul, viralsampat, sabernhardt. See #60021. git-svn-id: https://develop.svn.wordpress.org/trunk@57748 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-settings.php | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/wp-settings.php b/src/wp-settings.php index ecc2717d19219..9673479bfab76 100644 --- a/src/wp-settings.php +++ b/src/wp-settings.php @@ -130,8 +130,14 @@ // Include the wpdb class and, if present, a db.php database drop-in. require_wp_db(); -// Set the database table prefix and the format specifiers for database table columns. +/** + * @since 3.3.0 + * + * @global string $table_prefix The database table prefix. + */ $GLOBALS['table_prefix'] = $table_prefix; + +// Set the database table prefix and the format specifiers for database table columns. wp_set_wpdb_vars(); // Start the WordPress object cache, or an external object cache if the drop-in is present. @@ -393,6 +399,11 @@ add_action( 'after_setup_theme', array( wp_script_modules(), 'add_hooks' ) ); add_action( 'after_setup_theme', array( wp_interactivity(), 'add_hooks' ) ); +/** + * @since 3.3.0 + * + * @global WP_Embed $wp_embed WordPress Embed object. + */ $GLOBALS['wp_embed'] = new WP_Embed(); /** @@ -418,6 +429,11 @@ // Define must-use plugin directory constants, which may be overridden in the sunrise.php drop-in. wp_plugin_directory_constants(); +/** + * @since 3.9.0 + * + * @global array $wp_plugin_paths + */ $GLOBALS['wp_plugin_paths'] = array(); // Load must-use plugins. From 0efafc1dfd46bf370450595b63f4440cba04de81 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sat, 2 Mar 2024 12:53:53 +0000 Subject: [PATCH 110/251] Build/Test Tools: Use a consistent parameter name between `rand_str()` and `rand_long_str()`. Follow-up to [36272], [50265]. Props harsh175, sabernhardt. Fixes #60401. git-svn-id: https://develop.svn.wordpress.org/trunk@57749 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/includes/utils.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/phpunit/includes/utils.php b/tests/phpunit/includes/utils.php index 7c0d4e4b19d59..ead788f996ec9 100644 --- a/tests/phpunit/includes/utils.php +++ b/tests/phpunit/includes/utils.php @@ -6,17 +6,17 @@ * Returns a string of the required length containing random characters. Note that * the maximum possible string length is 32. * - * @param int $len Optional. The required length. Default 32. + * @param int $length Optional. The required length. Default 32. * @return string The string. */ -function rand_str( $len = 32 ) { - return substr( md5( uniqid( rand() ) ), 0, $len ); +function rand_str( $length = 32 ) { + return substr( md5( uniqid( rand() ) ), 0, $length ); } /** * Returns a string of the required length containing random characters. * - * @param int $len The required length. + * @param int $length The required length. * @return string The string. */ function rand_long_str( $length ) { From 919b833fbf96e68646d22dfdc1aee4dc42780a53 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Sat, 2 Mar 2024 13:36:02 +0000 Subject: [PATCH 111/251] Query: Remove leading whitespace from certain database queries. Unintended leading whitespace at the beginning of a raw MySQL query led to unexpected behavior such as broken pagination. Eliminating said whitespace avoids that. Adds unit tests to prevent regressions. Props wpfed, swissspidy, ironprogrammer, tadamarketing, afercia. Fixes #56841. git-svn-id: https://develop.svn.wordpress.org/trunk@57750 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class-wp-comment-query.php | 16 ++++----- src/wp-includes/class-wp-network-query.php | 16 ++++----- src/wp-includes/class-wp-query.php | 32 ++++++++--------- src/wp-includes/class-wp-site-query.php | 16 ++++----- src/wp-includes/class-wp-term-query.php | 14 ++++---- src/wp-includes/class-wp-user-query.php | 14 ++++---- tests/phpunit/tests/comment/query.php | 22 ++++++++++++ .../tests/multisite/wpNetworkQuery.php | 17 ++++++++++ tests/phpunit/tests/multisite/wpSiteQuery.php | 20 +++++++++++ tests/phpunit/tests/post/query.php | 34 +++++++++++++++++++ tests/phpunit/tests/term/query.php | 15 ++++++++ tests/phpunit/tests/user/query.php | 13 +++++++ 12 files changed, 175 insertions(+), 54 deletions(-) diff --git a/src/wp-includes/class-wp-comment-query.php b/src/wp-includes/class-wp-comment-query.php index 142ce5e4e514d..6c4a86b9cddeb 100644 --- a/src/wp-includes/class-wp-comment-query.php +++ b/src/wp-includes/class-wp-comment-query.php @@ -964,14 +964,14 @@ protected function get_comment_ids() { $this->sql_clauses['orderby'] = $orderby; $this->sql_clauses['limits'] = $limits; - $this->request = " - {$this->sql_clauses['select']} - {$this->sql_clauses['from']} - {$where} - {$this->sql_clauses['groupby']} - {$this->sql_clauses['orderby']} - {$this->sql_clauses['limits']} - "; + // Beginning of the string is on a new line to prevent leading whitespace. See https://core.trac.wordpress.org/ticket/56841. + $this->request = + "{$this->sql_clauses['select']} + {$this->sql_clauses['from']} + {$where} + {$this->sql_clauses['groupby']} + {$this->sql_clauses['orderby']} + {$this->sql_clauses['limits']}"; if ( $this->query_vars['count'] ) { return (int) $wpdb->get_var( $this->request ); diff --git a/src/wp-includes/class-wp-network-query.php b/src/wp-includes/class-wp-network-query.php index e39f66a075a9f..27ab4836699ac 100644 --- a/src/wp-includes/class-wp-network-query.php +++ b/src/wp-includes/class-wp-network-query.php @@ -481,14 +481,14 @@ protected function get_network_ids() { $this->sql_clauses['orderby'] = $orderby; $this->sql_clauses['limits'] = $limits; - $this->request = " - {$this->sql_clauses['select']} - {$this->sql_clauses['from']} - {$where} - {$this->sql_clauses['groupby']} - {$this->sql_clauses['orderby']} - {$this->sql_clauses['limits']} - "; + // Beginning of the string is on a new line to prevent leading whitespace. See https://core.trac.wordpress.org/ticket/56841. + $this->request = + "{$this->sql_clauses['select']} + {$this->sql_clauses['from']} + {$where} + {$this->sql_clauses['groupby']} + {$this->sql_clauses['orderby']} + {$this->sql_clauses['limits']}"; if ( $this->query_vars['count'] ) { return (int) $wpdb->get_var( $this->request ); diff --git a/src/wp-includes/class-wp-query.php b/src/wp-includes/class-wp-query.php index a826dda5ec90e..0f9ae28d5b080 100644 --- a/src/wp-includes/class-wp-query.php +++ b/src/wp-includes/class-wp-query.php @@ -3104,14 +3104,14 @@ public function get_posts() { $found_rows = 'SQL_CALC_FOUND_ROWS'; } - $old_request = " - SELECT $found_rows $distinct $fields - FROM {$wpdb->posts} $join - WHERE 1=1 $where - $groupby - $orderby - $limits - "; + // Beginning of the string is on a new line to prevent leading whitespace. See https://core.trac.wordpress.org/ticket/56841. + $old_request = + "SELECT $found_rows $distinct $fields + FROM {$wpdb->posts} $join + WHERE 1=1 $where + $groupby + $orderby + $limits"; $this->request = $old_request; @@ -3307,14 +3307,14 @@ public function get_posts() { if ( $split_the_query ) { // First get the IDs and then fill in the objects. - $this->request = " - SELECT $found_rows $distinct {$wpdb->posts}.ID - FROM {$wpdb->posts} $join - WHERE 1=1 $where - $groupby - $orderby - $limits - "; + // Beginning of the string is on a new line to prevent leading whitespace. See https://core.trac.wordpress.org/ticket/56841. + $this->request = + "SELECT $found_rows $distinct {$wpdb->posts}.ID + FROM {$wpdb->posts} $join + WHERE 1=1 $where + $groupby + $orderby + $limits"; /** * Filters the Post IDs SQL request before sending. diff --git a/src/wp-includes/class-wp-site-query.php b/src/wp-includes/class-wp-site-query.php index bda2c0cb2a979..fb3a6d22fe0f2 100644 --- a/src/wp-includes/class-wp-site-query.php +++ b/src/wp-includes/class-wp-site-query.php @@ -695,14 +695,14 @@ protected function get_site_ids() { $this->sql_clauses['orderby'] = $orderby; $this->sql_clauses['limits'] = $limits; - $this->request = " - {$this->sql_clauses['select']} - {$this->sql_clauses['from']} - {$where} - {$this->sql_clauses['groupby']} - {$this->sql_clauses['orderby']} - {$this->sql_clauses['limits']} - "; + // Beginning of the string is on a new line to prevent leading whitespace. See https://core.trac.wordpress.org/ticket/56841. + $this->request = + "{$this->sql_clauses['select']} + {$this->sql_clauses['from']} + {$where} + {$this->sql_clauses['groupby']} + {$this->sql_clauses['orderby']} + {$this->sql_clauses['limits']}"; if ( $this->query_vars['count'] ) { return (int) $wpdb->get_var( $this->request ); diff --git a/src/wp-includes/class-wp-term-query.php b/src/wp-includes/class-wp-term-query.php index 04d86024be404..25baaa8dd11f3 100644 --- a/src/wp-includes/class-wp-term-query.php +++ b/src/wp-includes/class-wp-term-query.php @@ -752,13 +752,13 @@ public function get_terms() { $this->sql_clauses['orderby'] = $orderby ? "$orderby $order" : ''; $this->sql_clauses['limits'] = $limits; - $this->request = " - {$this->sql_clauses['select']} - {$this->sql_clauses['from']} - {$where} - {$this->sql_clauses['orderby']} - {$this->sql_clauses['limits']} - "; + // Beginning of the string is on a new line to prevent leading whitespace. See https://core.trac.wordpress.org/ticket/56841. + $this->request = + "{$this->sql_clauses['select']} + {$this->sql_clauses['from']} + {$where} + {$this->sql_clauses['orderby']} + {$this->sql_clauses['limits']}"; $this->terms = null; diff --git a/src/wp-includes/class-wp-user-query.php b/src/wp-includes/class-wp-user-query.php index b8b4733cf09f6..0d2c0dec86886 100644 --- a/src/wp-includes/class-wp-user-query.php +++ b/src/wp-includes/class-wp-user-query.php @@ -818,13 +818,13 @@ public function query() { $this->results = apply_filters_ref_array( 'users_pre_query', array( null, &$this ) ); if ( null === $this->results ) { - $this->request = " - SELECT {$this->query_fields} - {$this->query_from} - {$this->query_where} - {$this->query_orderby} - {$this->query_limit} - "; + // Beginning of the string is on a new line to prevent leading whitespace. See https://core.trac.wordpress.org/ticket/56841. + $this->request = + "SELECT {$this->query_fields} + {$this->query_from} + {$this->query_where} + {$this->query_orderby} + {$this->query_limit}"; $cache_value = false; $cache_key = $this->generate_cache_key( $qv, $this->request ); $cache_group = 'user-queries'; diff --git a/tests/phpunit/tests/comment/query.php b/tests/phpunit/tests/comment/query.php index 2e4813e5e83d5..4104bc12c7757 100644 --- a/tests/phpunit/tests/comment/query.php +++ b/tests/phpunit/tests/comment/query.php @@ -5350,4 +5350,26 @@ public function test_unapproved_comment_with_meta_query_does_not_trigger_ambiguo $this->assertNotSame( "Column 'comment_ID' in where clause is ambiguous", $wpdb->last_error ); $this->assertStringNotContainsString( ' comment_ID ', $wpdb->last_query ); } + + /** + * @ticket 56841 + */ + public function test_query_does_not_have_leading_whitespace() { + self::factory()->comment->create( + array( + 'comment_post_ID' => self::$post_id, + 'user_id' => 7, + ) + ); + + $q = new WP_Comment_Query(); + $q->query( + array( + 'count' => true, + 'orderby' => 'none', + ) + ); + + $this->assertSame( ltrim( $q->request ), $q->request, 'The query has leading whitespace' ); + } } diff --git a/tests/phpunit/tests/multisite/wpNetworkQuery.php b/tests/phpunit/tests/multisite/wpNetworkQuery.php index f59a4c66283be..cb346e66492d2 100644 --- a/tests/phpunit/tests/multisite/wpNetworkQuery.php +++ b/tests/phpunit/tests/multisite/wpNetworkQuery.php @@ -608,6 +608,23 @@ public function test_networks_pre_query_filter_should_set_networks_property() { public static function filter_networks_pre_query_and_set_networks( $networks, $query ) { return array( get_network( self::$network_ids['wordpress.org/'] ) ); } + + /** + * @ticket 56841 + */ + public function test_wp_network_query_does_not_have_leading_whitespace() { + $q = new WP_Network_Query(); + $q->query( + array( + 'fields' => 'all', + 'number' => 3, + 'order' => 'ASC', + 'update_network_cache' => true, + ) + ); + + $this->assertSame( ltrim( $q->request ), $q->request, 'The query has leading whitespace' ); + } } endif; diff --git a/tests/phpunit/tests/multisite/wpSiteQuery.php b/tests/phpunit/tests/multisite/wpSiteQuery.php index 2b2bed37de1a3..d22faeecb32e0 100644 --- a/tests/phpunit/tests/multisite/wpSiteQuery.php +++ b/tests/phpunit/tests/multisite/wpSiteQuery.php @@ -1162,6 +1162,26 @@ public function test_sites_pre_query_filter_should_set_sites_property() { public static function filter_sites_pre_query_and_set_sites( $sites, $query ) { return array( get_site( self::$site_ids['wordpress.org/'] ) ); } + + /** + * @ticket 56841 + */ + public function test_wp_site_query_does_not_have_leading_whitespace() { + $q = new WP_Site_Query(); + + $q->query( + array( + 'fields' => 'ids', + 'network_id' => self::$network_ids['wordpress.org/'], + 'number' => 3, + 'order' => 'ASC', + 'update_site_cache' => true, + 'update_site_meta_cache' => true, + ) + ); + + $this->assertSame( ltrim( $q->request ), $q->request, 'The query has leading whitespace' ); + } } endif; diff --git a/tests/phpunit/tests/post/query.php b/tests/phpunit/tests/post/query.php index 151a1d73f8b77..941b6db7fdfcb 100644 --- a/tests/phpunit/tests/post/query.php +++ b/tests/phpunit/tests/post/query.php @@ -792,4 +792,38 @@ public function test_split_the_query_object_cache() { $this->assertSame( (bool) wp_using_ext_object_cache(), $filter->get_args()[0][0] ); } + + /** + * @ticket 56841 + */ + public function test_query_does_not_have_leading_whitespace() { + add_filter( 'split_the_query', '__return_false' ); + + $q = new WP_Query( + array( + 'posts_per_page' => 501, + ) + ); + + remove_filter( 'split_the_query', '__return_false' ); + + $this->assertSame( ltrim( $q->request ), $q->request, 'The query has leading whitespace' ); + } + + /** + * @ticket 56841 + */ + public function test_query_does_not_have_leading_whitespace_split_the_query() { + add_filter( 'split_the_query', '__return_true' ); + + $q = new WP_Query( + array( + 'posts_per_page' => 501, + ) + ); + + remove_filter( 'split_the_query', '__return_true' ); + + $this->assertSame( ltrim( $q->request ), $q->request, 'The query has leading whitespace' ); + } } diff --git a/tests/phpunit/tests/term/query.php b/tests/phpunit/tests/term/query.php index 682e86a8dfced..b6ece543b78fa 100644 --- a/tests/phpunit/tests/term/query.php +++ b/tests/phpunit/tests/term/query.php @@ -1123,4 +1123,19 @@ public function data_query_cache() { ), ); } + + /** + * @ticket 56841 + */ + public function test_query_does_not_have_leading_whitespace() { + $q = new WP_Term_Query( + array( + 'taxonomy' => 'wptests_tax', + 'hide_empty' => true, + 'fields' => 'ids', + ) + ); + + $this->assertSame( ltrim( $q->request ), $q->request, 'The query has leading whitespace' ); + } } diff --git a/tests/phpunit/tests/user/query.php b/tests/phpunit/tests/user/query.php index b6f4fc2899f98..887064b8ca8de 100644 --- a/tests/phpunit/tests/user/query.php +++ b/tests/phpunit/tests/user/query.php @@ -2378,4 +2378,17 @@ public function data_compat_fields() { ), ); } + + /** + * @ticket 56841 + */ + public function test_query_does_not_have_leading_whitespace() { + $q = new WP_User_Query( + array( + 'number' => 2, + ) + ); + + $this->assertSame( ltrim( $q->request ), $q->request, 'The query has leading whitespace' ); + } } From d1fafd868e3ccabb27bc8655a1d4c42c31f589ea Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Sat, 2 Mar 2024 13:39:43 +0000 Subject: [PATCH 112/251] Editor: Simplify sanitization code path in `WP_Theme_JSON` after [57496] Removes the custom `WP_Theme_JSON::is_assoc()` method again in favor of the existing `wp_is_numeric_array()` helper function. Props mmaattiiaass, costdev, swissspidy, spacedmonkey. Fixes #60360. git-svn-id: https://develop.svn.wordpress.org/trunk@57751 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class-wp-theme-json.php | 41 +++++++------------------ 1 file changed, 11 insertions(+), 30 deletions(-) diff --git a/src/wp-includes/class-wp-theme-json.php b/src/wp-includes/class-wp-theme-json.php index ba2a2dfa38186..2a4303b5a308f 100644 --- a/src/wp-includes/class-wp-theme-json.php +++ b/src/wp-includes/class-wp-theme-json.php @@ -1065,19 +1065,10 @@ protected static function remove_keys_not_in_schema( $tree, $schema ) { continue; } - // Check if the value is an array and requires further processing. - if ( is_array( $value ) && is_array( $schema[ $key ] ) ) { - // Determine if it is an associative or indexed array. - $schema_is_assoc = self::is_assoc( $value ); - - if ( $schema_is_assoc ) { - // If associative, process as a single object. - $tree[ $key ] = self::remove_keys_not_in_schema( $value, $schema[ $key ] ); - - if ( empty( $tree[ $key ] ) ) { - unset( $tree[ $key ] ); - } - } else { + if ( is_array( $schema[ $key ] ) ) { + if ( ! is_array( $value ) ) { + unset( $tree[ $key ] ); + } elseif ( wp_is_numeric_array( $value ) ) { // If indexed, process each item in the array. foreach ( $value as $item_key => $item_value ) { if ( isset( $schema[ $key ][0] ) && is_array( $schema[ $key ][0] ) ) { @@ -1087,29 +1078,19 @@ protected static function remove_keys_not_in_schema( $tree, $schema ) { $tree[ $key ][ $item_key ] = $item_value; } } + } else { + // If associative, process as a single object. + $tree[ $key ] = self::remove_keys_not_in_schema( $value, $schema[ $key ] ); + + if ( empty( $tree[ $key ] ) ) { + unset( $tree[ $key ] ); + } } - } elseif ( is_array( $schema[ $key ] ) && ! is_array( $tree[ $key ] ) ) { - unset( $tree[ $key ] ); } } - return $tree; } - /** - * Checks if the given array is associative. - * - * @since 6.5.0 - * @param array $data The array to check. - * @return bool True if the array is associative, false otherwise. - */ - protected static function is_assoc( $data ) { - if ( array() === $data ) { - return false; - } - return array_keys( $data ) !== range( 0, count( $data ) - 1 ); - } - /** * Returns the existing settings for each block. * From c828ba187a94ffed70ab3b9a9286755058aeca61 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sat, 2 Mar 2024 13:47:56 +0000 Subject: [PATCH 113/251] Docs: Document the `$xmlrpc_logging` global in `logIO()`. Follow-up to [1348], [19935]. Props viralsampat, upadalavipul, sabernhardt. See #60021. git-svn-id: https://develop.svn.wordpress.org/trunk@57752 602fd350-edb4-49c9-b593-d223f7449a82 --- src/xmlrpc.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/xmlrpc.php b/src/xmlrpc.php index b37abde3c29e5..592902085712f 100644 --- a/src/xmlrpc.php +++ b/src/xmlrpc.php @@ -91,10 +91,13 @@ /** * logIO() - Writes logging info to a file. * + * @since 1.2.0 * @deprecated 3.4.0 Use error_log() * @see error_log() * - * @param string $io Whether input or output + * @global int|bool $xmlrpc_logging Whether to enable XML-RPC logging. + * + * @param string $io Whether input or output. * @param string $msg Information describing logging reason. */ function logIO( $io, $msg ) { From 5bf25d881f1a0db5aae1ad9dc53b1044e2d6257e Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Sat, 2 Mar 2024 14:05:38 +0000 Subject: [PATCH 114/251] Build/Test Tools: Add initial tests for the `WP_Filesystem_Direct` class. Since `WP_Filesystem_Direct` is by far the most used filesystem abstraction class, this facilitates future changes with sufficient test coverage. Props swissspidy, costdev, mukesh27. Fixes #57774. git-svn-id: https://develop.svn.wordpress.org/trunk@57753 602fd350-edb4-49c9-b593-d223f7449a82 --- .../filesystem/wpFilesystemDirect/atime.php | 50 +++++ .../filesystem/wpFilesystemDirect/base.php | 197 ++++++++++++++++ .../filesystem/wpFilesystemDirect/chdir.php | 95 ++++++++ .../filesystem/wpFilesystemDirect/chgrp.php | 32 +++ .../filesystem/wpFilesystemDirect/chmod.php | 77 +++++++ .../filesystem/wpFilesystemDirect/chown.php | 32 +++ .../wpFilesystemDirect/construct.php | 39 ++++ .../filesystem/wpFilesystemDirect/copy.php | 72 ++++++ .../filesystem/wpFilesystemDirect/cwd.php | 26 +++ .../filesystem/wpFilesystemDirect/delete.php | 204 +++++++++++++++++ .../filesystem/wpFilesystemDirect/dirlist.php | 130 +++++++++++ .../filesystem/wpFilesystemDirect/exists.php | 44 ++++ .../wpFilesystemDirect/getContents.php | 47 ++++ .../wpFilesystemDirect/getContentsArray.php | 57 +++++ .../wpFilesystemDirect/getchmod.php | 48 ++++ .../filesystem/wpFilesystemDirect/isDir.php | 63 ++++++ .../filesystem/wpFilesystemDirect/isFile.php | 61 +++++ .../wpFilesystemDirect/isReadable.php | 46 ++++ .../wpFilesystemDirect/isWritable.php | 46 ++++ .../filesystem/wpFilesystemDirect/mkdir.php | 211 ++++++++++++++++++ .../filesystem/wpFilesystemDirect/move.php | 150 +++++++++++++ .../filesystem/wpFilesystemDirect/mtime.php | 68 ++++++ .../wpFilesystemDirect/putContents.php | 42 ++++ .../filesystem/wpFilesystemDirect/rmdir.php | 200 +++++++++++++++++ .../filesystem/wpFilesystemDirect/size.php | 63 ++++++ .../filesystem/wpFilesystemDirect/touch.php | 93 ++++++++ 26 files changed, 2193 insertions(+) create mode 100644 tests/phpunit/tests/filesystem/wpFilesystemDirect/atime.php create mode 100644 tests/phpunit/tests/filesystem/wpFilesystemDirect/base.php create mode 100644 tests/phpunit/tests/filesystem/wpFilesystemDirect/chdir.php create mode 100644 tests/phpunit/tests/filesystem/wpFilesystemDirect/chgrp.php create mode 100644 tests/phpunit/tests/filesystem/wpFilesystemDirect/chmod.php create mode 100644 tests/phpunit/tests/filesystem/wpFilesystemDirect/chown.php create mode 100644 tests/phpunit/tests/filesystem/wpFilesystemDirect/construct.php create mode 100644 tests/phpunit/tests/filesystem/wpFilesystemDirect/copy.php create mode 100644 tests/phpunit/tests/filesystem/wpFilesystemDirect/cwd.php create mode 100644 tests/phpunit/tests/filesystem/wpFilesystemDirect/delete.php create mode 100644 tests/phpunit/tests/filesystem/wpFilesystemDirect/dirlist.php create mode 100644 tests/phpunit/tests/filesystem/wpFilesystemDirect/exists.php create mode 100644 tests/phpunit/tests/filesystem/wpFilesystemDirect/getContents.php create mode 100644 tests/phpunit/tests/filesystem/wpFilesystemDirect/getContentsArray.php create mode 100644 tests/phpunit/tests/filesystem/wpFilesystemDirect/getchmod.php create mode 100644 tests/phpunit/tests/filesystem/wpFilesystemDirect/isDir.php create mode 100644 tests/phpunit/tests/filesystem/wpFilesystemDirect/isFile.php create mode 100644 tests/phpunit/tests/filesystem/wpFilesystemDirect/isReadable.php create mode 100644 tests/phpunit/tests/filesystem/wpFilesystemDirect/isWritable.php create mode 100644 tests/phpunit/tests/filesystem/wpFilesystemDirect/mkdir.php create mode 100644 tests/phpunit/tests/filesystem/wpFilesystemDirect/move.php create mode 100644 tests/phpunit/tests/filesystem/wpFilesystemDirect/mtime.php create mode 100644 tests/phpunit/tests/filesystem/wpFilesystemDirect/putContents.php create mode 100644 tests/phpunit/tests/filesystem/wpFilesystemDirect/rmdir.php create mode 100644 tests/phpunit/tests/filesystem/wpFilesystemDirect/size.php create mode 100644 tests/phpunit/tests/filesystem/wpFilesystemDirect/touch.php diff --git a/tests/phpunit/tests/filesystem/wpFilesystemDirect/atime.php b/tests/phpunit/tests/filesystem/wpFilesystemDirect/atime.php new file mode 100644 index 0000000000000..c6f57780c01c5 --- /dev/null +++ b/tests/phpunit/tests/filesystem/wpFilesystemDirect/atime.php @@ -0,0 +1,50 @@ +assertIsInt( self::$filesystem->atime( $path ) ); + } + + /** + * Tests that `WP_Filesystem_Direct::atime()` + * returns false for a path that does not exist. + * + * @ticket 57774 + * + * @dataProvider data_paths_that_do_not_exist + * + * @param string $path The path. + */ + public function test_should_return_false_for_a_path_that_does_not_exist( $path ) { + $path = self::$file_structure['test_dir']['path'] . $path; + + $this->assertFalse( self::$filesystem->atime( $path ) ); + } +} diff --git a/tests/phpunit/tests/filesystem/wpFilesystemDirect/base.php b/tests/phpunit/tests/filesystem/wpFilesystemDirect/base.php new file mode 100644 index 0000000000000..dc1252bd3a29c --- /dev/null +++ b/tests/phpunit/tests/filesystem/wpFilesystemDirect/base.php @@ -0,0 +1,197 @@ + array( + 'type' => 'd', + 'path' => $test_data_root_dir, + ), + 'test_dir' => array( + 'type' => 'd', + 'path' => $test_data_dir, + ), + 'subdir' => array( + 'type' => 'd', + 'path' => $test_data_dir . 'subdir/', + ), + + // Then files. + 'visible_file' => array( + 'type' => 'f', + 'path' => $test_data_dir . 'a_file_that_exists.txt', + 'contents' => "Contents of a file.\r\nNext line of a file.\r\n", + ), + 'hidden_file' => array( + 'type' => 'f', + 'path' => $test_data_dir . '.a_hidden_file', + 'contents' => "A hidden file.\r\n", + ), + 'subfile' => array( + 'type' => 'f', + 'path' => $test_data_dir . 'subdir/subfile.txt', + 'contents' => "A file in a subdirectory.\r\n", + ), + ); + } + + /** + * Creates any missing test assets before each test. + */ + public function set_up() { + parent::set_up(); + + foreach ( self::$file_structure as $entry ) { + if ( 'd' === $entry['type'] ) { + $this->create_directory_if_needed( $entry['path'] ); + } elseif ( 'f' === $entry['type'] ) { + $this->create_file_if_needed( + $entry['path'], + isset( $entry['contents'] ) ? $entry['contents'] : '' + ); + } + } + } + + /** + * Removes any existing test assets after each test. + */ + public function tear_down() { + foreach ( array_reverse( self::$file_structure ) as $entry ) { + if ( ! file_exists( $entry['path'] ) ) { + continue; + } + + if ( 'f' === $entry['type'] ) { + unlink( $entry['path'] ); + } elseif ( 'd' === $entry['type'] ) { + rmdir( $entry['path'] ); + } + } + + parent::tear_down(); + } + + /** + * Creates a directory if it doesn't already exist. + * + * @throws Exception If the path already exists as a file. + * + * @param string $path The path to the directory. + */ + public function create_directory_if_needed( $path ) { + if ( file_exists( $path ) ) { + if ( is_file( $path ) ) { + throw new Exception( "$path already exists as a file." ); + } + + return; + } + + mkdir( $path ); + } + + /** + * Creates a file if it doesn't already exist. + * + * @throws Exception If the path already exists as a directory. + * + * @param string $path The path to the file. + * @param string $contents Optional. The contents of the file. Default empty string. + */ + public function create_file_if_needed( $path, $contents = '' ) { + if ( file_exists( $path ) ) { + if ( is_dir( $path ) ) { + throw new Exception( "$path already exists as a directory." ); + } + + return; + } + + file_put_contents( $path, $contents ); + } + + /** + * Determines whether the operating system is Windows. + * + * @return bool Whether the operating system is Windows. + */ + public static function is_windows() { + return 'WIN' === substr( PHP_OS, 0, 3 ); + } + + /** + * Data provider. + * + * @return array[] + */ + public function data_paths_that_exist() { + return array( + 'a file that exists' => array( + 'path' => 'a_file_that_exists.txt', + ), + 'a directory that exists' => array( + 'path' => '', + ), + ); + } + + /** + * Data provider. + * + * @return array[] + */ + public function data_paths_that_do_not_exist() { + return array( + 'a file that does not exist' => array( + 'path' => 'a_file_that_does_not_exist.txt', + ), + 'a directory that does not exist' => array( + 'path' => 'a_directory_that_does_not_exist', + ), + ); + } +} diff --git a/tests/phpunit/tests/filesystem/wpFilesystemDirect/chdir.php b/tests/phpunit/tests/filesystem/wpFilesystemDirect/chdir.php new file mode 100644 index 0000000000000..cdea47928b2f2 --- /dev/null +++ b/tests/phpunit/tests/filesystem/wpFilesystemDirect/chdir.php @@ -0,0 +1,95 @@ +cwd(); + $path = wp_normalize_path( realpath( self::$file_structure['test_dir']['path'] ) ) . $path; + $chdir_result = self::$filesystem->chdir( $path ); + $cwd_result = self::$filesystem->cwd(); + + // Reset the current working directory. + self::$filesystem->chdir( $original_cwd ); + + $this->assertFalse( + $chdir_result, + 'Changing working directory succeeded.' + ); + + $this->assertSame( + $original_cwd, + $cwd_result, + 'The current working directory was changed.' + ); + } + + /** + * Data provider. + * + * @return array[] + */ + public function data_should_fail_to_change_directory() { + return array( + 'a file that exists' => array( + 'path' => 'a_file_that_exists.txt', + ), + 'a file that does not exist' => array( + 'path' => 'a_file_that_does_not_exist.txt', + ), + 'a directory that does not exist' => array( + 'path' => 'a_directory_that_does_not_exist', + ), + ); + } + + /** + * Tests that `WP_Filesystem_Direct::chdir()` changes to + * an existing directory. + * + * @ticket 57774 + */ + public function test_should_change_directory() { + $original_cwd = self::$filesystem->cwd(); + $path = wp_normalize_path( realpath( self::$file_structure['test_dir']['path'] ) ); + $chdir_result = self::$filesystem->chdir( $path ); + $cwd_result = self::$filesystem->cwd(); + + // Reset the current working directory. + self::$filesystem->chdir( $original_cwd ); + + $this->assertTrue( + $chdir_result, + 'Changing working directory failed.' + ); + + $this->assertSame( + $path, + $cwd_result, + 'The current working directory was incorrect.' + ); + } +} diff --git a/tests/phpunit/tests/filesystem/wpFilesystemDirect/chgrp.php b/tests/phpunit/tests/filesystem/wpFilesystemDirect/chgrp.php new file mode 100644 index 0000000000000..a56e5c5ac2b41 --- /dev/null +++ b/tests/phpunit/tests/filesystem/wpFilesystemDirect/chgrp.php @@ -0,0 +1,32 @@ +assertFalse( self::$filesystem->chgrp( self::$file_structure['test_dir']['path'] . $path, 0 ) ); + } +} diff --git a/tests/phpunit/tests/filesystem/wpFilesystemDirect/chmod.php b/tests/phpunit/tests/filesystem/wpFilesystemDirect/chmod.php new file mode 100644 index 0000000000000..4deb47c4f09fb --- /dev/null +++ b/tests/phpunit/tests/filesystem/wpFilesystemDirect/chmod.php @@ -0,0 +1,77 @@ +assertFalse( self::$filesystem->chmod( $path ) ); + } + + /** + * Tests that `WP_Filesystem_Direct::chmod()` should set + * $mode when it is not passed. + * + * This test runs in a separate process so that it can define + * constants without impacting other tests. + * + * This test does not preserve global state to prevent the exception + * "Serialization of 'Closure' is not allowed." when running in a + * separate process. + * + * @ticket 57774 + * + * @dataProvider data_should_set_mode_when_not_passed + * + * @runInSeparateProcess + * @preserveGlobalState disabled + * + * @param string $path The path. + * @param string $type The type of path. "FILE" for file, "DIR" for directory. + */ + public function test_should_handle_set_mode_when_not_passed( $path, $type ) { + define( 'FS_CHMOD_' . $type, ( 'FILE' === $type ? 0644 : 0755 ) ); + + $this->assertTrue( self::$filesystem->chmod( self::$file_structure['test_dir']['path'] . $path, false ) ); + } + + /** + * Data provider. + * + * @return array[] + */ + public function data_should_set_mode_when_not_passed() { + return array( + 'a file' => array( + 'path' => 'a_file_that_exists.txt', + 'type' => 'FILE', + ), + 'a directory' => array( + 'path' => '', + 'type' => 'DIR', + ), + ); + } +} diff --git a/tests/phpunit/tests/filesystem/wpFilesystemDirect/chown.php b/tests/phpunit/tests/filesystem/wpFilesystemDirect/chown.php new file mode 100644 index 0000000000000..040693b03c54c --- /dev/null +++ b/tests/phpunit/tests/filesystem/wpFilesystemDirect/chown.php @@ -0,0 +1,32 @@ +assertFalse( self::$filesystem->chown( $path, fileowner( __FILE__ ) ) ); + } +} diff --git a/tests/phpunit/tests/filesystem/wpFilesystemDirect/construct.php b/tests/phpunit/tests/filesystem/wpFilesystemDirect/construct.php new file mode 100644 index 0000000000000..e8c475a9ee044 --- /dev/null +++ b/tests/phpunit/tests/filesystem/wpFilesystemDirect/construct.php @@ -0,0 +1,39 @@ +assertSame( + 'direct', + $filesystem->method, + 'The "$method" property is not set to "direct".' + ); + + $this->assertInstanceOf( + 'WP_Error', + $filesystem->errors, + 'The "$errors" property is not set to a WP_Error object.' + ); + } +} diff --git a/tests/phpunit/tests/filesystem/wpFilesystemDirect/copy.php b/tests/phpunit/tests/filesystem/wpFilesystemDirect/copy.php new file mode 100644 index 0000000000000..d0355c20e5662 --- /dev/null +++ b/tests/phpunit/tests/filesystem/wpFilesystemDirect/copy.php @@ -0,0 +1,72 @@ +copy( $source, $destination, true ); + + unlink( $destination ); + + $this->assertTrue( $actual ); + } + + /** + * Tests that `WP_Filesystem_Direct::copy()` does not overwrite + * an existing destination when overwriting is disabled. + * + * @ticket 57774 + */ + public function test_should_not_overwrite_an_existing_file_when_overwriting_is_disabled() { + $source = self::$file_structure['test_dir']['path'] . 'a_file_that_exists.txt'; + $destination = self::$file_structure['test_dir']['path'] . 'a_file_that_exists.dest'; + + if ( ! file_exists( $destination ) ) { + touch( $destination ); + } + + $actual = self::$filesystem->copy( $source, $destination ); + + unlink( $destination ); + + $this->assertFalse( $actual ); + } + + /** + * Tests that `WP_Filesystem_Direct::copy()` does not overwrite an existing + * destination when overwriting is enabled and the source and destination + * are the same. + * + * @ticket 57774 + */ + public function test_should_not_overwrite_when_overwriting_is_enabled_and_source_and_destination_are_the_same() { + $source = self::$file_structure['test_dir']['path'] . 'a_file_that_exists.txt'; + $this->assertFalse( self::$filesystem->copy( $source, $source, true ) ); + } +} diff --git a/tests/phpunit/tests/filesystem/wpFilesystemDirect/cwd.php b/tests/phpunit/tests/filesystem/wpFilesystemDirect/cwd.php new file mode 100644 index 0000000000000..c4ce9617314cb --- /dev/null +++ b/tests/phpunit/tests/filesystem/wpFilesystemDirect/cwd.php @@ -0,0 +1,26 @@ +assertSame( wp_normalize_path( dirname( ABSPATH ) ), wp_normalize_path( self::$filesystem->cwd() ) ); + } +} diff --git a/tests/phpunit/tests/filesystem/wpFilesystemDirect/delete.php b/tests/phpunit/tests/filesystem/wpFilesystemDirect/delete.php new file mode 100644 index 0000000000000..4afe54890a5f3 --- /dev/null +++ b/tests/phpunit/tests/filesystem/wpFilesystemDirect/delete.php @@ -0,0 +1,204 @@ +assertFalse( self::$filesystem->delete( '' ) ); + } + + /** + * Tests that `WP_Filesystem_Direct::delete()` deletes an empty directory. + * + * @ticket 57774 + */ + public function test_should_delete_an_empty_directory() { + $dir = self::$file_structure['test_dir']['path'] . 'directory-to-delete'; + + $this->assertTrue( + mkdir( $dir ), + 'The directory was not created.' + ); + + $this->assertTrue( + self::$filesystem->delete( $dir ), + 'The directory was not deleted.' + ); + } + + /** + * Tests that `WP_Filesystem_Direct::delete()` deletes a directory with contents. + * + * @ticket 57774 + */ + public function test_should_delete_a_directory_with_contents() { + $this->assertTrue( + self::$filesystem->delete( self::$file_structure['test_dir']['path'], true ), + 'Directory deletion failed.' + ); + + $this->assertDirectoryDoesNotExist( + self::$file_structure['test_dir']['path'], + 'The directory was not deleted.' + ); + } + + /** + * Tests that `WP_Filesystem_Direct::delete()` deletes a file. + * + * @ticket 57774 + * + * @dataProvider data_should_delete_a_file + * + * @param string $key The key for the file in `self::$filesystem_structure`. + */ + public function test_should_delete_a_file( $file ) { + $file = self::$file_structure[ $file ]['path'] . $file; + + $this->assertTrue( self::$filesystem->delete( $file ), 'File deletion failed.' ); + $this->assertFileDoesNotExist( $file, 'The file was not deleted.' ); + } + + /** + * Data provider. + * + * @return array[] + */ + public function data_should_delete_a_file() { + return array( + 'A visible file' => array( + 'key' => 'visible_file', + ), + 'A hidden file' => array( + 'key' => 'hidden_file', + ), + ); + } + + /** + * Tests that `WP_Filesystem_Direct::delete()` + * returns true when deleting a path that does not exist. + * + * @ticket 57774 + * + * @dataProvider data_paths_that_do_not_exist + * + * @param string $path The path. + */ + public function test_should_return_true_when_deleting_path_that_does_not_exist( $path ) { + $path = self::$file_structure['test_dir']['path'] . $path; + + /* + * Verify that the path doesn't exist before testing. + * + * assertFileDoesNotExist() uses file_exists(), which returns the same result for both + * files and directories. + * assertDirectoryDoesNotExist() uses is_dir(), which tests strictly for a directory. + * + * For more useful debugging in the event of a failure, test for a directory first. + */ + $this->assertDirectoryDoesNotExist( $path, "$path already existed as a directory before testing." ); + $this->assertFileDoesNotExist( $path, "$path already existed as a file before testing." ); + + $this->assertTrue( self::$filesystem->delete( $path ), 'Attempting to delete a non-existent path should return true.' ); + } + + /** + * Tests that `WP_Filesystem_Direct::delete()` + * returns false when a directory's contents cannot be deleted. + * + * @ticket 57774 + */ + public function test_should_return_false_when_contents_cannot_be_deleted() { + global $wp_filesystem; + + $wp_filesystem = new WP_Filesystem_Direct( array() ); + + $path = self::$file_structure['test_dir']['path'] . 'dir-to-delete/'; + + if ( ! is_dir( $path ) ) { + mkdir( $path ); + } + + // Set up mock filesystem. + $filesystem_mock = $this->getMockBuilder( 'WP_Filesystem_Direct' ) + ->setConstructorArgs( array( null ) ) + // Note: setMethods() is deprecated in PHPUnit 9, but still supported. + ->setMethods( array( 'dirlist' ) ) + ->getMock(); + + $filesystem_mock->expects( $this->once() ) + ->method( 'dirlist' ) + ->willReturn( + array( 'a_file_that_does_not_exist.txt' => array( 'type' => 'f' ) ) + ); + + $wp_filesystem_backup = $wp_filesystem; + $wp_filesystem = $filesystem_mock; + + $actual = $filesystem_mock->delete( $path, true ); + + if ( $actual ) { + rmdir( $path ); + } + + $wp_filesystem = $wp_filesystem_backup; + + $this->assertFalse( $actual ); + } + + /** + * Tests that `WP_Filesystem_Direct::delete()` + * returns false when the path is not a file or directory, but exists. + * + * @ticket 57774 + */ + public function test_should_return_false_when_path_exists_but_is_not_a_file_or_directory() { + global $wp_filesystem; + + $wp_filesystem = new WP_Filesystem_Direct( array() ); + + // Set up mock filesystem. + $filesystem_mock = $this->getMockBuilder( 'WP_Filesystem_Direct' ) + ->setConstructorArgs( array( null ) ) + // Note: setMethods() is deprecated in PHPUnit 9, but still supported. + ->setMethods( array( 'is_file', 'dirlist' ) ) + ->getMock(); + + $filesystem_mock->expects( $this->once() ) + ->method( 'is_file' ) + ->willReturn( false ); + + $filesystem_mock->expects( $this->once() ) + ->method( 'dirlist' ) + ->willReturn( false ); + + $wp_filesystem_backup = $wp_filesystem; + $wp_filesystem = $filesystem_mock; + + $actual = $filesystem_mock->delete( self::$file_structure['subdir']['path'], true ); + + $wp_filesystem = $wp_filesystem_backup; + + $this->assertFalse( $actual ); + } +} diff --git a/tests/phpunit/tests/filesystem/wpFilesystemDirect/dirlist.php b/tests/phpunit/tests/filesystem/wpFilesystemDirect/dirlist.php new file mode 100644 index 0000000000000..04dab2a48a612 --- /dev/null +++ b/tests/phpunit/tests/filesystem/wpFilesystemDirect/dirlist.php @@ -0,0 +1,130 @@ +dirlist( self::$file_structure['test_dir']['path'] . $path, $include_hidden, $recursive ); + + if ( is_array( $expected ) ) { + $this->assertSameSets( + $expected, + array_keys( $actual ), + 'The array keys do not match.' + ); + } else { + $this->assertFalse( + $actual, + '`WP_Filesystem_Direct::dirlist()` did not return false.' + ); + } + } + + /** + * Data provider. + * + * @return array[] + */ + public function data_should_get_dirlist() { + return array( + 'a directory that exists excluding hidden files' => array( + 'path' => '', + 'include_hidden' => false, + 'recursive' => false, + 'expected' => array( + 'a_file_that_exists.txt', + 'subdir', + ), + ), + 'a directory that exists including hidden files' => array( + 'path' => '', + 'include_hidden' => true, + 'recursive' => false, + 'expected' => array( + 'a_file_that_exists.txt', + '.a_hidden_file', + 'subdir', + ), + ), + 'a directory that does not exist' => array( + 'path' => 'a_directory_that_does_not_exist/', + 'include_hidden' => true, + 'recursive' => false, + 'expected' => false, + ), + 'a file that exists' => array( + 'path' => 'a_file_that_exists.txt', + 'include_hidden' => true, + 'recursive' => false, + 'expected' => array( + 'a_file_that_exists.txt', + ), + ), + 'a file that does not exist' => array( + 'path' => 'a_file_that_does_not_exist.txt', + 'include_hidden' => true, + 'recursive' => false, + 'expected' => false, + ), + ); + } + + /** + * Tests that `WP_Filesystem_Direct::dirlist()` recurses + * into a subdirectory. + * + * @ticket 57774 + */ + public function test_should_recurse_into_subdirectory() { + $actual = self::$filesystem->dirlist( self::$file_structure['test_dir']['path'], true, true ); + + $this->assertIsArray( $actual, 'Did not return an array.' ); + $this->assertArrayHasKey( 'subdir', $actual, 'The subdirectory was not detected.' ); + $this->assertArrayHasKey( 'files', $actual['subdir'], 'The subdirectory does not have a "files" key.' ); + $this->assertNotEmpty( $actual['subdir']['files'], "The subdirectory's contents were not retrieved." ); + $this->assertArrayHasKey( 'subfile.txt', $actual['subdir']['files'], 'The subfile was not detected.' ); + } + + /** + * Tests that `WP_Filesystem_Direct::dirlist()` should not recurse + * into a subdirectory. + * + * @ticket 57774 + */ + public function test_should_not_recurse_into_subdirectory() { + + $actual = self::$filesystem->dirlist( self::$file_structure['test_dir']['path'], true, false ); + + $this->assertIsArray( $actual, 'Did not return an array.' ); + $this->assertArrayHasKey( 'subdir', $actual, 'The subdirectory was not detected.' ); + $this->assertArrayHasKey( 'files', $actual['subdir'], 'The "files" key was not set.' ); + $this->assertIsArray( $actual['subdir']['files'], 'The "files" key was not set to an array.' ); + $this->assertEmpty( $actual['subdir']['files'], 'The "files" array was not empty.' ); + } +} diff --git a/tests/phpunit/tests/filesystem/wpFilesystemDirect/exists.php b/tests/phpunit/tests/filesystem/wpFilesystemDirect/exists.php new file mode 100644 index 0000000000000..11eb32621da6a --- /dev/null +++ b/tests/phpunit/tests/filesystem/wpFilesystemDirect/exists.php @@ -0,0 +1,44 @@ +assertTrue( self::$filesystem->exists( self::$file_structure['test_dir']['path'] . $path ) ); + } + + /** + * Tests that `WP_Filesystem_Direct::exists()` determines that + * a path does not exist. + * + * @ticket 57774 + * + * @dataProvider data_paths_that_do_not_exist + * + * @param string $path The path to check. + */ + public function test_should_determine_that_a_path_does_not_exist( $path ) { + $this->assertFalse( self::$filesystem->exists( self::$file_structure['test_dir']['path'] . $path ) ); + } +} diff --git a/tests/phpunit/tests/filesystem/wpFilesystemDirect/getContents.php b/tests/phpunit/tests/filesystem/wpFilesystemDirect/getContents.php new file mode 100644 index 0000000000000..fed713239a48e --- /dev/null +++ b/tests/phpunit/tests/filesystem/wpFilesystemDirect/getContents.php @@ -0,0 +1,47 @@ +assertSame( + "Contents of a file.\r\nNext line of a file.\r\n", + self::$filesystem->get_contents( $file ) + ); + } + + /** + * Tests that `WP_Filesystem_Direct::get_contents()` + * returns false for a file that does not exist. + * + * @ticket 57774 + * + * @dataProvider data_paths_that_do_not_exist + * + * @param string $path The path. + */ + public function test_should_return_false( $path ) { + $this->assertFalse( self::$filesystem->get_contents( self::$file_structure['test_dir']['path'] . $path ) ); + } +} diff --git a/tests/phpunit/tests/filesystem/wpFilesystemDirect/getContentsArray.php b/tests/phpunit/tests/filesystem/wpFilesystemDirect/getContentsArray.php new file mode 100644 index 0000000000000..0e09822c07328 --- /dev/null +++ b/tests/phpunit/tests/filesystem/wpFilesystemDirect/getContentsArray.php @@ -0,0 +1,57 @@ +get_contents_array( $file ); + + $this->assertIsArray( + $contents, + 'The file contents are not an array.' + ); + + $this->assertSameSetsWithIndex( + array( + "Contents of a file.\r\n", + "Next line of a file.\r\n", + ), + $contents, + 'The file contents do not match the expected value.' + ); + } + + /** + * Tests that `WP_Filesystem_Direct::get_contents_array()` + * returns false for a path that does not exist. + * + * @ticket 57774 + * + * @dataProvider data_paths_that_do_not_exist + * + * @param string $path The path. + */ + public function test_should_return_false( $path ) { + $this->assertFalse( self::$filesystem->get_contents_array( self::$file_structure['test_dir']['path'] . $path ) ); + } +} diff --git a/tests/phpunit/tests/filesystem/wpFilesystemDirect/getchmod.php b/tests/phpunit/tests/filesystem/wpFilesystemDirect/getchmod.php new file mode 100644 index 0000000000000..2b0c2ce327afc --- /dev/null +++ b/tests/phpunit/tests/filesystem/wpFilesystemDirect/getchmod.php @@ -0,0 +1,48 @@ +getchmod( self::$file_structure['test_dir']['path'] . $path ); + $this->assertNotSame( '', $actual ); + } + + /** + * Tests that `WP_Filesystem_Direct::getchmod()` returns + * the permissions for a path that does not exist. + * + * @dataProvider data_paths_that_do_not_exist + * + * @ticket 57774 + * + * @param string $path The path. + */ + public function test_should_get_chmod_for_a_path_that_does_not_exist( $path ) { + $actual = self::$filesystem->getchmod( self::$file_structure['test_dir']['path'] . $path ); + $this->assertNotSame( '', $actual ); + } +} diff --git a/tests/phpunit/tests/filesystem/wpFilesystemDirect/isDir.php b/tests/phpunit/tests/filesystem/wpFilesystemDirect/isDir.php new file mode 100644 index 0000000000000..1a367851f6a78 --- /dev/null +++ b/tests/phpunit/tests/filesystem/wpFilesystemDirect/isDir.php @@ -0,0 +1,63 @@ +assertTrue( self::$filesystem->is_dir( self::$file_structure['test_dir']['path'] ) ); + } + + /** + * Tests that `WP_Filesystem_Direct::is_directory()` determines that + * a path is not a directory. + * + * @ticket 57774 + * + * @dataProvider data_should_determine_that_a_path_is_not_a_directory + * + * @param string $path The path to check. + * @param string $type The type of resource. Accepts 'f' or 'd'. + * Used to invert $expected due to data provider setup. + */ + public function test_should_determine_that_a_path_is_not_a_directory( $path ) { + $this->assertFalse( self::$filesystem->is_dir( self::$file_structure['test_dir']['path'] . $path ) ); + } + + /** + * Data provider. + * + * @return array[] + */ + public function data_should_determine_that_a_path_is_not_a_directory() { + return array( + 'a file that exists' => array( + 'path' => 'a_file_that_exists.txt', + ), + 'a file that does not exist' => array( + 'path' => 'a_file_that_does_not_exist.txt', + ), + 'a directory that does not exist' => array( + 'path' => 'a_directory_that_does_not_exist', + ), + ); + } +} diff --git a/tests/phpunit/tests/filesystem/wpFilesystemDirect/isFile.php b/tests/phpunit/tests/filesystem/wpFilesystemDirect/isFile.php new file mode 100644 index 0000000000000..e0471f309b62f --- /dev/null +++ b/tests/phpunit/tests/filesystem/wpFilesystemDirect/isFile.php @@ -0,0 +1,61 @@ +assertTrue( self::$filesystem->is_file( self::$file_structure['test_dir']['path'] . 'a_file_that_exists.txt' ) ); + } + + /** + * Tests that `WP_Filesystem_Direct::is_file()` determies that + * a path is not a file. + * + * @ticket 57774 + * + * @dataProvider data_should_determine_if_a_path_is_not_a_file + * + * @param string $path The path to check. + */ + public function test_should_determine_that_a_path_is_not_a_file( $path ) { + $this->assertFalse( self::$filesystem->is_file( self::$file_structure['test_dir']['path'] . $path ) ); + } + + /** + * Data provider. + * + * @return array[] + */ + public function data_should_determine_if_a_path_is_not_a_file() { + return array( + 'a file that does not exist' => array( + 'path' => 'a_file_that_does_not_exist.txt', + ), + 'a directory that exists' => array( + 'path' => '', + ), + 'a directory that does not exist' => array( + 'path' => 'a_directory_that_does_not_exist', + ), + ); + } +} diff --git a/tests/phpunit/tests/filesystem/wpFilesystemDirect/isReadable.php b/tests/phpunit/tests/filesystem/wpFilesystemDirect/isReadable.php new file mode 100644 index 0000000000000..9ccde92c709ac --- /dev/null +++ b/tests/phpunit/tests/filesystem/wpFilesystemDirect/isReadable.php @@ -0,0 +1,46 @@ +assertTrue( self::$filesystem->is_readable( self::$file_structure['test_dir']['path'] . $path ) ); + } + + /** + * Tests that `WP_Filesystem_Direct::is_readable()` determines that + * a path is not readable. + * + * @ticket 57774 + * + * @dataProvider data_paths_that_do_not_exist + * + * @param string $path The path. + */ + public function test_should_determine_that_a_path_is_not_readable( $path ) { + $this->assertFalse( self::$filesystem->is_readable( self::$file_structure['test_dir']['path'] . $path ) ); + } +} diff --git a/tests/phpunit/tests/filesystem/wpFilesystemDirect/isWritable.php b/tests/phpunit/tests/filesystem/wpFilesystemDirect/isWritable.php new file mode 100644 index 0000000000000..f3a1e0ea757de --- /dev/null +++ b/tests/phpunit/tests/filesystem/wpFilesystemDirect/isWritable.php @@ -0,0 +1,46 @@ +assertTrue( self::$filesystem->is_writable( self::$file_structure['test_dir']['path'] . $path ) ); + } + + /** + * Tests that `WP_Filesystem_Direct::is_writable()` determines that + * a path is not writable. + * + * @ticket 57774 + * + * @dataProvider data_paths_that_do_not_exist + * + * @param string $path The path. + */ + public function test_should_determine_that_a_path_is_not_writable( $path ) { + $this->assertFalse( self::$filesystem->is_writable( self::$file_structure['test_dir']['path'] . $path ) ); + } +} diff --git a/tests/phpunit/tests/filesystem/wpFilesystemDirect/mkdir.php b/tests/phpunit/tests/filesystem/wpFilesystemDirect/mkdir.php new file mode 100644 index 0000000000000..53fc1575f32c7 --- /dev/null +++ b/tests/phpunit/tests/filesystem/wpFilesystemDirect/mkdir.php @@ -0,0 +1,211 @@ +mkdir( $path ); + + if ( $path !== self::$file_structure['test_dir']['path'] && is_dir( $path ) ) { + rmdir( $path ); + } + + $this->assertTrue( $actual ); + } + + /** + * Data provider. + * + * @return array[] + */ + public function data_should_create_directory() { + return array( + 'no trailing slash' => array( + 'path' => 'TEST_DIR/directory-to-create', + ), + 'a trailing slash' => array( + 'path' => 'TEST_DIR/directory-to-create/', + ), + ); + } + + /** + * Tests that `WP_Filesystem_Direct::mkdir()` does not create a directory. + * + * This test runs in a separate process so that it can define + * constants without impacting other tests. + * + * This test does not preserve global state to prevent the exception + * "Serialization of 'Closure' is not allowed." when running in a + * separate process. + * + * @ticket 57774 + * + * @dataProvider data_should_not_create_directory + * + * @runInSeparateProcess + * @preserveGlobalState disabled + * + * @param mixed $path The path to create. + */ + public function test_should_not_create_directory( $path ) { + define( 'FS_CHMOD_DIR', 0755 ); + + $path = str_replace( 'TEST_DIR', self::$file_structure['test_dir']['path'], $path ); + $actual = self::$filesystem->mkdir( $path ); + + if ( $path !== self::$file_structure['test_dir']['path'] && is_dir( $path ) ) { + rmdir( $path ); + } + + $this->assertFalse( $actual ); + } + + /** + * Data provider. + * + * @return array[] + */ + public function data_should_not_create_directory() { + return array( + 'empty path' => array( + 'path' => '', + ), + 'a path that exists' => array( + 'path' => 'TEST_DIR', + ), + ); + } + + /** + * Tests that `WP_Filesystem_Direct::mkdir()` sets chmod. + * + * @ticket 57774 + */ + public function test_should_set_chmod() { + $path = self::$file_structure['test_dir']['path'] . 'directory-to-create'; + + $created = self::$filesystem->mkdir( $path, 0644 ); + $chmod = substr( sprintf( '%o', fileperms( $path ) ), -4 ); + + if ( $path !== self::$file_structure['test_dir']['path'] && is_dir( $path ) ) { + rmdir( $path ); + } + + $expected_permissions = $this->is_windows() ? '0777' : '0644'; + + $this->assertTrue( $created, 'The directory was not created.' ); + $this->assertSame( $expected_permissions, $chmod, 'The permissions are incorrect.' ); + } + + /** + * Tests that `WP_Filesystem_Direct::mkdir()` sets the owner. + * + * This test runs in a separate process so that it can define + * constants without impacting other tests. + * + * This test does not preserve global state to prevent the exception + * "Serialization of 'Closure' is not allowed." when running in a + * separate process. + * + * @ticket 57774 + * + * @runInSeparateProcess + * @preserveGlobalState disabled + */ + public function test_should_set_owner() { + define( 'FS_CHMOD_DIR', 0755 ); + + $path = self::$file_structure['test_dir']['path'] . 'directory-to-create'; + + // Get the default owner. + self::$filesystem->mkdir( $path ); + $original_owner = fileowner( $path ); + + rmdir( $path ); + + $expected_group = $this->is_windows() ? $original_owner : $original_owner + 1; + $created = self::$filesystem->mkdir( $path, 0755, $expected_group ); + $owner = fileowner( $path ); + + if ( $path !== self::$file_structure['test_dir']['path'] && is_dir( $path ) ) { + rmdir( $path ); + } + + $this->assertTrue( $created, 'The directory was not created.' ); + $this->assertSame( $expected_group, $owner, 'The owner is incorrect.' ); + } + + /** + * Tests that `WP_Filesystem_Direct::mkdir()` sets the group. + * + * This test runs in a separate process so that it can define + * constants without impacting other tests. + * + * This test does not preserve global state to prevent the exception + * "Serialization of 'Closure' is not allowed." when running in a + * separate process. + * + * @ticket 57774 + * + * @runInSeparateProcess + * @preserveGlobalState disabled + */ + public function test_should_set_group() { + define( 'FS_CHMOD_DIR', 0755 ); + + $path = self::$file_structure['test_dir']['path'] . 'directory-to-create'; + + // Get the default group. + self::$filesystem->mkdir( $path ); + $original_group = filegroup( $path ); + + rmdir( $path ); + + $expected_group = $this->is_windows() ? $original_group : $original_group + 1; + $created = self::$filesystem->mkdir( $path, 0755, false, $expected_group ); + $group = filegroup( $path ); + + if ( $path !== self::$file_structure['test_dir']['path'] && is_dir( $path ) ) { + rmdir( $path ); + } + + $this->assertTrue( $created, 'The directory was not created.' ); + $this->assertSame( $expected_group, $group, 'The group is incorrect.' ); + } +} diff --git a/tests/phpunit/tests/filesystem/wpFilesystemDirect/move.php b/tests/phpunit/tests/filesystem/wpFilesystemDirect/move.php new file mode 100644 index 0000000000000..a6822a90f418b --- /dev/null +++ b/tests/phpunit/tests/filesystem/wpFilesystemDirect/move.php @@ -0,0 +1,150 @@ +move( $source, $destination, true ); + + rename( $destination, $source ); + + $this->assertTrue( $actual ); + } + + /** + * Tests that `WP_Filesystem_Direct::move()` does not overwrite + * an existing destination when overwriting is disabled. + * + * @ticket 57774 + */ + public function test_should_not_overwrite_an_existing_file_when_overwriting_is_disabled() { + $source = self::$file_structure['visible_file']['path']; + $destination = self::$file_structure['subfile']['path']; + $actual = self::$filesystem->move( $source, $destination ); + + $this->assertFalse( $actual ); + } + + /** + * Tests that `WP_Filesystem_Direct::move()` moves directories. + * + * @ticket 57774 + */ + public function test_should_move_directories() { + $source = self::$file_structure['test_dir']['path']; + $destination = untrailingslashit( self::$file_structure['test_dir']['path'] ) . '-dest'; + $actual = self::$filesystem->move( $source, $destination, true ); + + $source_exists = is_dir( $source ); + $destination_exists = is_dir( $destination ); + + if ( $actual ) { + $restored = rename( $destination, $source ); + } + + $this->assertTrue( $actual, 'The directory was not moved.' ); + $this->assertFalse( $source_exists, 'The source still exists.' ); + $this->assertTrue( $destination_exists, 'The destination does not exist.' ); + $this->assertTrue( $restored, 'The test assets were not cleaned up after the test.' ); + } + + /** + * Tests that `WP_Filesystem_Direct::move()` returns false for an + * invalid destination. + * + * @ticket 57774 + */ + public function test_should_return_false_for_invalid_destination() { + $source = self::$file_structure['test_dir']['path']; + $destination = 'http://example.org'; + + $this->assertFalse( self::$filesystem->move( $source, $destination, true ) ); + } + + /** + * Tests that `WP_Filesystem_Direct::move()` returns false for an + * invalid destination. + * + * @ticket 57774 + */ + public function test_should_return_false_when_overwriting_is_enabled_the_destination_exists_but_cannot_be_deleted() { + global $wp_filesystem; + $wpfilesystem_backup = $wp_filesystem; + + // Force failure conditions. + $filesystem_mock = $this->getMockBuilder( 'WP_Filesystem_Direct' ) + // Note: setMethods() is deprecated in PHPUnit 9, but still supported. + ->setMethods( array( 'exists', 'delete' ) ) + ->setConstructorArgs( array( null ) ) + ->getMock(); + + $filesystem_mock->expects( $this->once() )->method( 'exists' )->willReturn( true ); + $filesystem_mock->expects( $this->once() )->method( 'delete' )->willReturn( false ); + $wp_filesystem = $filesystem_mock; + + $actual = $wp_filesystem->move( + self::$file_structure['test_dir']['path'], + self::$file_structure['subdir']['path'], + true + ); + + // Restore the filesystem. + $wp_filesystem = $wpfilesystem_backup; + + $this->assertFalse( $actual ); + } + + /** + * Tests that `WP_Filesystem_Direct::move()` falls back to a single + * file copy when the source and destination do not exist. + * + * @ticket 57774 + */ + public function test_should_fall_back_to_single_file_copy_when_source_and_destination_do_not_exist() { + global $wp_filesystem; + + $source = self::$file_structure['test_dir']['path'] . 'a_file_that_does_not_exist.txt'; + $destination = self::$file_structure['test_dir']['path'] . 'another_file_that_does_not_exist.txt'; + + // Set up mock filesystem. + $filesystem_mock = $this->getMockBuilder( 'WP_Filesystem_Direct' ) + ->setConstructorArgs( array( null ) ) + // Note: setMethods() is deprecated in PHPUnit 9, but still supported. + ->setMethods( array( 'exists', 'delete', 'is_file', 'copy' ) ) + ->getMock(); + + $filesystem_mock->expects( $this->exactly( 2 ) )->method( 'exists' )->willReturn( array( true, true ) ); + $filesystem_mock->expects( $this->exactly( 2 ) )->method( 'delete' )->willReturn( array( true, false ) ); + $filesystem_mock->expects( $this->once() )->method( 'is_file' )->willReturn( true ); + $filesystem_mock->expects( $this->once() )->method( 'copy' )->willReturn( true ); + + $wp_filesystem_backup = $wp_filesystem; + $wp_filesystem = $filesystem_mock; + + $actual = $filesystem_mock->move( $source, $destination, true ); + $wp_filesystem = $wp_filesystem_backup; + + $this->assertTrue( $actual ); + } +} diff --git a/tests/phpunit/tests/filesystem/wpFilesystemDirect/mtime.php b/tests/phpunit/tests/filesystem/wpFilesystemDirect/mtime.php new file mode 100644 index 0000000000000..57d6f92bbc6f6 --- /dev/null +++ b/tests/phpunit/tests/filesystem/wpFilesystemDirect/mtime.php @@ -0,0 +1,68 @@ +mtime( self::$file_structure['test_dir']['path'] . $path ); + $has_mtime = false !== $result; + + $this->assertTrue( + $has_mtime, + 'The mtime was not determined.' + ); + + $this->assertIsInt( + $result, + 'The mtime is not an integer.' + ); + } + + /** + * Tests that `WP_Filesystem_Direct::mtime()` does not determine + * the mtime of a path. + * + * @ticket 57774 + * + * @dataProvider data_paths_that_do_not_exist + * + * @param string $path The path. + */ + public function test_should_not_determine_file_modified_time( $path ) { + $result = self::$filesystem->mtime( self::$file_structure['test_dir']['path'] . $path ); + $has_mtime = false !== $result; + + $this->assertFalse( + $has_mtime, + 'An mtime was determined.' + ); + + $this->assertIsNotInt( + $result, + 'The mtime is an integer.' + ); + } +} diff --git a/tests/phpunit/tests/filesystem/wpFilesystemDirect/putContents.php b/tests/phpunit/tests/filesystem/wpFilesystemDirect/putContents.php new file mode 100644 index 0000000000000..8eabfffdb2f6a --- /dev/null +++ b/tests/phpunit/tests/filesystem/wpFilesystemDirect/putContents.php @@ -0,0 +1,42 @@ +assertFalse( self::$filesystem->put_contents( self::$file_structure['test_dir']['path'], 'New content.' ) ); + } + + /** + * Tests that `WP_Filesystem_Direct::put_contents()` inserts + * content into the provided file. + * + * @ticket 57774 + */ + public function test_should_insert_contents_into_file() { + $file = self::$file_structure['test_dir']['path'] . 'file-to-create.txt'; + $actual = self::$filesystem->put_contents( $file, 'New content.', 0644 ); + unlink( $file ); + + $this->assertTrue( $actual, 'The contents were not inserted.' ); + } +} diff --git a/tests/phpunit/tests/filesystem/wpFilesystemDirect/rmdir.php b/tests/phpunit/tests/filesystem/wpFilesystemDirect/rmdir.php new file mode 100644 index 0000000000000..9186fcf2e03ce --- /dev/null +++ b/tests/phpunit/tests/filesystem/wpFilesystemDirect/rmdir.php @@ -0,0 +1,200 @@ +assertFalse( self::$filesystem->rmdir( '' ) ); + } + + /** + * Tests that `WP_Filesystem_Direct::rmdir()` deletes an empty directory. + * + * @ticket 57774 + */ + public function test_should_delete_an_empty_directory() { + $dir = self::$file_structure['test_dir']['path'] . 'directory-to-delete/'; + + if ( ! is_dir( $dir ) ) { + mkdir( $dir ); + } + + $actual = self::$filesystem->rmdir( $dir ); + + if ( ! $actual ) { + rmdir( $dir ); + } + + $this->assertTrue( $actual, 'The directory was not deleted.' ); + } + + /** + * Tests that `WP_Filesystem_Direct::rmdir()` recursively deletes + * a directory with contents. + * + * @ticket 57774 + */ + public function test_should_recursively_delete_a_directory() { + $dir = self::$file_structure['test_dir']['path'] . 'directory-to-delete/'; + $file = $dir . 'file-to-delete.txt'; + $subdir = $dir . 'subdirectory-to-delete/'; + $subfile = $subdir . 'subfile-to-delete.txt'; + + mkdir( $dir, 0755 ); + mkdir( $subdir, 0755 ); + touch( $file, 0644 ); + touch( $subfile, 0644 ); + + $actual = self::$filesystem->rmdir( self::$file_structure['test_dir']['path'], true ); + + if ( ! $actual ) { + unlink( $file ); + unlink( $subfile ); + rmdir( $subdir ); + rmdir( $dir ); + } + + $this->assertTrue( $actual, 'The directory was deleted.' ); + } + + /** + * Tests that `WP_Filesystem_Direct::rmdir()` deletes a file. + * + * @ticket 57774 + */ + public function test_should_delete_a_file() { + $file = self::$file_structure['test_dir']['path'] . 'file-to-delete.txt'; + + touch( $file ); + + $actual = self::$filesystem->rmdir( $file ); + + if ( ! $actual ) { + unlink( $file ); + } + + $this->assertTrue( $actual, 'The directory was not deleted.' ); + } + + /** + * Tests that `WP_Filesystem_Direct::rmdir()` + * returns true when deleting a path that does not exist. + * + * @ticket 57774 + * + * @dataProvider data_paths_that_do_not_exist + * + * @param string $path The path. + */ + public function test_should_return_true_when_deleting_path_that_does_not_exist( $path ) { + if ( + '' === $path + || str_starts_with( $path, '.' ) + || str_starts_with( $path, '/' ) + ) { + $this->markTestSkipped( 'Dangerous delete path.' ); + } + + $this->assertTrue( self::$filesystem->rmdir( self::$file_structure['test_dir']['path'] . $path ) ); + } + + /** + * Tests that `WP_Filesystem_Direct::rmdir()` + * returns false when a directory's contents cannot be deleted. + * + * @ticket 57774 + */ + public function test_should_return_false_when_contents_cannot_be_deleted() { + + global $wp_filesystem; + + $wp_filesystem = new WP_Filesystem_Direct( array() ); + + $path = self::$file_structure['test_dir']['path'] . 'dir-to-delete/'; + + if ( ! is_dir( $path ) ) { + mkdir( $path ); + } + + // Set up mock filesystem. + $filesystem_mock = $this->getMockBuilder( 'WP_Filesystem_Direct' ) + ->setConstructorArgs( array( null ) ) + // Note: setMethods() is deprecated in PHPUnit 9, but still supported. + ->setMethods( array( 'dirlist' ) ) + ->getMock(); + + $filesystem_mock->expects( $this->once() ) + ->method( 'dirlist' ) + ->willReturn( + array( 'a_file_that_does_not_exist.txt' => array( 'type' => 'f' ) ) + ); + + $wp_filesystem_backup = $wp_filesystem; + $wp_filesystem = $filesystem_mock; + + $actual = $filesystem_mock->rmdir( $path, true ); + + if ( $actual ) { + rmdir( $path ); + } + + $wp_filesystem = $wp_filesystem_backup; + + $this->assertFalse( $actual ); + } + + /** + * Tests that `WP_Filesystem_Direct::rmdir()` + * returns false when the path is not a file or directory, but exists. + * + * @ticket 57774 + */ + public function test_should_return_false_when_path_exists_but_is_not_a_file_or_directory() { + global $wp_filesystem; + + $wp_filesystem = new WP_Filesystem_Direct( array() ); + + // Set up mock filesystem. + $filesystem_mock = $this->getMockBuilder( 'WP_Filesystem_Direct' ) + ->setConstructorArgs( array( null ) ) + // Note: setMethods() is deprecated in PHPUnit 9, but still supported. + ->setMethods( array( 'is_file', 'dirlist' ) ) + ->getMock(); + + $filesystem_mock->expects( $this->once() ) + ->method( 'is_file' ) + ->willReturn( false ); + + $filesystem_mock->expects( $this->once() ) + ->method( 'dirlist' ) + ->willReturn( false ); + + $wp_filesystem_backup = $wp_filesystem; + $wp_filesystem = $filesystem_mock; + + $actual = $filesystem_mock->rmdir( self::$file_structure['subdir']['path'], true ); + + $wp_filesystem = $wp_filesystem_backup; + + $this->assertFalse( $actual ); + } +} diff --git a/tests/phpunit/tests/filesystem/wpFilesystemDirect/size.php b/tests/phpunit/tests/filesystem/wpFilesystemDirect/size.php new file mode 100644 index 0000000000000..8870b8ac8cdec --- /dev/null +++ b/tests/phpunit/tests/filesystem/wpFilesystemDirect/size.php @@ -0,0 +1,63 @@ +size( self::$file_structure['test_dir']['path'] . $path ); + $has_filesize = false !== $result; + + $this->assertTrue( + $has_filesize, + 'The file size was not determined.' + ); + + $this->assertIsInt( + $result, + 'The file size is not an integer.' + ); + } + + /** + * Tests that `WP_Filesystem_Direct::size()` does not determine + * the filesize of a path that does not exist. + * + * @ticket 57774 + * + * @dataProvider data_paths_that_do_not_exist + * + * @param string $path The path. + */ + public function test_should_not_determine_file_size( $path ) { + $result = self::$filesystem->size( self::$file_structure['test_dir']['path'] . $path ); + $has_filesize = false !== $result; + + $this->assertFalse( + $has_filesize, + 'A file size was determined.' + ); + } +} diff --git a/tests/phpunit/tests/filesystem/wpFilesystemDirect/touch.php b/tests/phpunit/tests/filesystem/wpFilesystemDirect/touch.php new file mode 100644 index 0000000000000..6fc494479c61f --- /dev/null +++ b/tests/phpunit/tests/filesystem/wpFilesystemDirect/touch.php @@ -0,0 +1,93 @@ +touch( $file, $mtime, $atime ); + + $actual_atime = fileatime( $file ); + $actual_exists = file_exists( $file ); + $actual_mtime = filemtime( $file ); + + if ( $actual_exists ) { + unlink( $file ); + } + + $this->assertTrue( $result, 'WP_Filesystem_Direct::touch() did not return true.' ); + $this->assertTrue( $actual_exists, 'The file does not exist.' ); + $this->assertSame( $actual_atime, $expected_atime, 'The file does not have the expected atime.' ); + $this->assertSame( $actual_mtime, $expected_mtime, 'The file does not have the expected mtime.' ); + } + + /** + * Data provider. + * + * @return array[] + */ + public function data_should_create_file() { + return array( + 'default mtime or atime' => array( + 'file' => 'TEST_DATA/file-to-create.txt', + 'mtime' => 0, + 'atime' => 0, + ), + 'set mtime and default atime' => array( + 'file' => 'TEST_DATA/file-to-create.txt', + 'mtime' => 'time plus one minute', + 'atime' => 'time', + ), + 'default mtime and set atime' => array( + 'file' => 'TEST_DATA/file-to-create.txt', + 'mtime' => 'time', + 'atime' => 'time plus one minute', + ), + ); + } +} From 04afd909aadae7731812d3489c3c4a34f2b48f77 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Sat, 2 Mar 2024 14:11:53 +0000 Subject: [PATCH 115/251] Editor: do not expose protected post meta fields in block bindings. Ignores meta keys which are considered protected or not registered to be shown in the REST API. Adds tests. Props santosguillamot, swissspidy, gziolo, xknown, peterwilsoncc. Fixes #60651. git-svn-id: https://develop.svn.wordpress.org/trunk@57754 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/block-bindings/post-meta.php | 13 + .../tests/block-bindings/postMetaSource.php | 269 ++++++++++++++++++ tests/phpunit/tests/block-bindings/render.php | 36 +++ 3 files changed, 318 insertions(+) create mode 100644 tests/phpunit/tests/block-bindings/postMetaSource.php diff --git a/src/wp-includes/block-bindings/post-meta.php b/src/wp-includes/block-bindings/post-meta.php index 5aa6bf048d07d..75062f5ca3ea9 100644 --- a/src/wp-includes/block-bindings/post-meta.php +++ b/src/wp-includes/block-bindings/post-meta.php @@ -34,6 +34,19 @@ function _block_bindings_post_meta_get_value( array $source_args, $block_instanc return null; } + // Check if the meta field is protected. + if ( is_protected_meta( $source_args['key'], 'post' ) ) { + return null; + } + + // Check if the meta field is registered to be shown in REST. + $meta_keys = get_registered_meta_keys( 'post', $block_instance->context['postType'] ); + // Add fields registered for all subtypes. + $meta_keys = array_merge( $meta_keys, get_registered_meta_keys( 'post', '' ) ); + if ( empty( $meta_keys[ $source_args['key'] ]['show_in_rest'] ) ) { + return null; + } + return get_post_meta( $post_id, $source_args['key'], true ); } diff --git a/tests/phpunit/tests/block-bindings/postMetaSource.php b/tests/phpunit/tests/block-bindings/postMetaSource.php new file mode 100644 index 0000000000000..81a8a5861adc3 --- /dev/null +++ b/tests/phpunit/tests/block-bindings/postMetaSource.php @@ -0,0 +1,269 @@ +post_content = $content; + return apply_filters( 'the_content', $GLOBALS['post']->post_content ); + } + + /** + * Sets up shared fixtures. + */ + public static function wpSetUpBeforeClass( WP_UnitTest_Factory $factory ) { + self::$post = $factory->post->create_and_get(); + self::$wp_meta_keys_saved = isset( $GLOBALS['wp_meta_keys'] ) ? $GLOBALS['wp_meta_keys'] : array(); + } + + /** + * Tear down after class. + */ + public static function wpTearDownAfterClass() { + $GLOBALS['wp_meta_keys'] = self::$wp_meta_keys_saved; + } + + /** + * Set up before each test. + * + * @since 6.5.0 + */ + public function set_up() { + parent::set_up(); + // Needed because tear_down() will reset it between tests. + $GLOBALS['post'] = self::$post; + } + + /** + * Tests that a block connected to a custom field renders its value. + * + * @ticket 60651 + */ + public function test_custom_field_value_is_rendered() { + register_meta( + 'post', + 'tests_custom_field', + array( + 'show_in_rest' => true, + 'single' => true, + 'type' => 'string', + 'default' => 'Custom field value', + ) + ); + + $content = $this->get_modified_post_content( '

    Fallback value

    ' ); + $this->assertSame( + '

    Custom field value

    ', + $content, + 'The post content should show the value of the custom field . ' + ); + } + + /** + * Tests that an html attribute connected to a custom field renders its value. + * + * @ticket 60651 + */ + public function test_html_attribute_connected_to_custom_field_value_is_rendered() { + register_meta( + 'post', + 'tests_url_custom_field', + array( + 'show_in_rest' => true, + 'single' => true, + 'type' => 'string', + 'default' => 'https://example.com/foo.png', + ) + ); + + $content = $this->get_modified_post_content( '
    ' ); + $this->assertSame( + '
    ', + $content, + 'The image src should point to the value of the custom field . ' + ); + } + + /** + * Tests that a blocks connected in a password protected post don't render the value. + * + * @ticket 60651 + */ + public function test_custom_field_value_is_not_shown_in_password_protected_posts() { + register_meta( + 'post', + 'tests_custom_field', + array( + 'show_in_rest' => true, + 'single' => true, + 'type' => 'string', + 'default' => 'Custom field value', + ) + ); + + add_filter( 'post_password_required', '__return_true' ); + + $content = $this->get_modified_post_content( '

    Fallback value

    ' ); + + remove_filter( 'post_password_required', '__return_true' ); + + $this->assertSame( + '

    Fallback value

    ', + $content, + 'The post content should show the fallback value instead of the custom field value.' + ); + } + + /** + * Tests that a blocks connected in a post that is not publicly viewable don't render the value. + * + * @ticket 60651 + */ + public function test_custom_field_value_is_not_shown_in_non_viewable_posts() { + register_meta( + 'post', + 'tests_custom_field', + array( + 'show_in_rest' => true, + 'single' => true, + 'type' => 'string', + 'default' => 'Custom field value', + ) + ); + + add_filter( 'is_post_status_viewable', '__return_false' ); + + $content = $this->get_modified_post_content( '

    Fallback value

    ' ); + + remove_filter( 'is_post_status_viewable', '__return_false' ); + + $this->assertSame( + '

    Fallback value

    ', + $content, + 'The post content should show the fallback value instead of the custom field value.' + ); + } + + /** + * Tests that a block connected to a meta key that doesn't exist renders the fallback. + * + * @ticket 60651 + */ + public function test_binding_to_non_existing_meta_key() { + $content = $this->get_modified_post_content( '

    Fallback value

    ' ); + + $this->assertSame( + '

    Fallback value

    ', + $content, + 'The post content should show the fallback value.' + ); + } + + /** + * Tests that a block connected without specifying the custom field renders the fallback. + * + * @ticket 60651 + */ + public function test_binding_without_key_renders_the_fallback() { + $content = $this->get_modified_post_content( '

    Fallback value

    ' ); + + $this->assertSame( + '

    Fallback value

    ', + $content, + 'The post content should show the fallback value.' + ); + } + + /** + * Tests that a block connected to a protected field doesn't show the value. + * + * @ticket 60651 + */ + public function test_protected_field_value_is_not_shown() { + register_meta( + 'post', + '_tests_protected_field', + array( + 'show_in_rest' => true, + 'single' => true, + 'type' => 'string', + 'default' => 'Protected value', + ) + ); + + $content = $this->get_modified_post_content( '

    Fallback value

    ' ); + + $this->assertSame( + '

    Fallback value

    ', + $content, + 'The post content should show the fallback value instead of the protected value.' + ); + } + + /** + * Tests that a block connected to a field not exposed in the REST API doesn't show the value. + * + * @ticket 60651 + */ + public function test_custom_field_not_exposed_in_rest_api_is_not_shown() { + register_meta( + 'post', + 'tests_show_in_rest_false_field', + array( + 'show_in_rest' => false, + 'single' => true, + 'type' => 'string', + 'default' => 'Protected value', + ) + ); + + $content = $this->get_modified_post_content( '

    Fallback value

    ' ); + + $this->assertSame( + '

    Fallback value

    ', + $content, + 'The post content should show the fallback value instead of the protected value.' + ); + } + + /** + * Tests that meta key with unsafe HTML is sanitized. + * + * @ticket 60651 + */ + public function test_custom_field_with_unsafe_html_is_sanitized() { + register_meta( + 'post', + 'tests_unsafe_html_field', + array( + 'show_in_rest' => true, + 'single' => true, + 'type' => 'string', + 'default' => '', + ) + ); + + $content = $this->get_modified_post_content( '

    Fallback value

    ' ); + + $this->assertSame( + '

    alert(“Unsafe HTML”)

    ', + $content, + 'The post content should not include the script tag.' + ); + } +} diff --git a/tests/phpunit/tests/block-bindings/render.php b/tests/phpunit/tests/block-bindings/render.php index 03da454e87b3d..aac4c417fd43f 100644 --- a/tests/phpunit/tests/block-bindings/render.php +++ b/tests/phpunit/tests/block-bindings/render.php @@ -198,4 +198,40 @@ public function test_update_block_with_value_from_source_image_placeholder() { 'The block content should be updated with the value returned by the source.' ); } + + /** + * Tests if the block content is sanitized when unsafe HTML is passed. + * + * @ticket 60651 + * + * @covers ::register_block_bindings_source + */ + public function test_source_value_with_unsafe_html_is_sanitized() { + $get_value_callback = function () { + return ''; + }; + + register_block_bindings_source( + self::SOURCE_NAME, + array( + 'label' => self::SOURCE_LABEL, + 'get_value_callback' => $get_value_callback, + ) + ); + + $block_content = << +

    This should not appear

    + +HTML; + $parsed_blocks = parse_blocks( $block_content ); + $block = new WP_Block( $parsed_blocks[0] ); + $result = $block->render(); + + $this->assertSame( + '

    alert("Unsafe HTML")

    ', + trim( $result ), + 'The block content should be updated with the value returned by the source.' + ); + } } From ee5142efbca11450e7befd202d37eba4660173c1 Mon Sep 17 00:00:00 2001 From: Joe Dolson Date: Sat, 2 Mar 2024 20:13:02 +0000 Subject: [PATCH 116/251] Media: Accessibility: Copy attachment properties on site icon crop. Add parity between site icon, custom header, and default image crop behaviors. [53027] fixed a bug where alt text and caption were not copied on custom headers, but did not apply that change in any other context. Deprecate the `create_attachment_object` method in the `Wp_Site_Icon` and `Custom_Image_Header` classes and replace that functionality with the new function `wp_copy_parent_attachment_properties()` to improve consistency. Props afercia, rcreators, jorbin, joedolson, huzaifaalmesbah, shailu25, swissspidy, mukesh27. Fixes #60524. git-svn-id: https://develop.svn.wordpress.org/trunk@57755 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/ajax-actions.php | 49 ++-------------- .../includes/class-custom-image-header.php | 6 +- src/wp-admin/includes/class-wp-site-icon.php | 3 + src/wp-admin/includes/image.php | 56 +++++++++++++++++++ tests/phpunit/tests/image/header.php | 25 +-------- tests/phpunit/tests/image/siteIcon.php | 16 +----- .../wpCopyParentAttachmentProperties.php | 52 +++++++++++++++++ 7 files changed, 125 insertions(+), 82 deletions(-) create mode 100644 tests/phpunit/tests/media/wpCopyParentAttachmentProperties.php diff --git a/src/wp-admin/includes/ajax-actions.php b/src/wp-admin/includes/ajax-actions.php index f8b6ac45898ff..30aab700b40b3 100644 --- a/src/wp-admin/includes/ajax-actions.php +++ b/src/wp-admin/includes/ajax-actions.php @@ -4035,9 +4035,10 @@ function wp_ajax_crop_image() { } /** This filter is documented in wp-admin/includes/class-custom-image-header.php */ - $cropped = apply_filters( 'wp_create_file_in_uploads', $cropped, $attachment_id ); // For replication. - $attachment = $wp_site_icon->create_attachment_object( $cropped, $attachment_id ); - unset( $attachment['ID'] ); + $cropped = apply_filters( 'wp_create_file_in_uploads', $cropped, $attachment_id ); // For replication. + + // Copy attachment properties. + $attachment = wp_copy_parent_attachment_properties( $cropped, $attachment_id, $context ); // Update the attachment. add_filter( 'intermediate_image_sizes_advanced', array( $wp_site_icon, 'additional_sizes' ) ); @@ -4065,46 +4066,8 @@ function wp_ajax_crop_image() { /** This filter is documented in wp-admin/includes/class-custom-image-header.php */ $cropped = apply_filters( 'wp_create_file_in_uploads', $cropped, $attachment_id ); // For replication. - $parent_url = wp_get_attachment_url( $attachment_id ); - $parent_basename = wp_basename( $parent_url ); - $url = str_replace( $parent_basename, wp_basename( $cropped ), $parent_url ); - - $size = wp_getimagesize( $cropped ); - $image_type = ( $size ) ? $size['mime'] : 'image/jpeg'; - - // Get the original image's post to pre-populate the cropped image. - $original_attachment = get_post( $attachment_id ); - $sanitized_post_title = sanitize_file_name( $original_attachment->post_title ); - $use_original_title = ( - ( '' !== trim( $original_attachment->post_title ) ) && - /* - * Check if the original image has a title other than the "filename" default, - * meaning the image had a title when originally uploaded or its title was edited. - */ - ( $parent_basename !== $sanitized_post_title ) && - ( pathinfo( $parent_basename, PATHINFO_FILENAME ) !== $sanitized_post_title ) - ); - $use_original_description = ( '' !== trim( $original_attachment->post_content ) ); - - $attachment = array( - 'post_title' => $use_original_title ? $original_attachment->post_title : wp_basename( $cropped ), - 'post_content' => $use_original_description ? $original_attachment->post_content : $url, - 'post_mime_type' => $image_type, - 'guid' => $url, - 'context' => $context, - ); - - // Copy the image caption attribute (post_excerpt field) from the original image. - if ( '' !== trim( $original_attachment->post_excerpt ) ) { - $attachment['post_excerpt'] = $original_attachment->post_excerpt; - } - - // Copy the image alt text attribute from the original image. - if ( '' !== trim( $original_attachment->_wp_attachment_image_alt ) ) { - $attachment['meta_input'] = array( - '_wp_attachment_image_alt' => wp_slash( $original_attachment->_wp_attachment_image_alt ), - ); - } + // Copy attachment properties. + $attachment = wp_copy_parent_attachment_properties( $cropped, $attachment_id, $context ); $attachment_id = wp_insert_attachment( $attachment, $cropped ); $metadata = wp_generate_attachment_metadata( $attachment_id, $cropped ); diff --git a/src/wp-admin/includes/class-custom-image-header.php b/src/wp-admin/includes/class-custom-image-header.php index 5c3271478b62f..20f19593b818c 100644 --- a/src/wp-admin/includes/class-custom-image-header.php +++ b/src/wp-admin/includes/class-custom-image-header.php @@ -1077,7 +1077,7 @@ public function step_3() { /** This filter is documented in wp-admin/includes/class-custom-image-header.php */ $cropped = apply_filters( 'wp_create_file_in_uploads', $cropped, $attachment_id ); // For replication. - $attachment = $this->create_attachment_object( $cropped, $attachment_id ); + $attachment = wp_copy_parent_attachment_properties( $cropped, $attachment_id, 'custom-header' ); if ( ! empty( $_POST['create-new-attachment'] ) ) { unset( $attachment['ID'] ); @@ -1314,12 +1314,14 @@ final public function get_header_dimensions( $dimensions ) { * Creates an attachment 'object'. * * @since 3.9.0 + * @deprecated 6.5.0 * * @param string $cropped Cropped image URL. * @param int $parent_attachment_id Attachment ID of parent image. * @return array An array with attachment object data. */ final public function create_attachment_object( $cropped, $parent_attachment_id ) { + _deprecated_function( __METHOD__, '6.5.0', 'wp_copy_parent_attachment_properties()' ); $parent = get_post( $parent_attachment_id ); $parent_url = wp_get_attachment_url( $parent->ID ); $url = str_replace( wp_basename( $parent_url ), wp_basename( $cropped ), $parent_url ); @@ -1421,7 +1423,7 @@ public function ajax_header_crop() { /** This filter is documented in wp-admin/includes/class-custom-image-header.php */ $cropped = apply_filters( 'wp_create_file_in_uploads', $cropped, $attachment_id ); // For replication. - $attachment = $this->create_attachment_object( $cropped, $attachment_id ); + $attachment = wp_copy_parent_attachment_properties( $cropped, $attachment_id, 'custom-header' ); $previous = $this->get_previous_crop( $attachment ); diff --git a/src/wp-admin/includes/class-wp-site-icon.php b/src/wp-admin/includes/class-wp-site-icon.php index ff417718f6a39..d14ead34cd7a7 100644 --- a/src/wp-admin/includes/class-wp-site-icon.php +++ b/src/wp-admin/includes/class-wp-site-icon.php @@ -78,12 +78,15 @@ public function __construct() { * Creates an attachment 'object'. * * @since 4.3.0 + * @deprecated 6.5.0 * * @param string $cropped Cropped image URL. * @param int $parent_attachment_id Attachment ID of parent image. * @return array An array with attachment object data. */ public function create_attachment_object( $cropped, $parent_attachment_id ) { + _deprecated_function( __METHOD__, '6.5.0', 'wp_copy_parent_attachment_properties()' ); + $parent = get_post( $parent_attachment_id ); $parent_url = wp_get_attachment_url( $parent->ID ); $url = str_replace( wp_basename( $parent_url ), wp_basename( $cropped ), $parent_url ); diff --git a/src/wp-admin/includes/image.php b/src/wp-admin/includes/image.php index 0f4ba818e6535..69f58d52ed053 100644 --- a/src/wp-admin/includes/image.php +++ b/src/wp-admin/includes/image.php @@ -482,6 +482,62 @@ function _wp_make_subsizes( $new_sizes, $file, $image_meta, $attachment_id ) { return $image_meta; } +/** + * Copy parent attachment properties to newly cropped image. + * + * @since 6.5.0 + * + * @param string $cropped Path to the cropped image file. + * @param int $parent_attachment_id Parent file Attachment ID. + * @param string $context Control calling the function. + * @return array Properties of attachment. + */ +function wp_copy_parent_attachment_properties( $cropped, $parent_attachment_id, $context = '' ) { + $parent = get_post( $parent_attachment_id ); + $parent_url = wp_get_attachment_url( $parent->ID ); + $parent_basename = wp_basename( $parent_url ); + $url = str_replace( wp_basename( $parent_url ), wp_basename( $cropped ), $parent_url ); + + $size = wp_getimagesize( $cropped ); + $image_type = $size ? $size['mime'] : 'image/jpeg'; + + $sanitized_post_title = sanitize_file_name( $parent->post_title ); + $use_original_title = ( + ( '' !== trim( $parent->post_title ) ) && + /* + * Check if the original image has a title other than the "filename" default, + * meaning the image had a title when originally uploaded or its title was edited. + */ + ( $parent_basename !== $sanitized_post_title ) && + ( pathinfo( $parent_basename, PATHINFO_FILENAME ) !== $sanitized_post_title ) + ); + $use_original_description = ( '' !== trim( $parent->post_content ) ); + + $attachment = array( + 'post_title' => $use_original_title ? $parent->post_title : wp_basename( $cropped ), + 'post_content' => $use_original_description ? $parent->post_content : $url, + 'post_mime_type' => $image_type, + 'guid' => $url, + 'context' => $context, + ); + + // Copy the image caption attribute (post_excerpt field) from the original image. + if ( '' !== trim( $parent->post_excerpt ) ) { + $attachment['post_excerpt'] = $parent->post_excerpt; + } + + // Copy the image alt text attribute from the original image. + if ( '' !== trim( $parent->_wp_attachment_image_alt ) ) { + $attachment['meta_input'] = array( + '_wp_attachment_image_alt' => wp_slash( $parent->_wp_attachment_image_alt ), + ); + } + + $attachment['post_parent'] = $parent_attachment_id; + + return $attachment; +} + /** * Generates attachment meta data and create image sub-sizes for images. * diff --git a/tests/phpunit/tests/image/header.php b/tests/phpunit/tests/image/header.php index afb9feb61fb4e..0257c732d4a86 100644 --- a/tests/phpunit/tests/image/header.php +++ b/tests/phpunit/tests/image/header.php @@ -108,25 +108,6 @@ public function test_header_image_has_correct_dimensions_with_flex_width_and_hei $this->assertSame( 1200, $dimensions['dst_height'] ); } - public function test_create_attachment_object() { - $id = wp_insert_attachment( - array( - 'post_status' => 'publish', - 'post_title' => 'foo.png', - 'post_type' => 'post', - 'guid' => 'http://localhost/foo.png', - ) - ); - - $cropped = 'foo-cropped.png'; - - $object = $this->custom_image_header->create_attachment_object( $cropped, $id ); - $this->assertSame( 'foo-cropped.png', $object['post_title'] ); - $this->assertSame( 'http://localhost/' . $cropped, $object['guid'] ); - $this->assertSame( 'custom-header', $object['context'] ); - $this->assertSame( 'image/jpeg', $object['post_mime_type'] ); - } - public function test_insert_cropped_attachment() { $id = wp_insert_attachment( array( @@ -138,7 +119,7 @@ public function test_insert_cropped_attachment() { ); $cropped = 'foo-cropped.png'; - $object = $this->custom_image_header->create_attachment_object( $cropped, $id ); + $object = wp_copy_parent_attachment_properties( $cropped, $id, 'custom-header' ); $cropped_id = $this->custom_image_header->insert_attachment( $object, $cropped ); @@ -161,7 +142,7 @@ public function test_check_get_previous_crop() { // Create inital crop object. $cropped_1 = 'foo-cropped-1.png'; - $object = $this->custom_image_header->create_attachment_object( $cropped_1, $id ); + $object = wp_copy_parent_attachment_properties( $cropped_1, $id, 'custom-header' ); // Ensure no previous crop exists. $previous = $this->custom_image_header->get_previous_crop( $object ); @@ -175,7 +156,7 @@ public function test_check_get_previous_crop() { // Create second crop. $cropped_2 = 'foo-cropped-2.png'; - $object = $this->custom_image_header->create_attachment_object( $cropped_2, $id ); + $object = wp_copy_parent_attachment_properties( $cropped_2, $id ); // Test that a previous crop is found. $previous = $this->custom_image_header->get_previous_crop( $object ); diff --git a/tests/phpunit/tests/image/siteIcon.php b/tests/phpunit/tests/image/siteIcon.php index 369aed06f9700..4927c1b4ffc3f 100644 --- a/tests/phpunit/tests/image/siteIcon.php +++ b/tests/phpunit/tests/image/siteIcon.php @@ -98,26 +98,12 @@ public function test_additional_sizes_with_filter() { unset( $this->wp_site_icon->site_icon_sizes[ array_search( 321, $this->wp_site_icon->site_icon_sizes, true ) ] ); } - public function test_create_attachment_object() { - $attachment_id = $this->insert_attachment(); - $parent_url = get_post( $attachment_id )->guid; - $cropped = str_replace( wp_basename( $parent_url ), 'cropped-test-image.jpg', $parent_url ); - - $object = $this->wp_site_icon->create_attachment_object( $cropped, $attachment_id ); - - $this->assertSame( $object['post_title'], 'cropped-test-image.jpg' ); - $this->assertSame( $object['context'], 'site-icon' ); - $this->assertSame( $object['post_mime_type'], 'image/jpeg' ); - $this->assertSame( $object['post_content'], $cropped ); - $this->assertSame( $object['guid'], $cropped ); - } - public function test_insert_cropped_attachment() { $attachment_id = $this->insert_attachment(); $parent_url = get_post( $attachment_id )->guid; $cropped = str_replace( wp_basename( $parent_url ), 'cropped-test-image.jpg', $parent_url ); - $object = $this->wp_site_icon->create_attachment_object( $cropped, $attachment_id ); + $object = wp_copy_parent_attachment_properties( $cropped, $attachment_id, 'site-icon' ); $cropped_id = $this->wp_site_icon->insert_attachment( $object, $cropped ); $this->assertIsInt( $cropped_id ); diff --git a/tests/phpunit/tests/media/wpCopyParentAttachmentProperties.php b/tests/phpunit/tests/media/wpCopyParentAttachmentProperties.php new file mode 100644 index 0000000000000..e6fc1e9bc69a8 --- /dev/null +++ b/tests/phpunit/tests/media/wpCopyParentAttachmentProperties.php @@ -0,0 +1,52 @@ +remove_added_uploads(); + + parent::tear_down(); + } + + public function test_wp_copy_parent_attachment_properties() { + $attachment = $this->factory->attachment->create_upload_object( DIR_TESTDATA . '/images/canola.jpg' ); + $parent_url = get_post( $attachment )->guid; + // Add alternative text. + update_post_meta( $attachment, '_wp_attachment_image_alt', 'Alt text' ); + // Add image description. + wp_update_post( + array( + 'ID' => $attachment, + 'post_excerpt' => 'Image description', + ) + ); + $file = wp_crop_image( + DIR_TESTDATA . '/images/canola.jpg', + 0, + 0, + 100, + 100, + 100, + 100 + ); + + $object = wp_copy_parent_attachment_properties( $file, $attachment ); + $cropped = str_replace( wp_basename( $parent_url ), 'cropped-canola.jpg', $parent_url ); + + $this->assertSame( $object['post_title'], 'cropped-canola.jpg', 'Attachment title is not identical' ); + $this->assertSame( $object['context'], '', 'Attachment context is not identical' ); + $this->assertSame( $object['post_mime_type'], 'image/jpeg', 'Attachment mime type is not identical' ); + $this->assertSame( $object['post_content'], $cropped, 'Attachment content is not identical' ); + $this->assertSame( $object['guid'], $cropped, 'Attachment GUID is not identical' ); + $this->assertSame( $object['meta_input']['_wp_attachment_image_alt'], 'Alt text', 'Attachment alt text is not identical' ); + $this->assertSame( $object['post_excerpt'], 'Image description', 'Attachment description is not identical' ); + + unlink( $file ); + } +} From 238383d15c519b391d7be66e2fb2eaa87d8abc5d Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 3 Mar 2024 18:21:43 +0000 Subject: [PATCH 117/251] Docs: Document some globals in `wp-admin/setup-config.php`. Follow-up to [29669], [29705], [32642], [45737], [47230], [51477]. Props upadalavipul, sabernhardt. See #60021. git-svn-id: https://develop.svn.wordpress.org/trunk@57756 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/setup-config.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/wp-admin/setup-config.php b/src/wp-admin/setup-config.php index ddcb4943c7ba7..5fd805e41a76a 100644 --- a/src/wp-admin/setup-config.php +++ b/src/wp-admin/setup-config.php @@ -116,6 +116,10 @@ function setup_config_display_header( $body_classes = array() ) { Date: Mon, 4 Mar 2024 11:04:12 +0000 Subject: [PATCH 118/251] Build/Test Tools: Update 3rd-party GitHub Actions. This updates the following GitHub Actions to their latest versions: - `shivammathur/setup-php` from `2.29.0` to `2.30.0` - `actions/cache` from `4.0.0` to `4.0.1` - `ramsey/composer-install` from `2.2.0` to `3.0.0` - `codecov/codecov-action` from `4.0.1` to `4.1.0` This should address the remaining notices caused by running Node.js 16.x on GitHub Actions runner machines in `trunk`. Follow up to [57197], [57362], [57655]. See #59805. git-svn-id: https://develop.svn.wordpress.org/trunk@57757 602fd350-edb4-49c9-b593-d223f7449a82 --- .github/workflows/coding-standards.yml | 6 +++--- .github/workflows/install-testing.yml | 2 +- .github/workflows/php-compatibility.yml | 6 +++--- .github/workflows/phpunit-tests-run.yml | 4 ++-- .github/workflows/test-coverage.yml | 8 ++++---- .github/workflows/upgrade-testing-run.yml | 2 +- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/coding-standards.yml b/.github/workflows/coding-standards.yml index cf2fcfc6a3acb..0f70aa565b2e0 100644 --- a/.github/workflows/coding-standards.yml +++ b/.github/workflows/coding-standards.yml @@ -75,7 +75,7 @@ jobs: show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} - name: Set up PHP - uses: shivammathur/setup-php@6d7209f44a25a59e904b1ee9f3b0c33ab2cd888d # v2.29.0 + uses: shivammathur/setup-php@a4e22b60bbb9c1021113f2860347b0759f66fe5d # v2.30.0 with: php-version: 'latest' coverage: none @@ -88,7 +88,7 @@ jobs: run: echo "date=$(/bin/date -u --date='last Mon' "+%F")" >> $GITHUB_OUTPUT - name: Cache PHPCS scan cache - uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0 + uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v4.0.1 with: path: | .cache/phpcs-src.json @@ -98,7 +98,7 @@ jobs: # Since Composer dependencies are installed using `composer update` and no lock file is in version control, # passing a custom cache suffix ensures that the cache is flushed at least once per week. - name: Install Composer dependencies - uses: ramsey/composer-install@83af392bf5f031813d25e6fe4cd626cdba9a2df6 # v2.2.0 + uses: ramsey/composer-install@57532f8be5bda426838819c5ee9afb8af389d51a # v3.0.0 with: custom-cache-suffix: ${{ steps.get-date.outputs.date }} diff --git a/.github/workflows/install-testing.yml b/.github/workflows/install-testing.yml index ae841a75d8e67..f820c214df16d 100644 --- a/.github/workflows/install-testing.yml +++ b/.github/workflows/install-testing.yml @@ -141,7 +141,7 @@ jobs: steps: - name: Set up PHP ${{ matrix.php }} - uses: shivammathur/setup-php@6d7209f44a25a59e904b1ee9f3b0c33ab2cd888d # v2.29.0 + uses: shivammathur/setup-php@a4e22b60bbb9c1021113f2860347b0759f66fe5d # v2.30.0 with: php-version: '${{ matrix.php }}' coverage: none diff --git a/.github/workflows/php-compatibility.yml b/.github/workflows/php-compatibility.yml index 1606277d35495..bc3363aee8f59 100644 --- a/.github/workflows/php-compatibility.yml +++ b/.github/workflows/php-compatibility.yml @@ -70,7 +70,7 @@ jobs: show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} - name: Set up PHP - uses: shivammathur/setup-php@6d7209f44a25a59e904b1ee9f3b0c33ab2cd888d # v2.29.0 + uses: shivammathur/setup-php@a4e22b60bbb9c1021113f2860347b0759f66fe5d # v2.30.0 with: php-version: '7.4' coverage: none @@ -87,7 +87,7 @@ jobs: run: echo "date=$(/bin/date -u --date='last Mon' "+%F")" >> $GITHUB_OUTPUT - name: Cache PHP compatibility scan cache - uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0 + uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v4.0.1 with: path: .cache/phpcompat.json key: ${{ runner.os }}-date-${{ steps.get-date.outputs.date }}-phpcompat-cache-${{ hashFiles('**/composer.json', 'phpcompat.xml.dist') }} @@ -95,7 +95,7 @@ jobs: # Since Composer dependencies are installed using `composer update` and no lock file is in version control, # passing a custom cache suffix ensures that the cache is flushed at least once per week. - name: Install Composer dependencies - uses: ramsey/composer-install@83af392bf5f031813d25e6fe4cd626cdba9a2df6 # v2.2.0 + uses: ramsey/composer-install@57532f8be5bda426838819c5ee9afb8af389d51a # v3.0.0 with: custom-cache-suffix: ${{ steps.get-date.outputs.date }} diff --git a/.github/workflows/phpunit-tests-run.yml b/.github/workflows/phpunit-tests-run.yml index bc0c5a0d748ec..5cf360dab0bd0 100644 --- a/.github/workflows/phpunit-tests-run.yml +++ b/.github/workflows/phpunit-tests-run.yml @@ -103,7 +103,7 @@ jobs: # dependency versions are installed and cached. ## - name: Set up PHP - uses: shivammathur/setup-php@6d7209f44a25a59e904b1ee9f3b0c33ab2cd888d # v2.29.0 + uses: shivammathur/setup-php@a4e22b60bbb9c1021113f2860347b0759f66fe5d # v2.30.0 with: php-version: '${{ inputs.php }}' coverage: none @@ -111,7 +111,7 @@ jobs: # Since Composer dependencies are installed using `composer update` and no lock file is in version control, # passing a custom cache suffix ensures that the cache is flushed at least once per week. - name: Install Composer dependencies - uses: ramsey/composer-install@83af392bf5f031813d25e6fe4cd626cdba9a2df6 # v2.2.0 + uses: ramsey/composer-install@57532f8be5bda426838819c5ee9afb8af389d51a # v3.0.0 with: custom-cache-suffix: $(/bin/date -u --date='last Mon' "+%F") diff --git a/.github/workflows/test-coverage.yml b/.github/workflows/test-coverage.yml index ea430f0873be3..97c3b42740bc8 100644 --- a/.github/workflows/test-coverage.yml +++ b/.github/workflows/test-coverage.yml @@ -94,7 +94,7 @@ jobs: # dependency versions are installed and cached. ## - name: Set up PHP - uses: shivammathur/setup-php@6d7209f44a25a59e904b1ee9f3b0c33ab2cd888d # v2.29.0 + uses: shivammathur/setup-php@a4e22b60bbb9c1021113f2860347b0759f66fe5d # v2.30.0 with: php-version: '7.4' coverage: none @@ -102,7 +102,7 @@ jobs: # Since Composer dependencies are installed using `composer update` and no lock file is in version control, # passing a custom cache suffix ensures that the cache is flushed at least once per week. - name: Install Composer dependencies - uses: ramsey/composer-install@83af392bf5f031813d25e6fe4cd626cdba9a2df6 # v2.2.0 + uses: ramsey/composer-install@57532f8be5bda426838819c5ee9afb8af389d51a # v3.0.0 with: custom-cache-suffix: $(/bin/date -u --date='last Mon' "+%F") @@ -152,7 +152,7 @@ jobs: - name: Upload single site report to Codecov if: ${{ ! matrix.multisite && github.event_name != 'pull_request' }} - uses: codecov/codecov-action@e0b68c6749509c5f83f984dd99a76a1c1a231044 # v4.0.1 + uses: codecov/codecov-action@54bcd8715eee62d40e33596ef5e8f0f48dbbccab # v4.1.0 with: token: ${{ secrets.CODECOV_TOKEN }} file: wp-code-coverage-single-${{ github.sha }}${{ 'clover' == matrix.format && '.xml' || '' }} @@ -176,7 +176,7 @@ jobs: - name: Upload multisite report to Codecov if: ${{ matrix.multisite && github.event_name != 'pull_request' }} - uses: codecov/codecov-action@e0b68c6749509c5f83f984dd99a76a1c1a231044 # v4.0.1 + uses: codecov/codecov-action@54bcd8715eee62d40e33596ef5e8f0f48dbbccab # v4.1.0 with: token: ${{ secrets.CODECOV_TOKEN }} file: wp-code-coverage-multisite-${{ github.sha }}${{ 'clover' == matrix.format && '.xml' || '' }} diff --git a/.github/workflows/upgrade-testing-run.yml b/.github/workflows/upgrade-testing-run.yml index 67e29983caa60..0235d38f95b76 100644 --- a/.github/workflows/upgrade-testing-run.yml +++ b/.github/workflows/upgrade-testing-run.yml @@ -62,7 +62,7 @@ jobs: steps: - name: Set up PHP ${{ inputs.php }} - uses: shivammathur/setup-php@6d7209f44a25a59e904b1ee9f3b0c33ab2cd888d # v2.29.0 + uses: shivammathur/setup-php@a4e22b60bbb9c1021113f2860347b0759f66fe5d # v2.30.0 with: php-version: '${{ inputs.php }}' coverage: none From 81a4c4cdf0c6bf81b2ec86a62721f54b06b6ebba Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Mon, 4 Mar 2024 11:23:59 +0000 Subject: [PATCH 119/251] Build/Test Tools: Fix the `precommit:emoji` script. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GitHub recently sunset support for Subversion, causing the `precommit:emoji` Grunt script to break. Since there’s no direct replacement for `svn ls` in Git, this has been replaced with a query through the GitHub CLI. This also adds a step in the workflow that tests the build process to run the `precommit:emoji` script to ensure no changes to built files are missed when updating the Twemoji library in the future. Follow up to [57626]. Props kraftbj, peterwilsoncc, swissspidy. Fixes #60520. See #57600. git-svn-id: https://develop.svn.wordpress.org/trunk@57758 602fd350-edb4-49c9-b593-d223f7449a82 --- .../callable-test-core-build-process.yml | 5 ++++ Gruntfile.js | 23 +++++++++++++++---- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/.github/workflows/callable-test-core-build-process.yml b/.github/workflows/callable-test-core-build-process.yml index 1ba3c9108fb52..d63aa904ad9de 100644 --- a/.github/workflows/callable-test-core-build-process.yml +++ b/.github/workflows/callable-test-core-build-process.yml @@ -62,6 +62,11 @@ jobs: - name: Install npm Dependencies run: npm ci + - name: Run Emoji precommit task + run: npm run grunt precommit:emoji + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Build WordPress to run from ${{ inputs.directory }} run: npm run build${{ inputs.directory == 'src' && ':dev' || '' }} diff --git a/Gruntfile.js b/Gruntfile.js index 7d6981248f199..a99dcb4104aa1 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -1047,19 +1047,34 @@ module.exports = function(grunt) { { match: /\/\/ START: emoji arrays[\S\s]*\/\/ END: emoji arrays/g, replacement: function() { - var regex, files, + var regex, files, ghCli, partials, partialsSet, - entities, emojiArray; + entities, emojiArray, + apiResponse, query; grunt.log.writeln( 'Fetching list of Twemoji files...' ); + // Ensure that the GitHub CLI is installed. + ghCli = spawn( 'gh', [ '--version' ] ); + if ( 0 !== ghCli.status ) { + grunt.fatal( 'Emoji precommit script requires GitHub CLI. See https://cli.github.com/.' ); + } + // Fetch a list of the files that Twemoji supplies. - files = spawn( 'svn', [ 'ls', 'https://github.com/twitter/twemoji.git/trunk/assets/svg' ] ); + query = 'query={repository(owner: "jdecked", name: "twemoji") {object(expression: "v15.0.3:assets/svg") {... on Tree {entries {name}}}}}'; + files = spawn( 'gh', [ 'api', 'graphql', '-f', query] ); + if ( 0 !== files.status ) { grunt.fatal( 'Unable to fetch Twemoji file list' ); } - entities = files.stdout.toString(); + try { + apiResponse = JSON.parse( files.stdout.toString() ); + } catch ( e ) { + grunt.fatal( 'Unable to parse Twemoji file list' ); + } + entities = apiResponse.data.repository.object.entries; + entities = entities.reduce( function( accumulator, val ) { return accumulator + val.name + '\n'; }, '' ); // Tidy up the file list. entities = entities.replace( /\.svg/g, '' ); From a5541c014014eec165c7879aa9119dfb3367f251 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 4 Mar 2024 12:39:54 +0000 Subject: [PATCH 120/251] Docs: Document the `$post` global in comment feed templates. Follow-up to [18716]. Props viralsampat, sabernhardt. See #60021. git-svn-id: https://develop.svn.wordpress.org/trunk@57759 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/feed-atom-comments.php | 5 ++++- src/wp-includes/feed-rss2-comments.php | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/feed-atom-comments.php b/src/wp-includes/feed-atom-comments.php index 37f663a337512..1de77e391794d 100644 --- a/src/wp-includes/feed-atom-comments.php +++ b/src/wp-includes/feed-atom-comments.php @@ -69,7 +69,10 @@ comment_post_ID ); + $comment_post = get_post( $comment->comment_post_ID ); + /** + * @global WP_Post $post Global post object. + */ $GLOBALS['post'] = $comment_post; ?> diff --git a/src/wp-includes/feed-rss2-comments.php b/src/wp-includes/feed-rss2-comments.php index e0e664edaa014..85a4079fa0df5 100644 --- a/src/wp-includes/feed-rss2-comments.php +++ b/src/wp-includes/feed-rss2-comments.php @@ -72,7 +72,10 @@ while ( have_comments() ) : the_comment(); - $comment_post = get_post( $comment->comment_post_ID ); + $comment_post = get_post( $comment->comment_post_ID ); + /** + * @global WP_Post $post Global post object. + */ $GLOBALS['post'] = $comment_post; ?> From 798264f39ade52845910fec0669ff467fd8eb42b Mon Sep 17 00:00:00 2001 From: Riad Benguella Date: Mon, 4 Mar 2024 14:06:57 +0000 Subject: [PATCH 121/251] Editor: Update Packages with the latest bug fixes for 6.5 RC 1 It includes all the backports from this Gutenberg PR https://github.com/WordPress/gutenberg/pull/59541/ Props get_dave, youknowriad, talldanwp. See #60315. Fixes #60665. git-svn-id: https://develop.svn.wordpress.org/trunk@57760 602fd350-edb4-49c9-b593-d223f7449a82 --- package-lock.json | 984 +++++++++--------- package.json | 62 +- .../assets/script-loader-packages.min.php | 2 +- .../block-bindings/pattern-overrides.php | 6 +- src/wp-includes/blocks/block.php | 33 +- src/wp-includes/blocks/navigation.php | 2 +- src/wp-includes/blocks/search.php | 2 +- 7 files changed, 549 insertions(+), 542 deletions(-) diff --git a/package-lock.json b/package-lock.json index 88adea36cb117..2b7e82118c7bc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,61 +10,61 @@ "license": "GPL-2.0-or-later", "dependencies": { "@wordpress/a11y": "3.51.1", - "@wordpress/annotations": "2.51.2", + "@wordpress/annotations": "2.51.3", "@wordpress/api-fetch": "6.48.1", "@wordpress/autop": "3.51.1", "@wordpress/blob": "3.51.1", - "@wordpress/block-directory": "4.28.4", - "@wordpress/block-editor": "12.19.4", - "@wordpress/block-library": "8.28.4", + "@wordpress/block-directory": "4.28.5", + "@wordpress/block-editor": "12.19.5", + "@wordpress/block-library": "8.28.5", "@wordpress/block-serialization-default-parser": "4.51.1", - "@wordpress/blocks": "12.28.4", - "@wordpress/commands": "0.22.3", - "@wordpress/components": "26.0.3", + "@wordpress/blocks": "12.28.5", + "@wordpress/commands": "0.22.4", + "@wordpress/components": "26.0.4", "@wordpress/compose": "6.28.1", - "@wordpress/core-commands": "0.20.4", - "@wordpress/core-data": "6.28.4", - "@wordpress/customize-widgets": "4.28.4", + "@wordpress/core-commands": "0.20.5", + "@wordpress/core-data": "6.28.5", + "@wordpress/customize-widgets": "4.28.5", "@wordpress/data": "9.21.1", "@wordpress/data-controls": "3.20.1", - "@wordpress/dataviews": "0.5.4", + "@wordpress/dataviews": "0.5.5", "@wordpress/date": "4.51.1", "@wordpress/deprecated": "3.51.1", "@wordpress/dom": "3.51.1", "@wordpress/dom-ready": "3.51.1", - "@wordpress/edit-post": "7.28.4", - "@wordpress/edit-site": "5.28.4", - "@wordpress/edit-widgets": "5.28.4", - "@wordpress/editor": "13.28.4", + "@wordpress/edit-post": "7.28.5", + "@wordpress/edit-site": "5.28.5", + "@wordpress/edit-widgets": "5.28.5", + "@wordpress/editor": "13.28.5", "@wordpress/element": "5.28.1", "@wordpress/escape-html": "2.51.1", - "@wordpress/format-library": "4.28.4", + "@wordpress/format-library": "4.28.5", "@wordpress/hooks": "3.51.1", "@wordpress/html-entities": "3.51.1", "@wordpress/i18n": "4.51.1", - "@wordpress/icons": "9.42.2", - "@wordpress/interactivity": "5.0.2", - "@wordpress/interactivity-router": "1.1.2", - "@wordpress/interface": "5.28.3", + "@wordpress/icons": "9.42.3", + "@wordpress/interactivity": "5.0.3", + "@wordpress/interactivity-router": "1.1.3", + "@wordpress/interface": "5.28.4", "@wordpress/is-shallow-equal": "4.51.1", "@wordpress/keyboard-shortcuts": "4.28.1", "@wordpress/keycodes": "3.51.1", - "@wordpress/list-reusable-blocks": "4.28.3", + "@wordpress/list-reusable-blocks": "4.28.4", "@wordpress/media-utils": "4.42.1", "@wordpress/notices": "4.19.1", - "@wordpress/nux": "8.13.3", - "@wordpress/patterns": "1.12.4", - "@wordpress/plugins": "6.19.3", - "@wordpress/preferences": "3.28.3", + "@wordpress/nux": "8.13.4", + "@wordpress/patterns": "1.12.5", + "@wordpress/plugins": "6.19.4", + "@wordpress/preferences": "3.28.4", "@wordpress/preferences-persistence": "1.43.1", "@wordpress/primitives": "3.49.1", "@wordpress/priority-queue": "2.51.1", "@wordpress/private-apis": "0.33.1", "@wordpress/redux-routine": "4.51.1", - "@wordpress/reusable-blocks": "4.28.4", - "@wordpress/rich-text": "6.28.2", + "@wordpress/reusable-blocks": "4.28.5", + "@wordpress/rich-text": "6.28.3", "@wordpress/router": "0.20.1", - "@wordpress/server-side-render": "4.28.4", + "@wordpress/server-side-render": "4.28.5", "@wordpress/shortcode": "3.51.1", "@wordpress/style-engine": "1.34.1", "@wordpress/sync": "0.13.1", @@ -73,7 +73,7 @@ "@wordpress/url": "3.52.1", "@wordpress/viewport": "5.28.1", "@wordpress/warning": "2.51.1", - "@wordpress/widgets": "3.28.4", + "@wordpress/widgets": "3.28.5", "@wordpress/wordcount": "3.51.1", "backbone": "1.5.0", "clipboard": "2.0.11", @@ -108,9 +108,9 @@ "@wordpress/babel-preset-default": "7.35.1", "@wordpress/dependency-extraction-webpack-plugin": "5.2.1", "@wordpress/e2e-test-utils": "10.22.1", - "@wordpress/e2e-test-utils-playwright": "0.19.1", + "@wordpress/e2e-test-utils-playwright": "0.19.2", "@wordpress/prettier-config": "3.8.1", - "@wordpress/scripts": "27.2.3", + "@wordpress/scripts": "27.2.4", "autoprefixer": "10.4.17", "chalk": "5.3.0", "check-node-version": "4.2.1", @@ -6095,15 +6095,15 @@ } }, "node_modules/@wordpress/annotations": { - "version": "2.51.2", - "resolved": "https://registry.npmjs.org/@wordpress/annotations/-/annotations-2.51.2.tgz", - "integrity": "sha512-zGjZJjN9ySItGX1yZkPL2zfGjUWu+kFoHTPyvkBFfKBTIm3Pb0OwpO+teRilzz+tWeSc+dNMpdOry6KxCtC1Qw==", + "version": "2.51.3", + "resolved": "https://registry.npmjs.org/@wordpress/annotations/-/annotations-2.51.3.tgz", + "integrity": "sha512-x2h6WwFsqnuXn5WfQY1AOsb9IkHsu/M3kRpduG42pVVhhIOkLiq8vvAaR52nmB+vrFq5ntGrVr9jaME+OxCRNA==", "dependencies": { "@babel/runtime": "^7.16.0", "@wordpress/data": "^9.21.1", "@wordpress/hooks": "^3.51.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/rich-text": "^6.28.2", + "@wordpress/rich-text": "^6.28.3", "rememo": "^4.0.2", "uuid": "^9.0.1" }, @@ -6191,28 +6191,28 @@ } }, "node_modules/@wordpress/block-directory": { - "version": "4.28.4", - "resolved": "https://registry.npmjs.org/@wordpress/block-directory/-/block-directory-4.28.4.tgz", - "integrity": "sha512-DFpI7iX8vvunQATOcFbsDpHrIBCTEHP12DlBwhekS4yoG4rD+6OYuLkVW7ROMtL41f/C73nhWjJJJvO+qnO4wA==", + "version": "4.28.5", + "resolved": "https://registry.npmjs.org/@wordpress/block-directory/-/block-directory-4.28.5.tgz", + "integrity": "sha512-/hTWQoxiDLJkG9UG75n/DImstWz5DKotE2Blx8VrMNuWwzl+riSRrvRx6UzfUjx5KCRV5vddu/zjBYQbdFtLyA==", "dependencies": { "@babel/runtime": "^7.16.0", "@wordpress/a11y": "^3.51.1", "@wordpress/api-fetch": "^6.48.1", - "@wordpress/block-editor": "^12.19.4", - "@wordpress/blocks": "^12.28.4", - "@wordpress/components": "^26.0.3", + "@wordpress/block-editor": "^12.19.5", + "@wordpress/blocks": "^12.28.5", + "@wordpress/components": "^26.0.4", "@wordpress/compose": "^6.28.1", - "@wordpress/core-data": "^6.28.4", + "@wordpress/core-data": "^6.28.5", "@wordpress/data": "^9.21.1", - "@wordpress/edit-post": "^7.28.4", - "@wordpress/editor": "^13.28.4", + "@wordpress/edit-post": "^7.28.5", + "@wordpress/editor": "^13.28.5", "@wordpress/element": "^5.28.1", "@wordpress/hooks": "^3.51.1", "@wordpress/html-entities": "^3.51.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/icons": "^9.42.2", + "@wordpress/icons": "^9.42.3", "@wordpress/notices": "^4.19.1", - "@wordpress/plugins": "^6.19.3", + "@wordpress/plugins": "^6.19.4", "@wordpress/private-apis": "^0.33.1", "@wordpress/url": "^3.52.1", "change-case": "^4.1.2" @@ -6226,9 +6226,9 @@ } }, "node_modules/@wordpress/block-editor": { - "version": "12.19.4", - "resolved": "https://registry.npmjs.org/@wordpress/block-editor/-/block-editor-12.19.4.tgz", - "integrity": "sha512-ybM9SyVdPdVlm+CPdjzpRp943ryO3nT19BoON/aT02BCXiyzTXto5Xxz0eAnmFseCG2kHhyQZzPxYin2kx31SQ==", + "version": "12.19.5", + "resolved": "https://registry.npmjs.org/@wordpress/block-editor/-/block-editor-12.19.5.tgz", + "integrity": "sha512-SgSdxTNOFDjr4Tq8aZZGofWOebt6MpDBsbYwXFOU5n8Y3phUeGDdyiyeRIQuBQKR4Ti0NZpkxtjxoUcvs00rtQ==", "dependencies": { "@babel/runtime": "^7.16.0", "@emotion/react": "^11.7.1", @@ -6237,9 +6237,9 @@ "@wordpress/a11y": "^3.51.1", "@wordpress/api-fetch": "^6.48.1", "@wordpress/blob": "^3.51.1", - "@wordpress/blocks": "^12.28.4", - "@wordpress/commands": "^0.22.3", - "@wordpress/components": "^26.0.3", + "@wordpress/blocks": "^12.28.5", + "@wordpress/commands": "^0.22.4", + "@wordpress/components": "^26.0.4", "@wordpress/compose": "^6.28.1", "@wordpress/data": "^9.21.1", "@wordpress/date": "^4.51.1", @@ -6250,14 +6250,14 @@ "@wordpress/hooks": "^3.51.1", "@wordpress/html-entities": "^3.51.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/icons": "^9.42.2", + "@wordpress/icons": "^9.42.3", "@wordpress/is-shallow-equal": "^4.51.1", "@wordpress/keyboard-shortcuts": "^4.28.1", "@wordpress/keycodes": "^3.51.1", "@wordpress/notices": "^4.19.1", - "@wordpress/preferences": "^3.28.3", + "@wordpress/preferences": "^3.28.4", "@wordpress/private-apis": "^0.33.1", - "@wordpress/rich-text": "^6.28.2", + "@wordpress/rich-text": "^6.28.3", "@wordpress/style-engine": "^1.34.1", "@wordpress/token-list": "^2.51.1", "@wordpress/url": "^3.52.1", @@ -6288,20 +6288,20 @@ } }, "node_modules/@wordpress/block-library": { - "version": "8.28.4", - "resolved": "https://registry.npmjs.org/@wordpress/block-library/-/block-library-8.28.4.tgz", - "integrity": "sha512-7LJhp7mG1Vf6ODcd8TAXXowBfVDHou2EgASUV3uzsFVIleDwouwbskKG7R3jugI/C0H8rifSHYkeKleiOkthKw==", + "version": "8.28.5", + "resolved": "https://registry.npmjs.org/@wordpress/block-library/-/block-library-8.28.5.tgz", + "integrity": "sha512-NTzp3JXR/dE+HRY/SP396BcYqAfWEqWK4caHGdL5EbG6tZMaO7NdXuMitBnOyC089idIpDuaBQo64ofG0wZycA==", "dependencies": { "@babel/runtime": "^7.16.0", "@wordpress/a11y": "^3.51.1", "@wordpress/api-fetch": "^6.48.1", "@wordpress/autop": "^3.51.1", "@wordpress/blob": "^3.51.1", - "@wordpress/block-editor": "^12.19.4", - "@wordpress/blocks": "^12.28.4", - "@wordpress/components": "^26.0.3", + "@wordpress/block-editor": "^12.19.5", + "@wordpress/blocks": "^12.28.5", + "@wordpress/components": "^26.0.4", "@wordpress/compose": "^6.28.1", - "@wordpress/core-data": "^6.28.4", + "@wordpress/core-data": "^6.28.5", "@wordpress/data": "^9.21.1", "@wordpress/date": "^4.51.1", "@wordpress/deprecated": "^3.51.1", @@ -6311,17 +6311,17 @@ "@wordpress/hooks": "^3.51.1", "@wordpress/html-entities": "^3.51.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/icons": "^9.42.2", - "@wordpress/interactivity": "^5.0.2", - "@wordpress/interactivity-router": "^1.1.2", + "@wordpress/icons": "^9.42.3", + "@wordpress/interactivity": "^5.0.3", + "@wordpress/interactivity-router": "^1.1.3", "@wordpress/keycodes": "^3.51.1", "@wordpress/notices": "^4.19.1", - "@wordpress/patterns": "^1.12.4", + "@wordpress/patterns": "^1.12.5", "@wordpress/primitives": "^3.49.1", "@wordpress/private-apis": "^0.33.1", - "@wordpress/reusable-blocks": "^4.28.4", - "@wordpress/rich-text": "^6.28.2", - "@wordpress/server-side-render": "^4.28.4", + "@wordpress/reusable-blocks": "^4.28.5", + "@wordpress/rich-text": "^6.28.3", + "@wordpress/server-side-render": "^4.28.5", "@wordpress/url": "^3.52.1", "@wordpress/viewport": "^5.28.1", "@wordpress/wordcount": "^3.51.1", @@ -6355,9 +6355,9 @@ } }, "node_modules/@wordpress/blocks": { - "version": "12.28.4", - "resolved": "https://registry.npmjs.org/@wordpress/blocks/-/blocks-12.28.4.tgz", - "integrity": "sha512-Ru7NWWpIUsYSyyARPVrXp6h13cX1hXoDMgaJpdtGY/wkbae7JXRwMBJTMfbophLA2e8uDlYD7YPzlc41Ob1mcA==", + "version": "12.28.5", + "resolved": "https://registry.npmjs.org/@wordpress/blocks/-/blocks-12.28.5.tgz", + "integrity": "sha512-OR5Tl4uzgJnpC7IH/0KCUz9To4pJ8lj64NA5sCEIJK0vSVJPEPXTkiUp0f4Y2gOm0r593Aya/4yYoGOVxoPEoA==", "dependencies": { "@babel/runtime": "^7.16.0", "@wordpress/autop": "^3.51.1", @@ -6373,7 +6373,7 @@ "@wordpress/i18n": "^4.51.1", "@wordpress/is-shallow-equal": "^4.51.1", "@wordpress/private-apis": "^0.33.1", - "@wordpress/rich-text": "^6.28.2", + "@wordpress/rich-text": "^6.28.3", "@wordpress/shortcode": "^3.51.1", "change-case": "^4.1.2", "colord": "^2.7.0", @@ -6405,16 +6405,16 @@ } }, "node_modules/@wordpress/commands": { - "version": "0.22.3", - "resolved": "https://registry.npmjs.org/@wordpress/commands/-/commands-0.22.3.tgz", - "integrity": "sha512-SfNotavInxYFrrX5UoBAl75b6cZCjOY+RY01GwCNLNJQyv5KBLnioSYJcPi2K1yEZF+hH+hzX2D7HqqTQwL2zA==", + "version": "0.22.4", + "resolved": "https://registry.npmjs.org/@wordpress/commands/-/commands-0.22.4.tgz", + "integrity": "sha512-mGg1Uw3mKqxc6Ok9p1TgIdSgGSheoaN0ZMa09cIVH/n9Vl22KRbMB3wsUaIAWsKxrgcsOA/uejEaMcRBYLXEtw==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/components": "^26.0.3", + "@wordpress/components": "^26.0.4", "@wordpress/data": "^9.21.1", "@wordpress/element": "^5.28.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/icons": "^9.42.2", + "@wordpress/icons": "^9.42.3", "@wordpress/keyboard-shortcuts": "^4.28.1", "@wordpress/private-apis": "^0.33.1", "classnames": "^2.3.1", @@ -6430,9 +6430,9 @@ } }, "node_modules/@wordpress/components": { - "version": "26.0.3", - "resolved": "https://registry.npmjs.org/@wordpress/components/-/components-26.0.3.tgz", - "integrity": "sha512-lxZnd/q/Z0SU0RUempE8HO3ipTkkiYsU/d/f+bwADpS+Fm+sZM14U1SEu816QVYVUkjXytP4N7jIe2X0A4Oybw==", + "version": "26.0.4", + "resolved": "https://registry.npmjs.org/@wordpress/components/-/components-26.0.4.tgz", + "integrity": "sha512-2AQLZEjIyx8H62lQ3/KDSoa1f6WXtl6+7poiJkD0OF/8GFs7fZtcPyBxmnXgd5C5ZE54GAizbPkFHVbeBqyl+Q==", "dependencies": { "@ariakit/react": "^0.3.12", "@babel/runtime": "^7.16.0", @@ -6456,12 +6456,12 @@ "@wordpress/hooks": "^3.51.1", "@wordpress/html-entities": "^3.51.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/icons": "^9.42.2", + "@wordpress/icons": "^9.42.3", "@wordpress/is-shallow-equal": "^4.51.1", "@wordpress/keycodes": "^3.51.1", "@wordpress/primitives": "^3.49.1", "@wordpress/private-apis": "^0.33.1", - "@wordpress/rich-text": "^6.28.2", + "@wordpress/rich-text": "^6.28.3", "@wordpress/warning": "^2.51.1", "change-case": "^4.1.2", "classnames": "^2.3.1", @@ -6519,19 +6519,19 @@ } }, "node_modules/@wordpress/core-commands": { - "version": "0.20.4", - "resolved": "https://registry.npmjs.org/@wordpress/core-commands/-/core-commands-0.20.4.tgz", - "integrity": "sha512-wo0JANDjopQQgDVFLNKlrAu300ATDnC1joloVTII2r/lTQQa8/1+FjZmU9Q52JKTM8sE461Fm3wmdj128toyPg==", + "version": "0.20.5", + "resolved": "https://registry.npmjs.org/@wordpress/core-commands/-/core-commands-0.20.5.tgz", + "integrity": "sha512-25rpA326s4vSzBIP/ZX+wThDic4VS1h7iVAzZutdTno80MWHJU03T95wqHqDSAkNjwhYk3PGsxQk68N2Qib5mA==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/block-editor": "^12.19.4", - "@wordpress/commands": "^0.22.3", + "@wordpress/block-editor": "^12.19.5", + "@wordpress/commands": "^0.22.4", "@wordpress/compose": "^6.28.1", - "@wordpress/core-data": "^6.28.4", + "@wordpress/core-data": "^6.28.5", "@wordpress/data": "^9.21.1", "@wordpress/element": "^5.28.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/icons": "^9.42.2", + "@wordpress/icons": "^9.42.3", "@wordpress/private-apis": "^0.33.1", "@wordpress/router": "^0.20.1", "@wordpress/url": "^3.52.1" @@ -6545,14 +6545,14 @@ } }, "node_modules/@wordpress/core-data": { - "version": "6.28.4", - "resolved": "https://registry.npmjs.org/@wordpress/core-data/-/core-data-6.28.4.tgz", - "integrity": "sha512-ZQCzLEFWNLo2orcUe1r2yTZqACPv2/U3Fm6Pgp1jNQ9xeIl0koZPxNZv11ez2g641hibZLLit1afLwkm8PmAQw==", + "version": "6.28.5", + "resolved": "https://registry.npmjs.org/@wordpress/core-data/-/core-data-6.28.5.tgz", + "integrity": "sha512-/ppBrwkta8tGTo0CfDqFksNaJXlUOMRlOEbbsCp7jODOK9DI17c/JN9OjMBHEdjwZC3kvWqJ1i5mMjurLV+ZIA==", "dependencies": { "@babel/runtime": "^7.16.0", "@wordpress/api-fetch": "^6.48.1", - "@wordpress/block-editor": "^12.19.4", - "@wordpress/blocks": "^12.28.4", + "@wordpress/block-editor": "^12.19.5", + "@wordpress/blocks": "^12.28.5", "@wordpress/compose": "^6.28.1", "@wordpress/data": "^9.21.1", "@wordpress/deprecated": "^3.51.1", @@ -6561,7 +6561,7 @@ "@wordpress/i18n": "^4.51.1", "@wordpress/is-shallow-equal": "^4.51.1", "@wordpress/private-apis": "^0.33.1", - "@wordpress/rich-text": "^6.28.2", + "@wordpress/rich-text": "^6.28.3", "@wordpress/sync": "^0.13.1", "@wordpress/undo-manager": "^0.11.1", "@wordpress/url": "^3.52.1", @@ -6581,31 +6581,31 @@ } }, "node_modules/@wordpress/customize-widgets": { - "version": "4.28.4", - "resolved": "https://registry.npmjs.org/@wordpress/customize-widgets/-/customize-widgets-4.28.4.tgz", - "integrity": "sha512-J1wVN7JGparcHyb9aYO+5oy6oIfYHNDErujOMbTCQi3eGD+mikrp+3SmUgpxsnxkON5xLgiGlwDb8+6Upamd5w==", + "version": "4.28.5", + "resolved": "https://registry.npmjs.org/@wordpress/customize-widgets/-/customize-widgets-4.28.5.tgz", + "integrity": "sha512-+aTHK0X8HM02GpgLbXDjH1dK1sk8J/Qo9MFS+stE9mLOl9nz6TOzPyGC59OAIdKtp6UspTSYjtpg5aVDnyJ2SA==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/block-editor": "^12.19.4", - "@wordpress/block-library": "^8.28.4", - "@wordpress/blocks": "^12.28.4", - "@wordpress/components": "^26.0.3", + "@wordpress/block-editor": "^12.19.5", + "@wordpress/block-library": "^8.28.5", + "@wordpress/blocks": "^12.28.5", + "@wordpress/components": "^26.0.4", "@wordpress/compose": "^6.28.1", - "@wordpress/core-data": "^6.28.4", + "@wordpress/core-data": "^6.28.5", "@wordpress/data": "^9.21.1", "@wordpress/dom": "^3.51.1", "@wordpress/element": "^5.28.1", "@wordpress/hooks": "^3.51.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/icons": "^9.42.2", - "@wordpress/interface": "^5.28.3", + "@wordpress/icons": "^9.42.3", + "@wordpress/interface": "^5.28.4", "@wordpress/is-shallow-equal": "^4.51.1", "@wordpress/keyboard-shortcuts": "^4.28.1", "@wordpress/keycodes": "^3.51.1", "@wordpress/media-utils": "^4.42.1", - "@wordpress/preferences": "^3.28.3", + "@wordpress/preferences": "^3.28.4", "@wordpress/private-apis": "^0.33.1", - "@wordpress/widgets": "^3.28.4", + "@wordpress/widgets": "^3.28.5", "classnames": "^2.3.1", "fast-deep-equal": "^3.1.3" }, @@ -6663,18 +6663,18 @@ } }, "node_modules/@wordpress/dataviews": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/@wordpress/dataviews/-/dataviews-0.5.4.tgz", - "integrity": "sha512-O6N8WD67G8M+ws8qup3M931a/OXpI4S/LhofAUvwHdiBfBPNEKHp33J0w6+EYa2QQWw3R+/Mfhga4287jCqCsA==", + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/@wordpress/dataviews/-/dataviews-0.5.5.tgz", + "integrity": "sha512-m6d7z6HZIVDZk0CwNSMUqGOkoV4l+sJ8PVnlpXM0O4jHBxOhfOBjRH6A3OJSYLwMbFnTvvMyNDQju24W7cuEYQ==", "dependencies": { "@ariakit/react": "^0.3.12", "@babel/runtime": "^7.16.0", "@wordpress/a11y": "^3.51.1", - "@wordpress/components": "^26.0.3", + "@wordpress/components": "^26.0.4", "@wordpress/compose": "^6.28.1", "@wordpress/element": "^5.28.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/icons": "^9.42.2", + "@wordpress/icons": "^9.42.3", "@wordpress/keycodes": "^3.51.1", "@wordpress/primitives": "^3.49.1", "@wordpress/private-apis": "^0.33.1", @@ -6775,9 +6775,9 @@ } }, "node_modules/@wordpress/e2e-test-utils-playwright": { - "version": "0.19.1", - "resolved": "https://registry.npmjs.org/@wordpress/e2e-test-utils-playwright/-/e2e-test-utils-playwright-0.19.1.tgz", - "integrity": "sha512-/UIOhYpb8wBSRMIpZyjkDv4Sb7//lHrLRqe6B8tNUhTBfkLl0PDPedZZubnW3L4x0nagEl3v/6B+2JomIW3n+g==", + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/@wordpress/e2e-test-utils-playwright/-/e2e-test-utils-playwright-0.19.2.tgz", + "integrity": "sha512-pB/WsJwtbKLrKEhdr8HEmjThP6XGuFJmEHfxSm76l/S5Hc0dzhFHAYojk3iu0VEZMUlgppUNYfXTab8JTCkwBA==", "dev": true, "dependencies": { "@wordpress/api-fetch": "^6.48.1", @@ -6838,41 +6838,41 @@ } }, "node_modules/@wordpress/edit-post": { - "version": "7.28.4", - "resolved": "https://registry.npmjs.org/@wordpress/edit-post/-/edit-post-7.28.4.tgz", - "integrity": "sha512-a6MhLh7tHUrMuREn9YkoyF1AAgvp8ZTtWYNgjJDSiCmi/mTCLkJ6hMoa81tYjG30jUaEnlTRccxrK1dxh6lFfw==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@wordpress/edit-post/-/edit-post-7.28.5.tgz", + "integrity": "sha512-m2WCPZ0LdXkdHvs9XJnhuD9+rXb2Ckc+ZMzodK6jPc472btFKvnULNKtW0wyqpBLmDUrlUgf8MpTkdhtsf26cg==", "dependencies": { "@babel/runtime": "^7.16.0", "@wordpress/a11y": "^3.51.1", "@wordpress/api-fetch": "^6.48.1", - "@wordpress/block-editor": "^12.19.4", - "@wordpress/block-library": "^8.28.4", - "@wordpress/blocks": "^12.28.4", - "@wordpress/commands": "^0.22.3", - "@wordpress/components": "^26.0.3", + "@wordpress/block-editor": "^12.19.5", + "@wordpress/block-library": "^8.28.5", + "@wordpress/blocks": "^12.28.5", + "@wordpress/commands": "^0.22.4", + "@wordpress/components": "^26.0.4", "@wordpress/compose": "^6.28.1", - "@wordpress/core-commands": "^0.20.4", - "@wordpress/core-data": "^6.28.4", + "@wordpress/core-commands": "^0.20.5", + "@wordpress/core-data": "^6.28.5", "@wordpress/data": "^9.21.1", "@wordpress/deprecated": "^3.51.1", "@wordpress/dom": "^3.51.1", - "@wordpress/editor": "^13.28.4", + "@wordpress/editor": "^13.28.5", "@wordpress/element": "^5.28.1", "@wordpress/hooks": "^3.51.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/icons": "^9.42.2", - "@wordpress/interface": "^5.28.3", + "@wordpress/icons": "^9.42.3", + "@wordpress/interface": "^5.28.4", "@wordpress/keyboard-shortcuts": "^4.28.1", "@wordpress/keycodes": "^3.51.1", "@wordpress/media-utils": "^4.42.1", "@wordpress/notices": "^4.19.1", - "@wordpress/plugins": "^6.19.3", - "@wordpress/preferences": "^3.28.3", + "@wordpress/plugins": "^6.19.4", + "@wordpress/preferences": "^3.28.4", "@wordpress/private-apis": "^0.33.1", "@wordpress/url": "^3.52.1", "@wordpress/viewport": "^5.28.1", "@wordpress/warning": "^2.51.1", - "@wordpress/widgets": "^3.28.4", + "@wordpress/widgets": "^3.28.5", "classnames": "^2.3.1", "memize": "^2.1.0", "rememo": "^4.0.2" @@ -6886,50 +6886,50 @@ } }, "node_modules/@wordpress/edit-site": { - "version": "5.28.4", - "resolved": "https://registry.npmjs.org/@wordpress/edit-site/-/edit-site-5.28.4.tgz", - "integrity": "sha512-9jCpfLKTTxNogbPXhtzMrzU6CyT+eOiKUXXGN/xuOfC44AL1htid21pWSJ9CmIzwRWNdLBzKpUaa8Lh6ehgiGA==", + "version": "5.28.5", + "resolved": "https://registry.npmjs.org/@wordpress/edit-site/-/edit-site-5.28.5.tgz", + "integrity": "sha512-b5QhF2qt5xHJa/UXp/KpOTlstTmMuUg3cXz6WIS59r5ZLtb4669c3mZOKcnhek3RFygXPWwa8a3fIzK08OY82w==", "dependencies": { "@babel/runtime": "^7.16.0", "@wordpress/a11y": "^3.51.1", "@wordpress/api-fetch": "^6.48.1", "@wordpress/blob": "^3.51.1", - "@wordpress/block-editor": "^12.19.4", - "@wordpress/block-library": "^8.28.4", - "@wordpress/blocks": "^12.28.4", - "@wordpress/commands": "^0.22.3", - "@wordpress/components": "^26.0.3", + "@wordpress/block-editor": "^12.19.5", + "@wordpress/block-library": "^8.28.5", + "@wordpress/blocks": "^12.28.5", + "@wordpress/commands": "^0.22.4", + "@wordpress/components": "^26.0.4", "@wordpress/compose": "^6.28.1", - "@wordpress/core-commands": "^0.20.4", - "@wordpress/core-data": "^6.28.4", + "@wordpress/core-commands": "^0.20.5", + "@wordpress/core-data": "^6.28.5", "@wordpress/data": "^9.21.1", - "@wordpress/dataviews": "^0.5.4", + "@wordpress/dataviews": "^0.5.5", "@wordpress/date": "^4.51.1", "@wordpress/deprecated": "^3.51.1", "@wordpress/dom": "^3.51.1", - "@wordpress/editor": "^13.28.4", + "@wordpress/editor": "^13.28.5", "@wordpress/element": "^5.28.1", "@wordpress/escape-html": "^2.51.1", "@wordpress/hooks": "^3.51.1", "@wordpress/html-entities": "^3.51.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/icons": "^9.42.2", - "@wordpress/interface": "^5.28.3", + "@wordpress/icons": "^9.42.3", + "@wordpress/interface": "^5.28.4", "@wordpress/keyboard-shortcuts": "^4.28.1", "@wordpress/keycodes": "^3.51.1", "@wordpress/media-utils": "^4.42.1", "@wordpress/notices": "^4.19.1", - "@wordpress/patterns": "^1.12.4", - "@wordpress/plugins": "^6.19.3", - "@wordpress/preferences": "^3.28.3", + "@wordpress/patterns": "^1.12.5", + "@wordpress/plugins": "^6.19.4", + "@wordpress/preferences": "^3.28.4", "@wordpress/primitives": "^3.49.1", "@wordpress/private-apis": "^0.33.1", - "@wordpress/reusable-blocks": "^4.28.4", + "@wordpress/reusable-blocks": "^4.28.5", "@wordpress/router": "^0.20.1", "@wordpress/style-engine": "^1.34.1", "@wordpress/url": "^3.52.1", "@wordpress/viewport": "^5.28.1", - "@wordpress/widgets": "^3.28.4", + "@wordpress/widgets": "^3.28.5", "@wordpress/wordcount": "^3.51.1", "change-case": "^4.1.2", "classnames": "^2.3.1", @@ -6951,37 +6951,37 @@ } }, "node_modules/@wordpress/edit-widgets": { - "version": "5.28.4", - "resolved": "https://registry.npmjs.org/@wordpress/edit-widgets/-/edit-widgets-5.28.4.tgz", - "integrity": "sha512-RkFE6Jb+HH7u1nFTHQUs6xZst1T8dIK4nJW2YLfs/Eol2teHzZSzYCH+mUZrW3Be7WFlOf9FjKSfZ9TioWPS8Q==", + "version": "5.28.5", + "resolved": "https://registry.npmjs.org/@wordpress/edit-widgets/-/edit-widgets-5.28.5.tgz", + "integrity": "sha512-9soQuWZBjlsKi32utsd4vn5G74a5isFY0wi/QTQnfYHpenmLYhZnl4obJ5tHMbWR35w6g6WHq72jZHZya7gITQ==", "dependencies": { "@babel/runtime": "^7.16.0", "@wordpress/api-fetch": "^6.48.1", - "@wordpress/block-editor": "^12.19.4", - "@wordpress/block-library": "^8.28.4", - "@wordpress/blocks": "^12.28.4", - "@wordpress/components": "^26.0.3", + "@wordpress/block-editor": "^12.19.5", + "@wordpress/block-library": "^8.28.5", + "@wordpress/blocks": "^12.28.5", + "@wordpress/components": "^26.0.4", "@wordpress/compose": "^6.28.1", - "@wordpress/core-data": "^6.28.4", + "@wordpress/core-data": "^6.28.5", "@wordpress/data": "^9.21.1", "@wordpress/deprecated": "^3.51.1", "@wordpress/dom": "^3.51.1", "@wordpress/element": "^5.28.1", "@wordpress/hooks": "^3.51.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/icons": "^9.42.2", - "@wordpress/interface": "^5.28.3", + "@wordpress/icons": "^9.42.3", + "@wordpress/interface": "^5.28.4", "@wordpress/keyboard-shortcuts": "^4.28.1", "@wordpress/keycodes": "^3.51.1", "@wordpress/media-utils": "^4.42.1", "@wordpress/notices": "^4.19.1", - "@wordpress/patterns": "^1.12.4", - "@wordpress/plugins": "^6.19.3", - "@wordpress/preferences": "^3.28.3", + "@wordpress/patterns": "^1.12.5", + "@wordpress/plugins": "^6.19.4", + "@wordpress/preferences": "^3.28.4", "@wordpress/private-apis": "^0.33.1", - "@wordpress/reusable-blocks": "^4.28.4", + "@wordpress/reusable-blocks": "^4.28.5", "@wordpress/url": "^3.52.1", - "@wordpress/widgets": "^3.28.4", + "@wordpress/widgets": "^3.28.5", "classnames": "^2.3.1", "rememo": "^4.0.2" }, @@ -6994,20 +6994,20 @@ } }, "node_modules/@wordpress/editor": { - "version": "13.28.4", - "resolved": "https://registry.npmjs.org/@wordpress/editor/-/editor-13.28.4.tgz", - "integrity": "sha512-lMGh4HvDmv8kh+PTBWO9m2085QrgKbIPlrYFV1JbGr4YmAZgiSbC6hMYG+07tss1vgLqm50tnqK8KQGwOb7idw==", + "version": "13.28.5", + "resolved": "https://registry.npmjs.org/@wordpress/editor/-/editor-13.28.5.tgz", + "integrity": "sha512-6Tnzz7iQSQWIJRXwXacwN0jouhqkAEvtdaAKslDFXoqT+z4jgjf6wGphPBgqUG6PPfp0BBUUNwXThBBcIwhNqA==", "dependencies": { "@babel/runtime": "^7.16.0", "@wordpress/a11y": "^3.51.1", "@wordpress/api-fetch": "^6.48.1", "@wordpress/blob": "^3.51.1", - "@wordpress/block-editor": "^12.19.4", - "@wordpress/blocks": "^12.28.4", - "@wordpress/commands": "^0.22.3", - "@wordpress/components": "^26.0.3", + "@wordpress/block-editor": "^12.19.5", + "@wordpress/blocks": "^12.28.5", + "@wordpress/commands": "^0.22.4", + "@wordpress/components": "^26.0.4", "@wordpress/compose": "^6.28.1", - "@wordpress/core-data": "^6.28.4", + "@wordpress/core-data": "^6.28.5", "@wordpress/data": "^9.21.1", "@wordpress/date": "^4.51.1", "@wordpress/deprecated": "^3.51.1", @@ -7016,17 +7016,17 @@ "@wordpress/hooks": "^3.51.1", "@wordpress/html-entities": "^3.51.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/icons": "^9.42.2", + "@wordpress/icons": "^9.42.3", "@wordpress/keyboard-shortcuts": "^4.28.1", "@wordpress/keycodes": "^3.51.1", "@wordpress/media-utils": "^4.42.1", "@wordpress/notices": "^4.19.1", - "@wordpress/patterns": "^1.12.4", - "@wordpress/preferences": "^3.28.3", + "@wordpress/patterns": "^1.12.5", + "@wordpress/preferences": "^3.28.4", "@wordpress/private-apis": "^0.33.1", - "@wordpress/reusable-blocks": "^4.28.4", - "@wordpress/rich-text": "^6.28.2", - "@wordpress/server-side-render": "^4.28.4", + "@wordpress/reusable-blocks": "^4.28.5", + "@wordpress/rich-text": "^6.28.3", + "@wordpress/server-side-render": "^4.28.5", "@wordpress/url": "^3.52.1", "@wordpress/wordcount": "^3.51.1", "classnames": "^2.3.1", @@ -7132,22 +7132,22 @@ } }, "node_modules/@wordpress/format-library": { - "version": "4.28.4", - "resolved": "https://registry.npmjs.org/@wordpress/format-library/-/format-library-4.28.4.tgz", - "integrity": "sha512-pAtkqIopQ9Ps8Dm5Xf7irPwY+MMGlqfvW7xYqeid/VYidXUCDzQmwZPcBAUF4Pme+gU1AZ5SDWK9xXfl3lWvBA==", + "version": "4.28.5", + "resolved": "https://registry.npmjs.org/@wordpress/format-library/-/format-library-4.28.5.tgz", + "integrity": "sha512-ndvea8gYEcdke8GKC3qHDpN46UcnBcf3y+nptiXUFBcHpPkU/mLuXbdb0mTbmItYTNXZrPtzVDNci2QNG+d6Dw==", "dependencies": { "@babel/runtime": "^7.16.0", "@wordpress/a11y": "^3.51.1", - "@wordpress/block-editor": "^12.19.4", - "@wordpress/components": "^26.0.3", + "@wordpress/block-editor": "^12.19.5", + "@wordpress/components": "^26.0.4", "@wordpress/compose": "^6.28.1", "@wordpress/data": "^9.21.1", "@wordpress/element": "^5.28.1", "@wordpress/html-entities": "^3.51.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/icons": "^9.42.2", + "@wordpress/icons": "^9.42.3", "@wordpress/private-apis": "^0.33.1", - "@wordpress/rich-text": "^6.28.2", + "@wordpress/rich-text": "^6.28.3", "@wordpress/url": "^3.52.1" }, "engines": { @@ -7200,9 +7200,9 @@ } }, "node_modules/@wordpress/icons": { - "version": "9.42.2", - "resolved": "https://registry.npmjs.org/@wordpress/icons/-/icons-9.42.2.tgz", - "integrity": "sha512-WUXAHxeLw342VYr6GsxXrQbXwxwecBNEfyRtmHXoffaYINn1OIkn9TXkLKzjDOSILa4ZaYgtobYN/IqVe3WE1A==", + "version": "9.42.3", + "resolved": "https://registry.npmjs.org/@wordpress/icons/-/icons-9.42.3.tgz", + "integrity": "sha512-GSbBVXoLadzrdUXj7ahslEdaA3p/FqnQYDUOHM0Z5QTmTl77J7yJ4V6o+iMIOagoMaoe1hhDzDpj1FaU/CiPcg==", "dependencies": { "@babel/runtime": "^7.16.0", "@wordpress/element": "^5.28.1", @@ -7213,9 +7213,9 @@ } }, "node_modules/@wordpress/interactivity": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@wordpress/interactivity/-/interactivity-5.0.2.tgz", - "integrity": "sha512-Wx9XrzFLYap5OpHTcQTn6kwhj6Srglh2447qCFsYad28byvMHSXcIXHQXsNLWvB2LUjSqg+zWLHW05AOU6sOqQ==", + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/@wordpress/interactivity/-/interactivity-5.0.3.tgz", + "integrity": "sha512-oSJ8Z725c0caYcxlwrDNpnTluYbdDLPjsUIE1avr9g2Ul9KTiRnZ/k+FIjGsJvnXssEEOAvxGS8KPEXH/E4cVA==", "dependencies": { "@preact/signals": "^1.2.2", "deepsignal": "^1.4.0", @@ -7226,32 +7226,32 @@ } }, "node_modules/@wordpress/interactivity-router": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@wordpress/interactivity-router/-/interactivity-router-1.1.2.tgz", - "integrity": "sha512-vzRssi2tzpDO063wY4Fdi883aBqH5PVRti8uebqU5StrkbkJp+PGDBA6mX5r7FiaNx0ePR/VMJxH86EEoqbaEw==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@wordpress/interactivity-router/-/interactivity-router-1.1.3.tgz", + "integrity": "sha512-p6r6WalHukPi7pEjXJnsjghCCR9vuuE28l24vKU5MzUimVvU4Cl9Pykncpuyjt312azkQLEKRroAGPmEvoxVXg==", "dependencies": { - "@wordpress/interactivity": "^5.0.2" + "@wordpress/interactivity": "^5.0.3" }, "engines": { "node": ">=12" } }, "node_modules/@wordpress/interface": { - "version": "5.28.3", - "resolved": "https://registry.npmjs.org/@wordpress/interface/-/interface-5.28.3.tgz", - "integrity": "sha512-X7c8ymfEBwScD/xqCGxjZ3OQHt2lBA879/prVEOOx3swcEEuuXgO1UE0sLDQ6YH6kSa+OSzHD2bzA8JfMLYrZg==", + "version": "5.28.4", + "resolved": "https://registry.npmjs.org/@wordpress/interface/-/interface-5.28.4.tgz", + "integrity": "sha512-lRxvjTOoTP97hzZpk1znHCOxbtVYlMiHQ3FlNwN7DmcHWP+DXY+xpo8bM6OLIkqOa7FtHwT8RgT7OEzLhyli/w==", "dependencies": { "@babel/runtime": "^7.16.0", "@wordpress/a11y": "^3.51.1", - "@wordpress/components": "^26.0.3", + "@wordpress/components": "^26.0.4", "@wordpress/compose": "^6.28.1", "@wordpress/data": "^9.21.1", "@wordpress/deprecated": "^3.51.1", "@wordpress/element": "^5.28.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/icons": "^9.42.2", - "@wordpress/plugins": "^6.19.3", - "@wordpress/preferences": "^3.28.3", + "@wordpress/icons": "^9.42.3", + "@wordpress/plugins": "^6.19.4", + "@wordpress/preferences": "^3.28.4", "@wordpress/private-apis": "^0.33.1", "@wordpress/viewport": "^5.28.1", "classnames": "^2.3.1" @@ -7339,14 +7339,14 @@ } }, "node_modules/@wordpress/list-reusable-blocks": { - "version": "4.28.3", - "resolved": "https://registry.npmjs.org/@wordpress/list-reusable-blocks/-/list-reusable-blocks-4.28.3.tgz", - "integrity": "sha512-O2Y1XneAQ0XQne+/PgHNxiMbmpjEQv4s0+2LQPpboJ1Do3GTIHLR+ab0iMAxMDnjCSzfA6YACy6iLKQdzw+Q5w==", + "version": "4.28.4", + "resolved": "https://registry.npmjs.org/@wordpress/list-reusable-blocks/-/list-reusable-blocks-4.28.4.tgz", + "integrity": "sha512-DBUo3h0xkXSuXOqv3LTeEp9YCRyxXEqrkvYkU0M0k4WiSVcnxyH4YFWI/9tPIy096eVROjn3QfjW4OIOHv9WRQ==", "dependencies": { "@babel/runtime": "^7.16.0", "@wordpress/api-fetch": "^6.48.1", "@wordpress/blob": "^3.51.1", - "@wordpress/components": "^26.0.3", + "@wordpress/components": "^26.0.4", "@wordpress/compose": "^6.28.1", "@wordpress/element": "^5.28.1", "@wordpress/i18n": "^4.51.1", @@ -7404,18 +7404,18 @@ } }, "node_modules/@wordpress/nux": { - "version": "8.13.3", - "resolved": "https://registry.npmjs.org/@wordpress/nux/-/nux-8.13.3.tgz", - "integrity": "sha512-zLhC1ORL69Jew4KGyTKUilHVZAbdO8nv/0SPeumMpM5+seITZD3kCILObEdsQr5zwkxgAkmUIA0xdkwc+nMYPw==", + "version": "8.13.4", + "resolved": "https://registry.npmjs.org/@wordpress/nux/-/nux-8.13.4.tgz", + "integrity": "sha512-9d1Lid+TOifgyomtj6d7ZNFsBvNVrZqghB36x8n4qSnsb0OGaWMCPGfIZu3ONrKRnNHNimFr43VAEPWwouOPJA==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/components": "^26.0.3", + "@wordpress/components": "^26.0.4", "@wordpress/compose": "^6.28.1", "@wordpress/data": "^9.21.1", "@wordpress/deprecated": "^3.51.1", "@wordpress/element": "^5.28.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/icons": "^9.42.2", + "@wordpress/icons": "^9.42.3", "rememo": "^4.0.2" }, "engines": { @@ -7427,26 +7427,25 @@ } }, "node_modules/@wordpress/patterns": { - "version": "1.12.4", - "resolved": "https://registry.npmjs.org/@wordpress/patterns/-/patterns-1.12.4.tgz", - "integrity": "sha512-A2JKUTSgyNWvSkntaz2aUSPHxKnZSuE/1vRdqCDeZGRPGO7H25Y3564M1+iuUHXz6dtcsIupv6k3lYHxNASnBA==", + "version": "1.12.5", + "resolved": "https://registry.npmjs.org/@wordpress/patterns/-/patterns-1.12.5.tgz", + "integrity": "sha512-ylke7nIGzo1c6xCoUrfV58qnfyl/U9Fn3VVjFbhFRI3Fz75nxcQ9PQWnORDrm/laEaGmtYsW81grec/ddv3vWg==", "dependencies": { "@babel/runtime": "^7.16.0", "@wordpress/a11y": "^3.51.1", - "@wordpress/block-editor": "^12.19.4", - "@wordpress/blocks": "^12.28.4", - "@wordpress/components": "^26.0.3", + "@wordpress/block-editor": "^12.19.5", + "@wordpress/blocks": "^12.28.5", + "@wordpress/components": "^26.0.4", "@wordpress/compose": "^6.28.1", - "@wordpress/core-data": "^6.28.4", + "@wordpress/core-data": "^6.28.5", "@wordpress/data": "^9.21.1", "@wordpress/element": "^5.28.1", "@wordpress/html-entities": "^3.51.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/icons": "^9.42.2", + "@wordpress/icons": "^9.42.3", "@wordpress/notices": "^4.19.1", "@wordpress/private-apis": "^0.33.1", - "@wordpress/url": "^3.52.1", - "nanoid": "^3.3.4" + "@wordpress/url": "^3.52.1" }, "engines": { "node": ">=16.0.0" @@ -7457,16 +7456,16 @@ } }, "node_modules/@wordpress/plugins": { - "version": "6.19.3", - "resolved": "https://registry.npmjs.org/@wordpress/plugins/-/plugins-6.19.3.tgz", - "integrity": "sha512-Cs5Q2yppghuStVtQVx+KJIYiXUTy6X38bIijHSgnJxY0kiYlWQgwYKUWRM/yJ05bSGOA6okzSXiA6MUvNtuNLQ==", + "version": "6.19.4", + "resolved": "https://registry.npmjs.org/@wordpress/plugins/-/plugins-6.19.4.tgz", + "integrity": "sha512-ID0et2/LZbtR/ODQK/nxt7ndQmVXTuPt6azbqaykm5nQyMpbY8u0c/mneuvYmmyGWAbUrJ51G1XD3cGyXxsgjg==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/components": "^26.0.3", + "@wordpress/components": "^26.0.4", "@wordpress/compose": "^6.28.1", "@wordpress/element": "^5.28.1", "@wordpress/hooks": "^3.51.1", - "@wordpress/icons": "^9.42.2", + "@wordpress/icons": "^9.42.3", "@wordpress/is-shallow-equal": "^4.51.1", "memize": "^2.0.1" }, @@ -7495,19 +7494,19 @@ } }, "node_modules/@wordpress/preferences": { - "version": "3.28.3", - "resolved": "https://registry.npmjs.org/@wordpress/preferences/-/preferences-3.28.3.tgz", - "integrity": "sha512-caRpPrXbHF9z2E19ERsHSiHDxON21GA3U5Hls+kl8hSQJRWX11vcIWiOxyBroFXPldJbsuPxbU43aQCPGSeLZg==", + "version": "3.28.4", + "resolved": "https://registry.npmjs.org/@wordpress/preferences/-/preferences-3.28.4.tgz", + "integrity": "sha512-Kcbbj0H38h4qlqjcs4g1EGPUKeNAvXkmU/BzgDkJZPBoIud0SdXT7Tj9hnwNSuR+7CfL7/3aoELSrp98L5uWow==", "dependencies": { "@babel/runtime": "^7.16.0", "@wordpress/a11y": "^3.51.1", - "@wordpress/components": "^26.0.3", + "@wordpress/components": "^26.0.4", "@wordpress/compose": "^6.28.1", "@wordpress/data": "^9.21.1", "@wordpress/deprecated": "^3.51.1", "@wordpress/element": "^5.28.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/icons": "^9.42.2", + "@wordpress/icons": "^9.42.3", "@wordpress/private-apis": "^0.33.1", "classnames": "^2.3.1" }, @@ -7597,19 +7596,19 @@ } }, "node_modules/@wordpress/reusable-blocks": { - "version": "4.28.4", - "resolved": "https://registry.npmjs.org/@wordpress/reusable-blocks/-/reusable-blocks-4.28.4.tgz", - "integrity": "sha512-KxC9PscnfW+1GjFNU1i8jLxhXdqQtYPnCjZaUE2fLKP8bRCfOWMTTcBz4ZAFgmUKoFMfrsz0RKSxQ6zyyqfFJQ==", + "version": "4.28.5", + "resolved": "https://registry.npmjs.org/@wordpress/reusable-blocks/-/reusable-blocks-4.28.5.tgz", + "integrity": "sha512-lgc2nl5LZ+b24HuuN6v753s4qo9DY3Aho9l7qtefyDxXB2YLM5T1ub6RCleRWMG70cuU0m55304s5hP+1+jaqg==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/block-editor": "^12.19.4", - "@wordpress/blocks": "^12.28.4", - "@wordpress/components": "^26.0.3", - "@wordpress/core-data": "^6.28.4", + "@wordpress/block-editor": "^12.19.5", + "@wordpress/blocks": "^12.28.5", + "@wordpress/components": "^26.0.4", + "@wordpress/core-data": "^6.28.5", "@wordpress/data": "^9.21.1", "@wordpress/element": "^5.28.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/icons": "^9.42.2", + "@wordpress/icons": "^9.42.3", "@wordpress/notices": "^4.19.1", "@wordpress/private-apis": "^0.33.1", "@wordpress/url": "^3.52.1" @@ -7623,9 +7622,9 @@ } }, "node_modules/@wordpress/rich-text": { - "version": "6.28.2", - "resolved": "https://registry.npmjs.org/@wordpress/rich-text/-/rich-text-6.28.2.tgz", - "integrity": "sha512-jBvQdCPeRI/zoWTBL3IEF6Y8YN/f6Xv6R94G3b2FldLFVbJoMTRFD4rd8vDHN8AeVOyA0+VIWziLw88ZVD8Qgw==", + "version": "6.28.3", + "resolved": "https://registry.npmjs.org/@wordpress/rich-text/-/rich-text-6.28.3.tgz", + "integrity": "sha512-SOPcn8lpLQEFF/HLI+w7HzuByIX/8/c9nyLMgYntj/Vk64izI4HYnQP6ftTtu/a12S8/C1cXhpH2ZfFNz6jItA==", "dependencies": { "@babel/runtime": "^7.16.0", "@wordpress/a11y": "^3.51.1", @@ -7665,9 +7664,9 @@ } }, "node_modules/@wordpress/scripts": { - "version": "27.2.3", - "resolved": "https://registry.npmjs.org/@wordpress/scripts/-/scripts-27.2.3.tgz", - "integrity": "sha512-h4NeYjfzhC517CwI4P0unvMN40bp5azdvo56osn9LIdlPMyb1Sm3Gu36yotyZWcM5R91lstmg3/RqENP42L5Aw==", + "version": "27.2.4", + "resolved": "https://registry.npmjs.org/@wordpress/scripts/-/scripts-27.2.4.tgz", + "integrity": "sha512-wBEr13XDVwMP1PTwS4IrVYX+46B0EmDsIryUClykbr6XPw1CtIygz08e8sOeWYBgsuW5DQwx30T/9ifwKCRimw==", "dev": true, "dependencies": { "@babel/core": "^7.16.0", @@ -7676,11 +7675,11 @@ "@wordpress/babel-preset-default": "^7.35.1", "@wordpress/browserslist-config": "^5.34.1", "@wordpress/dependency-extraction-webpack-plugin": "^5.2.1", - "@wordpress/e2e-test-utils-playwright": "^0.19.1", + "@wordpress/e2e-test-utils-playwright": "^0.19.2", "@wordpress/eslint-plugin": "^17.8.1", "@wordpress/jest-preset-default": "^11.22.1", "@wordpress/npm-package-json-lint-config": "^4.36.1", - "@wordpress/postcss-plugins-preset": "^4.35.3", + "@wordpress/postcss-plugins-preset": "^4.35.4", "@wordpress/prettier-config": "^3.8.1", "@wordpress/stylelint-config": "^21.34.1", "adm-zip": "^0.5.9", @@ -8084,14 +8083,14 @@ } }, "node_modules/@wordpress/server-side-render": { - "version": "4.28.4", - "resolved": "https://registry.npmjs.org/@wordpress/server-side-render/-/server-side-render-4.28.4.tgz", - "integrity": "sha512-S/d1slui+lLd32rH8D8jp7/sPOOaUdq+XrQx+W50mcf7KOajQfTFt7VeEm8Crow6y0DvZl/LShIMhmrBqvYEJg==", + "version": "4.28.5", + "resolved": "https://registry.npmjs.org/@wordpress/server-side-render/-/server-side-render-4.28.5.tgz", + "integrity": "sha512-/o2Pdzl4Zz8E/V0efo0/v8jP5Pe9dR28QYEzWopHZPpKHeLtSrrqdrnZRddbf3fnmis1+y56h6+eaW+YUTMlQA==", "dependencies": { "@babel/runtime": "^7.16.0", "@wordpress/api-fetch": "^6.48.1", - "@wordpress/blocks": "^12.28.4", - "@wordpress/components": "^26.0.3", + "@wordpress/blocks": "^12.28.5", + "@wordpress/components": "^26.0.4", "@wordpress/compose": "^6.28.1", "@wordpress/data": "^9.21.1", "@wordpress/deprecated": "^3.51.1", @@ -8229,21 +8228,21 @@ } }, "node_modules/@wordpress/widgets": { - "version": "3.28.4", - "resolved": "https://registry.npmjs.org/@wordpress/widgets/-/widgets-3.28.4.tgz", - "integrity": "sha512-/vToY0eZvRV3QXToBsSK1YZ93zBezgKQhMXZpF5Y5nHIWwJU1+1/M0XH2VAhG9xDhP50XGZ7ofGnhREG1atCEw==", + "version": "3.28.5", + "resolved": "https://registry.npmjs.org/@wordpress/widgets/-/widgets-3.28.5.tgz", + "integrity": "sha512-9BoNxIzZGyx2390rZA5Bs0WGZOA0ymwsD5erQ5GYOqj8z+1UTe94WPQne+DhHmYB7rPjOh1zV8xJet2aRhVCUg==", "dependencies": { "@babel/runtime": "^7.16.0", "@wordpress/api-fetch": "^6.48.1", - "@wordpress/block-editor": "^12.19.4", - "@wordpress/blocks": "^12.28.4", - "@wordpress/components": "^26.0.3", + "@wordpress/block-editor": "^12.19.5", + "@wordpress/blocks": "^12.28.5", + "@wordpress/components": "^26.0.4", "@wordpress/compose": "^6.28.1", - "@wordpress/core-data": "^6.28.4", + "@wordpress/core-data": "^6.28.5", "@wordpress/data": "^9.21.1", "@wordpress/element": "^5.28.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/icons": "^9.42.2", + "@wordpress/icons": "^9.42.3", "@wordpress/notices": "^4.19.1", "classnames": "^2.3.1" }, @@ -37623,15 +37622,15 @@ } }, "@wordpress/annotations": { - "version": "2.51.2", - "resolved": "https://registry.npmjs.org/@wordpress/annotations/-/annotations-2.51.2.tgz", - "integrity": "sha512-zGjZJjN9ySItGX1yZkPL2zfGjUWu+kFoHTPyvkBFfKBTIm3Pb0OwpO+teRilzz+tWeSc+dNMpdOry6KxCtC1Qw==", + "version": "2.51.3", + "resolved": "https://registry.npmjs.org/@wordpress/annotations/-/annotations-2.51.3.tgz", + "integrity": "sha512-x2h6WwFsqnuXn5WfQY1AOsb9IkHsu/M3kRpduG42pVVhhIOkLiq8vvAaR52nmB+vrFq5ntGrVr9jaME+OxCRNA==", "requires": { "@babel/runtime": "^7.16.0", "@wordpress/data": "^9.21.1", "@wordpress/hooks": "^3.51.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/rich-text": "^6.28.2", + "@wordpress/rich-text": "^6.28.3", "rememo": "^4.0.2", "uuid": "^9.0.1" } @@ -37695,37 +37694,37 @@ } }, "@wordpress/block-directory": { - "version": "4.28.4", - "resolved": "https://registry.npmjs.org/@wordpress/block-directory/-/block-directory-4.28.4.tgz", - "integrity": "sha512-DFpI7iX8vvunQATOcFbsDpHrIBCTEHP12DlBwhekS4yoG4rD+6OYuLkVW7ROMtL41f/C73nhWjJJJvO+qnO4wA==", + "version": "4.28.5", + "resolved": "https://registry.npmjs.org/@wordpress/block-directory/-/block-directory-4.28.5.tgz", + "integrity": "sha512-/hTWQoxiDLJkG9UG75n/DImstWz5DKotE2Blx8VrMNuWwzl+riSRrvRx6UzfUjx5KCRV5vddu/zjBYQbdFtLyA==", "requires": { "@babel/runtime": "^7.16.0", "@wordpress/a11y": "^3.51.1", "@wordpress/api-fetch": "^6.48.1", - "@wordpress/block-editor": "^12.19.4", - "@wordpress/blocks": "^12.28.4", - "@wordpress/components": "^26.0.3", + "@wordpress/block-editor": "^12.19.5", + "@wordpress/blocks": "^12.28.5", + "@wordpress/components": "^26.0.4", "@wordpress/compose": "^6.28.1", - "@wordpress/core-data": "^6.28.4", + "@wordpress/core-data": "^6.28.5", "@wordpress/data": "^9.21.1", - "@wordpress/edit-post": "^7.28.4", - "@wordpress/editor": "^13.28.4", + "@wordpress/edit-post": "^7.28.5", + "@wordpress/editor": "^13.28.5", "@wordpress/element": "^5.28.1", "@wordpress/hooks": "^3.51.1", "@wordpress/html-entities": "^3.51.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/icons": "^9.42.2", + "@wordpress/icons": "^9.42.3", "@wordpress/notices": "^4.19.1", - "@wordpress/plugins": "^6.19.3", + "@wordpress/plugins": "^6.19.4", "@wordpress/private-apis": "^0.33.1", "@wordpress/url": "^3.52.1", "change-case": "^4.1.2" } }, "@wordpress/block-editor": { - "version": "12.19.4", - "resolved": "https://registry.npmjs.org/@wordpress/block-editor/-/block-editor-12.19.4.tgz", - "integrity": "sha512-ybM9SyVdPdVlm+CPdjzpRp943ryO3nT19BoON/aT02BCXiyzTXto5Xxz0eAnmFseCG2kHhyQZzPxYin2kx31SQ==", + "version": "12.19.5", + "resolved": "https://registry.npmjs.org/@wordpress/block-editor/-/block-editor-12.19.5.tgz", + "integrity": "sha512-SgSdxTNOFDjr4Tq8aZZGofWOebt6MpDBsbYwXFOU5n8Y3phUeGDdyiyeRIQuBQKR4Ti0NZpkxtjxoUcvs00rtQ==", "requires": { "@babel/runtime": "^7.16.0", "@emotion/react": "^11.7.1", @@ -37734,9 +37733,9 @@ "@wordpress/a11y": "^3.51.1", "@wordpress/api-fetch": "^6.48.1", "@wordpress/blob": "^3.51.1", - "@wordpress/blocks": "^12.28.4", - "@wordpress/commands": "^0.22.3", - "@wordpress/components": "^26.0.3", + "@wordpress/blocks": "^12.28.5", + "@wordpress/commands": "^0.22.4", + "@wordpress/components": "^26.0.4", "@wordpress/compose": "^6.28.1", "@wordpress/data": "^9.21.1", "@wordpress/date": "^4.51.1", @@ -37747,14 +37746,14 @@ "@wordpress/hooks": "^3.51.1", "@wordpress/html-entities": "^3.51.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/icons": "^9.42.2", + "@wordpress/icons": "^9.42.3", "@wordpress/is-shallow-equal": "^4.51.1", "@wordpress/keyboard-shortcuts": "^4.28.1", "@wordpress/keycodes": "^3.51.1", "@wordpress/notices": "^4.19.1", - "@wordpress/preferences": "^3.28.3", + "@wordpress/preferences": "^3.28.4", "@wordpress/private-apis": "^0.33.1", - "@wordpress/rich-text": "^6.28.2", + "@wordpress/rich-text": "^6.28.3", "@wordpress/style-engine": "^1.34.1", "@wordpress/token-list": "^2.51.1", "@wordpress/url": "^3.52.1", @@ -37778,20 +37777,20 @@ } }, "@wordpress/block-library": { - "version": "8.28.4", - "resolved": "https://registry.npmjs.org/@wordpress/block-library/-/block-library-8.28.4.tgz", - "integrity": "sha512-7LJhp7mG1Vf6ODcd8TAXXowBfVDHou2EgASUV3uzsFVIleDwouwbskKG7R3jugI/C0H8rifSHYkeKleiOkthKw==", + "version": "8.28.5", + "resolved": "https://registry.npmjs.org/@wordpress/block-library/-/block-library-8.28.5.tgz", + "integrity": "sha512-NTzp3JXR/dE+HRY/SP396BcYqAfWEqWK4caHGdL5EbG6tZMaO7NdXuMitBnOyC089idIpDuaBQo64ofG0wZycA==", "requires": { "@babel/runtime": "^7.16.0", "@wordpress/a11y": "^3.51.1", "@wordpress/api-fetch": "^6.48.1", "@wordpress/autop": "^3.51.1", "@wordpress/blob": "^3.51.1", - "@wordpress/block-editor": "^12.19.4", - "@wordpress/blocks": "^12.28.4", - "@wordpress/components": "^26.0.3", + "@wordpress/block-editor": "^12.19.5", + "@wordpress/blocks": "^12.28.5", + "@wordpress/components": "^26.0.4", "@wordpress/compose": "^6.28.1", - "@wordpress/core-data": "^6.28.4", + "@wordpress/core-data": "^6.28.5", "@wordpress/data": "^9.21.1", "@wordpress/date": "^4.51.1", "@wordpress/deprecated": "^3.51.1", @@ -37801,17 +37800,17 @@ "@wordpress/hooks": "^3.51.1", "@wordpress/html-entities": "^3.51.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/icons": "^9.42.2", - "@wordpress/interactivity": "^5.0.2", - "@wordpress/interactivity-router": "^1.1.2", + "@wordpress/icons": "^9.42.3", + "@wordpress/interactivity": "^5.0.3", + "@wordpress/interactivity-router": "^1.1.3", "@wordpress/keycodes": "^3.51.1", "@wordpress/notices": "^4.19.1", - "@wordpress/patterns": "^1.12.4", + "@wordpress/patterns": "^1.12.5", "@wordpress/primitives": "^3.49.1", "@wordpress/private-apis": "^0.33.1", - "@wordpress/reusable-blocks": "^4.28.4", - "@wordpress/rich-text": "^6.28.2", - "@wordpress/server-side-render": "^4.28.4", + "@wordpress/reusable-blocks": "^4.28.5", + "@wordpress/rich-text": "^6.28.3", + "@wordpress/server-side-render": "^4.28.5", "@wordpress/url": "^3.52.1", "@wordpress/viewport": "^5.28.1", "@wordpress/wordcount": "^3.51.1", @@ -37835,9 +37834,9 @@ } }, "@wordpress/blocks": { - "version": "12.28.4", - "resolved": "https://registry.npmjs.org/@wordpress/blocks/-/blocks-12.28.4.tgz", - "integrity": "sha512-Ru7NWWpIUsYSyyARPVrXp6h13cX1hXoDMgaJpdtGY/wkbae7JXRwMBJTMfbophLA2e8uDlYD7YPzlc41Ob1mcA==", + "version": "12.28.5", + "resolved": "https://registry.npmjs.org/@wordpress/blocks/-/blocks-12.28.5.tgz", + "integrity": "sha512-OR5Tl4uzgJnpC7IH/0KCUz9To4pJ8lj64NA5sCEIJK0vSVJPEPXTkiUp0f4Y2gOm0r593Aya/4yYoGOVxoPEoA==", "requires": { "@babel/runtime": "^7.16.0", "@wordpress/autop": "^3.51.1", @@ -37853,7 +37852,7 @@ "@wordpress/i18n": "^4.51.1", "@wordpress/is-shallow-equal": "^4.51.1", "@wordpress/private-apis": "^0.33.1", - "@wordpress/rich-text": "^6.28.2", + "@wordpress/rich-text": "^6.28.3", "@wordpress/shortcode": "^3.51.1", "change-case": "^4.1.2", "colord": "^2.7.0", @@ -37876,16 +37875,16 @@ "dev": true }, "@wordpress/commands": { - "version": "0.22.3", - "resolved": "https://registry.npmjs.org/@wordpress/commands/-/commands-0.22.3.tgz", - "integrity": "sha512-SfNotavInxYFrrX5UoBAl75b6cZCjOY+RY01GwCNLNJQyv5KBLnioSYJcPi2K1yEZF+hH+hzX2D7HqqTQwL2zA==", + "version": "0.22.4", + "resolved": "https://registry.npmjs.org/@wordpress/commands/-/commands-0.22.4.tgz", + "integrity": "sha512-mGg1Uw3mKqxc6Ok9p1TgIdSgGSheoaN0ZMa09cIVH/n9Vl22KRbMB3wsUaIAWsKxrgcsOA/uejEaMcRBYLXEtw==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/components": "^26.0.3", + "@wordpress/components": "^26.0.4", "@wordpress/data": "^9.21.1", "@wordpress/element": "^5.28.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/icons": "^9.42.2", + "@wordpress/icons": "^9.42.3", "@wordpress/keyboard-shortcuts": "^4.28.1", "@wordpress/private-apis": "^0.33.1", "classnames": "^2.3.1", @@ -37894,9 +37893,9 @@ } }, "@wordpress/components": { - "version": "26.0.3", - "resolved": "https://registry.npmjs.org/@wordpress/components/-/components-26.0.3.tgz", - "integrity": "sha512-lxZnd/q/Z0SU0RUempE8HO3ipTkkiYsU/d/f+bwADpS+Fm+sZM14U1SEu816QVYVUkjXytP4N7jIe2X0A4Oybw==", + "version": "26.0.4", + "resolved": "https://registry.npmjs.org/@wordpress/components/-/components-26.0.4.tgz", + "integrity": "sha512-2AQLZEjIyx8H62lQ3/KDSoa1f6WXtl6+7poiJkD0OF/8GFs7fZtcPyBxmnXgd5C5ZE54GAizbPkFHVbeBqyl+Q==", "requires": { "@ariakit/react": "^0.3.12", "@babel/runtime": "^7.16.0", @@ -37920,12 +37919,12 @@ "@wordpress/hooks": "^3.51.1", "@wordpress/html-entities": "^3.51.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/icons": "^9.42.2", + "@wordpress/icons": "^9.42.3", "@wordpress/is-shallow-equal": "^4.51.1", "@wordpress/keycodes": "^3.51.1", "@wordpress/primitives": "^3.49.1", "@wordpress/private-apis": "^0.33.1", - "@wordpress/rich-text": "^6.28.2", + "@wordpress/rich-text": "^6.28.3", "@wordpress/warning": "^2.51.1", "change-case": "^4.1.2", "classnames": "^2.3.1", @@ -37970,33 +37969,33 @@ } }, "@wordpress/core-commands": { - "version": "0.20.4", - "resolved": "https://registry.npmjs.org/@wordpress/core-commands/-/core-commands-0.20.4.tgz", - "integrity": "sha512-wo0JANDjopQQgDVFLNKlrAu300ATDnC1joloVTII2r/lTQQa8/1+FjZmU9Q52JKTM8sE461Fm3wmdj128toyPg==", + "version": "0.20.5", + "resolved": "https://registry.npmjs.org/@wordpress/core-commands/-/core-commands-0.20.5.tgz", + "integrity": "sha512-25rpA326s4vSzBIP/ZX+wThDic4VS1h7iVAzZutdTno80MWHJU03T95wqHqDSAkNjwhYk3PGsxQk68N2Qib5mA==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/block-editor": "^12.19.4", - "@wordpress/commands": "^0.22.3", + "@wordpress/block-editor": "^12.19.5", + "@wordpress/commands": "^0.22.4", "@wordpress/compose": "^6.28.1", - "@wordpress/core-data": "^6.28.4", + "@wordpress/core-data": "^6.28.5", "@wordpress/data": "^9.21.1", "@wordpress/element": "^5.28.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/icons": "^9.42.2", + "@wordpress/icons": "^9.42.3", "@wordpress/private-apis": "^0.33.1", "@wordpress/router": "^0.20.1", "@wordpress/url": "^3.52.1" } }, "@wordpress/core-data": { - "version": "6.28.4", - "resolved": "https://registry.npmjs.org/@wordpress/core-data/-/core-data-6.28.4.tgz", - "integrity": "sha512-ZQCzLEFWNLo2orcUe1r2yTZqACPv2/U3Fm6Pgp1jNQ9xeIl0koZPxNZv11ez2g641hibZLLit1afLwkm8PmAQw==", + "version": "6.28.5", + "resolved": "https://registry.npmjs.org/@wordpress/core-data/-/core-data-6.28.5.tgz", + "integrity": "sha512-/ppBrwkta8tGTo0CfDqFksNaJXlUOMRlOEbbsCp7jODOK9DI17c/JN9OjMBHEdjwZC3kvWqJ1i5mMjurLV+ZIA==", "requires": { "@babel/runtime": "^7.16.0", "@wordpress/api-fetch": "^6.48.1", - "@wordpress/block-editor": "^12.19.4", - "@wordpress/blocks": "^12.28.4", + "@wordpress/block-editor": "^12.19.5", + "@wordpress/blocks": "^12.28.5", "@wordpress/compose": "^6.28.1", "@wordpress/data": "^9.21.1", "@wordpress/deprecated": "^3.51.1", @@ -38005,7 +38004,7 @@ "@wordpress/i18n": "^4.51.1", "@wordpress/is-shallow-equal": "^4.51.1", "@wordpress/private-apis": "^0.33.1", - "@wordpress/rich-text": "^6.28.2", + "@wordpress/rich-text": "^6.28.3", "@wordpress/sync": "^0.13.1", "@wordpress/undo-manager": "^0.11.1", "@wordpress/url": "^3.52.1", @@ -38018,31 +38017,31 @@ } }, "@wordpress/customize-widgets": { - "version": "4.28.4", - "resolved": "https://registry.npmjs.org/@wordpress/customize-widgets/-/customize-widgets-4.28.4.tgz", - "integrity": "sha512-J1wVN7JGparcHyb9aYO+5oy6oIfYHNDErujOMbTCQi3eGD+mikrp+3SmUgpxsnxkON5xLgiGlwDb8+6Upamd5w==", + "version": "4.28.5", + "resolved": "https://registry.npmjs.org/@wordpress/customize-widgets/-/customize-widgets-4.28.5.tgz", + "integrity": "sha512-+aTHK0X8HM02GpgLbXDjH1dK1sk8J/Qo9MFS+stE9mLOl9nz6TOzPyGC59OAIdKtp6UspTSYjtpg5aVDnyJ2SA==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/block-editor": "^12.19.4", - "@wordpress/block-library": "^8.28.4", - "@wordpress/blocks": "^12.28.4", - "@wordpress/components": "^26.0.3", + "@wordpress/block-editor": "^12.19.5", + "@wordpress/block-library": "^8.28.5", + "@wordpress/blocks": "^12.28.5", + "@wordpress/components": "^26.0.4", "@wordpress/compose": "^6.28.1", - "@wordpress/core-data": "^6.28.4", + "@wordpress/core-data": "^6.28.5", "@wordpress/data": "^9.21.1", "@wordpress/dom": "^3.51.1", "@wordpress/element": "^5.28.1", "@wordpress/hooks": "^3.51.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/icons": "^9.42.2", - "@wordpress/interface": "^5.28.3", + "@wordpress/icons": "^9.42.3", + "@wordpress/interface": "^5.28.4", "@wordpress/is-shallow-equal": "^4.51.1", "@wordpress/keyboard-shortcuts": "^4.28.1", "@wordpress/keycodes": "^3.51.1", "@wordpress/media-utils": "^4.42.1", - "@wordpress/preferences": "^3.28.3", + "@wordpress/preferences": "^3.28.4", "@wordpress/private-apis": "^0.33.1", - "@wordpress/widgets": "^3.28.4", + "@wordpress/widgets": "^3.28.5", "classnames": "^2.3.1", "fast-deep-equal": "^3.1.3" } @@ -38081,18 +38080,18 @@ } }, "@wordpress/dataviews": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/@wordpress/dataviews/-/dataviews-0.5.4.tgz", - "integrity": "sha512-O6N8WD67G8M+ws8qup3M931a/OXpI4S/LhofAUvwHdiBfBPNEKHp33J0w6+EYa2QQWw3R+/Mfhga4287jCqCsA==", + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/@wordpress/dataviews/-/dataviews-0.5.5.tgz", + "integrity": "sha512-m6d7z6HZIVDZk0CwNSMUqGOkoV4l+sJ8PVnlpXM0O4jHBxOhfOBjRH6A3OJSYLwMbFnTvvMyNDQju24W7cuEYQ==", "requires": { "@ariakit/react": "^0.3.12", "@babel/runtime": "^7.16.0", "@wordpress/a11y": "^3.51.1", - "@wordpress/components": "^26.0.3", + "@wordpress/components": "^26.0.4", "@wordpress/compose": "^6.28.1", "@wordpress/element": "^5.28.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/icons": "^9.42.2", + "@wordpress/icons": "^9.42.3", "@wordpress/keycodes": "^3.51.1", "@wordpress/primitives": "^3.49.1", "@wordpress/private-apis": "^0.33.1", @@ -38175,9 +38174,9 @@ } }, "@wordpress/e2e-test-utils-playwright": { - "version": "0.19.1", - "resolved": "https://registry.npmjs.org/@wordpress/e2e-test-utils-playwright/-/e2e-test-utils-playwright-0.19.1.tgz", - "integrity": "sha512-/UIOhYpb8wBSRMIpZyjkDv4Sb7//lHrLRqe6B8tNUhTBfkLl0PDPedZZubnW3L4x0nagEl3v/6B+2JomIW3n+g==", + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/@wordpress/e2e-test-utils-playwright/-/e2e-test-utils-playwright-0.19.2.tgz", + "integrity": "sha512-pB/WsJwtbKLrKEhdr8HEmjThP6XGuFJmEHfxSm76l/S5Hc0dzhFHAYojk3iu0VEZMUlgppUNYfXTab8JTCkwBA==", "dev": true, "requires": { "@wordpress/api-fetch": "^6.48.1", @@ -38211,91 +38210,91 @@ } }, "@wordpress/edit-post": { - "version": "7.28.4", - "resolved": "https://registry.npmjs.org/@wordpress/edit-post/-/edit-post-7.28.4.tgz", - "integrity": "sha512-a6MhLh7tHUrMuREn9YkoyF1AAgvp8ZTtWYNgjJDSiCmi/mTCLkJ6hMoa81tYjG30jUaEnlTRccxrK1dxh6lFfw==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@wordpress/edit-post/-/edit-post-7.28.5.tgz", + "integrity": "sha512-m2WCPZ0LdXkdHvs9XJnhuD9+rXb2Ckc+ZMzodK6jPc472btFKvnULNKtW0wyqpBLmDUrlUgf8MpTkdhtsf26cg==", "requires": { "@babel/runtime": "^7.16.0", "@wordpress/a11y": "^3.51.1", "@wordpress/api-fetch": "^6.48.1", - "@wordpress/block-editor": "^12.19.4", - "@wordpress/block-library": "^8.28.4", - "@wordpress/blocks": "^12.28.4", - "@wordpress/commands": "^0.22.3", - "@wordpress/components": "^26.0.3", + "@wordpress/block-editor": "^12.19.5", + "@wordpress/block-library": "^8.28.5", + "@wordpress/blocks": "^12.28.5", + "@wordpress/commands": "^0.22.4", + "@wordpress/components": "^26.0.4", "@wordpress/compose": "^6.28.1", - "@wordpress/core-commands": "^0.20.4", - "@wordpress/core-data": "^6.28.4", + "@wordpress/core-commands": "^0.20.5", + "@wordpress/core-data": "^6.28.5", "@wordpress/data": "^9.21.1", "@wordpress/deprecated": "^3.51.1", "@wordpress/dom": "^3.51.1", - "@wordpress/editor": "^13.28.4", + "@wordpress/editor": "^13.28.5", "@wordpress/element": "^5.28.1", "@wordpress/hooks": "^3.51.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/icons": "^9.42.2", - "@wordpress/interface": "^5.28.3", + "@wordpress/icons": "^9.42.3", + "@wordpress/interface": "^5.28.4", "@wordpress/keyboard-shortcuts": "^4.28.1", "@wordpress/keycodes": "^3.51.1", "@wordpress/media-utils": "^4.42.1", "@wordpress/notices": "^4.19.1", - "@wordpress/plugins": "^6.19.3", - "@wordpress/preferences": "^3.28.3", + "@wordpress/plugins": "^6.19.4", + "@wordpress/preferences": "^3.28.4", "@wordpress/private-apis": "^0.33.1", "@wordpress/url": "^3.52.1", "@wordpress/viewport": "^5.28.1", "@wordpress/warning": "^2.51.1", - "@wordpress/widgets": "^3.28.4", + "@wordpress/widgets": "^3.28.5", "classnames": "^2.3.1", "memize": "^2.1.0", "rememo": "^4.0.2" } }, "@wordpress/edit-site": { - "version": "5.28.4", - "resolved": "https://registry.npmjs.org/@wordpress/edit-site/-/edit-site-5.28.4.tgz", - "integrity": "sha512-9jCpfLKTTxNogbPXhtzMrzU6CyT+eOiKUXXGN/xuOfC44AL1htid21pWSJ9CmIzwRWNdLBzKpUaa8Lh6ehgiGA==", + "version": "5.28.5", + "resolved": "https://registry.npmjs.org/@wordpress/edit-site/-/edit-site-5.28.5.tgz", + "integrity": "sha512-b5QhF2qt5xHJa/UXp/KpOTlstTmMuUg3cXz6WIS59r5ZLtb4669c3mZOKcnhek3RFygXPWwa8a3fIzK08OY82w==", "requires": { "@babel/runtime": "^7.16.0", "@wordpress/a11y": "^3.51.1", "@wordpress/api-fetch": "^6.48.1", "@wordpress/blob": "^3.51.1", - "@wordpress/block-editor": "^12.19.4", - "@wordpress/block-library": "^8.28.4", - "@wordpress/blocks": "^12.28.4", - "@wordpress/commands": "^0.22.3", - "@wordpress/components": "^26.0.3", + "@wordpress/block-editor": "^12.19.5", + "@wordpress/block-library": "^8.28.5", + "@wordpress/blocks": "^12.28.5", + "@wordpress/commands": "^0.22.4", + "@wordpress/components": "^26.0.4", "@wordpress/compose": "^6.28.1", - "@wordpress/core-commands": "^0.20.4", - "@wordpress/core-data": "^6.28.4", + "@wordpress/core-commands": "^0.20.5", + "@wordpress/core-data": "^6.28.5", "@wordpress/data": "^9.21.1", - "@wordpress/dataviews": "^0.5.4", + "@wordpress/dataviews": "^0.5.5", "@wordpress/date": "^4.51.1", "@wordpress/deprecated": "^3.51.1", "@wordpress/dom": "^3.51.1", - "@wordpress/editor": "^13.28.4", + "@wordpress/editor": "^13.28.5", "@wordpress/element": "^5.28.1", "@wordpress/escape-html": "^2.51.1", "@wordpress/hooks": "^3.51.1", "@wordpress/html-entities": "^3.51.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/icons": "^9.42.2", - "@wordpress/interface": "^5.28.3", + "@wordpress/icons": "^9.42.3", + "@wordpress/interface": "^5.28.4", "@wordpress/keyboard-shortcuts": "^4.28.1", "@wordpress/keycodes": "^3.51.1", "@wordpress/media-utils": "^4.42.1", "@wordpress/notices": "^4.19.1", - "@wordpress/patterns": "^1.12.4", - "@wordpress/plugins": "^6.19.3", - "@wordpress/preferences": "^3.28.3", + "@wordpress/patterns": "^1.12.5", + "@wordpress/plugins": "^6.19.4", + "@wordpress/preferences": "^3.28.4", "@wordpress/primitives": "^3.49.1", "@wordpress/private-apis": "^0.33.1", - "@wordpress/reusable-blocks": "^4.28.4", + "@wordpress/reusable-blocks": "^4.28.5", "@wordpress/router": "^0.20.1", "@wordpress/style-engine": "^1.34.1", "@wordpress/url": "^3.52.1", "@wordpress/viewport": "^5.28.1", - "@wordpress/widgets": "^3.28.4", + "@wordpress/widgets": "^3.28.5", "@wordpress/wordcount": "^3.51.1", "change-case": "^4.1.2", "classnames": "^2.3.1", @@ -38310,56 +38309,56 @@ } }, "@wordpress/edit-widgets": { - "version": "5.28.4", - "resolved": "https://registry.npmjs.org/@wordpress/edit-widgets/-/edit-widgets-5.28.4.tgz", - "integrity": "sha512-RkFE6Jb+HH7u1nFTHQUs6xZst1T8dIK4nJW2YLfs/Eol2teHzZSzYCH+mUZrW3Be7WFlOf9FjKSfZ9TioWPS8Q==", + "version": "5.28.5", + "resolved": "https://registry.npmjs.org/@wordpress/edit-widgets/-/edit-widgets-5.28.5.tgz", + "integrity": "sha512-9soQuWZBjlsKi32utsd4vn5G74a5isFY0wi/QTQnfYHpenmLYhZnl4obJ5tHMbWR35w6g6WHq72jZHZya7gITQ==", "requires": { "@babel/runtime": "^7.16.0", "@wordpress/api-fetch": "^6.48.1", - "@wordpress/block-editor": "^12.19.4", - "@wordpress/block-library": "^8.28.4", - "@wordpress/blocks": "^12.28.4", - "@wordpress/components": "^26.0.3", + "@wordpress/block-editor": "^12.19.5", + "@wordpress/block-library": "^8.28.5", + "@wordpress/blocks": "^12.28.5", + "@wordpress/components": "^26.0.4", "@wordpress/compose": "^6.28.1", - "@wordpress/core-data": "^6.28.4", + "@wordpress/core-data": "^6.28.5", "@wordpress/data": "^9.21.1", "@wordpress/deprecated": "^3.51.1", "@wordpress/dom": "^3.51.1", "@wordpress/element": "^5.28.1", "@wordpress/hooks": "^3.51.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/icons": "^9.42.2", - "@wordpress/interface": "^5.28.3", + "@wordpress/icons": "^9.42.3", + "@wordpress/interface": "^5.28.4", "@wordpress/keyboard-shortcuts": "^4.28.1", "@wordpress/keycodes": "^3.51.1", "@wordpress/media-utils": "^4.42.1", "@wordpress/notices": "^4.19.1", - "@wordpress/patterns": "^1.12.4", - "@wordpress/plugins": "^6.19.3", - "@wordpress/preferences": "^3.28.3", + "@wordpress/patterns": "^1.12.5", + "@wordpress/plugins": "^6.19.4", + "@wordpress/preferences": "^3.28.4", "@wordpress/private-apis": "^0.33.1", - "@wordpress/reusable-blocks": "^4.28.4", + "@wordpress/reusable-blocks": "^4.28.5", "@wordpress/url": "^3.52.1", - "@wordpress/widgets": "^3.28.4", + "@wordpress/widgets": "^3.28.5", "classnames": "^2.3.1", "rememo": "^4.0.2" } }, "@wordpress/editor": { - "version": "13.28.4", - "resolved": "https://registry.npmjs.org/@wordpress/editor/-/editor-13.28.4.tgz", - "integrity": "sha512-lMGh4HvDmv8kh+PTBWO9m2085QrgKbIPlrYFV1JbGr4YmAZgiSbC6hMYG+07tss1vgLqm50tnqK8KQGwOb7idw==", + "version": "13.28.5", + "resolved": "https://registry.npmjs.org/@wordpress/editor/-/editor-13.28.5.tgz", + "integrity": "sha512-6Tnzz7iQSQWIJRXwXacwN0jouhqkAEvtdaAKslDFXoqT+z4jgjf6wGphPBgqUG6PPfp0BBUUNwXThBBcIwhNqA==", "requires": { "@babel/runtime": "^7.16.0", "@wordpress/a11y": "^3.51.1", "@wordpress/api-fetch": "^6.48.1", "@wordpress/blob": "^3.51.1", - "@wordpress/block-editor": "^12.19.4", - "@wordpress/blocks": "^12.28.4", - "@wordpress/commands": "^0.22.3", - "@wordpress/components": "^26.0.3", + "@wordpress/block-editor": "^12.19.5", + "@wordpress/blocks": "^12.28.5", + "@wordpress/commands": "^0.22.4", + "@wordpress/components": "^26.0.4", "@wordpress/compose": "^6.28.1", - "@wordpress/core-data": "^6.28.4", + "@wordpress/core-data": "^6.28.5", "@wordpress/data": "^9.21.1", "@wordpress/date": "^4.51.1", "@wordpress/deprecated": "^3.51.1", @@ -38368,17 +38367,17 @@ "@wordpress/hooks": "^3.51.1", "@wordpress/html-entities": "^3.51.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/icons": "^9.42.2", + "@wordpress/icons": "^9.42.3", "@wordpress/keyboard-shortcuts": "^4.28.1", "@wordpress/keycodes": "^3.51.1", "@wordpress/media-utils": "^4.42.1", "@wordpress/notices": "^4.19.1", - "@wordpress/patterns": "^1.12.4", - "@wordpress/preferences": "^3.28.3", + "@wordpress/patterns": "^1.12.5", + "@wordpress/preferences": "^3.28.4", "@wordpress/private-apis": "^0.33.1", - "@wordpress/reusable-blocks": "^4.28.4", - "@wordpress/rich-text": "^6.28.2", - "@wordpress/server-side-render": "^4.28.4", + "@wordpress/reusable-blocks": "^4.28.5", + "@wordpress/rich-text": "^6.28.3", + "@wordpress/server-side-render": "^4.28.5", "@wordpress/url": "^3.52.1", "@wordpress/wordcount": "^3.51.1", "classnames": "^2.3.1", @@ -38449,22 +38448,22 @@ } }, "@wordpress/format-library": { - "version": "4.28.4", - "resolved": "https://registry.npmjs.org/@wordpress/format-library/-/format-library-4.28.4.tgz", - "integrity": "sha512-pAtkqIopQ9Ps8Dm5Xf7irPwY+MMGlqfvW7xYqeid/VYidXUCDzQmwZPcBAUF4Pme+gU1AZ5SDWK9xXfl3lWvBA==", + "version": "4.28.5", + "resolved": "https://registry.npmjs.org/@wordpress/format-library/-/format-library-4.28.5.tgz", + "integrity": "sha512-ndvea8gYEcdke8GKC3qHDpN46UcnBcf3y+nptiXUFBcHpPkU/mLuXbdb0mTbmItYTNXZrPtzVDNci2QNG+d6Dw==", "requires": { "@babel/runtime": "^7.16.0", "@wordpress/a11y": "^3.51.1", - "@wordpress/block-editor": "^12.19.4", - "@wordpress/components": "^26.0.3", + "@wordpress/block-editor": "^12.19.5", + "@wordpress/components": "^26.0.4", "@wordpress/compose": "^6.28.1", "@wordpress/data": "^9.21.1", "@wordpress/element": "^5.28.1", "@wordpress/html-entities": "^3.51.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/icons": "^9.42.2", + "@wordpress/icons": "^9.42.3", "@wordpress/private-apis": "^0.33.1", - "@wordpress/rich-text": "^6.28.2", + "@wordpress/rich-text": "^6.28.3", "@wordpress/url": "^3.52.1" } }, @@ -38498,9 +38497,9 @@ } }, "@wordpress/icons": { - "version": "9.42.2", - "resolved": "https://registry.npmjs.org/@wordpress/icons/-/icons-9.42.2.tgz", - "integrity": "sha512-WUXAHxeLw342VYr6GsxXrQbXwxwecBNEfyRtmHXoffaYINn1OIkn9TXkLKzjDOSILa4ZaYgtobYN/IqVe3WE1A==", + "version": "9.42.3", + "resolved": "https://registry.npmjs.org/@wordpress/icons/-/icons-9.42.3.tgz", + "integrity": "sha512-GSbBVXoLadzrdUXj7ahslEdaA3p/FqnQYDUOHM0Z5QTmTl77J7yJ4V6o+iMIOagoMaoe1hhDzDpj1FaU/CiPcg==", "requires": { "@babel/runtime": "^7.16.0", "@wordpress/element": "^5.28.1", @@ -38508,9 +38507,9 @@ } }, "@wordpress/interactivity": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@wordpress/interactivity/-/interactivity-5.0.2.tgz", - "integrity": "sha512-Wx9XrzFLYap5OpHTcQTn6kwhj6Srglh2447qCFsYad28byvMHSXcIXHQXsNLWvB2LUjSqg+zWLHW05AOU6sOqQ==", + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/@wordpress/interactivity/-/interactivity-5.0.3.tgz", + "integrity": "sha512-oSJ8Z725c0caYcxlwrDNpnTluYbdDLPjsUIE1avr9g2Ul9KTiRnZ/k+FIjGsJvnXssEEOAvxGS8KPEXH/E4cVA==", "requires": { "@preact/signals": "^1.2.2", "deepsignal": "^1.4.0", @@ -38518,29 +38517,29 @@ } }, "@wordpress/interactivity-router": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@wordpress/interactivity-router/-/interactivity-router-1.1.2.tgz", - "integrity": "sha512-vzRssi2tzpDO063wY4Fdi883aBqH5PVRti8uebqU5StrkbkJp+PGDBA6mX5r7FiaNx0ePR/VMJxH86EEoqbaEw==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@wordpress/interactivity-router/-/interactivity-router-1.1.3.tgz", + "integrity": "sha512-p6r6WalHukPi7pEjXJnsjghCCR9vuuE28l24vKU5MzUimVvU4Cl9Pykncpuyjt312azkQLEKRroAGPmEvoxVXg==", "requires": { - "@wordpress/interactivity": "^5.0.2" + "@wordpress/interactivity": "^5.0.3" } }, "@wordpress/interface": { - "version": "5.28.3", - "resolved": "https://registry.npmjs.org/@wordpress/interface/-/interface-5.28.3.tgz", - "integrity": "sha512-X7c8ymfEBwScD/xqCGxjZ3OQHt2lBA879/prVEOOx3swcEEuuXgO1UE0sLDQ6YH6kSa+OSzHD2bzA8JfMLYrZg==", + "version": "5.28.4", + "resolved": "https://registry.npmjs.org/@wordpress/interface/-/interface-5.28.4.tgz", + "integrity": "sha512-lRxvjTOoTP97hzZpk1znHCOxbtVYlMiHQ3FlNwN7DmcHWP+DXY+xpo8bM6OLIkqOa7FtHwT8RgT7OEzLhyli/w==", "requires": { "@babel/runtime": "^7.16.0", "@wordpress/a11y": "^3.51.1", - "@wordpress/components": "^26.0.3", + "@wordpress/components": "^26.0.4", "@wordpress/compose": "^6.28.1", "@wordpress/data": "^9.21.1", "@wordpress/deprecated": "^3.51.1", "@wordpress/element": "^5.28.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/icons": "^9.42.2", - "@wordpress/plugins": "^6.19.3", - "@wordpress/preferences": "^3.28.3", + "@wordpress/icons": "^9.42.3", + "@wordpress/plugins": "^6.19.4", + "@wordpress/preferences": "^3.28.4", "@wordpress/private-apis": "^0.33.1", "@wordpress/viewport": "^5.28.1", "classnames": "^2.3.1" @@ -38596,14 +38595,14 @@ } }, "@wordpress/list-reusable-blocks": { - "version": "4.28.3", - "resolved": "https://registry.npmjs.org/@wordpress/list-reusable-blocks/-/list-reusable-blocks-4.28.3.tgz", - "integrity": "sha512-O2Y1XneAQ0XQne+/PgHNxiMbmpjEQv4s0+2LQPpboJ1Do3GTIHLR+ab0iMAxMDnjCSzfA6YACy6iLKQdzw+Q5w==", + "version": "4.28.4", + "resolved": "https://registry.npmjs.org/@wordpress/list-reusable-blocks/-/list-reusable-blocks-4.28.4.tgz", + "integrity": "sha512-DBUo3h0xkXSuXOqv3LTeEp9YCRyxXEqrkvYkU0M0k4WiSVcnxyH4YFWI/9tPIy096eVROjn3QfjW4OIOHv9WRQ==", "requires": { "@babel/runtime": "^7.16.0", "@wordpress/api-fetch": "^6.48.1", "@wordpress/blob": "^3.51.1", - "@wordpress/components": "^26.0.3", + "@wordpress/components": "^26.0.4", "@wordpress/compose": "^6.28.1", "@wordpress/element": "^5.28.1", "@wordpress/i18n": "^4.51.1", @@ -38639,55 +38638,54 @@ "dev": true }, "@wordpress/nux": { - "version": "8.13.3", - "resolved": "https://registry.npmjs.org/@wordpress/nux/-/nux-8.13.3.tgz", - "integrity": "sha512-zLhC1ORL69Jew4KGyTKUilHVZAbdO8nv/0SPeumMpM5+seITZD3kCILObEdsQr5zwkxgAkmUIA0xdkwc+nMYPw==", + "version": "8.13.4", + "resolved": "https://registry.npmjs.org/@wordpress/nux/-/nux-8.13.4.tgz", + "integrity": "sha512-9d1Lid+TOifgyomtj6d7ZNFsBvNVrZqghB36x8n4qSnsb0OGaWMCPGfIZu3ONrKRnNHNimFr43VAEPWwouOPJA==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/components": "^26.0.3", + "@wordpress/components": "^26.0.4", "@wordpress/compose": "^6.28.1", "@wordpress/data": "^9.21.1", "@wordpress/deprecated": "^3.51.1", "@wordpress/element": "^5.28.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/icons": "^9.42.2", + "@wordpress/icons": "^9.42.3", "rememo": "^4.0.2" } }, "@wordpress/patterns": { - "version": "1.12.4", - "resolved": "https://registry.npmjs.org/@wordpress/patterns/-/patterns-1.12.4.tgz", - "integrity": "sha512-A2JKUTSgyNWvSkntaz2aUSPHxKnZSuE/1vRdqCDeZGRPGO7H25Y3564M1+iuUHXz6dtcsIupv6k3lYHxNASnBA==", + "version": "1.12.5", + "resolved": "https://registry.npmjs.org/@wordpress/patterns/-/patterns-1.12.5.tgz", + "integrity": "sha512-ylke7nIGzo1c6xCoUrfV58qnfyl/U9Fn3VVjFbhFRI3Fz75nxcQ9PQWnORDrm/laEaGmtYsW81grec/ddv3vWg==", "requires": { "@babel/runtime": "^7.16.0", "@wordpress/a11y": "^3.51.1", - "@wordpress/block-editor": "^12.19.4", - "@wordpress/blocks": "^12.28.4", - "@wordpress/components": "^26.0.3", + "@wordpress/block-editor": "^12.19.5", + "@wordpress/blocks": "^12.28.5", + "@wordpress/components": "^26.0.4", "@wordpress/compose": "^6.28.1", - "@wordpress/core-data": "^6.28.4", + "@wordpress/core-data": "^6.28.5", "@wordpress/data": "^9.21.1", "@wordpress/element": "^5.28.1", "@wordpress/html-entities": "^3.51.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/icons": "^9.42.2", + "@wordpress/icons": "^9.42.3", "@wordpress/notices": "^4.19.1", "@wordpress/private-apis": "^0.33.1", - "@wordpress/url": "^3.52.1", - "nanoid": "^3.3.4" + "@wordpress/url": "^3.52.1" } }, "@wordpress/plugins": { - "version": "6.19.3", - "resolved": "https://registry.npmjs.org/@wordpress/plugins/-/plugins-6.19.3.tgz", - "integrity": "sha512-Cs5Q2yppghuStVtQVx+KJIYiXUTy6X38bIijHSgnJxY0kiYlWQgwYKUWRM/yJ05bSGOA6okzSXiA6MUvNtuNLQ==", + "version": "6.19.4", + "resolved": "https://registry.npmjs.org/@wordpress/plugins/-/plugins-6.19.4.tgz", + "integrity": "sha512-ID0et2/LZbtR/ODQK/nxt7ndQmVXTuPt6azbqaykm5nQyMpbY8u0c/mneuvYmmyGWAbUrJ51G1XD3cGyXxsgjg==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/components": "^26.0.3", + "@wordpress/components": "^26.0.4", "@wordpress/compose": "^6.28.1", "@wordpress/element": "^5.28.1", "@wordpress/hooks": "^3.51.1", - "@wordpress/icons": "^9.42.2", + "@wordpress/icons": "^9.42.3", "@wordpress/is-shallow-equal": "^4.51.1", "memize": "^2.0.1" } @@ -38703,19 +38701,19 @@ } }, "@wordpress/preferences": { - "version": "3.28.3", - "resolved": "https://registry.npmjs.org/@wordpress/preferences/-/preferences-3.28.3.tgz", - "integrity": "sha512-caRpPrXbHF9z2E19ERsHSiHDxON21GA3U5Hls+kl8hSQJRWX11vcIWiOxyBroFXPldJbsuPxbU43aQCPGSeLZg==", + "version": "3.28.4", + "resolved": "https://registry.npmjs.org/@wordpress/preferences/-/preferences-3.28.4.tgz", + "integrity": "sha512-Kcbbj0H38h4qlqjcs4g1EGPUKeNAvXkmU/BzgDkJZPBoIud0SdXT7Tj9hnwNSuR+7CfL7/3aoELSrp98L5uWow==", "requires": { "@babel/runtime": "^7.16.0", "@wordpress/a11y": "^3.51.1", - "@wordpress/components": "^26.0.3", + "@wordpress/components": "^26.0.4", "@wordpress/compose": "^6.28.1", "@wordpress/data": "^9.21.1", "@wordpress/deprecated": "^3.51.1", "@wordpress/element": "^5.28.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/icons": "^9.42.2", + "@wordpress/icons": "^9.42.3", "@wordpress/private-apis": "^0.33.1", "classnames": "^2.3.1" } @@ -38774,28 +38772,28 @@ } }, "@wordpress/reusable-blocks": { - "version": "4.28.4", - "resolved": "https://registry.npmjs.org/@wordpress/reusable-blocks/-/reusable-blocks-4.28.4.tgz", - "integrity": "sha512-KxC9PscnfW+1GjFNU1i8jLxhXdqQtYPnCjZaUE2fLKP8bRCfOWMTTcBz4ZAFgmUKoFMfrsz0RKSxQ6zyyqfFJQ==", + "version": "4.28.5", + "resolved": "https://registry.npmjs.org/@wordpress/reusable-blocks/-/reusable-blocks-4.28.5.tgz", + "integrity": "sha512-lgc2nl5LZ+b24HuuN6v753s4qo9DY3Aho9l7qtefyDxXB2YLM5T1ub6RCleRWMG70cuU0m55304s5hP+1+jaqg==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/block-editor": "^12.19.4", - "@wordpress/blocks": "^12.28.4", - "@wordpress/components": "^26.0.3", - "@wordpress/core-data": "^6.28.4", + "@wordpress/block-editor": "^12.19.5", + "@wordpress/blocks": "^12.28.5", + "@wordpress/components": "^26.0.4", + "@wordpress/core-data": "^6.28.5", "@wordpress/data": "^9.21.1", "@wordpress/element": "^5.28.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/icons": "^9.42.2", + "@wordpress/icons": "^9.42.3", "@wordpress/notices": "^4.19.1", "@wordpress/private-apis": "^0.33.1", "@wordpress/url": "^3.52.1" } }, "@wordpress/rich-text": { - "version": "6.28.2", - "resolved": "https://registry.npmjs.org/@wordpress/rich-text/-/rich-text-6.28.2.tgz", - "integrity": "sha512-jBvQdCPeRI/zoWTBL3IEF6Y8YN/f6Xv6R94G3b2FldLFVbJoMTRFD4rd8vDHN8AeVOyA0+VIWziLw88ZVD8Qgw==", + "version": "6.28.3", + "resolved": "https://registry.npmjs.org/@wordpress/rich-text/-/rich-text-6.28.3.tgz", + "integrity": "sha512-SOPcn8lpLQEFF/HLI+w7HzuByIX/8/c9nyLMgYntj/Vk64izI4HYnQP6ftTtu/a12S8/C1cXhpH2ZfFNz6jItA==", "requires": { "@babel/runtime": "^7.16.0", "@wordpress/a11y": "^3.51.1", @@ -38823,9 +38821,9 @@ } }, "@wordpress/scripts": { - "version": "27.2.3", - "resolved": "https://registry.npmjs.org/@wordpress/scripts/-/scripts-27.2.3.tgz", - "integrity": "sha512-h4NeYjfzhC517CwI4P0unvMN40bp5azdvo56osn9LIdlPMyb1Sm3Gu36yotyZWcM5R91lstmg3/RqENP42L5Aw==", + "version": "27.2.4", + "resolved": "https://registry.npmjs.org/@wordpress/scripts/-/scripts-27.2.4.tgz", + "integrity": "sha512-wBEr13XDVwMP1PTwS4IrVYX+46B0EmDsIryUClykbr6XPw1CtIygz08e8sOeWYBgsuW5DQwx30T/9ifwKCRimw==", "dev": true, "requires": { "@babel/core": "^7.16.0", @@ -38834,11 +38832,11 @@ "@wordpress/babel-preset-default": "^7.35.1", "@wordpress/browserslist-config": "^5.34.1", "@wordpress/dependency-extraction-webpack-plugin": "^5.2.1", - "@wordpress/e2e-test-utils-playwright": "^0.19.1", + "@wordpress/e2e-test-utils-playwright": "^0.19.2", "@wordpress/eslint-plugin": "^17.8.1", "@wordpress/jest-preset-default": "^11.22.1", "@wordpress/npm-package-json-lint-config": "^4.36.1", - "@wordpress/postcss-plugins-preset": "^4.35.3", + "@wordpress/postcss-plugins-preset": "^4.35.4", "@wordpress/prettier-config": "^3.8.1", "@wordpress/stylelint-config": "^21.34.1", "adm-zip": "^0.5.9", @@ -39113,14 +39111,14 @@ } }, "@wordpress/server-side-render": { - "version": "4.28.4", - "resolved": "https://registry.npmjs.org/@wordpress/server-side-render/-/server-side-render-4.28.4.tgz", - "integrity": "sha512-S/d1slui+lLd32rH8D8jp7/sPOOaUdq+XrQx+W50mcf7KOajQfTFt7VeEm8Crow6y0DvZl/LShIMhmrBqvYEJg==", + "version": "4.28.5", + "resolved": "https://registry.npmjs.org/@wordpress/server-side-render/-/server-side-render-4.28.5.tgz", + "integrity": "sha512-/o2Pdzl4Zz8E/V0efo0/v8jP5Pe9dR28QYEzWopHZPpKHeLtSrrqdrnZRddbf3fnmis1+y56h6+eaW+YUTMlQA==", "requires": { "@babel/runtime": "^7.16.0", "@wordpress/api-fetch": "^6.48.1", - "@wordpress/blocks": "^12.28.4", - "@wordpress/components": "^26.0.3", + "@wordpress/blocks": "^12.28.5", + "@wordpress/components": "^26.0.4", "@wordpress/compose": "^6.28.1", "@wordpress/data": "^9.21.1", "@wordpress/deprecated": "^3.51.1", @@ -39218,21 +39216,21 @@ "integrity": "sha512-De1ftiM7vdlE6evA+d/jv2wES9wXdvbck4fKi7qr7ckDzWjqGg7nV8A3OzGInWiAn9qTQZucCOUwzUvlWedpTQ==" }, "@wordpress/widgets": { - "version": "3.28.4", - "resolved": "https://registry.npmjs.org/@wordpress/widgets/-/widgets-3.28.4.tgz", - "integrity": "sha512-/vToY0eZvRV3QXToBsSK1YZ93zBezgKQhMXZpF5Y5nHIWwJU1+1/M0XH2VAhG9xDhP50XGZ7ofGnhREG1atCEw==", + "version": "3.28.5", + "resolved": "https://registry.npmjs.org/@wordpress/widgets/-/widgets-3.28.5.tgz", + "integrity": "sha512-9BoNxIzZGyx2390rZA5Bs0WGZOA0ymwsD5erQ5GYOqj8z+1UTe94WPQne+DhHmYB7rPjOh1zV8xJet2aRhVCUg==", "requires": { "@babel/runtime": "^7.16.0", "@wordpress/api-fetch": "^6.48.1", - "@wordpress/block-editor": "^12.19.4", - "@wordpress/blocks": "^12.28.4", - "@wordpress/components": "^26.0.3", + "@wordpress/block-editor": "^12.19.5", + "@wordpress/blocks": "^12.28.5", + "@wordpress/components": "^26.0.4", "@wordpress/compose": "^6.28.1", - "@wordpress/core-data": "^6.28.4", + "@wordpress/core-data": "^6.28.5", "@wordpress/data": "^9.21.1", "@wordpress/element": "^5.28.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/icons": "^9.42.2", + "@wordpress/icons": "^9.42.3", "@wordpress/notices": "^4.19.1", "classnames": "^2.3.1" } diff --git a/package.json b/package.json index e383282900830..273b44b865f89 100644 --- a/package.json +++ b/package.json @@ -30,9 +30,9 @@ "@wordpress/babel-preset-default": "7.35.1", "@wordpress/dependency-extraction-webpack-plugin": "5.2.1", "@wordpress/e2e-test-utils": "10.22.1", - "@wordpress/e2e-test-utils-playwright": "0.19.1", + "@wordpress/e2e-test-utils-playwright": "0.19.2", "@wordpress/prettier-config": "3.8.1", - "@wordpress/scripts": "27.2.3", + "@wordpress/scripts": "27.2.4", "autoprefixer": "10.4.17", "chalk": "5.3.0", "check-node-version": "4.2.1", @@ -79,61 +79,61 @@ }, "dependencies": { "@wordpress/a11y": "3.51.1", - "@wordpress/annotations": "2.51.2", + "@wordpress/annotations": "2.51.3", "@wordpress/api-fetch": "6.48.1", "@wordpress/autop": "3.51.1", "@wordpress/blob": "3.51.1", - "@wordpress/block-directory": "4.28.4", - "@wordpress/block-editor": "12.19.4", - "@wordpress/block-library": "8.28.4", + "@wordpress/block-directory": "4.28.5", + "@wordpress/block-editor": "12.19.5", + "@wordpress/block-library": "8.28.5", "@wordpress/block-serialization-default-parser": "4.51.1", - "@wordpress/blocks": "12.28.4", - "@wordpress/commands": "0.22.3", - "@wordpress/components": "26.0.3", + "@wordpress/blocks": "12.28.5", + "@wordpress/commands": "0.22.4", + "@wordpress/components": "26.0.4", "@wordpress/compose": "6.28.1", - "@wordpress/core-commands": "0.20.4", - "@wordpress/core-data": "6.28.4", - "@wordpress/customize-widgets": "4.28.4", + "@wordpress/core-commands": "0.20.5", + "@wordpress/core-data": "6.28.5", + "@wordpress/customize-widgets": "4.28.5", "@wordpress/data": "9.21.1", "@wordpress/data-controls": "3.20.1", - "@wordpress/dataviews": "0.5.4", + "@wordpress/dataviews": "0.5.5", "@wordpress/date": "4.51.1", "@wordpress/deprecated": "3.51.1", "@wordpress/dom": "3.51.1", "@wordpress/dom-ready": "3.51.1", - "@wordpress/edit-post": "7.28.4", - "@wordpress/edit-site": "5.28.4", - "@wordpress/edit-widgets": "5.28.4", - "@wordpress/editor": "13.28.4", + "@wordpress/edit-post": "7.28.5", + "@wordpress/edit-site": "5.28.5", + "@wordpress/edit-widgets": "5.28.5", + "@wordpress/editor": "13.28.5", "@wordpress/element": "5.28.1", "@wordpress/escape-html": "2.51.1", - "@wordpress/format-library": "4.28.4", + "@wordpress/format-library": "4.28.5", "@wordpress/hooks": "3.51.1", "@wordpress/html-entities": "3.51.1", "@wordpress/i18n": "4.51.1", - "@wordpress/icons": "9.42.2", - "@wordpress/interactivity": "5.0.2", - "@wordpress/interactivity-router": "1.1.2", - "@wordpress/interface": "5.28.3", + "@wordpress/icons": "9.42.3", + "@wordpress/interactivity": "5.0.3", + "@wordpress/interactivity-router": "1.1.3", + "@wordpress/interface": "5.28.4", "@wordpress/is-shallow-equal": "4.51.1", "@wordpress/keyboard-shortcuts": "4.28.1", "@wordpress/keycodes": "3.51.1", - "@wordpress/list-reusable-blocks": "4.28.3", + "@wordpress/list-reusable-blocks": "4.28.4", "@wordpress/media-utils": "4.42.1", "@wordpress/notices": "4.19.1", - "@wordpress/nux": "8.13.3", - "@wordpress/patterns": "1.12.4", - "@wordpress/plugins": "6.19.3", - "@wordpress/preferences": "3.28.3", + "@wordpress/nux": "8.13.4", + "@wordpress/patterns": "1.12.5", + "@wordpress/plugins": "6.19.4", + "@wordpress/preferences": "3.28.4", "@wordpress/preferences-persistence": "1.43.1", "@wordpress/primitives": "3.49.1", "@wordpress/priority-queue": "2.51.1", "@wordpress/private-apis": "0.33.1", "@wordpress/redux-routine": "4.51.1", - "@wordpress/reusable-blocks": "4.28.4", - "@wordpress/rich-text": "6.28.2", + "@wordpress/reusable-blocks": "4.28.5", + "@wordpress/rich-text": "6.28.3", "@wordpress/router": "0.20.1", - "@wordpress/server-side-render": "4.28.4", + "@wordpress/server-side-render": "4.28.5", "@wordpress/shortcode": "3.51.1", "@wordpress/style-engine": "1.34.1", "@wordpress/sync": "0.13.1", @@ -142,7 +142,7 @@ "@wordpress/url": "3.52.1", "@wordpress/viewport": "5.28.1", "@wordpress/warning": "2.51.1", - "@wordpress/widgets": "3.28.4", + "@wordpress/widgets": "3.28.5", "@wordpress/wordcount": "3.51.1", "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 a55d4843c7fa2..12eaa14209f2c 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' => 'd90eebea464f6c09bfd5'), 'annotations.min.js' => array('dependencies' => array('wp-data', 'wp-hooks', 'wp-i18n', 'wp-polyfill', 'wp-rich-text'), 'version' => 'ffc4fc3374b0ab000805'), 'api-fetch.min.js' => array('dependencies' => array('wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '4c185334c5ec26e149cc'), 'autop.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '9fb50649848277dd318d'), 'blob.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '9113eed771d446f4a556'), 'block-directory.min.js' => array('dependencies' => array('react', '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-private-apis', 'wp-url'), 'version' => '9159053f41b8ec09d91b'), '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-style-engine', 'wp-token-list', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => '480eb5cdd437466526d6'), 'block-library.min.js' => array('dependencies' => array('react', '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-patterns', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-viewport', 'wp-wordcount'), 'version' => '9ad1fcfdfbe0ea5a9689'), 'block-serialization-default-parser.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '14d44daebf663d05d330'), 'blocks.min.js' => array('dependencies' => array('react', '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-rich-text', 'wp-shortcode'), 'version' => '6612d078dfaf28b875b8'), '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' => 'e4060e55811e7824feb9'), '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' => 'c3a06857b0e51f435ccb'), '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' => '1339d3318cd44440dccb'), 'core-commands.min.js' => array('dependencies' => array('react', 'wp-commands', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-router', 'wp-url'), 'version' => '4ee9c423b71a59459ca6'), 'core-data.min.js' => array('dependencies' => array('react', '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-rich-text', 'wp-url'), 'version' => 'ff4b03fefe97d027b7fd'), 'customize-widgets.min.js' => array('dependencies' => array('react', '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' => '137692724827d41c9fb5'), 'data.min.js' => array('dependencies' => array('react', 'wp-compose', 'wp-deprecated', 'wp-element', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-priority-queue', 'wp-private-apis', 'wp-redux-routine'), 'version' => 'e6595ba1a7cd34429f66'), 'data-controls.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-data', 'wp-deprecated', 'wp-polyfill'), 'version' => '49f5587e8b90f9e7cc7e'), 'date.min.js' => array('dependencies' => array('moment', 'wp-deprecated', 'wp-polyfill'), 'version' => 'aaca6387d1cf924acc51'), 'deprecated.min.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => 'e1f84915c5e8ae38964c'), 'dom.min.js' => array('dependencies' => array('wp-deprecated', 'wp-polyfill'), 'version' => '4ecffbffba91b10c5c7a'), 'dom-ready.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'f77871ff7694fffea381'), 'edit-post.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-deprecated', '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' => '9728aeb8975647a9dabf'), 'edit-site.min.js' => array('dependencies' => array('react', 'react-dom', 'wp-a11y', 'wp-api-fetch', 'wp-blob', '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' => '892f7627102ee819ed33'), 'edit-widgets.min.js' => array('dependencies' => array('react', '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' => '96a3b30b85133de96871'), 'editor.min.js' => array('dependencies' => array('react', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-commands', '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' => '62e1ea95ff598d230b5b'), 'element.min.js' => array('dependencies' => array('react', 'react-dom', 'wp-escape-html', 'wp-polyfill'), 'version' => 'cb762d190aebbec25b27'), 'escape-html.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '6561a406d2d232a6fbd2'), 'format-library.min.js' => array('dependencies' => array('react', 'wp-a11y', 'wp-block-editor', 'wp-components', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-url'), 'version' => 'b82e922db010c201ba06'), 'hooks.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '2810c76e705dd1a53b18'), 'html-entities.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '2cd3358363e0675638fb'), 'i18n.min.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => '5e580eb46a90c2b997e6'), 'is-shallow-equal.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'e0f9f1d78d83f5196979'), 'keyboard-shortcuts.min.js' => array('dependencies' => array('react', 'wp-data', 'wp-element', 'wp-keycodes', 'wp-polyfill'), 'version' => '4d239ebc17efd846a168'), 'keycodes.min.js' => array('dependencies' => array('wp-i18n', 'wp-polyfill'), 'version' => '034ff647a54b018581d3'), 'list-reusable-blocks.min.js' => array('dependencies' => array('react', 'wp-api-fetch', 'wp-blob', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => 'b9d73b532124daefd2c7'), 'media-utils.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-blob', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '03fbd6c4f505a9385efe'), 'notices.min.js' => array('dependencies' => array('wp-data', 'wp-polyfill'), 'version' => '673a68a7ac2f556ed50b'), 'nux.min.js' => array('dependencies' => array('react', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => '46c93a71c3e2c2bf37f0'), 'patterns.min.js' => array('dependencies' => array('react', 'wp-a11y', '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' => 'c0bb584452cfa1adce38'), 'plugins.min.js' => array('dependencies' => array('react', 'wp-compose', 'wp-element', 'wp-hooks', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-primitives'), 'version' => '2d369cbfdcb887111e06'), 'preferences.min.js' => array('dependencies' => array('react', 'wp-a11y', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-private-apis'), 'version' => 'e1544c6f06a9639c4c31'), 'preferences-persistence.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-polyfill'), 'version' => '3f5184d775ed9dfb154f'), 'primitives.min.js' => array('dependencies' => array('wp-element', 'wp-polyfill'), 'version' => 'a41bfd5835f583ae838a'), 'priority-queue.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '9c21c957c7e50ffdbf48'), 'private-apis.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '5e7fdf55d04b8c2aadef'), 'redux-routine.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'b14553dce2bee5c0f064'), 'reusable-blocks.min.js' => array('dependencies' => array('react', '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' => '008366ba172a4f4b92b4'), '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' => '9a29c159ef23c787afd3'), 'router.min.js' => array('dependencies' => array('react', 'wp-element', 'wp-polyfill', 'wp-private-apis', 'wp-url'), 'version' => '92fd517f31b92695552a'), 'server-side-render.min.js' => array('dependencies' => array('react', 'wp-api-fetch', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '04ce502cc4eef9b49ce7'), 'shortcode.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'b7747eee0efafd2f0c3b'), 'style-engine.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '03f13c515060de24b556'), 'token-list.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '05f8a6df6258f0081718'), 'undo-manager.min.js' => array('dependencies' => array('wp-is-shallow-equal', 'wp-polyfill'), 'version' => 'f0698003cb0f0a7bd794'), 'url.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '421139b01f33e5b327d8'), 'viewport.min.js' => array('dependencies' => array('react', 'wp-compose', 'wp-data', 'wp-polyfill'), 'version' => 'e555fda1d93ecf1fb1e0'), 'warning.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'ed7c8b0940914f4fe44b'), 'widgets.min.js' => array('dependencies' => array('react', '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' => '4c7bfc488be9e26d6488'), 'wordcount.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '55d8c2bf3dc99e7ea5ec')); + array('dependencies' => array('wp-dom-ready', 'wp-i18n', 'wp-polyfill'), 'version' => 'd90eebea464f6c09bfd5'), 'annotations.min.js' => array('dependencies' => array('wp-data', 'wp-hooks', 'wp-i18n', 'wp-polyfill', 'wp-rich-text'), 'version' => 'ffc4fc3374b0ab000805'), 'api-fetch.min.js' => array('dependencies' => array('wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '4c185334c5ec26e149cc'), 'autop.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '9fb50649848277dd318d'), 'blob.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '9113eed771d446f4a556'), 'block-directory.min.js' => array('dependencies' => array('react', '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-private-apis', 'wp-url'), 'version' => '9159053f41b8ec09d91b'), '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-style-engine', 'wp-token-list', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => 'd79cf6f16a85cb5fe472'), 'block-library.min.js' => array('dependencies' => array('react', '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-patterns', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-viewport', 'wp-wordcount'), 'version' => '537881dde4f32fef9523'), 'block-serialization-default-parser.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '14d44daebf663d05d330'), 'blocks.min.js' => array('dependencies' => array('react', '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-rich-text', 'wp-shortcode'), 'version' => '6612d078dfaf28b875b8'), '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' => 'e4060e55811e7824feb9'), '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' => 'c3a06857b0e51f435ccb'), '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' => '1339d3318cd44440dccb'), 'core-commands.min.js' => array('dependencies' => array('react', 'wp-commands', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-router', 'wp-url'), 'version' => '4ee9c423b71a59459ca6'), 'core-data.min.js' => array('dependencies' => array('react', '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-rich-text', 'wp-url'), 'version' => 'ff4b03fefe97d027b7fd'), 'customize-widgets.min.js' => array('dependencies' => array('react', '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' => '137692724827d41c9fb5'), 'data.min.js' => array('dependencies' => array('react', 'wp-compose', 'wp-deprecated', 'wp-element', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-priority-queue', 'wp-private-apis', 'wp-redux-routine'), 'version' => 'e6595ba1a7cd34429f66'), 'data-controls.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-data', 'wp-deprecated', 'wp-polyfill'), 'version' => '49f5587e8b90f9e7cc7e'), 'date.min.js' => array('dependencies' => array('moment', 'wp-deprecated', 'wp-polyfill'), 'version' => 'aaca6387d1cf924acc51'), 'deprecated.min.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => 'e1f84915c5e8ae38964c'), 'dom.min.js' => array('dependencies' => array('wp-deprecated', 'wp-polyfill'), 'version' => '4ecffbffba91b10c5c7a'), 'dom-ready.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'f77871ff7694fffea381'), 'edit-post.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-deprecated', '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' => '9728aeb8975647a9dabf'), 'edit-site.min.js' => array('dependencies' => array('react', 'react-dom', 'wp-a11y', 'wp-api-fetch', 'wp-blob', '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' => 'eeffba7b31470e6821e0'), 'edit-widgets.min.js' => array('dependencies' => array('react', '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' => '96a3b30b85133de96871'), 'editor.min.js' => array('dependencies' => array('react', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-commands', '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' => '3be80be0002f234e6815'), 'element.min.js' => array('dependencies' => array('react', 'react-dom', 'wp-escape-html', 'wp-polyfill'), 'version' => 'cb762d190aebbec25b27'), 'escape-html.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '6561a406d2d232a6fbd2'), 'format-library.min.js' => array('dependencies' => array('react', 'wp-a11y', 'wp-block-editor', 'wp-components', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-url'), 'version' => 'b82e922db010c201ba06'), 'hooks.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '2810c76e705dd1a53b18'), 'html-entities.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '2cd3358363e0675638fb'), 'i18n.min.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => '5e580eb46a90c2b997e6'), 'is-shallow-equal.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'e0f9f1d78d83f5196979'), 'keyboard-shortcuts.min.js' => array('dependencies' => array('react', 'wp-data', 'wp-element', 'wp-keycodes', 'wp-polyfill'), 'version' => '4d239ebc17efd846a168'), 'keycodes.min.js' => array('dependencies' => array('wp-i18n', 'wp-polyfill'), 'version' => '034ff647a54b018581d3'), 'list-reusable-blocks.min.js' => array('dependencies' => array('react', 'wp-api-fetch', 'wp-blob', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => 'b9d73b532124daefd2c7'), 'media-utils.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-blob', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '03fbd6c4f505a9385efe'), 'notices.min.js' => array('dependencies' => array('wp-data', 'wp-polyfill'), 'version' => '673a68a7ac2f556ed50b'), 'nux.min.js' => array('dependencies' => array('react', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => '46c93a71c3e2c2bf37f0'), 'patterns.min.js' => array('dependencies' => array('react', 'wp-a11y', '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' => '4221a93ac188f94e7aa4'), 'plugins.min.js' => array('dependencies' => array('react', 'wp-compose', 'wp-element', 'wp-hooks', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-primitives'), 'version' => '2d369cbfdcb887111e06'), 'preferences.min.js' => array('dependencies' => array('react', 'wp-a11y', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-private-apis'), 'version' => 'e1544c6f06a9639c4c31'), 'preferences-persistence.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-polyfill'), 'version' => '3f5184d775ed9dfb154f'), 'primitives.min.js' => array('dependencies' => array('wp-element', 'wp-polyfill'), 'version' => 'a41bfd5835f583ae838a'), 'priority-queue.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '9c21c957c7e50ffdbf48'), 'private-apis.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '5e7fdf55d04b8c2aadef'), 'redux-routine.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'b14553dce2bee5c0f064'), 'reusable-blocks.min.js' => array('dependencies' => array('react', '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' => '008366ba172a4f4b92b4'), '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' => 'a9c78250b12a043d4a04'), 'router.min.js' => array('dependencies' => array('react', 'wp-element', 'wp-polyfill', 'wp-private-apis', 'wp-url'), 'version' => '92fd517f31b92695552a'), 'server-side-render.min.js' => array('dependencies' => array('react', 'wp-api-fetch', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '04ce502cc4eef9b49ce7'), 'shortcode.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'b7747eee0efafd2f0c3b'), 'style-engine.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '03f13c515060de24b556'), 'token-list.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '05f8a6df6258f0081718'), 'undo-manager.min.js' => array('dependencies' => array('wp-is-shallow-equal', 'wp-polyfill'), 'version' => 'f0698003cb0f0a7bd794'), 'url.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '421139b01f33e5b327d8'), 'viewport.min.js' => array('dependencies' => array('react', 'wp-compose', 'wp-data', 'wp-polyfill'), 'version' => 'e555fda1d93ecf1fb1e0'), 'warning.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'ed7c8b0940914f4fe44b'), 'widgets.min.js' => array('dependencies' => array('react', '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' => '4c7bfc488be9e26d6488'), 'wordcount.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '55d8c2bf3dc99e7ea5ec')); diff --git a/src/wp-includes/block-bindings/pattern-overrides.php b/src/wp-includes/block-bindings/pattern-overrides.php index eae865e221628..825152b7a475a 100644 --- a/src/wp-includes/block-bindings/pattern-overrides.php +++ b/src/wp-includes/block-bindings/pattern-overrides.php @@ -20,11 +20,11 @@ * @return mixed The value computed for the source. */ function _block_bindings_pattern_overrides_get_value( array $source_args, $block_instance, string $attribute_name ) { - if ( empty( $block_instance->attributes['metadata']['id'] ) ) { + if ( empty( $block_instance->attributes['metadata']['name'] ) ) { return null; } - $block_id = $block_instance->attributes['metadata']['id']; - return _wp_array_get( $block_instance->context, array( 'pattern/overrides', $block_id, 'values', $attribute_name ), null ); + $metadata_name = $block_instance->attributes['metadata']['name']; + return _wp_array_get( $block_instance->context, array( 'pattern/overrides', $metadata_name, $attribute_name ), null ); } /** diff --git a/src/wp-includes/blocks/block.php b/src/wp-includes/blocks/block.php index 8e24317501d9f..4886373b5885a 100644 --- a/src/wp-includes/blocks/block.php +++ b/src/wp-includes/blocks/block.php @@ -46,26 +46,35 @@ function render_block_core_block( $attributes ) { $content = $wp_embed->run_shortcode( $reusable_block->post_content ); $content = $wp_embed->autoembed( $content ); - // Back compat, the content attribute was previously named overrides and - // had a slightly different format. For blocks that have not been migrated, - // also convert the format here so that the provided `pattern/overrides` - // context is correct. - if ( isset( $attributes['overrides'] ) && ! isset( $attributes['content'] ) ) { - $migrated_content = array(); - foreach ( $attributes['overrides'] as $id => $values ) { - $migrated_content[ $id ] = array( - 'values' => $values, - ); + // Back compat. + // For blocks that have not been migrated in the editor, add some back compat + // so that front-end rendering continues to work. + + // This matches the `v2` deprecation. Removes the inner `values` property + // from every item. + if ( isset( $attributes['content'] ) ) { + foreach ( $attributes['content'] as &$content_data ) { + if ( isset( $content_data['values'] ) ) { + $is_assoc_array = is_array( $content_data['values'] ) && ! wp_is_numeric_array( $content_data['values'] ); + + if ( $is_assoc_array ) { + $content_data = $content_data['values']; + } + } } - $attributes['content'] = $migrated_content; } - $has_pattern_overrides = isset( $attributes['content'] ); + + // This matches the `v1` deprecation. Rename `overrides` to `content`. + if ( isset( $attributes['overrides'] ) && ! isset( $attributes['content'] ) ) { + $attributes['content'] = $attributes['overrides']; + } /** * We set the `pattern/overrides` context through the `render_block_context` * filter so that it is available when a pattern's inner blocks are * rendering via do_blocks given it only receives the inner content. */ + $has_pattern_overrides = isset( $attributes['content'] ); if ( $has_pattern_overrides ) { $filter_block_context = static function ( $context ) use ( $attributes ) { $context['pattern/overrides'] = $attributes['content']; diff --git a/src/wp-includes/blocks/navigation.php b/src/wp-includes/blocks/navigation.php index 3a3a654aee612..1d73d09bbd1fb 100644 --- a/src/wp-includes/blocks/navigation.php +++ b/src/wp-includes/blocks/navigation.php @@ -552,7 +552,7 @@ private static function get_nav_element_directives( $is_interactive ) { return ''; } // When adding to this array be mindful of security concerns. - $nav_element_context = data_wp_context( + $nav_element_context = wp_interactivity_data_wp_context( array( 'overlayOpenedBy' => array( 'click' => false, diff --git a/src/wp-includes/blocks/search.php b/src/wp-includes/blocks/search.php index c368c2ab03dbf..ca8c70edfa907 100644 --- a/src/wp-includes/blocks/search.php +++ b/src/wp-includes/blocks/search.php @@ -179,7 +179,7 @@ function render_block_core_search( $attributes ) { if ( $is_expandable_searchfield ) { $aria_label_expanded = __( 'Submit Search' ); $aria_label_collapsed = __( 'Expand search field' ); - $form_context = data_wp_context( + $form_context = wp_interactivity_data_wp_context( array( 'isSearchInputVisible' => $open_by_default, 'inputId' => $input_id, From 0f45a3c9fc10d1abf68ec9e201e6113815cdbb34 Mon Sep 17 00:00:00 2001 From: Jb Audras Date: Mon, 4 Mar 2024 14:46:04 +0000 Subject: [PATCH 122/251] Docs: Update `WP_Query::tax_query` docblock to reflect that the property can be `null`. Props manooweb, swissspidy. Fixes #60563. git-svn-id: https://develop.svn.wordpress.org/trunk@57761 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class-wp-query.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/class-wp-query.php b/src/wp-includes/class-wp-query.php index 0f9ae28d5b080..66c8280f42b33 100644 --- a/src/wp-includes/class-wp-query.php +++ b/src/wp-includes/class-wp-query.php @@ -38,7 +38,7 @@ class WP_Query { * Taxonomy query, as passed to get_tax_sql(). * * @since 3.1.0 - * @var WP_Tax_Query A taxonomy query instance. + * @var WP_Tax_Query|null A taxonomy query instance. */ public $tax_query; From d61c50889628535c6c871b67ab6f62acea965487 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Mon, 4 Mar 2024 15:37:53 +0000 Subject: [PATCH 123/251] Interactivity API: Rename `data_wp_context()` to `wp_interactivity_data_wp_context()`. Increases clarity about where the function belongs to, bringing it in line with other related functions. After initially merging this change in [57742] and reverting it in [57743], this reintroduces it now that the Gutenberg packages have been updated accordingly in [57760]. Props swissspidy, gziolo, cbravobernal, youknowriad, ankitmaru, westonruter, luisherranz, darerodz. Fixes #60575. git-svn-id: https://develop.svn.wordpress.org/trunk@57762 602fd350-edb4-49c9-b593-d223f7449a82 --- .../interactivity-api/interactivity-api.php | 4 +- .../interactivity-api/interactivity-api.php | 42 +++++++++---------- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/src/wp-includes/interactivity-api/interactivity-api.php b/src/wp-includes/interactivity-api/interactivity-api.php index 548fcc3638fb7..120551b7e273a 100644 --- a/src/wp-includes/interactivity-api/interactivity-api.php +++ b/src/wp-includes/interactivity-api/interactivity-api.php @@ -149,7 +149,7 @@ function wp_interactivity_config( string $store_namespace, array $config = array * * Example: * - *
    true, 'count' => 0 ) ); ?>> + *
    true, 'count' => 0 ) ); ?>> * * @since 6.5.0 * @@ -158,7 +158,7 @@ function wp_interactivity_config( string $store_namespace, array $config = array * @return string A complete `data-wp-context` directive with a JSON encoded value representing the context array and * the store namespace if specified. */ -function data_wp_context( array $context, string $store_namespace = '' ): string { +function wp_interactivity_data_wp_context( array $context, string $store_namespace = '' ): string { return 'data-wp-context=\'' . ( $store_namespace ? $store_namespace . '::' : '' ) . ( empty( $context ) ? '{}' : wp_json_encode( $context, JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_HEX_AMP ) ) . diff --git a/tests/phpunit/tests/interactivity-api/interactivity-api.php b/tests/phpunit/tests/interactivity-api/interactivity-api.php index c98d74f415350..7d74fda8eb448 100644 --- a/tests/phpunit/tests/interactivity-api/interactivity-api.php +++ b/tests/phpunit/tests/interactivity-api/interactivity-api.php @@ -314,18 +314,18 @@ public function test_process_directives_only_process_the_root_interactive_blocks } /** - * Tests that data_wp_context function correctly converts different array + * Tests that wp_interactivity_data_wp_context function correctly converts different array * structures to a JSON string. * * @ticket 60356 * - * @covers ::data_wp_context + * @covers ::wp_interactivity_data_wp_context */ - public function test_data_wp_context_with_different_arrays() { - $this->assertEquals( 'data-wp-context=\'{}\'', data_wp_context( array() ) ); + public function test_wp_interactivity_data_wp_context_with_different_arrays() { + $this->assertEquals( 'data-wp-context=\'{}\'', wp_interactivity_data_wp_context( array() ) ); $this->assertEquals( 'data-wp-context=\'{"a":1,"b":"2","c":true}\'', - data_wp_context( + wp_interactivity_data_wp_context( array( 'a' => 1, 'b' => '2', @@ -335,27 +335,27 @@ public function test_data_wp_context_with_different_arrays() { ); $this->assertEquals( 'data-wp-context=\'{"a":[1,2]}\'', - data_wp_context( array( 'a' => array( 1, 2 ) ) ) + wp_interactivity_data_wp_context( array( 'a' => array( 1, 2 ) ) ) ); $this->assertEquals( 'data-wp-context=\'[1,2]\'', - data_wp_context( array( 1, 2 ) ) + wp_interactivity_data_wp_context( array( 1, 2 ) ) ); } /** - * Tests that data_wp_context function correctly converts different array + * Tests that wp_interactivity_data_wp_context function correctly converts different array * structures to a JSON string and adds a namespace. * * @ticket 60356 * - * @covers ::data_wp_context + * @covers ::wp_interactivity_data_wp_context */ - public function test_data_wp_context_with_different_arrays_and_a_namespace() { - $this->assertEquals( 'data-wp-context=\'myPlugin::{}\'', data_wp_context( array(), 'myPlugin' ) ); + public function test_wp_interactivity_data_wp_context_with_different_arrays_and_a_namespace() { + $this->assertEquals( 'data-wp-context=\'myPlugin::{}\'', wp_interactivity_data_wp_context( array(), 'myPlugin' ) ); $this->assertEquals( 'data-wp-context=\'myPlugin::{"a":1,"b":"2","c":true}\'', - data_wp_context( + wp_interactivity_data_wp_context( array( 'a' => 1, 'b' => '2', @@ -366,28 +366,28 @@ public function test_data_wp_context_with_different_arrays_and_a_namespace() { ); $this->assertEquals( 'data-wp-context=\'myPlugin::{"a":[1,2]}\'', - data_wp_context( array( 'a' => array( 1, 2 ) ), 'myPlugin' ) + wp_interactivity_data_wp_context( array( 'a' => array( 1, 2 ) ), 'myPlugin' ) ); $this->assertEquals( 'data-wp-context=\'myPlugin::[1,2]\'', - data_wp_context( array( 1, 2 ), 'myPlugin' ) + wp_interactivity_data_wp_context( array( 1, 2 ), 'myPlugin' ) ); } /** - * Tests that data_wp_context function correctly applies the JSON encoding + * Tests that wp_interactivity_data_wp_context function correctly applies the JSON encoding * flags. This ensures that characters like `<`, `>`, `'`, or `&` are * properly escaped in the JSON-encoded string to prevent potential XSS * attacks. * * @ticket 60356 * - * @covers ::data_wp_context + * @covers ::wp_interactivity_data_wp_context */ - public function test_data_wp_context_with_json_flags() { - $this->assertEquals( 'data-wp-context=\'{"tag":"\u003Cfoo\u003E"}\'', data_wp_context( array( 'tag' => '' ) ) ); - $this->assertEquals( 'data-wp-context=\'{"apos":"\u0027bar\u0027"}\'', data_wp_context( array( 'apos' => "'bar'" ) ) ); - $this->assertEquals( 'data-wp-context=\'{"quot":"\u0022baz\u0022"}\'', data_wp_context( array( 'quot' => '"baz"' ) ) ); - $this->assertEquals( 'data-wp-context=\'{"amp":"T\u0026T"}\'', data_wp_context( array( 'amp' => 'T&T' ) ) ); + public function test_wp_interactivity_data_wp_context_with_json_flags() { + $this->assertEquals( 'data-wp-context=\'{"tag":"\u003Cfoo\u003E"}\'', wp_interactivity_data_wp_context( array( 'tag' => '' ) ) ); + $this->assertEquals( 'data-wp-context=\'{"apos":"\u0027bar\u0027"}\'', wp_interactivity_data_wp_context( array( 'apos' => "'bar'" ) ) ); + $this->assertEquals( 'data-wp-context=\'{"quot":"\u0022baz\u0022"}\'', wp_interactivity_data_wp_context( array( 'quot' => '"baz"' ) ) ); + $this->assertEquals( 'data-wp-context=\'{"amp":"T\u0026T"}\'', wp_interactivity_data_wp_context( array( 'amp' => 'T&T' ) ) ); } } From 787601dc8e7ae40cddb0382f4e5b1ed9f17a8c03 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Mon, 4 Mar 2024 15:52:04 +0000 Subject: [PATCH 124/251] I18N: Cast magic MO marker number to integer. In gettext, `0x950412de` is used to signal GNU MO files. In `WP_Translation_File_MO` this magic marker is used to detect whether a file uses little endian or big endian. On 32 bit systems, this number will be interpreted by PHP as a float rather than an integer. This change adds extra casting to force an integer. A similar change was done in the pomo library in the past, see #3780. Props tmatsuur, swissspidy. Fixes #60678. git-svn-id: https://develop.svn.wordpress.org/trunk@57763 602fd350-edb4-49c9-b593-d223f7449a82 --- .../l10n/class-wp-translation-file-mo.php | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/wp-includes/l10n/class-wp-translation-file-mo.php b/src/wp-includes/l10n/class-wp-translation-file-mo.php index bf39cc70ec38b..3f5e72597ca5f 100644 --- a/src/wp-includes/l10n/class-wp-translation-file-mo.php +++ b/src/wp-includes/l10n/class-wp-translation-file-mo.php @@ -66,11 +66,13 @@ protected function detect_endian_and_validate_file( string $header ) { return false; } - if ( self::MAGIC_MARKER === $big ) { + // Force cast to an integer as it can be a float on x86 systems. See https://core.trac.wordpress.org/ticket/60678. + if ( (int) self::MAGIC_MARKER === $big ) { return 'N'; } - if ( self::MAGIC_MARKER === $little ) { + // Force cast to an integer as it can be a float on x86 systems. See https://core.trac.wordpress.org/ticket/60678. + if ( (int) self::MAGIC_MARKER === $little ) { return 'V'; } @@ -203,7 +205,17 @@ public function export(): string { $hash_addr = $translations_addr + $bytes_for_entries; $entry_offsets = $hash_addr; - $file_header = pack( $this->uint32 . '*', self::MAGIC_MARKER, 0 /* rev */, $entry_count, $originals_addr, $translations_addr, 0 /* hash_length */, $hash_addr ); + $file_header = pack( + $this->uint32 . '*', + // Force cast to an integer as it can be a float on x86 systems. See https://core.trac.wordpress.org/ticket/60678. + (int) self::MAGIC_MARKER, + 0, /* rev */ + $entry_count, + $originals_addr, + $translations_addr, + 0, /* hash_length */ + $hash_addr + ); $o_entries = ''; $t_entries = ''; From 80adc0b5f74297f4a225e9a82b31c2cdb8328409 Mon Sep 17 00:00:00 2001 From: Anthony Burchell Date: Mon, 4 Mar 2024 17:40:06 +0000 Subject: [PATCH 125/251] Media: Use consistent spacing for the media toolbar in both grid and list view. Previously, the spacing between media toolbar elements in grid and list view did not match. We now use the same select margin across both views. Props desrosj, seusmaniqbal, ianbelanger, subrataemfluence, sabernhardt, pooja1210, sumitbagthariya16, shailu25, devmuhib, huzaifaalmesbah, audrasjb. Fixes #43904. git-svn-id: https://develop.svn.wordpress.org/trunk@57764 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/css/media.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/wp-admin/css/media.css b/src/wp-admin/css/media.css index 4463ae373d32a..18ba835b20205 100644 --- a/src/wp-admin/css/media.css +++ b/src/wp-admin/css/media.css @@ -454,6 +454,10 @@ border color while dragging a file over the uploader drop area */ position: relative; } +.post-type-attachment .wp-filter select { + margin: 0 6px 0 0; +} + /** * Media Library grid view */ From 44c41a52cf653a5136fc43c9f8305ec1f5d17b1f Mon Sep 17 00:00:00 2001 From: Joe Dolson Date: Mon, 4 Mar 2024 21:48:29 +0000 Subject: [PATCH 126/251] Toolbar: Polish design and code combining duplicate profile links. Fixes some design changes and improves quality of comments and code styles following previous changes. Follow-up to [57708]. Props sabernhardt, huzaifaalmesbah, joedolson. Fixes #43633. See #34668. git-svn-id: https://develop.svn.wordpress.org/trunk@57765 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/admin-bar.php | 12 ++++++++---- src/wp-includes/class-wp-admin-bar.php | 2 +- src/wp-includes/css/admin-bar.css | 9 ++------- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/src/wp-includes/admin-bar.php b/src/wp-includes/admin-bar.php index e0c0712d303fc..d709de125c7e3 100644 --- a/src/wp-includes/admin-bar.php +++ b/src/wp-includes/admin-bar.php @@ -139,7 +139,7 @@ function wp_admin_bar_wp_menu( $wp_admin_bar ) { __( 'About WordPress' ) . '', 'href' => $about_url, - 'meta' => array( + 'meta' => array( 'menu_title' => __( 'About WordPress' ), ), ); @@ -286,7 +286,9 @@ function wp_admin_bar_my_account_item( $wp_admin_bar ) { 'href' => $profile_url, 'meta' => array( 'class' => $class, + /* translators: %s: Current user's display name. */ 'menu_title' => sprintf( __( 'Howdy, %s' ), $current_user->display_name ), + 'tabindex' => ( false !== $profile_url ) ? '' : 0, ), ) ); @@ -329,7 +331,9 @@ function wp_admin_bar_my_account_menu( $wp_admin_bar ) { $user_info .= "{$current_user->user_login}"; } - $user_info .= "" . __( 'Edit Profile' ) . ''; + if ( false !== $profile_url ) { + $user_info .= "" . __( 'Edit Profile' ) . ''; + } $wp_admin_bar->add_node( array( @@ -389,7 +393,7 @@ function wp_admin_bar_site_menu( $wp_admin_bar ) { 'id' => 'site-name', 'title' => $title, 'href' => ( is_admin() || ! current_user_can( 'read' ) ) ? home_url( '/' ) : admin_url(), - 'meta' => array( + 'meta' => array( 'menu_title' => $title, ), ) @@ -990,7 +994,7 @@ function wp_admin_bar_new_content_menu( $wp_admin_bar ) { 'id' => 'new-content', 'title' => $title, 'href' => admin_url( current( array_keys( $actions ) ) ), - 'meta' => array( + 'meta' => array( 'menu_title' => _x( 'New', 'admin bar menu group label' ), ), ) diff --git a/src/wp-includes/class-wp-admin-bar.php b/src/wp-includes/class-wp-admin-bar.php index 12ffc8fc32d57..093ed01872413 100644 --- a/src/wp-includes/class-wp-admin-bar.php +++ b/src/wp-includes/class-wp-admin-bar.php @@ -506,7 +506,7 @@ final protected function _render_container( $node ) { * @since 6.5.0 Added `$menu_title` parameter to allow an ARIA menu name. * * @param object $node - * @param string|bool $menu_title The accessible name of this aria menu or false if not provided. + * @param string|bool $menu_title The accessible name of this ARIA menu or false if not provided. */ final protected function _render_group( $node, $menu_title = false ) { if ( 'container' === $node->type ) { diff --git a/src/wp-includes/css/admin-bar.css b/src/wp-includes/css/admin-bar.css index ffb0ef3e23187..457295d08ed88 100644 --- a/src/wp-includes/css/admin-bar.css +++ b/src/wp-includes/css/admin-bar.css @@ -187,7 +187,7 @@ html:lang(he-il) .rtl #wpadminbar * { #wpadminbar.nojs .quicklinks .menupop:hover ul li .ab-item, #wpadminbar .shortlink-input { line-height: 2; - height: 26px; + height: 1.625rem; white-space: nowrap; min-width: 140px; } @@ -447,11 +447,6 @@ html:lang(he-il) .rtl #wpadminbar * { background: none; } -#wpadminbar #wp-admin-bar-user-info a { - display: grid; - row-gap: 12px; -} - #wp-admin-bar-user-info .avatar { position: absolute; left: -72px; @@ -468,7 +463,7 @@ html:lang(he-il) .rtl #wpadminbar * { #wpadminbar #wp-admin-bar-user-info span { background: none; padding: 0; - height: 18px; + height: 1.125rem; } #wpadminbar #wp-admin-bar-user-info .display-name, From 115b2970b802f4a158e74694d0372d055609e01e Mon Sep 17 00:00:00 2001 From: Aaron Jorbin Date: Tue, 5 Mar 2024 00:10:37 +0000 Subject: [PATCH 127/251] UI-Copy: Use capital cased singular for Site Icon. Follow up to [41749], [57713], and [57730]. Props johnbillion, audrasjb. Fixes #60686. git-svn-id: https://develop.svn.wordpress.org/trunk@57766 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/options-general.php | 2 +- src/wp-includes/class-wp-customize-manager.php | 2 +- src/wp-includes/customize/class-wp-customize-media-control.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wp-admin/options-general.php b/src/wp-admin/options-general.php index c704829b49611..28aa16cb9a455 100644 --- a/src/wp-admin/options-general.php +++ b/src/wp-admin/options-general.php @@ -199,7 +199,7 @@ class=""

    512 × 512' ); + printf( __( 'The Site Icon is what you see in browser tabs, bookmark bars, and within the WordPress mobile apps. It should be square and at least %s pixels.' ), '512 × 512' ); ?>

    diff --git a/src/wp-includes/class-wp-customize-manager.php b/src/wp-includes/class-wp-customize-manager.php index 51e979dfe056e..baad9fedab4c7 100644 --- a/src/wp-includes/class-wp-customize-manager.php +++ b/src/wp-includes/class-wp-customize-manager.php @@ -5199,7 +5199,7 @@ public function register_controls() { 'label' => __( 'Site Icon' ), 'description' => sprintf( /* translators: %s: Site Icon size in pixels. */ - '

    ' . __( 'Site Icons are what you see in browser tabs, bookmark bars, and within the WordPress mobile apps. They should be square and at least %s pixels.' ) . '

    ', + '

    ' . __( 'The Site Icon is what you see in browser tabs, bookmark bars, and within the WordPress mobile apps. It should be square and at least %s pixels.' ) . '

    ', '512 × 512' ), 'section' => 'title_tagline', diff --git a/src/wp-includes/customize/class-wp-customize-media-control.php b/src/wp-includes/customize/class-wp-customize-media-control.php index ba8d8e9d31887..c4af7c24ed2ed 100644 --- a/src/wp-includes/customize/class-wp-customize-media-control.php +++ b/src/wp-includes/customize/class-wp-customize-media-control.php @@ -245,7 +245,7 @@ public function get_default_button_labels() { case 'image': return array( 'select' => __( 'Select image' ), - 'site_icon' => __( 'Select site icon' ), + 'site_icon' => __( 'Select Site Icon' ), 'change' => __( 'Change image' ), 'default' => __( 'Default' ), 'remove' => __( 'Remove' ), From 70f374677ccc9b25a4db119b42b8cc62f80f7e11 Mon Sep 17 00:00:00 2001 From: Kelly Choyce-Dwan Date: Tue, 5 Mar 2024 03:01:09 +0000 Subject: [PATCH 128/251] Help/About: Add images to the About page. The images have been uploaded to the w.org CDN and added into the About page. Additionally, two unencoded apostrophes have been replaced in strings. Props benjamin_zekavica, richtabor, laurlittle. See #60303. git-svn-id: https://develop.svn.wordpress.org/trunk@57767 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/about.php | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/wp-admin/about.php b/src/wp-admin/about.php index dd98e39f62571..b1f85caff84ee 100644 --- a/src/wp-admin/about.php +++ b/src/wp-admin/about.php @@ -61,7 +61,7 @@
    - +
    @@ -77,7 +77,7 @@
    - +
    @@ -85,33 +85,33 @@
    - +

    -

    +

    - +

    - +

    - +

    @@ -121,21 +121,21 @@
    - +

    - +

    - +

    @@ -163,7 +163,7 @@

    -

    +

    From 4d562a102da7fffde90fbad27c09821609a071d4 Mon Sep 17 00:00:00 2001 From: Dennis Snell Date: Tue, 5 Mar 2024 05:32:19 +0000 Subject: [PATCH 129/251] HTML API: Ensure that breadcrumbs are properly retained after seeking. In some cases, it's possible to seek back into a location found inside an element which has been closed before the point in the document where the `seek()` was made. In these cases the breadcrumb stack is lost, and calling `get_breadcrumbs()` after the seek will return the wrong information. In this patch, the HTML Processor takes a conservative approach and moves to the front of the document, then reparses the document until it reaches the sought-after location. This ensures consistency on the stack of open elements and active formats, and preserves breadcrumbs. Developed in https://github.com/WordPress/wordpress-develop/pull/6185 Discussed in https://core.trac.wordpress.org/ticket/60687 Props jonsurrell. Follow-up to [60687]. See #58517. Fixes #60687. git-svn-id: https://develop.svn.wordpress.org/trunk@57768 602fd350-edb4-49c9-b593-d223f7449a82 --- .../html-api/class-wp-html-processor.php | 111 ++++++++++++------ .../html-api/wpHtmlProcessorBreadcrumbs.php | 22 ++++ 2 files changed, 94 insertions(+), 39 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 51b6a5679eb76..3021bee3a73db 100644 --- a/src/wp-includes/html-api/class-wp-html-processor.php +++ b/src/wp-includes/html-api/class-wp-html-processor.php @@ -241,15 +241,15 @@ public static function create_fragment( $html, $context = '', $encoding = return null; } - $p = new self( $html, self::CONSTRUCTOR_UNLOCK_CODE ); - $p->state->context_node = array( 'BODY', array() ); - $p->state->insertion_mode = WP_HTML_Processor_State::INSERTION_MODE_IN_BODY; + $processor = new self( $html, self::CONSTRUCTOR_UNLOCK_CODE ); + $processor->state->context_node = array( 'BODY', array() ); + $processor->state->insertion_mode = WP_HTML_Processor_State::INSERTION_MODE_IN_BODY; // @todo Create "fake" bookmarks for non-existent but implied nodes. - $p->bookmarks['root-node'] = new WP_HTML_Span( 0, 0 ); - $p->bookmarks['context-node'] = new WP_HTML_Span( 0, 0 ); + $processor->bookmarks['root-node'] = new WP_HTML_Span( 0, 0 ); + $processor->bookmarks['context-node'] = new WP_HTML_Span( 0, 0 ); - $p->state->stack_of_open_elements->push( + $processor->state->stack_of_open_elements->push( new WP_HTML_Token( 'root-node', 'HTML', @@ -257,15 +257,15 @@ public static function create_fragment( $html, $context = '', $encoding = ) ); - $p->state->stack_of_open_elements->push( + $processor->state->stack_of_open_elements->push( new WP_HTML_Token( 'context-node', - $p->state->context_node[0], + $processor->state->context_node[0], false ) ); - return $p; + return $processor; } /** @@ -1226,6 +1226,10 @@ public function release_bookmark( $bookmark_name ) { /** * Moves the internal cursor in the HTML Processor to a given bookmark's location. * + * Be careful! Seeking backwards to a previous location resets the parser to the + * start of the document and reparses the entire contents up until it finds the + * sought-after bookmarked location. + * * In order to prevent accidental infinite loops, there's a * maximum limit on the number of times seek() can be called. * @@ -1247,44 +1251,73 @@ public function seek( $bookmark_name ) { $bookmark_starts_at = $this->bookmarks[ $actual_bookmark_name ]->start; $direction = $bookmark_starts_at > $processor_started_at ? 'forward' : 'backward'; - switch ( $direction ) { - case 'forward': - // When moving forwards, reparse the document until reaching the same location as the original bookmark. - while ( $this->step() ) { - if ( $bookmark_starts_at === $this->bookmarks[ $this->state->current_token->bookmark_name ]->start ) { - return true; - } + /* + * If seeking backwards, it's possible that the sought-after bookmark exists within an element + * which has been closed before the current cursor; in other words, it has already been removed + * from the stack of open elements. This means that it's insufficient to simply pop off elements + * from the stack of open elements which appear after the bookmarked location and then jump to + * that location, as the elements which were open before won't be re-opened. + * + * In order to maintain consistency, the HTML Processor rewinds to the start of the document + * and reparses everything until it finds the sought-after bookmark. + * + * There are potentially better ways to do this: cache the parser state for each bookmark and + * restore it when seeking; store an immutable and idempotent register of where elements open + * and close. + * + * If caching the parser state it will be essential to properly maintain the cached stack of + * open elements and active formatting elements when modifying the document. This could be a + * tedious and time-consuming process as well, and so for now will not be performed. + * + * It may be possible to track bookmarks for where elements open and close, and in doing so + * be able to quickly recalculate breadcrumbs for any element in the document. It may even + * be possible to remove the stack of open elements and compute it on the fly this way. + * If doing this, the parser would need to track the opening and closing locations for all + * tokens in the breadcrumb path for any and all bookmarks. By utilizing bookmarks themselves + * this list could be automatically maintained while modifying the document. Finding the + * breadcrumbs would then amount to traversing that list from the start until the token + * being inspected. Once an element closes, if there are no bookmarks pointing to locations + * within that element, then all of these locations may be forgotten to save on memory use + * and computation time. + */ + if ( 'backward' === $direction ) { + /* + * Instead of clearing the parser state and starting fresh, calling the stack methods + * maintains the proper flags in the parser. + */ + foreach ( $this->state->stack_of_open_elements->walk_up() as $item ) { + if ( 'context-node' === $item->bookmark_name ) { + break; } - return false; - - case 'backward': - /* - * When moving backwards, clear out all existing stack entries which appear after the destination - * bookmark. These could be stored for later retrieval, but doing so would require additional - * memory overhead and also demand that references and bookmarks are updated as the document - * changes. In time this could be a valuable optimization, but it's okay to give up that - * optimization in exchange for more CPU time to recompute the stack, to re-parse the - * document that may have already been parsed once. - */ - foreach ( $this->state->stack_of_open_elements->walk_up() as $item ) { - if ( $bookmark_starts_at >= $this->bookmarks[ $item->bookmark_name ]->start ) { - break; - } + $this->state->stack_of_open_elements->remove_node( $item ); + } - $this->state->stack_of_open_elements->remove_node( $item ); + foreach ( $this->state->active_formatting_elements->walk_up() as $item ) { + if ( 'context-node' === $item->bookmark_name ) { + break; } - foreach ( $this->state->active_formatting_elements->walk_up() as $item ) { - if ( $bookmark_starts_at >= $this->bookmarks[ $item->bookmark_name ]->start ) { - break; - } + $this->state->active_formatting_elements->remove_node( $item ); + } - $this->state->active_formatting_elements->remove_node( $item ); - } + parent::seek( 'context-node' ); + $this->state->insertion_mode = WP_HTML_Processor_State::INSERTION_MODE_IN_BODY; + $this->state->frameset_ok = true; + } + + // When moving forwards, reparse the document until reaching the same location as the original bookmark. + if ( $bookmark_starts_at === $this->bookmarks[ $this->state->current_token->bookmark_name ]->start ) { + return true; + } - return parent::seek( $actual_bookmark_name ); + while ( $this->step() ) { + if ( $bookmark_starts_at === $this->bookmarks[ $this->state->current_token->bookmark_name ]->start ) { + return true; + } } + + return false; } /** diff --git a/tests/phpunit/tests/html-api/wpHtmlProcessorBreadcrumbs.php b/tests/phpunit/tests/html-api/wpHtmlProcessorBreadcrumbs.php index 1488be91654a7..b6f9131f56b6d 100644 --- a/tests/phpunit/tests/html-api/wpHtmlProcessorBreadcrumbs.php +++ b/tests/phpunit/tests/html-api/wpHtmlProcessorBreadcrumbs.php @@ -545,4 +545,26 @@ public function test_can_seek_back_and_forth() { $processor->seek( 'second' ); $this->assertTrue( $processor->get_attribute( 'two' ) ); } + + /** + * Ensures that breadcrumbs are properly reported after seeking backward to a location + * inside an element which has been fully closed before the seek. + * + * @ticket 60687 + */ + public function test_retains_proper_bookmarks_after_seeking_back_to_closed_element() { + $processor = WP_HTML_Processor::create_fragment( '

    ' ); + + $processor->next_tag( 'IMG' ); + $processor->set_bookmark( 'first' ); + + $processor->next_tag( 'HR' ); + + $processor->seek( 'first' ); + $this->assertSame( + array( 'HTML', 'BODY', 'DIV', 'IMG' ), + $processor->get_breadcrumbs(), + 'Should have retained breadcrumbs from bookmarked location after seeking backwards to it.' + ); + } } From a2c196cc49a90963cd2a2e442997bf1298c14ecb Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Tue, 5 Mar 2024 06:25:22 +0000 Subject: [PATCH 130/251] Plugins: Improve plugin dependency admin notices. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This makes several refinements to the various notices displayed in the WordPress admin related to plugin dependencies. Additionally, it adds some conditions to display more appropriate messages for multisite installs with proper context to the user’s capabilities. Props costdev, joedolson, afragen, swissspidy, peterwilsoncc, euthelup. Fixes #60465. git-svn-id: https://develop.svn.wordpress.org/trunk@57769 602fd350-edb4-49c9-b593-d223f7449a82 --- .../includes/class-wp-plugins-list-table.php | 26 +++++++++++++++---- .../class-wp-plugin-dependencies.php | 24 +++++++++++++++-- 2 files changed, 43 insertions(+), 7 deletions(-) diff --git a/src/wp-admin/includes/class-wp-plugins-list-table.php b/src/wp-admin/includes/class-wp-plugins-list-table.php index 4777a8edcfdc3..4cc0132b6fa7d 100644 --- a/src/wp-admin/includes/class-wp-plugins-list-table.php +++ b/src/wp-admin/includes/class-wp-plugins-list-table.php @@ -1567,19 +1567,35 @@ protected function add_dependencies_to_dependent_plugin_row( $dependent ) { $links[] = $this->get_dependency_view_details_link( $name, $slug ); } - $dependency_note = __( 'Note: This plugin cannot be activated until the plugins that are required by it are activated.' ); - - $comma = wp_get_list_item_separator(); - $requires = sprintf( + $is_active = is_multisite() ? is_plugin_active_for_network( $dependent ) : is_plugin_active( $dependent ); + $comma = wp_get_list_item_separator(); + $requires = sprintf( /* translators: %s: List of dependency names. */ __( 'Requires: %s' ), implode( $comma, $links ) ); + $notice = ''; + $error_message = ''; + if ( WP_Plugin_Dependencies::has_unmet_dependencies( $dependent ) ) { + if ( $is_active ) { + $error_message = __( 'This plugin is active but may not function correctly because required plugins are missing or inactive.' ); + } else { + $error_message = __( 'This plugin cannot be activated because required plugins are missing or inactive.' ); + } + $notice = wp_get_admin_notice( + $error_message, + array( + 'type' => 'error', + 'additional_classes' => array( 'inline', 'notice-alt' ), + ) + ); + } + printf( '

    %1$s

    %2$s

    ', $requires, - $dependency_note + $notice ); } diff --git a/src/wp-includes/class-wp-plugin-dependencies.php b/src/wp-includes/class-wp-plugin-dependencies.php index 645285a7c06e2..77444f33d17f5 100644 --- a/src/wp-includes/class-wp-plugin-dependencies.php +++ b/src/wp-includes/class-wp-plugin-dependencies.php @@ -369,10 +369,30 @@ public static function get_dependency_data( $slug ) { */ public static function display_admin_notice_for_unmet_dependencies() { if ( in_array( false, self::get_dependency_filepaths(), true ) ) { + $error_message = __( 'Some required plugins are missing or inactive.' ); + + if ( is_multisite() ) { + if ( current_user_can( 'manage_network_plugins' ) ) { + $error_message .= ' ' . sprintf( + /* translators: %s: Link to the network plugins page. */ + __( 'Manage plugins.' ), + esc_url( network_admin_url( 'plugins.php' ) ) + ); + } else { + $error_message .= ' ' . __( 'Please contact your network administrator.' ); + } + } elseif ( 'plugins' !== get_current_screen()->base ) { + $error_message .= ' ' . sprintf( + /* translators: %s: Link to the plugins page. */ + __( 'Manage plugins.' ), + esc_url( admin_url( 'plugins.php' ) ) + ); + } + wp_admin_notice( - __( 'There are additional plugin dependencies that must be installed.' ), + $error_message, array( - 'type' => 'info', + 'type' => 'warning', ) ); } From 17f692b3746d0c3826c788424960eb8424ba848f Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Tue, 5 Mar 2024 06:46:34 +0000 Subject: [PATCH 131/251] Plugins: Improve plugin dependency related error messages. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This makes several refinements to the various error messages displayed throughout the WordPress admin related to plugin dependencies. Additionally, it adds some conditions to display more appropriate messages for multisite installs with proper context to the user’s capabilities. Props costdev, swissspidy, afragen, huzaifaalmesbah, knutsp. Fixes #60465. git-svn-id: https://develop.svn.wordpress.org/trunk@57770 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/plugin.php | 49 +++++++++++++++++++++++++------- 1 file changed, 39 insertions(+), 10 deletions(-) diff --git a/src/wp-admin/includes/plugin.php b/src/wp-admin/includes/plugin.php index 680f4a77284a9..76e74d5986763 100644 --- a/src/wp-admin/includes/plugin.php +++ b/src/wp-admin/includes/plugin.php @@ -1202,26 +1202,55 @@ function validate_plugin_requirements( $plugin ) { WP_Plugin_Dependencies::initialize(); if ( WP_Plugin_Dependencies::has_unmet_dependencies( $plugin ) ) { - $dependencies = WP_Plugin_Dependencies::get_dependencies( $plugin ); - $unmet_dependencies = array(); + $dependency_names = WP_Plugin_Dependencies::get_dependency_names( $plugin ); + $unmet_dependencies = array(); + $unmet_dependency_names = array(); - foreach ( $dependencies as $dependency ) { + foreach ( $dependency_names as $dependency => $dependency_name ) { $dependency_file = WP_Plugin_Dependencies::get_dependency_filepath( $dependency ); if ( false === $dependency_file ) { - $unmet_dependencies['not_installed'][] = $dependency; + $unmet_dependencies['not_installed'][ $dependency ] = $dependency_name; + $unmet_dependency_names[] = $dependency_name; } elseif ( is_plugin_inactive( $dependency_file ) ) { - $unmet_dependencies['inactive'][] = $dependency; + $unmet_dependencies['inactive'][ $dependency ] = $dependency_name; + $unmet_dependency_names[] = $dependency_name; } } + $error_message = sprintf( + /* translators: 1: Plugin name, 2: Number of plugins, 3: A comma-separated list of plugin names. */ + _n( + 'Error: %1$s requires %2$d plugin to be installed and activated: %3$s.', + 'Error: %1$s requires %2$d plugins to be installed and activated: %3$s.', + count( $unmet_dependency_names ) + ), + $plugin_headers['Name'], + count( $unmet_dependency_names ), + implode( wp_get_list_item_separator(), $unmet_dependency_names ) + ); + + if ( is_multisite() ) { + if ( current_user_can( 'manage_network_plugins' ) ) { + $error_message .= ' ' . sprintf( + /* translators: %s: Link to the plugins page. */ + __( 'Manage plugins.' ), + esc_url( network_admin_url( 'plugins.php' ) ) + ); + } else { + $error_message .= ' ' . __( 'Please contact your network administrator.' ); + } + } else { + $error_message .= ' ' . sprintf( + /* translators: %s: Link to the plugins page. */ + __( 'Manage plugins.' ), + esc_url( admin_url( 'plugins.php' ) ) + ); + } + return new WP_Error( 'plugin_missing_dependencies', - '

    ' . sprintf( - /* translators: %s: Plugin name. */ - _x( 'Error: %s requires plugins that are not installed or activated.', 'plugin' ), - $plugin_headers['Name'] - ) . '

    ', + "

    {$error_message}

    ", $unmet_dependencies ); } From 7002bce8abe6f6f1858bdd2f02cd1168ef50e4d8 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Tue, 5 Mar 2024 06:53:44 +0000 Subject: [PATCH 132/251] Coding standards: Apply some changes after `composer format`. Follow up to [57565], [57627], [57755], See #60233, #60506, #60524. git-svn-id: https://develop.svn.wordpress.org/trunk@57771 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/block-template-utils.php | 4 +- .../class-wp-rest-block-types-controller.php | 56 +++++----- .../wpCopyParentAttachmentProperties.php | 104 +++++++++--------- 3 files changed, 82 insertions(+), 82 deletions(-) diff --git a/src/wp-includes/block-template-utils.php b/src/wp-includes/block-template-utils.php index 01416c19c6b39..75e664ad9b366 100644 --- a/src/wp-includes/block-template-utils.php +++ b/src/wp-includes/block-template-utils.php @@ -1463,8 +1463,8 @@ function inject_ignored_hooked_blocks_metadata_attributes( $post ) { wp_update_post( array( - 'ID' => $post->ID, - 'post_content' => $content, + 'ID' => $post->ID, + 'post_content' => $content, ) ); } diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-block-types-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-block-types-controller.php index 9577ebe8008e7..38ac0e1881d2a 100644 --- a/src/wp-includes/rest-api/endpoints/class-wp-rest-block-types-controller.php +++ b/src/wp-includes/rest-api/endpoints/class-wp-rest-block-types-controller.php @@ -470,21 +470,21 @@ public function get_item_schema() { 'title' => 'block-type', 'type' => 'object', 'properties' => array( - 'api_version' => array( + 'api_version' => array( 'description' => __( 'Version of block API.' ), 'type' => 'integer', 'default' => 1, 'context' => array( 'embed', 'view', 'edit' ), 'readonly' => true, ), - 'title' => array( + 'title' => array( 'description' => __( 'Title of block type.' ), 'type' => 'string', 'default' => '', 'context' => array( 'embed', 'view', 'edit' ), 'readonly' => true, ), - 'name' => array( + 'name' => array( 'description' => __( 'Unique name identifying the block type.' ), 'type' => 'string', 'pattern' => self::NAME_PATTERN, @@ -492,15 +492,15 @@ public function get_item_schema() { 'context' => array( 'embed', 'view', 'edit' ), 'readonly' => true, ), - 'description' => array( + 'description' => array( 'description' => __( 'Description of block type.' ), 'type' => 'string', 'default' => '', 'context' => array( 'embed', 'view', 'edit' ), 'readonly' => true, ), - 'icon' => $icon_definition, - 'attributes' => array( + 'icon' => $icon_definition, + 'attributes' => array( 'description' => __( 'Block attributes.' ), 'type' => array( 'object', 'null' ), 'properties' => array(), @@ -511,7 +511,7 @@ public function get_item_schema() { 'context' => array( 'embed', 'view', 'edit' ), 'readonly' => true, ), - 'provides_context' => array( + 'provides_context' => array( 'description' => __( 'Context provided by blocks of this type.' ), 'type' => 'object', 'properties' => array(), @@ -522,7 +522,7 @@ public function get_item_schema() { 'context' => array( 'embed', 'view', 'edit' ), 'readonly' => true, ), - 'uses_context' => array( + 'uses_context' => array( 'description' => __( 'Context values inherited by blocks of this type.' ), 'type' => 'array', 'default' => array(), @@ -532,7 +532,7 @@ public function get_item_schema() { 'context' => array( 'embed', 'view', 'edit' ), 'readonly' => true, ), - 'selectors' => array( + 'selectors' => array( 'description' => __( 'Custom CSS selectors.' ), 'type' => 'object', 'default' => array(), @@ -540,7 +540,7 @@ public function get_item_schema() { 'context' => array( 'embed', 'view', 'edit' ), 'readonly' => true, ), - 'supports' => array( + 'supports' => array( 'description' => __( 'Block supports.' ), 'type' => 'object', 'default' => array(), @@ -548,15 +548,15 @@ public function get_item_schema() { 'context' => array( 'embed', 'view', 'edit' ), 'readonly' => true, ), - 'category' => $category_definition, - 'is_dynamic' => array( + 'category' => $category_definition, + 'is_dynamic' => array( 'description' => __( 'Is the block dynamically rendered.' ), 'type' => 'boolean', 'default' => false, 'context' => array( 'embed', 'view', 'edit' ), 'readonly' => true, ), - 'editor_script_handles' => array( + 'editor_script_handles' => array( 'description' => __( 'Editor script handles.' ), 'type' => array( 'array' ), 'default' => array(), @@ -566,7 +566,7 @@ public function get_item_schema() { 'context' => array( 'embed', 'view', 'edit' ), 'readonly' => true, ), - 'script_handles' => array( + 'script_handles' => array( 'description' => __( 'Public facing and editor script handles.' ), 'type' => array( 'array' ), 'default' => array(), @@ -576,7 +576,7 @@ public function get_item_schema() { 'context' => array( 'embed', 'view', 'edit' ), 'readonly' => true, ), - 'view_script_handles' => array( + 'view_script_handles' => array( 'description' => __( 'Public facing script handles.' ), 'type' => array( 'array' ), 'default' => array(), @@ -586,7 +586,7 @@ public function get_item_schema() { 'context' => array( 'embed', 'view', 'edit' ), 'readonly' => true, ), - 'view_script_module_ids' => array( + 'view_script_module_ids' => array( 'description' => __( 'Public facing script module IDs.' ), 'type' => array( 'array' ), 'default' => array(), @@ -596,7 +596,7 @@ public function get_item_schema() { 'context' => array( 'embed', 'view', 'edit' ), 'readonly' => true, ), - 'editor_style_handles' => array( + 'editor_style_handles' => array( 'description' => __( 'Editor style handles.' ), 'type' => array( 'array' ), 'default' => array(), @@ -606,7 +606,7 @@ public function get_item_schema() { 'context' => array( 'embed', 'view', 'edit' ), 'readonly' => true, ), - 'style_handles' => array( + 'style_handles' => array( 'description' => __( 'Public facing and editor style handles.' ), 'type' => array( 'array' ), 'default' => array(), @@ -616,7 +616,7 @@ public function get_item_schema() { 'context' => array( 'embed', 'view', 'edit' ), 'readonly' => true, ), - 'view_style_handles' => array( + 'view_style_handles' => array( 'description' => __( 'Public facing style handles.' ), 'type' => array( 'array' ), 'default' => array(), @@ -626,7 +626,7 @@ public function get_item_schema() { 'context' => array( 'embed', 'view', 'edit' ), 'readonly' => true, ), - 'styles' => array( + 'styles' => array( 'description' => __( 'Block style variations.' ), 'type' => 'array', 'items' => array( @@ -655,7 +655,7 @@ public function get_item_schema() { 'context' => array( 'embed', 'view', 'edit' ), 'readonly' => true, ), - 'variations' => array( + 'variations' => array( 'description' => __( 'Block variations.' ), 'type' => 'array', 'items' => array( @@ -707,14 +707,14 @@ public function get_item_schema() { 'context' => array( 'embed', 'view', 'edit' ), 'default' => null, ), - 'textdomain' => array( + 'textdomain' => array( 'description' => __( 'Public text domain.' ), 'type' => array( 'string', 'null' ), 'default' => null, 'context' => array( 'embed', 'view', 'edit' ), 'readonly' => true, ), - 'parent' => array( + 'parent' => array( 'description' => __( 'Parent blocks.' ), 'type' => array( 'array', 'null' ), 'items' => array( @@ -725,7 +725,7 @@ public function get_item_schema() { 'context' => array( 'embed', 'view', 'edit' ), 'readonly' => true, ), - 'ancestor' => array( + 'ancestor' => array( 'description' => __( 'Ancestor blocks.' ), 'type' => array( 'array', 'null' ), 'items' => array( @@ -736,7 +736,7 @@ public function get_item_schema() { 'context' => array( 'embed', 'view', 'edit' ), 'readonly' => true, ), - 'allowed_blocks' => array( + 'allowed_blocks' => array( 'description' => __( 'Allowed child block types.' ), 'type' => array( 'array', 'null' ), 'items' => array( @@ -747,9 +747,9 @@ public function get_item_schema() { 'context' => array( 'embed', 'view', 'edit' ), 'readonly' => true, ), - 'keywords' => $keywords_definition, - 'example' => $example_definition, - 'block_hooks' => array( + 'keywords' => $keywords_definition, + 'example' => $example_definition, + 'block_hooks' => array( 'description' => __( 'This block is automatically inserted near any occurrence of the block types used as keys of this map, into a relative position given by the corresponding value.' ), 'type' => 'object', 'patternProperties' => array( diff --git a/tests/phpunit/tests/media/wpCopyParentAttachmentProperties.php b/tests/phpunit/tests/media/wpCopyParentAttachmentProperties.php index e6fc1e9bc69a8..a91431263bcb2 100644 --- a/tests/phpunit/tests/media/wpCopyParentAttachmentProperties.php +++ b/tests/phpunit/tests/media/wpCopyParentAttachmentProperties.php @@ -1,52 +1,52 @@ -remove_added_uploads(); - - parent::tear_down(); - } - - public function test_wp_copy_parent_attachment_properties() { - $attachment = $this->factory->attachment->create_upload_object( DIR_TESTDATA . '/images/canola.jpg' ); - $parent_url = get_post( $attachment )->guid; - // Add alternative text. - update_post_meta( $attachment, '_wp_attachment_image_alt', 'Alt text' ); - // Add image description. - wp_update_post( - array( - 'ID' => $attachment, - 'post_excerpt' => 'Image description', - ) - ); - $file = wp_crop_image( - DIR_TESTDATA . '/images/canola.jpg', - 0, - 0, - 100, - 100, - 100, - 100 - ); - - $object = wp_copy_parent_attachment_properties( $file, $attachment ); - $cropped = str_replace( wp_basename( $parent_url ), 'cropped-canola.jpg', $parent_url ); - - $this->assertSame( $object['post_title'], 'cropped-canola.jpg', 'Attachment title is not identical' ); - $this->assertSame( $object['context'], '', 'Attachment context is not identical' ); - $this->assertSame( $object['post_mime_type'], 'image/jpeg', 'Attachment mime type is not identical' ); - $this->assertSame( $object['post_content'], $cropped, 'Attachment content is not identical' ); - $this->assertSame( $object['guid'], $cropped, 'Attachment GUID is not identical' ); - $this->assertSame( $object['meta_input']['_wp_attachment_image_alt'], 'Alt text', 'Attachment alt text is not identical' ); - $this->assertSame( $object['post_excerpt'], 'Image description', 'Attachment description is not identical' ); - - unlink( $file ); - } -} +remove_added_uploads(); + + parent::tear_down(); + } + + public function test_wp_copy_parent_attachment_properties() { + $attachment = $this->factory->attachment->create_upload_object( DIR_TESTDATA . '/images/canola.jpg' ); + $parent_url = get_post( $attachment )->guid; + // Add alternative text. + update_post_meta( $attachment, '_wp_attachment_image_alt', 'Alt text' ); + // Add image description. + wp_update_post( + array( + 'ID' => $attachment, + 'post_excerpt' => 'Image description', + ) + ); + $file = wp_crop_image( + DIR_TESTDATA . '/images/canola.jpg', + 0, + 0, + 100, + 100, + 100, + 100 + ); + + $object = wp_copy_parent_attachment_properties( $file, $attachment ); + $cropped = str_replace( wp_basename( $parent_url ), 'cropped-canola.jpg', $parent_url ); + + $this->assertSame( $object['post_title'], 'cropped-canola.jpg', 'Attachment title is not identical' ); + $this->assertSame( $object['context'], '', 'Attachment context is not identical' ); + $this->assertSame( $object['post_mime_type'], 'image/jpeg', 'Attachment mime type is not identical' ); + $this->assertSame( $object['post_content'], $cropped, 'Attachment content is not identical' ); + $this->assertSame( $object['guid'], $cropped, 'Attachment GUID is not identical' ); + $this->assertSame( $object['meta_input']['_wp_attachment_image_alt'], 'Alt text', 'Attachment alt text is not identical' ); + $this->assertSame( $object['post_excerpt'], 'Image description', 'Attachment description is not identical' ); + + unlink( $file ); + } +} From eab2cb9a4f731580dd42df806986148d43807760 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 5 Mar 2024 11:41:53 +0000 Subject: [PATCH 133/251] Docs: Document the usage of `$_paused_plugins` and `$_paused_themes` globals. Follow-up to [44973]. Props upadalavipul, sabernhardt. See #60021. git-svn-id: https://develop.svn.wordpress.org/trunk@57772 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/plugin.php | 7 ++++++- src/wp-admin/includes/theme.php | 7 ++++++- src/wp-includes/load.php | 4 ++++ 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/wp-admin/includes/plugin.php b/src/wp-admin/includes/plugin.php index 76e74d5986763..84d9dcad1ef73 100644 --- a/src/wp-admin/includes/plugin.php +++ b/src/wp-admin/includes/plugin.php @@ -2456,6 +2456,8 @@ function wp_add_privacy_policy_content( $plugin_name, $policy_text ) { * Conditional Tags} article in the Theme Developer Handbook. * * @since 5.2.0 + * + * @global WP_Paused_Extensions_Storage $_paused_plugins * * @param string $plugin Path to the plugin file relative to the plugins directory. * @return bool True, if in the list of paused plugins. False, if not in the list. @@ -2478,6 +2480,8 @@ function is_plugin_paused( $plugin ) { * Gets the error that was recorded for a paused plugin. * * @since 5.2.0 + * + * @global WP_Paused_Extensions_Storage $_paused_plugins * * @param string $plugin Path to the plugin file relative to the plugins directory. * @return array|false Array of error information as returned by `error_get_last()`, @@ -2553,7 +2557,8 @@ function resume_plugin( $plugin, $redirect = '' ) { * * @since 5.2.0 * - * @global string $pagenow The filename of the current screen. + * @global string $pagenow The filename of the current screen. + * @global WP_Paused_Extensions_Storage $_paused_plugins */ function paused_plugins_notice() { if ( 'plugins.php' === $GLOBALS['pagenow'] ) { diff --git a/src/wp-admin/includes/theme.php b/src/wp-admin/includes/theme.php index e89250b4f7ccd..cae4529e1f4de 100644 --- a/src/wp-admin/includes/theme.php +++ b/src/wp-admin/includes/theme.php @@ -1110,6 +1110,8 @@ function customize_themes_print_templates() { * Conditional Tags} article in the Theme Developer Handbook. * * @since 5.2.0 + * + * @global WP_Paused_Extensions_Storage $_paused_themes * * @param string $theme Path to the theme directory relative to the themes directory. * @return bool True, if in the list of paused themes. False, not in the list. @@ -1130,6 +1132,8 @@ function is_theme_paused( $theme ) { * Gets the error that was recorded for a paused theme. * * @since 5.2.0 + * + * @global WP_Paused_Extensions_Storage $_paused_themes * * @param string $theme Path to the theme directory relative to the themes * directory. @@ -1221,7 +1225,8 @@ function resume_theme( $theme, $redirect = '' ) { * * @since 5.2.0 * - * @global string $pagenow The filename of the current screen. + * @global string $pagenow The filename of the current screen. + * @global WP_Paused_Extensions_Storage $_paused_themes */ function paused_themes_notice() { if ( 'themes.php' === $GLOBALS['pagenow'] ) { diff --git a/src/wp-includes/load.php b/src/wp-includes/load.php index 509c1cb3192ea..1bff9c697623f 100644 --- a/src/wp-includes/load.php +++ b/src/wp-includes/load.php @@ -1013,6 +1013,8 @@ function wp_get_active_and_valid_plugins() { * Filters a given list of plugins, removing any paused plugins from it. * * @since 5.2.0 + * + * @global WP_Paused_Extensions_Storage $_paused_plugins * * @param string[] $plugins Array of absolute plugin main file paths. * @return string[] Filtered array of plugins, without any paused plugins. @@ -1087,6 +1089,8 @@ function wp_get_active_and_valid_themes() { * Filters a given list of themes, removing any paused themes from it. * * @since 5.2.0 + * + * @global WP_Paused_Extensions_Storage $_paused_themes * * @param string[] $themes Array of absolute theme directory paths. * @return string[] Filtered array of absolute paths to themes, without any paused themes. From 56297f50003efe51491b04a2c861388acc2f9561 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 5 Mar 2024 11:52:05 +0000 Subject: [PATCH 134/251] Coding Standards: Remove some extra trailing spaces. Follow-up to [57772]. See #60021. git-svn-id: https://develop.svn.wordpress.org/trunk@57773 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/plugin.php | 4 ++-- src/wp-admin/includes/theme.php | 4 ++-- src/wp-includes/load.php | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/wp-admin/includes/plugin.php b/src/wp-admin/includes/plugin.php index 84d9dcad1ef73..bcae2733670d2 100644 --- a/src/wp-admin/includes/plugin.php +++ b/src/wp-admin/includes/plugin.php @@ -2456,7 +2456,7 @@ function wp_add_privacy_policy_content( $plugin_name, $policy_text ) { * Conditional Tags} article in the Theme Developer Handbook. * * @since 5.2.0 - * + * * @global WP_Paused_Extensions_Storage $_paused_plugins * * @param string $plugin Path to the plugin file relative to the plugins directory. @@ -2480,7 +2480,7 @@ function is_plugin_paused( $plugin ) { * Gets the error that was recorded for a paused plugin. * * @since 5.2.0 - * + * * @global WP_Paused_Extensions_Storage $_paused_plugins * * @param string $plugin Path to the plugin file relative to the plugins directory. diff --git a/src/wp-admin/includes/theme.php b/src/wp-admin/includes/theme.php index cae4529e1f4de..36dc28bac910c 100644 --- a/src/wp-admin/includes/theme.php +++ b/src/wp-admin/includes/theme.php @@ -1110,7 +1110,7 @@ function customize_themes_print_templates() { * Conditional Tags} article in the Theme Developer Handbook. * * @since 5.2.0 - * + * * @global WP_Paused_Extensions_Storage $_paused_themes * * @param string $theme Path to the theme directory relative to the themes directory. @@ -1132,7 +1132,7 @@ function is_theme_paused( $theme ) { * Gets the error that was recorded for a paused theme. * * @since 5.2.0 - * + * * @global WP_Paused_Extensions_Storage $_paused_themes * * @param string $theme Path to the theme directory relative to the themes diff --git a/src/wp-includes/load.php b/src/wp-includes/load.php index 1bff9c697623f..40947a0b202dc 100644 --- a/src/wp-includes/load.php +++ b/src/wp-includes/load.php @@ -1013,7 +1013,7 @@ function wp_get_active_and_valid_plugins() { * Filters a given list of plugins, removing any paused plugins from it. * * @since 5.2.0 - * + * * @global WP_Paused_Extensions_Storage $_paused_plugins * * @param string[] $plugins Array of absolute plugin main file paths. @@ -1089,7 +1089,7 @@ function wp_get_active_and_valid_themes() { * Filters a given list of themes, removing any paused themes from it. * * @since 5.2.0 - * + * * @global WP_Paused_Extensions_Storage $_paused_themes * * @param string[] $themes Array of absolute theme directory paths. From 8dbf39e28a30d937a899da27c2805c22183673c1 Mon Sep 17 00:00:00 2001 From: Jb Audras Date: Tue, 5 Mar 2024 13:37:51 +0000 Subject: [PATCH 135/251] Docs: Add missing `@global` mention in `wp_interactivity()`. This merges a changeset updated upstream in the Gutenberg repository. See https://github.com/WordPress/gutenberg/pull/59522. Props wildworks. Fixes #60677. See #59651. git-svn-id: https://develop.svn.wordpress.org/trunk@57774 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/blocks/post-template.php | 2 ++ src/wp-includes/interactivity-api/interactivity-api.php | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/blocks/post-template.php b/src/wp-includes/blocks/post-template.php index 2c7502ca3b665..6b0b72e9f38ba 100644 --- a/src/wp-includes/blocks/post-template.php +++ b/src/wp-includes/blocks/post-template.php @@ -36,6 +36,8 @@ function block_core_post_template_uses_featured_image( $inner_blocks ) { * * @since 6.3.0 Changed render_block_context priority to `1`. * + * @global WP_Query $wp_query WordPress Query object. + * * @param array $attributes Block attributes. * @param string $content Block default content. * @param WP_Block $block Block instance. diff --git a/src/wp-includes/interactivity-api/interactivity-api.php b/src/wp-includes/interactivity-api/interactivity-api.php index 120551b7e273a..cc2c8120474f9 100644 --- a/src/wp-includes/interactivity-api/interactivity-api.php +++ b/src/wp-includes/interactivity-api/interactivity-api.php @@ -74,10 +74,10 @@ function wp_interactivity_process_directives_of_interactive_blocks( array $parse * It provides access to the WP_Interactivity_API instance, creating one if it * doesn't exist yet. * - * @global WP_Interactivity_API $wp_interactivity - * * @since 6.5.0 * + * @global WP_Interactivity_API $wp_interactivity + * * @return WP_Interactivity_API The main WP_Interactivity_API instance. */ function wp_interactivity(): WP_Interactivity_API { From 19c57a21fd155fe689c7e6c93f1e050a7fdab86f Mon Sep 17 00:00:00 2001 From: Jb Audras Date: Tue, 5 Mar 2024 13:57:37 +0000 Subject: [PATCH 136/251] Partially revert [57774]. This reverts some changes that need to be properly synced from Gutenberg. See #60677. git-svn-id: https://develop.svn.wordpress.org/trunk@57775 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/blocks/post-template.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/wp-includes/blocks/post-template.php b/src/wp-includes/blocks/post-template.php index 6b0b72e9f38ba..2c7502ca3b665 100644 --- a/src/wp-includes/blocks/post-template.php +++ b/src/wp-includes/blocks/post-template.php @@ -36,8 +36,6 @@ function block_core_post_template_uses_featured_image( $inner_blocks ) { * * @since 6.3.0 Changed render_block_context priority to `1`. * - * @global WP_Query $wp_query WordPress Query object. - * * @param array $attributes Block attributes. * @param string $content Block default content. * @param WP_Block $block Block instance. From 6818eb519d07641aeb547bcf6dad9a96784ff161 Mon Sep 17 00:00:00 2001 From: Jb Audras Date: Tue, 5 Mar 2024 14:26:01 +0000 Subject: [PATCH 137/251] Plugins: Fix an overlap issue with plugin cards dependencies notice. This changeset fixes an issue where plugin card dependencies notice and plugin icon were overlapping in some cases. Props costdev, euthelup, shailu25, desrosj, swissspidy, audrasjb. Fixes #60501. git-svn-id: https://develop.svn.wordpress.org/trunk@57776 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/css/list-tables.css | 6 ++---- .../includes/class-wp-plugin-install-list-table.php | 9 +++++++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/wp-admin/css/list-tables.css b/src/wp-admin/css/list-tables.css index ca71d36f493c8..f5db5232a868d 100644 --- a/src/wp-admin/css/list-tables.css +++ b/src/wp-admin/css/list-tables.css @@ -1595,10 +1595,8 @@ div.action-links, display: none; } -.plugin-card .plugin-dependencies { - background-color: #e5f5fa; - border-left: 3px solid #72aee6; - margin-bottom: .5em; +.plugin-card .notice.plugin-dependencies { + margin: auto 20px 20px; padding: 15px; } diff --git a/src/wp-admin/includes/class-wp-plugin-install-list-table.php b/src/wp-admin/includes/class-wp-plugin-install-list-table.php index f6e8c5a7ed3a0..f3452a7d94248 100644 --- a/src/wp-admin/includes/class-wp-plugin-install-list-table.php +++ b/src/wp-admin/includes/class-wp-plugin-install-list-table.php @@ -673,8 +673,13 @@ public function display_rows() {

    - get_dependencies_notice( $plugin ); ?>
    + get_dependencies_notice( $plugin ); + if ( ! empty( $dependencies_notice ) ) { + echo $dependencies_notice; + } + ?>

    %s

    %s
    ', + '

    %s

    %s
    ', '' . __( 'Additional plugins are required' ) . '', $dependencies_list ); From b6bc25b10ed09369b865c85d575da829bc761756 Mon Sep 17 00:00:00 2001 From: Jb Audras Date: Tue, 5 Mar 2024 16:11:04 +0000 Subject: [PATCH 138/251] WordPress 6.5 RC1. git-svn-id: https://develop.svn.wordpress.org/trunk@57777 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/version.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/version.php b/src/wp-includes/version.php index 1c045935cde62..a323547f3e2dd 100644 --- a/src/wp-includes/version.php +++ b/src/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.5-beta3-57723-src'; +$wp_version = '6.5-RC1-src'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. From dadca45ae0268653ecafd9af4875f348268f7acf Mon Sep 17 00:00:00 2001 From: Jb Audras Date: Tue, 5 Mar 2024 16:23:49 +0000 Subject: [PATCH 139/251] Post WordPress 6.5 RC1 version bump. git-svn-id: https://develop.svn.wordpress.org/trunk@57778 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/version.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/version.php b/src/wp-includes/version.php index a323547f3e2dd..ecba13a593270 100644 --- a/src/wp-includes/version.php +++ b/src/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.5-RC1-src'; +$wp_version = '6.5-RC1-57778-src'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. From 1a9c58fdbecdd9524d7a573d14d534d65c9246b5 Mon Sep 17 00:00:00 2001 From: David Baumwald Date: Tue, 5 Mar 2024 17:16:07 +0000 Subject: [PATCH 140/251] Trunk is now 6.6 alpha. git-svn-id: https://develop.svn.wordpress.org/trunk@57782 602fd350-edb4-49c9-b593-d223f7449a82 --- .github/workflows/test-old-branches.yml | 10 ++++++++-- SECURITY.md | 1 + package-lock.json | 2 +- package.json | 2 +- src/wp-includes/version.php | 2 +- 5 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test-old-branches.yml b/.github/workflows/test-old-branches.yml index a7dc0210f58a7..aeb967743adbd 100644 --- a/.github/workflows/test-old-branches.yml +++ b/.github/workflows/test-old-branches.yml @@ -17,7 +17,7 @@ on: permissions: {} env: - CURRENTLY_SUPPORTED_BRANCH: '6.4' + CURRENTLY_SUPPORTED_BRANCH: '6.5' jobs: dispatch-workflows-for-old-branches: @@ -37,12 +37,14 @@ jobs: 'test-npm.yml' ] branch: [ - '6.4', '6.3', '6.2', '6.1','6.0', + '6.5', '6.4', '6.3', '6.2', '6.1','6.0', '5.9', '5.8', '5.7', '5.6', '5.5', '5.4', '5.3', '5.2', '5.1', '5.0', '4.9', '4.8', '4.7', '4.6', '4.5', '4.4', '4.3', '4.2', '4.1' ] include: # PHP Compatibility testing was introduced in 5.5. + - branch: '6.5' + workflow: 'php-compatibility.yml' - branch: '6.4' workflow: 'php-compatibility.yml' - branch: '6.3' @@ -67,6 +69,8 @@ jobs: # End-to-end testing was introduced in 5.3 but was later removed as there were no meaningful assertions. # Starting in 5.8 with #52905, some additional tests with real assertions were introduced. # Branches 5.8 and newer should be tested to confirm no regressions are introduced. + - branch: '6.5' + workflow: 'end-to-end-tests.yml' - branch: '6.4' workflow: 'end-to-end-tests.yml' - branch: '6.3' @@ -83,6 +87,8 @@ jobs: workflow: 'end-to-end-tests.yml' # Performance testing was introduced in 6.2. + - branch: '6.5' + workflow: 'performance.yml' - branch: '6.4' workflow: 'performance.yml' - branch: '6.3' diff --git a/SECURITY.md b/SECURITY.md index 39be6abebf586..40fd5039e5ba2 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -10,6 +10,7 @@ Full details of the WordPress Security Policy and the list of covered projects a | Version | Supported | |---------| --------- | +| 6.5.x | Yes | | 6.4.x | Yes | | 6.3.x | Yes | | 6.2.x | Yes | diff --git a/package-lock.json b/package-lock.json index 2b7e82118c7bc..053e087738136 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "WordPress", - "version": "6.5.0", + "version": "6.6.0", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/package.json b/package.json index 273b44b865f89..a7d1cfa067c21 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "WordPress", - "version": "6.5.0", + "version": "6.6.0", "description": "WordPress is open source software you can use to create a beautiful website, blog, or app.", "repository": { "type": "svn", diff --git a/src/wp-includes/version.php b/src/wp-includes/version.php index ecba13a593270..5714742e9ded6 100644 --- a/src/wp-includes/version.php +++ b/src/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.5-RC1-57778-src'; +$wp_version = '6.6-alpha-57778-src'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. From a227c14479ed7ae5c863af41d963c83bd716e656 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Wed, 6 Mar 2024 00:32:33 +0000 Subject: [PATCH 141/251] Build/Test Tools: Add build process test workflow to old branches testing. Now that 6.5 has been branched, the `test-build-processes.yml` workflow can be added to the list of workflows to run for old branches. Fixes #59632. git-svn-id: https://develop.svn.wordpress.org/trunk@57783 602fd350-edb4-49c9-b593-d223f7449a82 --- .github/workflows/test-old-branches.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/test-old-branches.yml b/.github/workflows/test-old-branches.yml index aeb967743adbd..777ed9e2c01a9 100644 --- a/.github/workflows/test-old-branches.yml +++ b/.github/workflows/test-old-branches.yml @@ -96,6 +96,10 @@ jobs: - branch: '6.2' workflow: 'performance.yml' + # Build Process testing was introduced in 6.5. + - branch: '6.5' + workflow: 'test-build-processes.yml' + # Run all branches monthly, but only the currently supported one twice per month. steps: - name: Dispatch workflow run From 37f53c0af7372aeeecae7feaed98926bc6c7cd6b Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Wed, 6 Mar 2024 00:55:18 +0000 Subject: [PATCH 142/251] Build/Test Tools: Bump version of `trunk` in the `package-lock.json` file. Follow up to [57782]. git-svn-id: https://develop.svn.wordpress.org/trunk@57784 602fd350-edb4-49c9-b593-d223f7449a82 --- package-lock.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package-lock.json b/package-lock.json index 053e087738136..a03c464a634c0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6,7 +6,7 @@ "packages": { "": { "name": "WordPress", - "version": "6.5.0", + "version": "6.6.0", "license": "GPL-2.0-or-later", "dependencies": { "@wordpress/a11y": "3.51.1", From f3e19bf56608e80952a71e77691bdd5aab315548 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Wed, 6 Mar 2024 05:04:00 +0000 Subject: [PATCH 143/251] Docs: Add a description for the `$wp_embed` global. Follow-up to [57748]. See #60699. git-svn-id: https://develop.svn.wordpress.org/trunk@57785 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/ajax-actions.php | 8 ++++---- src/wp-includes/block-template.php | 4 ++-- src/wp-includes/class-wp-oembed-controller.php | 2 +- src/wp-includes/embed.php | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/wp-admin/includes/ajax-actions.php b/src/wp-admin/includes/ajax-actions.php index 30aab700b40b3..06b6e90e558db 100644 --- a/src/wp-admin/includes/ajax-actions.php +++ b/src/wp-admin/includes/ajax-actions.php @@ -274,7 +274,7 @@ function wp_ajax_imgedit_preview() { * * @since 3.1.0 * - * @global WP_Embed $wp_embed + * @global WP_Embed $wp_embed WordPress Embed object. */ function wp_ajax_oembed_cache() { $GLOBALS['wp_embed']->cache_oembed( $_GET['post'] ); @@ -3381,7 +3381,7 @@ function wp_ajax_send_attachment_to_editor() { * @since 3.5.0 * * @global WP_Post $post Global post object. - * @global WP_Embed $wp_embed + * @global WP_Embed $wp_embed WordPress Embed object. */ function wp_ajax_send_link_to_editor() { global $post, $wp_embed; @@ -3733,8 +3733,8 @@ function wp_ajax_query_themes() { * * @since 4.0.0 * - * @global WP_Post $post Global post object. - * @global WP_Embed $wp_embed Embed API instance. + * @global WP_Post $post Global post object. + * @global WP_Embed $wp_embed WordPress Embed object. * @global WP_Scripts $wp_scripts * @global int $content_width */ diff --git a/src/wp-includes/block-template.php b/src/wp-includes/block-template.php index 7030e2e2a19f5..0a4d85ac718a9 100644 --- a/src/wp-includes/block-template.php +++ b/src/wp-includes/block-template.php @@ -210,8 +210,8 @@ function _block_template_render_title_tag() { * * @global string $_wp_current_template_id * @global string $_wp_current_template_content - * @global WP_Embed $wp_embed - * @global WP_Query $wp_query + * @global WP_Embed $wp_embed WordPress Embed object. + * @global WP_Query $wp_query WordPress Query object. * * @return string Block template markup. */ diff --git a/src/wp-includes/class-wp-oembed-controller.php b/src/wp-includes/class-wp-oembed-controller.php index a36fff987d0fe..d78a76d885a24 100644 --- a/src/wp-includes/class-wp-oembed-controller.php +++ b/src/wp-includes/class-wp-oembed-controller.php @@ -160,7 +160,7 @@ public function get_proxy_item_permissions_check() { * @since 4.8.0 * * @see WP_oEmbed::get_html() - * @global WP_Embed $wp_embed + * @global WP_Embed $wp_embed WordPress Embed object. * @global WP_Scripts $wp_scripts * * @param WP_REST_Request $request Full data about the request. diff --git a/src/wp-includes/embed.php b/src/wp-includes/embed.php index 82cb45d314a31..0958a2b0c3ee8 100644 --- a/src/wp-includes/embed.php +++ b/src/wp-includes/embed.php @@ -14,7 +14,7 @@ * * @since 2.9.0 * - * @global WP_Embed $wp_embed + * @global WP_Embed $wp_embed WordPress Embed object. * * @param string $id An internal ID/name for the handler. Needs to be unique. * @param string $regex The regex that will be used to see if this handler should be used for a URL. @@ -32,7 +32,7 @@ function wp_embed_register_handler( $id, $regex, $callback, $priority = 10 ) { * * @since 2.9.0 * - * @global WP_Embed $wp_embed + * @global WP_Embed $wp_embed WordPress Embed object. * * @param string $id The handler ID that should be removed. * @param int $priority Optional. The priority of the handler to be removed. Default 10. @@ -230,7 +230,7 @@ function wp_maybe_load_embeds() { * * @since 4.0.0 * - * @global WP_Embed $wp_embed + * @global WP_Embed $wp_embed WordPress Embed object. * * @param array $matches The RegEx matches from the provided regex when calling * wp_embed_register_handler(). From a7a891aa3ccdc79ac263bb6019a3039eb257e6bc Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Thu, 7 Mar 2024 05:56:49 +0000 Subject: [PATCH 144/251] Upload: Add links back to installer pages. This adds a link back to the plugin or theme installers when an incompatible archive error message is encountered. Props Presskopp, swissspidy, smub, pmbaldha, aneeshd16. Fixes #60578. git-svn-id: https://develop.svn.wordpress.org/trunk@57786 602fd350-edb4-49c9-b593-d223f7449a82 --- .../includes/class-file-upload-upgrader.php | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/wp-admin/includes/class-file-upload-upgrader.php b/src/wp-admin/includes/class-file-upload-upgrader.php index 1201c6d188920..48e1aac721d1d 100644 --- a/src/wp-admin/includes/class-file-upload-upgrader.php +++ b/src/wp-admin/includes/class-file-upload-upgrader.php @@ -72,7 +72,24 @@ public function __construct( $form, $urlholder ) { if ( 'pluginzip' === $form || 'themezip' === $form ) { if ( ! wp_zip_file_is_valid( $file['file'] ) ) { wp_delete_file( $file['file'] ); - wp_die( __( 'Incompatible Archive.' ) ); + + if ( 'pluginzip' === $form ) { + $plugins_page = sprintf( + '%s', + self_admin_url( 'plugin-install.php' ), + __( 'Return to the Plugin Installer' ) + ); + wp_die( __( 'Incompatible Archive.' ) . '
    ' . $plugins_page ); + } + + if ( 'themezip' === $form ) { + $themes_page = sprintf( + '%s', + self_admin_url( 'theme-install.php' ), + __( 'Return to the Theme Installer' ) + ); + wp_die( __( 'Incompatible Archive.' ) . '
    ' . $themes_page ); + } } } From ce88530920f7744a0c5637ea3f9d76bbc74ef4a6 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 7 Mar 2024 06:09:09 +0000 Subject: [PATCH 145/251] Docs: Add a description for the `$table_prefix` global. Follow-up to [57748]. See #60699. git-svn-id: https://develop.svn.wordpress.org/trunk@57787 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/upgrade.php | 2 +- src/wp-includes/ms-blogs.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wp-admin/includes/upgrade.php b/src/wp-admin/includes/upgrade.php index cb3939108b856..8e89f936aa9db 100644 --- a/src/wp-admin/includes/upgrade.php +++ b/src/wp-admin/includes/upgrade.php @@ -147,7 +147,7 @@ function wp_install( $blog_title, $user_name, $user_email, $is_public, $deprecat * * @global wpdb $wpdb WordPress database abstraction object. * @global WP_Rewrite $wp_rewrite WordPress rewrite component. - * @global string $table_prefix + * @global string $table_prefix The database table prefix. * * @param int $user_id User ID. */ diff --git a/src/wp-includes/ms-blogs.php b/src/wp-includes/ms-blogs.php index b9575b3beff70..1f464c8d70879 100644 --- a/src/wp-includes/ms-blogs.php +++ b/src/wp-includes/ms-blogs.php @@ -489,7 +489,7 @@ function update_blog_option( $id, $option, $value, $deprecated = null ) { * @global int $blog_id * @global array $_wp_switched_stack * @global bool $switched - * @global string $table_prefix + * @global string $table_prefix The database table prefix. * @global WP_Object_Cache $wp_object_cache * * @param int $new_blog_id The ID of the blog to switch to. Default: current blog. @@ -599,7 +599,7 @@ function switch_to_blog( $new_blog_id, $deprecated = null ) { * @global array $_wp_switched_stack * @global int $blog_id * @global bool $switched - * @global string $table_prefix + * @global string $table_prefix The database table prefix. * @global WP_Object_Cache $wp_object_cache * * @return bool True on success, false if we're already on the current blog. From da1e42392c8ae4a13f5363e671bae7e041b92da5 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Thu, 7 Mar 2024 06:25:33 +0000 Subject: [PATCH 146/251] Build/Test Tools: Fix typo in `variation-new-font-family.json` fixture file. Props huzaifaalmesbah, mukesh27. Fixes #60712. git-svn-id: https://develop.svn.wordpress.org/trunk@57788 602fd350-edb4-49c9-b593-d223f7449a82 --- .../fonts-block-theme/styles/variation-new-font-family.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/phpunit/data/themedir1/fonts-block-theme/styles/variation-new-font-family.json b/tests/phpunit/data/themedir1/fonts-block-theme/styles/variation-new-font-family.json index 01c6027835f97..0af954cbecaa8 100644 --- a/tests/phpunit/data/themedir1/fonts-block-theme/styles/variation-new-font-family.json +++ b/tests/phpunit/data/themedir1/fonts-block-theme/styles/variation-new-font-family.json @@ -15,7 +15,7 @@ "fontStyle": "normal", "fontWeight": "400", "src": [ - "file:./assets/fonts/open-sans/OpenSans-VariableFont_wdth,wght.tff" + "file:./assets/fonts/open-sans/OpenSans-VariableFont_wdth,wght.ttf" ] }, { @@ -24,7 +24,7 @@ "fontStyle": "italic", "fontWeight": "400", "src": [ - "file:./assets/fonts/open-sans/OpenSans-Italic-VariableFont_wdth,wght.tff" + "file:./assets/fonts/open-sans/OpenSans-Italic-VariableFont_wdth,wght.ttf" ] } ] From a38f5a13053e6fedbb581212706dc8e3e2eaee7d Mon Sep 17 00:00:00 2001 From: Adam Silverstein Date: Thu, 7 Mar 2024 07:06:53 +0000 Subject: [PATCH 147/251] Script loader: enable fetchpriority attribute in the `wp_preload_resources` filter. Add `fetchpriority` to the attributes accepted by the `wp_preload_resources` filter. Developers can now use this filter to set fetchpriority for resources being preloaded. Props nihar007, luboslives, tabrisrp. Fixes #58510. git-svn-id: https://develop.svn.wordpress.org/trunk@57789 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/general-template.php | 20 ++++++++++--------- .../tests/general/wpPreloadResources.php | 10 ++++++++++ 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/src/wp-includes/general-template.php b/src/wp-includes/general-template.php index 702c4345ff5ca..6c3a1ff991357 100644 --- a/src/wp-includes/general-template.php +++ b/src/wp-includes/general-template.php @@ -3579,6 +3579,7 @@ function wp_preload_resources() { * Filters domains and URLs for resource preloads. * * @since 6.1.0 + * @since 6.6.0 Added the `$fetchpriority` attribute. * * @param array $preload_resources { * Array of resources and their attributes, or URLs to print for resource preloads. @@ -3586,14 +3587,15 @@ function wp_preload_resources() { * @type array ...$0 { * Array of resource attributes. * - * @type string $href URL to include in resource preloads. Required. - * @type string $as How the browser should treat the resource - * (`script`, `style`, `image`, `document`, etc). - * @type string $crossorigin Indicates the CORS policy of the specified resource. - * @type string $type Type of the resource (`text/html`, `text/css`, etc). - * @type string $media Accepts media types or media queries. Allows responsive preloading. - * @type string $imagesizes Responsive source size to the source Set. - * @type string $imagesrcset Responsive image sources to the source set. + * @type string $href URL to include in resource preloads. Required. + * @type string $as How the browser should treat the resource + * (`script`, `style`, `image`, `document`, etc). + * @type string $crossorigin Indicates the CORS policy of the specified resource. + * @type string $type Type of the resource (`text/html`, `text/css`, etc). + * @type string $media Accepts media types or media queries. Allows responsive preloading. + * @type string $imagesizes Responsive source size to the source Set. + * @type string $imagesrcset Responsive image sources to the source set. + * @type string $fetchpriority Fetchpriority value for the resource. * } * } */ @@ -3641,7 +3643,7 @@ function wp_preload_resources() { } // Ignore non-supported attributes. - $non_supported_attributes = array( 'as', 'crossorigin', 'href', 'imagesrcset', 'imagesizes', 'type', 'media' ); + $non_supported_attributes = array( 'as', 'crossorigin', 'href', 'imagesrcset', 'imagesizes', 'type', 'media', 'fetchpriority' ); if ( ! in_array( $resource_key, $non_supported_attributes, true ) && ! is_numeric( $resource_key ) ) { continue; } diff --git a/tests/phpunit/tests/general/wpPreloadResources.php b/tests/phpunit/tests/general/wpPreloadResources.php index 8648da8949c09..778805e84015b 100644 --- a/tests/phpunit/tests/general/wpPreloadResources.php +++ b/tests/phpunit/tests/general/wpPreloadResources.php @@ -247,6 +247,16 @@ public function data_preload_resources() { ), ), ), + 'fetchpriority' => array( + 'expected' => "\n", + 'resources' => array( + array( + 'href' => 'https://example.com/image.jpg', + 'as' => 'image', + 'fetchpriority' => 'high', + ), + ), + ), ); } } From 9a616a573434b432a5efd4de21039250658371fe Mon Sep 17 00:00:00 2001 From: bernhard-reiter Date: Thu, 7 Mar 2024 14:10:31 +0000 Subject: [PATCH 148/251] Block Hooks: Use new Templates Controller filter instead of action. This changeset adds a new `rest_pre_insert_{$this->post_type}` filter in the `WP_REST_Templates_Controller`, where it is applied to the return value of the `prepare_item_for_database` method. (This is consistent with the `WP_REST_Post_Controller`, where that filter has existed before.) The new filter is then used to inject hooked blocks into the template (or template part) content received via the endpoint, prior to persisting it to the database. This supersedes the previous mechanism, which was using the `rest_after_insert_{$this->post_type}` ''action'', from which it performed an additional `wp_update_post` call to update the template (part) content with the hooked blocks injected. The new technique eschews that additional call and the resulting extra revision it created, as well as a problem with regard to duplicated escaping and sanitization, which had caused some special characters to be garbled. Props tomjcafferkey, gziolo, swissspidy, karolmanijak. Fixes #60671. git-svn-id: https://develop.svn.wordpress.org/trunk@57790 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/block-template-utils.php | 35 +++++--- src/wp-includes/default-filters.php | 7 +- .../class-wp-rest-templates-controller.php | 3 +- tests/phpunit/tests/block-template-utils.php | 88 +++++++++++++++++++ .../rest-api/wpRestTemplatesController.php | 56 ++++++++++++ 5 files changed, 171 insertions(+), 18 deletions(-) diff --git a/src/wp-includes/block-template-utils.php b/src/wp-includes/block-template-utils.php index 75e664ad9b366..cfae702dd6c46 100644 --- a/src/wp-includes/block-template-utils.php +++ b/src/wp-includes/block-template-utils.php @@ -1432,39 +1432,48 @@ function get_template_hierarchy( $slug, $is_custom = false, $template_prefix = ' $template_hierarchy[] = 'index'; return $template_hierarchy; } + /** * Inject ignoredHookedBlocks metadata attributes into a template or template part. * - * Given a `wp_template` or `wp_template_part` post object, locate all blocks that have + * Given an object that represents a `wp_template` or `wp_template_part` post object + * prepared for inserting or updating the database, locate all blocks that have * hooked blocks, and inject a `metadata.ignoredHookedBlocks` attribute into the anchor * blocks to reflect the latter. * - * @param WP_Post $post A post object with post type set to `wp_template` or `wp_template_part`. - * @return WP_Post The updated post object. + * @since 6.5.0 + * @access private + * + * @param stdClass $post An object representing a template or template part + * prepared for inserting or updating the database. + * @param WP_REST_Request $request Request object. + * @return stdClass The updated object representing a template or template part. */ -function inject_ignored_hooked_blocks_metadata_attributes( $post ) { +function inject_ignored_hooked_blocks_metadata_attributes( $post, $request ) { + $filter_name = current_filter(); + if ( ! str_starts_with( $filter_name, 'rest_pre_insert_' ) ) { + return $post; + } + $post_type = str_replace( 'rest_pre_insert_', '', $filter_name ); + $hooked_blocks = get_hooked_blocks(); if ( empty( $hooked_blocks ) && ! has_filter( 'hooked_block_types' ) ) { - return; + return $post; } // At this point, the post has already been created. // We need to build the corresponding `WP_Block_Template` object as context argument for the visitor. // To that end, we need to suppress hooked blocks from getting inserted into the template. add_filter( 'hooked_block_types', '__return_empty_array', 99999, 0 ); - $template = _build_block_template_result_from_post( $post ); + $template = $request['id'] ? get_block_template( $request['id'], $post_type ) : null; remove_filter( 'hooked_block_types', '__return_empty_array', 99999 ); $before_block_visitor = make_before_block_visitor( $hooked_blocks, $template, 'set_ignored_hooked_blocks_metadata' ); $after_block_visitor = make_after_block_visitor( $hooked_blocks, $template, 'set_ignored_hooked_blocks_metadata' ); - $blocks = parse_blocks( $template->content ); + $blocks = parse_blocks( $post->post_content ); $content = traverse_and_serialize_blocks( $blocks, $before_block_visitor, $after_block_visitor ); - wp_update_post( - array( - 'ID' => $post->ID, - 'post_content' => $content, - ) - ); + $post->post_content = $content; + return $post; } diff --git a/src/wp-includes/default-filters.php b/src/wp-includes/default-filters.php index 3f7e43f8615bc..884357f41350a 100644 --- a/src/wp-includes/default-filters.php +++ b/src/wp-includes/default-filters.php @@ -752,9 +752,8 @@ add_action( 'before_delete_post', '_wp_before_delete_font_face', 10, 2 ); add_action( 'init', '_wp_register_default_font_collections' ); -// It might be nice to use a filter instead of an action, but the `WP_REST_Templates_Controller` doesn't -// provide one (unlike e.g. `WP_REST_Posts_Controller`, which has `rest_pre_insert_{$this->post_type}`). -add_action( 'rest_after_insert_wp_template', 'inject_ignored_hooked_blocks_metadata_attributes', 10, 3 ); -add_action( 'rest_after_insert_wp_template_part', 'inject_ignored_hooked_blocks_metadata_attributes', 10, 3 ); +// Add ignoredHookedBlocks metadata attribute to the template and template part post types. +add_filter( 'rest_pre_insert_wp_template', 'inject_ignored_hooked_blocks_metadata_attributes', 10, 2 ); +add_filter( 'rest_pre_insert_wp_template_part', 'inject_ignored_hooked_blocks_metadata_attributes', 10, 2 ); unset( $filter, $action ); diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-templates-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-templates-controller.php index 1549fd4295561..cec8a77e04ef9 100644 --- a/src/wp-includes/rest-api/endpoints/class-wp-rest-templates-controller.php +++ b/src/wp-includes/rest-api/endpoints/class-wp-rest-templates-controller.php @@ -619,7 +619,8 @@ protected function prepare_item_for_database( $request ) { $changes->post_author = $post_author; } - return $changes; + /** This filter is documented in wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php */ + return apply_filters( "rest_pre_insert_{$this->post_type}", $changes, $request ); } /** diff --git a/tests/phpunit/tests/block-template-utils.php b/tests/phpunit/tests/block-template-utils.php index 5aa0b65929c47..8d972c004d52e 100644 --- a/tests/phpunit/tests/block-template-utils.php +++ b/tests/phpunit/tests/block-template-utils.php @@ -86,6 +86,28 @@ public function set_up() { switch_theme( self::TEST_THEME ); } + /** + * Tear down after each test. + * + * @since 6.5.0 + */ + public function tear_down() { + global $wp_current_filter; + + if ( + 'rest_pre_insert_wp_template' === current_filter() || + 'rest_pre_insert_wp_template_part' === current_filter() + ) { + array_pop( $wp_current_filter ); + } + + if ( WP_Block_Type_Registry::get_instance()->is_registered( 'tests/hooked-block' ) ) { + unregister_block_type( 'tests/hooked-block' ); + } + + parent::tear_down(); + } + /** * @ticket 59338 * @@ -390,4 +412,70 @@ public function test_wp_generate_block_templates_export_file() { } $this->assertTrue( $has_html_files, 'contains at least one html file' ); } + + /** + * @ticket 60671 + * + * @covers inject_ignored_hooked_blocks_metadata_attributes + */ + public function test_inject_ignored_hooked_blocks_metadata_attributes_into_template() { + global $wp_current_filter; + // Mock currently set filter. + $wp_current_filter[] = 'rest_pre_insert_wp_template'; + + register_block_type( + 'tests/hooked-block', + array( + 'block_hooks' => array( + 'tests/anchor-block' => 'after', + ), + ) + ); + + $id = self::TEST_THEME . '//' . 'my_template'; + $request = new WP_REST_Request( 'POST', '/wp/v2/templates/' . $id ); + + $changes = new stdClass(); + $changes->post_content = 'Hello'; + + $post = inject_ignored_hooked_blocks_metadata_attributes( $changes, $request ); + $this->assertSame( + 'Hello', + $post->post_content, + 'The hooked block was not injected into the anchor block\'s ignoredHookedBlocks metadata.' + ); + } + + /** + * @ticket 60671 + * + * @covers inject_ignored_hooked_blocks_metadata_attributes + */ + public function test_inject_ignored_hooked_blocks_metadata_attributes_into_template_part() { + global $wp_current_filter; + // Mock currently set filter. + $wp_current_filter[] = 'rest_pre_insert_wp_template_part'; + + register_block_type( + 'tests/hooked-block', + array( + 'block_hooks' => array( + 'tests/anchor-block' => 'after', + ), + ) + ); + + $id = self::TEST_THEME . '//' . 'my_template_part'; + $request = new WP_REST_Request( 'POST', '/wp/v2/template-parts/' . $id ); + + $changes = new stdClass(); + $changes->post_content = 'Hello'; + + $post = inject_ignored_hooked_blocks_metadata_attributes( $changes, $request ); + $this->assertSame( + 'Hello', + $post->post_content, + 'The hooked block was not injected into the anchor block\'s ignoredHookedBlocks metadata.' + ); + } } diff --git a/tests/phpunit/tests/rest-api/wpRestTemplatesController.php b/tests/phpunit/tests/rest-api/wpRestTemplatesController.php index 046f358ba3428..9665939dd6975 100644 --- a/tests/phpunit/tests/rest-api/wpRestTemplatesController.php +++ b/tests/phpunit/tests/rest-api/wpRestTemplatesController.php @@ -49,6 +49,22 @@ public static function wpTearDownAfterClass() { wp_delete_post( self::$post->ID ); } + /** + * Tear down after each test. + * + * @since 6.5.0 + */ + public function tear_down() { + if ( has_filter( 'rest_pre_insert_wp_template_part', 'inject_ignored_hooked_blocks_metadata_attributes' ) ) { + remove_filter( 'rest_pre_insert_wp_template_part', 'inject_ignored_hooked_blocks_metadata_attributes', 10 ); + } + if ( WP_Block_Type_Registry::get_instance()->is_registered( 'tests/block' ) ) { + unregister_block_type( 'tests/hooked-block' ); + } + + parent::tear_down(); + } + /** * @covers WP_REST_Templates_Controller::register_routes * @ticket 54596 @@ -911,4 +927,44 @@ public function test_prepare_item_for_database() { $this->assertEmpty( $prepared->post_content, 'The content was not correct in the prepared template part.' ); } + + /** + * @ticket 60671 + * + * @covers WP_REST_Templates_Controller::prepare_item_for_database + * @covers inject_ignored_hooked_blocks_metadata_attributes + */ + public function test_prepare_item_for_database_injects_hooked_block() { + register_block_type( + 'tests/hooked-block', + array( + 'block_hooks' => array( + 'tests/anchor-block' => 'after', + ), + ) + ); + + add_filter( 'rest_pre_insert_wp_template_part', 'inject_ignored_hooked_blocks_metadata_attributes', 10, 2 ); + + $endpoint = new WP_REST_Templates_Controller( 'wp_template_part' ); + + $prepare_item_for_database = new ReflectionMethod( $endpoint, 'prepare_item_for_database' ); + $prepare_item_for_database->setAccessible( true ); + + $body_params = array( + 'title' => 'Untitled Template Part', + 'slug' => 'untitled-template-part', + 'content' => 'Hello', + ); + + $request = new WP_REST_Request( 'POST', '/wp/v2/template-parts' ); + $request->set_body_params( $body_params ); + + $prepared = $prepare_item_for_database->invoke( $endpoint, $request ); + $this->assertSame( + 'Hello', + $prepared->post_content, + 'The hooked block was not injected into the anchor block\'s ignoredHookedBlocks metadata.' + ); + } } From ac2ba69de7b6d5bc0fffbda095367aa71cb95669 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 8 Mar 2024 14:32:43 +0000 Subject: [PATCH 149/251] Plugins: Remove extra space in a translatable string. Follow-up to [57545]. Props Presskopp. Fixes #60730. git-svn-id: https://develop.svn.wordpress.org/trunk@57791 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class-wp-plugin-dependencies.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/class-wp-plugin-dependencies.php b/src/wp-includes/class-wp-plugin-dependencies.php index 77444f33d17f5..3f64e59c9ab47 100644 --- a/src/wp-includes/class-wp-plugin-dependencies.php +++ b/src/wp-includes/class-wp-plugin-dependencies.php @@ -426,7 +426,7 @@ public static function display_admin_notice_for_circular_dependencies() { wp_admin_notice( sprintf( '

    %1$s

      %2$s

    %3$s

    ', - __( 'These plugins cannot be activated because their requirements are invalid. ' ), + __( 'These plugins cannot be activated because their requirements are invalid.' ), $circular_dependency_lines, __( 'Please contact the plugin authors for more information.' ) ), From 968780bb4bf9618b31150104e7fc451c374b6254 Mon Sep 17 00:00:00 2001 From: Jb Audras Date: Fri, 8 Mar 2024 22:09:29 +0000 Subject: [PATCH 150/251] Toolbar: Fix dropdown admin menu styles on front-end. This changeset switches back the admin menu items `height` property to `px` unit to prevent issues with themes using `html { font-size: 62.5%; }`. Follow-up to [57765]. Props bgnicolepaschen, sabernhardt, huzaifaalmesbah, ironprogrammer, shailu25. Fixes #60707. See #43633. git-svn-id: https://develop.svn.wordpress.org/trunk@57792 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/css/admin-bar.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/css/admin-bar.css b/src/wp-includes/css/admin-bar.css index 457295d08ed88..8f73274b03364 100644 --- a/src/wp-includes/css/admin-bar.css +++ b/src/wp-includes/css/admin-bar.css @@ -187,7 +187,7 @@ html:lang(he-il) .rtl #wpadminbar * { #wpadminbar.nojs .quicklinks .menupop:hover ul li .ab-item, #wpadminbar .shortlink-input { line-height: 2; - height: 1.625rem; + height: 26px; white-space: nowrap; min-width: 140px; } @@ -463,7 +463,7 @@ html:lang(he-il) .rtl #wpadminbar * { #wpadminbar #wp-admin-bar-user-info span { background: none; padding: 0; - height: 1.125rem; + height: 18px; } #wpadminbar #wp-admin-bar-user-info .display-name, From 14d55b80dc99e917a0e6ac266b8069cd36018e03 Mon Sep 17 00:00:00 2001 From: audrasjb Date: Fri, 8 Mar 2024 22:36:01 +0000 Subject: [PATCH 151/251] Docs: Update various HelpHub links to avoid unnecessary redirections. This updates various WP-Admin related links that have been redirected to new HelpHub pages, to avoid unnecessary redirections. Props mkismy. See #60732, #60699. git-svn-id: https://develop.svn.wordpress.org/trunk@57793 602fd350-edb4-49c9-b593-d223f7449a82 --- src/readme.html | 2 +- src/wp-admin/edit-form-advanced.php | 4 ++-- src/wp-admin/includes/class-plugin-installer-skin.php | 4 ++-- src/wp-admin/includes/class-theme-installer-skin.php | 4 ++-- src/wp-admin/includes/class-wp-site-health.php | 6 +++--- src/wp-admin/includes/file.php | 4 ++-- src/wp-admin/includes/network.php | 2 +- src/wp-admin/network.php | 4 ++-- src/wp-admin/network/index.php | 2 +- src/wp-admin/options-general.php | 6 +++--- src/wp-admin/options-permalink.php | 8 ++++---- src/wp-admin/options-writing.php | 4 ++-- src/wp-admin/plugin-editor.php | 2 +- src/wp-admin/setup-config.php | 4 ++-- src/wp-admin/theme-editor.php | 4 ++-- src/wp-admin/update-core.php | 4 ++-- 16 files changed, 32 insertions(+), 32 deletions(-) diff --git a/src/readme.html b/src/readme.html index f0309df1e94b8..e38b5c6b49363 100644 --- a/src/readme.html +++ b/src/readme.html @@ -47,7 +47,7 @@

    Updating Manually

    Migrating from other systems

    -

    WordPress can import from a number of systems. First you need to get WordPress installed and working as described above, before using our import tools.

    +

    WordPress can import from a number of systems. First you need to get WordPress installed and working as described above, before using our import tools.

    System Requirements

      diff --git a/src/wp-admin/edit-form-advanced.php b/src/wp-admin/edit-form-advanced.php index 16b699ca39293..d3793802e14aa 100644 --- a/src/wp-admin/edit-form-advanced.php +++ b/src/wp-admin/edit-form-advanced.php @@ -359,7 +359,7 @@ if ( 'post' === $post_type || 'page' === $post_type ) { $inserting_media = '

      ' . __( 'You can upload and insert media (images, audio, documents, etc.) by clicking the Add Media button. You can select from the images and files already uploaded to the Media Library, or upload new media to add to your page or post. To create an image gallery, select the images to add and click the “Create a new gallery” button.' ) . '

      '; - $inserting_media .= '

      ' . __( 'You can also embed media from many popular websites including Twitter, YouTube, Flickr and others by pasting the media URL on its own line into the content of your post/page. Learn more about embeds.' ) . '

      '; + $inserting_media .= '

      ' . __( 'You can also embed media from many popular websites including Twitter, YouTube, Flickr and others by pasting the media URL on its own line into the content of your post/page. Learn more about embeds.' ) . '

      '; get_current_screen()->add_help_tab( array( @@ -377,7 +377,7 @@ ''; if ( current_theme_supports( 'post-formats' ) && post_type_supports( 'post', 'post-formats' ) ) { - $publish_box .= '
    • ' . __( 'Format — Post Formats designate how your theme will display a specific post. For example, you could have a standard blog post with a title and paragraphs, or a short aside that omits the title and contains a short text blurb. Your theme could enable all or some of 10 possible formats. Learn more about each post format.' ) . '
    • '; + $publish_box .= '
    • ' . __( 'Format — Post Formats designate how your theme will display a specific post. For example, you could have a standard blog post with a title and paragraphs, or a short aside that omits the title and contains a short text blurb. Your theme could enable all or some of 10 possible formats. Learn more about each post format.' ) . '
    • '; } if ( current_theme_supports( 'post-thumbnails' ) && post_type_supports( 'post', 'thumbnail' ) ) { diff --git a/src/wp-admin/includes/class-plugin-installer-skin.php b/src/wp-admin/includes/class-plugin-installer-skin.php index 20cd15f5596ec..9fa033a95ffe4 100644 --- a/src/wp-admin/includes/class-plugin-installer-skin.php +++ b/src/wp-admin/includes/class-plugin-installer-skin.php @@ -293,13 +293,13 @@ private function do_overwrite() { $warning = sprintf( /* translators: %s: Documentation URL. */ __( 'You are uploading an older version of a current plugin. You can continue to install the older version, but be sure to back up your database and files first.' ), - __( 'https://wordpress.org/documentation/article/wordpress-backups/' ) + __( 'https://developer.wordpress.org/advanced-administration/security/backup/' ) ); } else { $warning = sprintf( /* translators: %s: Documentation URL. */ __( 'You are updating a plugin. Be sure to back up your database and files first.' ), - __( 'https://wordpress.org/documentation/article/wordpress-backups/' ) + __( 'https://developer.wordpress.org/advanced-administration/security/backup/' ) ); } diff --git a/src/wp-admin/includes/class-theme-installer-skin.php b/src/wp-admin/includes/class-theme-installer-skin.php index d83e038e1d001..93c626c617b04 100644 --- a/src/wp-admin/includes/class-theme-installer-skin.php +++ b/src/wp-admin/includes/class-theme-installer-skin.php @@ -328,13 +328,13 @@ private function do_overwrite() { $warning = sprintf( /* translators: %s: Documentation URL. */ __( 'You are uploading an older version of the active theme. You can continue to install the older version, but be sure to back up your database and files first.' ), - __( 'https://wordpress.org/documentation/article/wordpress-backups/' ) + __( 'https://developer.wordpress.org/advanced-administration/security/backup/' ) ); } else { $warning = sprintf( /* translators: %s: Documentation URL. */ __( 'You are updating a theme. Be sure to back up your database and files first.' ), - __( 'https://wordpress.org/documentation/article/wordpress-backups/' ) + __( 'https://developer.wordpress.org/advanced-administration/security/backup/' ) ); } diff --git a/src/wp-admin/includes/class-wp-site-health.php b/src/wp-admin/includes/class-wp-site-health.php index da6c81e985219..d7728cd61f292 100644 --- a/src/wp-admin/includes/class-wp-site-health.php +++ b/src/wp-admin/includes/class-wp-site-health.php @@ -1489,7 +1489,7 @@ public function get_test_is_in_debug_mode() { 'actions' => sprintf( '

      %s %s

      ', /* translators: Documentation explaining debugging in WordPress. */ - esc_url( __( 'https://wordpress.org/documentation/article/debugging-in-wordpress/' ) ), + esc_url( __( 'https://developer.wordpress.org/advanced-administration/debug/debug-wordpress/' ) ), __( 'Learn more about debugging in WordPress.' ), /* translators: Hidden accessibility text. */ __( '(opens in a new tab)' ) @@ -2504,7 +2504,7 @@ public function get_test_page_cache() { 'label' => '', 'actions' => sprintf( '

      %2$s %3$s

      ', - __( 'https://wordpress.org/documentation/article/optimization/#Caching' ), + __( 'https://developer.wordpress.org/advanced-administration/performance/optimization/#Caching' ), __( 'Learn more about page cache' ), /* translators: Hidden accessibility text. */ __( '(opens in a new tab)' ) @@ -2613,7 +2613,7 @@ public function get_test_persistent_object_cache() { $action_url = apply_filters( 'site_status_persistent_object_cache_url', /* translators: Localized Support reference. */ - __( 'https://wordpress.org/documentation/article/optimization/#persistent-object-cache' ) + __( 'https://developer.wordpress.org/advanced-administration/performance/optimization/#persistent-object-cache' ) ); $result = array( diff --git a/src/wp-admin/includes/file.php b/src/wp-admin/includes/file.php index 583256955e250..75c741541ae4c 100644 --- a/src/wp-admin/includes/file.php +++ b/src/wp-admin/includes/file.php @@ -326,7 +326,7 @@ function wp_print_file_editor_templates() { printf( /* translators: %s: Documentation URL. */ __( 'You need to make this file writable before you can save your changes. See Changing File Permissions for more information.' ), - __( 'https://wordpress.org/documentation/article/changing-file-permissions/' ) + __( 'https://developer.wordpress.org/advanced-administration/server/file-permissions/' ) ); ?>

      @@ -2249,7 +2249,7 @@ function WP_Filesystem( $args = false, $context = false, $allow_relaxed_file_own * The return value can be overridden by defining the `FS_METHOD` constant in `wp-config.php`, * or filtering via {@see 'filesystem_method'}. * - * @link https://wordpress.org/documentation/article/editing-wp-config-php/#wordpress-upgrade-constants + * @link https://developer.wordpress.org/advanced-administration/wordpress/wp-config/#wordpress-upgrade-constants * * Plugins may define a custom transport handler, See WP_Filesystem(). * diff --git a/src/wp-admin/includes/network.php b/src/wp-admin/includes/network.php index 6a85b6fea82d1..67a9e0289e56b 100644 --- a/src/wp-admin/includes/network.php +++ b/src/wp-admin/includes/network.php @@ -694,7 +694,7 @@ function network_step2( $errors = false ) { printf( /* translators: %s: Documentation URL. */ __( 'It seems your network is running with Nginx web server. Learn more about further configuration.' ), - __( 'https://wordpress.org/documentation/article/nginx/' ) + __( 'https://developer.wordpress.org/advanced-administration/server/web-server/nginx/' ) ); echo '

      '; diff --git a/src/wp-admin/network.php b/src/wp-admin/network.php index 40c5ffc5bf02a..99638dabc3ab6 100644 --- a/src/wp-admin/network.php +++ b/src/wp-admin/network.php @@ -65,7 +65,7 @@ '

      ' . __( 'Once you add this code and refresh your browser, multisite should be enabled. This screen, now in the Network Admin navigation menu, will keep an archive of the added code. You can toggle between Network Admin and Site Admin by clicking on the Network Admin or an individual site name under the My Sites dropdown in the Toolbar.' ) . '

      ' . '

      ' . __( 'The choice of subdirectory sites is disabled if this setup is more than a month old because of permalink problems with “/blog/” from the main site. This disabling will be addressed in a future version.' ) . '

      ' . '

      ' . __( 'For more information:' ) . '

      ' . - '

      ' . __( 'Documentation on Creating a Network' ) . '

      ' . + '

      ' . __( 'Documentation on Creating a Network' ) . '

      ' . '

      ' . __( 'Documentation on the Network Screen' ) . '

      '; get_current_screen()->add_help_tab( @@ -78,7 +78,7 @@ get_current_screen()->set_help_sidebar( '

      ' . __( 'For more information:' ) . '

      ' . - '

      ' . __( 'Documentation on Creating a Network' ) . '

      ' . + '

      ' . __( 'Documentation on Creating a Network' ) . '

      ' . '

      ' . __( 'Documentation on the Network Screen' ) . '

      ' . '

      ' . __( 'Support forums' ) . '

      ' ); diff --git a/src/wp-admin/network/index.php b/src/wp-admin/network/index.php index b51fc4e560949..96f4f682c7d25 100644 --- a/src/wp-admin/network/index.php +++ b/src/wp-admin/network/index.php @@ -53,7 +53,7 @@ get_current_screen()->set_help_sidebar( '

      ' . __( 'For more information:' ) . '

      ' . - '

      ' . __( 'Documentation on the Network Admin' ) . '

      ' . + '

      ' . __( 'Documentation on the Network Admin' ) . '

      ' . '

      ' . __( 'Support forums' ) . '

      ' ); diff --git a/src/wp-admin/options-general.php b/src/wp-admin/options-general.php index 28aa16cb9a455..b522997f90c2b 100644 --- a/src/wp-admin/options-general.php +++ b/src/wp-admin/options-general.php @@ -32,8 +32,8 @@ '

      ' . sprintf( /* translators: %s: Documentation URL. */ __( 'Though the terms refer to two different concepts, in practice, they can be the same address or different. For example, you can have the core WordPress installation files in the root directory (https://example.com), in which case the two URLs would be the same. Or the WordPress files can be in a subdirectory (https://example.com/wordpress). In that case, the WordPress URL and the site URL would be different.' ), - __( 'https://wordpress.org/documentation/article/giving-wordpress-its-own-directory/' ) - ) . '

      ' . + __( 'https://developer.wordpress.org/advanced-administration/server/wordpress-in-directory/' ) + ) . '

      ' . '

      ' . sprintf( /* translators: 1: http://, 2: https:// */ __( 'Both WordPress URL and site URL can start with either %1$s or %2$s. A URL starting with %2$s requires an SSL certificate, so be sure that you have one before changing to %2$s. With %2$s, a padlock will appear next to the address in the browser address bar. Both %2$s and the padlock signal that your site meets some basic security requirements, which can build trust with your visitors and with search engines.' ), @@ -235,7 +235,7 @@ class="" printf( /* translators: %s: Documentation URL. */ __( 'Enter the same address here unless you want your site home page to be different from your WordPress installation directory.' ), - __( 'https://wordpress.org/documentation/article/giving-wordpress-its-own-directory/' ) + __( 'https://developer.wordpress.org/advanced-administration/server/wordpress-in-directory/' ) ); ?>

      diff --git a/src/wp-admin/options-permalink.php b/src/wp-admin/options-permalink.php index 46da9be8f3f93..a22cdb0c92f62 100644 --- a/src/wp-admin/options-permalink.php +++ b/src/wp-admin/options-permalink.php @@ -61,7 +61,7 @@ '

      ' . __( 'Documentation on Using Permalinks' ) . '

      '; if ( $is_nginx ) { - $help_sidebar_content .= '

      ' . __( 'Documentation on Nginx configuration.' ) . '

      '; + $help_sidebar_content .= '

      ' . __( 'Documentation on Nginx configuration.' ) . '

      '; } $help_sidebar_content .= '

      ' . __( 'Support forums' ) . '

      '; @@ -465,7 +465,7 @@ class="button button-secondary" /* translators: 1: web.config, 2: Documentation URL, 3: Ctrl + A, 4: ⌘ + A, 5: Element code. */ __( 'Error: Your %1$s file is not writable, so updating it automatically was not possible. This is the URL rewrite rule you should have in your %1$s file. Click in the field and press %3$s (or %4$s on Mac) to select all. Then insert this rule inside of the %5$s element in %1$s file.' ), 'web.config', - __( 'https://wordpress.org/documentation/article/changing-file-permissions/' ), + __( 'https://developer.wordpress.org/advanced-administration/server/file-permissions/' ), 'Ctrl + A', '⌘ + A', '/<configuration>/<system.webServer>/<rewrite>/<rules>' @@ -497,7 +497,7 @@ class="button button-secondary" printf( /* translators: 1: Documentation URL, 2: web.config, 3: Ctrl + A, 4: ⌘ + A */ __( 'Error: The root directory of your site is not writable, so creating a file automatically was not possible. This is the URL rewrite rule you should have in your %2$s file. Create a new file called %2$s in the root directory of your site. Click in the field and press %3$s (or %4$s on Mac) to select all. Then insert this code into the %2$s file.' ), - __( 'https://wordpress.org/documentation/article/changing-file-permissions/' ), + __( 'https://developer.wordpress.org/advanced-administration/server/file-permissions/' ), 'web.config', 'Ctrl + A', '⌘ + A' @@ -533,7 +533,7 @@ class="button button-secondary" /* translators: 1: .htaccess, 2: Documentation URL, 3: Ctrl + A, 4: ⌘ + A */ __( 'Error: Your %1$s file is not writable, so updating it automatically was not possible. These are the mod_rewrite rules you should have in your %1$s file. Click in the field and press %3$s (or %4$s on Mac) to select all.' ), '.htaccess', - __( 'https://wordpress.org/documentation/article/changing-file-permissions/' ), + __( 'https://developer.wordpress.org/advanced-administration/server/file-permissions/' ), 'Ctrl + A', '⌘ + A' ); diff --git a/src/wp-admin/options-writing.php b/src/wp-admin/options-writing.php index b65f19ebf996b..21adf262f8887 100644 --- a/src/wp-admin/options-writing.php +++ b/src/wp-admin/options-writing.php @@ -225,7 +225,7 @@ printf( /* translators: %s: Documentation URL. */ __( 'When you publish a new post, WordPress automatically notifies the following site update services. For more about this, see the Update Services documentation article. Separate multiple service URLs with line breaks.' ), - __( 'https://wordpress.org/documentation/article/update-services/' ) + __( 'https://developer.wordpress.org/advanced-administration/wordpress/update-services/' ) ); ?>

      @@ -239,7 +239,7 @@ printf( /* translators: 1: Documentation URL, 2: URL to Reading Settings screen. */ __( 'WordPress is not notifying any Update Services because of your site’s visibility settings.' ), - __( 'https://wordpress.org/documentation/article/update-services/' ), + __( 'https://developer.wordpress.org/advanced-administration/wordpress/update-services/' ), 'options-reading.php' ); ?> diff --git a/src/wp-admin/plugin-editor.php b/src/wp-admin/plugin-editor.php index da57d95e74fff..cd743baa37d6f 100644 --- a/src/wp-admin/plugin-editor.php +++ b/src/wp-admin/plugin-editor.php @@ -323,7 +323,7 @@ printf( /* translators: %s: Documentation URL. */ __( 'You need to make this file writable before you can save your changes. See Changing File Permissions for more information.' ), - __( 'https://wordpress.org/documentation/article/changing-file-permissions/' ) + __( 'https://developer.wordpress.org/advanced-administration/server/file-permissions/' ) ); ?>

      diff --git a/src/wp-admin/setup-config.php b/src/wp-admin/setup-config.php index 5fd805e41a76a..4f0833805cf8b 100644 --- a/src/wp-admin/setup-config.php +++ b/src/wp-admin/setup-config.php @@ -197,7 +197,7 @@ function setup_config_display_header( $body_classes = array() ) { printf( /* translators: 1: Documentation URL, 2: wp-config.php */ __( 'Need more help? Read the support article on %2$s.' ), - __( 'https://wordpress.org/documentation/article/editing-wp-config-php/' ), + __( 'https://developer.wordpress.org/advanced-administration/wordpress/wp-config/' ), 'wp-config.php' ); ?> @@ -484,7 +484,7 @@ function setup_config_display_header( $body_classes = array() ) { /* translators: 1: wp-config.php, 2: Documentation URL. */ __( 'You need to make the file %1$s writable before you can save your changes. See Changing File Permissions for more information.' ), 'wp-config.php', - __( 'https://wordpress.org/documentation/article/changing-file-permissions/' ) + __( 'https://developer.wordpress.org/advanced-administration/server/file-permissions/' ) ); } else { $error_message = sprintf( diff --git a/src/wp-admin/theme-editor.php b/src/wp-admin/theme-editor.php index 868df4b65c01f..dfbe69abb6ec4 100644 --- a/src/wp-admin/theme-editor.php +++ b/src/wp-admin/theme-editor.php @@ -51,7 +51,7 @@ '

      ' . __( 'For more information:' ) . '

      ' . '

      ' . __( 'Documentation on Theme Development' ) . '

      ' . '

      ' . __( 'Documentation on Editing Themes' ) . '

      ' . - '

      ' . __( 'Documentation on Editing Files' ) . '

      ' . + '

      ' . __( 'Documentation on Editing Files' ) . '

      ' . '

      ' . __( 'Documentation on Template Tags' ) . '

      ' . '

      ' . __( 'Support forums' ) . '

      ' ); @@ -356,7 +356,7 @@ printf( /* translators: %s: Documentation URL. */ __( 'You need to make this file writable before you can save your changes. See Changing File Permissions for more information.' ), - __( 'https://wordpress.org/documentation/article/changing-file-permissions/' ) + __( 'https://developer.wordpress.org/advanced-administration/server/file-permissions/' ) ); ?>

      diff --git a/src/wp-admin/update-core.php b/src/wp-admin/update-core.php index 80fbd530b24b6..3e48bae0daa04 100644 --- a/src/wp-admin/update-core.php +++ b/src/wp-admin/update-core.php @@ -258,7 +258,7 @@ function core_upgrade_preamble() { $message = sprintf( /* translators: 1: Documentation on WordPress backups, 2: Documentation on updating WordPress. */ __( 'Important: Before updating, please back up your database and files. For help with updates, visit the Updating WordPress documentation page.' ), - __( 'https://wordpress.org/documentation/article/wordpress-backups/' ), + __( 'https://developer.wordpress.org/advanced-administration/security/backup/' ), __( 'https://wordpress.org/documentation/article/updating-wordpress/' ) ); wp_admin_notice( @@ -1045,7 +1045,7 @@ function do_undismiss_core_update() { ) ); - $help_sidebar_rollback = '

      ' . __( 'Common Errors' ) . '

      '; + $help_sidebar_rollback = '

      ' . __( 'Common Errors' ) . '

      '; } get_current_screen()->set_help_sidebar( From f0e61db0043f38c939ed1235fddfc8378a074e20 Mon Sep 17 00:00:00 2001 From: Jb Audras Date: Fri, 8 Mar 2024 22:42:14 +0000 Subject: [PATCH 152/251] Coding Standards: Fix a WPCS indentation issue found in `wp-admin/options-general.php` after [57793]. See #60732. git-svn-id: https://develop.svn.wordpress.org/trunk@57794 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/options-general.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-admin/options-general.php b/src/wp-admin/options-general.php index b522997f90c2b..9e25c36c370bc 100644 --- a/src/wp-admin/options-general.php +++ b/src/wp-admin/options-general.php @@ -33,7 +33,7 @@ /* translators: %s: Documentation URL. */ __( 'Though the terms refer to two different concepts, in practice, they can be the same address or different. For example, you can have the core WordPress installation files in the root directory (https://example.com), in which case the two URLs would be the same. Or the WordPress files can be in a subdirectory (https://example.com/wordpress). In that case, the WordPress URL and the site URL would be different.' ), __( 'https://developer.wordpress.org/advanced-administration/server/wordpress-in-directory/' ) - ) . '

      ' . + ) . '

      ' . '

      ' . sprintf( /* translators: 1: http://, 2: https:// */ __( 'Both WordPress URL and site URL can start with either %1$s or %2$s. A URL starting with %2$s requires an SSL certificate, so be sure that you have one before changing to %2$s. With %2$s, a padlock will appear next to the address in the browser address bar. Both %2$s and the padlock signal that your site meets some basic security requirements, which can build trust with your visitors and with search engines.' ), From 0acfd3a72c66c7544b3ef9e183ee1af3958ae3c3 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Sat, 9 Mar 2024 01:07:52 +0000 Subject: [PATCH 153/251] Build/Test Tools: Do not run Props Bot for certain actions from forks. For PRs that originate from forked repositories, `pull_request_review` and `pull_request_review_comment` events do not have the permissions necessary to comment on the PR. This avoids needlessly running the bot when these conditions are met. Props jorbin, wildworks. See #60733. git-svn-id: https://develop.svn.wordpress.org/trunk@57795 602fd350-edb4-49c9-b593-d223f7449a82 --- .github/workflows/props-bot.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/props-bot.yml b/.github/workflows/props-bot.yml index f9d5668742372..5b0ba5c3c4515 100644 --- a/.github/workflows/props-bot.yml +++ b/.github/workflows/props-bot.yml @@ -57,13 +57,13 @@ jobs: # The job will run when pull requests are open, ready for review and: # # - A comment is added to the pull request. - # - A review is created or commented on. + # - A review is created or commented on (unless PR originates from a fork). # - The pull request is opened, synchronized, marked ready for review, or reopened. # - The `props-bot` label is added to the pull request. if: | ( github.event_name == 'issue_comment' && github.event.issue.pull_request || - contains( fromJSON( '["pull_request_review", "pull_request_review_comment"]' ), github.event_name ) || + ( contains( fromJSON( '["pull_request_review", "pull_request_review_comment"]' ), github.event_name ) && ! github.event.pull_request.head.repo.fork ) || github.event_name == 'pull_request_target' && github.event.action != 'labeled' || 'props-bot' == github.event.label.name ) && From db9058c101dbd2e50620dbaabd1bcb559a599637 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sat, 9 Mar 2024 18:05:27 +0000 Subject: [PATCH 154/251] Upload: Move an assignment in `wp-admin/upload.php` into a conditional branch. This is a micro-optimization to reduce unnecessary memory allocation. Follow-up to [28682]. Props mujuonly, swissspidy, mukesh27. Fixes #60683. git-svn-id: https://develop.svn.wordpress.org/trunk@57796 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/upload.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/wp-admin/upload.php b/src/wp-admin/upload.php index 3c48cc9476836..8267ad50be506 100644 --- a/src/wp-admin/upload.php +++ b/src/wp-admin/upload.php @@ -128,12 +128,13 @@ $_SERVER['REQUEST_URI'] = remove_query_arg( array( 'message' ), $_SERVER['REQUEST_URI'] ); } -$mode = get_user_option( 'media_library_mode', get_current_user_id() ) ? get_user_option( 'media_library_mode', get_current_user_id() ) : 'grid'; $modes = array( 'grid', 'list' ); if ( isset( $_GET['mode'] ) && in_array( $_GET['mode'], $modes, true ) ) { $mode = $_GET['mode']; update_user_option( get_current_user_id(), 'media_library_mode', $mode ); +} else { + $mode = get_user_option( 'media_library_mode', get_current_user_id() ) ? get_user_option( 'media_library_mode', get_current_user_id() ) : 'grid'; } if ( 'grid' === $mode ) { From 45ec568f0ce905b9aabfb469b613e39d042ad3b7 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 10 Mar 2024 16:18:40 +0000 Subject: [PATCH 155/251] Docs: Update the link to the WordPress Feeds article on Reading Settings screen. Follow-up to [57793]. Props ignatiusjeroe, sabernhardt, shailu25. Fixes #60736. See #60732. git-svn-id: https://develop.svn.wordpress.org/trunk@57797 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/options-reading.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-admin/options-reading.php b/src/wp-admin/options-reading.php index c2ee28d5185df..5dd40f37c4e32 100644 --- a/src/wp-admin/options-reading.php +++ b/src/wp-admin/options-reading.php @@ -32,7 +32,7 @@ '

      ' . sprintf( /* translators: %s: Documentation URL. */ __( 'You can also control the display of your content in RSS feeds, including the maximum number of posts to display and whether to show full text or an excerpt. Learn more about feeds.' ), - __( 'https://wordpress.org/documentation/article/wordpress-feeds/' ) + __( 'https://developer.wordpress.org/advanced-administration/wordpress/feeds/' ) ) . '

      ' . '

      ' . __( 'You must click the Save Changes button at the bottom of the screen for new settings to take effect.' ) . '

      ', ) @@ -197,7 +197,7 @@ printf( /* translators: %s: Documentation URL. */ __( 'Your theme determines how content is displayed in browsers. Learn more about feeds.' ), - __( 'https://wordpress.org/documentation/article/wordpress-feeds/' ) + __( 'https://developer.wordpress.org/advanced-administration/wordpress/feeds/' ) ); ?>

      From 4c52fe78b5bc09ede3045cc4561fa0d5e066026b Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 11 Mar 2024 10:03:19 +0000 Subject: [PATCH 156/251] =?UTF-8?q?Docs:=20Update=20the=20link=20to=20the?= =?UTF-8?q?=20=E2=80=9CEditing=20wp-config.php=E2=80=9D=20article=20in=20`?= =?UTF-8?q?wp-load.php`.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Follow-up to [57793]. Props fanly, shailu25. See #60738, #60732. git-svn-id: https://develop.svn.wordpress.org/trunk@57798 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-load.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-load.php b/src/wp-load.php index d3787d108e17d..40c141f74034b 100644 --- a/src/wp-load.php +++ b/src/wp-load.php @@ -91,7 +91,7 @@ $die .= '

      ' . sprintf( /* translators: 1: Documentation URL, 2: wp-config.php */ __( 'Need more help? Read the support article on %2$s.' ), - __( 'https://wordpress.org/documentation/article/editing-wp-config-php/' ), + __( 'https://developer.wordpress.org/advanced-administration/wordpress/wp-config/' ), 'wp-config.php' ) . '

      '; $die .= '

      ' . sprintf( From d09c0f5c4c8e313a03148f6bebf22d0db9236fe4 Mon Sep 17 00:00:00 2001 From: bernhard-reiter Date: Mon, 11 Mar 2024 12:52:18 +0000 Subject: [PATCH 157/251] Block Hooks: Remove filter global reset from test teardown. Resetting the `$wp_current_filter` global during test teardown is unnecessary, as it is taken care of by the unit test's base class. This changeset removes the reset accordingly. Follow-up [57790]. Props swissspidy, timothyblynjacobs. See #60671. git-svn-id: https://develop.svn.wordpress.org/trunk@57799 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/block-template-utils.php | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/tests/phpunit/tests/block-template-utils.php b/tests/phpunit/tests/block-template-utils.php index 8d972c004d52e..4d92c277a9730 100644 --- a/tests/phpunit/tests/block-template-utils.php +++ b/tests/phpunit/tests/block-template-utils.php @@ -92,15 +92,6 @@ public function set_up() { * @since 6.5.0 */ public function tear_down() { - global $wp_current_filter; - - if ( - 'rest_pre_insert_wp_template' === current_filter() || - 'rest_pre_insert_wp_template_part' === current_filter() - ) { - array_pop( $wp_current_filter ); - } - if ( WP_Block_Type_Registry::get_instance()->is_registered( 'tests/hooked-block' ) ) { unregister_block_type( 'tests/hooked-block' ); } @@ -420,7 +411,8 @@ public function test_wp_generate_block_templates_export_file() { */ public function test_inject_ignored_hooked_blocks_metadata_attributes_into_template() { global $wp_current_filter; - // Mock currently set filter. + // Mock currently set filter. The $wp_current_filter global is reset during teardown by + // WP_UnitTestCase_Base::_restore_hooks() in tests/phpunit/includes/abstract-testcase.php. $wp_current_filter[] = 'rest_pre_insert_wp_template'; register_block_type( @@ -453,7 +445,8 @@ public function test_inject_ignored_hooked_blocks_metadata_attributes_into_templ */ public function test_inject_ignored_hooked_blocks_metadata_attributes_into_template_part() { global $wp_current_filter; - // Mock currently set filter. + // Mock currently set filter. The $wp_current_filter global is reset during teardown by + // WP_UnitTestCase_Base::_restore_hooks() in tests/phpunit/includes/abstract-testcase.php. $wp_current_filter[] = 'rest_pre_insert_wp_template_part'; register_block_type( From 68fa550fc6199a7afb199612d9eb84ed4bf5f139 Mon Sep 17 00:00:00 2001 From: Jb Audras Date: Mon, 11 Mar 2024 13:58:33 +0000 Subject: [PATCH 158/251] Docs: Update various HelpHub links located in bundled themes to avoid unnecessary redirections. Props mkismy. See #60732, #60699. git-svn-id: https://develop.svn.wordpress.org/trunk@57800 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-content/themes/twentyeleven/content-aside.php | 2 +- src/wp-content/themes/twentyeleven/content-gallery.php | 2 +- src/wp-content/themes/twentyeleven/content-image.php | 2 +- src/wp-content/themes/twentyeleven/content-link.php | 2 +- src/wp-content/themes/twentyeleven/content-status.php | 2 +- src/wp-content/themes/twentyfifteen/functions.php | 2 +- src/wp-content/themes/twentyfourteen/functions.php | 2 +- src/wp-content/themes/twentyseventeen/functions.php | 2 +- src/wp-content/themes/twentysixteen/functions.php | 2 +- src/wp-content/themes/twentythirteen/functions.php | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/wp-content/themes/twentyeleven/content-aside.php b/src/wp-content/themes/twentyeleven/content-aside.php index 03dd772249910..6d92973b00165 100644 --- a/src/wp-content/themes/twentyeleven/content-aside.php +++ b/src/wp-content/themes/twentyeleven/content-aside.php @@ -4,7 +4,7 @@ * * Used on index and archive pages. * - * @link https://wordpress.org/documentation/article/post-formats/ + * @link https://developer.wordpress.org/advanced-administration/wordpress/post-formats/ * * @package WordPress * @subpackage Twenty_Eleven diff --git a/src/wp-content/themes/twentyeleven/content-gallery.php b/src/wp-content/themes/twentyeleven/content-gallery.php index 9ecb7073b112f..bb2f75416879d 100644 --- a/src/wp-content/themes/twentyeleven/content-gallery.php +++ b/src/wp-content/themes/twentyeleven/content-gallery.php @@ -4,7 +4,7 @@ * * Used on index and archive pages. * - * @link https://wordpress.org/documentation/article/post-formats/ + * @link https://developer.wordpress.org/advanced-administration/wordpress/post-formats/ * * @package WordPress * @subpackage Twenty_Eleven diff --git a/src/wp-content/themes/twentyeleven/content-image.php b/src/wp-content/themes/twentyeleven/content-image.php index c404733014900..22326044d1b5d 100644 --- a/src/wp-content/themes/twentyeleven/content-image.php +++ b/src/wp-content/themes/twentyeleven/content-image.php @@ -4,7 +4,7 @@ * * Used on index and archive pages. * - * @link https://wordpress.org/documentation/article/post-formats/ + * @link https://developer.wordpress.org/advanced-administration/wordpress/post-formats/ * * @package WordPress * @subpackage Twenty_Eleven diff --git a/src/wp-content/themes/twentyeleven/content-link.php b/src/wp-content/themes/twentyeleven/content-link.php index 2f30a85e3f451..441945cf240f3 100644 --- a/src/wp-content/themes/twentyeleven/content-link.php +++ b/src/wp-content/themes/twentyeleven/content-link.php @@ -4,7 +4,7 @@ * * Used on index and archive pages * - * @link https://wordpress.org/documentation/article/post-formats/ + * @link https://developer.wordpress.org/advanced-administration/wordpress/post-formats/ * * @package WordPress * @subpackage Twenty_Eleven diff --git a/src/wp-content/themes/twentyeleven/content-status.php b/src/wp-content/themes/twentyeleven/content-status.php index 60a1e4d9ba6ac..15484232cd0d6 100644 --- a/src/wp-content/themes/twentyeleven/content-status.php +++ b/src/wp-content/themes/twentyeleven/content-status.php @@ -4,7 +4,7 @@ * * Used on index and archive pages * - * @link https://wordpress.org/documentation/article/post-formats/ + * @link https://developer.wordpress.org/advanced-administration/wordpress/post-formats/ * * @package WordPress * @subpackage Twenty_Eleven diff --git a/src/wp-content/themes/twentyfifteen/functions.php b/src/wp-content/themes/twentyfifteen/functions.php index 694b995ce0808..d03d0ea780040 100644 --- a/src/wp-content/themes/twentyfifteen/functions.php +++ b/src/wp-content/themes/twentyfifteen/functions.php @@ -117,7 +117,7 @@ function twentyfifteen_setup() { /* * Enable support for Post Formats. * - * See: https://wordpress.org/documentation/article/post-formats/ + * See: https://developer.wordpress.org/advanced-administration/wordpress/post-formats/ */ add_theme_support( 'post-formats', diff --git a/src/wp-content/themes/twentyfourteen/functions.php b/src/wp-content/themes/twentyfourteen/functions.php index 924787f03361e..423c3709497f0 100644 --- a/src/wp-content/themes/twentyfourteen/functions.php +++ b/src/wp-content/themes/twentyfourteen/functions.php @@ -167,7 +167,7 @@ function twentyfourteen_setup() { /* * Enable support for Post Formats. - * See https://wordpress.org/documentation/article/post-formats/ + * See: https://developer.wordpress.org/advanced-administration/wordpress/post-formats/ */ add_theme_support( 'post-formats', diff --git a/src/wp-content/themes/twentyseventeen/functions.php b/src/wp-content/themes/twentyseventeen/functions.php index 9bf1eecd49390..225d0dcc3858c 100644 --- a/src/wp-content/themes/twentyseventeen/functions.php +++ b/src/wp-content/themes/twentyseventeen/functions.php @@ -84,7 +84,7 @@ function twentyseventeen_setup() { /* * Enable support for Post Formats. * - * See: https://wordpress.org/documentation/article/post-formats/ + * See: https://developer.wordpress.org/advanced-administration/wordpress/post-formats/ */ add_theme_support( 'post-formats', diff --git a/src/wp-content/themes/twentysixteen/functions.php b/src/wp-content/themes/twentysixteen/functions.php index 5e132074324c5..2a64a340ade01 100644 --- a/src/wp-content/themes/twentysixteen/functions.php +++ b/src/wp-content/themes/twentysixteen/functions.php @@ -122,7 +122,7 @@ function twentysixteen_setup() { /* * Enable support for Post Formats. * - * See: https://wordpress.org/documentation/article/post-formats/ + * See: https://developer.wordpress.org/advanced-administration/wordpress/post-formats/ */ add_theme_support( 'post-formats', diff --git a/src/wp-content/themes/twentythirteen/functions.php b/src/wp-content/themes/twentythirteen/functions.php index 265b4b49b4f03..69b90077171fc 100644 --- a/src/wp-content/themes/twentythirteen/functions.php +++ b/src/wp-content/themes/twentythirteen/functions.php @@ -221,7 +221,7 @@ function twentythirteen_setup() { /* * This theme supports all available post formats by default. - * See https://wordpress.org/documentation/article/post-formats/ + * See: https://developer.wordpress.org/advanced-administration/wordpress/post-formats/ */ add_theme_support( 'post-formats', From e5a779515cef15166ca05777a7ca2cb212ddce35 Mon Sep 17 00:00:00 2001 From: Jb Audras Date: Mon, 11 Mar 2024 14:06:51 +0000 Subject: [PATCH 159/251] Docs: Update various HelpHub links to avoid unnecessary redirections. Follow-up to [57793], [57798], [57800]. Props mkismy. See #60732, #60699. git-svn-id: https://develop.svn.wordpress.org/trunk@57801 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class-wp-customize-manager.php | 2 +- src/wp-includes/class-wp-oembed.php | 2 +- src/wp-includes/functions.php | 6 +++--- src/wp-includes/ms-load.php | 2 +- src/wp-includes/vars.php | 2 +- src/wp-login.php | 4 ++-- wp-config-sample.php | 4 ++-- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/wp-includes/class-wp-customize-manager.php b/src/wp-includes/class-wp-customize-manager.php index baad9fedab4c7..e06c77d29ce76 100644 --- a/src/wp-includes/class-wp-customize-manager.php +++ b/src/wp-includes/class-wp-customize-manager.php @@ -5695,7 +5695,7 @@ public function register_controls() { $section_description .= __( 'Add your own CSS code here to customize the appearance and layout of your site.' ); $section_description .= sprintf( ' %2$s %3$s', - esc_url( __( 'https://wordpress.org/documentation/article/css/' ) ), + esc_url( __( 'https://developer.wordpress.org/advanced-administration/wordpress/css/' ) ), __( 'Learn more about CSS' ), /* translators: Hidden accessibility text. */ __( '(opens in a new tab)' ) diff --git a/src/wp-includes/class-wp-oembed.php b/src/wp-includes/class-wp-oembed.php index 91f9cd68be20c..c428723537562 100644 --- a/src/wp-includes/class-wp-oembed.php +++ b/src/wp-includes/class-wp-oembed.php @@ -4,7 +4,7 @@ * * Used internally by the WP_Embed class, but is designed to be generic. * - * @link https://wordpress.org/documentation/article/embeds/ + * @link https://developer.wordpress.org/advanced-administration/wordpress/oembed/ * @link http://oembed.com/ * * @package WordPress diff --git a/src/wp-includes/functions.php b/src/wp-includes/functions.php index fd305be20b99f..5a5435d33ff18 100644 --- a/src/wp-includes/functions.php +++ b/src/wp-includes/functions.php @@ -5991,7 +5991,7 @@ function _doing_it_wrong( $function_name, $message, $version ) { $message .= ' ' . sprintf( /* translators: %s: Documentation URL. */ __( 'Please see Debugging in WordPress for more information.' ), - __( 'https://wordpress.org/documentation/article/debugging-in-wordpress/' ) + __( 'https://developer.wordpress.org/advanced-administration/debug/debug-wordpress/' ) ); $message = sprintf( @@ -6008,7 +6008,7 @@ function _doing_it_wrong( $function_name, $message, $version ) { $message .= sprintf( ' Please see Debugging in WordPress for more information.', - 'https://wordpress.org/documentation/article/debugging-in-wordpress/' + 'https://developer.wordpress.org/advanced-administration/debug/debug-wordpress/' ); $message = sprintf( @@ -8505,7 +8505,7 @@ function wp_get_update_https_url() { */ function wp_get_default_update_https_url() { /* translators: Documentation explaining HTTPS and why it should be used. */ - return __( 'https://wordpress.org/documentation/article/why-should-i-use-https/' ); + return __( 'https://developer.wordpress.org/advanced-administration/security/https/' ); } /** diff --git a/src/wp-includes/ms-load.php b/src/wp-includes/ms-load.php index afac9b1147d05..661d6a9f939e9 100644 --- a/src/wp-includes/ms-load.php +++ b/src/wp-includes/ms-load.php @@ -497,7 +497,7 @@ function ms_not_installed( $domain, $path ) { $msg .= sprintf( /* translators: %s: Documentation URL. */ __( 'Read the Debugging a WordPress Network article. Some of the suggestions there may help you figure out what went wrong.' ), - __( 'https://wordpress.org/documentation/article/debugging-a-wordpress-network/' ) + __( 'https://developer.wordpress.org/advanced-administration/debug/debug-network/' ) ); $msg .= ' ' . __( 'If you are still stuck with this message, then check that your database contains the following tables:' ) . '

        '; foreach ( $wpdb->tables( 'global' ) as $t => $table ) { diff --git a/src/wp-includes/vars.php b/src/wp-includes/vars.php index a123696cb2736..74a9cef032d88 100644 --- a/src/wp-includes/vars.php +++ b/src/wp-includes/vars.php @@ -10,7 +10,7 @@ * servers with known pretty permalink capability. * * Note: Though Nginx is detected, WordPress does not currently - * generate rewrite rules for it. See https://wordpress.org/documentation/article/nginx/ + * generate rewrite rules for it. See https://developer.wordpress.org/advanced-administration/server/web-server/nginx/ * * @package WordPress */ diff --git a/src/wp-login.php b/src/wp-login.php index 9eeac4a96ce46..1eceaf073296a 100644 --- a/src/wp-login.php +++ b/src/wp-login.php @@ -1317,7 +1317,7 @@ function wp_login_viewport_meta() { sprintf( /* translators: 1: Browser cookie documentation URL, 2: Support forums URL. */ __( 'Error: Cookies are blocked due to unexpected output. For help, please see this documentation or try the support forums.' ), - __( 'https://wordpress.org/documentation/article/cookies/' ), + __( 'https://developer.wordpress.org/advanced-administration/wordpress/cookies/' ), __( 'https://wordpress.org/support/forums/' ) ) ); @@ -1328,7 +1328,7 @@ function wp_login_viewport_meta() { sprintf( /* translators: %s: Browser cookie documentation URL. */ __( 'Error: Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress.' ), - __( 'https://wordpress.org/documentation/article/cookies/#enable-cookies-in-your-browser' ) + __( 'https://developer.wordpress.org/advanced-administration/wordpress/cookies/#enable-cookies-in-your-browser' ) ) ); } diff --git a/wp-config-sample.php b/wp-config-sample.php index 6c4ea5f376b73..bdea5cd755496 100644 --- a/wp-config-sample.php +++ b/wp-config-sample.php @@ -13,7 +13,7 @@ * * Database table prefix * * ABSPATH * - * @link https://wordpress.org/documentation/article/editing-wp-config-php/ + * @link https://developer.wordpress.org/advanced-administration/wordpress/wp-config/ * * @package WordPress */ @@ -77,7 +77,7 @@ * For information on other constants that can be used for debugging, * visit the documentation. * - * @link https://wordpress.org/documentation/article/debugging-in-wordpress/ + * @link https://developer.wordpress.org/advanced-administration/debug/debug-wordpress/ */ define( 'WP_DEBUG', false ); From e3a520606dcfec7aec65b8fe94822183882f3055 Mon Sep 17 00:00:00 2001 From: Peter Wilson Date: Mon, 11 Mar 2024 23:14:26 +0000 Subject: [PATCH 160/251] REST API: Remove unnecessary upload overrides in font face controller. This removes settings that are the default value or required for side-loading from the `WP_REST_Font_Faces_Controller::handle_font_file_upload()`. This is to harden the endpoint and future proof against any changes to `wp_handle_upload()` and related functions/security checks. Props peterwilsoncc, dd32. Fixes #60741. git-svn-id: https://develop.svn.wordpress.org/trunk@57804 602fd350-edb4-49c9-b593-d223f7449a82 --- .../endpoints/class-wp-rest-font-faces-controller.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-font-faces-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-font-faces-controller.php index 3b3a338b838ec..309fb126e1c79 100644 --- a/src/wp-includes/rest-api/endpoints/class-wp-rest-font-faces-controller.php +++ b/src/wp-includes/rest-api/endpoints/class-wp-rest-font-faces-controller.php @@ -874,18 +874,17 @@ protected function handle_font_file_upload( $file ) { $overrides = array( 'upload_error_handler' => array( $this, 'handle_font_file_upload_error' ), - // Arbitrary string to avoid the is_uploaded_file() check applied - // when using 'wp_handle_upload'. - 'action' => 'wp_handle_font_upload', // Not testing a form submission. 'test_form' => false, - // Seems mime type for files that are not images cannot be tested. - // See wp_check_filetype_and_ext(). - 'test_type' => true, // Only allow uploading font files for this request. 'mimes' => WP_Font_Utils::get_allowed_font_mime_types(), ); + // Bypasses is_uploaded_file() when running unit tests. + if ( defined( 'DIR_TESTDATA' ) && DIR_TESTDATA ) { + $overrides['action'] = 'wp_handle_mock_upload'; + } + $uploaded_file = wp_handle_upload( $file, $overrides ); remove_filter( 'upload_dir', $set_upload_dir ); From dabde02a67ac82b5692ce8167f6054c51a42d199 Mon Sep 17 00:00:00 2001 From: Dennis Snell Date: Mon, 11 Mar 2024 23:53:07 +0000 Subject: [PATCH 161/251] HTML API: Defer applying attribute updates until necessary. When making repeated updates to a document, the Tag Processor will end up copying the entire document once for every update. This can lead to catastrophic behavior in the worse case. However, when batch-applying updates it's able to copy chunks of the document in one thread and only end up copying the entire document once for the entire batch. Previously the Tag Processor has been eagerly applying udpates, but in this patch it defers applying those updates as long as is possible. Developed in https://github.com/WordPress/wordpress-develop/pull/6120 Discussed in https://core.trac.wordpress.org/ticket/60697 Props: dmsnell, bernhard-reiter, jonsurrell, westonruter. Fixes #60697. Follow-up to [55706], [56941], [57348]. git-svn-id: https://develop.svn.wordpress.org/trunk@57805 602fd350-edb4-49c9-b593-d223f7449a82 --- .../html-api/class-wp-html-tag-processor.php | 72 ++++++++++++++++--- .../html-api/wpHtmlTagProcessor-bookmark.php | 11 ++- .../tests/html-api/wpHtmlTagProcessor.php | 45 ++++++++++++ 3 files changed, 116 insertions(+), 12 deletions(-) diff --git a/src/wp-includes/html-api/class-wp-html-tag-processor.php b/src/wp-includes/html-api/class-wp-html-tag-processor.php index d5e43251af256..c540ea96c111e 100644 --- a/src/wp-includes/html-api/class-wp-html-tag-processor.php +++ b/src/wp-includes/html-api/class-wp-html-tag-processor.php @@ -837,8 +837,27 @@ public function next_tag( $query = null ) { * @return bool Whether a token was parsed. */ public function next_token() { + return $this->base_class_next_token(); + } + + /** + * Internal method which finds the next token in the HTML document. + * + * This method is a protected internal function which implements the logic for + * finding the next token in a document. It exists so that the parser can update + * its state without affecting the location of the cursor in the document and + * without triggering subclass methods for things like `next_token()`, e.g. when + * applying patches before searching for the next token. + * + * @since 6.5.0 + * + * @access private + * + * @return bool Whether a token was parsed. + */ + private function base_class_next_token() { $was_at = $this->bytes_already_parsed; - $this->get_updated_html(); + $this->after_tag(); // Don't proceed if there's nothing more to scan. if ( @@ -2041,6 +2060,45 @@ private function skip_whitespace() { * @since 6.2.0 */ private function after_tag() { + /* + * There could be lexical updates enqueued for an attribute that + * also exists on the next tag. In order to avoid conflating the + * attributes across the two tags, lexical updates with names + * need to be flushed to raw lexical updates. + */ + $this->class_name_updates_to_attributes_updates(); + + /* + * Purge updates if there are too many. The actual count isn't + * scientific, but a few values from 100 to a few thousand were + * tests to find a practially-useful limit. + * + * If the update queue grows too big, then the Tag Processor + * will spend more time iterating through them and lose the + * efficiency gains of deferring applying them. + */ + if ( 1000 < count( $this->lexical_updates ) ) { + $this->get_updated_html(); + } + + foreach ( $this->lexical_updates as $name => $update ) { + /* + * Any updates appearing after the cursor should be applied + * before proceeding, otherwise they may be overlooked. + */ + if ( $update->start >= $this->bytes_already_parsed ) { + $this->get_updated_html(); + break; + } + + if ( is_int( $name ) ) { + continue; + } + + $this->lexical_updates[] = $update; + unset( $this->lexical_updates[ $name ] ); + } + $this->token_starts_at = null; $this->token_length = null; $this->tag_name_starts_at = null; @@ -2230,7 +2288,7 @@ private function apply_attributes_updates( $shift_this_point = 0 ) { $shift = strlen( $diff->text ) - $diff->length; // Adjust the cursor position by however much an update affects it. - if ( $diff->start <= $this->bytes_already_parsed ) { + if ( $diff->start < $this->bytes_already_parsed ) { $this->bytes_already_parsed += $shift; } @@ -3164,15 +3222,7 @@ public function get_updated_html() { * └←─┘ back up by strlen("em") + 1 ==> 3 */ $this->bytes_already_parsed = $before_current_tag; - $this->parse_next_tag(); - // Reparse the attributes. - while ( $this->parse_next_attribute() ) { - continue; - } - - $tag_ends_at = strpos( $this->html, '>', $this->bytes_already_parsed ); - $this->token_length = $tag_ends_at - $this->token_starts_at; - $this->bytes_already_parsed = $tag_ends_at; + $this->base_class_next_token(); return $this->html; } diff --git a/tests/phpunit/tests/html-api/wpHtmlTagProcessor-bookmark.php b/tests/phpunit/tests/html-api/wpHtmlTagProcessor-bookmark.php index a0a3b2aa44b4b..0c5093d03cc40 100644 --- a/tests/phpunit/tests/html-api/wpHtmlTagProcessor-bookmark.php +++ b/tests/phpunit/tests/html-api/wpHtmlTagProcessor-bookmark.php @@ -293,21 +293,30 @@ public function test_bookmarks_complex_use_case() { /** * @ticket 56299 + * @ticket 60697 * * @covers WP_HTML_Tag_Processor::seek */ public function test_updates_bookmark_for_additions_after_both_sides() { $processor = new WP_HTML_Tag_Processor( '
        First
        Second
        ' ); $processor->next_tag(); + $processor->set_attribute( 'id', 'one' ); $processor->set_bookmark( 'first' ); $processor->next_tag(); + $processor->set_attribute( 'id', 'two' ); $processor->add_class( 'second' ); $processor->seek( 'first' ); $processor->add_class( 'first' ); $this->assertSame( - '
        First
        Second
        ', + 'one', + $processor->get_attribute( 'id' ), + 'Should have remembered attribute change from before the seek.' + ); + + $this->assertSame( + '
        First
        Second
        ', $processor->get_updated_html(), 'The bookmark was updated incorrectly in response to HTML markup updates' ); diff --git a/tests/phpunit/tests/html-api/wpHtmlTagProcessor.php b/tests/phpunit/tests/html-api/wpHtmlTagProcessor.php index 5375a2fca0ebf..824630b33516a 100644 --- a/tests/phpunit/tests/html-api/wpHtmlTagProcessor.php +++ b/tests/phpunit/tests/html-api/wpHtmlTagProcessor.php @@ -2727,4 +2727,49 @@ public function test_single_text_node_with_taglike_text() { $this->assertSame( '#text', $processor->get_token_type(), 'Did not find text node.' ); $this->assertSame( 'test< /A>', $processor->get_modifiable_text(), 'Did not find complete text node.' ); } + + /** + * Ensures that updates which are enqueued in front of the cursor + * are applied before moving forward in the document. + * + * @ticket 60697 + */ + public function test_applies_updates_before_proceeding() { + $html = '
        '; + + $subclass = new class( $html ) extends WP_HTML_Tag_Processor { + /** + * Inserts raw text after the current token. + * + * @param string $new_html Raw text to insert. + */ + public function insert_after( $new_html ) { + $this->set_bookmark( 'here' ); + $this->lexical_updates[] = new WP_HTML_Text_Replacement( + $this->bookmarks['here']->start + $this->bookmarks['here']->length + 1, + 0, + $new_html + ); + } + }; + + $subclass->next_tag( 'img' ); + $subclass->insert_after( '

        snow-capped

        ' ); + + $subclass->next_tag(); + $this->assertSame( + 'P', + $subclass->get_tag(), + 'Should have matched inserted HTML as next tag.' + ); + + $subclass->next_tag( 'img' ); + $subclass->set_attribute( 'alt', 'mountain' ); + + $this->assertSame( + '

        snow-capped

        mountain
        ', + $subclass->get_updated_html(), + 'Should have properly applied the update from in front of the cursor.' + ); + } } From 2452282fa6a6fefe06a911f798fd23bc7573d2a6 Mon Sep 17 00:00:00 2001 From: Dennis Snell Date: Tue, 12 Mar 2024 00:22:40 +0000 Subject: [PATCH 162/251] HTML API: Trigger active format reconstruction when reaching text nodes. When encountering text nodes in an HTML document, the HTML parser needs to run the active format reconstruction algorithm, even if it doesn't stop to visit those text nodes. This is because the formats, which might need reconstructing, will impact the breadcrumbs of all downstream nodes from the text node. In this patch, this process is triggered, which properly triggers the active format reconstruction. It also enables the visiting of other token types as is possible in the Tag Processor. Developed in https://github.com/WordPress/wordpress-develop/pull/6054 Discussed in https://core.trac.wordpress.org/ticket/60170 Props: dmsnell, jonsurrell, westonruter. Fixes: #60455. Follow-up to: [57348]. git-svn-id: https://develop.svn.wordpress.org/trunk@57806 602fd350-edb4-49c9-b593-d223f7449a82 --- .../html-api/class-wp-html-processor.php | 147 ++++++++++++------ .../html-api/wpHtmlProcessorSemanticRules.php | 3 + 2 files changed, 104 insertions(+), 46 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 3021bee3a73db..c76cc192b12a4 100644 --- a/src/wp-includes/html-api/class-wp-html-processor.php +++ b/src/wp-includes/html-api/class-wp-html-processor.php @@ -361,6 +361,10 @@ public function get_last_error() { public function next_tag( $query = null ) { if ( null === $query ) { while ( $this->step() ) { + if ( '#tag' !== $this->get_token_type() ) { + continue; + } + if ( ! $this->is_tag_closer() ) { return true; } @@ -384,6 +388,10 @@ public function next_tag( $query = null ) { if ( ! ( array_key_exists( 'breadcrumbs', $query ) && is_array( $query['breadcrumbs'] ) ) ) { while ( $this->step() ) { + if ( '#tag' !== $this->get_token_type() ) { + continue; + } + if ( ! $this->is_tag_closer() ) { return true; } @@ -405,6 +413,10 @@ public function next_tag( $query = null ) { $match_offset = isset( $query['match_offset'] ) ? (int) $query['match_offset'] : 1; while ( $match_offset > 0 && $this->step() ) { + if ( '#tag' !== $this->get_token_type() ) { + continue; + } + if ( $this->matches_breadcrumbs( $breadcrumbs ) && 0 === --$match_offset ) { return true; } @@ -428,13 +440,7 @@ public function next_tag( $query = null ) { * @return bool */ public function next_token() { - $found_a_token = parent::next_token(); - - if ( '#tag' === $this->get_token_type() ) { - $this->step( self::PROCESS_CURRENT_NODE ); - } - - return $found_a_token; + return $this->step(); } /** @@ -463,10 +469,6 @@ public function next_token() { * @return bool Whether the currently-matched tag is found at the given nested structure. */ public function matches_breadcrumbs( $breadcrumbs ) { - if ( ! $this->get_tag() ) { - return false; - } - // Everything matches when there are zero constraints. if ( 0 === count( $breadcrumbs ) ) { return true; @@ -529,25 +531,35 @@ public function step( $node_to_process = self::PROCESS_NEXT_NODE ) { * is provided in the opening tag, otherwise it expects a tag closer. */ $top_node = $this->state->stack_of_open_elements->current_node(); - if ( $top_node && self::is_void( $top_node->node_name ) ) { + if ( + $top_node && ( + // Void elements. + self::is_void( $top_node->node_name ) || + // Comments, text nodes, and other atomic tokens. + '#' === $top_node->node_name[0] || + // Doctype declarations. + 'html' === $top_node->node_name + ) + ) { $this->state->stack_of_open_elements->pop(); } } if ( self::PROCESS_NEXT_NODE === $node_to_process ) { - while ( parent::next_token() && '#tag' !== $this->get_token_type() ) { - continue; - } + parent::next_token(); } // Finish stepping when there are no more tokens in the document. - if ( null === $this->get_tag() ) { + if ( + WP_HTML_Tag_Processor::STATE_INCOMPLETE_INPUT === $this->parser_state || + WP_HTML_Tag_Processor::STATE_COMPLETE === $this->parser_state + ) { return false; } $this->state->current_token = new WP_HTML_Token( - $this->bookmark_tag(), - $this->get_tag(), + $this->bookmark_token(), + $this->get_token_name(), $this->has_self_closing_flag(), $this->release_internal_bookmark_on_destruct ); @@ -591,10 +603,6 @@ public function step( $node_to_process = self::PROCESS_NEXT_NODE ) { * @return string[]|null Array of tag names representing path to matched node, if matched, otherwise NULL. */ public function get_breadcrumbs() { - if ( ! $this->get_tag() ) { - return null; - } - $breadcrumbs = array(); foreach ( $this->state->stack_of_open_elements->walk_down() as $stack_item ) { $breadcrumbs[] = $stack_item->node_name; @@ -619,11 +627,61 @@ public function get_breadcrumbs() { * @return bool Whether an element was found. */ private function step_in_body() { - $tag_name = $this->get_tag(); - $op_sigil = $this->is_tag_closer() ? '-' : '+'; - $op = "{$op_sigil}{$tag_name}"; + $token_name = $this->get_token_name(); + $token_type = $this->get_token_type(); + $op_sigil = '#tag' === $token_type ? ( $this->is_tag_closer() ? '-' : '+' ) : ''; + $op = "{$op_sigil}{$token_name}"; switch ( $op ) { + case '#comment': + case '#funky-comment': + case '#presumptuous-tag': + $this->insert_html_element( $this->state->current_token ); + return true; + + case '#text': + $this->reconstruct_active_formatting_elements(); + + $current_token = $this->bookmarks[ $this->state->current_token->bookmark_name ]; + + /* + * > A character token that is U+0000 NULL + * + * Any successive sequence of NULL bytes is ignored and won't + * trigger active format reconstruction. Therefore, if the text + * only comprises NULL bytes then the token should be ignored + * here, but if there are any other characters in the stream + * the active formats should be reconstructed. + */ + if ( + 1 <= $current_token->length && + "\x00" === $this->html[ $current_token->start ] && + strspn( $this->html, "\x00", $current_token->start, $current_token->length ) === $current_token->length + ) { + // Parse error: ignore the token. + return $this->step(); + } + + /* + * Whitespace-only text does not affect the frameset-ok flag. + * It is probably inter-element whitespace, but it may also + * contain character references which decode only to whitespace. + */ + $text = $this->get_modifiable_text(); + if ( strlen( $text ) !== strspn( $text, " \t\n\f\r" ) ) { + $this->state->frameset_ok = false; + } + + $this->insert_html_element( $this->state->current_token ); + return true; + + case 'html': + /* + * > A DOCTYPE token + * > Parse error. Ignore the token. + */ + return $this->step(); + /* * > A start tag whose tag name is "button" */ @@ -711,17 +769,17 @@ private function step_in_body() { case '-SECTION': case '-SUMMARY': case '-UL': - if ( ! $this->state->stack_of_open_elements->has_element_in_scope( $tag_name ) ) { + if ( ! $this->state->stack_of_open_elements->has_element_in_scope( $token_name ) ) { // @todo Report parse error. // Ignore the token. return $this->step(); } $this->generate_implied_end_tags(); - if ( $this->state->stack_of_open_elements->current_node()->node_name !== $tag_name ) { + if ( $this->state->stack_of_open_elements->current_node()->node_name !== $token_name ) { // @todo Record parse error: this error doesn't impact parsing. } - $this->state->stack_of_open_elements->pop_until( $tag_name ); + $this->state->stack_of_open_elements->pop_until( $token_name ); return true; /* @@ -783,7 +841,7 @@ private function step_in_body() { $this->generate_implied_end_tags(); - if ( $this->state->stack_of_open_elements->current_node()->node_name !== $tag_name ) { + if ( $this->state->stack_of_open_elements->current_node()->node_name !== $token_name ) { // @todo Record parse error: this error doesn't impact parsing. } @@ -799,7 +857,7 @@ private function step_in_body() { case '+LI': $this->state->frameset_ok = false; $node = $this->state->stack_of_open_elements->current_node(); - $is_li = 'LI' === $tag_name; + $is_li = 'LI' === $token_name; in_body_list_loop: /* @@ -862,7 +920,7 @@ private function step_in_body() { * then this is a parse error; ignore the token. */ ( - 'LI' === $tag_name && + 'LI' === $token_name && ! $this->state->stack_of_open_elements->has_element_in_list_item_scope( 'LI' ) ) || /* @@ -872,8 +930,8 @@ private function step_in_body() { * parse error; ignore the token. */ ( - 'LI' !== $tag_name && - ! $this->state->stack_of_open_elements->has_element_in_scope( $tag_name ) + 'LI' !== $token_name && + ! $this->state->stack_of_open_elements->has_element_in_scope( $token_name ) ) ) { /* @@ -884,13 +942,13 @@ private function step_in_body() { return $this->step(); } - $this->generate_implied_end_tags( $tag_name ); + $this->generate_implied_end_tags( $token_name ); - if ( $tag_name !== $this->state->stack_of_open_elements->current_node()->node_name ) { + if ( $token_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 ); + $this->state->stack_of_open_elements->pop_until( $token_name ); return true; /* @@ -1043,7 +1101,7 @@ private function step_in_body() { * * @see https://html.spec.whatwg.org/multipage/parsing.html#parsing-main-inbody */ - switch ( $tag_name ) { + switch ( $token_name ) { case 'APPLET': case 'BASE': case 'BASEFONT': @@ -1091,7 +1149,7 @@ private function step_in_body() { case 'TR': case 'XMP': $this->last_error = self::ERROR_UNSUPPORTED; - throw new WP_HTML_Unsupported_Exception( "Cannot process {$tag_name} element." ); + throw new WP_HTML_Unsupported_Exception( "Cannot process {$token_name} element." ); } if ( ! $this->is_tag_closer() ) { @@ -1113,7 +1171,7 @@ private function step_in_body() { * close anything beyond its containing `P` or `DIV` element. */ foreach ( $this->state->stack_of_open_elements->walk_up() as $node ) { - if ( $tag_name === $node->node_name ) { + if ( $token_name === $node->node_name ) { break; } @@ -1123,7 +1181,7 @@ private function step_in_body() { } } - $this->generate_implied_end_tags( $tag_name ); + $this->generate_implied_end_tags( $token_name ); if ( $node !== $this->state->stack_of_open_elements->current_node() ) { // @todo Record parse error: this error doesn't impact parsing. } @@ -1142,19 +1200,16 @@ private function step_in_body() { */ /** - * Creates a new bookmark for the currently-matched tag and returns the generated name. + * Creates a new bookmark for the currently-matched token and returns the generated name. * * @since 6.4.0 + * @since 6.5.0 Renamed from bookmark_tag() to bookmark_token(). * * @throws Exception When unable to allocate requested bookmark. * * @return string|false Name of created bookmark, or false if unable to create. */ - private function bookmark_tag() { - if ( ! $this->get_tag() ) { - return false; - } - + private function bookmark_token() { if ( ! parent::set_bookmark( ++$this->bookmark_counter ) ) { $this->last_error = self::ERROR_EXCEEDED_MAX_BOOKMARKS; throw new Exception( 'could not allocate bookmark' ); diff --git a/tests/phpunit/tests/html-api/wpHtmlProcessorSemanticRules.php b/tests/phpunit/tests/html-api/wpHtmlProcessorSemanticRules.php index 7362a588cf3f4..68700370cfe11 100644 --- a/tests/phpunit/tests/html-api/wpHtmlProcessorSemanticRules.php +++ b/tests/phpunit/tests/html-api/wpHtmlProcessorSemanticRules.php @@ -128,6 +128,9 @@ public function test_in_body_skips_unexpected_button_closer() { $this->assertSame( 'DIV', $processor->get_tag(), 'Did not stop at initial DIV tag.' ); $this->assertFalse( $processor->is_tag_closer(), 'Did not find that initial DIV tag is an opener.' ); + $processor->step(); + $this->assertSame( '#text', $processor->get_token_type(), 'Should have found the text node.' ); + /* * When encountering the BUTTON closing tag, there is no BUTTON in the stack of open elements. * It should be ignored as there's no BUTTON to close. From 3c2a87e2aeb71d20f72b4f94b15e1caf803e8f21 Mon Sep 17 00:00:00 2001 From: Dennis Snell Date: Tue, 12 Mar 2024 00:24:11 +0000 Subject: [PATCH 163/251] HTML API: Add tests ensuring text nodes reconstruct active formatting elements. Adds tests that should have been merged in [57806]. Follow-up to: [57806]. git-svn-id: https://develop.svn.wordpress.org/trunk@57807 602fd350-edb4-49c9-b593-d223f7449a82 --- ...portRequiredActiveFormatReconstruction.php | 70 +++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 tests/phpunit/tests/html-api/wpHtmlSupportRequiredActiveFormatReconstruction.php diff --git a/tests/phpunit/tests/html-api/wpHtmlSupportRequiredActiveFormatReconstruction.php b/tests/phpunit/tests/html-api/wpHtmlSupportRequiredActiveFormatReconstruction.php new file mode 100644 index 0000000000000..a139850752f35 --- /dev/null +++ b/tests/phpunit/tests/html-api/wpHtmlSupportRequiredActiveFormatReconstruction.php @@ -0,0 +1,70 @@ +One

        Two' ); + + // The SOURCE element doesn't trigger reconstruction, and this test asserts that. + $this->assertTrue( + $processor->next_tag( 'SOURCE' ), + 'Should have found the first custom element.' + ); + + $this->assertSame( + array( 'HTML', 'BODY', 'P', 'SOURCE' ), + $processor->get_breadcrumbs(), + 'Should have closed formatting element at first P element.' + ); + + /* + * There are two ways this test could fail. One is to appropriately find the + * second text node but fail to reconstruct the implicitly-closed B element. + * The other way is to fail to abort when encountering the second text node + * because the kind of active format reconstruction isn't supported. + * + * At the time of writing this test, the HTML Processor bails whenever it + * needs to reconstruct active formats, unless there are no active formats. + * To ensure that this test properly works once that support is expanded, + * it's written to verify both circumstances. Once support is added, this + * can be simplified to only contain the first clause of the conditional. + * + * The use of the SOURCE element is important here because most elements + * will also trigger reconstruction, which would conflate the test results + * with the text node triggering reconstruction. The SOURCE element won't + * do this, making it neutral. Therefore, the implicitly-closed B element + * will only be reconstructed by the text node. + */ + + if ( $processor->next_tag( 'SOURCE' ) ) { + $this->assertSame( + array( 'HTML', 'BODY', 'P', 'B', 'SOURCE' ), + $processor->get_breadcrumbs(), + 'Should have reconstructed the implicitly-closed B element.' + ); + } else { + $this->assertSame( + WP_HTML_Processor::ERROR_UNSUPPORTED, + $processor->get_last_error(), + 'Should have aborted for incomplete active format reconstruction when encountering the second text node.' + ); + } + } +} From 697bd4efd63941847e53e43daa3a23cd81c08cd3 Mon Sep 17 00:00:00 2001 From: Jb Audras Date: Tue, 12 Mar 2024 10:35:55 +0000 Subject: [PATCH 164/251] Help/About: Update the About page for WP 6.5 RC2. This changeset removes the "Pattern overrides" section from features. Also updates the field guide link, this link should redirect correctly once the post is published. Follow-up to [57715], [57767]. Props ryelle, benjamin_zekavica. See #60303. git-svn-id: https://develop.svn.wordpress.org/trunk@57809 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/about.php | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/src/wp-admin/about.php b/src/wp-admin/about.php index b1f85caff84ee..afe4939329883 100644 --- a/src/wp-admin/about.php +++ b/src/wp-admin/about.php @@ -72,28 +72,16 @@

        -

        -

        -
        -
        -
        - -
        +

        +

        -
        - -
        -
        -

        -

        -
        - +
        @@ -260,7 +248,7 @@ printf( /* translators: 1: WordPress Field Guide link, 2: WordPress version number. */ __( 'Explore the WordPress %2$s Field Guide. Learn about the changes in this release with detailed developer notes to help you build with WordPress.' ), - ( '#' ), + esc_url( __( 'https://make.wordpress.org/core/wordpress-6-5-field-guide/' ) ), '6.5' ); ?> From 6b5ac38b182079f2d732fc4d50521e02407ee031 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 12 Mar 2024 11:47:25 +0000 Subject: [PATCH 165/251] Coding Standards: Use strict comparison in `WP_Image_Editor_GD::_save()`. Follow-up to [50810], [57524]. Props pbearne, mukesh27. Fixes #60643. git-svn-id: https://develop.svn.wordpress.org/trunk@57811 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class-wp-image-editor-gd.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/wp-includes/class-wp-image-editor-gd.php b/src/wp-includes/class-wp-image-editor-gd.php index cbfa6dba382f4..c7f562693f385 100644 --- a/src/wp-includes/class-wp-image-editor-gd.php +++ b/src/wp-includes/class-wp-image-editor-gd.php @@ -533,12 +533,16 @@ protected function _save( $image, $filename = null, $mime_type = null ) { if ( ! $this->make_image( $filename, 'imagejpeg', array( $image, $filename, $this->get_quality() ) ) ) { return new WP_Error( 'image_save_error', __( 'Image Editor Save Failed' ) ); } - } elseif ( 'image/webp' == $mime_type ) { - if ( ! function_exists( 'imagewebp' ) || ! $this->make_image( $filename, 'imagewebp', array( $image, $filename, $this->get_quality() ) ) ) { + } elseif ( 'image/webp' === $mime_type ) { + if ( ! function_exists( 'imagewebp' ) + || ! $this->make_image( $filename, 'imagewebp', array( $image, $filename, $this->get_quality() ) ) + ) { return new WP_Error( 'image_save_error', __( 'Image Editor Save Failed' ) ); } - } elseif ( 'image/avif' == $mime_type ) { - if ( ! function_exists( 'imageavif' ) || ! $this->make_image( $filename, 'imageavif', array( $image, $filename, $this->get_quality() ) ) ) { + } elseif ( 'image/avif' === $mime_type ) { + if ( ! function_exists( 'imageavif' ) + || ! $this->make_image( $filename, 'imageavif', array( $image, $filename, $this->get_quality() ) ) + ) { return new WP_Error( 'image_save_error', __( 'Image Editor Save Failed' ) ); } } else { From d780917cd1b4bfcd04e7391490d63b2d40a4b602 Mon Sep 17 00:00:00 2001 From: Riad Benguella Date: Tue, 12 Mar 2024 14:06:51 +0000 Subject: [PATCH 166/251] Editor: Update Packages with the latest bug fixes for 6.5 RC 2 It includes all the backports from this Gutenberg PR https://github.com/WordPress/gutenberg/pull/59756/ Props get_dave, swissspidy, bernhard-reiter, youknowriad. See #60315. git-svn-id: https://develop.svn.wordpress.org/trunk@57814 602fd350-edb4-49c9-b593-d223f7449a82 --- package-lock.json | 994 +++++++++--------- package.json | 62 +- .../assets/script-loader-packages.min.php | 2 +- src/wp-includes/blocks/navigation.php | 78 +- 4 files changed, 579 insertions(+), 557 deletions(-) diff --git a/package-lock.json b/package-lock.json index a03c464a634c0..86c64d697bf18 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,61 +10,61 @@ "license": "GPL-2.0-or-later", "dependencies": { "@wordpress/a11y": "3.51.1", - "@wordpress/annotations": "2.51.3", + "@wordpress/annotations": "2.51.4", "@wordpress/api-fetch": "6.48.1", "@wordpress/autop": "3.51.1", "@wordpress/blob": "3.51.1", - "@wordpress/block-directory": "4.28.5", - "@wordpress/block-editor": "12.19.5", - "@wordpress/block-library": "8.28.5", + "@wordpress/block-directory": "4.28.7", + "@wordpress/block-editor": "12.19.6", + "@wordpress/block-library": "8.28.7", "@wordpress/block-serialization-default-parser": "4.51.1", - "@wordpress/blocks": "12.28.5", - "@wordpress/commands": "0.22.4", - "@wordpress/components": "26.0.4", + "@wordpress/blocks": "12.28.6", + "@wordpress/commands": "0.22.5", + "@wordpress/components": "26.0.5", "@wordpress/compose": "6.28.1", - "@wordpress/core-commands": "0.20.5", - "@wordpress/core-data": "6.28.5", - "@wordpress/customize-widgets": "4.28.5", + "@wordpress/core-commands": "0.20.6", + "@wordpress/core-data": "6.28.6", + "@wordpress/customize-widgets": "4.28.7", "@wordpress/data": "9.21.1", "@wordpress/data-controls": "3.20.1", - "@wordpress/dataviews": "0.5.5", + "@wordpress/dataviews": "0.5.6", "@wordpress/date": "4.51.1", "@wordpress/deprecated": "3.51.1", "@wordpress/dom": "3.51.1", "@wordpress/dom-ready": "3.51.1", - "@wordpress/edit-post": "7.28.5", - "@wordpress/edit-site": "5.28.5", - "@wordpress/edit-widgets": "5.28.5", - "@wordpress/editor": "13.28.5", + "@wordpress/edit-post": "7.28.7", + "@wordpress/edit-site": "5.28.7", + "@wordpress/edit-widgets": "5.28.7", + "@wordpress/editor": "13.28.6", "@wordpress/element": "5.28.1", "@wordpress/escape-html": "2.51.1", - "@wordpress/format-library": "4.28.5", + "@wordpress/format-library": "4.28.6", "@wordpress/hooks": "3.51.1", "@wordpress/html-entities": "3.51.1", "@wordpress/i18n": "4.51.1", - "@wordpress/icons": "9.42.3", - "@wordpress/interactivity": "5.0.3", - "@wordpress/interactivity-router": "1.1.3", - "@wordpress/interface": "5.28.4", + "@wordpress/icons": "9.42.4", + "@wordpress/interactivity": "5.0.4", + "@wordpress/interactivity-router": "1.1.4", + "@wordpress/interface": "5.28.5", "@wordpress/is-shallow-equal": "4.51.1", "@wordpress/keyboard-shortcuts": "4.28.1", "@wordpress/keycodes": "3.51.1", - "@wordpress/list-reusable-blocks": "4.28.4", - "@wordpress/media-utils": "4.42.1", + "@wordpress/list-reusable-blocks": "4.28.5", + "@wordpress/media-utils": "4.42.2", "@wordpress/notices": "4.19.1", - "@wordpress/nux": "8.13.4", - "@wordpress/patterns": "1.12.5", - "@wordpress/plugins": "6.19.4", - "@wordpress/preferences": "3.28.4", + "@wordpress/nux": "8.13.5", + "@wordpress/patterns": "1.12.6", + "@wordpress/plugins": "6.19.5", + "@wordpress/preferences": "3.28.5", "@wordpress/preferences-persistence": "1.43.1", "@wordpress/primitives": "3.49.1", "@wordpress/priority-queue": "2.51.1", "@wordpress/private-apis": "0.33.1", "@wordpress/redux-routine": "4.51.1", - "@wordpress/reusable-blocks": "4.28.5", - "@wordpress/rich-text": "6.28.3", + "@wordpress/reusable-blocks": "4.28.6", + "@wordpress/rich-text": "6.28.4", "@wordpress/router": "0.20.1", - "@wordpress/server-side-render": "4.28.5", + "@wordpress/server-side-render": "4.28.6", "@wordpress/shortcode": "3.51.1", "@wordpress/style-engine": "1.34.1", "@wordpress/sync": "0.13.1", @@ -73,7 +73,7 @@ "@wordpress/url": "3.52.1", "@wordpress/viewport": "5.28.1", "@wordpress/warning": "2.51.1", - "@wordpress/widgets": "3.28.5", + "@wordpress/widgets": "3.28.6", "@wordpress/wordcount": "3.51.1", "backbone": "1.5.0", "clipboard": "2.0.11", @@ -110,7 +110,7 @@ "@wordpress/e2e-test-utils": "10.22.1", "@wordpress/e2e-test-utils-playwright": "0.19.2", "@wordpress/prettier-config": "3.8.1", - "@wordpress/scripts": "27.2.4", + "@wordpress/scripts": "27.2.5", "autoprefixer": "10.4.17", "chalk": "5.3.0", "check-node-version": "4.2.1", @@ -6095,15 +6095,15 @@ } }, "node_modules/@wordpress/annotations": { - "version": "2.51.3", - "resolved": "https://registry.npmjs.org/@wordpress/annotations/-/annotations-2.51.3.tgz", - "integrity": "sha512-x2h6WwFsqnuXn5WfQY1AOsb9IkHsu/M3kRpduG42pVVhhIOkLiq8vvAaR52nmB+vrFq5ntGrVr9jaME+OxCRNA==", + "version": "2.51.4", + "resolved": "https://registry.npmjs.org/@wordpress/annotations/-/annotations-2.51.4.tgz", + "integrity": "sha512-nEQgAWphJcECqJIygCgY27OaWgqEoGFRy1DFrKud1MpLrpsxyflhtGKz8CxUj1Sv+Sq4jrS+KaIR/aKwUBO82g==", "dependencies": { "@babel/runtime": "^7.16.0", "@wordpress/data": "^9.21.1", "@wordpress/hooks": "^3.51.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/rich-text": "^6.28.3", + "@wordpress/rich-text": "^6.28.4", "rememo": "^4.0.2", "uuid": "^9.0.1" }, @@ -6191,28 +6191,28 @@ } }, "node_modules/@wordpress/block-directory": { - "version": "4.28.5", - "resolved": "https://registry.npmjs.org/@wordpress/block-directory/-/block-directory-4.28.5.tgz", - "integrity": "sha512-/hTWQoxiDLJkG9UG75n/DImstWz5DKotE2Blx8VrMNuWwzl+riSRrvRx6UzfUjx5KCRV5vddu/zjBYQbdFtLyA==", + "version": "4.28.7", + "resolved": "https://registry.npmjs.org/@wordpress/block-directory/-/block-directory-4.28.7.tgz", + "integrity": "sha512-iv3gFbyYhiVn5vuWND9M+NJx7UZva4CwTplZtWr9Hcp//Of5J4Ylnp/ONR8aPK5SEqbMn5d2dblXJ3G0hBavJg==", "dependencies": { "@babel/runtime": "^7.16.0", "@wordpress/a11y": "^3.51.1", "@wordpress/api-fetch": "^6.48.1", - "@wordpress/block-editor": "^12.19.5", - "@wordpress/blocks": "^12.28.5", - "@wordpress/components": "^26.0.4", + "@wordpress/block-editor": "^12.19.6", + "@wordpress/blocks": "^12.28.6", + "@wordpress/components": "^26.0.5", "@wordpress/compose": "^6.28.1", - "@wordpress/core-data": "^6.28.5", + "@wordpress/core-data": "^6.28.6", "@wordpress/data": "^9.21.1", - "@wordpress/edit-post": "^7.28.5", - "@wordpress/editor": "^13.28.5", + "@wordpress/edit-post": "^7.28.7", + "@wordpress/editor": "^13.28.6", "@wordpress/element": "^5.28.1", "@wordpress/hooks": "^3.51.1", "@wordpress/html-entities": "^3.51.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/icons": "^9.42.3", + "@wordpress/icons": "^9.42.4", "@wordpress/notices": "^4.19.1", - "@wordpress/plugins": "^6.19.4", + "@wordpress/plugins": "^6.19.5", "@wordpress/private-apis": "^0.33.1", "@wordpress/url": "^3.52.1", "change-case": "^4.1.2" @@ -6226,9 +6226,9 @@ } }, "node_modules/@wordpress/block-editor": { - "version": "12.19.5", - "resolved": "https://registry.npmjs.org/@wordpress/block-editor/-/block-editor-12.19.5.tgz", - "integrity": "sha512-SgSdxTNOFDjr4Tq8aZZGofWOebt6MpDBsbYwXFOU5n8Y3phUeGDdyiyeRIQuBQKR4Ti0NZpkxtjxoUcvs00rtQ==", + "version": "12.19.6", + "resolved": "https://registry.npmjs.org/@wordpress/block-editor/-/block-editor-12.19.6.tgz", + "integrity": "sha512-BHrmwVPEr/Thz/esV9fs15Z3QN+M9MdkpwJoBBxL+McbCkR+XmwZnhSZnewa+JuAfSkvmvv7g+TrMq1jNUkpFw==", "dependencies": { "@babel/runtime": "^7.16.0", "@emotion/react": "^11.7.1", @@ -6237,9 +6237,9 @@ "@wordpress/a11y": "^3.51.1", "@wordpress/api-fetch": "^6.48.1", "@wordpress/blob": "^3.51.1", - "@wordpress/blocks": "^12.28.5", - "@wordpress/commands": "^0.22.4", - "@wordpress/components": "^26.0.4", + "@wordpress/blocks": "^12.28.6", + "@wordpress/commands": "^0.22.5", + "@wordpress/components": "^26.0.5", "@wordpress/compose": "^6.28.1", "@wordpress/data": "^9.21.1", "@wordpress/date": "^4.51.1", @@ -6250,14 +6250,14 @@ "@wordpress/hooks": "^3.51.1", "@wordpress/html-entities": "^3.51.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/icons": "^9.42.3", + "@wordpress/icons": "^9.42.4", "@wordpress/is-shallow-equal": "^4.51.1", "@wordpress/keyboard-shortcuts": "^4.28.1", "@wordpress/keycodes": "^3.51.1", "@wordpress/notices": "^4.19.1", - "@wordpress/preferences": "^3.28.4", + "@wordpress/preferences": "^3.28.5", "@wordpress/private-apis": "^0.33.1", - "@wordpress/rich-text": "^6.28.3", + "@wordpress/rich-text": "^6.28.4", "@wordpress/style-engine": "^1.34.1", "@wordpress/token-list": "^2.51.1", "@wordpress/url": "^3.52.1", @@ -6288,20 +6288,20 @@ } }, "node_modules/@wordpress/block-library": { - "version": "8.28.5", - "resolved": "https://registry.npmjs.org/@wordpress/block-library/-/block-library-8.28.5.tgz", - "integrity": "sha512-NTzp3JXR/dE+HRY/SP396BcYqAfWEqWK4caHGdL5EbG6tZMaO7NdXuMitBnOyC089idIpDuaBQo64ofG0wZycA==", + "version": "8.28.7", + "resolved": "https://registry.npmjs.org/@wordpress/block-library/-/block-library-8.28.7.tgz", + "integrity": "sha512-j1nJ7iOnJSHoR/WNuDg5+HJZhQlXF6JkkYD7sO1fKSFEBxaTyL9SlL2gegOi1KFgUvEdeaflyypCg24mO6mbgw==", "dependencies": { "@babel/runtime": "^7.16.0", "@wordpress/a11y": "^3.51.1", "@wordpress/api-fetch": "^6.48.1", "@wordpress/autop": "^3.51.1", "@wordpress/blob": "^3.51.1", - "@wordpress/block-editor": "^12.19.5", - "@wordpress/blocks": "^12.28.5", - "@wordpress/components": "^26.0.4", + "@wordpress/block-editor": "^12.19.6", + "@wordpress/blocks": "^12.28.6", + "@wordpress/components": "^26.0.5", "@wordpress/compose": "^6.28.1", - "@wordpress/core-data": "^6.28.5", + "@wordpress/core-data": "^6.28.6", "@wordpress/data": "^9.21.1", "@wordpress/date": "^4.51.1", "@wordpress/deprecated": "^3.51.1", @@ -6311,17 +6311,17 @@ "@wordpress/hooks": "^3.51.1", "@wordpress/html-entities": "^3.51.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/icons": "^9.42.3", - "@wordpress/interactivity": "^5.0.3", - "@wordpress/interactivity-router": "^1.1.3", + "@wordpress/icons": "^9.42.4", + "@wordpress/interactivity": "^5.0.4", + "@wordpress/interactivity-router": "^1.1.4", "@wordpress/keycodes": "^3.51.1", "@wordpress/notices": "^4.19.1", - "@wordpress/patterns": "^1.12.5", + "@wordpress/patterns": "^1.12.6", "@wordpress/primitives": "^3.49.1", "@wordpress/private-apis": "^0.33.1", - "@wordpress/reusable-blocks": "^4.28.5", - "@wordpress/rich-text": "^6.28.3", - "@wordpress/server-side-render": "^4.28.5", + "@wordpress/reusable-blocks": "^4.28.6", + "@wordpress/rich-text": "^6.28.4", + "@wordpress/server-side-render": "^4.28.6", "@wordpress/url": "^3.52.1", "@wordpress/viewport": "^5.28.1", "@wordpress/wordcount": "^3.51.1", @@ -6355,9 +6355,9 @@ } }, "node_modules/@wordpress/blocks": { - "version": "12.28.5", - "resolved": "https://registry.npmjs.org/@wordpress/blocks/-/blocks-12.28.5.tgz", - "integrity": "sha512-OR5Tl4uzgJnpC7IH/0KCUz9To4pJ8lj64NA5sCEIJK0vSVJPEPXTkiUp0f4Y2gOm0r593Aya/4yYoGOVxoPEoA==", + "version": "12.28.6", + "resolved": "https://registry.npmjs.org/@wordpress/blocks/-/blocks-12.28.6.tgz", + "integrity": "sha512-dTMY/ZRaszsGpbmc4N3/lzvu7kp2zPOPkNy8Eznwy952OFqKYkq6ajJrw8CKH1FRkgXACAH+BDA/6OBHTcuvfQ==", "dependencies": { "@babel/runtime": "^7.16.0", "@wordpress/autop": "^3.51.1", @@ -6373,7 +6373,7 @@ "@wordpress/i18n": "^4.51.1", "@wordpress/is-shallow-equal": "^4.51.1", "@wordpress/private-apis": "^0.33.1", - "@wordpress/rich-text": "^6.28.3", + "@wordpress/rich-text": "^6.28.4", "@wordpress/shortcode": "^3.51.1", "change-case": "^4.1.2", "colord": "^2.7.0", @@ -6405,16 +6405,16 @@ } }, "node_modules/@wordpress/commands": { - "version": "0.22.4", - "resolved": "https://registry.npmjs.org/@wordpress/commands/-/commands-0.22.4.tgz", - "integrity": "sha512-mGg1Uw3mKqxc6Ok9p1TgIdSgGSheoaN0ZMa09cIVH/n9Vl22KRbMB3wsUaIAWsKxrgcsOA/uejEaMcRBYLXEtw==", + "version": "0.22.5", + "resolved": "https://registry.npmjs.org/@wordpress/commands/-/commands-0.22.5.tgz", + "integrity": "sha512-ZK1dXW1vmmXHIWgptZRDWlT/ACOejbIKPCXOIKSx0gezHYf8P6H+4EZ5xYimr8rWvsrfI3PoswkFkKPliYh9Iw==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/components": "^26.0.4", + "@wordpress/components": "^26.0.5", "@wordpress/data": "^9.21.1", "@wordpress/element": "^5.28.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/icons": "^9.42.3", + "@wordpress/icons": "^9.42.4", "@wordpress/keyboard-shortcuts": "^4.28.1", "@wordpress/private-apis": "^0.33.1", "classnames": "^2.3.1", @@ -6430,9 +6430,9 @@ } }, "node_modules/@wordpress/components": { - "version": "26.0.4", - "resolved": "https://registry.npmjs.org/@wordpress/components/-/components-26.0.4.tgz", - "integrity": "sha512-2AQLZEjIyx8H62lQ3/KDSoa1f6WXtl6+7poiJkD0OF/8GFs7fZtcPyBxmnXgd5C5ZE54GAizbPkFHVbeBqyl+Q==", + "version": "26.0.5", + "resolved": "https://registry.npmjs.org/@wordpress/components/-/components-26.0.5.tgz", + "integrity": "sha512-lp509SXTVs6RYN30XS4Unn2S+Sy7Tw3pKDrupgn0k+Y0ELrPjRcAquRQZ2P51/i7SxLSKMhzlbNVSoFqrSNZZA==", "dependencies": { "@ariakit/react": "^0.3.12", "@babel/runtime": "^7.16.0", @@ -6456,12 +6456,12 @@ "@wordpress/hooks": "^3.51.1", "@wordpress/html-entities": "^3.51.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/icons": "^9.42.3", + "@wordpress/icons": "^9.42.4", "@wordpress/is-shallow-equal": "^4.51.1", "@wordpress/keycodes": "^3.51.1", "@wordpress/primitives": "^3.49.1", "@wordpress/private-apis": "^0.33.1", - "@wordpress/rich-text": "^6.28.3", + "@wordpress/rich-text": "^6.28.4", "@wordpress/warning": "^2.51.1", "change-case": "^4.1.2", "classnames": "^2.3.1", @@ -6519,19 +6519,19 @@ } }, "node_modules/@wordpress/core-commands": { - "version": "0.20.5", - "resolved": "https://registry.npmjs.org/@wordpress/core-commands/-/core-commands-0.20.5.tgz", - "integrity": "sha512-25rpA326s4vSzBIP/ZX+wThDic4VS1h7iVAzZutdTno80MWHJU03T95wqHqDSAkNjwhYk3PGsxQk68N2Qib5mA==", + "version": "0.20.6", + "resolved": "https://registry.npmjs.org/@wordpress/core-commands/-/core-commands-0.20.6.tgz", + "integrity": "sha512-nj0nzCc6FGbFHO/qw4xj7BoxufJAm2x6ZWUoVbUAlWoYcAxQ7tU0UlXqKtAKZ9Ij17kJ7LoBq+11dt8XfGM9zQ==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/block-editor": "^12.19.5", - "@wordpress/commands": "^0.22.4", + "@wordpress/block-editor": "^12.19.6", + "@wordpress/commands": "^0.22.5", "@wordpress/compose": "^6.28.1", - "@wordpress/core-data": "^6.28.5", + "@wordpress/core-data": "^6.28.6", "@wordpress/data": "^9.21.1", "@wordpress/element": "^5.28.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/icons": "^9.42.3", + "@wordpress/icons": "^9.42.4", "@wordpress/private-apis": "^0.33.1", "@wordpress/router": "^0.20.1", "@wordpress/url": "^3.52.1" @@ -6545,14 +6545,14 @@ } }, "node_modules/@wordpress/core-data": { - "version": "6.28.5", - "resolved": "https://registry.npmjs.org/@wordpress/core-data/-/core-data-6.28.5.tgz", - "integrity": "sha512-/ppBrwkta8tGTo0CfDqFksNaJXlUOMRlOEbbsCp7jODOK9DI17c/JN9OjMBHEdjwZC3kvWqJ1i5mMjurLV+ZIA==", + "version": "6.28.6", + "resolved": "https://registry.npmjs.org/@wordpress/core-data/-/core-data-6.28.6.tgz", + "integrity": "sha512-I55Impmj2+H6j4jjD5zRKrurbIiOQO6ZiXSIc+7nxKQtAZ/jjO4AiNmSLH7f/VY8Sq/yG36LOq88LwmHCop90g==", "dependencies": { "@babel/runtime": "^7.16.0", "@wordpress/api-fetch": "^6.48.1", - "@wordpress/block-editor": "^12.19.5", - "@wordpress/blocks": "^12.28.5", + "@wordpress/block-editor": "^12.19.6", + "@wordpress/blocks": "^12.28.6", "@wordpress/compose": "^6.28.1", "@wordpress/data": "^9.21.1", "@wordpress/deprecated": "^3.51.1", @@ -6561,7 +6561,7 @@ "@wordpress/i18n": "^4.51.1", "@wordpress/is-shallow-equal": "^4.51.1", "@wordpress/private-apis": "^0.33.1", - "@wordpress/rich-text": "^6.28.3", + "@wordpress/rich-text": "^6.28.4", "@wordpress/sync": "^0.13.1", "@wordpress/undo-manager": "^0.11.1", "@wordpress/url": "^3.52.1", @@ -6581,31 +6581,31 @@ } }, "node_modules/@wordpress/customize-widgets": { - "version": "4.28.5", - "resolved": "https://registry.npmjs.org/@wordpress/customize-widgets/-/customize-widgets-4.28.5.tgz", - "integrity": "sha512-+aTHK0X8HM02GpgLbXDjH1dK1sk8J/Qo9MFS+stE9mLOl9nz6TOzPyGC59OAIdKtp6UspTSYjtpg5aVDnyJ2SA==", + "version": "4.28.7", + "resolved": "https://registry.npmjs.org/@wordpress/customize-widgets/-/customize-widgets-4.28.7.tgz", + "integrity": "sha512-GIZrXCeQFrvhReynsmKNMJjrEk3qZXntgayV42hZjNqUX/8UQV/xCW5W51S1mclgqQy/IG60tv/uKaANTCIsaQ==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/block-editor": "^12.19.5", - "@wordpress/block-library": "^8.28.5", - "@wordpress/blocks": "^12.28.5", - "@wordpress/components": "^26.0.4", + "@wordpress/block-editor": "^12.19.6", + "@wordpress/block-library": "^8.28.7", + "@wordpress/blocks": "^12.28.6", + "@wordpress/components": "^26.0.5", "@wordpress/compose": "^6.28.1", - "@wordpress/core-data": "^6.28.5", + "@wordpress/core-data": "^6.28.6", "@wordpress/data": "^9.21.1", "@wordpress/dom": "^3.51.1", "@wordpress/element": "^5.28.1", "@wordpress/hooks": "^3.51.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/icons": "^9.42.3", - "@wordpress/interface": "^5.28.4", + "@wordpress/icons": "^9.42.4", + "@wordpress/interface": "^5.28.5", "@wordpress/is-shallow-equal": "^4.51.1", "@wordpress/keyboard-shortcuts": "^4.28.1", "@wordpress/keycodes": "^3.51.1", - "@wordpress/media-utils": "^4.42.1", - "@wordpress/preferences": "^3.28.4", + "@wordpress/media-utils": "^4.42.2", + "@wordpress/preferences": "^3.28.5", "@wordpress/private-apis": "^0.33.1", - "@wordpress/widgets": "^3.28.5", + "@wordpress/widgets": "^3.28.6", "classnames": "^2.3.1", "fast-deep-equal": "^3.1.3" }, @@ -6663,18 +6663,18 @@ } }, "node_modules/@wordpress/dataviews": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/@wordpress/dataviews/-/dataviews-0.5.5.tgz", - "integrity": "sha512-m6d7z6HZIVDZk0CwNSMUqGOkoV4l+sJ8PVnlpXM0O4jHBxOhfOBjRH6A3OJSYLwMbFnTvvMyNDQju24W7cuEYQ==", + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/@wordpress/dataviews/-/dataviews-0.5.6.tgz", + "integrity": "sha512-vvMQv1OWXTNGbbeKf5BNooVM5YBER28Z5u2bhkhJ3XQCE64HbYlOq4vydc0xR9x+72DKDOKnev6eLET3QipPrA==", "dependencies": { "@ariakit/react": "^0.3.12", "@babel/runtime": "^7.16.0", "@wordpress/a11y": "^3.51.1", - "@wordpress/components": "^26.0.4", + "@wordpress/components": "^26.0.5", "@wordpress/compose": "^6.28.1", "@wordpress/element": "^5.28.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/icons": "^9.42.3", + "@wordpress/icons": "^9.42.4", "@wordpress/keycodes": "^3.51.1", "@wordpress/primitives": "^3.49.1", "@wordpress/private-apis": "^0.33.1", @@ -6838,41 +6838,41 @@ } }, "node_modules/@wordpress/edit-post": { - "version": "7.28.5", - "resolved": "https://registry.npmjs.org/@wordpress/edit-post/-/edit-post-7.28.5.tgz", - "integrity": "sha512-m2WCPZ0LdXkdHvs9XJnhuD9+rXb2Ckc+ZMzodK6jPc472btFKvnULNKtW0wyqpBLmDUrlUgf8MpTkdhtsf26cg==", + "version": "7.28.7", + "resolved": "https://registry.npmjs.org/@wordpress/edit-post/-/edit-post-7.28.7.tgz", + "integrity": "sha512-Mo9p+8dTtv3OJl/II5kDQKP/LhIRuF4FVgciutBQ4kN3De59EP/CdNdNB4XZkGrK0qHQD8p7DC5Yy9/o/lmmPg==", "dependencies": { "@babel/runtime": "^7.16.0", "@wordpress/a11y": "^3.51.1", "@wordpress/api-fetch": "^6.48.1", - "@wordpress/block-editor": "^12.19.5", - "@wordpress/block-library": "^8.28.5", - "@wordpress/blocks": "^12.28.5", - "@wordpress/commands": "^0.22.4", - "@wordpress/components": "^26.0.4", + "@wordpress/block-editor": "^12.19.6", + "@wordpress/block-library": "^8.28.7", + "@wordpress/blocks": "^12.28.6", + "@wordpress/commands": "^0.22.5", + "@wordpress/components": "^26.0.5", "@wordpress/compose": "^6.28.1", - "@wordpress/core-commands": "^0.20.5", - "@wordpress/core-data": "^6.28.5", + "@wordpress/core-commands": "^0.20.6", + "@wordpress/core-data": "^6.28.6", "@wordpress/data": "^9.21.1", "@wordpress/deprecated": "^3.51.1", "@wordpress/dom": "^3.51.1", - "@wordpress/editor": "^13.28.5", + "@wordpress/editor": "^13.28.6", "@wordpress/element": "^5.28.1", "@wordpress/hooks": "^3.51.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/icons": "^9.42.3", - "@wordpress/interface": "^5.28.4", + "@wordpress/icons": "^9.42.4", + "@wordpress/interface": "^5.28.5", "@wordpress/keyboard-shortcuts": "^4.28.1", "@wordpress/keycodes": "^3.51.1", - "@wordpress/media-utils": "^4.42.1", + "@wordpress/media-utils": "^4.42.2", "@wordpress/notices": "^4.19.1", - "@wordpress/plugins": "^6.19.4", - "@wordpress/preferences": "^3.28.4", + "@wordpress/plugins": "^6.19.5", + "@wordpress/preferences": "^3.28.5", "@wordpress/private-apis": "^0.33.1", "@wordpress/url": "^3.52.1", "@wordpress/viewport": "^5.28.1", "@wordpress/warning": "^2.51.1", - "@wordpress/widgets": "^3.28.5", + "@wordpress/widgets": "^3.28.6", "classnames": "^2.3.1", "memize": "^2.1.0", "rememo": "^4.0.2" @@ -6886,50 +6886,50 @@ } }, "node_modules/@wordpress/edit-site": { - "version": "5.28.5", - "resolved": "https://registry.npmjs.org/@wordpress/edit-site/-/edit-site-5.28.5.tgz", - "integrity": "sha512-b5QhF2qt5xHJa/UXp/KpOTlstTmMuUg3cXz6WIS59r5ZLtb4669c3mZOKcnhek3RFygXPWwa8a3fIzK08OY82w==", + "version": "5.28.7", + "resolved": "https://registry.npmjs.org/@wordpress/edit-site/-/edit-site-5.28.7.tgz", + "integrity": "sha512-0/e0v35oRWn28v3MamvBUfLkPNY0DU0IkJ8Sa0kIZke+3LHS2EcHYAIWukw2wSFYGIQI7rtjoItcCHaD3lg4DQ==", "dependencies": { "@babel/runtime": "^7.16.0", "@wordpress/a11y": "^3.51.1", "@wordpress/api-fetch": "^6.48.1", "@wordpress/blob": "^3.51.1", - "@wordpress/block-editor": "^12.19.5", - "@wordpress/block-library": "^8.28.5", - "@wordpress/blocks": "^12.28.5", - "@wordpress/commands": "^0.22.4", - "@wordpress/components": "^26.0.4", + "@wordpress/block-editor": "^12.19.6", + "@wordpress/block-library": "^8.28.7", + "@wordpress/blocks": "^12.28.6", + "@wordpress/commands": "^0.22.5", + "@wordpress/components": "^26.0.5", "@wordpress/compose": "^6.28.1", - "@wordpress/core-commands": "^0.20.5", - "@wordpress/core-data": "^6.28.5", + "@wordpress/core-commands": "^0.20.6", + "@wordpress/core-data": "^6.28.6", "@wordpress/data": "^9.21.1", - "@wordpress/dataviews": "^0.5.5", + "@wordpress/dataviews": "^0.5.6", "@wordpress/date": "^4.51.1", "@wordpress/deprecated": "^3.51.1", "@wordpress/dom": "^3.51.1", - "@wordpress/editor": "^13.28.5", + "@wordpress/editor": "^13.28.6", "@wordpress/element": "^5.28.1", "@wordpress/escape-html": "^2.51.1", "@wordpress/hooks": "^3.51.1", "@wordpress/html-entities": "^3.51.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/icons": "^9.42.3", - "@wordpress/interface": "^5.28.4", + "@wordpress/icons": "^9.42.4", + "@wordpress/interface": "^5.28.5", "@wordpress/keyboard-shortcuts": "^4.28.1", "@wordpress/keycodes": "^3.51.1", - "@wordpress/media-utils": "^4.42.1", + "@wordpress/media-utils": "^4.42.2", "@wordpress/notices": "^4.19.1", - "@wordpress/patterns": "^1.12.5", - "@wordpress/plugins": "^6.19.4", - "@wordpress/preferences": "^3.28.4", + "@wordpress/patterns": "^1.12.6", + "@wordpress/plugins": "^6.19.5", + "@wordpress/preferences": "^3.28.5", "@wordpress/primitives": "^3.49.1", "@wordpress/private-apis": "^0.33.1", - "@wordpress/reusable-blocks": "^4.28.5", + "@wordpress/reusable-blocks": "^4.28.6", "@wordpress/router": "^0.20.1", "@wordpress/style-engine": "^1.34.1", "@wordpress/url": "^3.52.1", "@wordpress/viewport": "^5.28.1", - "@wordpress/widgets": "^3.28.5", + "@wordpress/widgets": "^3.28.6", "@wordpress/wordcount": "^3.51.1", "change-case": "^4.1.2", "classnames": "^2.3.1", @@ -6951,37 +6951,37 @@ } }, "node_modules/@wordpress/edit-widgets": { - "version": "5.28.5", - "resolved": "https://registry.npmjs.org/@wordpress/edit-widgets/-/edit-widgets-5.28.5.tgz", - "integrity": "sha512-9soQuWZBjlsKi32utsd4vn5G74a5isFY0wi/QTQnfYHpenmLYhZnl4obJ5tHMbWR35w6g6WHq72jZHZya7gITQ==", + "version": "5.28.7", + "resolved": "https://registry.npmjs.org/@wordpress/edit-widgets/-/edit-widgets-5.28.7.tgz", + "integrity": "sha512-n55mlfQ35Kevx3qJfHMPY9UrRLD93irI4ImBcLcs7ICAhZdIdmrWL9TZsCwXMJKLKPSCF/pnHaVJLEVv6IBoPw==", "dependencies": { "@babel/runtime": "^7.16.0", "@wordpress/api-fetch": "^6.48.1", - "@wordpress/block-editor": "^12.19.5", - "@wordpress/block-library": "^8.28.5", - "@wordpress/blocks": "^12.28.5", - "@wordpress/components": "^26.0.4", + "@wordpress/block-editor": "^12.19.6", + "@wordpress/block-library": "^8.28.7", + "@wordpress/blocks": "^12.28.6", + "@wordpress/components": "^26.0.5", "@wordpress/compose": "^6.28.1", - "@wordpress/core-data": "^6.28.5", + "@wordpress/core-data": "^6.28.6", "@wordpress/data": "^9.21.1", "@wordpress/deprecated": "^3.51.1", "@wordpress/dom": "^3.51.1", "@wordpress/element": "^5.28.1", "@wordpress/hooks": "^3.51.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/icons": "^9.42.3", - "@wordpress/interface": "^5.28.4", + "@wordpress/icons": "^9.42.4", + "@wordpress/interface": "^5.28.5", "@wordpress/keyboard-shortcuts": "^4.28.1", "@wordpress/keycodes": "^3.51.1", - "@wordpress/media-utils": "^4.42.1", + "@wordpress/media-utils": "^4.42.2", "@wordpress/notices": "^4.19.1", - "@wordpress/patterns": "^1.12.5", - "@wordpress/plugins": "^6.19.4", - "@wordpress/preferences": "^3.28.4", + "@wordpress/patterns": "^1.12.6", + "@wordpress/plugins": "^6.19.5", + "@wordpress/preferences": "^3.28.5", "@wordpress/private-apis": "^0.33.1", - "@wordpress/reusable-blocks": "^4.28.5", + "@wordpress/reusable-blocks": "^4.28.6", "@wordpress/url": "^3.52.1", - "@wordpress/widgets": "^3.28.5", + "@wordpress/widgets": "^3.28.6", "classnames": "^2.3.1", "rememo": "^4.0.2" }, @@ -6994,20 +6994,20 @@ } }, "node_modules/@wordpress/editor": { - "version": "13.28.5", - "resolved": "https://registry.npmjs.org/@wordpress/editor/-/editor-13.28.5.tgz", - "integrity": "sha512-6Tnzz7iQSQWIJRXwXacwN0jouhqkAEvtdaAKslDFXoqT+z4jgjf6wGphPBgqUG6PPfp0BBUUNwXThBBcIwhNqA==", + "version": "13.28.6", + "resolved": "https://registry.npmjs.org/@wordpress/editor/-/editor-13.28.6.tgz", + "integrity": "sha512-Kvdr3QVywPUmkONoG890GotYVboR67J77XXNg4GRbHo+GaAOa0hZcIfrJg6yMcpVL3rzlFWaaZIMr3FBzPpPRQ==", "dependencies": { "@babel/runtime": "^7.16.0", "@wordpress/a11y": "^3.51.1", "@wordpress/api-fetch": "^6.48.1", "@wordpress/blob": "^3.51.1", - "@wordpress/block-editor": "^12.19.5", - "@wordpress/blocks": "^12.28.5", - "@wordpress/commands": "^0.22.4", - "@wordpress/components": "^26.0.4", + "@wordpress/block-editor": "^12.19.6", + "@wordpress/blocks": "^12.28.6", + "@wordpress/commands": "^0.22.5", + "@wordpress/components": "^26.0.5", "@wordpress/compose": "^6.28.1", - "@wordpress/core-data": "^6.28.5", + "@wordpress/core-data": "^6.28.6", "@wordpress/data": "^9.21.1", "@wordpress/date": "^4.51.1", "@wordpress/deprecated": "^3.51.1", @@ -7016,17 +7016,17 @@ "@wordpress/hooks": "^3.51.1", "@wordpress/html-entities": "^3.51.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/icons": "^9.42.3", + "@wordpress/icons": "^9.42.4", "@wordpress/keyboard-shortcuts": "^4.28.1", "@wordpress/keycodes": "^3.51.1", - "@wordpress/media-utils": "^4.42.1", + "@wordpress/media-utils": "^4.42.2", "@wordpress/notices": "^4.19.1", - "@wordpress/patterns": "^1.12.5", - "@wordpress/preferences": "^3.28.4", + "@wordpress/patterns": "^1.12.6", + "@wordpress/preferences": "^3.28.5", "@wordpress/private-apis": "^0.33.1", - "@wordpress/reusable-blocks": "^4.28.5", - "@wordpress/rich-text": "^6.28.3", - "@wordpress/server-side-render": "^4.28.5", + "@wordpress/reusable-blocks": "^4.28.6", + "@wordpress/rich-text": "^6.28.4", + "@wordpress/server-side-render": "^4.28.6", "@wordpress/url": "^3.52.1", "@wordpress/wordcount": "^3.51.1", "classnames": "^2.3.1", @@ -7132,22 +7132,22 @@ } }, "node_modules/@wordpress/format-library": { - "version": "4.28.5", - "resolved": "https://registry.npmjs.org/@wordpress/format-library/-/format-library-4.28.5.tgz", - "integrity": "sha512-ndvea8gYEcdke8GKC3qHDpN46UcnBcf3y+nptiXUFBcHpPkU/mLuXbdb0mTbmItYTNXZrPtzVDNci2QNG+d6Dw==", + "version": "4.28.6", + "resolved": "https://registry.npmjs.org/@wordpress/format-library/-/format-library-4.28.6.tgz", + "integrity": "sha512-xx1lRaN7BHOWIQoxepCQF0EiJvmHBrZBS0fV3T1gC84Ur+k/NqLCcQVIqIGwMrjlbdq030dKFDo7t98fX0/qdA==", "dependencies": { "@babel/runtime": "^7.16.0", "@wordpress/a11y": "^3.51.1", - "@wordpress/block-editor": "^12.19.5", - "@wordpress/components": "^26.0.4", + "@wordpress/block-editor": "^12.19.6", + "@wordpress/components": "^26.0.5", "@wordpress/compose": "^6.28.1", "@wordpress/data": "^9.21.1", "@wordpress/element": "^5.28.1", "@wordpress/html-entities": "^3.51.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/icons": "^9.42.3", + "@wordpress/icons": "^9.42.4", "@wordpress/private-apis": "^0.33.1", - "@wordpress/rich-text": "^6.28.3", + "@wordpress/rich-text": "^6.28.4", "@wordpress/url": "^3.52.1" }, "engines": { @@ -7200,9 +7200,9 @@ } }, "node_modules/@wordpress/icons": { - "version": "9.42.3", - "resolved": "https://registry.npmjs.org/@wordpress/icons/-/icons-9.42.3.tgz", - "integrity": "sha512-GSbBVXoLadzrdUXj7ahslEdaA3p/FqnQYDUOHM0Z5QTmTl77J7yJ4V6o+iMIOagoMaoe1hhDzDpj1FaU/CiPcg==", + "version": "9.42.4", + "resolved": "https://registry.npmjs.org/@wordpress/icons/-/icons-9.42.4.tgz", + "integrity": "sha512-n7b82iMdCoO6Y2xdjtyxBZPeSf1NwbPTEmjHVqxkZX5xpuirv7Fps5NWXJBlFOIvOW3C/MI2Smca9aOppaqR8g==", "dependencies": { "@babel/runtime": "^7.16.0", "@wordpress/element": "^5.28.1", @@ -7213,9 +7213,9 @@ } }, "node_modules/@wordpress/interactivity": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/@wordpress/interactivity/-/interactivity-5.0.3.tgz", - "integrity": "sha512-oSJ8Z725c0caYcxlwrDNpnTluYbdDLPjsUIE1avr9g2Ul9KTiRnZ/k+FIjGsJvnXssEEOAvxGS8KPEXH/E4cVA==", + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/@wordpress/interactivity/-/interactivity-5.0.4.tgz", + "integrity": "sha512-raeGdy3x1ntmjyJDOwMYBn5kdkd0D/u6JMVpkbr4dHIwppiFcuPDNPIyh02ajiUffRA3v3osyV3cWgxM0EPfog==", "dependencies": { "@preact/signals": "^1.2.2", "deepsignal": "^1.4.0", @@ -7226,32 +7226,32 @@ } }, "node_modules/@wordpress/interactivity-router": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@wordpress/interactivity-router/-/interactivity-router-1.1.3.tgz", - "integrity": "sha512-p6r6WalHukPi7pEjXJnsjghCCR9vuuE28l24vKU5MzUimVvU4Cl9Pykncpuyjt312azkQLEKRroAGPmEvoxVXg==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@wordpress/interactivity-router/-/interactivity-router-1.1.4.tgz", + "integrity": "sha512-H4ImDuCb5ktnEF9e3UsmCxVGP90PGfft3FWlv07XSBoa9xMScDQhH00IZwyW7UVYvAwirBGL8woZaBEDPuEmZA==", "dependencies": { - "@wordpress/interactivity": "^5.0.3" + "@wordpress/interactivity": "^5.0.4" }, "engines": { "node": ">=12" } }, "node_modules/@wordpress/interface": { - "version": "5.28.4", - "resolved": "https://registry.npmjs.org/@wordpress/interface/-/interface-5.28.4.tgz", - "integrity": "sha512-lRxvjTOoTP97hzZpk1znHCOxbtVYlMiHQ3FlNwN7DmcHWP+DXY+xpo8bM6OLIkqOa7FtHwT8RgT7OEzLhyli/w==", + "version": "5.28.5", + "resolved": "https://registry.npmjs.org/@wordpress/interface/-/interface-5.28.5.tgz", + "integrity": "sha512-ONQE4Zp0/zn7hGasB3zWygSEL8yXNjEbHyUhZ2wHhaF9kttDscfMNxomoyUD0a79IS7UhHRrje17yv/iJmQxsw==", "dependencies": { "@babel/runtime": "^7.16.0", "@wordpress/a11y": "^3.51.1", - "@wordpress/components": "^26.0.4", + "@wordpress/components": "^26.0.5", "@wordpress/compose": "^6.28.1", "@wordpress/data": "^9.21.1", "@wordpress/deprecated": "^3.51.1", "@wordpress/element": "^5.28.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/icons": "^9.42.3", - "@wordpress/plugins": "^6.19.4", - "@wordpress/preferences": "^3.28.4", + "@wordpress/icons": "^9.42.4", + "@wordpress/plugins": "^6.19.5", + "@wordpress/preferences": "^3.28.5", "@wordpress/private-apis": "^0.33.1", "@wordpress/viewport": "^5.28.1", "classnames": "^2.3.1" @@ -7339,14 +7339,14 @@ } }, "node_modules/@wordpress/list-reusable-blocks": { - "version": "4.28.4", - "resolved": "https://registry.npmjs.org/@wordpress/list-reusable-blocks/-/list-reusable-blocks-4.28.4.tgz", - "integrity": "sha512-DBUo3h0xkXSuXOqv3LTeEp9YCRyxXEqrkvYkU0M0k4WiSVcnxyH4YFWI/9tPIy096eVROjn3QfjW4OIOHv9WRQ==", + "version": "4.28.5", + "resolved": "https://registry.npmjs.org/@wordpress/list-reusable-blocks/-/list-reusable-blocks-4.28.5.tgz", + "integrity": "sha512-ayTeye3Aj4Vz/b3alluxFMr6mN+1MTFvDDP72eieetnxXSNCXsz4N7bVu2XyIxuOq3V8le4vCJmx6nDWLcL1TQ==", "dependencies": { "@babel/runtime": "^7.16.0", "@wordpress/api-fetch": "^6.48.1", "@wordpress/blob": "^3.51.1", - "@wordpress/components": "^26.0.4", + "@wordpress/components": "^26.0.5", "@wordpress/compose": "^6.28.1", "@wordpress/element": "^5.28.1", "@wordpress/i18n": "^4.51.1", @@ -7361,9 +7361,9 @@ } }, "node_modules/@wordpress/media-utils": { - "version": "4.42.1", - "resolved": "https://registry.npmjs.org/@wordpress/media-utils/-/media-utils-4.42.1.tgz", - "integrity": "sha512-L9JEBSydd516PiQ2bwYEzJhkwfV9vyfnOs2lSYkYYqBe1H/1HPNpqUNBw9LtaaoGGk5gIjN2qTaZQJtNwXJCFg==", + "version": "4.42.2", + "resolved": "https://registry.npmjs.org/@wordpress/media-utils/-/media-utils-4.42.2.tgz", + "integrity": "sha512-AVeQb/1nVWA/09+o353HDJnMNFe7q7+sEYNYdOg5cXGcq1DD0tlmJihJIFutqkR5r9a5fD4WMfWUGVehDj3l3g==", "dependencies": { "@babel/runtime": "^7.16.0", "@wordpress/api-fetch": "^6.48.1", @@ -7404,18 +7404,18 @@ } }, "node_modules/@wordpress/nux": { - "version": "8.13.4", - "resolved": "https://registry.npmjs.org/@wordpress/nux/-/nux-8.13.4.tgz", - "integrity": "sha512-9d1Lid+TOifgyomtj6d7ZNFsBvNVrZqghB36x8n4qSnsb0OGaWMCPGfIZu3ONrKRnNHNimFr43VAEPWwouOPJA==", + "version": "8.13.5", + "resolved": "https://registry.npmjs.org/@wordpress/nux/-/nux-8.13.5.tgz", + "integrity": "sha512-VTjoKAXzIzu8SIQWbTXuWRa68tZvR5j4hJmYVl5dI0eSQEpV6Cen2T/NdEmj+T3u+yMgBRzd6bhhrv+/6yCaNg==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/components": "^26.0.4", + "@wordpress/components": "^26.0.5", "@wordpress/compose": "^6.28.1", "@wordpress/data": "^9.21.1", "@wordpress/deprecated": "^3.51.1", "@wordpress/element": "^5.28.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/icons": "^9.42.3", + "@wordpress/icons": "^9.42.4", "rememo": "^4.0.2" }, "engines": { @@ -7427,22 +7427,22 @@ } }, "node_modules/@wordpress/patterns": { - "version": "1.12.5", - "resolved": "https://registry.npmjs.org/@wordpress/patterns/-/patterns-1.12.5.tgz", - "integrity": "sha512-ylke7nIGzo1c6xCoUrfV58qnfyl/U9Fn3VVjFbhFRI3Fz75nxcQ9PQWnORDrm/laEaGmtYsW81grec/ddv3vWg==", + "version": "1.12.6", + "resolved": "https://registry.npmjs.org/@wordpress/patterns/-/patterns-1.12.6.tgz", + "integrity": "sha512-xPx1+oxVD+n2/LPkqbnbSCvyzq0VCPfZxmWEq/EuOo6FenOPFpQPKAvnaP4QmGpS4QBg4a79eAbHs47MnjOZUQ==", "dependencies": { "@babel/runtime": "^7.16.0", "@wordpress/a11y": "^3.51.1", - "@wordpress/block-editor": "^12.19.5", - "@wordpress/blocks": "^12.28.5", - "@wordpress/components": "^26.0.4", + "@wordpress/block-editor": "^12.19.6", + "@wordpress/blocks": "^12.28.6", + "@wordpress/components": "^26.0.5", "@wordpress/compose": "^6.28.1", - "@wordpress/core-data": "^6.28.5", + "@wordpress/core-data": "^6.28.6", "@wordpress/data": "^9.21.1", "@wordpress/element": "^5.28.1", "@wordpress/html-entities": "^3.51.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/icons": "^9.42.3", + "@wordpress/icons": "^9.42.4", "@wordpress/notices": "^4.19.1", "@wordpress/private-apis": "^0.33.1", "@wordpress/url": "^3.52.1" @@ -7456,16 +7456,16 @@ } }, "node_modules/@wordpress/plugins": { - "version": "6.19.4", - "resolved": "https://registry.npmjs.org/@wordpress/plugins/-/plugins-6.19.4.tgz", - "integrity": "sha512-ID0et2/LZbtR/ODQK/nxt7ndQmVXTuPt6azbqaykm5nQyMpbY8u0c/mneuvYmmyGWAbUrJ51G1XD3cGyXxsgjg==", + "version": "6.19.5", + "resolved": "https://registry.npmjs.org/@wordpress/plugins/-/plugins-6.19.5.tgz", + "integrity": "sha512-n00FgZ33lEBIy4ztkpDhgiYOM7NLwrkEIbhySZg+ahWbv52nw8+qln4G0r3fDe+UvslqNV34SdwiZ1OGHQ/Ylg==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/components": "^26.0.4", + "@wordpress/components": "^26.0.5", "@wordpress/compose": "^6.28.1", "@wordpress/element": "^5.28.1", "@wordpress/hooks": "^3.51.1", - "@wordpress/icons": "^9.42.3", + "@wordpress/icons": "^9.42.4", "@wordpress/is-shallow-equal": "^4.51.1", "memize": "^2.0.1" }, @@ -7494,19 +7494,19 @@ } }, "node_modules/@wordpress/preferences": { - "version": "3.28.4", - "resolved": "https://registry.npmjs.org/@wordpress/preferences/-/preferences-3.28.4.tgz", - "integrity": "sha512-Kcbbj0H38h4qlqjcs4g1EGPUKeNAvXkmU/BzgDkJZPBoIud0SdXT7Tj9hnwNSuR+7CfL7/3aoELSrp98L5uWow==", + "version": "3.28.5", + "resolved": "https://registry.npmjs.org/@wordpress/preferences/-/preferences-3.28.5.tgz", + "integrity": "sha512-XpLsgrkdpi+Wp0ZrJZsH44AG3BRvZX00myr0AV3s2Alo34eg+MaBmSW1WyLQCjOcSqWHqsbVhkt546k4/EfCyA==", "dependencies": { "@babel/runtime": "^7.16.0", "@wordpress/a11y": "^3.51.1", - "@wordpress/components": "^26.0.4", + "@wordpress/components": "^26.0.5", "@wordpress/compose": "^6.28.1", "@wordpress/data": "^9.21.1", "@wordpress/deprecated": "^3.51.1", "@wordpress/element": "^5.28.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/icons": "^9.42.3", + "@wordpress/icons": "^9.42.4", "@wordpress/private-apis": "^0.33.1", "classnames": "^2.3.1" }, @@ -7596,19 +7596,19 @@ } }, "node_modules/@wordpress/reusable-blocks": { - "version": "4.28.5", - "resolved": "https://registry.npmjs.org/@wordpress/reusable-blocks/-/reusable-blocks-4.28.5.tgz", - "integrity": "sha512-lgc2nl5LZ+b24HuuN6v753s4qo9DY3Aho9l7qtefyDxXB2YLM5T1ub6RCleRWMG70cuU0m55304s5hP+1+jaqg==", + "version": "4.28.6", + "resolved": "https://registry.npmjs.org/@wordpress/reusable-blocks/-/reusable-blocks-4.28.6.tgz", + "integrity": "sha512-mYyjU/PSME9HMFItQdQ5/9cL7pcdQvpxSyDspbXBo9OmI7BWD9XeQ8gLuYvrcHp6mbX3U1M3QTeb8/Qz3v5FRg==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/block-editor": "^12.19.5", - "@wordpress/blocks": "^12.28.5", - "@wordpress/components": "^26.0.4", - "@wordpress/core-data": "^6.28.5", + "@wordpress/block-editor": "^12.19.6", + "@wordpress/blocks": "^12.28.6", + "@wordpress/components": "^26.0.5", + "@wordpress/core-data": "^6.28.6", "@wordpress/data": "^9.21.1", "@wordpress/element": "^5.28.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/icons": "^9.42.3", + "@wordpress/icons": "^9.42.4", "@wordpress/notices": "^4.19.1", "@wordpress/private-apis": "^0.33.1", "@wordpress/url": "^3.52.1" @@ -7622,9 +7622,9 @@ } }, "node_modules/@wordpress/rich-text": { - "version": "6.28.3", - "resolved": "https://registry.npmjs.org/@wordpress/rich-text/-/rich-text-6.28.3.tgz", - "integrity": "sha512-SOPcn8lpLQEFF/HLI+w7HzuByIX/8/c9nyLMgYntj/Vk64izI4HYnQP6ftTtu/a12S8/C1cXhpH2ZfFNz6jItA==", + "version": "6.28.4", + "resolved": "https://registry.npmjs.org/@wordpress/rich-text/-/rich-text-6.28.4.tgz", + "integrity": "sha512-RekQVvA3YFKAe6hPnMNZsE8Er9aFG0gdvnhRK7QnmUcNIk3EOx1KEbcx3SI1+B8+im5mviW31kFGBMzMNRFQMw==", "dependencies": { "@babel/runtime": "^7.16.0", "@wordpress/a11y": "^3.51.1", @@ -7664,9 +7664,9 @@ } }, "node_modules/@wordpress/scripts": { - "version": "27.2.4", - "resolved": "https://registry.npmjs.org/@wordpress/scripts/-/scripts-27.2.4.tgz", - "integrity": "sha512-wBEr13XDVwMP1PTwS4IrVYX+46B0EmDsIryUClykbr6XPw1CtIygz08e8sOeWYBgsuW5DQwx30T/9ifwKCRimw==", + "version": "27.2.5", + "resolved": "https://registry.npmjs.org/@wordpress/scripts/-/scripts-27.2.5.tgz", + "integrity": "sha512-XWxAa4mfWXpQb9G1vLiprCn9YaIXR69YKpS5VgUhCYqmRZFKXPhzMeBslpsbRhgx3Tiiz3depv1qtOOdVAQOog==", "dev": true, "dependencies": { "@babel/core": "^7.16.0", @@ -7679,7 +7679,7 @@ "@wordpress/eslint-plugin": "^17.8.1", "@wordpress/jest-preset-default": "^11.22.1", "@wordpress/npm-package-json-lint-config": "^4.36.1", - "@wordpress/postcss-plugins-preset": "^4.35.4", + "@wordpress/postcss-plugins-preset": "^4.35.5", "@wordpress/prettier-config": "^3.8.1", "@wordpress/stylelint-config": "^21.34.1", "adm-zip": "^0.5.9", @@ -8083,14 +8083,14 @@ } }, "node_modules/@wordpress/server-side-render": { - "version": "4.28.5", - "resolved": "https://registry.npmjs.org/@wordpress/server-side-render/-/server-side-render-4.28.5.tgz", - "integrity": "sha512-/o2Pdzl4Zz8E/V0efo0/v8jP5Pe9dR28QYEzWopHZPpKHeLtSrrqdrnZRddbf3fnmis1+y56h6+eaW+YUTMlQA==", + "version": "4.28.6", + "resolved": "https://registry.npmjs.org/@wordpress/server-side-render/-/server-side-render-4.28.6.tgz", + "integrity": "sha512-l9b4yImMNuivHRv+mGTgBAtqZlJ7i9CuilX5ItQxsDskggcUjo/GgZuOq491uFyNi7IwhVoONtPqFkGh903HHQ==", "dependencies": { "@babel/runtime": "^7.16.0", "@wordpress/api-fetch": "^6.48.1", - "@wordpress/blocks": "^12.28.5", - "@wordpress/components": "^26.0.4", + "@wordpress/blocks": "^12.28.6", + "@wordpress/components": "^26.0.5", "@wordpress/compose": "^6.28.1", "@wordpress/data": "^9.21.1", "@wordpress/deprecated": "^3.51.1", @@ -8228,21 +8228,21 @@ } }, "node_modules/@wordpress/widgets": { - "version": "3.28.5", - "resolved": "https://registry.npmjs.org/@wordpress/widgets/-/widgets-3.28.5.tgz", - "integrity": "sha512-9BoNxIzZGyx2390rZA5Bs0WGZOA0ymwsD5erQ5GYOqj8z+1UTe94WPQne+DhHmYB7rPjOh1zV8xJet2aRhVCUg==", + "version": "3.28.6", + "resolved": "https://registry.npmjs.org/@wordpress/widgets/-/widgets-3.28.6.tgz", + "integrity": "sha512-69TcSveasenFSXzUmS5zU9TE9tgt8YlfONgqso7NkaBv5Gkj8c3BIHhyKqbysH1a4MxkTVd1pFqkJA321IfPrg==", "dependencies": { "@babel/runtime": "^7.16.0", "@wordpress/api-fetch": "^6.48.1", - "@wordpress/block-editor": "^12.19.5", - "@wordpress/blocks": "^12.28.5", - "@wordpress/components": "^26.0.4", + "@wordpress/block-editor": "^12.19.6", + "@wordpress/blocks": "^12.28.6", + "@wordpress/components": "^26.0.5", "@wordpress/compose": "^6.28.1", - "@wordpress/core-data": "^6.28.5", + "@wordpress/core-data": "^6.28.6", "@wordpress/data": "^9.21.1", "@wordpress/element": "^5.28.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/icons": "^9.42.3", + "@wordpress/icons": "^9.42.4", "@wordpress/notices": "^4.19.1", "classnames": "^2.3.1" }, @@ -37622,15 +37622,15 @@ } }, "@wordpress/annotations": { - "version": "2.51.3", - "resolved": "https://registry.npmjs.org/@wordpress/annotations/-/annotations-2.51.3.tgz", - "integrity": "sha512-x2h6WwFsqnuXn5WfQY1AOsb9IkHsu/M3kRpduG42pVVhhIOkLiq8vvAaR52nmB+vrFq5ntGrVr9jaME+OxCRNA==", + "version": "2.51.4", + "resolved": "https://registry.npmjs.org/@wordpress/annotations/-/annotations-2.51.4.tgz", + "integrity": "sha512-nEQgAWphJcECqJIygCgY27OaWgqEoGFRy1DFrKud1MpLrpsxyflhtGKz8CxUj1Sv+Sq4jrS+KaIR/aKwUBO82g==", "requires": { "@babel/runtime": "^7.16.0", "@wordpress/data": "^9.21.1", "@wordpress/hooks": "^3.51.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/rich-text": "^6.28.3", + "@wordpress/rich-text": "^6.28.4", "rememo": "^4.0.2", "uuid": "^9.0.1" } @@ -37694,37 +37694,37 @@ } }, "@wordpress/block-directory": { - "version": "4.28.5", - "resolved": "https://registry.npmjs.org/@wordpress/block-directory/-/block-directory-4.28.5.tgz", - "integrity": "sha512-/hTWQoxiDLJkG9UG75n/DImstWz5DKotE2Blx8VrMNuWwzl+riSRrvRx6UzfUjx5KCRV5vddu/zjBYQbdFtLyA==", + "version": "4.28.7", + "resolved": "https://registry.npmjs.org/@wordpress/block-directory/-/block-directory-4.28.7.tgz", + "integrity": "sha512-iv3gFbyYhiVn5vuWND9M+NJx7UZva4CwTplZtWr9Hcp//Of5J4Ylnp/ONR8aPK5SEqbMn5d2dblXJ3G0hBavJg==", "requires": { "@babel/runtime": "^7.16.0", "@wordpress/a11y": "^3.51.1", "@wordpress/api-fetch": "^6.48.1", - "@wordpress/block-editor": "^12.19.5", - "@wordpress/blocks": "^12.28.5", - "@wordpress/components": "^26.0.4", + "@wordpress/block-editor": "^12.19.6", + "@wordpress/blocks": "^12.28.6", + "@wordpress/components": "^26.0.5", "@wordpress/compose": "^6.28.1", - "@wordpress/core-data": "^6.28.5", + "@wordpress/core-data": "^6.28.6", "@wordpress/data": "^9.21.1", - "@wordpress/edit-post": "^7.28.5", - "@wordpress/editor": "^13.28.5", + "@wordpress/edit-post": "^7.28.7", + "@wordpress/editor": "^13.28.6", "@wordpress/element": "^5.28.1", "@wordpress/hooks": "^3.51.1", "@wordpress/html-entities": "^3.51.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/icons": "^9.42.3", + "@wordpress/icons": "^9.42.4", "@wordpress/notices": "^4.19.1", - "@wordpress/plugins": "^6.19.4", + "@wordpress/plugins": "^6.19.5", "@wordpress/private-apis": "^0.33.1", "@wordpress/url": "^3.52.1", "change-case": "^4.1.2" } }, "@wordpress/block-editor": { - "version": "12.19.5", - "resolved": "https://registry.npmjs.org/@wordpress/block-editor/-/block-editor-12.19.5.tgz", - "integrity": "sha512-SgSdxTNOFDjr4Tq8aZZGofWOebt6MpDBsbYwXFOU5n8Y3phUeGDdyiyeRIQuBQKR4Ti0NZpkxtjxoUcvs00rtQ==", + "version": "12.19.6", + "resolved": "https://registry.npmjs.org/@wordpress/block-editor/-/block-editor-12.19.6.tgz", + "integrity": "sha512-BHrmwVPEr/Thz/esV9fs15Z3QN+M9MdkpwJoBBxL+McbCkR+XmwZnhSZnewa+JuAfSkvmvv7g+TrMq1jNUkpFw==", "requires": { "@babel/runtime": "^7.16.0", "@emotion/react": "^11.7.1", @@ -37733,9 +37733,9 @@ "@wordpress/a11y": "^3.51.1", "@wordpress/api-fetch": "^6.48.1", "@wordpress/blob": "^3.51.1", - "@wordpress/blocks": "^12.28.5", - "@wordpress/commands": "^0.22.4", - "@wordpress/components": "^26.0.4", + "@wordpress/blocks": "^12.28.6", + "@wordpress/commands": "^0.22.5", + "@wordpress/components": "^26.0.5", "@wordpress/compose": "^6.28.1", "@wordpress/data": "^9.21.1", "@wordpress/date": "^4.51.1", @@ -37746,14 +37746,14 @@ "@wordpress/hooks": "^3.51.1", "@wordpress/html-entities": "^3.51.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/icons": "^9.42.3", + "@wordpress/icons": "^9.42.4", "@wordpress/is-shallow-equal": "^4.51.1", "@wordpress/keyboard-shortcuts": "^4.28.1", "@wordpress/keycodes": "^3.51.1", "@wordpress/notices": "^4.19.1", - "@wordpress/preferences": "^3.28.4", + "@wordpress/preferences": "^3.28.5", "@wordpress/private-apis": "^0.33.1", - "@wordpress/rich-text": "^6.28.3", + "@wordpress/rich-text": "^6.28.4", "@wordpress/style-engine": "^1.34.1", "@wordpress/token-list": "^2.51.1", "@wordpress/url": "^3.52.1", @@ -37777,20 +37777,20 @@ } }, "@wordpress/block-library": { - "version": "8.28.5", - "resolved": "https://registry.npmjs.org/@wordpress/block-library/-/block-library-8.28.5.tgz", - "integrity": "sha512-NTzp3JXR/dE+HRY/SP396BcYqAfWEqWK4caHGdL5EbG6tZMaO7NdXuMitBnOyC089idIpDuaBQo64ofG0wZycA==", + "version": "8.28.7", + "resolved": "https://registry.npmjs.org/@wordpress/block-library/-/block-library-8.28.7.tgz", + "integrity": "sha512-j1nJ7iOnJSHoR/WNuDg5+HJZhQlXF6JkkYD7sO1fKSFEBxaTyL9SlL2gegOi1KFgUvEdeaflyypCg24mO6mbgw==", "requires": { "@babel/runtime": "^7.16.0", "@wordpress/a11y": "^3.51.1", "@wordpress/api-fetch": "^6.48.1", "@wordpress/autop": "^3.51.1", "@wordpress/blob": "^3.51.1", - "@wordpress/block-editor": "^12.19.5", - "@wordpress/blocks": "^12.28.5", - "@wordpress/components": "^26.0.4", + "@wordpress/block-editor": "^12.19.6", + "@wordpress/blocks": "^12.28.6", + "@wordpress/components": "^26.0.5", "@wordpress/compose": "^6.28.1", - "@wordpress/core-data": "^6.28.5", + "@wordpress/core-data": "^6.28.6", "@wordpress/data": "^9.21.1", "@wordpress/date": "^4.51.1", "@wordpress/deprecated": "^3.51.1", @@ -37800,17 +37800,17 @@ "@wordpress/hooks": "^3.51.1", "@wordpress/html-entities": "^3.51.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/icons": "^9.42.3", - "@wordpress/interactivity": "^5.0.3", - "@wordpress/interactivity-router": "^1.1.3", + "@wordpress/icons": "^9.42.4", + "@wordpress/interactivity": "^5.0.4", + "@wordpress/interactivity-router": "^1.1.4", "@wordpress/keycodes": "^3.51.1", "@wordpress/notices": "^4.19.1", - "@wordpress/patterns": "^1.12.5", + "@wordpress/patterns": "^1.12.6", "@wordpress/primitives": "^3.49.1", "@wordpress/private-apis": "^0.33.1", - "@wordpress/reusable-blocks": "^4.28.5", - "@wordpress/rich-text": "^6.28.3", - "@wordpress/server-side-render": "^4.28.5", + "@wordpress/reusable-blocks": "^4.28.6", + "@wordpress/rich-text": "^6.28.4", + "@wordpress/server-side-render": "^4.28.6", "@wordpress/url": "^3.52.1", "@wordpress/viewport": "^5.28.1", "@wordpress/wordcount": "^3.51.1", @@ -37834,9 +37834,9 @@ } }, "@wordpress/blocks": { - "version": "12.28.5", - "resolved": "https://registry.npmjs.org/@wordpress/blocks/-/blocks-12.28.5.tgz", - "integrity": "sha512-OR5Tl4uzgJnpC7IH/0KCUz9To4pJ8lj64NA5sCEIJK0vSVJPEPXTkiUp0f4Y2gOm0r593Aya/4yYoGOVxoPEoA==", + "version": "12.28.6", + "resolved": "https://registry.npmjs.org/@wordpress/blocks/-/blocks-12.28.6.tgz", + "integrity": "sha512-dTMY/ZRaszsGpbmc4N3/lzvu7kp2zPOPkNy8Eznwy952OFqKYkq6ajJrw8CKH1FRkgXACAH+BDA/6OBHTcuvfQ==", "requires": { "@babel/runtime": "^7.16.0", "@wordpress/autop": "^3.51.1", @@ -37852,7 +37852,7 @@ "@wordpress/i18n": "^4.51.1", "@wordpress/is-shallow-equal": "^4.51.1", "@wordpress/private-apis": "^0.33.1", - "@wordpress/rich-text": "^6.28.3", + "@wordpress/rich-text": "^6.28.4", "@wordpress/shortcode": "^3.51.1", "change-case": "^4.1.2", "colord": "^2.7.0", @@ -37875,16 +37875,16 @@ "dev": true }, "@wordpress/commands": { - "version": "0.22.4", - "resolved": "https://registry.npmjs.org/@wordpress/commands/-/commands-0.22.4.tgz", - "integrity": "sha512-mGg1Uw3mKqxc6Ok9p1TgIdSgGSheoaN0ZMa09cIVH/n9Vl22KRbMB3wsUaIAWsKxrgcsOA/uejEaMcRBYLXEtw==", + "version": "0.22.5", + "resolved": "https://registry.npmjs.org/@wordpress/commands/-/commands-0.22.5.tgz", + "integrity": "sha512-ZK1dXW1vmmXHIWgptZRDWlT/ACOejbIKPCXOIKSx0gezHYf8P6H+4EZ5xYimr8rWvsrfI3PoswkFkKPliYh9Iw==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/components": "^26.0.4", + "@wordpress/components": "^26.0.5", "@wordpress/data": "^9.21.1", "@wordpress/element": "^5.28.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/icons": "^9.42.3", + "@wordpress/icons": "^9.42.4", "@wordpress/keyboard-shortcuts": "^4.28.1", "@wordpress/private-apis": "^0.33.1", "classnames": "^2.3.1", @@ -37893,9 +37893,9 @@ } }, "@wordpress/components": { - "version": "26.0.4", - "resolved": "https://registry.npmjs.org/@wordpress/components/-/components-26.0.4.tgz", - "integrity": "sha512-2AQLZEjIyx8H62lQ3/KDSoa1f6WXtl6+7poiJkD0OF/8GFs7fZtcPyBxmnXgd5C5ZE54GAizbPkFHVbeBqyl+Q==", + "version": "26.0.5", + "resolved": "https://registry.npmjs.org/@wordpress/components/-/components-26.0.5.tgz", + "integrity": "sha512-lp509SXTVs6RYN30XS4Unn2S+Sy7Tw3pKDrupgn0k+Y0ELrPjRcAquRQZ2P51/i7SxLSKMhzlbNVSoFqrSNZZA==", "requires": { "@ariakit/react": "^0.3.12", "@babel/runtime": "^7.16.0", @@ -37919,12 +37919,12 @@ "@wordpress/hooks": "^3.51.1", "@wordpress/html-entities": "^3.51.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/icons": "^9.42.3", + "@wordpress/icons": "^9.42.4", "@wordpress/is-shallow-equal": "^4.51.1", "@wordpress/keycodes": "^3.51.1", "@wordpress/primitives": "^3.49.1", "@wordpress/private-apis": "^0.33.1", - "@wordpress/rich-text": "^6.28.3", + "@wordpress/rich-text": "^6.28.4", "@wordpress/warning": "^2.51.1", "change-case": "^4.1.2", "classnames": "^2.3.1", @@ -37969,33 +37969,33 @@ } }, "@wordpress/core-commands": { - "version": "0.20.5", - "resolved": "https://registry.npmjs.org/@wordpress/core-commands/-/core-commands-0.20.5.tgz", - "integrity": "sha512-25rpA326s4vSzBIP/ZX+wThDic4VS1h7iVAzZutdTno80MWHJU03T95wqHqDSAkNjwhYk3PGsxQk68N2Qib5mA==", + "version": "0.20.6", + "resolved": "https://registry.npmjs.org/@wordpress/core-commands/-/core-commands-0.20.6.tgz", + "integrity": "sha512-nj0nzCc6FGbFHO/qw4xj7BoxufJAm2x6ZWUoVbUAlWoYcAxQ7tU0UlXqKtAKZ9Ij17kJ7LoBq+11dt8XfGM9zQ==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/block-editor": "^12.19.5", - "@wordpress/commands": "^0.22.4", + "@wordpress/block-editor": "^12.19.6", + "@wordpress/commands": "^0.22.5", "@wordpress/compose": "^6.28.1", - "@wordpress/core-data": "^6.28.5", + "@wordpress/core-data": "^6.28.6", "@wordpress/data": "^9.21.1", "@wordpress/element": "^5.28.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/icons": "^9.42.3", + "@wordpress/icons": "^9.42.4", "@wordpress/private-apis": "^0.33.1", "@wordpress/router": "^0.20.1", "@wordpress/url": "^3.52.1" } }, "@wordpress/core-data": { - "version": "6.28.5", - "resolved": "https://registry.npmjs.org/@wordpress/core-data/-/core-data-6.28.5.tgz", - "integrity": "sha512-/ppBrwkta8tGTo0CfDqFksNaJXlUOMRlOEbbsCp7jODOK9DI17c/JN9OjMBHEdjwZC3kvWqJ1i5mMjurLV+ZIA==", + "version": "6.28.6", + "resolved": "https://registry.npmjs.org/@wordpress/core-data/-/core-data-6.28.6.tgz", + "integrity": "sha512-I55Impmj2+H6j4jjD5zRKrurbIiOQO6ZiXSIc+7nxKQtAZ/jjO4AiNmSLH7f/VY8Sq/yG36LOq88LwmHCop90g==", "requires": { "@babel/runtime": "^7.16.0", "@wordpress/api-fetch": "^6.48.1", - "@wordpress/block-editor": "^12.19.5", - "@wordpress/blocks": "^12.28.5", + "@wordpress/block-editor": "^12.19.6", + "@wordpress/blocks": "^12.28.6", "@wordpress/compose": "^6.28.1", "@wordpress/data": "^9.21.1", "@wordpress/deprecated": "^3.51.1", @@ -38004,7 +38004,7 @@ "@wordpress/i18n": "^4.51.1", "@wordpress/is-shallow-equal": "^4.51.1", "@wordpress/private-apis": "^0.33.1", - "@wordpress/rich-text": "^6.28.3", + "@wordpress/rich-text": "^6.28.4", "@wordpress/sync": "^0.13.1", "@wordpress/undo-manager": "^0.11.1", "@wordpress/url": "^3.52.1", @@ -38017,31 +38017,31 @@ } }, "@wordpress/customize-widgets": { - "version": "4.28.5", - "resolved": "https://registry.npmjs.org/@wordpress/customize-widgets/-/customize-widgets-4.28.5.tgz", - "integrity": "sha512-+aTHK0X8HM02GpgLbXDjH1dK1sk8J/Qo9MFS+stE9mLOl9nz6TOzPyGC59OAIdKtp6UspTSYjtpg5aVDnyJ2SA==", + "version": "4.28.7", + "resolved": "https://registry.npmjs.org/@wordpress/customize-widgets/-/customize-widgets-4.28.7.tgz", + "integrity": "sha512-GIZrXCeQFrvhReynsmKNMJjrEk3qZXntgayV42hZjNqUX/8UQV/xCW5W51S1mclgqQy/IG60tv/uKaANTCIsaQ==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/block-editor": "^12.19.5", - "@wordpress/block-library": "^8.28.5", - "@wordpress/blocks": "^12.28.5", - "@wordpress/components": "^26.0.4", + "@wordpress/block-editor": "^12.19.6", + "@wordpress/block-library": "^8.28.7", + "@wordpress/blocks": "^12.28.6", + "@wordpress/components": "^26.0.5", "@wordpress/compose": "^6.28.1", - "@wordpress/core-data": "^6.28.5", + "@wordpress/core-data": "^6.28.6", "@wordpress/data": "^9.21.1", "@wordpress/dom": "^3.51.1", "@wordpress/element": "^5.28.1", "@wordpress/hooks": "^3.51.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/icons": "^9.42.3", - "@wordpress/interface": "^5.28.4", + "@wordpress/icons": "^9.42.4", + "@wordpress/interface": "^5.28.5", "@wordpress/is-shallow-equal": "^4.51.1", "@wordpress/keyboard-shortcuts": "^4.28.1", "@wordpress/keycodes": "^3.51.1", - "@wordpress/media-utils": "^4.42.1", - "@wordpress/preferences": "^3.28.4", + "@wordpress/media-utils": "^4.42.2", + "@wordpress/preferences": "^3.28.5", "@wordpress/private-apis": "^0.33.1", - "@wordpress/widgets": "^3.28.5", + "@wordpress/widgets": "^3.28.6", "classnames": "^2.3.1", "fast-deep-equal": "^3.1.3" } @@ -38080,18 +38080,18 @@ } }, "@wordpress/dataviews": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/@wordpress/dataviews/-/dataviews-0.5.5.tgz", - "integrity": "sha512-m6d7z6HZIVDZk0CwNSMUqGOkoV4l+sJ8PVnlpXM0O4jHBxOhfOBjRH6A3OJSYLwMbFnTvvMyNDQju24W7cuEYQ==", + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/@wordpress/dataviews/-/dataviews-0.5.6.tgz", + "integrity": "sha512-vvMQv1OWXTNGbbeKf5BNooVM5YBER28Z5u2bhkhJ3XQCE64HbYlOq4vydc0xR9x+72DKDOKnev6eLET3QipPrA==", "requires": { "@ariakit/react": "^0.3.12", "@babel/runtime": "^7.16.0", "@wordpress/a11y": "^3.51.1", - "@wordpress/components": "^26.0.4", + "@wordpress/components": "^26.0.5", "@wordpress/compose": "^6.28.1", "@wordpress/element": "^5.28.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/icons": "^9.42.3", + "@wordpress/icons": "^9.42.4", "@wordpress/keycodes": "^3.51.1", "@wordpress/primitives": "^3.49.1", "@wordpress/private-apis": "^0.33.1", @@ -38210,91 +38210,91 @@ } }, "@wordpress/edit-post": { - "version": "7.28.5", - "resolved": "https://registry.npmjs.org/@wordpress/edit-post/-/edit-post-7.28.5.tgz", - "integrity": "sha512-m2WCPZ0LdXkdHvs9XJnhuD9+rXb2Ckc+ZMzodK6jPc472btFKvnULNKtW0wyqpBLmDUrlUgf8MpTkdhtsf26cg==", + "version": "7.28.7", + "resolved": "https://registry.npmjs.org/@wordpress/edit-post/-/edit-post-7.28.7.tgz", + "integrity": "sha512-Mo9p+8dTtv3OJl/II5kDQKP/LhIRuF4FVgciutBQ4kN3De59EP/CdNdNB4XZkGrK0qHQD8p7DC5Yy9/o/lmmPg==", "requires": { "@babel/runtime": "^7.16.0", "@wordpress/a11y": "^3.51.1", "@wordpress/api-fetch": "^6.48.1", - "@wordpress/block-editor": "^12.19.5", - "@wordpress/block-library": "^8.28.5", - "@wordpress/blocks": "^12.28.5", - "@wordpress/commands": "^0.22.4", - "@wordpress/components": "^26.0.4", + "@wordpress/block-editor": "^12.19.6", + "@wordpress/block-library": "^8.28.7", + "@wordpress/blocks": "^12.28.6", + "@wordpress/commands": "^0.22.5", + "@wordpress/components": "^26.0.5", "@wordpress/compose": "^6.28.1", - "@wordpress/core-commands": "^0.20.5", - "@wordpress/core-data": "^6.28.5", + "@wordpress/core-commands": "^0.20.6", + "@wordpress/core-data": "^6.28.6", "@wordpress/data": "^9.21.1", "@wordpress/deprecated": "^3.51.1", "@wordpress/dom": "^3.51.1", - "@wordpress/editor": "^13.28.5", + "@wordpress/editor": "^13.28.6", "@wordpress/element": "^5.28.1", "@wordpress/hooks": "^3.51.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/icons": "^9.42.3", - "@wordpress/interface": "^5.28.4", + "@wordpress/icons": "^9.42.4", + "@wordpress/interface": "^5.28.5", "@wordpress/keyboard-shortcuts": "^4.28.1", "@wordpress/keycodes": "^3.51.1", - "@wordpress/media-utils": "^4.42.1", + "@wordpress/media-utils": "^4.42.2", "@wordpress/notices": "^4.19.1", - "@wordpress/plugins": "^6.19.4", - "@wordpress/preferences": "^3.28.4", + "@wordpress/plugins": "^6.19.5", + "@wordpress/preferences": "^3.28.5", "@wordpress/private-apis": "^0.33.1", "@wordpress/url": "^3.52.1", "@wordpress/viewport": "^5.28.1", "@wordpress/warning": "^2.51.1", - "@wordpress/widgets": "^3.28.5", + "@wordpress/widgets": "^3.28.6", "classnames": "^2.3.1", "memize": "^2.1.0", "rememo": "^4.0.2" } }, "@wordpress/edit-site": { - "version": "5.28.5", - "resolved": "https://registry.npmjs.org/@wordpress/edit-site/-/edit-site-5.28.5.tgz", - "integrity": "sha512-b5QhF2qt5xHJa/UXp/KpOTlstTmMuUg3cXz6WIS59r5ZLtb4669c3mZOKcnhek3RFygXPWwa8a3fIzK08OY82w==", + "version": "5.28.7", + "resolved": "https://registry.npmjs.org/@wordpress/edit-site/-/edit-site-5.28.7.tgz", + "integrity": "sha512-0/e0v35oRWn28v3MamvBUfLkPNY0DU0IkJ8Sa0kIZke+3LHS2EcHYAIWukw2wSFYGIQI7rtjoItcCHaD3lg4DQ==", "requires": { "@babel/runtime": "^7.16.0", "@wordpress/a11y": "^3.51.1", "@wordpress/api-fetch": "^6.48.1", "@wordpress/blob": "^3.51.1", - "@wordpress/block-editor": "^12.19.5", - "@wordpress/block-library": "^8.28.5", - "@wordpress/blocks": "^12.28.5", - "@wordpress/commands": "^0.22.4", - "@wordpress/components": "^26.0.4", + "@wordpress/block-editor": "^12.19.6", + "@wordpress/block-library": "^8.28.7", + "@wordpress/blocks": "^12.28.6", + "@wordpress/commands": "^0.22.5", + "@wordpress/components": "^26.0.5", "@wordpress/compose": "^6.28.1", - "@wordpress/core-commands": "^0.20.5", - "@wordpress/core-data": "^6.28.5", + "@wordpress/core-commands": "^0.20.6", + "@wordpress/core-data": "^6.28.6", "@wordpress/data": "^9.21.1", - "@wordpress/dataviews": "^0.5.5", + "@wordpress/dataviews": "^0.5.6", "@wordpress/date": "^4.51.1", "@wordpress/deprecated": "^3.51.1", "@wordpress/dom": "^3.51.1", - "@wordpress/editor": "^13.28.5", + "@wordpress/editor": "^13.28.6", "@wordpress/element": "^5.28.1", "@wordpress/escape-html": "^2.51.1", "@wordpress/hooks": "^3.51.1", "@wordpress/html-entities": "^3.51.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/icons": "^9.42.3", - "@wordpress/interface": "^5.28.4", + "@wordpress/icons": "^9.42.4", + "@wordpress/interface": "^5.28.5", "@wordpress/keyboard-shortcuts": "^4.28.1", "@wordpress/keycodes": "^3.51.1", - "@wordpress/media-utils": "^4.42.1", + "@wordpress/media-utils": "^4.42.2", "@wordpress/notices": "^4.19.1", - "@wordpress/patterns": "^1.12.5", - "@wordpress/plugins": "^6.19.4", - "@wordpress/preferences": "^3.28.4", + "@wordpress/patterns": "^1.12.6", + "@wordpress/plugins": "^6.19.5", + "@wordpress/preferences": "^3.28.5", "@wordpress/primitives": "^3.49.1", "@wordpress/private-apis": "^0.33.1", - "@wordpress/reusable-blocks": "^4.28.5", + "@wordpress/reusable-blocks": "^4.28.6", "@wordpress/router": "^0.20.1", "@wordpress/style-engine": "^1.34.1", "@wordpress/url": "^3.52.1", "@wordpress/viewport": "^5.28.1", - "@wordpress/widgets": "^3.28.5", + "@wordpress/widgets": "^3.28.6", "@wordpress/wordcount": "^3.51.1", "change-case": "^4.1.2", "classnames": "^2.3.1", @@ -38309,56 +38309,56 @@ } }, "@wordpress/edit-widgets": { - "version": "5.28.5", - "resolved": "https://registry.npmjs.org/@wordpress/edit-widgets/-/edit-widgets-5.28.5.tgz", - "integrity": "sha512-9soQuWZBjlsKi32utsd4vn5G74a5isFY0wi/QTQnfYHpenmLYhZnl4obJ5tHMbWR35w6g6WHq72jZHZya7gITQ==", + "version": "5.28.7", + "resolved": "https://registry.npmjs.org/@wordpress/edit-widgets/-/edit-widgets-5.28.7.tgz", + "integrity": "sha512-n55mlfQ35Kevx3qJfHMPY9UrRLD93irI4ImBcLcs7ICAhZdIdmrWL9TZsCwXMJKLKPSCF/pnHaVJLEVv6IBoPw==", "requires": { "@babel/runtime": "^7.16.0", "@wordpress/api-fetch": "^6.48.1", - "@wordpress/block-editor": "^12.19.5", - "@wordpress/block-library": "^8.28.5", - "@wordpress/blocks": "^12.28.5", - "@wordpress/components": "^26.0.4", + "@wordpress/block-editor": "^12.19.6", + "@wordpress/block-library": "^8.28.7", + "@wordpress/blocks": "^12.28.6", + "@wordpress/components": "^26.0.5", "@wordpress/compose": "^6.28.1", - "@wordpress/core-data": "^6.28.5", + "@wordpress/core-data": "^6.28.6", "@wordpress/data": "^9.21.1", "@wordpress/deprecated": "^3.51.1", "@wordpress/dom": "^3.51.1", "@wordpress/element": "^5.28.1", "@wordpress/hooks": "^3.51.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/icons": "^9.42.3", - "@wordpress/interface": "^5.28.4", + "@wordpress/icons": "^9.42.4", + "@wordpress/interface": "^5.28.5", "@wordpress/keyboard-shortcuts": "^4.28.1", "@wordpress/keycodes": "^3.51.1", - "@wordpress/media-utils": "^4.42.1", + "@wordpress/media-utils": "^4.42.2", "@wordpress/notices": "^4.19.1", - "@wordpress/patterns": "^1.12.5", - "@wordpress/plugins": "^6.19.4", - "@wordpress/preferences": "^3.28.4", + "@wordpress/patterns": "^1.12.6", + "@wordpress/plugins": "^6.19.5", + "@wordpress/preferences": "^3.28.5", "@wordpress/private-apis": "^0.33.1", - "@wordpress/reusable-blocks": "^4.28.5", + "@wordpress/reusable-blocks": "^4.28.6", "@wordpress/url": "^3.52.1", - "@wordpress/widgets": "^3.28.5", + "@wordpress/widgets": "^3.28.6", "classnames": "^2.3.1", "rememo": "^4.0.2" } }, "@wordpress/editor": { - "version": "13.28.5", - "resolved": "https://registry.npmjs.org/@wordpress/editor/-/editor-13.28.5.tgz", - "integrity": "sha512-6Tnzz7iQSQWIJRXwXacwN0jouhqkAEvtdaAKslDFXoqT+z4jgjf6wGphPBgqUG6PPfp0BBUUNwXThBBcIwhNqA==", + "version": "13.28.6", + "resolved": "https://registry.npmjs.org/@wordpress/editor/-/editor-13.28.6.tgz", + "integrity": "sha512-Kvdr3QVywPUmkONoG890GotYVboR67J77XXNg4GRbHo+GaAOa0hZcIfrJg6yMcpVL3rzlFWaaZIMr3FBzPpPRQ==", "requires": { "@babel/runtime": "^7.16.0", "@wordpress/a11y": "^3.51.1", "@wordpress/api-fetch": "^6.48.1", "@wordpress/blob": "^3.51.1", - "@wordpress/block-editor": "^12.19.5", - "@wordpress/blocks": "^12.28.5", - "@wordpress/commands": "^0.22.4", - "@wordpress/components": "^26.0.4", + "@wordpress/block-editor": "^12.19.6", + "@wordpress/blocks": "^12.28.6", + "@wordpress/commands": "^0.22.5", + "@wordpress/components": "^26.0.5", "@wordpress/compose": "^6.28.1", - "@wordpress/core-data": "^6.28.5", + "@wordpress/core-data": "^6.28.6", "@wordpress/data": "^9.21.1", "@wordpress/date": "^4.51.1", "@wordpress/deprecated": "^3.51.1", @@ -38367,17 +38367,17 @@ "@wordpress/hooks": "^3.51.1", "@wordpress/html-entities": "^3.51.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/icons": "^9.42.3", + "@wordpress/icons": "^9.42.4", "@wordpress/keyboard-shortcuts": "^4.28.1", "@wordpress/keycodes": "^3.51.1", - "@wordpress/media-utils": "^4.42.1", + "@wordpress/media-utils": "^4.42.2", "@wordpress/notices": "^4.19.1", - "@wordpress/patterns": "^1.12.5", - "@wordpress/preferences": "^3.28.4", + "@wordpress/patterns": "^1.12.6", + "@wordpress/preferences": "^3.28.5", "@wordpress/private-apis": "^0.33.1", - "@wordpress/reusable-blocks": "^4.28.5", - "@wordpress/rich-text": "^6.28.3", - "@wordpress/server-side-render": "^4.28.5", + "@wordpress/reusable-blocks": "^4.28.6", + "@wordpress/rich-text": "^6.28.4", + "@wordpress/server-side-render": "^4.28.6", "@wordpress/url": "^3.52.1", "@wordpress/wordcount": "^3.51.1", "classnames": "^2.3.1", @@ -38448,22 +38448,22 @@ } }, "@wordpress/format-library": { - "version": "4.28.5", - "resolved": "https://registry.npmjs.org/@wordpress/format-library/-/format-library-4.28.5.tgz", - "integrity": "sha512-ndvea8gYEcdke8GKC3qHDpN46UcnBcf3y+nptiXUFBcHpPkU/mLuXbdb0mTbmItYTNXZrPtzVDNci2QNG+d6Dw==", + "version": "4.28.6", + "resolved": "https://registry.npmjs.org/@wordpress/format-library/-/format-library-4.28.6.tgz", + "integrity": "sha512-xx1lRaN7BHOWIQoxepCQF0EiJvmHBrZBS0fV3T1gC84Ur+k/NqLCcQVIqIGwMrjlbdq030dKFDo7t98fX0/qdA==", "requires": { "@babel/runtime": "^7.16.0", "@wordpress/a11y": "^3.51.1", - "@wordpress/block-editor": "^12.19.5", - "@wordpress/components": "^26.0.4", + "@wordpress/block-editor": "^12.19.6", + "@wordpress/components": "^26.0.5", "@wordpress/compose": "^6.28.1", "@wordpress/data": "^9.21.1", "@wordpress/element": "^5.28.1", "@wordpress/html-entities": "^3.51.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/icons": "^9.42.3", + "@wordpress/icons": "^9.42.4", "@wordpress/private-apis": "^0.33.1", - "@wordpress/rich-text": "^6.28.3", + "@wordpress/rich-text": "^6.28.4", "@wordpress/url": "^3.52.1" } }, @@ -38497,9 +38497,9 @@ } }, "@wordpress/icons": { - "version": "9.42.3", - "resolved": "https://registry.npmjs.org/@wordpress/icons/-/icons-9.42.3.tgz", - "integrity": "sha512-GSbBVXoLadzrdUXj7ahslEdaA3p/FqnQYDUOHM0Z5QTmTl77J7yJ4V6o+iMIOagoMaoe1hhDzDpj1FaU/CiPcg==", + "version": "9.42.4", + "resolved": "https://registry.npmjs.org/@wordpress/icons/-/icons-9.42.4.tgz", + "integrity": "sha512-n7b82iMdCoO6Y2xdjtyxBZPeSf1NwbPTEmjHVqxkZX5xpuirv7Fps5NWXJBlFOIvOW3C/MI2Smca9aOppaqR8g==", "requires": { "@babel/runtime": "^7.16.0", "@wordpress/element": "^5.28.1", @@ -38507,9 +38507,9 @@ } }, "@wordpress/interactivity": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/@wordpress/interactivity/-/interactivity-5.0.3.tgz", - "integrity": "sha512-oSJ8Z725c0caYcxlwrDNpnTluYbdDLPjsUIE1avr9g2Ul9KTiRnZ/k+FIjGsJvnXssEEOAvxGS8KPEXH/E4cVA==", + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/@wordpress/interactivity/-/interactivity-5.0.4.tgz", + "integrity": "sha512-raeGdy3x1ntmjyJDOwMYBn5kdkd0D/u6JMVpkbr4dHIwppiFcuPDNPIyh02ajiUffRA3v3osyV3cWgxM0EPfog==", "requires": { "@preact/signals": "^1.2.2", "deepsignal": "^1.4.0", @@ -38517,29 +38517,29 @@ } }, "@wordpress/interactivity-router": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@wordpress/interactivity-router/-/interactivity-router-1.1.3.tgz", - "integrity": "sha512-p6r6WalHukPi7pEjXJnsjghCCR9vuuE28l24vKU5MzUimVvU4Cl9Pykncpuyjt312azkQLEKRroAGPmEvoxVXg==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@wordpress/interactivity-router/-/interactivity-router-1.1.4.tgz", + "integrity": "sha512-H4ImDuCb5ktnEF9e3UsmCxVGP90PGfft3FWlv07XSBoa9xMScDQhH00IZwyW7UVYvAwirBGL8woZaBEDPuEmZA==", "requires": { - "@wordpress/interactivity": "^5.0.3" + "@wordpress/interactivity": "^5.0.4" } }, "@wordpress/interface": { - "version": "5.28.4", - "resolved": "https://registry.npmjs.org/@wordpress/interface/-/interface-5.28.4.tgz", - "integrity": "sha512-lRxvjTOoTP97hzZpk1znHCOxbtVYlMiHQ3FlNwN7DmcHWP+DXY+xpo8bM6OLIkqOa7FtHwT8RgT7OEzLhyli/w==", + "version": "5.28.5", + "resolved": "https://registry.npmjs.org/@wordpress/interface/-/interface-5.28.5.tgz", + "integrity": "sha512-ONQE4Zp0/zn7hGasB3zWygSEL8yXNjEbHyUhZ2wHhaF9kttDscfMNxomoyUD0a79IS7UhHRrje17yv/iJmQxsw==", "requires": { "@babel/runtime": "^7.16.0", "@wordpress/a11y": "^3.51.1", - "@wordpress/components": "^26.0.4", + "@wordpress/components": "^26.0.5", "@wordpress/compose": "^6.28.1", "@wordpress/data": "^9.21.1", "@wordpress/deprecated": "^3.51.1", "@wordpress/element": "^5.28.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/icons": "^9.42.3", - "@wordpress/plugins": "^6.19.4", - "@wordpress/preferences": "^3.28.4", + "@wordpress/icons": "^9.42.4", + "@wordpress/plugins": "^6.19.5", + "@wordpress/preferences": "^3.28.5", "@wordpress/private-apis": "^0.33.1", "@wordpress/viewport": "^5.28.1", "classnames": "^2.3.1" @@ -38595,14 +38595,14 @@ } }, "@wordpress/list-reusable-blocks": { - "version": "4.28.4", - "resolved": "https://registry.npmjs.org/@wordpress/list-reusable-blocks/-/list-reusable-blocks-4.28.4.tgz", - "integrity": "sha512-DBUo3h0xkXSuXOqv3LTeEp9YCRyxXEqrkvYkU0M0k4WiSVcnxyH4YFWI/9tPIy096eVROjn3QfjW4OIOHv9WRQ==", + "version": "4.28.5", + "resolved": "https://registry.npmjs.org/@wordpress/list-reusable-blocks/-/list-reusable-blocks-4.28.5.tgz", + "integrity": "sha512-ayTeye3Aj4Vz/b3alluxFMr6mN+1MTFvDDP72eieetnxXSNCXsz4N7bVu2XyIxuOq3V8le4vCJmx6nDWLcL1TQ==", "requires": { "@babel/runtime": "^7.16.0", "@wordpress/api-fetch": "^6.48.1", "@wordpress/blob": "^3.51.1", - "@wordpress/components": "^26.0.4", + "@wordpress/components": "^26.0.5", "@wordpress/compose": "^6.28.1", "@wordpress/element": "^5.28.1", "@wordpress/i18n": "^4.51.1", @@ -38610,9 +38610,9 @@ } }, "@wordpress/media-utils": { - "version": "4.42.1", - "resolved": "https://registry.npmjs.org/@wordpress/media-utils/-/media-utils-4.42.1.tgz", - "integrity": "sha512-L9JEBSydd516PiQ2bwYEzJhkwfV9vyfnOs2lSYkYYqBe1H/1HPNpqUNBw9LtaaoGGk5gIjN2qTaZQJtNwXJCFg==", + "version": "4.42.2", + "resolved": "https://registry.npmjs.org/@wordpress/media-utils/-/media-utils-4.42.2.tgz", + "integrity": "sha512-AVeQb/1nVWA/09+o353HDJnMNFe7q7+sEYNYdOg5cXGcq1DD0tlmJihJIFutqkR5r9a5fD4WMfWUGVehDj3l3g==", "requires": { "@babel/runtime": "^7.16.0", "@wordpress/api-fetch": "^6.48.1", @@ -38638,54 +38638,54 @@ "dev": true }, "@wordpress/nux": { - "version": "8.13.4", - "resolved": "https://registry.npmjs.org/@wordpress/nux/-/nux-8.13.4.tgz", - "integrity": "sha512-9d1Lid+TOifgyomtj6d7ZNFsBvNVrZqghB36x8n4qSnsb0OGaWMCPGfIZu3ONrKRnNHNimFr43VAEPWwouOPJA==", + "version": "8.13.5", + "resolved": "https://registry.npmjs.org/@wordpress/nux/-/nux-8.13.5.tgz", + "integrity": "sha512-VTjoKAXzIzu8SIQWbTXuWRa68tZvR5j4hJmYVl5dI0eSQEpV6Cen2T/NdEmj+T3u+yMgBRzd6bhhrv+/6yCaNg==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/components": "^26.0.4", + "@wordpress/components": "^26.0.5", "@wordpress/compose": "^6.28.1", "@wordpress/data": "^9.21.1", "@wordpress/deprecated": "^3.51.1", "@wordpress/element": "^5.28.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/icons": "^9.42.3", + "@wordpress/icons": "^9.42.4", "rememo": "^4.0.2" } }, "@wordpress/patterns": { - "version": "1.12.5", - "resolved": "https://registry.npmjs.org/@wordpress/patterns/-/patterns-1.12.5.tgz", - "integrity": "sha512-ylke7nIGzo1c6xCoUrfV58qnfyl/U9Fn3VVjFbhFRI3Fz75nxcQ9PQWnORDrm/laEaGmtYsW81grec/ddv3vWg==", + "version": "1.12.6", + "resolved": "https://registry.npmjs.org/@wordpress/patterns/-/patterns-1.12.6.tgz", + "integrity": "sha512-xPx1+oxVD+n2/LPkqbnbSCvyzq0VCPfZxmWEq/EuOo6FenOPFpQPKAvnaP4QmGpS4QBg4a79eAbHs47MnjOZUQ==", "requires": { "@babel/runtime": "^7.16.0", "@wordpress/a11y": "^3.51.1", - "@wordpress/block-editor": "^12.19.5", - "@wordpress/blocks": "^12.28.5", - "@wordpress/components": "^26.0.4", + "@wordpress/block-editor": "^12.19.6", + "@wordpress/blocks": "^12.28.6", + "@wordpress/components": "^26.0.5", "@wordpress/compose": "^6.28.1", - "@wordpress/core-data": "^6.28.5", + "@wordpress/core-data": "^6.28.6", "@wordpress/data": "^9.21.1", "@wordpress/element": "^5.28.1", "@wordpress/html-entities": "^3.51.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/icons": "^9.42.3", + "@wordpress/icons": "^9.42.4", "@wordpress/notices": "^4.19.1", "@wordpress/private-apis": "^0.33.1", "@wordpress/url": "^3.52.1" } }, "@wordpress/plugins": { - "version": "6.19.4", - "resolved": "https://registry.npmjs.org/@wordpress/plugins/-/plugins-6.19.4.tgz", - "integrity": "sha512-ID0et2/LZbtR/ODQK/nxt7ndQmVXTuPt6azbqaykm5nQyMpbY8u0c/mneuvYmmyGWAbUrJ51G1XD3cGyXxsgjg==", + "version": "6.19.5", + "resolved": "https://registry.npmjs.org/@wordpress/plugins/-/plugins-6.19.5.tgz", + "integrity": "sha512-n00FgZ33lEBIy4ztkpDhgiYOM7NLwrkEIbhySZg+ahWbv52nw8+qln4G0r3fDe+UvslqNV34SdwiZ1OGHQ/Ylg==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/components": "^26.0.4", + "@wordpress/components": "^26.0.5", "@wordpress/compose": "^6.28.1", "@wordpress/element": "^5.28.1", "@wordpress/hooks": "^3.51.1", - "@wordpress/icons": "^9.42.3", + "@wordpress/icons": "^9.42.4", "@wordpress/is-shallow-equal": "^4.51.1", "memize": "^2.0.1" } @@ -38701,19 +38701,19 @@ } }, "@wordpress/preferences": { - "version": "3.28.4", - "resolved": "https://registry.npmjs.org/@wordpress/preferences/-/preferences-3.28.4.tgz", - "integrity": "sha512-Kcbbj0H38h4qlqjcs4g1EGPUKeNAvXkmU/BzgDkJZPBoIud0SdXT7Tj9hnwNSuR+7CfL7/3aoELSrp98L5uWow==", + "version": "3.28.5", + "resolved": "https://registry.npmjs.org/@wordpress/preferences/-/preferences-3.28.5.tgz", + "integrity": "sha512-XpLsgrkdpi+Wp0ZrJZsH44AG3BRvZX00myr0AV3s2Alo34eg+MaBmSW1WyLQCjOcSqWHqsbVhkt546k4/EfCyA==", "requires": { "@babel/runtime": "^7.16.0", "@wordpress/a11y": "^3.51.1", - "@wordpress/components": "^26.0.4", + "@wordpress/components": "^26.0.5", "@wordpress/compose": "^6.28.1", "@wordpress/data": "^9.21.1", "@wordpress/deprecated": "^3.51.1", "@wordpress/element": "^5.28.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/icons": "^9.42.3", + "@wordpress/icons": "^9.42.4", "@wordpress/private-apis": "^0.33.1", "classnames": "^2.3.1" } @@ -38772,28 +38772,28 @@ } }, "@wordpress/reusable-blocks": { - "version": "4.28.5", - "resolved": "https://registry.npmjs.org/@wordpress/reusable-blocks/-/reusable-blocks-4.28.5.tgz", - "integrity": "sha512-lgc2nl5LZ+b24HuuN6v753s4qo9DY3Aho9l7qtefyDxXB2YLM5T1ub6RCleRWMG70cuU0m55304s5hP+1+jaqg==", + "version": "4.28.6", + "resolved": "https://registry.npmjs.org/@wordpress/reusable-blocks/-/reusable-blocks-4.28.6.tgz", + "integrity": "sha512-mYyjU/PSME9HMFItQdQ5/9cL7pcdQvpxSyDspbXBo9OmI7BWD9XeQ8gLuYvrcHp6mbX3U1M3QTeb8/Qz3v5FRg==", "requires": { "@babel/runtime": "^7.16.0", - "@wordpress/block-editor": "^12.19.5", - "@wordpress/blocks": "^12.28.5", - "@wordpress/components": "^26.0.4", - "@wordpress/core-data": "^6.28.5", + "@wordpress/block-editor": "^12.19.6", + "@wordpress/blocks": "^12.28.6", + "@wordpress/components": "^26.0.5", + "@wordpress/core-data": "^6.28.6", "@wordpress/data": "^9.21.1", "@wordpress/element": "^5.28.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/icons": "^9.42.3", + "@wordpress/icons": "^9.42.4", "@wordpress/notices": "^4.19.1", "@wordpress/private-apis": "^0.33.1", "@wordpress/url": "^3.52.1" } }, "@wordpress/rich-text": { - "version": "6.28.3", - "resolved": "https://registry.npmjs.org/@wordpress/rich-text/-/rich-text-6.28.3.tgz", - "integrity": "sha512-SOPcn8lpLQEFF/HLI+w7HzuByIX/8/c9nyLMgYntj/Vk64izI4HYnQP6ftTtu/a12S8/C1cXhpH2ZfFNz6jItA==", + "version": "6.28.4", + "resolved": "https://registry.npmjs.org/@wordpress/rich-text/-/rich-text-6.28.4.tgz", + "integrity": "sha512-RekQVvA3YFKAe6hPnMNZsE8Er9aFG0gdvnhRK7QnmUcNIk3EOx1KEbcx3SI1+B8+im5mviW31kFGBMzMNRFQMw==", "requires": { "@babel/runtime": "^7.16.0", "@wordpress/a11y": "^3.51.1", @@ -38821,9 +38821,9 @@ } }, "@wordpress/scripts": { - "version": "27.2.4", - "resolved": "https://registry.npmjs.org/@wordpress/scripts/-/scripts-27.2.4.tgz", - "integrity": "sha512-wBEr13XDVwMP1PTwS4IrVYX+46B0EmDsIryUClykbr6XPw1CtIygz08e8sOeWYBgsuW5DQwx30T/9ifwKCRimw==", + "version": "27.2.5", + "resolved": "https://registry.npmjs.org/@wordpress/scripts/-/scripts-27.2.5.tgz", + "integrity": "sha512-XWxAa4mfWXpQb9G1vLiprCn9YaIXR69YKpS5VgUhCYqmRZFKXPhzMeBslpsbRhgx3Tiiz3depv1qtOOdVAQOog==", "dev": true, "requires": { "@babel/core": "^7.16.0", @@ -38836,7 +38836,7 @@ "@wordpress/eslint-plugin": "^17.8.1", "@wordpress/jest-preset-default": "^11.22.1", "@wordpress/npm-package-json-lint-config": "^4.36.1", - "@wordpress/postcss-plugins-preset": "^4.35.4", + "@wordpress/postcss-plugins-preset": "^4.35.5", "@wordpress/prettier-config": "^3.8.1", "@wordpress/stylelint-config": "^21.34.1", "adm-zip": "^0.5.9", @@ -39111,14 +39111,14 @@ } }, "@wordpress/server-side-render": { - "version": "4.28.5", - "resolved": "https://registry.npmjs.org/@wordpress/server-side-render/-/server-side-render-4.28.5.tgz", - "integrity": "sha512-/o2Pdzl4Zz8E/V0efo0/v8jP5Pe9dR28QYEzWopHZPpKHeLtSrrqdrnZRddbf3fnmis1+y56h6+eaW+YUTMlQA==", + "version": "4.28.6", + "resolved": "https://registry.npmjs.org/@wordpress/server-side-render/-/server-side-render-4.28.6.tgz", + "integrity": "sha512-l9b4yImMNuivHRv+mGTgBAtqZlJ7i9CuilX5ItQxsDskggcUjo/GgZuOq491uFyNi7IwhVoONtPqFkGh903HHQ==", "requires": { "@babel/runtime": "^7.16.0", "@wordpress/api-fetch": "^6.48.1", - "@wordpress/blocks": "^12.28.5", - "@wordpress/components": "^26.0.4", + "@wordpress/blocks": "^12.28.6", + "@wordpress/components": "^26.0.5", "@wordpress/compose": "^6.28.1", "@wordpress/data": "^9.21.1", "@wordpress/deprecated": "^3.51.1", @@ -39216,21 +39216,21 @@ "integrity": "sha512-De1ftiM7vdlE6evA+d/jv2wES9wXdvbck4fKi7qr7ckDzWjqGg7nV8A3OzGInWiAn9qTQZucCOUwzUvlWedpTQ==" }, "@wordpress/widgets": { - "version": "3.28.5", - "resolved": "https://registry.npmjs.org/@wordpress/widgets/-/widgets-3.28.5.tgz", - "integrity": "sha512-9BoNxIzZGyx2390rZA5Bs0WGZOA0ymwsD5erQ5GYOqj8z+1UTe94WPQne+DhHmYB7rPjOh1zV8xJet2aRhVCUg==", + "version": "3.28.6", + "resolved": "https://registry.npmjs.org/@wordpress/widgets/-/widgets-3.28.6.tgz", + "integrity": "sha512-69TcSveasenFSXzUmS5zU9TE9tgt8YlfONgqso7NkaBv5Gkj8c3BIHhyKqbysH1a4MxkTVd1pFqkJA321IfPrg==", "requires": { "@babel/runtime": "^7.16.0", "@wordpress/api-fetch": "^6.48.1", - "@wordpress/block-editor": "^12.19.5", - "@wordpress/blocks": "^12.28.5", - "@wordpress/components": "^26.0.4", + "@wordpress/block-editor": "^12.19.6", + "@wordpress/blocks": "^12.28.6", + "@wordpress/components": "^26.0.5", "@wordpress/compose": "^6.28.1", - "@wordpress/core-data": "^6.28.5", + "@wordpress/core-data": "^6.28.6", "@wordpress/data": "^9.21.1", "@wordpress/element": "^5.28.1", "@wordpress/i18n": "^4.51.1", - "@wordpress/icons": "^9.42.3", + "@wordpress/icons": "^9.42.4", "@wordpress/notices": "^4.19.1", "classnames": "^2.3.1" } diff --git a/package.json b/package.json index a7d1cfa067c21..fa8c0aaa952dc 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "@wordpress/e2e-test-utils": "10.22.1", "@wordpress/e2e-test-utils-playwright": "0.19.2", "@wordpress/prettier-config": "3.8.1", - "@wordpress/scripts": "27.2.4", + "@wordpress/scripts": "27.2.5", "autoprefixer": "10.4.17", "chalk": "5.3.0", "check-node-version": "4.2.1", @@ -79,61 +79,61 @@ }, "dependencies": { "@wordpress/a11y": "3.51.1", - "@wordpress/annotations": "2.51.3", + "@wordpress/annotations": "2.51.4", "@wordpress/api-fetch": "6.48.1", "@wordpress/autop": "3.51.1", "@wordpress/blob": "3.51.1", - "@wordpress/block-directory": "4.28.5", - "@wordpress/block-editor": "12.19.5", - "@wordpress/block-library": "8.28.5", + "@wordpress/block-directory": "4.28.7", + "@wordpress/block-editor": "12.19.6", + "@wordpress/block-library": "8.28.7", "@wordpress/block-serialization-default-parser": "4.51.1", - "@wordpress/blocks": "12.28.5", - "@wordpress/commands": "0.22.4", - "@wordpress/components": "26.0.4", + "@wordpress/blocks": "12.28.6", + "@wordpress/commands": "0.22.5", + "@wordpress/components": "26.0.5", "@wordpress/compose": "6.28.1", - "@wordpress/core-commands": "0.20.5", - "@wordpress/core-data": "6.28.5", - "@wordpress/customize-widgets": "4.28.5", + "@wordpress/core-commands": "0.20.6", + "@wordpress/core-data": "6.28.6", + "@wordpress/customize-widgets": "4.28.7", "@wordpress/data": "9.21.1", "@wordpress/data-controls": "3.20.1", - "@wordpress/dataviews": "0.5.5", + "@wordpress/dataviews": "0.5.6", "@wordpress/date": "4.51.1", "@wordpress/deprecated": "3.51.1", "@wordpress/dom": "3.51.1", "@wordpress/dom-ready": "3.51.1", - "@wordpress/edit-post": "7.28.5", - "@wordpress/edit-site": "5.28.5", - "@wordpress/edit-widgets": "5.28.5", - "@wordpress/editor": "13.28.5", + "@wordpress/edit-post": "7.28.7", + "@wordpress/edit-site": "5.28.7", + "@wordpress/edit-widgets": "5.28.7", + "@wordpress/editor": "13.28.6", "@wordpress/element": "5.28.1", "@wordpress/escape-html": "2.51.1", - "@wordpress/format-library": "4.28.5", + "@wordpress/format-library": "4.28.6", "@wordpress/hooks": "3.51.1", "@wordpress/html-entities": "3.51.1", "@wordpress/i18n": "4.51.1", - "@wordpress/icons": "9.42.3", - "@wordpress/interactivity": "5.0.3", - "@wordpress/interactivity-router": "1.1.3", - "@wordpress/interface": "5.28.4", + "@wordpress/icons": "9.42.4", + "@wordpress/interactivity": "5.0.4", + "@wordpress/interactivity-router": "1.1.4", + "@wordpress/interface": "5.28.5", "@wordpress/is-shallow-equal": "4.51.1", "@wordpress/keyboard-shortcuts": "4.28.1", "@wordpress/keycodes": "3.51.1", - "@wordpress/list-reusable-blocks": "4.28.4", - "@wordpress/media-utils": "4.42.1", + "@wordpress/list-reusable-blocks": "4.28.5", + "@wordpress/media-utils": "4.42.2", "@wordpress/notices": "4.19.1", - "@wordpress/nux": "8.13.4", - "@wordpress/patterns": "1.12.5", - "@wordpress/plugins": "6.19.4", - "@wordpress/preferences": "3.28.4", + "@wordpress/nux": "8.13.5", + "@wordpress/patterns": "1.12.6", + "@wordpress/plugins": "6.19.5", + "@wordpress/preferences": "3.28.5", "@wordpress/preferences-persistence": "1.43.1", "@wordpress/primitives": "3.49.1", "@wordpress/priority-queue": "2.51.1", "@wordpress/private-apis": "0.33.1", "@wordpress/redux-routine": "4.51.1", - "@wordpress/reusable-blocks": "4.28.5", - "@wordpress/rich-text": "6.28.3", + "@wordpress/reusable-blocks": "4.28.6", + "@wordpress/rich-text": "6.28.4", "@wordpress/router": "0.20.1", - "@wordpress/server-side-render": "4.28.5", + "@wordpress/server-side-render": "4.28.6", "@wordpress/shortcode": "3.51.1", "@wordpress/style-engine": "1.34.1", "@wordpress/sync": "0.13.1", @@ -142,7 +142,7 @@ "@wordpress/url": "3.52.1", "@wordpress/viewport": "5.28.1", "@wordpress/warning": "2.51.1", - "@wordpress/widgets": "3.28.5", + "@wordpress/widgets": "3.28.6", "@wordpress/wordcount": "3.51.1", "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 12eaa14209f2c..726ef31814fda 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' => 'd90eebea464f6c09bfd5'), 'annotations.min.js' => array('dependencies' => array('wp-data', 'wp-hooks', 'wp-i18n', 'wp-polyfill', 'wp-rich-text'), 'version' => 'ffc4fc3374b0ab000805'), 'api-fetch.min.js' => array('dependencies' => array('wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '4c185334c5ec26e149cc'), 'autop.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '9fb50649848277dd318d'), 'blob.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '9113eed771d446f4a556'), 'block-directory.min.js' => array('dependencies' => array('react', '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-private-apis', 'wp-url'), 'version' => '9159053f41b8ec09d91b'), '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-style-engine', 'wp-token-list', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => 'd79cf6f16a85cb5fe472'), 'block-library.min.js' => array('dependencies' => array('react', '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-patterns', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-viewport', 'wp-wordcount'), 'version' => '537881dde4f32fef9523'), 'block-serialization-default-parser.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '14d44daebf663d05d330'), 'blocks.min.js' => array('dependencies' => array('react', '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-rich-text', 'wp-shortcode'), 'version' => '6612d078dfaf28b875b8'), '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' => 'e4060e55811e7824feb9'), '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' => 'c3a06857b0e51f435ccb'), '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' => '1339d3318cd44440dccb'), 'core-commands.min.js' => array('dependencies' => array('react', 'wp-commands', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-router', 'wp-url'), 'version' => '4ee9c423b71a59459ca6'), 'core-data.min.js' => array('dependencies' => array('react', '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-rich-text', 'wp-url'), 'version' => 'ff4b03fefe97d027b7fd'), 'customize-widgets.min.js' => array('dependencies' => array('react', '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' => '137692724827d41c9fb5'), 'data.min.js' => array('dependencies' => array('react', 'wp-compose', 'wp-deprecated', 'wp-element', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-priority-queue', 'wp-private-apis', 'wp-redux-routine'), 'version' => 'e6595ba1a7cd34429f66'), 'data-controls.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-data', 'wp-deprecated', 'wp-polyfill'), 'version' => '49f5587e8b90f9e7cc7e'), 'date.min.js' => array('dependencies' => array('moment', 'wp-deprecated', 'wp-polyfill'), 'version' => 'aaca6387d1cf924acc51'), 'deprecated.min.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => 'e1f84915c5e8ae38964c'), 'dom.min.js' => array('dependencies' => array('wp-deprecated', 'wp-polyfill'), 'version' => '4ecffbffba91b10c5c7a'), 'dom-ready.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'f77871ff7694fffea381'), 'edit-post.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-deprecated', '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' => '9728aeb8975647a9dabf'), 'edit-site.min.js' => array('dependencies' => array('react', 'react-dom', 'wp-a11y', 'wp-api-fetch', 'wp-blob', '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' => 'eeffba7b31470e6821e0'), 'edit-widgets.min.js' => array('dependencies' => array('react', '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' => '96a3b30b85133de96871'), 'editor.min.js' => array('dependencies' => array('react', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-commands', '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' => '3be80be0002f234e6815'), 'element.min.js' => array('dependencies' => array('react', 'react-dom', 'wp-escape-html', 'wp-polyfill'), 'version' => 'cb762d190aebbec25b27'), 'escape-html.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '6561a406d2d232a6fbd2'), 'format-library.min.js' => array('dependencies' => array('react', 'wp-a11y', 'wp-block-editor', 'wp-components', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-url'), 'version' => 'b82e922db010c201ba06'), 'hooks.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '2810c76e705dd1a53b18'), 'html-entities.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '2cd3358363e0675638fb'), 'i18n.min.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => '5e580eb46a90c2b997e6'), 'is-shallow-equal.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'e0f9f1d78d83f5196979'), 'keyboard-shortcuts.min.js' => array('dependencies' => array('react', 'wp-data', 'wp-element', 'wp-keycodes', 'wp-polyfill'), 'version' => '4d239ebc17efd846a168'), 'keycodes.min.js' => array('dependencies' => array('wp-i18n', 'wp-polyfill'), 'version' => '034ff647a54b018581d3'), 'list-reusable-blocks.min.js' => array('dependencies' => array('react', 'wp-api-fetch', 'wp-blob', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => 'b9d73b532124daefd2c7'), 'media-utils.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-blob', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '03fbd6c4f505a9385efe'), 'notices.min.js' => array('dependencies' => array('wp-data', 'wp-polyfill'), 'version' => '673a68a7ac2f556ed50b'), 'nux.min.js' => array('dependencies' => array('react', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => '46c93a71c3e2c2bf37f0'), 'patterns.min.js' => array('dependencies' => array('react', 'wp-a11y', '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' => '4221a93ac188f94e7aa4'), 'plugins.min.js' => array('dependencies' => array('react', 'wp-compose', 'wp-element', 'wp-hooks', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-primitives'), 'version' => '2d369cbfdcb887111e06'), 'preferences.min.js' => array('dependencies' => array('react', 'wp-a11y', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-private-apis'), 'version' => 'e1544c6f06a9639c4c31'), 'preferences-persistence.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-polyfill'), 'version' => '3f5184d775ed9dfb154f'), 'primitives.min.js' => array('dependencies' => array('wp-element', 'wp-polyfill'), 'version' => 'a41bfd5835f583ae838a'), 'priority-queue.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '9c21c957c7e50ffdbf48'), 'private-apis.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '5e7fdf55d04b8c2aadef'), 'redux-routine.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'b14553dce2bee5c0f064'), 'reusable-blocks.min.js' => array('dependencies' => array('react', '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' => '008366ba172a4f4b92b4'), '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' => 'a9c78250b12a043d4a04'), 'router.min.js' => array('dependencies' => array('react', 'wp-element', 'wp-polyfill', 'wp-private-apis', 'wp-url'), 'version' => '92fd517f31b92695552a'), 'server-side-render.min.js' => array('dependencies' => array('react', 'wp-api-fetch', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '04ce502cc4eef9b49ce7'), 'shortcode.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'b7747eee0efafd2f0c3b'), 'style-engine.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '03f13c515060de24b556'), 'token-list.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '05f8a6df6258f0081718'), 'undo-manager.min.js' => array('dependencies' => array('wp-is-shallow-equal', 'wp-polyfill'), 'version' => 'f0698003cb0f0a7bd794'), 'url.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '421139b01f33e5b327d8'), 'viewport.min.js' => array('dependencies' => array('react', 'wp-compose', 'wp-data', 'wp-polyfill'), 'version' => 'e555fda1d93ecf1fb1e0'), 'warning.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'ed7c8b0940914f4fe44b'), 'widgets.min.js' => array('dependencies' => array('react', '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' => '4c7bfc488be9e26d6488'), 'wordcount.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '55d8c2bf3dc99e7ea5ec')); + array('dependencies' => array('wp-dom-ready', 'wp-i18n', 'wp-polyfill'), 'version' => 'd90eebea464f6c09bfd5'), 'annotations.min.js' => array('dependencies' => array('wp-data', 'wp-hooks', 'wp-i18n', 'wp-polyfill', 'wp-rich-text'), 'version' => 'ffc4fc3374b0ab000805'), 'api-fetch.min.js' => array('dependencies' => array('wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '4c185334c5ec26e149cc'), 'autop.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '9fb50649848277dd318d'), 'blob.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '9113eed771d446f4a556'), 'block-directory.min.js' => array('dependencies' => array('react', '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-private-apis', 'wp-url'), 'version' => '9159053f41b8ec09d91b'), '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-style-engine', 'wp-token-list', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => '46cac8a461ade155cdf8'), 'block-library.min.js' => array('dependencies' => array('react', '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-patterns', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-viewport', 'wp-wordcount'), 'version' => '84d52d1d704b02ceb951'), 'block-serialization-default-parser.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '14d44daebf663d05d330'), 'blocks.min.js' => array('dependencies' => array('react', '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-rich-text', 'wp-shortcode'), 'version' => '6612d078dfaf28b875b8'), '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' => 'e4060e55811e7824feb9'), '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' => 'c3a06857b0e51f435ccb'), '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' => '1339d3318cd44440dccb'), 'core-commands.min.js' => array('dependencies' => array('react', 'wp-commands', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-router', 'wp-url'), 'version' => '4ee9c423b71a59459ca6'), 'core-data.min.js' => array('dependencies' => array('react', '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-rich-text', 'wp-url'), 'version' => 'ff4b03fefe97d027b7fd'), 'customize-widgets.min.js' => array('dependencies' => array('react', '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' => '137692724827d41c9fb5'), 'data.min.js' => array('dependencies' => array('react', 'wp-compose', 'wp-deprecated', 'wp-element', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-priority-queue', 'wp-private-apis', 'wp-redux-routine'), 'version' => 'e6595ba1a7cd34429f66'), 'data-controls.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-data', 'wp-deprecated', 'wp-polyfill'), 'version' => '49f5587e8b90f9e7cc7e'), 'date.min.js' => array('dependencies' => array('moment', 'wp-deprecated', 'wp-polyfill'), 'version' => 'aaca6387d1cf924acc51'), 'deprecated.min.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => 'e1f84915c5e8ae38964c'), 'dom.min.js' => array('dependencies' => array('wp-deprecated', 'wp-polyfill'), 'version' => '4ecffbffba91b10c5c7a'), 'dom-ready.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'f77871ff7694fffea381'), 'edit-post.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-deprecated', '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' => '82b743695f8ef1673753'), 'edit-site.min.js' => array('dependencies' => array('react', 'react-dom', 'wp-a11y', 'wp-api-fetch', 'wp-blob', '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' => '96b528d47ee15a45f154'), 'edit-widgets.min.js' => array('dependencies' => array('react', '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' => '96a3b30b85133de96871'), 'editor.min.js' => array('dependencies' => array('react', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-commands', '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' => 'd4537187f01a11a554a1'), 'element.min.js' => array('dependencies' => array('react', 'react-dom', 'wp-escape-html', 'wp-polyfill'), 'version' => 'cb762d190aebbec25b27'), 'escape-html.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '6561a406d2d232a6fbd2'), 'format-library.min.js' => array('dependencies' => array('react', 'wp-a11y', 'wp-block-editor', 'wp-components', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-url'), 'version' => '66ea4e17a9a3f539c9d5'), 'hooks.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '2810c76e705dd1a53b18'), 'html-entities.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '2cd3358363e0675638fb'), 'i18n.min.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => '5e580eb46a90c2b997e6'), 'is-shallow-equal.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'e0f9f1d78d83f5196979'), 'keyboard-shortcuts.min.js' => array('dependencies' => array('react', 'wp-data', 'wp-element', 'wp-keycodes', 'wp-polyfill'), 'version' => '4d239ebc17efd846a168'), 'keycodes.min.js' => array('dependencies' => array('wp-i18n', 'wp-polyfill'), 'version' => '034ff647a54b018581d3'), 'list-reusable-blocks.min.js' => array('dependencies' => array('react', 'wp-api-fetch', 'wp-blob', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => 'b9d73b532124daefd2c7'), 'media-utils.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-blob', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '1cf582d3c080c8694c8c'), 'notices.min.js' => array('dependencies' => array('wp-data', 'wp-polyfill'), 'version' => '673a68a7ac2f556ed50b'), 'nux.min.js' => array('dependencies' => array('react', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => '46c93a71c3e2c2bf37f0'), 'patterns.min.js' => array('dependencies' => array('react', 'wp-a11y', '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' => 'ee72aaa0806b06909b48'), 'plugins.min.js' => array('dependencies' => array('react', 'wp-compose', 'wp-element', 'wp-hooks', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-primitives'), 'version' => '2d369cbfdcb887111e06'), 'preferences.min.js' => array('dependencies' => array('react', 'wp-a11y', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-private-apis'), 'version' => 'e1544c6f06a9639c4c31'), 'preferences-persistence.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-polyfill'), 'version' => '3f5184d775ed9dfb154f'), 'primitives.min.js' => array('dependencies' => array('wp-element', 'wp-polyfill'), 'version' => 'a41bfd5835f583ae838a'), 'priority-queue.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '9c21c957c7e50ffdbf48'), 'private-apis.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '5e7fdf55d04b8c2aadef'), 'redux-routine.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'b14553dce2bee5c0f064'), 'reusable-blocks.min.js' => array('dependencies' => array('react', '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' => '008366ba172a4f4b92b4'), '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' => 'dd125966cf6cc0394ae0'), 'router.min.js' => array('dependencies' => array('react', 'wp-element', 'wp-polyfill', 'wp-private-apis', 'wp-url'), 'version' => '92fd517f31b92695552a'), 'server-side-render.min.js' => array('dependencies' => array('react', 'wp-api-fetch', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '04ce502cc4eef9b49ce7'), 'shortcode.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'b7747eee0efafd2f0c3b'), 'style-engine.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '03f13c515060de24b556'), 'token-list.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '05f8a6df6258f0081718'), 'undo-manager.min.js' => array('dependencies' => array('wp-is-shallow-equal', 'wp-polyfill'), 'version' => 'f0698003cb0f0a7bd794'), 'url.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '421139b01f33e5b327d8'), 'viewport.min.js' => array('dependencies' => array('react', 'wp-compose', 'wp-data', 'wp-polyfill'), 'version' => 'e555fda1d93ecf1fb1e0'), 'warning.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'ed7c8b0940914f4fe44b'), 'widgets.min.js' => array('dependencies' => array('react', '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' => '4c7bfc488be9e26d6488'), 'wordcount.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '55d8c2bf3dc99e7ea5ec')); diff --git a/src/wp-includes/blocks/navigation.php b/src/wp-includes/blocks/navigation.php index 1d73d09bbd1fb..f28f017f0238c 100644 --- a/src/wp-includes/blocks/navigation.php +++ b/src/wp-includes/blocks/navigation.php @@ -543,8 +543,7 @@ private static function get_nav_wrapper_attributes( $attributes, $inner_blocks ) /** * Gets the nav element directives. * - * @param bool $is_interactive Whether the block is interactive. - * @param array $attributes The block attributes. + * @param bool $is_interactive Whether the block is interactive. * @return string the directives for the navigation element. */ private static function get_nav_element_directives( $is_interactive ) { @@ -1458,13 +1457,26 @@ function block_core_navigation_set_ignored_hooked_blocks_metadata( $inner_blocks /** * Updates the post meta with the list of ignored hooked blocks when the navigation is created or updated via the REST API. * - * @param WP_Post $post Post object. + * @access private + * @since 6.5.0 + * + * @param stdClass $post Post object. + * @return stdClass The updated post object. */ function block_core_navigation_update_ignore_hooked_blocks_meta( $post ) { - // We run the Block Hooks mechanism to inject the `metadata.ignoredHookedBlocks` attribute into - // all anchor blocks. For the root level, we create a mock Navigation and extract them from there. + /* + * We run the Block Hooks mechanism to inject the `metadata.ignoredHookedBlocks` attribute into + * all anchor blocks. For the root level, we create a mock Navigation and extract them from there. + */ $blocks = parse_blocks( $post->post_content ); - $markup = block_core_navigation_set_ignored_hooked_blocks_metadata( $blocks, $post ); + + /* + * Block Hooks logic requires a `WP_Post` object (rather than the `stdClass` with the updates that + * we're getting from the `rest_pre_insert_wp_navigation` filter) as its second argument (to be + * used as context for hooked blocks insertion). + * We thus have to look it up from the DB,based on `$post->ID`. + */ + $markup = block_core_navigation_set_ignored_hooked_blocks_metadata( $blocks, get_post( $post->ID ) ); $root_nav_block = parse_blocks( $markup )[0]; $ignored_hooked_blocks = isset( $root_nav_block['attrs']['metadata']['ignoredHookedBlocks'] ) @@ -1480,25 +1492,32 @@ function block_core_navigation_update_ignore_hooked_blocks_meta( $post ) { update_post_meta( $post->ID, '_wp_ignored_hooked_blocks', json_encode( $ignored_hooked_blocks ) ); } - $serialized_inner_blocks = block_core_navigation_remove_serialized_parent_block( $markup ); - - wp_update_post( - array( - 'ID' => $post->ID, - 'post_content' => $serialized_inner_blocks, - ) - ); + $post->post_content = block_core_navigation_remove_serialized_parent_block( $markup ); + return $post; } -// Before adding our filter, we verify if it's already added in Core. -// However, during the build process, Gutenberg automatically prefixes our functions with "gutenberg_". -// Therefore, we concatenate the Core's function name to circumvent this prefix for our check. -$rest_insert_wp_navigation_core_callback = 'block_core_navigation_' . 'update_ignore_hooked_blocks_meta'; +/* + * Before adding our filter, we verify if it's already added in Core. + * However, during the build process, Gutenberg automatically prefixes our functions with "gutenberg_". + * Therefore, we concatenate the Core's function name to circumvent this prefix for our check. + */ +$rest_insert_wp_navigation_core_callback = 'block_core_navigation_' . 'update_ignore_hooked_blocks_meta'; // phpcs:ignore Generic.Strings.UnnecessaryStringConcat.Found -// Injection of hooked blocks into the Navigation block relies on some functions present in WP >= 6.5 -// that are not present in Gutenberg's WP 6.5 compatibility layer. -if ( function_exists( 'set_ignored_hooked_blocks_metadata' ) && ! has_filter( 'rest_insert_wp_navigation', $rest_insert_wp_navigation_core_callback ) ) { - add_action( 'rest_insert_wp_navigation', 'block_core_navigation_update_ignore_hooked_blocks_meta', 10, 3 ); +/* + * Injection of hooked blocks into the Navigation block relies on some functions present in WP >= 6.5 + * that are not present in Gutenberg's WP 6.5 compatibility layer. + */ +if ( function_exists( 'set_ignored_hooked_blocks_metadata' ) && ! has_filter( 'rest_pre_insert_wp_navigation', $rest_insert_wp_navigation_core_callback ) ) { + add_filter( 'rest_pre_insert_wp_navigation', 'block_core_navigation_update_ignore_hooked_blocks_meta' ); +} + +/* + * Previous versions of Gutenberg were attaching the block_core_navigation_update_ignore_hooked_blocks_meta + * function to the `rest_insert_wp_navigation` _action_ (rather than the `rest_pre_insert_wp_navigation` _filter_). + * To avoid collisions, we need to remove the filter from that action if it's present. + */ +if ( has_filter( 'rest_insert_wp_navigation', $rest_insert_wp_navigation_core_callback ) ) { + remove_filter( 'rest_insert_wp_navigation', $rest_insert_wp_navigation_core_callback ); } /** @@ -1506,7 +1525,6 @@ function block_core_navigation_update_ignore_hooked_blocks_meta( $post ) { * * @param WP_REST_Response $response The response object. * @param WP_Post $post Post object. - * @param WP_REST_Request $request Request object. * @return WP_REST_Response The response object. */ function block_core_navigation_insert_hooked_blocks_into_rest_response( $response, $post ) { @@ -1525,13 +1543,17 @@ function block_core_navigation_insert_hooked_blocks_into_rest_response( $respons return $response; } -// Before adding our filter, we verify if it's already added in Core. -// However, during the build process, Gutenberg automatically prefixes our functions with "gutenberg_". -// Therefore, we concatenate the Core's function name to circumvent this prefix for our check. +/* + * Before adding our filter, we verify if it's already added in Core. + * However, during the build process, Gutenberg automatically prefixes our functions with "gutenberg_". + * Therefore, we concatenate the Core's function name to circumvent this prefix for our check. + */ $rest_prepare_wp_navigation_core_callback = 'block_core_navigation_' . 'insert_hooked_blocks_into_rest_response'; -// Injection of hooked blocks into the Navigation block relies on some functions present in WP >= 6.5 -// that are not present in Gutenberg's WP 6.5 compatibility layer. +/* + * Injection of hooked blocks into the Navigation block relies on some functions present in WP >= 6.5 + * that are not present in Gutenberg's WP 6.5 compatibility layer. + */ if ( function_exists( 'set_ignored_hooked_blocks_metadata' ) && ! has_filter( 'rest_prepare_wp_navigation', $rest_prepare_wp_navigation_core_callback ) ) { add_filter( 'rest_prepare_wp_navigation', 'block_core_navigation_insert_hooked_blocks_into_rest_response', 10, 3 ); } From 234ec16baf99361e93941e4f2edad6e1de92bc88 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Tue, 12 Mar 2024 14:44:00 +0000 Subject: [PATCH 167/251] Help/About: Update the About page for WP 6.5 RC2. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Updates a translatable string to use a placeholder for the “Requires Plugins” string used in it. Props swissspidy, sergeybiryukov, presskopp. See #60303. git-svn-id: https://develop.svn.wordpress.org/trunk@57817 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/about.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/wp-admin/about.php b/src/wp-admin/about.php index afe4939329883..65e6d4501d2fd 100644 --- a/src/wp-admin/about.php +++ b/src/wp-admin/about.php @@ -175,7 +175,15 @@

        -

        Requires Plugins header with a comma-separated list of required plugin slugs, presenting users with links to install and activate those plugins first.' ); ?>

        +

        + Requires Plugins' + ); + ?> +

        From b1b97f96727f137210b942f00f85fc6449033d1d Mon Sep 17 00:00:00 2001 From: Dennis Snell Date: Tue, 12 Mar 2024 18:52:20 +0000 Subject: [PATCH 168/251] Interactivity API: Ensure proper directive processing on special elements. Adds a test to ensure proper processing of directives on special HTML elements, or HTML which contains special elements. These special elements are defined by the HTML API and are the HTML elements which cannot contain other tags, such as the IFRAME, SCRIPT, TEXTAREA, TITLE, elements, etc... The server diretive processor performs a custom tracking of HTML structure and this test ensures it isn't mislead by the handling of those special elements. Developed in https://github.com/WordPress/wordpress-develop/pull/6247 Discussed in https://core.trac.wordpress.org/ticket/60746 Props santosguillamot, cbravobernal, mukesh27, westonruter, swissspidy, dmsnell. Follow-up to [57348]. Fixes #60746. git-svn-id: https://develop.svn.wordpress.org/trunk@57822 602fd350-edb4-49c9-b593-d223f7449a82 --- ...pi.php => wpInteractivityAPIFunctions.php} | 29 ++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) rename tests/phpunit/tests/interactivity-api/{interactivity-api.php => wpInteractivityAPIFunctions.php} (92%) diff --git a/tests/phpunit/tests/interactivity-api/interactivity-api.php b/tests/phpunit/tests/interactivity-api/wpInteractivityAPIFunctions.php similarity index 92% rename from tests/phpunit/tests/interactivity-api/interactivity-api.php rename to tests/phpunit/tests/interactivity-api/wpInteractivityAPIFunctions.php index 7d74fda8eb448..3a08a2f1af576 100644 --- a/tests/phpunit/tests/interactivity-api/interactivity-api.php +++ b/tests/phpunit/tests/interactivity-api/wpInteractivityAPIFunctions.php @@ -10,7 +10,7 @@ * * @group interactivity-api */ -class Tests_Interactivity_API_Functions extends WP_UnitTestCase { +class Tests_Interactivity_API_wpInteractivityAPIFunctions extends WP_UnitTestCase { /** * Set up. */ @@ -390,4 +390,31 @@ public function test_wp_interactivity_data_wp_context_with_json_flags() { $this->assertEquals( 'data-wp-context=\'{"quot":"\u0022baz\u0022"}\'', wp_interactivity_data_wp_context( array( 'quot' => '"baz"' ) ) ); $this->assertEquals( 'data-wp-context=\'{"amp":"T\u0026T"}\'', wp_interactivity_data_wp_context( array( 'amp' => 'T&T' ) ) ); } + + /** + * Tests that directives processing of tags that don't visit closer tag work. + * + * @ticket 60746 + * + * @covers ::wp_interactivity_process_directives_of_interactive_blocks + */ + public function test_process_directives_in_tags_that_dont_visit_closer_tag() { + register_block_type( + 'test/custom-directive-block', + array( + 'render_callback' => function () { + return ''; + }, + 'supports' => array( + 'interactivity' => true, + ), + ) + ); + $post_content = ''; + $processed_content = do_blocks( $post_content ); + $processor = new WP_HTML_Tag_Processor( $processed_content ); + $processor->next_tag( array( 'class_name' => 'test' ) ); + unregister_block_type( 'test/custom-directive-block' ); + $this->assertEquals( '1', $processor->get_attribute( 'src' ) ); + } } From 47937685f7512911b00995a3b1250fa9cb053663 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Wed, 13 Mar 2024 10:39:54 +0000 Subject: [PATCH 169/251] =?UTF-8?q?Interactivity=20API:=20Do=20not=20proce?= =?UTF-8?q?ss=20directives=20when=20there=20aren=E2=80=99t=20any.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Short-circuits directive processing when the markup does not actually contain any `data-wp-*` attributes. This reduces function calls and memory usage for the best case scenario due to not involving `WP_HTML_Tag_Processor`. Props joemcgill, swissspidy, gziolo, cbravobernal, flixos90. Fixes #60749. git-svn-id: https://develop.svn.wordpress.org/trunk@57824 602fd350-edb4-49c9-b593-d223f7449a82 --- .../interactivity-api/class-wp-interactivity-api.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/wp-includes/interactivity-api/class-wp-interactivity-api.php b/src/wp-includes/interactivity-api/class-wp-interactivity-api.php index 9e5b1be1fa5ed..28cb7ee20a64a 100644 --- a/src/wp-includes/interactivity-api/class-wp-interactivity-api.php +++ b/src/wp-includes/interactivity-api/class-wp-interactivity-api.php @@ -204,6 +204,10 @@ public function add_hooks() { * @return string The processed HTML content. It returns the original content when the HTML contains unbalanced tags. */ public function process_directives( string $html ): string { + if ( ! str_contains( $html, 'data-wp-' ) ) { + return $html; + } + $context_stack = array(); $namespace_stack = array(); $result = $this->process_directives_args( $html, $context_stack, $namespace_stack ); From 0d456e2f054780830e117def8e6d872883e3382e Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Wed, 13 Mar 2024 10:46:53 +0000 Subject: [PATCH 170/251] Interactivity API: Increase hook priority for processing directives. Use a priority of 100 to ensure that other filters can add additional directives before the processing starts. This way, directives will be processed even if the `$parsed_block` variable is edited by a filter. Props cbravobernal, swissspidy, flixos90, joemcgill, gziolo. Fixes #60743. git-svn-id: https://develop.svn.wordpress.org/trunk@57826 602fd350-edb4-49c9-b593-d223f7449a82 --- .../interactivity-api/interactivity-api.php | 10 ++++-- .../wpInteractivityAPIFunctions.php | 35 ++++++++++++++++++- 2 files changed, 41 insertions(+), 4 deletions(-) diff --git a/src/wp-includes/interactivity-api/interactivity-api.php b/src/wp-includes/interactivity-api/interactivity-api.php index cc2c8120474f9..b8f3e508d0942 100644 --- a/src/wp-includes/interactivity-api/interactivity-api.php +++ b/src/wp-includes/interactivity-api/interactivity-api.php @@ -57,16 +57,20 @@ function wp_interactivity_process_directives_of_interactive_blocks( array $parse }; /* - * Uses a priority of 20 to ensure that other filters can add additional + * Uses a priority of 100 to ensure that other filters can add additional * directives before the processing starts. */ - add_filter( 'render_block_' . $block_name, $process_interactive_blocks, 20, 2 ); + add_filter( 'render_block_' . $block_name, $process_interactive_blocks, 100, 2 ); } } return $parsed_block; } -add_filter( 'render_block_data', 'wp_interactivity_process_directives_of_interactive_blocks' ); +/* + * Uses a priority of 100 to ensure that other filters can add additional attributes to + * $parsed_block before the processing starts. + */ +add_filter( 'render_block_data', 'wp_interactivity_process_directives_of_interactive_blocks', 100, 1 ); /** * Retrieves the main WP_Interactivity_API instance. diff --git a/tests/phpunit/tests/interactivity-api/wpInteractivityAPIFunctions.php b/tests/phpunit/tests/interactivity-api/wpInteractivityAPIFunctions.php index 3a08a2f1af576..289cbe498f364 100644 --- a/tests/phpunit/tests/interactivity-api/wpInteractivityAPIFunctions.php +++ b/tests/phpunit/tests/interactivity-api/wpInteractivityAPIFunctions.php @@ -308,11 +308,44 @@ public function test_process_directives_only_process_the_root_interactive_blocks '; $this->data_wp_test_processor_count = 0; do_blocks( $post_content ); - $this->assertEquals( 2, $this->data_wp_test_processor_count ); unregister_block_type( 'test/custom-directive-block' ); + $this->assertEquals( 2, $this->data_wp_test_processor_count ); $directive_processors->setValue( null, $old_directive_processors ); } + /** + * Tests that directives are server side processing even if the $parsed_block variable is edited by a filter. + * + * @ticket 60743 + * + * @covers ::wp_interactivity_process_directives_of_interactive_blocks + */ + public function test_process_directives_when_block_is_filtered() { + register_block_type( + 'test/custom-directive-block', + array( + 'render_callback' => function () { + return ' 'test' ) ) . ' data-wp-bind--value="context.text" />'; + }, + 'supports' => array( + 'interactivity' => true, + ), + ) + ); + function test_render_block_data( $parsed_block ) { + $parsed_block['testKey'] = true; + return $parsed_block; + } + add_filter( 'render_block_data', 'test_render_block_data' ); + $post_content = ''; + $processed_content = do_blocks( $post_content ); + $processor = new WP_HTML_Tag_Processor( $processed_content ); + $processor->next_tag( array( 'data-wp-interactive' => 'nameSpace' ) ); + remove_filter( 'render_block_data', 'test_render_block_data' ); + unregister_block_type( 'test/custom-directive-block' ); + $this->assertEquals( 'test', $processor->get_attribute( 'value' ) ); + } + /** * Tests that wp_interactivity_data_wp_context function correctly converts different array * structures to a JSON string. From a6783cfbee4f72b38d67744c2a456b89dce626ab Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Wed, 13 Mar 2024 11:10:28 +0000 Subject: [PATCH 171/251] Editor: disable `shadow.defaultPresets` in default `theme.json`. This is a follow-up to [57717] to ensure that classic themes without a `theme.json` file or without `appearanceTools: true` in `theme.json` do not have shadow controls by default. Props wildworks, vcanales, madhudollu, swissspidy, youknowriad. Fixes #60633 git-svn-id: https://develop.svn.wordpress.org/trunk@57827 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/theme.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/theme.json b/src/wp-includes/theme.json index d9ed47816c95c..3ce416d62e7b2 100644 --- a/src/wp-includes/theme.json +++ b/src/wp-includes/theme.json @@ -191,7 +191,7 @@ "text": true }, "shadow": { - "defaultPresets": true, + "defaultPresets": false, "presets": [ { "name": "Natural", From 0c24793d257cc4ce2f929a6e911f6b94bf97f19a Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Wed, 13 Mar 2024 13:18:35 +0000 Subject: [PATCH 172/251] Coding Standards: Update the config for `WordPress.PHP.NoSilencedErrors` in PHPCS ruleset. Includes alphabetizing the third party library exclusions section. Follow-up to [50810], [51658], [57524]. See #60700. git-svn-id: https://develop.svn.wordpress.org/trunk@57829 602fd350-edb4-49c9-b593-d223f7449a82 --- phpcs.xml.dist | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/phpcs.xml.dist b/phpcs.xml.dist index 840bdad8fe977..04731abf64407 100644 --- a/phpcs.xml.dist +++ b/phpcs.xml.dist @@ -52,6 +52,7 @@ /src/wp-admin/includes/ms-deprecated\.php /src/wp-includes/atomlib\.php + /src/wp-includes/class-avif-info\.php /src/wp-includes/class-IXR\.php /src/wp-includes/class-json\.php /src/wp-includes/class-phpass\.php @@ -59,7 +60,6 @@ /src/wp-includes/class-requests\.php /src/wp-includes/class-simplepie\.php /src/wp-includes/class-snoopy\.php - /src/wp-includes/class-avif-info\.php /src/wp-includes/deprecated\.php /src/wp-includes/ms-deprecated\.php /src/wp-includes/pluggable-deprecated\.php @@ -216,6 +216,7 @@ + From 8fafc3acae2a1808115084ec5e8b82a05375e67e Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Thu, 14 Mar 2024 09:04:00 +0000 Subject: [PATCH 173/251] I18N: Improve translation file cache group & expiration. Adds an explicit 1 hour expiration for the translation file cache introduced in [57287] / #58919. This prevents stale caches when a site does not use the regular way of installing language packs, for example when an atomic filesystem is involved. Also configures the `translation_files` group as a global cache group on multisite. Props dd32. Fixes #60764. git-svn-id: https://develop.svn.wordpress.org/trunk@57831 602fd350-edb4-49c9-b593-d223f7449a82 --- .../class-wp-textdomain-registry.php | 12 ++++----- src/wp-includes/load.php | 1 + .../tests/l10n/wpTextdomainRegistry.php | 26 +++++++++---------- 3 files changed, 20 insertions(+), 19 deletions(-) diff --git a/src/wp-includes/class-wp-textdomain-registry.php b/src/wp-includes/class-wp-textdomain-registry.php index 113ef3bd653f8..fe6d04b0a11aa 100644 --- a/src/wp-includes/class-wp-textdomain-registry.php +++ b/src/wp-includes/class-wp-textdomain-registry.php @@ -183,8 +183,8 @@ public function get_language_files_from_path( $path ) { return $files; } - $cache_key = 'cached_mo_files_' . md5( $path ); - $files = wp_cache_get( $cache_key, 'translations' ); + $cache_key = md5( $path ); + $files = wp_cache_get( $cache_key, 'translation_files' ); if ( false === $files ) { $files = glob( $path . '*.mo' ); @@ -197,7 +197,7 @@ public function get_language_files_from_path( $path ) { $files = array_merge( $files, $php_files ); } - wp_cache_set( $cache_key, $files, 'translations' ); + wp_cache_set( $cache_key, $files, 'translation_files', HOUR_IN_SECONDS ); } return $files; @@ -246,13 +246,13 @@ public function invalidate_mo_files_cache( $upgrader, $hook_extra ) { foreach ( $translation_types as $type ) { switch ( $type ) { case 'plugin': - wp_cache_delete( 'cached_mo_files_' . md5( WP_LANG_DIR . '/plugins/' ), 'translations' ); + wp_cache_delete( md5( WP_LANG_DIR . '/plugins/' ), 'translation_files' ); break; case 'theme': - wp_cache_delete( 'cached_mo_files_' . md5( WP_LANG_DIR . '/themes/' ), 'translations' ); + wp_cache_delete( md5( WP_LANG_DIR . '/themes/' ), 'translation_files' ); break; default: - wp_cache_delete( 'cached_mo_files_' . md5( WP_LANG_DIR . '/' ), 'translations' ); + wp_cache_delete( md5( WP_LANG_DIR . '/' ), 'translation_files' ); break; } } diff --git a/src/wp-includes/load.php b/src/wp-includes/load.php index 40947a0b202dc..b7bde142ec913 100644 --- a/src/wp-includes/load.php +++ b/src/wp-includes/load.php @@ -876,6 +876,7 @@ function wp_start_object_cache() { 'site-queries', 'site-transient', 'theme_files', + 'translation_files', 'rss', 'users', 'user-queries', diff --git a/tests/phpunit/tests/l10n/wpTextdomainRegistry.php b/tests/phpunit/tests/l10n/wpTextdomainRegistry.php index dd9688e947488..0344fe6cafc38 100644 --- a/tests/phpunit/tests/l10n/wpTextdomainRegistry.php +++ b/tests/phpunit/tests/l10n/wpTextdomainRegistry.php @@ -19,10 +19,10 @@ public function set_up() { } public function tear_down() { - wp_cache_delete( 'cached_mo_files_' . md5( WP_LANG_DIR . '/foobar/' ), 'translations' ); - wp_cache_delete( 'cached_mo_files_' . md5( WP_LANG_DIR . '/plugins/' ), 'translations' ); - wp_cache_delete( 'cached_mo_files_' . md5( WP_LANG_DIR . '/themes/' ), 'translations' ); - wp_cache_delete( 'cached_mo_files_' . md5( WP_LANG_DIR . '/' ), 'translations' ); + wp_cache_delete( md5( WP_LANG_DIR . '/foobar/' ), 'translation_files' ); + wp_cache_delete( md5( WP_LANG_DIR . '/plugins/' ), 'translation_files' ); + wp_cache_delete( md5( WP_LANG_DIR . '/themes/' ), 'translation_files' ); + wp_cache_delete( md5( WP_LANG_DIR . '/' ), 'translation_files' ); parent::tear_down(); } @@ -49,7 +49,7 @@ public function test_set_custom_path() { 'Custom path for textdomain not returned' ); $this->assertNotFalse( - wp_cache_get( 'cached_mo_files_' . md5( WP_LANG_DIR . '/bar/' ), 'translations' ), + wp_cache_get( md5( WP_LANG_DIR . '/bar/' ), 'translation_files' ), 'List of files in custom path not cached' ); } @@ -89,10 +89,10 @@ public function test_get_language_files_from_path_caches_results() { $this->instance->get_language_files_from_path( WP_LANG_DIR . '/themes/' ); $this->instance->get_language_files_from_path( WP_LANG_DIR . '/' ); - $this->assertNotFalse( wp_cache_get( 'cached_mo_files_' . md5( WP_LANG_DIR . '/plugins/' ), 'translations' ) ); - $this->assertNotFalse( wp_cache_get( 'cached_mo_files_' . md5( WP_LANG_DIR . '/themes/' ), 'translations' ) ); - $this->assertNotFalse( wp_cache_get( 'cached_mo_files_' . md5( WP_LANG_DIR . '/foobar/' ), 'translations' ) ); - $this->assertNotFalse( wp_cache_get( 'cached_mo_files_' . md5( WP_LANG_DIR . '/' ), 'translations' ) ); + $this->assertNotFalse( wp_cache_get( md5( WP_LANG_DIR . '/plugins/' ), 'translation_files' ) ); + $this->assertNotFalse( wp_cache_get( md5( WP_LANG_DIR . '/themes/' ), 'translation_files' ) ); + $this->assertNotFalse( wp_cache_get( md5( WP_LANG_DIR . '/foobar/' ), 'translation_files' ) ); + $this->assertNotFalse( wp_cache_get( md5( WP_LANG_DIR . '/' ), 'translation_files' ) ); } /** @@ -103,7 +103,7 @@ public function test_get_language_files_from_path_short_circuit() { $result = $this->instance->get_language_files_from_path( WP_LANG_DIR . '/plugins/' ); remove_filter( 'pre_get_language_files_from_path', '__return_empty_array' ); - $cache = wp_cache_get( 'cached_mo_files_' . md5( WP_LANG_DIR . '/plugins/' ), 'translations' ); + $cache = wp_cache_get( md5( WP_LANG_DIR . '/plugins/' ), 'translation_files' ); $this->assertEmpty( $result ); $this->assertFalse( $cache ); @@ -144,9 +144,9 @@ public function test_invalidate_mo_files_cache() { ) ); - $this->assertFalse( wp_cache_get( 'cached_mo_files_' . md5( WP_LANG_DIR . '/plugins/' ), 'translations' ) ); - $this->assertFalse( wp_cache_get( 'cached_mo_files_' . md5( WP_LANG_DIR . '/themes/' ), 'translations' ) ); - $this->assertFalse( wp_cache_get( 'cached_mo_files_' . md5( WP_LANG_DIR . '/' ), 'translations' ) ); + $this->assertFalse( wp_cache_get( md5( WP_LANG_DIR . '/plugins/' ), 'translation_files' ) ); + $this->assertFalse( wp_cache_get( md5( WP_LANG_DIR . '/themes/' ), 'translation_files' ) ); + $this->assertFalse( wp_cache_get( md5( WP_LANG_DIR . '/' ), 'translation_files' ) ); } public function data_domains_locales() { From 14c94f8174a137f493dc402d3f12a8c7da396f8d Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Thu, 14 Mar 2024 13:32:56 +0000 Subject: [PATCH 174/251] Interactivity API: Do not propagate context from void tags to its siblings. Resolves an issue where context on a void tag element such as `` was incorrectly passed to following elements. Adds tests. Props santosguillamot, luisherranz, cbravobernal, dmsnell, gziolo, swissspidy. Fixes #60768. git-svn-id: https://develop.svn.wordpress.org/trunk@57832 602fd350-edb4-49c9-b593-d223f7449a82 --- .../class-wp-interactivity-api.php | 96 +++++++++++-------- .../wpInteractivityAPIFunctions.php | 75 +++++++++++++++ 2 files changed, 131 insertions(+), 40 deletions(-) diff --git a/src/wp-includes/interactivity-api/class-wp-interactivity-api.php b/src/wp-includes/interactivity-api/class-wp-interactivity-api.php index 28cb7ee20a64a..a1c94594f90fc 100644 --- a/src/wp-includes/interactivity-api/class-wp-interactivity-api.php +++ b/src/wp-includes/interactivity-api/class-wp-interactivity-api.php @@ -294,34 +294,42 @@ private function process_directives_args( string $html, array &$context_stack, a } } /* - * If the matching opener tag didn't have any directives, it can skip the - * processing. - */ + * If the matching opener tag didn't have any directives, it can skip the + * processing. + */ if ( 0 === count( $directives_prefixes ) ) { continue; } - /* - * Sorts the attributes by the order of the `directives_processor` array - * and checks what directives are present in this element. The processing - * order is reversed for tag closers. - */ - $directives_prefixes = array_intersect( - $p->is_tag_closer() - ? $directive_processor_prefixes_reversed - : $directive_processor_prefixes, - $directives_prefixes + // Directive processing might be different depending on if it is entering the tag or exiting it. + $modes = array( + 'enter' => ! $p->is_tag_closer(), + 'exit' => $p->is_tag_closer() || ! $p->has_and_visits_its_closer_tag(), ); - // Executes the directive processors present in this element. - foreach ( $directives_prefixes as $directive_prefix ) { - $func = is_array( self::$directive_processors[ $directive_prefix ] ) - ? self::$directive_processors[ $directive_prefix ] - : array( $this, self::$directive_processors[ $directive_prefix ] ); - call_user_func_array( - $func, - array( $p, &$context_stack, &$namespace_stack, &$tag_stack ) + foreach ( $modes as $mode => $should_run ) { + if ( ! $should_run ) { + continue; + } + + /* + * Sorts the attributes by the order of the `directives_processor` array + * and checks what directives are present in this element. + */ + $existing_directives_prefixes = array_intersect( + 'enter' === $mode ? $directive_processor_prefixes : $directive_processor_prefixes_reversed, + $directives_prefixes ); + foreach ( $existing_directives_prefixes as $directive_prefix ) { + $func = is_array( self::$directive_processors[ $directive_prefix ] ) + ? self::$directive_processors[ $directive_prefix ] + : array( $this, self::$directive_processors[ $directive_prefix ] ); + + call_user_func_array( + $func, + array( $p, $mode, &$context_stack, &$namespace_stack, &$tag_stack ) + ); + } } } @@ -474,12 +482,13 @@ function ( $matches ) { * @since 6.5.0 * * @param WP_Interactivity_API_Directives_Processor $p The directives processor instance. + * @param string $mode Whether the processing is entering or exiting the tag. * @param array $context_stack The reference to the context stack. * @param array $namespace_stack The reference to the store namespace stack. */ - private function data_wp_interactive_processor( WP_Interactivity_API_Directives_Processor $p, array &$context_stack, array &$namespace_stack ) { - // In closing tags, it removes the last namespace from the stack. - if ( $p->is_tag_closer() ) { + private function data_wp_interactive_processor( WP_Interactivity_API_Directives_Processor $p, string $mode, array &$context_stack, array &$namespace_stack ) { + // When exiting tags, it removes the last namespace from the stack. + if ( 'exit' === $mode ) { array_pop( $namespace_stack ); return; } @@ -518,12 +527,13 @@ private function data_wp_interactive_processor( WP_Interactivity_API_Directives_ * @since 6.5.0 * * @param WP_Interactivity_API_Directives_Processor $p The directives processor instance. + * @param string $mode Whether the processing is entering or exiting the tag. * @param array $context_stack The reference to the context stack. * @param array $namespace_stack The reference to the store namespace stack. */ - private function data_wp_context_processor( WP_Interactivity_API_Directives_Processor $p, array &$context_stack, array &$namespace_stack ) { - // In closing tags, it removes the last context from the stack. - if ( $p->is_tag_closer() ) { + private function data_wp_context_processor( WP_Interactivity_API_Directives_Processor $p, string $mode, array &$context_stack, array &$namespace_stack ) { + // When exiting tags, it removes the last context from the stack. + if ( 'exit' === $mode ) { array_pop( $context_stack ); return; } @@ -564,11 +574,12 @@ private function data_wp_context_processor( WP_Interactivity_API_Directives_Proc * @since 6.5.0 * * @param WP_Interactivity_API_Directives_Processor $p The directives processor instance. + * @param string $mode Whether the processing is entering or exiting the tag. * @param array $context_stack The reference to the context stack. * @param array $namespace_stack The reference to the store namespace stack. */ - private function data_wp_bind_processor( WP_Interactivity_API_Directives_Processor $p, array &$context_stack, array &$namespace_stack ) { - if ( ! $p->is_tag_closer() ) { + private function data_wp_bind_processor( WP_Interactivity_API_Directives_Processor $p, string $mode, array &$context_stack, array &$namespace_stack ) { + if ( 'enter' === $mode ) { $all_bind_directives = $p->get_attribute_names_with_prefix( 'data-wp-bind--' ); foreach ( $all_bind_directives as $attribute_name ) { @@ -608,11 +619,12 @@ private function data_wp_bind_processor( WP_Interactivity_API_Directives_Process * @since 6.5.0 * * @param WP_Interactivity_API_Directives_Processor $p The directives processor instance. + * @param string $mode Whether the processing is entering or exiting the tag. * @param array $context_stack The reference to the context stack. * @param array $namespace_stack The reference to the store namespace stack. */ - private function data_wp_class_processor( WP_Interactivity_API_Directives_Processor $p, array &$context_stack, array &$namespace_stack ) { - if ( ! $p->is_tag_closer() ) { + private function data_wp_class_processor( WP_Interactivity_API_Directives_Processor $p, string $mode, array &$context_stack, array &$namespace_stack ) { + if ( 'enter' === $mode ) { $all_class_directives = $p->get_attribute_names_with_prefix( 'data-wp-class--' ); foreach ( $all_class_directives as $attribute_name ) { @@ -642,11 +654,12 @@ private function data_wp_class_processor( WP_Interactivity_API_Directives_Proces * @since 6.5.0 * * @param WP_Interactivity_API_Directives_Processor $p The directives processor instance. + * @param string $mode Whether the processing is entering or exiting the tag. * @param array $context_stack The reference to the context stack. * @param array $namespace_stack The reference to the store namespace stack. */ - private function data_wp_style_processor( WP_Interactivity_API_Directives_Processor $p, array &$context_stack, array &$namespace_stack ) { - if ( ! $p->is_tag_closer() ) { + private function data_wp_style_processor( WP_Interactivity_API_Directives_Processor $p, string $mode, array &$context_stack, array &$namespace_stack ) { + if ( 'enter' === $mode ) { $all_style_attributes = $p->get_attribute_names_with_prefix( 'data-wp-style--' ); foreach ( $all_style_attributes as $attribute_name ) { @@ -734,11 +747,12 @@ private function merge_style_property( string $style_attribute_value, string $st * @since 6.5.0 * * @param WP_Interactivity_API_Directives_Processor $p The directives processor instance. + * @param string $mode Whether the processing is entering or exiting the tag. * @param array $context_stack The reference to the context stack. * @param array $namespace_stack The reference to the store namespace stack. */ - private function data_wp_text_processor( WP_Interactivity_API_Directives_Processor $p, array &$context_stack, array &$namespace_stack ) { - if ( ! $p->is_tag_closer() ) { + private function data_wp_text_processor( WP_Interactivity_API_Directives_Processor $p, string $mode, array &$context_stack, array &$namespace_stack ) { + if ( 'enter' === $mode ) { $attribute_value = $p->get_attribute( 'data-wp-text' ); $result = $this->evaluate( $attribute_value, end( $namespace_stack ), end( $context_stack ) ); @@ -831,10 +845,11 @@ class="screen-reader-text" * * @since 6.5.0 * - * @param WP_Interactivity_API_Directives_Processor $p The directives processor instance. + * @param WP_Interactivity_API_Directives_Processor $p The directives processor instance. + * @param string $mode Whether the processing is entering or exiting the tag. */ - private function data_wp_router_region_processor( WP_Interactivity_API_Directives_Processor $p ) { - if ( ! $p->is_tag_closer() && ! $this->has_processed_router_region ) { + private function data_wp_router_region_processor( WP_Interactivity_API_Directives_Processor $p, string $mode ) { + if ( 'enter' === $mode && ! $this->has_processed_router_region ) { $this->has_processed_router_region = true; // Initialize the `core/router` store. @@ -870,12 +885,13 @@ private function data_wp_router_region_processor( WP_Interactivity_API_Directive * @since 6.5.0 * * @param WP_Interactivity_API_Directives_Processor $p The directives processor instance. + * @param string $mode Whether the processing is entering or exiting the tag. * @param array $context_stack The reference to the context stack. * @param array $namespace_stack The reference to the store namespace stack. * @param array $tag_stack The reference to the tag stack. */ - private function data_wp_each_processor( WP_Interactivity_API_Directives_Processor $p, array &$context_stack, array &$namespace_stack, array &$tag_stack ) { - if ( ! $p->is_tag_closer() && 'TEMPLATE' === $p->get_tag() ) { + private function data_wp_each_processor( WP_Interactivity_API_Directives_Processor $p, string $mode, array &$context_stack, array &$namespace_stack, array &$tag_stack ) { + if ( 'enter' === $mode && 'TEMPLATE' === $p->get_tag() ) { $attribute_name = $p->get_attribute_names_with_prefix( 'data-wp-each' )[0]; $extracted_suffix = $this->extract_prefix_and_suffix( $attribute_name ); $item_name = isset( $extracted_suffix[1] ) ? $this->kebab_to_camel_case( $extracted_suffix[1] ) : 'item'; diff --git a/tests/phpunit/tests/interactivity-api/wpInteractivityAPIFunctions.php b/tests/phpunit/tests/interactivity-api/wpInteractivityAPIFunctions.php index 289cbe498f364..8433895f058e0 100644 --- a/tests/phpunit/tests/interactivity-api/wpInteractivityAPIFunctions.php +++ b/tests/phpunit/tests/interactivity-api/wpInteractivityAPIFunctions.php @@ -450,4 +450,79 @@ public function test_process_directives_in_tags_that_dont_visit_closer_tag() { unregister_block_type( 'test/custom-directive-block' ); $this->assertEquals( '1', $processor->get_attribute( 'src' ) ); } + + /** + * Tests that context from void tags is not propagated to next tags. + * + * @ticket 60768 + * + * @covers wp_interactivity_process_directives_of_interactive_blocks + */ + public function test_process_context_directive_in_void_tags() { + register_block_type( + 'test/custom-directive-block', + array( + 'render_callback' => function () { + return '
        '; + }, + 'supports' => array( + 'interactivity' => true, + ), + ) + ); + $post_content = ''; + $processed_content = do_blocks( $post_content ); + $processor = new WP_HTML_Tag_Processor( $processed_content ); + $processor->next_tag( + array( + 'tag_name' => 'input', + 'id' => 'first-input', + ) + ); + $first_input_value = $processor->get_attribute( 'value' ); + $processor->next_tag( + array( + 'tag_name' => 'input', + 'id' => 'second-input', + ) + ); + $second_input_value = $processor->get_attribute( 'value' ); + unregister_block_type( 'test/custom-directive-block' ); + $this->assertEquals( 'inner', $first_input_value ); + $this->assertEquals( 'outer', $second_input_value ); + } + + /** + * Tests that namespace from void tags is not propagated to next tags. + * + * @ticket 60768 + * + * @covers wp_interactivity_process_directives_of_interactive_blocks + */ + public function test_process_interactive_directive_in_void_tags() { + wp_interactivity_state( + 'void', + array( + 'text' => 'void', + ) + ); + register_block_type( + 'test/custom-directive-block', + array( + 'render_callback' => function () { + return '
        '; + }, + 'supports' => array( + 'interactivity' => true, + ), + ) + ); + $post_content = ''; + $processed_content = do_blocks( $post_content ); + $processor = new WP_HTML_Tag_Processor( $processed_content ); + $processor->next_tag( array( 'tag_name' => 'input' ) ); + $input_value = $processor->get_attribute( 'value' ); + unregister_block_type( 'test/custom-directive-block' ); + $this->assertNull( $input_value ); + } } From a590468cb296a0577de27974496a564555daa5bd Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 14 Mar 2024 14:25:51 +0000 Subject: [PATCH 175/251] Coding Standards: Use strict comparison in `wp-admin/options-general.php`. Follow-up to [1632], [12507]. Props aristath, poena, afercia, SergeyBiryukov. See #60700. git-svn-id: https://develop.svn.wordpress.org/trunk@57833 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/options-general.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-admin/options-general.php b/src/wp-admin/options-general.php index 9e25c36c370bc..9515f71d01551 100644 --- a/src/wp-admin/options-general.php +++ b/src/wp-admin/options-general.php @@ -354,7 +354,7 @@ class="" if ( empty( $tzstring ) ) { // Create a UTC+- zone if no timezone string exists. $check_zone_info = false; - if ( 0 == $current_offset ) { + if ( 0 === (int) $current_offset ) { $tzstring = 'UTC+0'; } elseif ( $current_offset < 0 ) { $tzstring = 'UTC' . $current_offset; @@ -554,7 +554,7 @@ class="" global $wp_locale; for ( $day_index = 0; $day_index <= 6; $day_index++ ) : - $selected = ( get_option( 'start_of_week' ) == $day_index ) ? 'selected="selected"' : ''; + $selected = ( (int) get_option( 'start_of_week' ) === $day_index ) ? 'selected="selected"' : ''; echo "\n\t'; endfor; ?> From ad9d7ea39dfb8827360a407cf56b5dce60fbbb84 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Thu, 14 Mar 2024 15:28:12 +0000 Subject: [PATCH 176/251] Interactivity API: Prevent warning when using a bind directive with a short attribute name. Adds new tests and improves existing ones by using `assertSame` to do type comparison as well. Props jonsurrell, cbravobernal, swissspidy, gziolo. Fixes #60758. git-svn-id: https://develop.svn.wordpress.org/trunk@57835 602fd350-edb4-49c9-b593-d223f7449a82 --- .../class-wp-interactivity-api.php | 13 ++- .../wpInteractivityAPI-wp-bind.php | 87 +++++++++++-------- 2 files changed, 62 insertions(+), 38 deletions(-) diff --git a/src/wp-includes/interactivity-api/class-wp-interactivity-api.php b/src/wp-includes/interactivity-api/class-wp-interactivity-api.php index a1c94594f90fc..98876eaf8ed53 100644 --- a/src/wp-includes/interactivity-api/class-wp-interactivity-api.php +++ b/src/wp-includes/interactivity-api/class-wp-interactivity-api.php @@ -591,7 +591,13 @@ private function data_wp_bind_processor( WP_Interactivity_API_Directives_Process $attribute_value = $p->get_attribute( $attribute_name ); $result = $this->evaluate( $attribute_value, end( $namespace_stack ), end( $context_stack ) ); - if ( null !== $result && ( false !== $result || '-' === $bound_attribute[4] ) ) { + if ( + null !== $result && + ( + false !== $result || + ( strlen( $bound_attribute ) > 5 && '-' === $bound_attribute[4] ) + ) + ) { /* * If the result of the evaluation is a boolean and the attribute is * `aria-` or `data-, convert it to a string "true" or "false". It @@ -599,7 +605,10 @@ private function data_wp_bind_processor( WP_Interactivity_API_Directives_Process * replicate what Preact will later do in the client: * https://github.com/preactjs/preact/blob/ea49f7a0f9d1ff2c98c0bdd66aa0cbc583055246/src/diff/props.js#L131C24-L136 */ - if ( is_bool( $result ) && '-' === $bound_attribute[4] ) { + if ( + is_bool( $result ) && + ( strlen( $bound_attribute ) > 5 && '-' === $bound_attribute[4] ) + ) { $result = $result ? 'true' : 'false'; } $p->set_attribute( $bound_attribute, $result ); diff --git a/tests/phpunit/tests/interactivity-api/wpInteractivityAPI-wp-bind.php b/tests/phpunit/tests/interactivity-api/wpInteractivityAPI-wp-bind.php index 2c530e4faf817..325eea59616f2 100644 --- a/tests/phpunit/tests/interactivity-api/wpInteractivityAPI-wp-bind.php +++ b/tests/phpunit/tests/interactivity-api/wpInteractivityAPI-wp-bind.php @@ -33,6 +33,8 @@ public function set_up() { 'null' => null, 'trueString' => 'true', 'falseString' => 'false', + 'trueValue' => true, + 'falseValue' => false, ) ); } @@ -60,7 +62,7 @@ private function process_directives( $html ) { public function test_wp_bind_sets_attribute() { $html = '
        Text
        '; list($p) = $this->process_directives( $html ); - $this->assertEquals( 'some-id', $p->get_attribute( 'id' ) ); + $this->assertSame( 'some-id', $p->get_attribute( 'id' ) ); } /** @@ -73,7 +75,7 @@ public function test_wp_bind_sets_attribute() { public function test_wp_bind_replaces_attribute() { $html = '
        Text
        '; list($p) = $this->process_directives( $html ); - $this->assertEquals( 'some-id', $p->get_attribute( 'id' ) ); + $this->assertSame( 'some-id', $p->get_attribute( 'id' ) ); } /** @@ -86,7 +88,7 @@ public function test_wp_bind_replaces_attribute() { public function test_wp_bind_sets_number_value() { $html = ''; list($p) = $this->process_directives( $html ); - $this->assertEquals( '100', $p->get_attribute( 'width' ) ); + $this->assertSame( '100', $p->get_attribute( 'width' ) ); } /** @@ -99,8 +101,8 @@ public function test_wp_bind_sets_number_value() { public function test_wp_bind_sets_true_string() { $html = '
        Text
        '; list($p, $new_html) = $this->process_directives( $html ); - $this->assertEquals( 'true', $p->get_attribute( 'id' ) ); - $this->assertEquals( '
        Text
        ', $new_html ); + $this->assertSame( 'true', $p->get_attribute( 'id' ) ); + $this->assertSame( '
        Text
        ', $new_html ); } /** @@ -113,8 +115,8 @@ public function test_wp_bind_sets_true_string() { public function test_wp_bind_sets_false_string() { $html = '
        Text
        '; list($p, $new_html) = $this->process_directives( $html ); - $this->assertEquals( 'false', $p->get_attribute( 'id' ) ); - $this->assertEquals( '
        Text
        ', $new_html ); + $this->assertSame( 'false', $p->get_attribute( 'id' ) ); + $this->assertSame( '
        Text
        ', $new_html ); } /** @@ -127,7 +129,7 @@ public function test_wp_bind_sets_false_string() { public function test_wp_bind_ignores_empty_bound_attribute() { $html = '
        Text
        '; $new_html = $this->interactivity->process_directives( $html ); - $this->assertEquals( $html, $new_html ); + $this->assertSame( $html, $new_html ); } /** @@ -141,7 +143,7 @@ public function test_wp_bind_ignores_empty_bound_attribute() { public function test_wp_bind_doesnt_do_anything_on_non_existent_references() { $html = '
        Text
        '; $new_html = $this->interactivity->process_directives( $html ); - $this->assertEquals( $html, $new_html ); + $this->assertSame( $html, $new_html ); } /** @@ -154,7 +156,7 @@ public function test_wp_bind_doesnt_do_anything_on_non_existent_references() { public function test_wp_bind_ignores_empty_value() { $html = '
        Text
        '; $new_html = $this->interactivity->process_directives( $html ); - $this->assertEquals( $html, $new_html ); + $this->assertSame( $html, $new_html ); } /** @@ -167,7 +169,7 @@ public function test_wp_bind_ignores_empty_value() { public function test_wp_bind_ignores_without_value() { $html = '
        Text
        '; $new_html = $this->interactivity->process_directives( $html ); - $this->assertEquals( $html, $new_html ); + $this->assertSame( $html, $new_html ); } /** @@ -181,7 +183,7 @@ public function test_wp_bind_ignores_without_value() { public function test_wp_bind_works_with_multiple_same_directives() { $html = '
        Text
        '; list($p) = $this->process_directives( $html ); - $this->assertEquals( 'some-id', $p->get_attribute( 'id' ) ); + $this->assertSame( 'some-id', $p->get_attribute( 'id' ) ); } /** @@ -195,8 +197,8 @@ public function test_wp_bind_works_with_multiple_same_directives() { public function test_wp_bind_works_with_multiple_different_directives() { $html = ''; list($p) = $this->process_directives( $html ); - $this->assertEquals( 'some-id', $p->get_attribute( 'id' ) ); - $this->assertEquals( '100', $p->get_attribute( 'width' ) ); + $this->assertSame( 'some-id', $p->get_attribute( 'id' ) ); + $this->assertSame( '100', $p->get_attribute( 'width' ) ); } /** @@ -210,7 +212,7 @@ public function test_wp_bind_adds_boolean_attribute_if_true() { $html = '
        Text
        '; list($p, $new_html) = $this->process_directives( $html ); $this->assertTrue( $p->get_attribute( 'hidden' ) ); - $this->assertEquals( '', $new_html ); + $this->assertSame( '', $new_html ); } /** @@ -225,7 +227,7 @@ public function test_wp_bind_replaces_existing_attribute_if_true() { $html = ''; list($p, $new_html) = $this->process_directives( $html ); $this->assertTrue( $p->get_attribute( 'hidden' ) ); - $this->assertEquals( '', $new_html ); + $this->assertSame( '', $new_html ); } /** @@ -240,12 +242,12 @@ public function test_wp_bind_doesnt_add_boolean_attribute_if_false_or_null() { $html = '
        Text
        '; list($p, $new_html) = $this->process_directives( $html ); $this->assertNull( $p->get_attribute( 'hidden' ) ); - $this->assertEquals( $html, $new_html ); + $this->assertSame( $html, $new_html ); $html = '
        Text
        '; list($p, $new_html) = $this->process_directives( $html ); $this->assertNull( $p->get_attribute( 'hidden' ) ); - $this->assertEquals( $html, $new_html ); + $this->assertSame( $html, $new_html ); } /** @@ -277,13 +279,13 @@ public function test_wp_bind_removes_boolean_attribute_if_false_or_null() { public function test_wp_bind_adds_value_if_true_in_aria_or_data_attributes() { $html = '
        Text
        '; list($p, $new_html) = $this->process_directives( $html ); - $this->assertEquals( 'true', $p->get_attribute( 'aria-hidden' ) ); - $this->assertEquals( '', $new_html ); + $this->assertSame( 'true', $p->get_attribute( 'aria-hidden' ) ); + $this->assertSame( '', $new_html ); $html = '
        Text
        '; list($p, $new_html) = $this->process_directives( $html ); - $this->assertEquals( 'true', $p->get_attribute( 'data-is-closed' ) ); - $this->assertEquals( '
        Text
        ', $new_html ); + $this->assertSame( 'true', $p->get_attribute( 'data-is-closed' ) ); + $this->assertSame( '
        Text
        ', $new_html ); } /** @@ -297,15 +299,15 @@ public function test_wp_bind_adds_value_if_true_in_aria_or_data_attributes() { public function test_wp_bind_replaces_value_if_true_in_aria_or_data_attributes() { $html = '
        Text
        '; list($p, $new_html) = $this->process_directives( $html ); - $this->assertEquals( 'true', $p->get_attribute( 'aria-hidden' ) ); - $this->assertEquals( '', $new_html ); + $this->assertSame( 'true', $p->get_attribute( 'aria-hidden' ) ); + $this->assertSame( '', $new_html ); $html = '
        Text
        '; $new_html = $this->interactivity->process_directives( $html ); $p = new WP_HTML_Tag_Processor( $new_html ); $p->next_tag(); - $this->assertEquals( 'true', $p->get_attribute( 'data-is-closed' ) ); - $this->assertEquals( '
        Text
        ', $new_html ); + $this->assertSame( 'true', $p->get_attribute( 'data-is-closed' ) ); + $this->assertSame( '
        Text
        ', $new_html ); } /** @@ -319,13 +321,13 @@ public function test_wp_bind_replaces_value_if_true_in_aria_or_data_attributes() public function test_wp_bind_adds_value_if_false_in_aria_or_data_attributes() { $html = '
        Text
        '; list($p, $new_html) = $this->process_directives( $html ); - $this->assertEquals( 'false', $p->get_attribute( 'aria-hidden' ) ); - $this->assertEquals( '
        Text
        ', $new_html ); + $this->assertSame( 'false', $p->get_attribute( 'aria-hidden' ) ); + $this->assertSame( '
        Text
        ', $new_html ); $html = '
        Text
        '; list($p, $new_html) = $this->process_directives( $html ); - $this->assertEquals( 'false', $p->get_attribute( 'data-is-closed' ) ); - $this->assertEquals( '
        Text
        ', $new_html ); + $this->assertSame( 'false', $p->get_attribute( 'data-is-closed' ) ); + $this->assertSame( '
        Text
        ', $new_html ); } /** @@ -339,13 +341,13 @@ public function test_wp_bind_adds_value_if_false_in_aria_or_data_attributes() { public function test_wp_bind_replaces_value_if_false_in_aria_or_data_attributes() { $html = ''; list($p, $new_html) = $this->process_directives( $html ); - $this->assertEquals( 'false', $p->get_attribute( 'aria-hidden' ) ); - $this->assertEquals( '
        Text
        ', $new_html ); + $this->assertSame( 'false', $p->get_attribute( 'aria-hidden' ) ); + $this->assertSame( '
        Text
        ', $new_html ); $html = '
        Text
        '; list($p, $new_html) = $this->process_directives( $html ); - $this->assertEquals( 'false', $p->get_attribute( 'data-is-closed' ) ); - $this->assertEquals( '
        Text
        ', $new_html ); + $this->assertSame( 'false', $p->get_attribute( 'data-is-closed' ) ); + $this->assertSame( '
        Text
        ', $new_html ); } /** @@ -375,8 +377,21 @@ public function test_wp_bind_removes_value_if_null_in_aria_or_data_attributes() public function test_wp_bind_handles_nested_bindings() { $html = '
        '; list($p) = $this->process_directives( $html ); - $this->assertEquals( 'some-id', $p->get_attribute( 'id' ) ); + $this->assertSame( 'some-id', $p->get_attribute( 'id' ) ); $p->next_tag(); - $this->assertEquals( '100', $p->get_attribute( 'width' ) ); + $this->assertSame( '100', $p->get_attribute( 'width' ) ); + } + + /** + * Tests handling bindings to boolean values. + * + * @ticket 60758 + * + * @covers ::process_directives + */ + public function test_wp_bind_handles_true_value() { + $html = '
        '; + list($p) = $this->process_directives( $html ); + $this->assertSame( true, $p->get_attribute( 'id' ) ); } } From 6770127ae9c1a8442da614e838dbb223e507345d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Greg=20Zi=C3=83=C2=B3=C3=85=E2=80=9Akowski?= Date: Fri, 15 Mar 2024 11:15:11 +0000 Subject: [PATCH 177/251] Tests: Fix invalid @covers annotations for Interactivity API Follow-up [57563], #60356. Fixes #60757. Props jonsurrell, cbravobernal, swissspidy. git-svn-id: https://develop.svn.wordpress.org/trunk@57836 602fd350-edb4-49c9-b593-d223f7449a82 --- .../wpInteractivityAPI-wp-bind.php | 2 ++ .../wpInteractivityAPI-wp-class.php | 2 ++ .../wpInteractivityAPI-wp-context.php | 2 ++ .../wpInteractivityAPI-wp-each.php | 2 ++ .../wpInteractivityAPI-wp-interactive.php | 2 ++ .../wpInteractivityAPI-wp-router-region.php | 2 ++ .../wpInteractivityAPI-wp-style.php | 2 ++ .../wpInteractivityAPI-wp-text.php | 2 ++ .../wpInteractivityAPIFunctions.php | 24 +++++++++---------- 9 files changed, 28 insertions(+), 12 deletions(-) diff --git a/tests/phpunit/tests/interactivity-api/wpInteractivityAPI-wp-bind.php b/tests/phpunit/tests/interactivity-api/wpInteractivityAPI-wp-bind.php index 325eea59616f2..ef1b79326d949 100644 --- a/tests/phpunit/tests/interactivity-api/wpInteractivityAPI-wp-bind.php +++ b/tests/phpunit/tests/interactivity-api/wpInteractivityAPI-wp-bind.php @@ -6,6 +6,8 @@ * @package WordPress * @subpackage Interactivity API * + * @coversDefaultClass WP_Interactivity_API + * * @since 6.5.0 * * @group interactivity-api diff --git a/tests/phpunit/tests/interactivity-api/wpInteractivityAPI-wp-class.php b/tests/phpunit/tests/interactivity-api/wpInteractivityAPI-wp-class.php index 54c9ee5af5e42..95fdaed6f7504 100644 --- a/tests/phpunit/tests/interactivity-api/wpInteractivityAPI-wp-class.php +++ b/tests/phpunit/tests/interactivity-api/wpInteractivityAPI-wp-class.php @@ -8,6 +8,8 @@ * * @since 6.5.0 * + * @coversDefaultClass WP_Interactivity_API + * * @group interactivity-api */ class Tests_WP_Interactivity_API_WP_Class extends WP_UnitTestCase { diff --git a/tests/phpunit/tests/interactivity-api/wpInteractivityAPI-wp-context.php b/tests/phpunit/tests/interactivity-api/wpInteractivityAPI-wp-context.php index b56d38d05ec9b..469e1d6e1418a 100644 --- a/tests/phpunit/tests/interactivity-api/wpInteractivityAPI-wp-context.php +++ b/tests/phpunit/tests/interactivity-api/wpInteractivityAPI-wp-context.php @@ -8,6 +8,8 @@ * * @since 6.5.0 * + * @coversDefaultClass WP_Interactivity_API + * * @group interactivity-api */ class Tests_WP_Interactivity_API_WP_Context extends WP_UnitTestCase { diff --git a/tests/phpunit/tests/interactivity-api/wpInteractivityAPI-wp-each.php b/tests/phpunit/tests/interactivity-api/wpInteractivityAPI-wp-each.php index eea7f3f9fe8e7..42edd9f1b3838 100644 --- a/tests/phpunit/tests/interactivity-api/wpInteractivityAPI-wp-each.php +++ b/tests/phpunit/tests/interactivity-api/wpInteractivityAPI-wp-each.php @@ -6,6 +6,8 @@ * @package WordPress * @subpackage Interactivity API * + * @coversDefaultClass WP_Interactivity_API + * * @group interactivity-api */ class Tests_WP_Interactivity_API_WP_Each extends WP_UnitTestCase { diff --git a/tests/phpunit/tests/interactivity-api/wpInteractivityAPI-wp-interactive.php b/tests/phpunit/tests/interactivity-api/wpInteractivityAPI-wp-interactive.php index 277287a553ba3..65f4e4258b4e3 100644 --- a/tests/phpunit/tests/interactivity-api/wpInteractivityAPI-wp-interactive.php +++ b/tests/phpunit/tests/interactivity-api/wpInteractivityAPI-wp-interactive.php @@ -8,6 +8,8 @@ * * @since 6.5.0 * + * @coversDefaultClass WP_Interactivity_API + * * @group interactivity-api */ class Tests_WP_Interactivity_API_WP_Interactive extends WP_UnitTestCase { diff --git a/tests/phpunit/tests/interactivity-api/wpInteractivityAPI-wp-router-region.php b/tests/phpunit/tests/interactivity-api/wpInteractivityAPI-wp-router-region.php index a02ad6920b5a4..88a03e483db59 100644 --- a/tests/phpunit/tests/interactivity-api/wpInteractivityAPI-wp-router-region.php +++ b/tests/phpunit/tests/interactivity-api/wpInteractivityAPI-wp-router-region.php @@ -6,6 +6,8 @@ * @package WordPress * @subpackage Interactivity API * + * @coversDefaultClass WP_Interactivity_API + * * @group interactivity-api */ class Tests_WP_Interactivity_API_WP_Router_Region extends WP_UnitTestCase { diff --git a/tests/phpunit/tests/interactivity-api/wpInteractivityAPI-wp-style.php b/tests/phpunit/tests/interactivity-api/wpInteractivityAPI-wp-style.php index 46fa541fb79cc..d3ac196eae484 100644 --- a/tests/phpunit/tests/interactivity-api/wpInteractivityAPI-wp-style.php +++ b/tests/phpunit/tests/interactivity-api/wpInteractivityAPI-wp-style.php @@ -8,6 +8,8 @@ * * @since 6.5.0 * + * @coversDefaultClass WP_Interactivity_API + * * @group interactivity-api */ class Tests_WP_Interactivity_API_WP_Style extends WP_UnitTestCase { diff --git a/tests/phpunit/tests/interactivity-api/wpInteractivityAPI-wp-text.php b/tests/phpunit/tests/interactivity-api/wpInteractivityAPI-wp-text.php index b33ad7c82761f..2fa9363ac93f4 100644 --- a/tests/phpunit/tests/interactivity-api/wpInteractivityAPI-wp-text.php +++ b/tests/phpunit/tests/interactivity-api/wpInteractivityAPI-wp-text.php @@ -8,6 +8,8 @@ * * @since 6.5.0 * + * @coversDefaultClass WP_Interactivity_API + * * @group interactivity-api */ class Tests_WP_Interactivity_API_WP_Text extends WP_UnitTestCase { diff --git a/tests/phpunit/tests/interactivity-api/wpInteractivityAPIFunctions.php b/tests/phpunit/tests/interactivity-api/wpInteractivityAPIFunctions.php index 8433895f058e0..a9e7adaf828e2 100644 --- a/tests/phpunit/tests/interactivity-api/wpInteractivityAPIFunctions.php +++ b/tests/phpunit/tests/interactivity-api/wpInteractivityAPIFunctions.php @@ -69,7 +69,7 @@ public function tear_down() { * * @ticket 60356 * - * @covers ::wp_interactivity_process_directives_of_interactive_blocks + * @covers wp_interactivity_process_directives_of_interactive_blocks */ public function test_processs_directives_of_single_interactive_block() { $post_content = ''; @@ -85,7 +85,7 @@ public function test_processs_directives_of_single_interactive_block() { * * @ticket 60356 * - * @covers ::wp_interactivity_process_directives_of_interactive_blocks + * @covers wp_interactivity_process_directives_of_interactive_blocks */ public function test_processs_directives_of_multiple_interactive_blocks_in_paralell() { $post_content = ' @@ -111,7 +111,7 @@ public function test_processs_directives_of_multiple_interactive_blocks_in_paral * * @ticket 60356 * - * @covers ::wp_interactivity_process_directives_of_interactive_blocks + * @covers wp_interactivity_process_directives_of_interactive_blocks */ public function test_processs_directives_of_interactive_block_inside_non_interactive_block() { $post_content = ' @@ -131,7 +131,7 @@ public function test_processs_directives_of_interactive_block_inside_non_interac * * @ticket 60356 * - * @covers ::wp_interactivity_process_directives_of_interactive_blocks + * @covers wp_interactivity_process_directives_of_interactive_blocks */ public function test_processs_directives_of_multple_interactive_blocks_inside_non_interactive_block() { $post_content = ' @@ -154,7 +154,7 @@ public function test_processs_directives_of_multple_interactive_blocks_inside_no * * @ticket 60356 * - * @covers ::wp_interactivity_process_directives_of_interactive_blocks + * @covers wp_interactivity_process_directives_of_interactive_blocks */ public function test_processs_directives_of_interactive_block_inside_multple_non_interactive_block() { $post_content = ' @@ -179,7 +179,7 @@ public function test_processs_directives_of_interactive_block_inside_multple_non * * @ticket 60356 * - * @covers ::wp_interactivity_process_directives_of_interactive_blocks + * @covers wp_interactivity_process_directives_of_interactive_blocks */ public function test_processs_directives_of_interactive_block_containing_non_interactive_block_without_directives() { $post_content = ' @@ -201,7 +201,7 @@ public function test_processs_directives_of_interactive_block_containing_non_int * * @ticket 60356 * - * @covers ::wp_interactivity_process_directives_of_interactive_blocks + * @covers wp_interactivity_process_directives_of_interactive_blocks */ public function test_processs_directives_of_interactive_block_containing_non_interactive_block_with_directives() { $post_content = ' @@ -224,7 +224,7 @@ public function test_processs_directives_of_interactive_block_containing_non_int * * @ticket 60356 * - * @covers ::wp_interactivity_process_directives_of_interactive_blocks + * @covers wp_interactivity_process_directives_of_interactive_blocks */ public function test_processs_directives_of_interactive_block_containing_nested_interactive_and_non_interactive_blocks() { $post_content = ' @@ -277,7 +277,7 @@ public function data_wp_test_processor( $p ) { * * @ticket 60356 * - * @covers ::wp_interactivity_process_directives_of_interactive_blocks + * @covers wp_interactivity_process_directives_of_interactive_blocks */ public function test_process_directives_only_process_the_root_interactive_blocks() { $class = new ReflectionClass( 'WP_Interactivity_API' ); @@ -352,7 +352,7 @@ function test_render_block_data( $parsed_block ) { * * @ticket 60356 * - * @covers ::wp_interactivity_data_wp_context + * @covers wp_interactivity_data_wp_context */ public function test_wp_interactivity_data_wp_context_with_different_arrays() { $this->assertEquals( 'data-wp-context=\'{}\'', wp_interactivity_data_wp_context( array() ) ); @@ -382,7 +382,7 @@ public function test_wp_interactivity_data_wp_context_with_different_arrays() { * * @ticket 60356 * - * @covers ::wp_interactivity_data_wp_context + * @covers wp_interactivity_data_wp_context */ public function test_wp_interactivity_data_wp_context_with_different_arrays_and_a_namespace() { $this->assertEquals( 'data-wp-context=\'myPlugin::{}\'', wp_interactivity_data_wp_context( array(), 'myPlugin' ) ); @@ -415,7 +415,7 @@ public function test_wp_interactivity_data_wp_context_with_different_arrays_and_ * * @ticket 60356 * - * @covers ::wp_interactivity_data_wp_context + * @covers wp_interactivity_data_wp_context */ public function test_wp_interactivity_data_wp_context_with_json_flags() { $this->assertEquals( 'data-wp-context=\'{"tag":"\u003Cfoo\u003E"}\'', wp_interactivity_data_wp_context( array( 'tag' => '' ) ) ); From b4dea6b05629b12740105d706b83e36eeeb72e5d Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Fri, 15 Mar 2024 11:23:18 +0000 Subject: [PATCH 178/251] REST API: Prevent error when passing invalid `type` parameter to search endpoint. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In `WP_REST_Search_Controller`, the `type` parameter is accessed via the sanitization callback for the `subtype` parameter, which is too early for `type` itself to be already sanitized. This change adds a type check in the `get_search_handler()` method to prevent errors when the type doesn’t match. Props swissspidy, timothyblynjacobs, dd32. Fixes #60771. git-svn-id: https://develop.svn.wordpress.org/trunk@57839 602fd350-edb4-49c9-b593-d223f7449a82 --- .../endpoints/class-wp-rest-search-controller.php | 2 +- .../tests/rest-api/rest-search-controller.php | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-search-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-search-controller.php index cc1c302b9c42b..55fe1ad63ae7a 100644 --- a/src/wp-includes/rest-api/endpoints/class-wp-rest-search-controller.php +++ b/src/wp-includes/rest-api/endpoints/class-wp-rest-search-controller.php @@ -395,7 +395,7 @@ public function sanitize_subtypes( $subtypes, $request, $parameter ) { protected function get_search_handler( $request ) { $type = $request->get_param( self::PROP_TYPE ); - if ( ! $type || ! isset( $this->search_handlers[ $type ] ) ) { + if ( ! $type || ! is_string( $type ) || ! isset( $this->search_handlers[ $type ] ) ) { return new WP_Error( 'rest_search_invalid_type', __( 'Invalid type parameter.' ), diff --git a/tests/phpunit/tests/rest-api/rest-search-controller.php b/tests/phpunit/tests/rest-api/rest-search-controller.php index 7345d45f8632f..668cfb4e6bdeb 100644 --- a/tests/phpunit/tests/rest-api/rest-search-controller.php +++ b/tests/phpunit/tests/rest-api/rest-search-controller.php @@ -888,4 +888,18 @@ public function test_get_items_search_terms_exclude_ids() { wp_list_pluck( $response->get_data(), 'id' ) ); } + + /** + * @ticket 60771 + */ + public function test_sanitize_subtypes_validates_type() { + $response = $this->do_request_with_params( + array( + 'subtype' => 'page', + 'type' => array( 'invalid' ), + ) + ); + + $this->assertErrorResponse( 'rest_invalid_param', $response, 400 ); + } } From 2915f33c1eef821e286598953a9a90c3ee2cfe70 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Fri, 15 Mar 2024 11:27:12 +0000 Subject: [PATCH 179/251] Script Loader: Add new `script_module_loader_src` filter for the script module `src`. Ensures parity with the `script_loader_src` filter for regular scripts, allowing the URL to be filtered, for example to load them from a CDN or alter query parameters. Props dd32, peterwilsoncc, westonruter. Fixes #60742. git-svn-id: https://develop.svn.wordpress.org/trunk@57840 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class-wp-script-modules.php | 38 +++++++---- .../tests/script-modules/wpScriptModules.php | 66 +++++++++++++------ 2 files changed, 71 insertions(+), 33 deletions(-) diff --git a/src/wp-includes/class-wp-script-modules.php b/src/wp-includes/class-wp-script-modules.php index 9bf6ce33e7420..89d12a6b3ff31 100644 --- a/src/wp-includes/class-wp-script-modules.php +++ b/src/wp-includes/class-wp-script-modules.php @@ -191,7 +191,7 @@ public function print_enqueued_script_modules() { wp_print_script_tag( array( 'type' => 'module', - 'src' => $this->get_versioned_src( $script_module ), + 'src' => $this->get_src( $id ), 'id' => $id . '-js-module', ) ); @@ -212,7 +212,7 @@ public function print_script_module_preloads() { if ( true !== $script_module['enqueue'] ) { echo sprintf( '', - esc_url( $this->get_versioned_src( $script_module ) ), + esc_url( $this->get_src( $id ) ), esc_attr( $id . '-js-modulepreload' ) ); } @@ -264,7 +264,7 @@ public function print_import_map() { private function get_import_map(): array { $imports = array(); foreach ( $this->get_dependencies( array_keys( $this->get_marked_for_enqueue() ) ) as $id => $script_module ) { - $imports[ $id ] = $this->get_versioned_src( $script_module ); + $imports[ $id ] = $this->get_src( $id ); } return array( 'imports' => $imports ); } @@ -331,19 +331,33 @@ function ( $dependency_script_modules, $id ) use ( $import_types ) { * * @since 6.5.0 * - * @param array $script_module The script module. + * @param string $id The script module identifier. * @return string The script module src with a version if relevant. */ - private function get_versioned_src( array $script_module ): string { - $args = array(); + private function get_src( string $id ): string { + if ( ! isset( $this->registered[ $id ] ) ) { + return ''; + } + + $script_module = $this->registered[ $id ]; + $src = $script_module['src']; + if ( false === $script_module['version'] ) { - $args['ver'] = get_bloginfo( 'version' ); + $src = add_query_arg( 'ver', get_bloginfo( 'version' ), $src ); } elseif ( null !== $script_module['version'] ) { - $args['ver'] = $script_module['version']; + $src = add_query_arg( 'ver', $script_module['version'], $src ); } - if ( $args ) { - return add_query_arg( $args, $script_module['src'] ); - } - return $script_module['src']; + + /** + * Filters the script module source. + * + * @since 6.5.0 + * + * @param string $src Module source url. + * @param string $id Module identifier. + */ + $src = apply_filters( 'script_module_loader_src', $src, $id ); + + return $src; } } diff --git a/tests/phpunit/tests/script-modules/wpScriptModules.php b/tests/phpunit/tests/script-modules/wpScriptModules.php index bc0a5a8559c24..d8562b1c5e222 100644 --- a/tests/phpunit/tests/script-modules/wpScriptModules.php +++ b/tests/phpunit/tests/script-modules/wpScriptModules.php @@ -512,48 +512,72 @@ public function test_wp_enqueued_script_modules_with_dependants_add_import_map() } /** - * Tests the functionality of the `get_versioned_src` method to ensure + * Tests the functionality of the `get_src` method to ensure * proper URLs with version strings are returned. * * @ticket 56313 * - * @covers ::get_versioned_src() + * @covers ::get_src() */ - public function test_get_versioned_src() { - $get_versioned_src = new ReflectionMethod( $this->script_modules, 'get_versioned_src' ); - $get_versioned_src->setAccessible( true ); + public function test_get_src() { + $get_src = new ReflectionMethod( $this->script_modules, 'get_src' ); + $get_src->setAccessible( true ); - $module_with_version = array( - 'src' => 'http://example.com/module.js', - 'version' => '1.0', + $this->script_modules->register( + 'module_with_version', + 'http://example.com/module.js', + array(), + '1.0' ); - $result = $get_versioned_src->invoke( $this->script_modules, $module_with_version ); + $result = $get_src->invoke( $this->script_modules, 'module_with_version' ); $this->assertEquals( 'http://example.com/module.js?ver=1.0', $result ); - $module_without_version = array( - 'src' => 'http://example.com/module.js', - 'version' => null, + $this->script_modules->register( + 'module_without_version', + 'http://example.com/module.js', + array(), + null ); - $result = $get_versioned_src->invoke( $this->script_modules, $module_without_version ); + $result = $get_src->invoke( $this->script_modules, 'module_without_version' ); $this->assertEquals( 'http://example.com/module.js', $result ); - $module_with_wp_version = array( - 'src' => 'http://example.com/module.js', - 'version' => false, + $this->script_modules->register( + 'module_with_wp_version', + 'http://example.com/module.js', + array(), + false ); - $result = $get_versioned_src->invoke( $this->script_modules, $module_with_wp_version ); + $result = $get_src->invoke( $this->script_modules, 'module_with_wp_version' ); $this->assertEquals( 'http://example.com/module.js?ver=' . get_bloginfo( 'version' ), $result ); - $module_with_existing_query_string = array( - 'src' => 'http://example.com/module.js?foo=bar', - 'version' => '1.0', + $this->script_modules->register( + 'module_with_existing_query_string', + 'http://example.com/module.js?foo=bar', + array(), + '1.0' ); - $result = $get_versioned_src->invoke( $this->script_modules, $module_with_existing_query_string ); + $result = $get_src->invoke( $this->script_modules, 'module_with_existing_query_string' ); $this->assertEquals( 'http://example.com/module.js?foo=bar&ver=1.0', $result ); + + // Filter the version to include the ID in the final URL, to test the filter, this should affect the tests below. + add_filter( + 'script_module_loader_src', + function ( $src, $id ) { + return add_query_arg( 'script_module_id', urlencode( $id ), $src ); + }, + 10, + 2 + ); + + $result = $get_src->invoke( $this->script_modules, 'module_without_version' ); + $this->assertEquals( 'http://example.com/module.js?script_module_id=module_without_version', $result ); + + $result = $get_src->invoke( $this->script_modules, 'module_with_existing_query_string' ); + $this->assertEquals( 'http://example.com/module.js?foo=bar&ver=1.0&script_module_id=module_with_existing_query_string', $result ); } /** From 04993f1a21371f6034c497401fba0e043ecd75e0 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Fri, 15 Mar 2024 12:10:49 +0000 Subject: [PATCH 180/251] =?UTF-8?q?Interactivity=20API:=20Do=20not=20print?= =?UTF-8?q?=20state=20if=20it=E2=80=99s=20an=20empty=20array.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This prunes stores and configurations that are empty arrays, as stores are expected to be JSON objects. By not printing empty configurations, less redundant data is serialized into the HTML. Props jonsurrell, luisherranz, darerodz, gziolo, swissspidy. Fixes #60761. git-svn-id: https://develop.svn.wordpress.org/trunk@57841 602fd350-edb4-49c9-b593-d223f7449a82 --- .../class-wp-interactivity-api.php | 34 ++++-- .../interactivity-api/wpInteractivityAPI.php | 106 ++++++++++++++++++ 2 files changed, 131 insertions(+), 9 deletions(-) diff --git a/src/wp-includes/interactivity-api/class-wp-interactivity-api.php b/src/wp-includes/interactivity-api/class-wp-interactivity-api.php index 98876eaf8ed53..3db539aae6992 100644 --- a/src/wp-includes/interactivity-api/class-wp-interactivity-api.php +++ b/src/wp-includes/interactivity-api/class-wp-interactivity-api.php @@ -140,20 +140,36 @@ public function config( string $store_namespace, array $config = array() ): arra * @since 6.5.0 */ public function print_client_interactivity_data() { - $store = array(); - $has_state = ! empty( $this->state_data ); - $has_config = ! empty( $this->config_data ); + if ( empty( $this->state_data ) && empty( $this->config_data ) ) { + return; + } + + $interactivity_data = array(); - if ( $has_state || $has_config ) { - if ( $has_config ) { - $store['config'] = $this->config_data; + $config = array(); + foreach ( $this->config_data as $key => $value ) { + if ( ! empty( $value ) ) { + $config[ $key ] = $value; } - if ( $has_state ) { - $store['state'] = $this->state_data; + } + if ( ! empty( $config ) ) { + $interactivity_data['config'] = $config; + } + + $state = array(); + foreach ( $this->state_data as $key => $value ) { + if ( ! empty( $value ) ) { + $state[ $key ] = $value; } + } + if ( ! empty( $state ) ) { + $interactivity_data['state'] = $state; + } + + if ( ! empty( $interactivity_data ) ) { wp_print_inline_script_tag( wp_json_encode( - $store, + $interactivity_data, JSON_HEX_TAG | JSON_HEX_AMP ), array( diff --git a/tests/phpunit/tests/interactivity-api/wpInteractivityAPI.php b/tests/phpunit/tests/interactivity-api/wpInteractivityAPI.php index 25b8379acd016..72dd9da8ed388 100644 --- a/tests/phpunit/tests/interactivity-api/wpInteractivityAPI.php +++ b/tests/phpunit/tests/interactivity-api/wpInteractivityAPI.php @@ -236,7 +236,113 @@ public function test_state_not_printed_when_empty() { $this->assertEquals( array( 'config' => array( 'myPlugin' => array( 'a' => 1 ) ) ), $result ); } + /** + * Tests that empty state objects are pruned from printed data. + * + * @ticket 60761 + * + * @covers ::print_client_interactivity_data + */ + public function test_state_not_printed_when_empty_array() { + $this->interactivity->state( 'pluginWithEmptyState_prune', array() ); + $this->interactivity->state( 'pluginWithState_include', array( 'value' => 'excellent' ) ); + $printed_script = get_echo( array( $this->interactivity, 'print_client_interactivity_data' ) ); + $expected = <<<'SCRIPT_TAG' + + +SCRIPT_TAG; + + $this->assertSame( $expected, $printed_script ); + } + + /** + * Tests that data consisting of only empty state objects is not printed. + * + * @ticket 60761 + * + * @covers ::print_client_interactivity_data + */ + public function test_state_not_printed_when_only_empty_arrays() { + $this->interactivity->state( 'pluginWithEmptyState_prune', array() ); + $printed_script = get_echo( array( $this->interactivity, 'print_client_interactivity_data' ) ); + $this->assertSame( '', $printed_script ); + } + + /** + * Tests that nested empty state objects are printed correctly. + * + * @ticket 60761 + * + * @covers ::print_client_interactivity_data + */ + public function test_state_printed_correctly_with_nested_empty_array() { + $this->interactivity->state( 'myPlugin', array( 'emptyArray' => array() ) ); + $printed_script = get_echo( array( $this->interactivity, 'print_client_interactivity_data' ) ); + $expected = <<<'SCRIPT_TAG' + + +SCRIPT_TAG; + + $this->assertSame( $expected, $printed_script ); + } + /** + * Tests that empty config objects are pruned from printed data. + * + * @ticket 60761 + * + * @covers ::print_client_interactivity_data + */ + public function test_config_not_printed_when_empty_array() { + $this->interactivity->config( 'pluginWithEmptyConfig_prune', array() ); + $this->interactivity->config( 'pluginWithConfig_include', array( 'value' => 'excellent' ) ); + $printed_script = get_echo( array( $this->interactivity, 'print_client_interactivity_data' ) ); + $expected = <<<'SCRIPT_TAG' + + +SCRIPT_TAG; + + $this->assertSame( $expected, $printed_script ); + } + + /** + * Tests that data consisting of only empty config objects is not printed. + * + * @ticket 60761 + * + * @covers ::print_client_interactivity_data + */ + public function test_config_not_printed_when_only_empty_arrays() { + $this->interactivity->config( 'pluginWithEmptyConfig_prune', array() ); + $printed_script = get_echo( array( $this->interactivity, 'print_client_interactivity_data' ) ); + $this->assertSame( '', $printed_script ); + } + + /** + * Tests that nested empty config objects are printed correctly. + * + * @ticket 60761 + * + * @covers ::print_client_interactivity_data + */ + public function test_config_printed_correctly_with_nested_empty_array() { + $this->interactivity->config( 'myPlugin', array( 'emptyArray' => array() ) ); + $printed_script = get_echo( array( $this->interactivity, 'print_client_interactivity_data' ) ); + $expected = <<<'SCRIPT_TAG' + + +SCRIPT_TAG; + + $this->assertSame( $expected, $printed_script ); + } /** * Tests that special characters in the initial state and configuration are From ded1d8671ffd6cdd90cbfbbafe6226332cefec50 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 15 Mar 2024 13:38:36 +0000 Subject: [PATCH 181/251] Twenty Twenty: Use the `$theme_version` variable for font stylesheet. This aims to bring more consistency with the other `wp_enqueue_style()` calls in the theme's functions. Follow-up to [57311]. Props sabernhardt. Fixes #60779. git-svn-id: https://develop.svn.wordpress.org/trunk@57842 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-content/themes/twentytwenty/functions.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/wp-content/themes/twentytwenty/functions.php b/src/wp-content/themes/twentytwenty/functions.php index ded96095eb7e1..515cdb13148dd 100644 --- a/src/wp-content/themes/twentytwenty/functions.php +++ b/src/wp-content/themes/twentytwenty/functions.php @@ -192,7 +192,7 @@ function twentytwenty_register_styles() { wp_style_add_data( 'twentytwenty-style', 'rtl', 'replace' ); // Enqueue the CSS file for the variable font, Inter. - wp_enqueue_style( 'twentytwenty-fonts', get_theme_file_uri( '/assets/css/font-inter.css' ), array(), wp_get_theme()->get( 'Version' ), 'all' ); + wp_enqueue_style( 'twentytwenty-fonts', get_theme_file_uri( '/assets/css/font-inter.css' ), array(), $theme_version, 'all' ); // Add output of Customizer settings as inline style. $customizer_css = twentytwenty_get_customizer_css( 'front-end' ); @@ -425,8 +425,10 @@ function twentytwenty_sidebar_registration() { */ function twentytwenty_block_editor_styles() { + $theme_version = wp_get_theme()->get( 'Version' ); + // Enqueue the editor styles. - wp_enqueue_style( 'twentytwenty-block-editor-styles', get_theme_file_uri( '/assets/css/editor-style-block.css' ), array(), wp_get_theme()->get( 'Version' ), 'all' ); + wp_enqueue_style( 'twentytwenty-block-editor-styles', get_theme_file_uri( '/assets/css/editor-style-block.css' ), array(), $theme_version, 'all' ); wp_style_add_data( 'twentytwenty-block-editor-styles', 'rtl', 'replace' ); // Add inline style from the Customizer. @@ -436,7 +438,7 @@ function twentytwenty_block_editor_styles() { } // Enqueue the CSS file for the variable font, Inter. - wp_enqueue_style( 'twentytwenty-fonts', get_theme_file_uri( '/assets/css/font-inter.css' ), array(), wp_get_theme()->get( 'Version' ), 'all' ); + wp_enqueue_style( 'twentytwenty-fonts', get_theme_file_uri( '/assets/css/font-inter.css' ), array(), $theme_version, 'all' ); // Add inline style for non-latin fonts. $custom_css = TwentyTwenty_Non_Latin_Languages::get_non_latin_css( 'block-editor' ); From 26da754a50d5c290f71dd2c944dca590984920e6 Mon Sep 17 00:00:00 2001 From: Joe Dolson Date: Fri, 15 Mar 2024 16:35:18 +0000 Subject: [PATCH 182/251] Media: Fall back to available icons if SVG media icons not found. Follow up to [57687]. If no icons of the preferred type are available, then the icon array should return the collection of valid icons found, rather than an empty array. Props sabernhardt, swissspidy, sabernhardt, antpb, joedolson. Fixes #60740. git-svn-id: https://develop.svn.wordpress.org/trunk@57845 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/post.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/wp-includes/post.php b/src/wp-includes/post.php index 2a02400bd1d6a..7645043a4786e 100644 --- a/src/wp-includes/post.php +++ b/src/wp-includes/post.php @@ -6868,6 +6868,7 @@ function wp_mime_type_icon( $mime = 0, $preferred_ext = '.png' ) { */ $dirs = apply_filters( 'icon_dirs', array( $icon_dir => $icon_dir_uri ) ); $icon_files = array(); + $all_icons = array(); while ( $dirs ) { $keys = array_keys( $dirs ); $dir = array_shift( $keys ); @@ -6887,6 +6888,7 @@ function wp_mime_type_icon( $mime = 0, $preferred_ext = '.png' ) { } continue; } + $all_icons[ "$dir/$file" ] = "$uri/$file"; if ( $ext === $preferred_ext ) { $icon_files[ "$dir/$file" ] = "$uri/$file"; } @@ -6894,6 +6896,10 @@ function wp_mime_type_icon( $mime = 0, $preferred_ext = '.png' ) { closedir( $dh ); } } + // If directory only contained icons of a non-preferred format, return those. + if ( empty( $icon_files ) ) { + $icon_files = $all_icons; + } wp_cache_add( 'icon_files', $icon_files, 'default', 600 ); } From 47d26758cb6e9e51b79daf03fc37de93ea5a8d06 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sat, 16 Mar 2024 13:16:16 +0000 Subject: [PATCH 183/251] Coding Standards: Use strict comparison in `wp-includes/class-wp-theme.php`. Follow-up to [20029], [20119], [20144]. Props aristath, poena, afercia, SergeyBiryukov. See #60700. git-svn-id: https://develop.svn.wordpress.org/trunk@57847 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class-wp-theme.php | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/wp-includes/class-wp-theme.php b/src/wp-includes/class-wp-theme.php index e6eeb8ca5dfaf..9833981dfef49 100644 --- a/src/wp-includes/class-wp-theme.php +++ b/src/wp-includes/class-wp-theme.php @@ -352,7 +352,7 @@ public function __construct( $theme_dir, $theme_root, $_child = null ) { */ $default_theme_slug = array_search( $this->headers['Name'], self::$default_themes, true ); if ( $default_theme_slug ) { - if ( basename( $this->stylesheet ) != $default_theme_slug ) { + if ( basename( $this->stylesheet ) !== $default_theme_slug ) { $this->headers['Name'] .= '/' . $this->stylesheet; } } @@ -417,7 +417,10 @@ public function __construct( $theme_dir, $theme_root, $_child = null ) { } // If we got our data from cache, we can assume that 'template' is pointing to the right place. - if ( ! is_array( $cache ) && $this->template != $this->stylesheet && ! file_exists( $this->theme_root . '/' . $this->template . '/index.php' ) ) { + if ( ! is_array( $cache ) + && $this->template !== $this->stylesheet + && ! file_exists( $this->theme_root . '/' . $this->template . '/index.php' ) + ) { /* * If we're in a directory of themes inside /themes, look for the parent nearby. * wp-content/themes/directory-of-themes/* @@ -425,7 +428,9 @@ public function __construct( $theme_dir, $theme_root, $_child = null ) { $parent_dir = dirname( $this->stylesheet ); $directories = search_theme_directories(); - if ( '.' !== $parent_dir && file_exists( $this->theme_root . '/' . $parent_dir . '/' . $this->template . '/index.php' ) ) { + if ( '.' !== $parent_dir + && file_exists( $this->theme_root . '/' . $parent_dir . '/' . $this->template . '/index.php' ) + ) { $this->template = $parent_dir . '/' . $this->template; } elseif ( $directories && isset( $directories[ $this->template ] ) ) { /* @@ -460,9 +465,9 @@ public function __construct( $theme_dir, $theme_root, $_child = null ) { } // Set the parent, if we're a child theme. - if ( $this->template != $this->stylesheet ) { + if ( $this->template !== $this->stylesheet ) { // If we are a parent, then there is a problem. Only two generations allowed! Cancel things out. - if ( $_child instanceof WP_Theme && $_child->template == $this->stylesheet ) { + if ( $_child instanceof WP_Theme && $_child->template === $this->stylesheet ) { $_child->parent = null; $_child->errors = new WP_Error( 'theme_parent_invalid', @@ -484,7 +489,7 @@ public function __construct( $theme_dir, $theme_root, $_child = null ) { ) ); // The two themes actually reference each other with the Template header. - if ( $_child->stylesheet == $this->template ) { + if ( $_child->stylesheet === $this->template ) { $this->errors = new WP_Error( 'theme_parent_invalid', sprintf( @@ -1714,7 +1719,7 @@ public static function get_allowed_on_site( $blog_id = null ) { return (array) apply_filters( 'site_allowed_themes', $allowed_themes[ $blog_id ], $blog_id ); } - $current = get_current_blog_id() == $blog_id; + $current = get_current_blog_id() === $blog_id; if ( $current ) { $allowed_themes[ $blog_id ] = get_option( 'allowedthemes' ); From 17415a747166e0c90bcf8417d689ad9c556fb90b Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 17 Mar 2024 09:54:21 +0000 Subject: [PATCH 184/251] Coding Standards: Use strict comparison in `wp-includes/class-wp-walker.php`. Follow-up to [6384], [6456], [6858], [8494], [8961]. Props aristath, poena, afercia, SergeyBiryukov. See #60700. git-svn-id: https://develop.svn.wordpress.org/trunk@57848 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class-wp-walker.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/wp-includes/class-wp-walker.php b/src/wp-includes/class-wp-walker.php index e44907ee70884..ff5eac2f50040 100644 --- a/src/wp-includes/class-wp-walker.php +++ b/src/wp-includes/class-wp-walker.php @@ -147,7 +147,7 @@ public function display_element( $element, &$children_elements, $max_depth, $dep $this->start_el( $output, $element, $depth, ...array_values( $args ) ); // Descend only when the depth is right and there are children for this element. - if ( ( 0 == $max_depth || $max_depth > $depth + 1 ) && isset( $children_elements[ $id ] ) ) { + if ( ( 0 === $max_depth || $max_depth > $depth + 1 ) && isset( $children_elements[ $id ] ) ) { foreach ( $children_elements[ $id ] as $child ) { @@ -199,7 +199,7 @@ public function walk( $elements, $max_depth, ...$args ) { $parent_field = $this->db_fields['parent']; // Flat display. - if ( -1 == $max_depth ) { + if ( -1 === $max_depth ) { $empty_array = array(); foreach ( $elements as $e ) { $this->display_element( $e, $empty_array, 1, 0, $args, $output ); @@ -235,7 +235,7 @@ public function walk( $elements, $max_depth, ...$args ) { $top_level_elements = array(); $children_elements = array(); foreach ( $elements as $e ) { - if ( $root->$parent_field == $e->$parent_field ) { + if ( $root->$parent_field === $e->$parent_field ) { $top_level_elements[] = $e; } else { $children_elements[ $e->$parent_field ][] = $e; @@ -251,7 +251,7 @@ public function walk( $elements, $max_depth, ...$args ) { * If we are displaying all levels, and remaining children_elements is not empty, * then we got orphans, which should be displayed regardless. */ - if ( ( 0 == $max_depth ) && count( $children_elements ) > 0 ) { + if ( ( 0 === $max_depth ) && count( $children_elements ) > 0 ) { $empty_array = array(); foreach ( $children_elements as $orphans ) { foreach ( $orphans as $op ) { @@ -294,14 +294,14 @@ public function paged_walk( $elements, $max_depth, $page_num, $per_page, ...$arg $parent_field = $this->db_fields['parent']; $count = -1; - if ( -1 == $max_depth ) { + if ( -1 === $max_depth ) { $total_top = count( $elements ); } if ( $page_num < 1 || $per_page < 0 ) { // No paging. $paging = false; $start = 0; - if ( -1 == $max_depth ) { + if ( -1 === $max_depth ) { $end = $total_top; } $this->max_pages = 1; @@ -309,13 +309,13 @@ public function paged_walk( $elements, $max_depth, $page_num, $per_page, ...$arg $paging = true; $start = ( (int) $page_num - 1 ) * (int) $per_page; $end = $start + $per_page; - if ( -1 == $max_depth ) { + if ( -1 === $max_depth ) { $this->max_pages = (int) ceil( $total_top / $per_page ); } } // Flat display. - if ( -1 == $max_depth ) { + if ( -1 === $max_depth ) { if ( ! empty( $args[0]['reverse_top_level'] ) ) { $elements = array_reverse( $elements ); $oldstart = $start; From 3d3d5106971ae78845dfbd2983fc1c356f0d5a4e Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Mon, 18 Mar 2024 09:25:33 +0000 Subject: [PATCH 185/251] Build/Test Tools: Make `WP_Filesystem_Direct` tests more robust. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Follow-up to [57753] to make tests more robust, as there were multiple permission-related errors in the hosting test results. With this change, the tests now don’t try setting an owner that doesn’t exist. Props peterwilsoncc, costdev, javiercasares. See #57774. git-svn-id: https://develop.svn.wordpress.org/trunk@57849 602fd350-edb4-49c9-b593-d223f7449a82 --- .../tests/filesystem/wpFilesystemDirect/mkdir.php | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/tests/phpunit/tests/filesystem/wpFilesystemDirect/mkdir.php b/tests/phpunit/tests/filesystem/wpFilesystemDirect/mkdir.php index 53fc1575f32c7..0d87bd536b51d 100644 --- a/tests/phpunit/tests/filesystem/wpFilesystemDirect/mkdir.php +++ b/tests/phpunit/tests/filesystem/wpFilesystemDirect/mkdir.php @@ -159,16 +159,15 @@ public function test_should_set_owner() { rmdir( $path ); - $expected_group = $this->is_windows() ? $original_owner : $original_owner + 1; - $created = self::$filesystem->mkdir( $path, 0755, $expected_group ); - $owner = fileowner( $path ); + $created = self::$filesystem->mkdir( $path, 0755, $original_owner ); + $owner = fileowner( $path ); if ( $path !== self::$file_structure['test_dir']['path'] && is_dir( $path ) ) { rmdir( $path ); } $this->assertTrue( $created, 'The directory was not created.' ); - $this->assertSame( $expected_group, $owner, 'The owner is incorrect.' ); + $this->assertSame( $original_owner, $owner, 'The owner is incorrect.' ); } /** @@ -197,15 +196,14 @@ public function test_should_set_group() { rmdir( $path ); - $expected_group = $this->is_windows() ? $original_group : $original_group + 1; - $created = self::$filesystem->mkdir( $path, 0755, false, $expected_group ); - $group = filegroup( $path ); + $created = self::$filesystem->mkdir( $path, 0755, false, $original_group ); + $group = filegroup( $path ); if ( $path !== self::$file_structure['test_dir']['path'] && is_dir( $path ) ) { rmdir( $path ); } $this->assertTrue( $created, 'The directory was not created.' ); - $this->assertSame( $expected_group, $group, 'The group is incorrect.' ); + $this->assertSame( $original_group, $group, 'The group is incorrect.' ); } } From 6a0e4aa570b6b9e7ce6d630b8d92e2f5091aac6b Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 18 Mar 2024 15:44:25 +0000 Subject: [PATCH 186/251] Coding Standards: Use strict comparison in `wp-includes/class-walker-comment.php`. Follow-up to [8869], [9207], [23694], [47887]. Props aristath, poena, afercia, SergeyBiryukov. See #60700. git-svn-id: https://develop.svn.wordpress.org/trunk@57850 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class-walker-comment.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/wp-includes/class-walker-comment.php b/src/wp-includes/class-walker-comment.php index 825a28334b14f..3d2eb012e4903 100644 --- a/src/wp-includes/class-walker-comment.php +++ b/src/wp-includes/class-walker-comment.php @@ -278,7 +278,7 @@ public function filter_comment_text( $comment_text, $comment ) { $commenter = wp_get_current_commenter(); $show_pending_links = ! empty( $commenter['comment_author'] ); - if ( $comment && '0' == $comment->comment_approved && ! $show_pending_links ) { + if ( $comment && '0' === $comment->comment_approved && ! $show_pending_links ) { $comment_text = wp_kses( $comment_text, array() ); } @@ -320,14 +320,14 @@ protected function comment( $comment, $depth, $args ) {
        comment_approved && ! $show_pending_links ) { + if ( '0' === $comment->comment_approved && ! $show_pending_links ) { $comment_author = get_comment_author( $comment ); } @@ -338,7 +338,7 @@ protected function comment( $comment, $depth, $args ) { ); ?>
        - comment_approved ) : ?> + comment_approved ) : ?>
        @@ -423,14 +423,14 @@ protected function html5_comment( $comment, $depth, $args ) {
        comment_approved && ! $show_pending_links ) { + if ( '0' === $comment->comment_approved && ! $show_pending_links ) { $comment_author = get_comment_author( $comment ); } @@ -460,7 +460,7 @@ protected function html5_comment( $comment, $depth, $args ) { ?>
        - comment_approved ) : ?> + comment_approved ) : ?>
        @@ -470,7 +470,7 @@ protected function html5_comment( $comment, $depth, $args ) {
    comment_approved || $show_pending_links ) { + if ( '1' === $comment->comment_approved || $show_pending_links ) { comment_reply_link( array_merge( $args, From fb4a538a00700b4ee7cc5f9a2cc65f6eec9d73c7 Mon Sep 17 00:00:00 2001 From: Riad Benguella Date: Tue, 19 Mar 2024 08:05:48 +0000 Subject: [PATCH 187/251] Editor: Update Packages with the latest bug fixes for 6.5 RC 3 It includes all the backports from this Gutenberg PR https://github.com/WordPress/gutenberg/pull/59949/ Props get_dave, youknowriad. See #60315. git-svn-id: https://develop.svn.wordpress.org/trunk@57851 602fd350-edb4-49c9-b593-d223f7449a82 --- package-lock.json | 126 +++++++++--------- package.json | 14 +- .../assets/script-loader-packages.min.php | 2 +- src/wp-includes/blocks/navigation.php | 12 +- 4 files changed, 81 insertions(+), 73 deletions(-) diff --git a/package-lock.json b/package-lock.json index 86c64d697bf18..76958fb309de1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,7 +16,7 @@ "@wordpress/blob": "3.51.1", "@wordpress/block-directory": "4.28.7", "@wordpress/block-editor": "12.19.6", - "@wordpress/block-library": "8.28.7", + "@wordpress/block-library": "8.28.8", "@wordpress/block-serialization-default-parser": "4.51.1", "@wordpress/blocks": "12.28.6", "@wordpress/commands": "0.22.5", @@ -24,7 +24,7 @@ "@wordpress/compose": "6.28.1", "@wordpress/core-commands": "0.20.6", "@wordpress/core-data": "6.28.6", - "@wordpress/customize-widgets": "4.28.7", + "@wordpress/customize-widgets": "4.28.8", "@wordpress/data": "9.21.1", "@wordpress/data-controls": "3.20.1", "@wordpress/dataviews": "0.5.6", @@ -32,9 +32,9 @@ "@wordpress/deprecated": "3.51.1", "@wordpress/dom": "3.51.1", "@wordpress/dom-ready": "3.51.1", - "@wordpress/edit-post": "7.28.7", - "@wordpress/edit-site": "5.28.7", - "@wordpress/edit-widgets": "5.28.7", + "@wordpress/edit-post": "7.28.8", + "@wordpress/edit-site": "5.28.8", + "@wordpress/edit-widgets": "5.28.8", "@wordpress/editor": "13.28.6", "@wordpress/element": "5.28.1", "@wordpress/escape-html": "2.51.1", @@ -43,8 +43,8 @@ "@wordpress/html-entities": "3.51.1", "@wordpress/i18n": "4.51.1", "@wordpress/icons": "9.42.4", - "@wordpress/interactivity": "5.0.4", - "@wordpress/interactivity-router": "1.1.4", + "@wordpress/interactivity": "5.0.5", + "@wordpress/interactivity-router": "1.1.5", "@wordpress/interface": "5.28.5", "@wordpress/is-shallow-equal": "4.51.1", "@wordpress/keyboard-shortcuts": "4.28.1", @@ -6288,9 +6288,9 @@ } }, "node_modules/@wordpress/block-library": { - "version": "8.28.7", - "resolved": "https://registry.npmjs.org/@wordpress/block-library/-/block-library-8.28.7.tgz", - "integrity": "sha512-j1nJ7iOnJSHoR/WNuDg5+HJZhQlXF6JkkYD7sO1fKSFEBxaTyL9SlL2gegOi1KFgUvEdeaflyypCg24mO6mbgw==", + "version": "8.28.8", + "resolved": "https://registry.npmjs.org/@wordpress/block-library/-/block-library-8.28.8.tgz", + "integrity": "sha512-i/9T6cWvmlakeVX6scSltZgHsWNsR5etnF2QfzTEMDIoljR1gRkDYRK2no4lli9i0O/h6MEVqU7pfpqGx1qGrw==", "dependencies": { "@babel/runtime": "^7.16.0", "@wordpress/a11y": "^3.51.1", @@ -6312,8 +6312,8 @@ "@wordpress/html-entities": "^3.51.1", "@wordpress/i18n": "^4.51.1", "@wordpress/icons": "^9.42.4", - "@wordpress/interactivity": "^5.0.4", - "@wordpress/interactivity-router": "^1.1.4", + "@wordpress/interactivity": "^5.0.5", + "@wordpress/interactivity-router": "^1.1.5", "@wordpress/keycodes": "^3.51.1", "@wordpress/notices": "^4.19.1", "@wordpress/patterns": "^1.12.6", @@ -6581,13 +6581,13 @@ } }, "node_modules/@wordpress/customize-widgets": { - "version": "4.28.7", - "resolved": "https://registry.npmjs.org/@wordpress/customize-widgets/-/customize-widgets-4.28.7.tgz", - "integrity": "sha512-GIZrXCeQFrvhReynsmKNMJjrEk3qZXntgayV42hZjNqUX/8UQV/xCW5W51S1mclgqQy/IG60tv/uKaANTCIsaQ==", + "version": "4.28.8", + "resolved": "https://registry.npmjs.org/@wordpress/customize-widgets/-/customize-widgets-4.28.8.tgz", + "integrity": "sha512-41CBJfdbPFnhD/3L/0JiJRntI3U1zlm45KRZziLeje5Kmp9wbI3tGbR0ELroqepDsBvOsL2Luh2JrkVnb28cXA==", "dependencies": { "@babel/runtime": "^7.16.0", "@wordpress/block-editor": "^12.19.6", - "@wordpress/block-library": "^8.28.7", + "@wordpress/block-library": "^8.28.8", "@wordpress/blocks": "^12.28.6", "@wordpress/components": "^26.0.5", "@wordpress/compose": "^6.28.1", @@ -6838,15 +6838,15 @@ } }, "node_modules/@wordpress/edit-post": { - "version": "7.28.7", - "resolved": "https://registry.npmjs.org/@wordpress/edit-post/-/edit-post-7.28.7.tgz", - "integrity": "sha512-Mo9p+8dTtv3OJl/II5kDQKP/LhIRuF4FVgciutBQ4kN3De59EP/CdNdNB4XZkGrK0qHQD8p7DC5Yy9/o/lmmPg==", + "version": "7.28.8", + "resolved": "https://registry.npmjs.org/@wordpress/edit-post/-/edit-post-7.28.8.tgz", + "integrity": "sha512-KIP2Esogs5G+m8Er1h959aqRTVSxJVLoB1xQr/spOmYvvkR0ZQDlDe3RkvFX6RE2sq/8Luw7pGE/Wqm7qLrmbw==", "dependencies": { "@babel/runtime": "^7.16.0", "@wordpress/a11y": "^3.51.1", "@wordpress/api-fetch": "^6.48.1", "@wordpress/block-editor": "^12.19.6", - "@wordpress/block-library": "^8.28.7", + "@wordpress/block-library": "^8.28.8", "@wordpress/blocks": "^12.28.6", "@wordpress/commands": "^0.22.5", "@wordpress/components": "^26.0.5", @@ -6886,16 +6886,16 @@ } }, "node_modules/@wordpress/edit-site": { - "version": "5.28.7", - "resolved": "https://registry.npmjs.org/@wordpress/edit-site/-/edit-site-5.28.7.tgz", - "integrity": "sha512-0/e0v35oRWn28v3MamvBUfLkPNY0DU0IkJ8Sa0kIZke+3LHS2EcHYAIWukw2wSFYGIQI7rtjoItcCHaD3lg4DQ==", + "version": "5.28.8", + "resolved": "https://registry.npmjs.org/@wordpress/edit-site/-/edit-site-5.28.8.tgz", + "integrity": "sha512-EtrpUQPSV+ZyEXdi3FA21ciuk0wH7jAmyiRzDvT0j2CuYB9jEc/dSssiawnJXGU/DxSsOOPv3tiUX8y8clrvkQ==", "dependencies": { "@babel/runtime": "^7.16.0", "@wordpress/a11y": "^3.51.1", "@wordpress/api-fetch": "^6.48.1", "@wordpress/blob": "^3.51.1", "@wordpress/block-editor": "^12.19.6", - "@wordpress/block-library": "^8.28.7", + "@wordpress/block-library": "^8.28.8", "@wordpress/blocks": "^12.28.6", "@wordpress/commands": "^0.22.5", "@wordpress/components": "^26.0.5", @@ -6951,14 +6951,14 @@ } }, "node_modules/@wordpress/edit-widgets": { - "version": "5.28.7", - "resolved": "https://registry.npmjs.org/@wordpress/edit-widgets/-/edit-widgets-5.28.7.tgz", - "integrity": "sha512-n55mlfQ35Kevx3qJfHMPY9UrRLD93irI4ImBcLcs7ICAhZdIdmrWL9TZsCwXMJKLKPSCF/pnHaVJLEVv6IBoPw==", + "version": "5.28.8", + "resolved": "https://registry.npmjs.org/@wordpress/edit-widgets/-/edit-widgets-5.28.8.tgz", + "integrity": "sha512-sF52xNilXDTtMC1TYJ7/vptnvOeyC0GbevoCZ5RatyhdrLr49AYDolyqVD7MuuuORC8E/uiwywIK0w7EGg685Q==", "dependencies": { "@babel/runtime": "^7.16.0", "@wordpress/api-fetch": "^6.48.1", "@wordpress/block-editor": "^12.19.6", - "@wordpress/block-library": "^8.28.7", + "@wordpress/block-library": "^8.28.8", "@wordpress/blocks": "^12.28.6", "@wordpress/components": "^26.0.5", "@wordpress/compose": "^6.28.1", @@ -7213,9 +7213,9 @@ } }, "node_modules/@wordpress/interactivity": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/@wordpress/interactivity/-/interactivity-5.0.4.tgz", - "integrity": "sha512-raeGdy3x1ntmjyJDOwMYBn5kdkd0D/u6JMVpkbr4dHIwppiFcuPDNPIyh02ajiUffRA3v3osyV3cWgxM0EPfog==", + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/@wordpress/interactivity/-/interactivity-5.0.5.tgz", + "integrity": "sha512-4/1erxSccgbFZ9hA/9fDtTj9HMWBZyGEeJpPP5N3TQ6RaW0+KIFoAZumETKWC41b8AB1qlkTAPjvO7dJRo1jpw==", "dependencies": { "@preact/signals": "^1.2.2", "deepsignal": "^1.4.0", @@ -7226,11 +7226,11 @@ } }, "node_modules/@wordpress/interactivity-router": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/@wordpress/interactivity-router/-/interactivity-router-1.1.4.tgz", - "integrity": "sha512-H4ImDuCb5ktnEF9e3UsmCxVGP90PGfft3FWlv07XSBoa9xMScDQhH00IZwyW7UVYvAwirBGL8woZaBEDPuEmZA==", + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@wordpress/interactivity-router/-/interactivity-router-1.1.5.tgz", + "integrity": "sha512-2wm4OsIm0rc6VBKfc2RMhP+OYEBprWymp+hY18YpPG+0PZV+VGakzDERVxDY3ZR4HxKQibUBW6IGlYycLN+LbQ==", "dependencies": { - "@wordpress/interactivity": "^5.0.4" + "@wordpress/interactivity": "^5.0.5" }, "engines": { "node": ">=12" @@ -37777,9 +37777,9 @@ } }, "@wordpress/block-library": { - "version": "8.28.7", - "resolved": "https://registry.npmjs.org/@wordpress/block-library/-/block-library-8.28.7.tgz", - "integrity": "sha512-j1nJ7iOnJSHoR/WNuDg5+HJZhQlXF6JkkYD7sO1fKSFEBxaTyL9SlL2gegOi1KFgUvEdeaflyypCg24mO6mbgw==", + "version": "8.28.8", + "resolved": "https://registry.npmjs.org/@wordpress/block-library/-/block-library-8.28.8.tgz", + "integrity": "sha512-i/9T6cWvmlakeVX6scSltZgHsWNsR5etnF2QfzTEMDIoljR1gRkDYRK2no4lli9i0O/h6MEVqU7pfpqGx1qGrw==", "requires": { "@babel/runtime": "^7.16.0", "@wordpress/a11y": "^3.51.1", @@ -37801,8 +37801,8 @@ "@wordpress/html-entities": "^3.51.1", "@wordpress/i18n": "^4.51.1", "@wordpress/icons": "^9.42.4", - "@wordpress/interactivity": "^5.0.4", - "@wordpress/interactivity-router": "^1.1.4", + "@wordpress/interactivity": "^5.0.5", + "@wordpress/interactivity-router": "^1.1.5", "@wordpress/keycodes": "^3.51.1", "@wordpress/notices": "^4.19.1", "@wordpress/patterns": "^1.12.6", @@ -38017,13 +38017,13 @@ } }, "@wordpress/customize-widgets": { - "version": "4.28.7", - "resolved": "https://registry.npmjs.org/@wordpress/customize-widgets/-/customize-widgets-4.28.7.tgz", - "integrity": "sha512-GIZrXCeQFrvhReynsmKNMJjrEk3qZXntgayV42hZjNqUX/8UQV/xCW5W51S1mclgqQy/IG60tv/uKaANTCIsaQ==", + "version": "4.28.8", + "resolved": "https://registry.npmjs.org/@wordpress/customize-widgets/-/customize-widgets-4.28.8.tgz", + "integrity": "sha512-41CBJfdbPFnhD/3L/0JiJRntI3U1zlm45KRZziLeje5Kmp9wbI3tGbR0ELroqepDsBvOsL2Luh2JrkVnb28cXA==", "requires": { "@babel/runtime": "^7.16.0", "@wordpress/block-editor": "^12.19.6", - "@wordpress/block-library": "^8.28.7", + "@wordpress/block-library": "^8.28.8", "@wordpress/blocks": "^12.28.6", "@wordpress/components": "^26.0.5", "@wordpress/compose": "^6.28.1", @@ -38210,15 +38210,15 @@ } }, "@wordpress/edit-post": { - "version": "7.28.7", - "resolved": "https://registry.npmjs.org/@wordpress/edit-post/-/edit-post-7.28.7.tgz", - "integrity": "sha512-Mo9p+8dTtv3OJl/II5kDQKP/LhIRuF4FVgciutBQ4kN3De59EP/CdNdNB4XZkGrK0qHQD8p7DC5Yy9/o/lmmPg==", + "version": "7.28.8", + "resolved": "https://registry.npmjs.org/@wordpress/edit-post/-/edit-post-7.28.8.tgz", + "integrity": "sha512-KIP2Esogs5G+m8Er1h959aqRTVSxJVLoB1xQr/spOmYvvkR0ZQDlDe3RkvFX6RE2sq/8Luw7pGE/Wqm7qLrmbw==", "requires": { "@babel/runtime": "^7.16.0", "@wordpress/a11y": "^3.51.1", "@wordpress/api-fetch": "^6.48.1", "@wordpress/block-editor": "^12.19.6", - "@wordpress/block-library": "^8.28.7", + "@wordpress/block-library": "^8.28.8", "@wordpress/blocks": "^12.28.6", "@wordpress/commands": "^0.22.5", "@wordpress/components": "^26.0.5", @@ -38251,16 +38251,16 @@ } }, "@wordpress/edit-site": { - "version": "5.28.7", - "resolved": "https://registry.npmjs.org/@wordpress/edit-site/-/edit-site-5.28.7.tgz", - "integrity": "sha512-0/e0v35oRWn28v3MamvBUfLkPNY0DU0IkJ8Sa0kIZke+3LHS2EcHYAIWukw2wSFYGIQI7rtjoItcCHaD3lg4DQ==", + "version": "5.28.8", + "resolved": "https://registry.npmjs.org/@wordpress/edit-site/-/edit-site-5.28.8.tgz", + "integrity": "sha512-EtrpUQPSV+ZyEXdi3FA21ciuk0wH7jAmyiRzDvT0j2CuYB9jEc/dSssiawnJXGU/DxSsOOPv3tiUX8y8clrvkQ==", "requires": { "@babel/runtime": "^7.16.0", "@wordpress/a11y": "^3.51.1", "@wordpress/api-fetch": "^6.48.1", "@wordpress/blob": "^3.51.1", "@wordpress/block-editor": "^12.19.6", - "@wordpress/block-library": "^8.28.7", + "@wordpress/block-library": "^8.28.8", "@wordpress/blocks": "^12.28.6", "@wordpress/commands": "^0.22.5", "@wordpress/components": "^26.0.5", @@ -38309,14 +38309,14 @@ } }, "@wordpress/edit-widgets": { - "version": "5.28.7", - "resolved": "https://registry.npmjs.org/@wordpress/edit-widgets/-/edit-widgets-5.28.7.tgz", - "integrity": "sha512-n55mlfQ35Kevx3qJfHMPY9UrRLD93irI4ImBcLcs7ICAhZdIdmrWL9TZsCwXMJKLKPSCF/pnHaVJLEVv6IBoPw==", + "version": "5.28.8", + "resolved": "https://registry.npmjs.org/@wordpress/edit-widgets/-/edit-widgets-5.28.8.tgz", + "integrity": "sha512-sF52xNilXDTtMC1TYJ7/vptnvOeyC0GbevoCZ5RatyhdrLr49AYDolyqVD7MuuuORC8E/uiwywIK0w7EGg685Q==", "requires": { "@babel/runtime": "^7.16.0", "@wordpress/api-fetch": "^6.48.1", "@wordpress/block-editor": "^12.19.6", - "@wordpress/block-library": "^8.28.7", + "@wordpress/block-library": "^8.28.8", "@wordpress/blocks": "^12.28.6", "@wordpress/components": "^26.0.5", "@wordpress/compose": "^6.28.1", @@ -38507,9 +38507,9 @@ } }, "@wordpress/interactivity": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/@wordpress/interactivity/-/interactivity-5.0.4.tgz", - "integrity": "sha512-raeGdy3x1ntmjyJDOwMYBn5kdkd0D/u6JMVpkbr4dHIwppiFcuPDNPIyh02ajiUffRA3v3osyV3cWgxM0EPfog==", + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/@wordpress/interactivity/-/interactivity-5.0.5.tgz", + "integrity": "sha512-4/1erxSccgbFZ9hA/9fDtTj9HMWBZyGEeJpPP5N3TQ6RaW0+KIFoAZumETKWC41b8AB1qlkTAPjvO7dJRo1jpw==", "requires": { "@preact/signals": "^1.2.2", "deepsignal": "^1.4.0", @@ -38517,11 +38517,11 @@ } }, "@wordpress/interactivity-router": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/@wordpress/interactivity-router/-/interactivity-router-1.1.4.tgz", - "integrity": "sha512-H4ImDuCb5ktnEF9e3UsmCxVGP90PGfft3FWlv07XSBoa9xMScDQhH00IZwyW7UVYvAwirBGL8woZaBEDPuEmZA==", + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@wordpress/interactivity-router/-/interactivity-router-1.1.5.tgz", + "integrity": "sha512-2wm4OsIm0rc6VBKfc2RMhP+OYEBprWymp+hY18YpPG+0PZV+VGakzDERVxDY3ZR4HxKQibUBW6IGlYycLN+LbQ==", "requires": { - "@wordpress/interactivity": "^5.0.4" + "@wordpress/interactivity": "^5.0.5" } }, "@wordpress/interface": { diff --git a/package.json b/package.json index fa8c0aaa952dc..34f9b1deed650 100644 --- a/package.json +++ b/package.json @@ -85,7 +85,7 @@ "@wordpress/blob": "3.51.1", "@wordpress/block-directory": "4.28.7", "@wordpress/block-editor": "12.19.6", - "@wordpress/block-library": "8.28.7", + "@wordpress/block-library": "8.28.8", "@wordpress/block-serialization-default-parser": "4.51.1", "@wordpress/blocks": "12.28.6", "@wordpress/commands": "0.22.5", @@ -93,7 +93,7 @@ "@wordpress/compose": "6.28.1", "@wordpress/core-commands": "0.20.6", "@wordpress/core-data": "6.28.6", - "@wordpress/customize-widgets": "4.28.7", + "@wordpress/customize-widgets": "4.28.8", "@wordpress/data": "9.21.1", "@wordpress/data-controls": "3.20.1", "@wordpress/dataviews": "0.5.6", @@ -101,9 +101,9 @@ "@wordpress/deprecated": "3.51.1", "@wordpress/dom": "3.51.1", "@wordpress/dom-ready": "3.51.1", - "@wordpress/edit-post": "7.28.7", - "@wordpress/edit-site": "5.28.7", - "@wordpress/edit-widgets": "5.28.7", + "@wordpress/edit-post": "7.28.8", + "@wordpress/edit-site": "5.28.8", + "@wordpress/edit-widgets": "5.28.8", "@wordpress/editor": "13.28.6", "@wordpress/element": "5.28.1", "@wordpress/escape-html": "2.51.1", @@ -112,8 +112,8 @@ "@wordpress/html-entities": "3.51.1", "@wordpress/i18n": "4.51.1", "@wordpress/icons": "9.42.4", - "@wordpress/interactivity": "5.0.4", - "@wordpress/interactivity-router": "1.1.4", + "@wordpress/interactivity": "5.0.5", + "@wordpress/interactivity-router": "1.1.5", "@wordpress/interface": "5.28.5", "@wordpress/is-shallow-equal": "4.51.1", "@wordpress/keyboard-shortcuts": "4.28.1", diff --git a/src/wp-includes/assets/script-loader-packages.min.php b/src/wp-includes/assets/script-loader-packages.min.php index 726ef31814fda..a64cd24249e2a 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' => 'd90eebea464f6c09bfd5'), 'annotations.min.js' => array('dependencies' => array('wp-data', 'wp-hooks', 'wp-i18n', 'wp-polyfill', 'wp-rich-text'), 'version' => 'ffc4fc3374b0ab000805'), 'api-fetch.min.js' => array('dependencies' => array('wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '4c185334c5ec26e149cc'), 'autop.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '9fb50649848277dd318d'), 'blob.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '9113eed771d446f4a556'), 'block-directory.min.js' => array('dependencies' => array('react', '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-private-apis', 'wp-url'), 'version' => '9159053f41b8ec09d91b'), '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-style-engine', 'wp-token-list', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => '46cac8a461ade155cdf8'), 'block-library.min.js' => array('dependencies' => array('react', '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-patterns', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-viewport', 'wp-wordcount'), 'version' => '84d52d1d704b02ceb951'), 'block-serialization-default-parser.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '14d44daebf663d05d330'), 'blocks.min.js' => array('dependencies' => array('react', '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-rich-text', 'wp-shortcode'), 'version' => '6612d078dfaf28b875b8'), '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' => 'e4060e55811e7824feb9'), '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' => 'c3a06857b0e51f435ccb'), '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' => '1339d3318cd44440dccb'), 'core-commands.min.js' => array('dependencies' => array('react', 'wp-commands', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-router', 'wp-url'), 'version' => '4ee9c423b71a59459ca6'), 'core-data.min.js' => array('dependencies' => array('react', '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-rich-text', 'wp-url'), 'version' => 'ff4b03fefe97d027b7fd'), 'customize-widgets.min.js' => array('dependencies' => array('react', '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' => '137692724827d41c9fb5'), 'data.min.js' => array('dependencies' => array('react', 'wp-compose', 'wp-deprecated', 'wp-element', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-priority-queue', 'wp-private-apis', 'wp-redux-routine'), 'version' => 'e6595ba1a7cd34429f66'), 'data-controls.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-data', 'wp-deprecated', 'wp-polyfill'), 'version' => '49f5587e8b90f9e7cc7e'), 'date.min.js' => array('dependencies' => array('moment', 'wp-deprecated', 'wp-polyfill'), 'version' => 'aaca6387d1cf924acc51'), 'deprecated.min.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => 'e1f84915c5e8ae38964c'), 'dom.min.js' => array('dependencies' => array('wp-deprecated', 'wp-polyfill'), 'version' => '4ecffbffba91b10c5c7a'), 'dom-ready.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'f77871ff7694fffea381'), 'edit-post.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-deprecated', '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' => '82b743695f8ef1673753'), 'edit-site.min.js' => array('dependencies' => array('react', 'react-dom', 'wp-a11y', 'wp-api-fetch', 'wp-blob', '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' => '96b528d47ee15a45f154'), 'edit-widgets.min.js' => array('dependencies' => array('react', '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' => '96a3b30b85133de96871'), 'editor.min.js' => array('dependencies' => array('react', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-commands', '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' => 'd4537187f01a11a554a1'), 'element.min.js' => array('dependencies' => array('react', 'react-dom', 'wp-escape-html', 'wp-polyfill'), 'version' => 'cb762d190aebbec25b27'), 'escape-html.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '6561a406d2d232a6fbd2'), 'format-library.min.js' => array('dependencies' => array('react', 'wp-a11y', 'wp-block-editor', 'wp-components', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-url'), 'version' => '66ea4e17a9a3f539c9d5'), 'hooks.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '2810c76e705dd1a53b18'), 'html-entities.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '2cd3358363e0675638fb'), 'i18n.min.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => '5e580eb46a90c2b997e6'), 'is-shallow-equal.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'e0f9f1d78d83f5196979'), 'keyboard-shortcuts.min.js' => array('dependencies' => array('react', 'wp-data', 'wp-element', 'wp-keycodes', 'wp-polyfill'), 'version' => '4d239ebc17efd846a168'), 'keycodes.min.js' => array('dependencies' => array('wp-i18n', 'wp-polyfill'), 'version' => '034ff647a54b018581d3'), 'list-reusable-blocks.min.js' => array('dependencies' => array('react', 'wp-api-fetch', 'wp-blob', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => 'b9d73b532124daefd2c7'), 'media-utils.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-blob', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '1cf582d3c080c8694c8c'), 'notices.min.js' => array('dependencies' => array('wp-data', 'wp-polyfill'), 'version' => '673a68a7ac2f556ed50b'), 'nux.min.js' => array('dependencies' => array('react', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => '46c93a71c3e2c2bf37f0'), 'patterns.min.js' => array('dependencies' => array('react', 'wp-a11y', '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' => 'ee72aaa0806b06909b48'), 'plugins.min.js' => array('dependencies' => array('react', 'wp-compose', 'wp-element', 'wp-hooks', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-primitives'), 'version' => '2d369cbfdcb887111e06'), 'preferences.min.js' => array('dependencies' => array('react', 'wp-a11y', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-private-apis'), 'version' => 'e1544c6f06a9639c4c31'), 'preferences-persistence.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-polyfill'), 'version' => '3f5184d775ed9dfb154f'), 'primitives.min.js' => array('dependencies' => array('wp-element', 'wp-polyfill'), 'version' => 'a41bfd5835f583ae838a'), 'priority-queue.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '9c21c957c7e50ffdbf48'), 'private-apis.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '5e7fdf55d04b8c2aadef'), 'redux-routine.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'b14553dce2bee5c0f064'), 'reusable-blocks.min.js' => array('dependencies' => array('react', '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' => '008366ba172a4f4b92b4'), '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' => 'dd125966cf6cc0394ae0'), 'router.min.js' => array('dependencies' => array('react', 'wp-element', 'wp-polyfill', 'wp-private-apis', 'wp-url'), 'version' => '92fd517f31b92695552a'), 'server-side-render.min.js' => array('dependencies' => array('react', 'wp-api-fetch', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '04ce502cc4eef9b49ce7'), 'shortcode.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'b7747eee0efafd2f0c3b'), 'style-engine.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '03f13c515060de24b556'), 'token-list.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '05f8a6df6258f0081718'), 'undo-manager.min.js' => array('dependencies' => array('wp-is-shallow-equal', 'wp-polyfill'), 'version' => 'f0698003cb0f0a7bd794'), 'url.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '421139b01f33e5b327d8'), 'viewport.min.js' => array('dependencies' => array('react', 'wp-compose', 'wp-data', 'wp-polyfill'), 'version' => 'e555fda1d93ecf1fb1e0'), 'warning.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'ed7c8b0940914f4fe44b'), 'widgets.min.js' => array('dependencies' => array('react', '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' => '4c7bfc488be9e26d6488'), 'wordcount.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '55d8c2bf3dc99e7ea5ec')); + array('dependencies' => array('wp-dom-ready', 'wp-i18n', 'wp-polyfill'), 'version' => 'd90eebea464f6c09bfd5'), 'annotations.min.js' => array('dependencies' => array('wp-data', 'wp-hooks', 'wp-i18n', 'wp-polyfill', 'wp-rich-text'), 'version' => 'ffc4fc3374b0ab000805'), 'api-fetch.min.js' => array('dependencies' => array('wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '4c185334c5ec26e149cc'), 'autop.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '9fb50649848277dd318d'), 'blob.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '9113eed771d446f4a556'), 'block-directory.min.js' => array('dependencies' => array('react', '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-private-apis', 'wp-url'), 'version' => '9159053f41b8ec09d91b'), '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-style-engine', 'wp-token-list', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => '46cac8a461ade155cdf8'), 'block-library.min.js' => array('dependencies' => array('react', '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-patterns', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-viewport', 'wp-wordcount'), 'version' => 'ad737ee06c6f575025a0'), 'block-serialization-default-parser.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '14d44daebf663d05d330'), 'blocks.min.js' => array('dependencies' => array('react', '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-rich-text', 'wp-shortcode'), 'version' => '6612d078dfaf28b875b8'), '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' => 'e4060e55811e7824feb9'), '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' => 'c3a06857b0e51f435ccb'), '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' => '1339d3318cd44440dccb'), 'core-commands.min.js' => array('dependencies' => array('react', 'wp-commands', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-router', 'wp-url'), 'version' => '4ee9c423b71a59459ca6'), 'core-data.min.js' => array('dependencies' => array('react', '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-rich-text', 'wp-url'), 'version' => 'ff4b03fefe97d027b7fd'), 'customize-widgets.min.js' => array('dependencies' => array('react', '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' => '137692724827d41c9fb5'), 'data.min.js' => array('dependencies' => array('react', 'wp-compose', 'wp-deprecated', 'wp-element', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-priority-queue', 'wp-private-apis', 'wp-redux-routine'), 'version' => 'e6595ba1a7cd34429f66'), 'data-controls.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-data', 'wp-deprecated', 'wp-polyfill'), 'version' => '49f5587e8b90f9e7cc7e'), 'date.min.js' => array('dependencies' => array('moment', 'wp-deprecated', 'wp-polyfill'), 'version' => 'aaca6387d1cf924acc51'), 'deprecated.min.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => 'e1f84915c5e8ae38964c'), 'dom.min.js' => array('dependencies' => array('wp-deprecated', 'wp-polyfill'), 'version' => '4ecffbffba91b10c5c7a'), 'dom-ready.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'f77871ff7694fffea381'), 'edit-post.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-deprecated', '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' => '82b743695f8ef1673753'), 'edit-site.min.js' => array('dependencies' => array('react', 'react-dom', 'wp-a11y', 'wp-api-fetch', 'wp-blob', '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' => '11776d37fd8f4622dd2b'), 'edit-widgets.min.js' => array('dependencies' => array('react', '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' => '96a3b30b85133de96871'), 'editor.min.js' => array('dependencies' => array('react', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-commands', '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' => 'd4537187f01a11a554a1'), 'element.min.js' => array('dependencies' => array('react', 'react-dom', 'wp-escape-html', 'wp-polyfill'), 'version' => 'cb762d190aebbec25b27'), 'escape-html.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '6561a406d2d232a6fbd2'), 'format-library.min.js' => array('dependencies' => array('react', 'wp-a11y', 'wp-block-editor', 'wp-components', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-url'), 'version' => '66ea4e17a9a3f539c9d5'), 'hooks.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '2810c76e705dd1a53b18'), 'html-entities.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '2cd3358363e0675638fb'), 'i18n.min.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => '5e580eb46a90c2b997e6'), 'is-shallow-equal.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'e0f9f1d78d83f5196979'), 'keyboard-shortcuts.min.js' => array('dependencies' => array('react', 'wp-data', 'wp-element', 'wp-keycodes', 'wp-polyfill'), 'version' => '4d239ebc17efd846a168'), 'keycodes.min.js' => array('dependencies' => array('wp-i18n', 'wp-polyfill'), 'version' => '034ff647a54b018581d3'), 'list-reusable-blocks.min.js' => array('dependencies' => array('react', 'wp-api-fetch', 'wp-blob', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => 'b9d73b532124daefd2c7'), 'media-utils.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-blob', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '1cf582d3c080c8694c8c'), 'notices.min.js' => array('dependencies' => array('wp-data', 'wp-polyfill'), 'version' => '673a68a7ac2f556ed50b'), 'nux.min.js' => array('dependencies' => array('react', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => '46c93a71c3e2c2bf37f0'), 'patterns.min.js' => array('dependencies' => array('react', 'wp-a11y', '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' => 'ee72aaa0806b06909b48'), 'plugins.min.js' => array('dependencies' => array('react', 'wp-compose', 'wp-element', 'wp-hooks', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-primitives'), 'version' => '2d369cbfdcb887111e06'), 'preferences.min.js' => array('dependencies' => array('react', 'wp-a11y', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-private-apis'), 'version' => 'e1544c6f06a9639c4c31'), 'preferences-persistence.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-polyfill'), 'version' => '3f5184d775ed9dfb154f'), 'primitives.min.js' => array('dependencies' => array('wp-element', 'wp-polyfill'), 'version' => 'a41bfd5835f583ae838a'), 'priority-queue.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '9c21c957c7e50ffdbf48'), 'private-apis.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '5e7fdf55d04b8c2aadef'), 'redux-routine.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'b14553dce2bee5c0f064'), 'reusable-blocks.min.js' => array('dependencies' => array('react', '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' => '008366ba172a4f4b92b4'), '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' => 'dd125966cf6cc0394ae0'), 'router.min.js' => array('dependencies' => array('react', 'wp-element', 'wp-polyfill', 'wp-private-apis', 'wp-url'), 'version' => '92fd517f31b92695552a'), 'server-side-render.min.js' => array('dependencies' => array('react', 'wp-api-fetch', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '04ce502cc4eef9b49ce7'), 'shortcode.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'b7747eee0efafd2f0c3b'), 'style-engine.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '03f13c515060de24b556'), 'token-list.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '05f8a6df6258f0081718'), 'undo-manager.min.js' => array('dependencies' => array('wp-is-shallow-equal', 'wp-polyfill'), 'version' => 'f0698003cb0f0a7bd794'), 'url.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '421139b01f33e5b327d8'), 'viewport.min.js' => array('dependencies' => array('react', 'wp-compose', 'wp-data', 'wp-polyfill'), 'version' => 'e555fda1d93ecf1fb1e0'), 'warning.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'ed7c8b0940914f4fe44b'), 'widgets.min.js' => array('dependencies' => array('react', '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' => '4c7bfc488be9e26d6488'), 'wordcount.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '55d8c2bf3dc99e7ea5ec')); diff --git a/src/wp-includes/blocks/navigation.php b/src/wp-includes/blocks/navigation.php index f28f017f0238c..ae00eabc27f31 100644 --- a/src/wp-includes/blocks/navigation.php +++ b/src/wp-includes/blocks/navigation.php @@ -135,9 +135,9 @@ private static function get_markup_for_inner_block( $inner_block ) { if ( static::does_block_need_a_list_item_wrapper( $inner_block ) ) { return '
  • ' . $inner_block_content . '
  • '; } - - return $inner_block_content; } + + return $inner_block_content; } /** @@ -1464,6 +1464,14 @@ function block_core_navigation_set_ignored_hooked_blocks_metadata( $inner_blocks * @return stdClass The updated post object. */ function block_core_navigation_update_ignore_hooked_blocks_meta( $post ) { + /* + * In this scenario the user has likely tried to create a navigation via the REST API. + * In which case we won't have a post ID to work with and store meta against. + */ + if ( empty( $post->ID ) ) { + return $post; + } + /* * We run the Block Hooks mechanism to inject the `metadata.ignoredHookedBlocks` attribute into * all anchor blocks. For the root level, we create a mock Navigation and extract them from there. From 62c807749ec86ee4f213df59f39e7c79b564e3b8 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Tue, 19 Mar 2024 09:31:23 +0000 Subject: [PATCH 188/251] Posts, Post Types: Introduce `delete_post_{$post->post_type}` and `deleted_post_{$post->post_type}` hooks. The hooks fire before the general `delete_post` / `deleted_post` hooks and have the same parameters. They complement the `save_post_{$post->post_type}` hook added in [25050] and the `edit_post_{$post->post_type}` hook added in [43617]. Props benniledl, swissspidy, dargus. Fixes #60433. git-svn-id: https://develop.svn.wordpress.org/trunk@57853 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/post.php | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/wp-includes/post.php b/src/wp-includes/post.php index 7645043a4786e..3ecadddd9d812 100644 --- a/src/wp-includes/post.php +++ b/src/wp-includes/post.php @@ -3552,6 +3552,19 @@ function wp_delete_post( $postid = 0, $force_delete = false ) { delete_metadata_by_mid( 'post', $mid ); } + /** + * Fires immediately before a post is deleted from the database. + * + * The dynamic portion of the hook name, `$post->post_type`, refers to + * the post type slug. + * + * @since 6.6.0 + * + * @param int $postid Post ID. + * @param WP_Post $post Post object. + */ + do_action( "delete_post_{$post->post_type}", $postid, $post ); + /** * Fires immediately before a post is deleted from the database. * @@ -3568,6 +3581,19 @@ function wp_delete_post( $postid = 0, $force_delete = false ) { return false; } + /** + * Fires immediately after a post is deleted from the database. + * + * The dynamic portion of the hook name, `$post->post_type`, refers to + * the post type slug. + * + * @since 6.6.0 + * + * @param int $postid Post ID. + * @param WP_Post $post Post object. + */ + do_action( "deleted_post_{$post->post_type}", $postid, $post ); + /** * Fires immediately after a post is deleted from the database. * From 7e1b5bac092ab28b0738d0a5bd7eda723acd8e79 Mon Sep 17 00:00:00 2001 From: Jb Audras Date: Tue, 19 Mar 2024 14:44:25 +0000 Subject: [PATCH 189/251] Docs: Update various HelpHub links to avoid unnecessary redirections. Follow-up to [57793], [57798], [57800], [57801]. Props shailu25. See #60732, #60699. git-svn-id: https://develop.svn.wordpress.org/trunk@57854 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/network/settings.php | 2 +- src/wp-admin/network/site-new.php | 2 +- src/wp-admin/network/sites.php | 2 +- src/wp-admin/network/upgrade.php | 2 +- src/wp-admin/plugin-editor.php | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/wp-admin/network/settings.php b/src/wp-admin/network/settings.php index 7dff74d4adb8c..a8504e4b279d8 100644 --- a/src/wp-admin/network/settings.php +++ b/src/wp-admin/network/settings.php @@ -61,7 +61,7 @@ get_current_screen()->set_help_sidebar( '

    ' . __( 'For more information:' ) . '

    ' . - '

    ' . __( 'Documentation on Network Settings' ) . '

    ' . + '

    ' . __( 'Documentation on Network Settings' ) . '

    ' . '

    ' . __( 'Support forums' ) . '

    ' ); diff --git a/src/wp-admin/network/site-new.php b/src/wp-admin/network/site-new.php index 4bdd559e7d052..fcd685b4e6969 100644 --- a/src/wp-admin/network/site-new.php +++ b/src/wp-admin/network/site-new.php @@ -29,7 +29,7 @@ get_current_screen()->set_help_sidebar( '

    ' . __( 'For more information:' ) . '

    ' . - '

    ' . __( 'Documentation on Site Management' ) . '

    ' . + '

    ' . __( 'Documentation on Site Management' ) . '

    ' . '

    ' . __( 'Support forums' ) . '

    ' ); diff --git a/src/wp-admin/network/sites.php b/src/wp-admin/network/sites.php index 402c047312d48..0f535b0db0a56 100644 --- a/src/wp-admin/network/sites.php +++ b/src/wp-admin/network/sites.php @@ -43,7 +43,7 @@ get_current_screen()->set_help_sidebar( '

    ' . __( 'For more information:' ) . '

    ' . - '

    ' . __( 'Documentation on Site Management' ) . '

    ' . + '

    ' . __( 'Documentation on Site Management' ) . '

    ' . '

    ' . __( 'Support forums' ) . '

    ' ); diff --git a/src/wp-admin/network/upgrade.php b/src/wp-admin/network/upgrade.php index 55cbedd643c5a..9c676eaf8e4b4 100644 --- a/src/wp-admin/network/upgrade.php +++ b/src/wp-admin/network/upgrade.php @@ -29,7 +29,7 @@ get_current_screen()->set_help_sidebar( '

    ' . __( 'For more information:' ) . '

    ' . - '

    ' . __( 'Documentation on Upgrade Network' ) . '

    ' . + '

    ' . __( 'Documentation on Upgrade Network' ) . '

    ' . '

    ' . __( 'Support forums' ) . '

    ' ); diff --git a/src/wp-admin/plugin-editor.php b/src/wp-admin/plugin-editor.php index cd743baa37d6f..73017cae91153 100644 --- a/src/wp-admin/plugin-editor.php +++ b/src/wp-admin/plugin-editor.php @@ -148,7 +148,7 @@ get_current_screen()->set_help_sidebar( '

    ' . __( 'For more information:' ) . '

    ' . - '

    ' . __( 'Documentation on Editing Plugins' ) . '

    ' . + '

    ' . __( 'Documentation on Editing Plugins' ) . '

    ' . '

    ' . __( 'Documentation on Writing Plugins' ) . '

    ' . '

    ' . __( 'Support forums' ) . '

    ' ); From 4ab2e5933f39645cbf25d22ad7feecffd8ed9573 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 19 Mar 2024 17:45:30 +0000 Subject: [PATCH 190/251] Coding Standards: Rename the `$postid` parameter to `$post_id` in `wp_delete_post()`. This matches the parameter name in `wp_trash_post()` and all the other functions receiving post ID as a parameter. See #60700. git-svn-id: https://develop.svn.wordpress.org/trunk@57857 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/post.php | 76 +++++++++++++++++++++++++--------------- 1 file changed, 47 insertions(+), 29 deletions(-) diff --git a/src/wp-includes/post.php b/src/wp-includes/post.php index 3ecadddd9d812..932163190cfe5 100644 --- a/src/wp-includes/post.php +++ b/src/wp-includes/post.php @@ -3460,15 +3460,15 @@ function wp_post_mime_type_where( $post_mime_types, $table_alias = '' ) { * @see wp_delete_attachment() * @see wp_trash_post() * - * @param int $postid Optional. Post ID. Default 0. + * @param int $post_id Optional. Post ID. Default 0. * @param bool $force_delete Optional. Whether to bypass Trash and force deletion. * Default false. * @return WP_Post|false|null Post data on success, false or null on failure. */ -function wp_delete_post( $postid = 0, $force_delete = false ) { +function wp_delete_post( $post_id = 0, $force_delete = false ) { global $wpdb; - $post = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $wpdb->posts WHERE ID = %d", $postid ) ); + $post = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $wpdb->posts WHERE ID = %d", $post_id ) ); if ( ! $post ) { return $post; @@ -3476,12 +3476,15 @@ function wp_delete_post( $postid = 0, $force_delete = false ) { $post = get_post( $post ); - if ( ! $force_delete && ( 'post' === $post->post_type || 'page' === $post->post_type ) && 'trash' !== get_post_status( $postid ) && EMPTY_TRASH_DAYS ) { - return wp_trash_post( $postid ); + if ( ! $force_delete + && ( 'post' === $post->post_type || 'page' === $post->post_type ) + && 'trash' !== get_post_status( $post_id ) && EMPTY_TRASH_DAYS + ) { + return wp_trash_post( $post_id ); } if ( 'attachment' === $post->post_type ) { - return wp_delete_attachment( $postid, $force_delete ); + return wp_delete_attachment( $post_id, $force_delete ); } /** @@ -3506,30 +3509,39 @@ function wp_delete_post( $postid = 0, $force_delete = false ) { * * @see wp_delete_post() * - * @param int $postid Post ID. - * @param WP_Post $post Post object. + * @param int $post_id Post ID. + * @param WP_Post $post Post object. */ - do_action( 'before_delete_post', $postid, $post ); + do_action( 'before_delete_post', $post_id, $post ); - delete_post_meta( $postid, '_wp_trash_meta_status' ); - delete_post_meta( $postid, '_wp_trash_meta_time' ); + delete_post_meta( $post_id, '_wp_trash_meta_status' ); + delete_post_meta( $post_id, '_wp_trash_meta_time' ); - wp_delete_object_term_relationships( $postid, get_object_taxonomies( $post->post_type ) ); + wp_delete_object_term_relationships( $post_id, get_object_taxonomies( $post->post_type ) ); $parent_data = array( 'post_parent' => $post->post_parent ); - $parent_where = array( 'post_parent' => $postid ); + $parent_where = array( 'post_parent' => $post_id ); if ( is_post_type_hierarchical( $post->post_type ) ) { // Point children of this page to its parent, also clean the cache of affected children. - $children_query = $wpdb->prepare( "SELECT * FROM $wpdb->posts WHERE post_parent = %d AND post_type = %s", $postid, $post->post_type ); - $children = $wpdb->get_results( $children_query ); + $children_query = $wpdb->prepare( + "SELECT * FROM $wpdb->posts WHERE post_parent = %d AND post_type = %s", + $post_id, + $post->post_type + ); + + $children = $wpdb->get_results( $children_query ); + if ( $children ) { $wpdb->update( $wpdb->posts, $parent_data, $parent_where + array( 'post_type' => $post->post_type ) ); } } // Do raw query. wp_get_post_revisions() is filtered. - $revision_ids = $wpdb->get_col( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_parent = %d AND post_type = 'revision'", $postid ) ); + $revision_ids = $wpdb->get_col( + $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_parent = %d AND post_type = 'revision'", $post_id ) + ); + // Use wp_delete_post (via wp_delete_post_revision) again. Ensures any meta/misplaced data gets cleaned up. foreach ( $revision_ids as $revision_id ) { wp_delete_post_revision( $revision_id ); @@ -3540,14 +3552,20 @@ function wp_delete_post( $postid = 0, $force_delete = false ) { wp_defer_comment_counting( true ); - $comment_ids = $wpdb->get_col( $wpdb->prepare( "SELECT comment_ID FROM $wpdb->comments WHERE comment_post_ID = %d ORDER BY comment_ID DESC", $postid ) ); + $comment_ids = $wpdb->get_col( + $wpdb->prepare( "SELECT comment_ID FROM $wpdb->comments WHERE comment_post_ID = %d ORDER BY comment_ID DESC", $post_id ) + ); + foreach ( $comment_ids as $comment_id ) { wp_delete_comment( $comment_id, true ); } wp_defer_comment_counting( false ); - $post_meta_ids = $wpdb->get_col( $wpdb->prepare( "SELECT meta_id FROM $wpdb->postmeta WHERE post_id = %d ", $postid ) ); + $post_meta_ids = $wpdb->get_col( + $wpdb->prepare( "SELECT meta_id FROM $wpdb->postmeta WHERE post_id = %d ", $post_id ) + ); + foreach ( $post_meta_ids as $mid ) { delete_metadata_by_mid( 'post', $mid ); } @@ -3571,12 +3589,12 @@ function wp_delete_post( $postid = 0, $force_delete = false ) { * @since 1.2.0 * @since 5.5.0 Added the `$post` parameter. * - * @param int $postid Post ID. - * @param WP_Post $post Post object. + * @param int $post_id Post ID. + * @param WP_Post $post Post object. */ - do_action( 'delete_post', $postid, $post ); + do_action( 'delete_post', $post_id, $post ); - $result = $wpdb->delete( $wpdb->posts, array( 'ID' => $postid ) ); + $result = $wpdb->delete( $wpdb->posts, array( 'ID' => $post_id ) ); if ( ! $result ) { return false; } @@ -3600,10 +3618,10 @@ function wp_delete_post( $postid = 0, $force_delete = false ) { * @since 2.2.0 * @since 5.5.0 Added the `$post` parameter. * - * @param int $postid Post ID. - * @param WP_Post $post Post object. + * @param int $post_id Post ID. + * @param WP_Post $post Post object. */ - do_action( 'deleted_post', $postid, $post ); + do_action( 'deleted_post', $post_id, $post ); clean_post_cache( $post ); @@ -3613,7 +3631,7 @@ function wp_delete_post( $postid = 0, $force_delete = false ) { } } - wp_clear_scheduled_hook( 'publish_future_post', array( $postid ) ); + wp_clear_scheduled_hook( 'publish_future_post', array( $post_id ) ); /** * Fires after a post is deleted, at the conclusion of wp_delete_post(). @@ -3623,10 +3641,10 @@ function wp_delete_post( $postid = 0, $force_delete = false ) { * * @see wp_delete_post() * - * @param int $postid Post ID. - * @param WP_Post $post Post object. + * @param int $post_id Post ID. + * @param WP_Post $post Post object. */ - do_action( 'after_delete_post', $postid, $post ); + do_action( 'after_delete_post', $post_id, $post ); return $post; } From 6398a74cddbe13821d16883b4a5d039fcb133b8f Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 19 Mar 2024 18:03:00 +0000 Subject: [PATCH 191/251] Coding Standards: Rename the remaining `$postid` instances in `wp_delete_post()`. Follow-up to [57853], [57857]. See #60700. git-svn-id: https://develop.svn.wordpress.org/trunk@57858 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/post.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/wp-includes/post.php b/src/wp-includes/post.php index 932163190cfe5..9c662aaa2496f 100644 --- a/src/wp-includes/post.php +++ b/src/wp-includes/post.php @@ -3578,10 +3578,10 @@ function wp_delete_post( $post_id = 0, $force_delete = false ) { * * @since 6.6.0 * - * @param int $postid Post ID. - * @param WP_Post $post Post object. + * @param int $post_id Post ID. + * @param WP_Post $post Post object. */ - do_action( "delete_post_{$post->post_type}", $postid, $post ); + do_action( "delete_post_{$post->post_type}", $post_id, $post ); /** * Fires immediately before a post is deleted from the database. @@ -3607,10 +3607,10 @@ function wp_delete_post( $post_id = 0, $force_delete = false ) { * * @since 6.6.0 * - * @param int $postid Post ID. - * @param WP_Post $post Post object. + * @param int $post_id Post ID. + * @param WP_Post $post Post object. */ - do_action( "deleted_post_{$post->post_type}", $postid, $post ); + do_action( "deleted_post_{$post->post_type}", $post_id, $post ); /** * Fires immediately after a post is deleted from the database. From 4f9b520d3e2531c9ffb9ee5c06a2e2a7e34f9c52 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Wed, 20 Mar 2024 12:47:47 +0000 Subject: [PATCH 192/251] Coding Standards: Use strict comparison in `wp-includes/bookmark-template.php`. Follow-up to [3880]. Props aristath, poena, afercia, SergeyBiryukov. See #60700. git-svn-id: https://develop.svn.wordpress.org/trunk@57859 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/bookmark-template.php | 6 +++--- src/wp-includes/deprecated.php | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/wp-includes/bookmark-template.php b/src/wp-includes/bookmark-template.php index d9bca2bbd733f..d5878887d9895 100644 --- a/src/wp-includes/bookmark-template.php +++ b/src/wp-includes/bookmark-template.php @@ -124,11 +124,11 @@ function _walk_bookmarks( $bookmarks, $args = '' ) { $output .= $parsed_args['link_before']; - if ( null != $bookmark->link_image && $parsed_args['show_images'] ) { + if ( '' !== $bookmark->link_image && $parsed_args['show_images'] ) { if ( str_starts_with( $bookmark->link_image, 'http' ) ) { - $output .= "link_image\" $alt $title />"; + $output .= ''; } else { // If it's a relative path. - $output .= 'link_image\" $alt $title />"; + $output .= ''; } if ( $parsed_args['show_name'] ) { $output .= " $name"; diff --git a/src/wp-includes/deprecated.php b/src/wp-includes/deprecated.php index 4de4a9303916a..8087c3d86709f 100644 --- a/src/wp-includes/deprecated.php +++ b/src/wp-includes/deprecated.php @@ -996,11 +996,11 @@ function get_links($category = -1, $before = '', $after = '
    ', $between = ' $output .= ''; - if ( $row->link_image != null && $show_images ) { + if ( '' != $row->link_image && $show_images ) { if ( str_contains( $row->link_image, 'http' ) ) - $output .= "link_image\" $alt $title />"; + $output .= ''; else // If it's a relative path. - $output .= "link_image\" $alt $title />"; + $output .= ''; } else { $output .= $name; } From ae751035ac4e79b5badf895990337ecf156d5f3d Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Wed, 20 Mar 2024 19:05:04 +0000 Subject: [PATCH 193/251] Coding Standards: Rename the `$postid` parameter to `$post_id` in `has_meta(). Props mujuonly. Fixes #60810. See #60700. git-svn-id: https://develop.svn.wordpress.org/trunk@57860 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/post.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wp-admin/includes/post.php b/src/wp-admin/includes/post.php index a31332426b59b..63f479d140bae 100644 --- a/src/wp-admin/includes/post.php +++ b/src/wp-admin/includes/post.php @@ -1084,7 +1084,7 @@ function get_post_meta_by_id( $mid ) { * * @global wpdb $wpdb WordPress database abstraction object. * - * @param int $postid A post ID. + * @param int $post_id A post ID. * @return array[] { * Array of meta data arrays for the given post ID. * @@ -1098,7 +1098,7 @@ function get_post_meta_by_id( $mid ) { * } * } */ -function has_meta( $postid ) { +function has_meta( $post_id ) { global $wpdb; return $wpdb->get_results( @@ -1106,7 +1106,7 @@ function has_meta( $postid ) { "SELECT meta_key, meta_value, meta_id, post_id FROM $wpdb->postmeta WHERE post_id = %d ORDER BY meta_key,meta_id", - $postid + $post_id ), ARRAY_A ); From 8d0aed455b1790c5d51386f7675d9e8d68e48edf Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 21 Mar 2024 15:45:56 +0000 Subject: [PATCH 194/251] Tests: Remove unnecessary use of `utf8_encode()` in KSES tests. One of the tests for the `wp_kses_xml_named_entities()` function used `utf8_encode( chr( 160 ) )` to set an expectation of a Unicode character for a non-breaking space. It is understandable that this expectation was previously set this way, as it is not possible for a developer to distinguish between a ''breaking'' space and a ''non-breaking'' space visually, so the chances of the test accidentally breaking on an incorrect save when the plain Unicode character would be used, was high. However, the `utf8_encode()` function is deprecated as of PHP 8.2, and its use needs to be removed from the WP codebase. PHP 7.0 has introduced [https://wiki.php.net/rfc/unicode_escape Unicode escape sequences], which allows to create a text string using Unicode characters referenced by their codepoint. By switching the test case to provide the test expectation using a Unicode escape sequence, we remove the use of the deprecated PHP function and still preserve the safeguard against the test accidentally breaking. Follow-up to [52229]. Props jrf, afercia, poena, SergeyBiryukov. See #55603, #60705. git-svn-id: https://develop.svn.wordpress.org/trunk@57861 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/kses.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/phpunit/tests/kses.php b/tests/phpunit/tests/kses.php index 1dbe5b2587bc4..b2ef5edeff3a2 100644 --- a/tests/phpunit/tests/kses.php +++ b/tests/phpunit/tests/kses.php @@ -2140,7 +2140,7 @@ public function data_wp_kses_xml_named_entities() { // $allowedentitynames values testing. 'nbsp' => array( 'input' => array( '', 'nbsp' ), - 'expected' => utf8_encode( chr( 160 ) ), + 'expected' => "\u{00A0}", ), 'iexcl' => array( 'input' => array( '', 'iexcl' ), From 46abc7179f42e44518ee59f06340c3a59e723df7 Mon Sep 17 00:00:00 2001 From: Jb Audras Date: Fri, 22 Mar 2024 13:56:55 +0000 Subject: [PATCH 195/251] I18n: Ensure "Patterns" menu item is translatable. This changeset updates a translation string to ensure the "Patterns" menu item introduced in [57543] is translatable. This quickfix simply removes the erroneous `context` parameter so no new string is introduced during WP 6.5 string freeze period. A follow-up changeset will be needed to replace the current `__()` function with `_x()` and put back the `context` parameter. Follow-up to [57543]. Props jdy68, audrasjb, kebbet, swissspidy. Fixes #60825. git-svn-id: https://develop.svn.wordpress.org/trunk@57864 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/menu.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-admin/menu.php b/src/wp-admin/menu.php index a756fa40f3624..7959e724c9f5d 100644 --- a/src/wp-admin/menu.php +++ b/src/wp-admin/menu.php @@ -206,7 +206,7 @@ if ( wp_is_block_theme() ) { $submenu['themes.php'][6] = array( _x( 'Editor', 'site editor menu item' ), 'edit_theme_options', 'site-editor.php' ); } else { - $submenu['themes.php'][6] = array( __( 'Patterns', 'site editor menu item' ), 'edit_theme_options', 'edit.php?post_type=wp_block' ); + $submenu['themes.php'][6] = array( __( 'Patterns' ), 'edit_theme_options', 'edit.php?post_type=wp_block' ); } if ( ! wp_is_block_theme() && current_theme_supports( 'block-template-parts' ) ) { From 84c21abf36dc2d8cb2b58c03e0e1f237c0a6b18d Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Fri, 22 Mar 2024 14:15:24 +0000 Subject: [PATCH 196/251] Editor: Check if `mb_strtolower` exists before using it in the font library. Prevents an error when uploading fonts on certain systems, because the `mbstring` extension can be missing and thus the function may not be available. Props mujuonly, swissspidy, peterwilsoncc. Fixes #60823. See #55603. git-svn-id: https://develop.svn.wordpress.org/trunk@57865 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/fonts/class-wp-font-utils.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/fonts/class-wp-font-utils.php b/src/wp-includes/fonts/class-wp-font-utils.php index 3c2d5057e450e..6e914407487c6 100644 --- a/src/wp-includes/fonts/class-wp-font-utils.php +++ b/src/wp-includes/fonts/class-wp-font-utils.php @@ -110,8 +110,11 @@ public static function get_font_face_slug( $settings ) { 'unicodeRange' => 'U+0-10FFFF', ); $settings = wp_parse_args( $settings, $defaults ); - - $font_family = mb_strtolower( $settings['fontFamily'] ); + if ( function_exists( 'mb_strtolower' ) ) { + $font_family = mb_strtolower( $settings['fontFamily'] ); + } else { + $font_family = strtolower( $settings['fontFamily'] ); + } $font_style = strtolower( $settings['fontStyle'] ); $font_weight = strtolower( $settings['fontWeight'] ); $font_stretch = strtolower( $settings['fontStretch'] ); From 30420b642d27c8ca23dd72e6ee5a91cafabf514b Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 22 Mar 2024 22:05:25 +0000 Subject: [PATCH 197/251] Coding Standards: Use strict comparison in `wp-includes/link-template.php`. Follow-up to [4475], [6365], [8706], [9296], [9318], [14141], [15819], [21364], [27802]. Props aristath, poena, afercia, SergeyBiryukov. See #60700. git-svn-id: https://develop.svn.wordpress.org/trunk@57867 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/link-template.php | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/src/wp-includes/link-template.php b/src/wp-includes/link-template.php index a782edfb85548..faf07a80030aa 100644 --- a/src/wp-includes/link-template.php +++ b/src/wp-includes/link-template.php @@ -391,7 +391,7 @@ function get_post_permalink( $post = 0, $leavename = false, $sample = false ) { function get_page_link( $post = false, $leavename = false, $sample = false ) { $post = get_post( $post ); - if ( 'page' === get_option( 'show_on_front' ) && get_option( 'page_on_front' ) == $post->ID ) { + if ( 'page' === get_option( 'show_on_front' ) && (int) get_option( 'page_on_front' ) === $post->ID ) { $link = home_url( '/' ); } else { $link = _get_page_link( $post, $leavename, $sample ); @@ -701,7 +701,7 @@ function get_feed_link( $feed = '' ) { $permalink = $wp_rewrite->get_comment_feed_permastruct(); } - if ( get_default_feed() == $feed ) { + if ( get_default_feed() === $feed ) { $feed = ''; } @@ -763,7 +763,7 @@ function get_post_comments_feed_link( $post_id = 0, $feed = '' ) { $unattached = 'attachment' === $post->post_type && 0 === (int) $post->post_parent; if ( get_option( 'permalink_structure' ) ) { - if ( 'page' === get_option( 'show_on_front' ) && get_option( 'page_on_front' ) == $post_id ) { + if ( 'page' === get_option( 'show_on_front' ) && (int) get_option( 'page_on_front' ) === $post_id ) { $url = _get_page_link( $post_id ); } else { $url = get_permalink( $post_id ); @@ -777,7 +777,7 @@ function get_post_comments_feed_link( $post_id = 0, $feed = '' ) { $url = add_query_arg( 'attachment_id', $post_id, $url ); } else { $url = trailingslashit( $url ) . 'feed'; - if ( get_default_feed() != $feed ) { + if ( get_default_feed() !== $feed ) { $url .= "/$feed"; } $url = user_trailingslashit( $url, 'single_feed' ); @@ -879,7 +879,7 @@ function get_author_feed_link( $author_id, $feed = '' ) { $link = home_url( "?feed=$feed&author=" . $author_id ); } else { $link = get_author_posts_url( $author_id ); - if ( get_default_feed() == $feed ) { + if ( get_default_feed() === $feed ) { $feed_link = 'feed'; } else { $feed_link = "feed/$feed"; @@ -962,7 +962,7 @@ function get_term_feed_link( $term, $taxonomy = '', $feed = '' ) { } } else { $link = get_term_link( $term, $term->taxonomy ); - if ( get_default_feed() == $feed ) { + if ( get_default_feed() === $feed ) { $feed_link = 'feed'; } else { $feed_link = "feed/$feed"; @@ -1374,7 +1374,7 @@ function get_post_type_archive_feed_link( $post_type, $feed = '' ) { if ( get_option( 'permalink_structure' ) && is_array( $post_type_obj->rewrite ) && $post_type_obj->rewrite['feeds'] ) { $link = trailingslashit( $link ); $link .= 'feed/'; - if ( $feed != $default_feed ) { + if ( $feed !== $default_feed ) { $link .= "$feed/"; } } else { @@ -1737,7 +1737,7 @@ function get_edit_user_link( $user_id = null ) { return ''; } - if ( get_current_user_id() == $user->ID ) { + if ( get_current_user_id() === $user->ID ) { $link = get_edit_profile_url( $user->ID ); } else { $link = add_query_arg( 'user_id', $user->ID, self_admin_url( 'user-edit.php' ) ); @@ -3056,12 +3056,13 @@ function _navigation_markup( $links, $css_class = 'posts-navigation', $screen_re function get_comments_pagenum_link( $pagenum = 1, $max_page = 0 ) { global $wp_rewrite; - $pagenum = (int) $pagenum; + $pagenum = (int) $pagenum; + $max_page = (int) $max_page; $result = get_permalink(); if ( 'newest' === get_option( 'default_comments_page' ) ) { - if ( $pagenum != $max_page ) { + if ( $pagenum !== $max_page ) { if ( $wp_rewrite->using_permalinks() ) { $result = user_trailingslashit( trailingslashit( $result ) . $wp_rewrite->comments_pagination_base . '-' . $pagenum, 'commentpaged' ); } else { @@ -4154,7 +4155,9 @@ function wp_get_shortlink( $id = 0, $context = 'post', $allow_slugs = true ) { if ( ! empty( $post_id ) ) { $post_type = get_post_type_object( $post->post_type ); - if ( 'page' === $post->post_type && get_option( 'page_on_front' ) == $post->ID && 'page' === get_option( 'show_on_front' ) ) { + if ( 'page' === $post->post_type + && 'page' === get_option( 'show_on_front' ) && (int) get_option( 'page_on_front' ) === $post->ID + ) { $shortlink = home_url( '/' ); } elseif ( $post_type && $post_type->public ) { $shortlink = home_url( '?p=' . $post_id ); From ca8d78e5f2f50c59749398b5932e246ada0c0a37 Mon Sep 17 00:00:00 2001 From: Peter Wilson Date: Fri, 22 Mar 2024 22:59:01 +0000 Subject: [PATCH 198/251] Editor: Prevent font folder naive filtering causing infinite loops. This modifies the font directory API to more closely reflect the upload directory API to help account for naive filtering when uploading fonts. This moves the protection of infinite loops to the new function `_wp_filter_font_directory()` to allow developers extending and maintaining the font library to apply the filter without the need for a closure. These changes also ensure both the `upload_dir` and `font_dir` filter are applied consistently when both creating and deleting fonts faces. Prior to this commit the `upload_dir` filter was only fired when creating fonts faces via the REST API. Applying the font directory filter to the `upload_dir` filter is now done by adding the `_wp_filter_font_directory` function rather than `wp_get_font_dir()`. Developers who have previously modified the font upload directory using the `font_dir` filter will NOT need to upload their code. Extenders wishing to upload files to the font directory can do so via the code: {{{#!php unregister_font_collection( $slug ); } +/** + * Retrieves font uploads directory information. + * + * Same as wp_font_dir() but "light weight" as it doesn't attempt to create the font uploads directory. + * Intended for use in themes, when only 'basedir' and 'baseurl' are needed, generally in all cases + * when not uploading files. + * + * @since 6.5.0 + * + * @see wp_font_dir() + * + * @return array See wp_font_dir() for description. + */ +function wp_get_font_dir() { + return wp_font_dir( false ); +} + /** * Returns an array containing the current fonts upload directory's path and URL. * * @since 6.5.0 * - * @return array $defaults { - * Array of information about the upload directory. + * @param bool $create_dir Optional. Whether to check and create the font uploads directory. Default true. + * @return array { + * Array of information about the font upload directory. * * @type string $path Base directory and subdirectory or full path to the fonts upload directory. * @type string $url Base URL and subdirectory or absolute URL to the fonts upload directory. @@ -107,13 +125,54 @@ function wp_unregister_font_collection( string $slug ) { * @type string|false $error False or error message. * } */ -function wp_get_font_dir() { +function wp_font_dir( $create_dir = true ) { + /* + * Allow extenders to manipulate the font directory consistently. + * + * Ensures the upload_dir filter is fired both when calling this function + * directly and when the upload directory is filtered in the Font Face + * REST API endpoint. + */ + add_filter( 'upload_dir', '_wp_filter_font_directory' ); + $font_dir = wp_upload_dir( null, $create_dir, false ); + remove_filter( 'upload_dir', '_wp_filter_font_directory' ); + return $font_dir; +} + +/** + * Returns the font directory for use by the font library. + * + * This function is a callback for the {@see 'upload_dir'} filter. It is not + * intended to be called directly. Use wp_get_font_dir() instead. + * + * The function can be used when extending the font library to modify the upload + * destination for font files via the upload_dir filter. The recommended way to + * do this is: + * + * ```php + * add_filter( 'upload_dir', '_wp_filter_font_directory' ); + * // Your code to upload or sideload a font file. + * remove_filter( 'upload_dir', '_wp_filter_font_directory' ); + * ``` + * + * @since 6.5.0 + * @access private + * + * @param string $font_dir The font directory. + * @return string The modified font directory. + */ +function _wp_filter_font_directory( $font_dir ) { + if ( doing_filter( 'font_dir' ) ) { + // Avoid an infinite loop. + return $font_dir; + } + $site_path = ''; if ( is_multisite() && ! ( is_main_network() && is_main_site() ) ) { $site_path = '/sites/' . get_current_blog_id(); } - $defaults = array( + $font_dir = array( 'path' => path_join( WP_CONTENT_DIR, 'fonts' ) . $site_path, 'url' => untrailingslashit( content_url( 'fonts' ) ) . $site_path, 'subdir' => '', @@ -129,9 +188,18 @@ function wp_get_font_dir() { * * @since 6.5.0 * - * @param array $defaults The original fonts directory data. + * @param array $font_dir { + * Array of information about the font upload directory. + * + * @type string $path Base directory and subdirectory or full path to the fonts upload directory. + * @type string $url Base URL and subdirectory or absolute URL to the fonts upload directory. + * @type string $subdir Subdirectory + * @type string $basedir Path without subdir. + * @type string $baseurl URL path without subdir. + * @type string|false $error False or error message. + * } */ - return apply_filters( 'font_dir', $defaults ); + return apply_filters( 'font_dir', $font_dir ); } /** diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-font-faces-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-font-faces-controller.php index 309fb126e1c79..c7f72d4ec1d9d 100644 --- a/src/wp-includes/rest-api/endpoints/class-wp-rest-font-faces-controller.php +++ b/src/wp-includes/rest-api/endpoints/class-wp-rest-font-faces-controller.php @@ -856,21 +856,8 @@ protected function sanitize_src( $value ) { */ protected function handle_font_file_upload( $file ) { add_filter( 'upload_mimes', array( 'WP_Font_Utils', 'get_allowed_font_mime_types' ) ); - - /* - * Set the upload directory to the fonts directory. - * - * wp_get_font_dir() contains the 'font_dir' hook, whose callbacks are - * likely to call wp_get_upload_dir(). - * - * To avoid an infinite loop, don't hook wp_get_font_dir() to 'upload_dir'. - * Instead, just pass its return value to the 'upload_dir' callback. - */ - $font_dir = wp_get_font_dir(); - $set_upload_dir = function () use ( $font_dir ) { - return $font_dir; - }; - add_filter( 'upload_dir', $set_upload_dir ); + // Filter the upload directory to return the fonts directory. + add_filter( 'upload_dir', '_wp_filter_font_directory' ); $overrides = array( 'upload_error_handler' => array( $this, 'handle_font_file_upload_error' ), @@ -887,7 +874,7 @@ protected function handle_font_file_upload( $file ) { $uploaded_file = wp_handle_upload( $file, $overrides ); - remove_filter( 'upload_dir', $set_upload_dir ); + remove_filter( 'upload_dir', '_wp_filter_font_directory' ); remove_filter( 'upload_mimes', array( 'WP_Font_Utils', 'get_allowed_font_mime_types' ) ); return $uploaded_file; diff --git a/tests/phpunit/tests/fonts/font-library/fontLibraryHooks.php b/tests/phpunit/tests/fonts/font-library/fontLibraryHooks.php index 083c12202aa34..c288a1ae93845 100644 --- a/tests/phpunit/tests/fonts/font-library/fontLibraryHooks.php +++ b/tests/phpunit/tests/fonts/font-library/fontLibraryHooks.php @@ -73,13 +73,13 @@ protected function upload_font_file( $font_filename ) { $font_file_path = DIR_TESTDATA . '/fonts/' . $font_filename; add_filter( 'upload_mimes', array( 'WP_Font_Utils', 'get_allowed_font_mime_types' ) ); - add_filter( 'upload_dir', 'wp_get_font_dir' ); + add_filter( 'upload_dir', '_wp_filter_font_directory' ); $font_file = wp_upload_bits( $font_filename, null, file_get_contents( $font_file_path ) ); - remove_filter( 'upload_dir', 'wp_get_font_dir' ); + remove_filter( 'upload_dir', '_wp_filter_font_directory' ); remove_filter( 'upload_mimes', array( 'WP_Font_Utils', 'get_allowed_font_mime_types' ) ); return $font_file; diff --git a/tests/phpunit/tests/fonts/font-library/wpFontsDir.php b/tests/phpunit/tests/fonts/font-library/wpFontsDir.php index a8f79888315bd..5021aefb59d95 100644 --- a/tests/phpunit/tests/fonts/font-library/wpFontsDir.php +++ b/tests/phpunit/tests/fonts/font-library/wpFontsDir.php @@ -69,4 +69,44 @@ function set_new_values( $defaults ) { $this->assertSame( static::$dir_defaults, $font_dir, 'The wp_get_font_dir() method should return the default values.' ); } + + /** + * @ticket 60652 + */ + public function test_fonts_dir_filters_do_not_trigger_infinite_loop() { + /* + * Naive filtering of uploads directory to return font directory. + * + * This emulates the approach a plugin developer may take to + * add the filter when extending the font library functionality. + */ + add_filter( 'upload_dir', '_wp_filter_font_directory' ); + + add_filter( + 'upload_dir', + function ( $upload_dir ) { + static $count = 0; + ++$count; + // The filter may be applied a couple of times, at five iterations assume an infinite loop. + if ( $count >= 5 ) { + $this->fail( 'Filtering the uploads directory triggered an infinite loop.' ); + } + return $upload_dir; + }, + 5 + ); + + /* + * Filter the font directory to return the uploads directory. + * + * This emulates moving font files back to the uploads directory due + * to file system structure. + */ + add_filter( 'font_dir', 'wp_get_upload_dir' ); + + wp_get_upload_dir(); + + // This will never be hit if an infinite loop is triggered. + $this->assertTrue( true ); + } } From 0e100d0d3ac0a65a1ddfdd42d24463a1257c623f Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Sat, 23 Mar 2024 09:20:57 +0000 Subject: [PATCH 199/251] Help/About: Update the About page for 6.5. Updates the font size for `` tags and updates several translatable strings. Props sabernhardt, laurlittle, SergeyBiryukov. See #60303. git-svn-id: https://develop.svn.wordpress.org/trunk@57870 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/about.php | 8 ++++---- src/wp-admin/css/about.css | 4 ++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/wp-admin/about.php b/src/wp-admin/about.php index 65e6d4501d2fd..169f0b6cda252 100644 --- a/src/wp-admin/about.php +++ b/src/wp-admin/about.php @@ -66,7 +66,7 @@

    -

    +

    @@ -112,7 +112,7 @@

    -

    +

    @@ -180,7 +180,7 @@ printf( /* translators: %s: Requires Plugins */ __( 'There’s now an easier way to manage plugin dependencies. Plugin authors can supply a new %s header with a comma-separated list of required plugin slugs, presenting users with links to install and activate those plugins first.' ), - 'Requires Plugins' + 'Requires Plugins' ); ?>

    @@ -200,7 +200,7 @@

    -

    +

    diff --git a/src/wp-admin/css/about.css b/src/wp-admin/css/about.css index 205cf2788bcae..20a420e8ae3e0 100644 --- a/src/wp-admin/css/about.css +++ b/src/wp-admin/css/about.css @@ -513,6 +513,10 @@ display: none !important; } +.about__container code { + font-size: inherit; +} + .about__section { font-size: 1.125rem; line-height: 1.55; From f6cad3656b5717097d0e058a6dc61ef33efee6be Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Sat, 23 Mar 2024 09:24:32 +0000 Subject: [PATCH 200/251] Editor: Update the Google Fonts font collection URL to the latest version for 6.5. Props mmaattiiaass. Fixes #60819. git-svn-id: https://develop.svn.wordpress.org/trunk@57871 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 74feee1ac9cf7..82085628d1378 100644 --- a/src/wp-includes/fonts.php +++ b/src/wp-includes/fonts.php @@ -262,7 +262,7 @@ function _wp_register_default_font_collections() { array( 'name' => _x( 'Google Fonts', 'font collection name' ), 'description' => __( 'Install from Google Fonts. Fonts are copied to and served from your site.' ), - 'font_families' => 'https://s.w.org/images/fonts/17.7/collections/google-fonts-with-preview.json', + 'font_families' => 'https://s.w.org/images/fonts/wp-6.5/collections/google-fonts-with-preview.json', 'categories' => array( array( 'name' => _x( 'Sans Serif', 'font category' ), From f87018978c99ec3218d2b42d246fab8e92a32ed9 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sat, 23 Mar 2024 14:18:55 +0000 Subject: [PATCH 201/251] Coding Standards: Use strict comparison in `wp-includes/bookmark.php`. Follow-up to [21], [3570], [3845], [8758]. Props aristath, poena, afercia, SergeyBiryukov. See #60700. git-svn-id: https://develop.svn.wordpress.org/trunk@57873 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/bookmark.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/bookmark.php b/src/wp-includes/bookmark.php index 7513a5622c6b5..d4b597843820d 100644 --- a/src/wp-includes/bookmark.php +++ b/src/wp-includes/bookmark.php @@ -34,7 +34,7 @@ function get_bookmark( $bookmark, $output = OBJECT, $filter = 'raw' ) { wp_cache_add( $bookmark->link_id, $bookmark, 'bookmark' ); $_bookmark = $bookmark; } else { - if ( isset( $GLOBALS['link'] ) && ( $GLOBALS['link']->link_id == $bookmark ) ) { + if ( isset( $GLOBALS['link'] ) && ( $GLOBALS['link']->link_id === $bookmark ) ) { $_bookmark = & $GLOBALS['link']; } else { $_bookmark = wp_cache_get( $bookmark, 'bookmark' ); @@ -307,7 +307,7 @@ function get_bookmarks( $args = '' ) { $query = "SELECT * $length $recently_updated_test $get_updated FROM $wpdb->links $join WHERE 1=1 $visible $category_query"; $query .= " $exclusions $inclusions $search"; $query .= " ORDER BY $orderby $order"; - if ( -1 != $parsed_args['limit'] ) { + if ( -1 !== $parsed_args['limit'] ) { $query .= ' LIMIT ' . absint( $parsed_args['limit'] ); } From f9b59e940dcb34a9b8cd6faacc5c35a2846dbbd2 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 24 Mar 2024 13:02:04 +0000 Subject: [PATCH 202/251] Coding Standards: Use strict comparison in `wp-includes/ms-blogs.php`. Follow-up to [12603], [12948], [13125], [13126], [21480], [21485], [38457], [41625], [43654], [43655], [45794]. Props aristath, poena, afercia, SergeyBiryukov. See #60700. git-svn-id: https://develop.svn.wordpress.org/trunk@57874 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/ms-blogs.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/wp-includes/ms-blogs.php b/src/wp-includes/ms-blogs.php index 1f464c8d70879..0468f12646b88 100644 --- a/src/wp-includes/ms-blogs.php +++ b/src/wp-includes/ms-blogs.php @@ -187,7 +187,7 @@ function get_blog_details( $fields = null, $get_all = true ) { if ( $details ) { if ( ! is_object( $details ) ) { - if ( -1 == $details ) { + if ( -1 === $details ) { return false; } else { // Clear old pre-serialized objects. Cache clients do better with that. @@ -207,7 +207,7 @@ function get_blog_details( $fields = null, $get_all = true ) { // If short was requested and full cache is set, we can return. if ( $details ) { if ( ! is_object( $details ) ) { - if ( -1 == $details ) { + if ( -1 === $details ) { return false; } else { // Clear old pre-serialized objects. Cache clients do better with that. @@ -360,7 +360,7 @@ function get_blog_option( $id, $option, $default_value = false ) { $id = get_current_blog_id(); } - if ( get_current_blog_id() == $id ) { + if ( get_current_blog_id() === $id ) { return get_option( $option, $default_value ); } @@ -407,7 +407,7 @@ function add_blog_option( $id, $option, $value ) { $id = get_current_blog_id(); } - if ( get_current_blog_id() == $id ) { + if ( get_current_blog_id() === $id ) { return add_option( $option, $value ); } @@ -434,7 +434,7 @@ function delete_blog_option( $id, $option ) { $id = get_current_blog_id(); } - if ( get_current_blog_id() == $id ) { + if ( get_current_blog_id() === $id ) { return delete_option( $option ); } @@ -463,7 +463,7 @@ function update_blog_option( $id, $option, $value, $deprecated = null ) { _deprecated_argument( __FUNCTION__, '3.1.0' ); } - if ( get_current_blog_id() == $id ) { + if ( get_current_blog_id() === $id ) { return update_option( $option, $value ); } @@ -511,7 +511,7 @@ function switch_to_blog( $new_blog_id, $deprecated = null ) { * set the right vars, do the associated actions, but skip * the extra unnecessary work */ - if ( $new_blog_id == $prev_blog_id ) { + if ( $new_blog_id === $prev_blog_id ) { /** * Fires when the blog is switched. * @@ -614,7 +614,7 @@ function restore_current_blog() { $new_blog_id = array_pop( $GLOBALS['_wp_switched_stack'] ); $prev_blog_id = get_current_blog_id(); - if ( $new_blog_id == $prev_blog_id ) { + if ( $new_blog_id === $prev_blog_id ) { /** This filter is documented in wp-includes/ms-blogs.php */ do_action( 'switch_blog', $new_blog_id, $prev_blog_id, 'restore' ); @@ -693,7 +693,7 @@ function restore_current_blog() { * @param int $old_site_id Old site ID. */ function wp_switch_roles_and_user( $new_site_id, $old_site_id ) { - if ( $new_site_id == $old_site_id ) { + if ( $new_site_id === $old_site_id ) { return; } From e73db80196c0044503633bda41511258a9516a8b Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Mon, 25 Mar 2024 12:21:36 +0000 Subject: [PATCH 203/251] External Libraries: Update the Requests library to version 2.0.11. This is a maintenance release with two minor fixes to improve PHP 8.4 compatibility. References: - [https://github.com/WordPress/Requests/releases/tag/v2.0.11 Requests 2.0.11 release notes] - [https://github.com/WordPress/Requests/compare/v2.0.9...v2.0.11 Full list of changes in Requests 2.0.11] Follow-up to [56554], [54997], [55007], [55046], [55225], [55296], [55629]. Props swissspidy, jrf. Fixes #60838. git-svn-id: https://develop.svn.wordpress.org/trunk@57876 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/Requests/src/Cookie.php | 8 +++++++- src/wp-includes/Requests/src/Requests.php | 2 +- src/wp-includes/Requests/src/Transport/Fsockopen.php | 10 +++++++++- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/src/wp-includes/Requests/src/Cookie.php b/src/wp-includes/Requests/src/Cookie.php index 6f971d6dbf2a8..2cc821d647161 100644 --- a/src/wp-includes/Requests/src/Cookie.php +++ b/src/wp-includes/Requests/src/Cookie.php @@ -470,13 +470,19 @@ public static function parse($cookie_header, $name = '', $reference_time = null) * @param \WpOrg\Requests\Iri|null $origin URI for comparing cookie origins * @param int|null $time Reference time for expiration calculation * @return array + * + * @throws \WpOrg\Requests\Exception\InvalidArgument When the passed $origin argument is not null or an instance of the Iri class. */ - public static function parse_from_headers(Headers $headers, Iri $origin = null, $time = null) { + public static function parse_from_headers(Headers $headers, $origin = null, $time = null) { $cookie_headers = $headers->getValues('Set-Cookie'); if (empty($cookie_headers)) { return []; } + if ($origin !== null && !($origin instanceof Iri)) { + throw InvalidArgument::create(2, '$origin', Iri::class . ' or null', gettype($origin)); + } + $cookies = []; foreach ($cookie_headers as $header) { $parsed = self::parse($header, '', $time); diff --git a/src/wp-includes/Requests/src/Requests.php b/src/wp-includes/Requests/src/Requests.php index bb5292ac491c6..5c6f13e05a914 100644 --- a/src/wp-includes/Requests/src/Requests.php +++ b/src/wp-includes/Requests/src/Requests.php @@ -148,7 +148,7 @@ class Requests { * * @var string */ - const VERSION = '2.0.9'; + const VERSION = '2.0.11'; /** * Selected transport name diff --git a/src/wp-includes/Requests/src/Transport/Fsockopen.php b/src/wp-includes/Requests/src/Transport/Fsockopen.php index 2b53d0c10c4b1..6bd82a32f03ab 100644 --- a/src/wp-includes/Requests/src/Transport/Fsockopen.php +++ b/src/wp-includes/Requests/src/Transport/Fsockopen.php @@ -144,7 +144,15 @@ public function request($url, $headers = [], $data = [], $options = []) { $verifyname = false; } - stream_context_set_option($context, ['ssl' => $context_options]); + // Handle the PHP 8.4 deprecation (PHP 9.0 removal) of the function signature we use for stream_context_set_option(). + // Ref: https://wiki.php.net/rfc/deprecate_functions_with_overloaded_signatures#stream_context_set_option + if (function_exists('stream_context_set_options')) { + // PHP 8.3+. + stream_context_set_options($context, ['ssl' => $context_options]); + } else { + // PHP < 8.3. + stream_context_set_option($context, ['ssl' => $context_options]); + } } else { $remote_socket = 'tcp://' . $host; } From 4366183f918f4284aeae73d235f04015bb34bb7e Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 25 Mar 2024 17:17:06 +0000 Subject: [PATCH 204/251] Coding Standards: Use strict comparison in `wp-includes/ms-load.php`. Follow-up to [12602], [12688], [12896], [27359], [37475]. Props aristath, poena, afercia, SergeyBiryukov. See #60700. git-svn-id: https://develop.svn.wordpress.org/trunk@57877 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/ms-load.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/wp-includes/ms-load.php b/src/wp-includes/ms-load.php index 661d6a9f939e9..0708bc4dcd86e 100644 --- a/src/wp-includes/ms-load.php +++ b/src/wp-includes/ms-load.php @@ -92,7 +92,7 @@ function ms_site_check() { $blog = get_site(); - if ( '1' == $blog->deleted ) { + if ( '1' === $blog->deleted ) { if ( file_exists( WP_CONTENT_DIR . '/blog-deleted.php' ) ) { return WP_CONTENT_DIR . '/blog-deleted.php'; } else { @@ -100,7 +100,7 @@ function ms_site_check() { } } - if ( '2' == $blog->deleted ) { + if ( '2' === $blog->deleted ) { if ( file_exists( WP_CONTENT_DIR . '/blog-inactive.php' ) ) { return WP_CONTENT_DIR . '/blog-inactive.php'; } else { @@ -115,7 +115,7 @@ function ms_site_check() { } } - if ( '1' == $blog->archived || '1' == $blog->spam ) { + if ( '1' === $blog->archived || '1' === $blog->spam ) { if ( file_exists( WP_CONTENT_DIR . '/blog-suspended.php' ) ) { return WP_CONTENT_DIR . '/blog-suspended.php'; } else { @@ -377,7 +377,7 @@ function ms_load_current_site_and_network( $domain, $path, $subdomain = false ) } // The network declared by the site trumps any constants. - if ( $current_blog && $current_blog->site_id != $current_site->id ) { + if ( $current_blog && (int) $current_blog->site_id !== $current_site->id ) { $current_site = WP_Network::get_instance( $current_blog->site_id ); } From f8e1870778cadf3bd48d03fb4e53fd144686ffe9 Mon Sep 17 00:00:00 2001 From: Peter Wilson Date: Tue, 26 Mar 2024 01:23:14 +0000 Subject: [PATCH 205/251] Editor: Relocate font files uploads to the uploads directory. Relocate the upload of font files uploaded via the Font Library feature to the `wp-content/uploads/fonts` (or multisite equivalent) directory. This accounts for immutable file systems in which directories are unable to be created within `wp-content` and deploy processes which require special consideration of the `uploads` directory to ensure it remains persistent between deploys. Props azaozz, burnuser, cbirdsong, christopherplus, costdev, davidbaumwald, desrosj, elrae, euthelup, get_dave, grantmkin, hellofromtonya, janthiel, jazzs3quence, johnbillion, jorbin, justlevine, kraftner, matveb, mcsf, mmaattiiaass, nico23, peterwilsoncc, priethor, rmccue, samuelsidler, swissspidy, youknowriad. Fixes #60845. git-svn-id: https://develop.svn.wordpress.org/trunk@57878 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/fonts.php | 13 ++---- .../tests/fonts/font-library/wpFontsDir.php | 45 +++++++++++++++++-- 2 files changed, 45 insertions(+), 13 deletions(-) diff --git a/src/wp-includes/fonts.php b/src/wp-includes/fonts.php index 82085628d1378..8ebd3849c36d3 100644 --- a/src/wp-includes/fonts.php +++ b/src/wp-includes/fonts.php @@ -167,17 +167,12 @@ function _wp_filter_font_directory( $font_dir ) { return $font_dir; } - $site_path = ''; - if ( is_multisite() && ! ( is_main_network() && is_main_site() ) ) { - $site_path = '/sites/' . get_current_blog_id(); - } - $font_dir = array( - 'path' => path_join( WP_CONTENT_DIR, 'fonts' ) . $site_path, - 'url' => untrailingslashit( content_url( 'fonts' ) ) . $site_path, + 'path' => untrailingslashit( $font_dir['basedir'] ) . '/fonts', + 'url' => untrailingslashit( $font_dir['baseurl'] ) . '/fonts', 'subdir' => '', - 'basedir' => path_join( WP_CONTENT_DIR, 'fonts' ) . $site_path, - 'baseurl' => untrailingslashit( content_url( 'fonts' ) ) . $site_path, + 'basedir' => untrailingslashit( $font_dir['basedir'] ) . '/fonts', + 'baseurl' => untrailingslashit( $font_dir['baseurl'] ) . '/fonts', 'error' => false, ); diff --git a/tests/phpunit/tests/fonts/font-library/wpFontsDir.php b/tests/phpunit/tests/fonts/font-library/wpFontsDir.php index 5021aefb59d95..22208ca7b2e26 100644 --- a/tests/phpunit/tests/fonts/font-library/wpFontsDir.php +++ b/tests/phpunit/tests/fonts/font-library/wpFontsDir.php @@ -15,23 +15,58 @@ class Tests_Fonts_WpFontDir extends WP_UnitTestCase { public static function set_up_before_class() { parent::set_up_before_class(); + $upload_dir = wp_get_upload_dir(); static::$dir_defaults = array( - 'path' => path_join( WP_CONTENT_DIR, 'fonts' ), - 'url' => content_url( 'fonts' ), + 'path' => untrailingslashit( $upload_dir['basedir'] ) . '/fonts', + 'url' => untrailingslashit( $upload_dir['baseurl'] ) . '/fonts', 'subdir' => '', - 'basedir' => path_join( WP_CONTENT_DIR, 'fonts' ), - 'baseurl' => content_url( 'fonts' ), + 'basedir' => untrailingslashit( $upload_dir['basedir'] ) . '/fonts', + 'baseurl' => untrailingslashit( $upload_dir['baseurl'] ) . '/fonts', 'error' => false, ); } + /** + * Ensure the font directory is correct. + */ public function test_fonts_dir() { $font_dir = wp_get_font_dir(); $this->assertSame( $font_dir, static::$dir_defaults ); } + /** + * Ensure that the fonts directory is correct for a multisite installation. + * + * The main site will use the default location and others will follow a pattern of `/sites/{$blog_id}/fonts` + * + * @group multisite + * @group ms-required + */ + public function test_fonts_dir_for_multisite() { + $blog_id = self::factory()->blog->create(); + $main_site_upload_dir = wp_get_upload_dir(); + switch_to_blog( $blog_id ); + + $actual = wp_get_font_dir(); + $expected = array( + 'path' => untrailingslashit( $main_site_upload_dir['basedir'] ) . "/sites/{$blog_id}/fonts", + 'url' => untrailingslashit( $main_site_upload_dir['baseurl'] ) . "/sites/{$blog_id}/fonts", + 'subdir' => '', + 'basedir' => untrailingslashit( $main_site_upload_dir['basedir'] ) . "/sites/{$blog_id}/fonts", + 'baseurl' => untrailingslashit( $main_site_upload_dir['baseurl'] ) . "/sites/{$blog_id}/fonts", + 'error' => false, + ); + + // Restore blog prior to assertions. + restore_current_blog(); + $this->assertSameSets( $expected, $actual ); + } + + /** + * Ensure modifying the font directory via the 'font_dir' filter works. + */ public function test_fonts_dir_with_filter() { // Define a callback function to pass to the filter. function set_new_values( $defaults ) { @@ -71,6 +106,8 @@ function set_new_values( $defaults ) { } /** + * Ensure infinite loops are not triggered when filtering the font uploads directory. + * * @ticket 60652 */ public function test_fonts_dir_filters_do_not_trigger_infinite_loop() { From 3858ba2eb33c8cb2907be63d7df673307ade0af4 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Tue, 26 Mar 2024 09:37:18 +0000 Subject: [PATCH 206/251] Media: Fix CSS issue preventing inserting images on smaller viewports. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Addresses a regression introduced in [57605] where the “Select” button in the media modal was not clickable anymore due to an overlaid element. Props ramonopoly, swissspidy, freewebmentor. Fixes #33049. git-svn-id: https://develop.svn.wordpress.org/trunk@57881 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/css/media-views.css | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wp-includes/css/media-views.css b/src/wp-includes/css/media-views.css index de1ae1bdae1a8..851646e0e7499 100644 --- a/src/wp-includes/css/media-views.css +++ b/src/wp-includes/css/media-views.css @@ -2818,7 +2818,7 @@ .media-frame .wp-filter .media-toolbar-secondary { position: unset; } - + .media-frame .media-toolbar-secondary .spinner { position: absolute; top: 0; @@ -2828,13 +2828,13 @@ right: 0; z-index: 9; } - + .media-bg-overlay { content: ''; background: #ffffff; width: 100%; height: 100%; - display: hidden; + display: none; position: absolute; left: 0; right: 0; From f25ca58803b886ab7e09f5ece878bb4e942a03b1 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 26 Mar 2024 21:39:36 +0000 Subject: [PATCH 207/251] Coding Standards: Use strict comparison in `wp-includes/pluggable.php`. Follow-up to [3566], [6387], [10437], [11057], [11387], [16208], [16304], [18195], [20410], [26367], [34947]. Props aristath, poena, afercia, SergeyBiryukov. See #60700. git-svn-id: https://develop.svn.wordpress.org/trunk@57882 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/pluggable.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/wp-includes/pluggable.php b/src/wp-includes/pluggable.php index 03bae13ac9984..51701e787e4d6 100644 --- a/src/wp-includes/pluggable.php +++ b/src/wp-includes/pluggable.php @@ -30,7 +30,7 @@ function wp_set_current_user( $id, $name = '' ) { // If `$id` matches the current user, there is nothing to do. if ( isset( $current_user ) && ( $current_user instanceof WP_User ) - && ( $id == $current_user->ID ) + && ( $id === $current_user->ID ) && ( null !== $id ) ) { return $current_user; @@ -617,7 +617,7 @@ function wp_authenticate( $username, $password ) { */ $user = apply_filters( 'authenticate', null, $username, $password ); - if ( null == $user ) { + if ( null === $user ) { /* * TODO: What should the error message be? (Or would these even happen?) * Only needed if all authentication handlers fail to return anything. @@ -1093,7 +1093,7 @@ function wp_set_auth_cookie( $user_id, $remember = false, $secure = '', $token = setcookie( $auth_cookie_name, $auth_cookie, $expire, PLUGINS_COOKIE_PATH, COOKIE_DOMAIN, $secure, true ); setcookie( $auth_cookie_name, $auth_cookie, $expire, ADMIN_COOKIE_PATH, COOKIE_DOMAIN, $secure, true ); setcookie( LOGGED_IN_COOKIE, $logged_in_cookie, $expire, COOKIEPATH, COOKIE_DOMAIN, $secure_logged_in_cookie, true ); - if ( COOKIEPATH != SITECOOKIEPATH ) { + if ( COOKIEPATH !== SITECOOKIEPATH ) { setcookie( LOGGED_IN_COOKIE, $logged_in_cookie, $expire, SITECOOKIEPATH, COOKIE_DOMAIN, $secure_logged_in_cookie, true ); } } @@ -1315,7 +1315,7 @@ function check_admin_referer( $action = -1, $query_arg = '_wpnonce' ) { * False if the nonce is invalid. */ function check_ajax_referer( $action = -1, $query_arg = false, $stop = true ) { - if ( -1 == $action ) { + if ( -1 === $action ) { _doing_it_wrong( __FUNCTION__, __( 'You should specify an action to be verified by using the first parameter.' ), '4.7.0' ); } @@ -1698,12 +1698,12 @@ function wp_notify_postauthor( $comment_id, $deprecated = null ) { $notify_author = apply_filters( 'comment_notification_notify_author', false, $comment->comment_ID ); // The comment was left by the author. - if ( $author && ! $notify_author && $comment->user_id == $post->post_author ) { + if ( $author && ! $notify_author && (int) $comment->user_id === (int) $post->post_author ) { unset( $emails[ $author->user_email ] ); } // The author moderated a comment on their own post. - if ( $author && ! $notify_author && get_current_user_id() == $post->post_author ) { + if ( $author && ! $notify_author && get_current_user_id() === (int) $post->post_author ) { unset( $emails[ $author->user_email ] ); } From 5dff254d49d30e24ae5f1fa5a1ce1cc64a52b620 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Wed, 27 Mar 2024 12:28:37 +0000 Subject: [PATCH 208/251] Coding Standards: Use strict comparison in `wp-includes/pomo/plural-forms.php`. Follow-up to [41722]. Props aristath, poena, afercia, SergeyBiryukov. See #60700. git-svn-id: https://develop.svn.wordpress.org/trunk@57883 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/pomo/plural-forms.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/pomo/plural-forms.php b/src/wp-includes/pomo/plural-forms.php index ae9c306d989a8..a604334e88c20 100644 --- a/src/wp-includes/pomo/plural-forms.php +++ b/src/wp-includes/pomo/plural-forms.php @@ -320,13 +320,13 @@ public function execute( $n ) { case '!=': $v2 = array_pop( $stack ); $v1 = array_pop( $stack ); - $stack[] = $v1 != $v2; + $stack[] = $v1 !== $v2; break; case '==': $v2 = array_pop( $stack ); $v1 = array_pop( $stack ); - $stack[] = $v1 == $v2; + $stack[] = $v1 === $v2; break; case '?:': From 9bf06950a115584c498adba125eb3c233f878775 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Wed, 27 Mar 2024 15:58:46 +0000 Subject: [PATCH 209/251] Editor: disable `shadow.defaultPresets` for classic themes. With this change default shadow presets are never shown for classic themes, and classic themes have no options for adding custom ones. This essentially reverts [57717] and [57827] / [57828], which had unintended consequences. Props ajlende, oandregal, madhudollu, swissspidy, get_dave, andrewserong, desrosj. Fixes #60815. git-svn-id: https://develop.svn.wordpress.org/trunk@57885 602fd350-edb4-49c9-b593-d223f7449a82 --- .../class-wp-theme-json-resolver.php | 11 ++ src/wp-includes/class-wp-theme-json.php | 3 +- src/wp-includes/theme.json | 2 +- .../data/themedir1/block-theme/theme.json | 14 +++ tests/phpunit/tests/theme/wpThemeJson.php | 6 - .../tests/theme/wpThemeJsonResolver.php | 106 ++++++++++++++++++ 6 files changed, 133 insertions(+), 9 deletions(-) diff --git a/src/wp-includes/class-wp-theme-json-resolver.php b/src/wp-includes/class-wp-theme-json-resolver.php index 44db8364f1092..3ad5ecf0c4dde 100644 --- a/src/wp-includes/class-wp-theme-json-resolver.php +++ b/src/wp-includes/class-wp-theme-json-resolver.php @@ -312,6 +312,17 @@ public static function get_theme_data( $deprecated = array(), $options = array() } $theme_support_data['settings']['color']['defaultGradients'] = $default_gradients; + if ( ! isset( $theme_support_data['settings']['shadow'] ) ) { + $theme_support_data['settings']['shadow'] = array(); + } + /* + * Shadow presets are explicitly disabled for classic themes until a + * decision is made for whether the default presets should match the + * other presets or if they should be disabled by default in classic + * themes. See https://github.com/WordPress/gutenberg/issues/59989. + */ + $theme_support_data['settings']['shadow']['defaultPresets'] = 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/src/wp-includes/class-wp-theme-json.php b/src/wp-includes/class-wp-theme-json.php index 2a4303b5a308f..d754da957a76a 100644 --- a/src/wp-includes/class-wp-theme-json.php +++ b/src/wp-includes/class-wp-theme-json.php @@ -658,7 +658,7 @@ 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`, `dimensions.aspectRatio`, and `shadow.defaultPresets`. + * @since 6.5.0 Added `background.backgroundSize` and `dimensions.aspectRatio`. * @var array */ const APPEARANCE_TOOLS_OPT_INS = array( @@ -679,7 +679,6 @@ public static function get_element_class_name( $element ) { array( 'spacing', 'margin' ), array( 'spacing', 'padding' ), array( 'typography', 'lineHeight' ), - array( 'shadow', 'defaultPresets' ), ); /** diff --git a/src/wp-includes/theme.json b/src/wp-includes/theme.json index 3ce416d62e7b2..d9ed47816c95c 100644 --- a/src/wp-includes/theme.json +++ b/src/wp-includes/theme.json @@ -191,7 +191,7 @@ "text": true }, "shadow": { - "defaultPresets": false, + "defaultPresets": true, "presets": [ { "name": "Natural", diff --git a/tests/phpunit/data/themedir1/block-theme/theme.json b/tests/phpunit/data/themedir1/block-theme/theme.json index 212ef5df78f7e..fb24069fb6429 100644 --- a/tests/phpunit/data/themedir1/block-theme/theme.json +++ b/tests/phpunit/data/themedir1/block-theme/theme.json @@ -49,6 +49,20 @@ "padding": true, "blockGap": true }, + "shadow": { + "presets": [ + { + "name": "Natural", + "slug": "natural", + "shadow": "2px 2px 3px #000" + }, + { + "name": "Test", + "slug": "test", + "shadow": "2px 2px 3px #000" + } + ] + }, "blocks": { "core/paragraph": { "color": { diff --git a/tests/phpunit/tests/theme/wpThemeJson.php b/tests/phpunit/tests/theme/wpThemeJson.php index f38b7f21dbee9..3a72c72981beb 100644 --- a/tests/phpunit/tests/theme/wpThemeJson.php +++ b/tests/phpunit/tests/theme/wpThemeJson.php @@ -293,9 +293,6 @@ public function test_get_settings_appearance_true_opts_in() { 'typography' => array( 'lineHeight' => true, ), - 'shadow' => array( - 'defaultPresets' => true, - ), 'blocks' => array( 'core/paragraph' => array( 'typography' => array( @@ -334,9 +331,6 @@ public function test_get_settings_appearance_true_opts_in() { 'typography' => array( 'lineHeight' => false, ), - 'shadow' => array( - 'defaultPresets' => true, - ), ), ), ); diff --git a/tests/phpunit/tests/theme/wpThemeJsonResolver.php b/tests/phpunit/tests/theme/wpThemeJsonResolver.php index 0e91e27bc2e45..15e3a9a71dea6 100644 --- a/tests/phpunit/tests/theme/wpThemeJsonResolver.php +++ b/tests/phpunit/tests/theme/wpThemeJsonResolver.php @@ -201,6 +201,22 @@ public function test_translations_are_applied() { 'padding' => true, 'blockGap' => true, ), + 'shadow' => array( + 'presets' => array( + 'theme' => array( + array( + 'name' => 'Natural', + 'slug' => 'natural', + 'shadow' => '2px 2px 3px #000', + ), + array( + 'name' => 'Test', + 'slug' => 'test', + 'shadow' => '2px 2px 3px #000', + ), + ), + ), + ), 'blocks' => array( 'core/paragraph' => array( 'color' => array( @@ -559,6 +575,22 @@ public function test_merges_child_theme_json_into_parent_theme_json() { ), ), ), + 'shadow' => array( + 'presets' => array( + 'theme' => array( + array( + 'name' => 'Natural', + 'slug' => 'natural', + 'shadow' => '2px 2px 3px #000', + ), + array( + 'name' => 'Test', + 'slug' => 'test', + 'shadow' => '2px 2px 3px #000', + ), + ), + ), + ), 'spacing' => array( 'blockGap' => true, 'units' => array( 'rem' ), @@ -1070,4 +1102,78 @@ public function test_get_style_variations_returns_all_variations() { $actual_settings ); } + + /** + * @ticket 60815 + */ + public function test_theme_shadow_presets_do_not_override_default_shadow_presets() { + switch_theme( 'block-theme' ); + + $theme_json_resolver = new WP_Theme_JSON_Resolver(); + $theme_json = $theme_json_resolver->get_merged_data(); + $actual_settings = $theme_json->get_settings()['shadow']['presets']; + + $expected_settings = array( + 'default' => array( + array( + 'name' => 'Natural', + 'shadow' => '6px 6px 9px rgba(0, 0, 0, 0.2)', + 'slug' => 'natural', + ), + array( + 'name' => 'Deep', + 'shadow' => '12px 12px 50px rgba(0, 0, 0, 0.4)', + 'slug' => 'deep', + ), + array( + 'name' => 'Sharp', + 'shadow' => '6px 6px 0px rgba(0, 0, 0, 0.2)', + 'slug' => 'sharp', + ), + array( + 'name' => 'Outlined', + 'shadow' => '6px 6px 0px -3px rgba(255, 255, 255, 1), 6px 6px rgba(0, 0, 0, 1)', + 'slug' => 'outlined', + ), + array( + 'name' => 'Crisp', + 'shadow' => '6px 6px 0px rgba(0, 0, 0, 1)', + 'slug' => 'crisp', + ), + ), + 'theme' => array( + array( + 'name' => 'Test', + 'shadow' => '2px 2px 3px #000', + 'slug' => 'test', + ), + ), + ); + + wp_recursive_ksort( $actual_settings ); + wp_recursive_ksort( $expected_settings ); + + $this->assertSame( + $expected_settings, + $actual_settings + ); + } + + /** + * @ticket 60815 + */ + public function test_shadow_default_presets_value_for_block_and_classic_themes() { + $theme_json_resolver = new WP_Theme_JSON_Resolver(); + $theme_json = $theme_json_resolver->get_merged_data(); + + $default_presets_for_classic = $theme_json->get_settings()['shadow']['defaultPresets']; + $this->assertFalse( $default_presets_for_classic ); + + switch_theme( 'block-theme' ); + $theme_json_resolver = new WP_Theme_JSON_Resolver(); + $theme_json = $theme_json_resolver->get_merged_data(); + + $default_presets_for_block = $theme_json->get_settings()['shadow']['defaultPresets']; + $this->assertTrue( $default_presets_for_block ); + } } From 1c430acb3a8064e8cdbdec95076ea0c1232228e8 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Wed, 27 Mar 2024 19:04:10 +0000 Subject: [PATCH 210/251] Bundled Themes: Bump default theme versions for release with 6.5. This updates the version of each default theme to the following versions: - Twenty Ten: `4.1` - Twenty Eleven: `4.6` - Twenty Twelve: `4.2` - Twenty Thirteen: `4.1` - Twenty Fourteen: `3.9` - Twenty Fifteen: `3.7` - Twenty Sixteen: `3.2` - Twenty Seventeen: `3.6` - Twenty Nineteen: `2.8` - Twenty Twenty: `2.6` - Twenty Twenty-One: `2.2` - Twenty Twenty-Two: `1.7` - Twenty Twenty-Three: `1.4` - Twenty Twenty-Four: `1.1` These versions will released in coordination with WordPress 6.5. Props sabernhardt, desrosj, kushang78, mukesh27, huzaifaalmesbah, shailu25, poena. Fixes #59816. git-svn-id: https://develop.svn.wordpress.org/trunk@57886 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-content/themes/twentyeleven/header.php | 2 +- src/wp-content/themes/twentyeleven/readme.txt | 77 ++++++++++--------- src/wp-content/themes/twentyeleven/style.css | 4 +- .../themes/twentyfifteen/functions.php | 6 +- .../themes/twentyfifteen/readme.txt | 61 ++++++++------- src/wp-content/themes/twentyfifteen/style.css | 4 +- .../themes/twentyfourteen/functions.php | 2 +- .../themes/twentyfourteen/readme.txt | 65 ++++++++-------- .../themes/twentyfourteen/style.css | 4 +- .../themes/twentynineteen/package-lock.json | 4 +- .../themes/twentynineteen/package.json | 2 +- .../themes/twentynineteen/readme.txt | 43 ++++++----- .../themes/twentynineteen/style-rtl.css | 4 +- .../themes/twentynineteen/style.css | 4 +- .../themes/twentynineteen/style.scss | 4 +- .../themes/twentyseventeen/functions.php | 2 +- .../themes/twentyseventeen/readme.txt | 59 +++++++------- .../themes/twentyseventeen/style.css | 4 +- .../themes/twentysixteen/functions.php | 6 +- .../themes/twentysixteen/readme.txt | 51 ++++++------ src/wp-content/themes/twentysixteen/style.css | 4 +- src/wp-content/themes/twentyten/header.php | 2 +- src/wp-content/themes/twentyten/readme.txt | 69 +++++++++-------- src/wp-content/themes/twentyten/style.css | 4 +- .../themes/twentythirteen/functions.php | 2 +- .../themes/twentythirteen/readme.txt | 69 +++++++++-------- .../themes/twentythirteen/style.css | 4 +- .../themes/twentytwelve/functions.php | 2 +- src/wp-content/themes/twentytwelve/readme.txt | 69 +++++++++-------- src/wp-content/themes/twentytwelve/style.css | 4 +- .../themes/twentytwenty/package-lock.json | 4 +- .../themes/twentytwenty/package.json | 2 +- src/wp-content/themes/twentytwenty/readme.txt | 9 ++- .../themes/twentytwenty/style-rtl.css | 4 +- src/wp-content/themes/twentytwenty/style.css | 4 +- .../themes/twentytwentyfour/readme.txt | 9 ++- .../themes/twentytwentyfour/style.css | 4 +- .../themes/twentytwentyone/assets/css/ie.css | 4 +- .../assets/sass/01-settings/file-header.scss | 4 +- .../themes/twentytwentyone/package-lock.json | 4 +- .../themes/twentytwentyone/package.json | 2 +- .../themes/twentytwentyone/readme.txt | 9 ++- .../themes/twentytwentyone/style-rtl.css | 4 +- .../themes/twentytwentyone/style.css | 4 +- .../themes/twentytwentythree/readme.txt | 9 ++- .../themes/twentytwentythree/style.css | 4 +- .../themes/twentytwentytwo/readme.txt | 9 ++- .../themes/twentytwentytwo/style.css | 4 +- 48 files changed, 400 insertions(+), 330 deletions(-) diff --git a/src/wp-content/themes/twentyeleven/header.php b/src/wp-content/themes/twentyeleven/header.php index 29d4cc0708cfd..c2bacfa28046f 100644 --- a/src/wp-content/themes/twentyeleven/header.php +++ b/src/wp-content/themes/twentyeleven/header.php @@ -49,7 +49,7 @@ ?> - + Hello'; - - $post = inject_ignored_hooked_blocks_metadata_attributes( $changes, $request ); - $this->assertSame( - 'Hello', - $post->post_content, - 'The hooked block was not injected into the anchor block\'s ignoredHookedBlocks metadata.' - ); - } - - /** - * @ticket 60671 - * - * @covers inject_ignored_hooked_blocks_metadata_attributes - */ - public function test_inject_ignored_hooked_blocks_metadata_attributes_into_template_part() { - global $wp_current_filter; - // Mock currently set filter. The $wp_current_filter global is reset during teardown by - // WP_UnitTestCase_Base::_restore_hooks() in tests/phpunit/includes/abstract-testcase.php. - $wp_current_filter[] = 'rest_pre_insert_wp_template_part'; - - register_block_type( - 'tests/hooked-block', - array( - 'block_hooks' => array( - 'tests/anchor-block' => 'after', - ), - ) - ); - - $id = self::TEST_THEME . '//' . 'my_template_part'; - $request = new WP_REST_Request( 'POST', '/wp/v2/template-parts/' . $id ); - - $changes = new stdClass(); - $changes->post_content = 'Hello'; - - $post = inject_ignored_hooked_blocks_metadata_attributes( $changes, $request ); - $this->assertSame( - 'Hello', - $post->post_content, - 'The hooked block was not injected into the anchor block\'s ignoredHookedBlocks metadata.' - ); - } } diff --git a/tests/phpunit/tests/block-templates/injectIgnoredHookedBlocksMetadataAttributes.php b/tests/phpunit/tests/block-templates/injectIgnoredHookedBlocksMetadataAttributes.php new file mode 100644 index 0000000000000..a7acc8df99b8e --- /dev/null +++ b/tests/phpunit/tests/block-templates/injectIgnoredHookedBlocksMetadataAttributes.php @@ -0,0 +1,422 @@ +is_registered( 'tests/hooked-block' ) ) { + unregister_block_type( 'tests/hooked-block' ); + } + + parent::tear_down(); + } + + /** + * @ticket 60754 + */ + public function test_hooked_block_types_filter_with_newly_created_template() { + $action = new MockAction(); + add_filter( 'hooked_block_types', array( $action, 'filter' ), 10, 4 ); + + $changes = new stdClass(); + $changes->post_type = 'wp_template'; + $changes->post_status = 'publish'; + $changes->post_content = 'Hello'; + $changes->tax_input = array( + 'wp_theme' => get_stylesheet(), + ); + + inject_ignored_hooked_blocks_metadata_attributes( $changes ); + + $args = $action->get_args(); + $anchor_block_type = end( $args )[2]; + $context = end( $args )[3]; + + $this->assertSame( 'tests/anchor-block', $anchor_block_type ); + + $this->assertInstanceOf( 'WP_Block_Template', $context ); + + $this->assertSame( + $changes->post_type, + $context->type, + 'The type field of the context passed to the hooked_block_types filter doesn\'t match the template changes.' + ); + $this->assertSame( + $changes->post_status, + $context->status, + 'The status field of the context passed to the hooked_block_types filter doesn\'t match the template changes.' + ); + $this->assertSame( + $changes->post_content, + $context->content, + 'The content field of the context passed to the hooked_block_types filter doesn\'t match the template changes.' + ); + $this->assertFalse( + $context->has_theme_file, + 'The has_theme_file field of the context passed to the hooked_block_types filter isn\'t set to false.' + ); + } + + /** + * @ticket 60754 + */ + public function test_hooked_block_types_filter_with_newly_created_template_part() { + $action = new MockAction(); + add_filter( 'hooked_block_types', array( $action, 'filter' ), 10, 4 ); + + $changes = new stdClass(); + $changes->post_type = 'wp_template_part'; + $changes->post_status = 'publish'; + $changes->post_content = 'Hello'; + $changes->tax_input = array( + 'wp_theme' => get_stylesheet(), + 'wp_template_part_area' => WP_TEMPLATE_PART_AREA_HEADER, + ); + + inject_ignored_hooked_blocks_metadata_attributes( $changes ); + + $args = $action->get_args(); + $anchor_block_type = end( $args )[2]; + $context = end( $args )[3]; + + $this->assertSame( 'tests/anchor-block', $anchor_block_type ); + + $this->assertInstanceOf( 'WP_Block_Template', $context ); + + $this->assertSame( + $changes->post_type, + $context->type, + 'The type field of the context passed to the hooked_block_types filter doesn\'t match the template changes.' + ); + $this->assertSame( + $changes->post_status, + $context->status, + 'The status field of the context passed to the hooked_block_types filter doesn\'t match the template changes.' + ); + $this->assertSame( + $changes->post_content, + $context->content, + 'The content field of the context passed to the hooked_block_types filter doesn\'t match the template changes.' + ); + $this->assertFalse( + $context->has_theme_file, + 'The has_theme_file field of the context passed to the hooked_block_types filter isn\'t set to false.' + ); + $this->assertSame( + $changes->tax_input['wp_template_part_area'], + $context->area, + 'The area field of the context passed to the hooked_block_types filter doesn\'t match the template changes.' + ); + } + + /** + * @ticket 60754 + */ + public function test_hooked_block_types_filter_with_existing_template_file() { + $action = new MockAction(); + add_filter( 'hooked_block_types', array( $action, 'filter' ), 10, 4 ); + + $changes = new stdClass(); + $changes->post_name = 'index'; + $changes->post_type = 'wp_template'; + $changes->post_status = 'publish'; + $changes->post_content = 'Hello'; + $changes->meta_input = array( + 'origin' => 'theme', + ); + $changes->tax_input = array( + 'wp_theme' => get_stylesheet(), + ); + + inject_ignored_hooked_blocks_metadata_attributes( $changes ); + + $args = $action->get_args(); + $anchor_block_type = end( $args )[2]; + $context = end( $args )[3]; + + $this->assertSame( 'tests/anchor-block', $anchor_block_type ); + + $this->assertInstanceOf( 'WP_Block_Template', $context ); + + $this->assertSame( + $changes->post_name, + $context->slug, + 'The slug field of the context passed to the hooked_block_types filter doesn\'t match the template changes.' + ); + $this->assertSame( + $changes->post_type, + $context->type, + 'The type field of the context passed to the hooked_block_types filter doesn\'t match the template changes.' + ); + $this->assertSame( + $changes->post_status, + $context->status, + 'The status field of the context passed to the hooked_block_types filter doesn\'t match the template changes.' + ); + $this->assertSame( + $changes->post_content, + $context->content, + 'The content field of the context passed to the hooked_block_types filter doesn\'t match the template changes.' + ); + $this->assertTrue( + $context->has_theme_file, + 'The has_theme_file field of the context passed to the hooked_block_types filter isn\'t set to true.' + ); + $this->assertSame( + $changes->meta_input['origin'], + $context->origin, + 'The origin field of the context passed to the hooked_block_types filter doesn\'t match the template changes.' + ); + } + + /** + * @ticket 60754 + */ + public function test_hooked_block_types_filter_with_existing_template_part_file() { + $action = new MockAction(); + add_filter( 'hooked_block_types', array( $action, 'filter' ), 10, 4 ); + + $changes = new stdClass(); + $changes->post_name = 'small-header'; + $changes->post_type = 'wp_template_part'; + $changes->post_status = 'publish'; + $changes->post_content = 'Hello'; + $changes->meta_input = array( + 'origin' => 'theme', + ); + $changes->tax_input = array( + 'wp_theme' => get_stylesheet(), + 'wp_template_part_area' => WP_TEMPLATE_PART_AREA_HEADER, + ); + + inject_ignored_hooked_blocks_metadata_attributes( $changes ); + + $args = $action->get_args(); + $anchor_block_type = end( $args )[2]; + $context = end( $args )[3]; + + $this->assertSame( 'tests/anchor-block', $anchor_block_type ); + + $this->assertInstanceOf( 'WP_Block_Template', $context ); + + $this->assertSame( + $changes->post_name, + $context->slug, + 'The slug field of the context passed to the hooked_block_types filter doesn\'t match the template changes.' + ); + $this->assertSame( + $changes->post_type, + $context->type, + 'The type field of the context passed to the hooked_block_types filter doesn\'t match the template changes.' + ); + $this->assertSame( + $changes->post_status, + $context->status, + 'The status field of the context passed to the hooked_block_types filter doesn\'t match the template changes.' + ); + $this->assertSame( + $changes->post_content, + $context->content, + 'The content field of the context passed to the hooked_block_types filter doesn\'t match the template changes.' + ); + $this->assertTrue( + $context->has_theme_file, + 'The has_theme_file field of the context passed to the hooked_block_types filter isn\'t set to true.' + ); + $this->assertSame( + $changes->meta_input['origin'], + $context->origin, + 'The origin field of the context passed to the hooked_block_types filter doesn\'t match the template changes.' + ); + $this->assertSame( + $changes->tax_input['wp_template_part_area'], + $context->area, + 'The area field of the context passed to the hooked_block_types filter doesn\'t match the template changes.' + ); + } + + /** + * @ticket 60754 + */ + public function test_hooked_block_types_filter_with_existing_template_post() { + $action = new MockAction(); + add_filter( 'hooked_block_types', array( $action, 'filter' ), 10, 4 ); + + $changes = new stdClass(); + $changes->post_name = 'my-updated-template'; + $changes->ID = self::$template_post->ID; + $changes->post_content = 'Hello'; + + inject_ignored_hooked_blocks_metadata_attributes( $changes ); + + $args = $action->get_args(); + $anchor_block_type = end( $args )[2]; + $context = end( $args )[3]; + + $this->assertSame( 'tests/anchor-block', $anchor_block_type ); + + $this->assertInstanceOf( 'WP_Block_Template', $context ); + + $this->assertSame( + $changes->post_name, + $context->slug, + 'The slug field of the context passed to the hooked_block_types filter doesn\'t match the template changes.' + ); + $this->assertSame( + $changes->ID, + $context->wp_id, + 'The wp_id field of the context passed to the hooked_block_types filter doesn\'t match the template changes.' + ); + $this->assertSame( + 'publish', + $context->status, + 'The status field of the context passed to the hooked_block_types filter isn\'t set to publish.' + ); + $this->assertSame( + $changes->post_content, + $context->content, + 'The content field of the context passed to the hooked_block_types filter doesn\'t match the template changes.' + ); + + $this->assertSame( + self::$template_post->post_title, + $context->title, + 'The title field of the context passed to the hooked_block_types filter doesn\'t match the template post object.' + ); + $this->assertSame( + self::$template_post->post_excerpt, + $context->description, + 'The description field of the context passed to the hooked_block_types filter doesn\'t match the template post object.' + ); + } + + /** + * @ticket 60754 + */ + public function test_hooked_block_types_filter_with_existing_template_part_post() { + $action = new MockAction(); + add_filter( 'hooked_block_types', array( $action, 'filter' ), 10, 4 ); + + $changes = new stdClass(); + $changes->post_name = 'my-updated-template-part'; + $changes->ID = self::$template_part_post->ID; + $changes->post_content = 'Hello'; + + $changes->tax_input = array( + 'wp_template_part_area' => WP_TEMPLATE_PART_AREA_FOOTER, + ); + + inject_ignored_hooked_blocks_metadata_attributes( $changes ); + + $args = $action->get_args(); + $anchor_block_type = end( $args )[2]; + $context = end( $args )[3]; + + $this->assertSame( 'tests/anchor-block', $anchor_block_type ); + + $this->assertInstanceOf( 'WP_Block_Template', $context ); + + $this->assertSame( + $changes->post_name, + $context->slug, + 'The slug field of the context passed to the hooked_block_types filter doesn\'t match the template changes.' + ); + $this->assertSame( + $changes->ID, + $context->wp_id, + 'The wp_id field of the context passed to the hooked_block_types filter doesn\'t match the template changes.' + ); + $this->assertSame( + 'publish', + $context->status, + 'The status field of the context passed to the hooked_block_types filter isn\'t set to publish.' + ); + $this->assertSame( + $changes->post_content, + $context->content, + 'The content field of the context passed to the hooked_block_types filter doesn\'t match the template changes.' + ); + $this->assertSame( + $changes->tax_input['wp_template_part_area'], + $context->area, + 'The area field of the context passed to the hooked_block_types filter doesn\'t match the template changes.' + ); + + $this->assertSame( + self::$template_part_post->post_title, + $context->title, + 'The title field of the context passed to the hooked_block_types filter doesn\'t match the template post object.' + ); + $this->assertSame( + self::$template_part_post->post_excerpt, + $context->description, + 'The description field of the context passed to the hooked_block_types filter doesn\'t match the template post object.' + ); + } + + /** + * @ticket 60671 + */ + public function test_inject_ignored_hooked_blocks_metadata_attributes_into_template() { + register_block_type( + 'tests/hooked-block', + array( + 'block_hooks' => array( + 'tests/anchor-block' => 'after', + ), + ) + ); + + $id = self::TEST_THEME . '//' . 'my_template'; + $template = get_block_template( $id, 'wp_template' ); + + $changes = new stdClass(); + $changes->ID = $template->wp_id; + $changes->post_content = 'Hello'; + + $post = inject_ignored_hooked_blocks_metadata_attributes( $changes ); + $this->assertSame( + 'Hello', + $post->post_content, + 'The hooked block was not injected into the anchor block\'s ignoredHookedBlocks metadata.' + ); + } + + /** + * @ticket 60671 + */ + public function test_inject_ignored_hooked_blocks_metadata_attributes_into_template_part() { + register_block_type( + 'tests/hooked-block', + array( + 'block_hooks' => array( + 'tests/anchor-block' => 'after', + ), + ) + ); + + $id = self::TEST_THEME . '//' . 'my_template_part'; + $template = get_block_template( $id, 'wp_template_part' ); + + $changes = new stdClass(); + $changes->ID = $template->wp_id; + $changes->post_content = 'Hello'; + + $post = inject_ignored_hooked_blocks_metadata_attributes( $changes ); + $this->assertSame( + 'Hello', + $post->post_content, + 'The hooked block was not injected into the anchor block\'s ignoredHookedBlocks metadata.' + ); + } +} diff --git a/tests/phpunit/tests/rest-api/wpRestTemplatesController.php b/tests/phpunit/tests/rest-api/wpRestTemplatesController.php index 9665939dd6975..50678a686d561 100644 --- a/tests/phpunit/tests/rest-api/wpRestTemplatesController.php +++ b/tests/phpunit/tests/rest-api/wpRestTemplatesController.php @@ -14,7 +14,8 @@ class Tests_REST_WpRestTemplatesController extends WP_Test_REST_Controller_Testc * @var int */ protected static $admin_id; - private static $post; + private static $template_post; + private static $template_part_post; /** * Create fake data before our tests run. @@ -29,7 +30,7 @@ public static function wpSetupBeforeClass( $factory ) { ); // Set up template post. - $args = array( + $args = array( 'post_type' => 'wp_template', 'post_name' => 'my_template', 'post_title' => 'My Template', @@ -41,12 +42,32 @@ public static function wpSetupBeforeClass( $factory ) { ), ), ); - self::$post = self::factory()->post->create_and_get( $args ); - wp_set_post_terms( self::$post->ID, get_stylesheet(), 'wp_theme' ); + self::$template_post = self::factory()->post->create_and_get( $args ); + wp_set_post_terms( self::$template_post->ID, get_stylesheet(), 'wp_theme' ); + + // Set up template part post. + $args = array( + 'post_type' => 'wp_template_part', + 'post_name' => 'my_template_part', + 'post_title' => 'My Template Part', + 'post_content' => 'Content', + 'post_excerpt' => 'Description of my template part.', + 'tax_input' => array( + 'wp_theme' => array( + get_stylesheet(), + ), + 'wp_template_part_area' => array( + WP_TEMPLATE_PART_AREA_HEADER, + ), + ), + ); + self::$template_part_post = self::factory()->post->create_and_get( $args ); + wp_set_post_terms( self::$template_part_post->ID, get_stylesheet(), 'wp_theme' ); + wp_set_post_terms( self::$template_part_post->ID, WP_TEMPLATE_PART_AREA_HEADER, 'wp_template_part_area' ); } public static function wpTearDownAfterClass() { - wp_delete_post( self::$post->ID ); + wp_delete_post( self::$template_post->ID ); } /** @@ -56,7 +77,7 @@ public static function wpTearDownAfterClass() { */ public function tear_down() { if ( has_filter( 'rest_pre_insert_wp_template_part', 'inject_ignored_hooked_blocks_metadata_attributes' ) ) { - remove_filter( 'rest_pre_insert_wp_template_part', 'inject_ignored_hooked_blocks_metadata_attributes', 10 ); + remove_filter( 'rest_pre_insert_wp_template_part', 'inject_ignored_hooked_blocks_metadata_attributes' ); } if ( WP_Block_Type_Registry::get_instance()->is_registered( 'tests/block' ) ) { unregister_block_type( 'tests/hooked-block' ); @@ -130,11 +151,11 @@ public function test_get_items() { 'rendered' => 'My Template', ), 'status' => 'publish', - 'wp_id' => self::$post->ID, + 'wp_id' => self::$template_post->ID, 'has_theme_file' => false, 'is_custom' => true, 'author' => 0, - 'modified' => mysql_to_rfc3339( self::$post->post_modified ), + 'modified' => mysql_to_rfc3339( self::$template_post->post_modified ), 'author_text' => 'Test Blog', 'original_source' => 'site', ), @@ -177,11 +198,11 @@ public function test_get_item() { 'rendered' => 'My Template', ), 'status' => 'publish', - 'wp_id' => self::$post->ID, + 'wp_id' => self::$template_post->ID, 'has_theme_file' => false, 'is_custom' => true, 'author' => 0, - 'modified' => mysql_to_rfc3339( self::$post->post_modified ), + 'modified' => mysql_to_rfc3339( self::$template_post->post_modified ), 'author_text' => 'Test Blog', 'original_source' => 'site', ), @@ -216,11 +237,11 @@ public function test_get_item_works_with_a_single_slash( $endpoint_url ) { 'rendered' => 'My Template', ), 'status' => 'publish', - 'wp_id' => self::$post->ID, + 'wp_id' => self::$template_post->ID, 'has_theme_file' => false, 'is_custom' => true, 'author' => 0, - 'modified' => mysql_to_rfc3339( self::$post->post_modified ), + 'modified' => mysql_to_rfc3339( self::$template_post->post_modified ), 'author_text' => 'Test Blog', 'original_source' => 'site', ), @@ -944,16 +965,17 @@ public function test_prepare_item_for_database_injects_hooked_block() { ) ); - add_filter( 'rest_pre_insert_wp_template_part', 'inject_ignored_hooked_blocks_metadata_attributes', 10, 2 ); + add_filter( 'rest_pre_insert_wp_template_part', 'inject_ignored_hooked_blocks_metadata_attributes' ); $endpoint = new WP_REST_Templates_Controller( 'wp_template_part' ); $prepare_item_for_database = new ReflectionMethod( $endpoint, 'prepare_item_for_database' ); $prepare_item_for_database->setAccessible( true ); + $id = get_stylesheet() . '//' . 'my_template_part'; $body_params = array( - 'title' => 'Untitled Template Part', - 'slug' => 'untitled-template-part', + 'id' => $id, + 'slug' => 'my_template_part', 'content' => 'Hello', ); From 7d606a30e2f475ee434abadff7271205766157d8 Mon Sep 17 00:00:00 2001 From: Felix Arntz Date: Wed, 3 Apr 2024 21:29:13 +0000 Subject: [PATCH 233/251] Options, Meta APIs: Use more sensible default for autoloading options which allows WordPress core to make a decision. An excessive amount of autoloaded options is a common cause for slow database responses, sometimes caused by very large individual autoloaded options. As it is not mandatory to provide an autoload value when adding an option to the database, it tends to be ignored, which in combination with a default value of "yes" and lack of documentation can lead to the aforementioned problem. This changeset enhances the option autoloading behavior in several ways: * Update the function documentation to encourage the use of boolean `true` or `false` to explicitly provide an autoload value for an option. * Use new string values `on` and `off` for explicitly provided values stored in the database, to distinguish them from `yes` and `no`, since `yes` does not allow determining whether it was set intentionally by the developer or only as a default. * Effectively deprecate the values `yes` and `no`. They are still supported for backward compatibility, but now discouraged. * Use `null` as new default autoload value for `add_option()`. If the developer does not provide an explicit value, this will now trigger WordPress logic to determine an autoload value to use: * If WordPress determines that the option should not be autoloaded, it is stored in the database as `auto-off`. As part of this changeset, the single heuristic introduced for that is to check whether the option size is larger than a threshold of 150k bytes. This threshold is filterable via a new `wp_max_autoloaded_option_size` filter. * If WordPress determines that the option should be autoloaded, it is stored in the database as `auto-on`. No logic to make such a decision is introduced as part of this changeset, but a new filter `wp_default_autoload_value` can be used to define such heuristics, e.g. by optimization plugins. * If WordPress cannot determine whether or not to autoload the option, it is stored in the database as `auto`. * This effectively means that any option without an explicit autoload value provided by the developer will be stored with an autoload value of `auto`, unless the option's size exceeds the aforementioned threshold. Options with a value of `auto` are still autoloaded as of today, most importantly for backward compatibility. A new function `wp_autoload_values_to_autoload()` returns the list of autolaod values that dictate for an option to be autoloaded, and a new filter `wp_autoload_values_to_autoload` can be used to alter that list. These behavioral changes encourage developers to be more mindful of autoloading, while providing WordPress core and optimization plugins with additional control over heuristics for autoloading options where no explicit autoload value was provided. At the same time, the changes are fully backward compatible from a functionality perspective, with the only exception being that very large options will now no longer be autoloaded if the developer did not explicitly request for them to be autoloaded. Neither WordPress core nor plugins are able to override an explicitly provided value, which is intentional to continue giving developers full control over their own options. Props pbearne, flixos90, joemcgill, azaozz, spacedmonkey, swissspidy, mukesh27, markjaquith. Fixes #42441. git-svn-id: https://develop.svn.wordpress.org/trunk@57920 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/default-filters.php | 1 + src/wp-includes/option.php | 221 ++++++++++++++---- tests/phpunit/tests/customize/setting.php | 8 +- tests/phpunit/tests/option/option.php | 96 +++++++- .../option/wpAutoloadValuesToAutoload.php | 63 +++++ .../option/wpDetermineOptionAutoloadValue.php | 107 +++++++++ .../phpunit/tests/option/wpLoadAlloptions.php | 26 +++ .../tests/option/wpSetOptionAutoload.php | 10 +- .../option/wpSetOptionAutoloadValues.php | 14 +- .../tests/option/wpSetOptionsAutoload.php | 12 +- .../phpunit/tests/theme/autoloadThemeMods.php | 8 +- 11 files changed, 485 insertions(+), 81 deletions(-) create mode 100644 tests/phpunit/tests/option/wpAutoloadValuesToAutoload.php create mode 100644 tests/phpunit/tests/option/wpDetermineOptionAutoloadValue.php diff --git a/src/wp-includes/default-filters.php b/src/wp-includes/default-filters.php index 04c644174dbad..1bcd85e79aaf5 100644 --- a/src/wp-includes/default-filters.php +++ b/src/wp-includes/default-filters.php @@ -286,6 +286,7 @@ } // Misc filters. +add_filter( 'wp_default_autoload_value', 'wp_filter_default_autoload_value_via_option_size', 10, 4 ); add_filter( 'option_ping_sites', 'privacy_ping_filter' ); add_filter( 'option_blog_charset', '_wp_specialchars' ); // IMPORTANT: This must not be wp_specialchars() or esc_html() or it'll cause an infinite loop. add_filter( 'option_blog_charset', '_canonical_charset' ); diff --git a/src/wp-includes/option.php b/src/wp-includes/option.php index 36bfcf6755414..4c0071e23d670 100644 --- a/src/wp-includes/option.php +++ b/src/wp-includes/option.php @@ -392,16 +392,16 @@ function wp_set_option_autoload_values( array $options ) { } $grouped_options = array( - 'yes' => array(), - 'no' => array(), + 'on' => array(), + 'off' => array(), ); $results = array(); foreach ( $options as $option => $autoload ) { wp_protect_special_option( $option ); // Ensure only valid options can be passed. - if ( 'no' === $autoload || false === $autoload ) { // Sanitize autoload value and categorize accordingly. - $grouped_options['no'][] = $option; + if ( 'off' === $autoload || 'no' === $autoload || false === $autoload ) { // Sanitize autoload value and categorize accordingly. + $grouped_options['off'][] = $option; } else { - $grouped_options['yes'][] = $option; + $grouped_options['on'][] = $option; } $results[ $option ] = false; // Initialize result value. } @@ -465,19 +465,19 @@ function wp_set_option_autoload_values( array $options ) { } /* - * If any options were changed to 'yes', delete their individual caches, and delete 'alloptions' cache so that it + * If any options were changed to 'on', delete their individual caches, and delete 'alloptions' cache so that it * is refreshed as needed. - * If no options were changed to 'yes' but any options were changed to 'no', delete them from the 'alloptions' - * cache. This is not necessary when options were changed to 'yes', since in that situation the entire cache is + * If no options were changed to 'on' but any options were changed to 'no', delete them from the 'alloptions' + * cache. This is not necessary when options were changed to 'on', since in that situation the entire cache is * deleted anyway. */ - if ( $grouped_options['yes'] ) { - wp_cache_delete_multiple( $grouped_options['yes'], 'options' ); + if ( $grouped_options['on'] ) { + wp_cache_delete_multiple( $grouped_options['on'], 'options' ); wp_cache_delete( 'alloptions', 'options' ); - } elseif ( $grouped_options['no'] ) { + } elseif ( $grouped_options['off'] ) { $alloptions = wp_load_alloptions( true ); - foreach ( $grouped_options['no'] as $option ) { + foreach ( $grouped_options['off'] as $option ) { if ( isset( $alloptions[ $option ] ) ) { unset( $alloptions[ $option ] ); } @@ -606,7 +606,8 @@ function wp_load_alloptions( $force_cache = false ) { if ( ! $alloptions ) { $suppress = $wpdb->suppress_errors(); - $alloptions_db = $wpdb->get_results( "SELECT option_name, option_value FROM $wpdb->options WHERE autoload = 'yes'" ); + $alloptions_db = $wpdb->get_results( "SELECT option_name, option_value FROM $wpdb->options WHERE autoload IN ( '" . implode( "', '", wp_autoload_values_to_autoload() ) . "' )" ); + if ( ! $alloptions_db ) { $alloptions_db = $wpdb->get_results( "SELECT option_name, option_value FROM $wpdb->options" ); } @@ -705,17 +706,21 @@ function wp_load_core_site_options( $network_id = null ) { * * @global wpdb $wpdb WordPress database abstraction object. * - * @param string $option Name of the option to update. Expected to not be SQL-escaped. - * @param mixed $value Option value. Must be serializable if non-scalar. Expected to not be SQL-escaped. - * @param string|bool $autoload Optional. Whether to load the option when WordPress starts up. For existing options, - * `$autoload` can only be updated using `update_option()` if `$value` is also changed. - * Accepts 'yes'|true to enable or 'no'|false to disable. - * Autoloading too many options can lead to performance problems, especially if the - * options are not frequently used. For options which are accessed across several places - * in the frontend, it is recommended to autoload them, by using 'yes'|true. - * For options which are accessed only on few specific URLs, it is recommended - * to not autoload them, by using 'no'|false. For non-existent options, the default value - * is 'yes'. Default null. + * @param string $option Name of the option to update. Expected to not be SQL-escaped. + * @param mixed $value Option value. Must be serializable if non-scalar. Expected to not be SQL-escaped. + * @param bool|null $autoload Optional. Whether to load the option when WordPress starts up. + * Accepts a boolean, or `null` to stick with the initial value or, if no initial value is set, + * to leave the decision up to default heuristics in WordPress. + * For existing options, + * `$autoload` can only be updated using `update_option()` if `$value` is also changed. + * For backward compatibility 'yes' and 'no' are also accepted. + * Autoloading too many options can lead to performance problems, especially if the + * options are not frequently used. For options which are accessed across several places + * in the frontend, it is recommended to autoload them, by using true. + * For options which are accessed only on few specific URLs, it is recommended + * to not autoload them, by using false. + * For non-existent options, the default is null, which means WordPress will determine + * the autoload value. * @return bool True if the value was updated, false otherwise. */ function update_option( $option, $value, $autoload = null ) { @@ -801,11 +806,6 @@ function update_option( $option, $value, $autoload = null ) { /** This filter is documented in wp-includes/option.php */ if ( apply_filters( "default_option_{$option}", false, $option, false ) === $old_value ) { - // Default setting for new options is 'yes'. - if ( null === $autoload ) { - $autoload = 'yes'; - } - return add_option( $option, $value, '', $autoload ); } @@ -827,7 +827,17 @@ function update_option( $option, $value, $autoload = null ) { ); if ( null !== $autoload ) { - $update_args['autoload'] = ( 'no' === $autoload || false === $autoload ) ? 'no' : 'yes'; + $update_args['autoload'] = wp_determine_option_autoload_value( $option, $value, $serialized_value, $autoload ); + } else { + // Retrieve the current autoload value to reevaluate it in case it was set automatically. + $raw_autoload = $wpdb->get_var( $wpdb->prepare( "SELECT autoload FROM $wpdb->options WHERE option_name = %s LIMIT 1", $option ) ); + $allow_values = array( 'auto-on', 'auto-off', 'auto' ); + if ( in_array( $raw_autoload, $allow_values, true ) ) { + $autoload = wp_determine_option_autoload_value( $option, $value, $serialized_value, $autoload ); + if ( $autoload !== $raw_autoload ) { + $update_args['autoload'] = $autoload; + } + } } $result = $wpdb->update( $wpdb->options, $update_args, array( 'option_name' => $option ) ); @@ -853,7 +863,7 @@ function update_option( $option, $value, $autoload = null ) { } else { wp_cache_set( $option, $serialized_value, 'options' ); } - } elseif ( 'yes' === $update_args['autoload'] ) { + } elseif ( in_array( $update_args['autoload'], wp_autoload_values_to_autoload(), true ) ) { // Delete the individual cache, then set in alloptions cache. wp_cache_delete( $option, 'options' ); @@ -915,23 +925,26 @@ function update_option( $option, $value, $autoload = null ) { * options the same as the ones which are protected. * * @since 1.0.0 + * @since 6.6.0 The $autoload parameter's default value was changed to null. * * @global wpdb $wpdb WordPress database abstraction object. * - * @param string $option Name of the option to add. Expected to not be SQL-escaped. - * @param mixed $value Optional. Option value. Must be serializable if non-scalar. - * Expected to not be SQL-escaped. - * @param string $deprecated Optional. Description. Not used anymore. - * @param string|bool $autoload Optional. Whether to load the option when WordPress starts up. - * Accepts 'yes'|true to enable or 'no'|false to disable. - * Autoloading too many options can lead to performance problems, especially if the - * options are not frequently used. For options which are accessed across several places - * in the frontend, it is recommended to autoload them, by using 'yes'|true. - * For options which are accessed only on few specific URLs, it is recommended - * to not autoload them, by using 'no'|false. Default 'yes'. + * @param string $option Name of the option to add. Expected to not be SQL-escaped. + * @param mixed $value Optional. Option value. Must be serializable if non-scalar. + * Expected to not be SQL-escaped. + * @param string $deprecated Optional. Description. Not used anymore. + * @param bool|null $autoload Optional. Whether to load the option when WordPress starts up. + * Accepts a boolean, or `null` to leave the decision up to default heuristics in WordPress. + * For backward compatibility 'yes' and 'no' are also accepted. + * Autoloading too many options can lead to performance problems, especially if the + * options are not frequently used. For options which are accessed across several places + * in the frontend, it is recommended to autoload them, by using 'yes'|true. + * For options which are accessed only on few specific URLs, it is recommended + * to not autoload them, by using false. + * Default is null, which means WordPress will determine the autoload value. * @return bool True if the option was added, false otherwise. */ -function add_option( $option, $value = '', $deprecated = '', $autoload = 'yes' ) { +function add_option( $option, $value = '', $deprecated = '', $autoload = null ) { global $wpdb; if ( ! empty( $deprecated ) ) { @@ -991,7 +1004,8 @@ function add_option( $option, $value = '', $deprecated = '', $autoload = 'yes' ) } $serialized_value = maybe_serialize( $value ); - $autoload = ( 'no' === $autoload || false === $autoload ) ? 'no' : 'yes'; + + $autoload = wp_determine_option_autoload_value( $option, $value, $serialized_value, $autoload ); /** * Fires before an option is added. @@ -1009,7 +1023,7 @@ function add_option( $option, $value = '', $deprecated = '', $autoload = 'yes' ) } if ( ! wp_installing() ) { - if ( 'yes' === $autoload ) { + if ( in_array( $autoload, wp_autoload_values_to_autoload(), true ) ) { $alloptions = wp_load_alloptions( true ); $alloptions[ $option ] = $serialized_value; wp_cache_set( 'alloptions', $alloptions, 'options' ); @@ -1093,7 +1107,7 @@ function delete_option( $option ) { $result = $wpdb->delete( $wpdb->options, array( 'option_name' => $option ) ); if ( ! wp_installing() ) { - if ( 'yes' === $row->autoload ) { + if ( in_array( $row->autoload, wp_autoload_values_to_autoload(), true ) ) { $alloptions = wp_load_alloptions( true ); if ( is_array( $alloptions ) && isset( $alloptions[ $option ] ) ) { @@ -1133,6 +1147,96 @@ function delete_option( $option ) { return false; } +/** + * Determines the appropriate autoload value for an option based on input. + * + * This function checks the provided autoload value and returns a standardized value + * ('on', 'off', 'auto-on', 'auto-off', or 'auto') based on specific conditions. + * + * If no explicit autoload value is provided, the function will check for certain heuristics around the given option. + * It will return `auto-on` to indicate autoloading, `auto-off` to indicate not autoloading, or `auto` if no clear + * decision could be made. + * + * @since 6.6.0 + * @access private + * + * @param string $option The name of the option. + * @param mixed $value The value of the option to check its autoload value. + * @param mixed $serialized_value The serialized value of the option to check its autoload value. + * @param bool|null $autoload The autoload value to check. + * Accepts 'on'|true to enable or 'off'|false to disable, or + * 'auto-on', 'auto-off', or 'auto' for internal purposes. + * Any other autoload value will be forced to either 'auto-on', + * 'auto-off', or 'auto'. + * 'yes' and 'no' are supported for backward compatibility. + * @return string Returns the original $autoload value if explicit, or 'auto-on', 'auto-off', + * or 'auto' depending on default heuristics. + */ +function wp_determine_option_autoload_value( $option, $value, $serialized_value, $autoload ) { + + // Check if autoload is a boolean. + if ( is_bool( $autoload ) ) { + return $autoload ? 'on' : 'off'; + } + + switch ( $autoload ) { + case 'on': + case 'yes': + return 'on'; + case 'off': + case 'no': + return 'off'; + } + + /** + * Allows to determine the default autoload value for an option where no explicit value is passed. + * + * @since 6.6.0 + * + * @param bool|null $autoload The default autoload value to set. Returning true will be set as 'auto-on' in the + * database, false will be set as 'auto-off', and null will be set as 'auto'. + * @param string $option The passed option name. + * @param mixed $value The passed option value to be saved. + */ + $autoload = apply_filters( 'wp_default_autoload_value', null, $option, $value, $serialized_value ); + if ( is_bool( $autoload ) ) { + return $autoload ? 'auto-on' : 'auto-off'; + } + + return 'auto'; +} + +/** + * Filters the default autoload value to disable autoloading if the option value is too large. + * + * @since 6.6.0 + * @access private + * + * @param bool|null $autoload The default autoload value to set. + * @param string $option The passed option name. + * @param mixed $value The passed option value to be saved. + * @param mixed $serialized_value The passed option value to be saved, in serialized form. + * @return bool|null Potentially modified $default. + */ +function wp_filter_default_autoload_value_via_option_size( $autoload, $option, $value, $serialized_value ) { + /** + * Filters the maximum size of option value in bytes. + * + * @since 6.6.0 + * + * @param int $max_option_size The option-size threshold, in bytes. Default 150000. + * @param string $option The name of the option. + */ + $max_option_size = (int) apply_filters( 'wp_max_autoloaded_option_size', 150000, $option ); + $size = ! empty( $serialized_value ) ? strlen( $serialized_value ) : 0; + + if ( $size > $max_option_size ) { + return false; + } + + return $autoload; +} + /** * Deletes a transient. * @@ -2924,3 +3028,28 @@ function filter_default_option( $default_value, $option, $passed_default ) { return $registered[ $option ]['default']; } + +/** + * Returns the values that trigger autoloading from the options table. + * + * @since 6.6.0 + * + * @return array The values that trigger autoloading. + */ +function wp_autoload_values_to_autoload() { + $autoload_values = array( 'yes', 'on', 'auto-on', 'auto' ); + + /** + * Filters the autoload values that should be considered for autoloading from the options table. + * + * The filter can only be used to remove autoload values from the default list. + * + * @since 6.6.0 + * + * @param array $autoload_values Autoload values used to autoload option. + * Default list contains 'yes', 'on', 'auto-on', and 'auto'. + */ + $filtered_values = apply_filters( 'wp_autoload_values_to_autoload', $autoload_values ); + + return array_intersect( $filtered_values, $autoload_values ); +} diff --git a/tests/phpunit/tests/customize/setting.php b/tests/phpunit/tests/customize/setting.php index 85091b5760617..62861a27264ba 100644 --- a/tests/phpunit/tests/customize/setting.php +++ b/tests/phpunit/tests/customize/setting.php @@ -610,7 +610,7 @@ public function test_option_autoloading() { $this->manager->set_post_value( $setting->id, $value ); $setting->save(); $autoload = $wpdb->get_var( $wpdb->prepare( "SELECT autoload FROM $wpdb->options WHERE option_name = %s", $setting->id ) ); - $this->assertSame( 'yes', $autoload ); + $this->assertSame( 'on', $autoload ); $this->assertSame( $value, get_option( $name ) ); $name = 'autoloaded2'; @@ -626,7 +626,7 @@ public function test_option_autoloading() { $this->manager->set_post_value( $setting->id, $value ); $setting->save(); $autoload = $wpdb->get_var( $wpdb->prepare( "SELECT autoload FROM $wpdb->options WHERE option_name = %s", $setting->id ) ); - $this->assertSame( 'yes', $autoload ); + $this->assertSame( 'on', $autoload ); $this->assertSame( $value, get_option( $name ) ); $name = 'not-autoloaded1'; @@ -642,7 +642,7 @@ public function test_option_autoloading() { $this->manager->set_post_value( $setting->id, $value ); $setting->save(); $autoload = $wpdb->get_var( $wpdb->prepare( "SELECT autoload FROM $wpdb->options WHERE option_name = %s", $setting->id ) ); - $this->assertSame( 'no', $autoload ); + $this->assertSame( 'off', $autoload ); $this->assertSame( $value, get_option( $name ) ); $id_base = 'multi-not-autoloaded'; @@ -665,7 +665,7 @@ public function test_option_autoloading() { $this->manager->set_post_value( $setting2->id, 'value2' ); $setting1->save(); $autoload = $wpdb->get_var( $wpdb->prepare( "SELECT autoload FROM $wpdb->options WHERE option_name = %s", $id_base ) ); - $this->assertSame( 'no', $autoload, 'Even though setting1 did not indicate autoload (thus normally true), since another multidimensional option setting of the base did say autoload=false, it should be autoload=no' ); + $this->assertSame( 'off', $autoload, 'Even though setting1 did not indicate autoload (thus normally true), since another multidimensional option setting of the base did say autoload=false, it should be autoload=no' ); } /** diff --git a/tests/phpunit/tests/option/option.php b/tests/phpunit/tests/option/option.php index c01479192c6b2..db9f35dd69d38 100644 --- a/tests/phpunit/tests/option/option.php +++ b/tests/phpunit/tests/option/option.php @@ -308,9 +308,9 @@ public function data_valid_but_undesired_option_names() { return array( 'string 123' => array( '123' ), 'integer 123' => array( 123 ), - 'integer -123' => array( -123 ), + 'integer -123' => array( - 123 ), 'float 12.3' => array( 12.3 ), - 'float -1.23' => array( -1.23 ), + 'float -1.23' => array( - 1.23 ), 'boolean true' => array( true ), ); } @@ -359,16 +359,94 @@ public function test_option_autoloading( $name, $autoload_value, $expected ) { */ public function data_option_autoloading() { return array( - array( 'autoload_yes', 'yes', 'yes' ), - array( 'autoload_true', true, 'yes' ), - array( 'autoload_string', 'foo', 'yes' ), - array( 'autoload_int', 123456, 'yes' ), - array( 'autoload_array', array(), 'yes' ), - array( 'autoload_no', 'no', 'no' ), - array( 'autoload_false', false, 'no' ), + // Supported values. + array( 'autoload_yes', 'yes', 'on' ), + array( 'autoload_true', true, 'on' ), + array( 'autoload_no', 'no', 'off' ), + array( 'autoload_false', false, 'off' ), + array( 'autoload_null', null, 'auto' ), + + // Technically unsupported values. + array( 'autoload_string', 'foo', 'auto' ), + array( 'autoload_int', 123456, 'auto' ), + array( 'autoload_array', array(), 'auto' ), ); } + /** + * @ticket 42441 + * + * @covers ::update_option + * + * @dataProvider data_option_autoloading_large_option + */ + public function test_update_option_autoloading_large_option( $autoload, $expected ) { + global $wpdb; + $name = 'foo'; + add_option( $name, 'bar' ); + add_filter( 'wp_max_autoloaded_option_size', array( $this, 'filter_max_option_size' ) ); + $value = file( DIR_TESTDATA . '/formatting/entities.txt' ); + $updated = update_option( $name, $value, $autoload ); + $this->assertTrue( $updated ); + + $actual = $wpdb->get_row( $wpdb->prepare( "SELECT autoload FROM $wpdb->options WHERE option_name = %s LIMIT 1", $name ) ); + $this->assertSame( $expected, $actual->autoload ); + } + + public function data_option_autoloading_large_option() { + return array( + 'on' => array( + 'autoload' => 'on', + 'expected' => 'on', + ), + 'off' => array( + 'autoload' => 'off', + 'expected' => 'off', + ), + 'yes' => array( + 'autoload' => 'yes', + 'expected' => 'on', + ), + 'true' => array( + 'autoload' => true, + 'expected' => 'on', + ), + 'no' => array( + 'autoload' => 'no', + 'expected' => 'off', + ), + 'false' => array( + 'autoload' => false, + 'expected' => 'off', + ), + 'null' => array( + 'autoload' => null, + 'expected' => 'auto-off', + ), + ); + } + + public function filter_max_option_size( $current ) { + return 1000; + } + + /** + * @ticket 42441 + * + * @covers ::update_option + */ + public function test_update_option_autoloading_small_option_auto() { + global $wpdb; + + $name = 'foo'; + add_option( $name, 'bar' ); + $updated = update_option( $name, 'small_option_data' ); + $this->assertTrue( $updated ); + + $actual = $wpdb->get_row( $wpdb->prepare( "SELECT autoload FROM $wpdb->options WHERE option_name = %s LIMIT 1", $name ) ); + $this->assertSame( 'auto', $actual->autoload ); + } + /** * Tests that calling update_option() with changed autoload from 'no' to 'yes' updates the cache correctly. * diff --git a/tests/phpunit/tests/option/wpAutoloadValuesToAutoload.php b/tests/phpunit/tests/option/wpAutoloadValuesToAutoload.php new file mode 100644 index 0000000000000..57c2a6dbf0600 --- /dev/null +++ b/tests/phpunit/tests/option/wpAutoloadValuesToAutoload.php @@ -0,0 +1,63 @@ +assertSameSets( array( 'yes', 'on', 'auto-on', 'auto' ), wp_autoload_values_to_autoload() ); + } + + /** + * @ticket 42441 + */ + public function test_wp_autoload_values_to_autoload_filter_remove() { + + add_filter( + 'wp_autoload_values_to_autoload', + static function () { + return array( 'yes' ); + } + ); + + $this->assertSameSets( array( 'yes' ), wp_autoload_values_to_autoload() ); + } + + /** + * @ticket 42441 + */ + public function test_wp_autoload_values_to_autoload_filter_extra() { + + add_filter( + 'wp_autoload_values_to_autoload', + static function () { + return array( 'yes', 'on', 'auto-on', 'auto', 'extra' ); + } + ); + + $this->assertSameSets( array( 'yes', 'on', 'auto-on', 'auto' ), wp_autoload_values_to_autoload() ); + } + + /** + * @ticket 42441 + */ + public function test_wp_autoload_values_to_autoload_filter_replace() { + + add_filter( + 'wp_autoload_values_to_autoload', + static function () { + return array( 'yes', 'on', 'auto-on', 'extra' ); + } + ); + + $this->assertSameSets( array( 'yes', 'on', 'auto-on' ), wp_autoload_values_to_autoload() ); + } +} diff --git a/tests/phpunit/tests/option/wpDetermineOptionAutoloadValue.php b/tests/phpunit/tests/option/wpDetermineOptionAutoloadValue.php new file mode 100644 index 0000000000000..4b88e0138a4a4 --- /dev/null +++ b/tests/phpunit/tests/option/wpDetermineOptionAutoloadValue.php @@ -0,0 +1,107 @@ +assertSame( $expected, $test ); + } + + public function data_values() { + return array( + 'yes' => array( + 'autoload' => 'yes', + 'expected' => 'on', + ), + 'on' => array( + 'autoload' => 'on', + 'expected' => 'on', + ), + 'true' => array( + 'autoload' => true, + 'expected' => 'on', + ), + 'no' => array( + 'autoload' => 'no', + 'expected' => 'off', + ), + 'off' => array( + 'autoload' => 'off', + 'expected' => 'off', + ), + 'false' => array( + 'autoload' => false, + 'expected' => 'off', + ), + 'invalid' => array( + 'autoload' => 'foo', + 'expected' => 'auto', + ), + 'null' => array( + 'autoload' => null, + 'expected' => 'auto', + ), + 'auto' => array( + 'autoload' => 'auto', + 'expected' => 'auto', + ), + 'auto-on' => array( + 'autoload' => 'auto-on', + 'expected' => 'auto', + ), + 'auto-off' => array( + 'autoload' => 'auto-off', + 'expected' => 'auto', + ), + ); + } + + /** + * @ticket 42441 + */ + public function test_small_option() { + $test = wp_determine_option_autoload_value( 'foo', 'bar', 'bar', null ); + $this->assertSame( 'auto', $test ); + } + + /** + * @ticket 42441 + */ + public function test_large_option() { + $value = file( DIR_TESTDATA . '/formatting/entities.txt' ); + $serialized_value = maybe_serialize( $value ); + $test = wp_determine_option_autoload_value( 'foo', $value, $serialized_value, null ); + $this->assertSame( 'auto-off', $test ); + } + + /** + * @ticket 42441 + */ + public function test_large_option_json() { + $value = file( DIR_TESTDATA . '/themedir1/block-theme/theme.json' ); + $serialized_value = maybe_serialize( $value ); + $test = wp_determine_option_autoload_value( 'foo', $value, $serialized_value, null ); + $this->assertSame( 'auto-off', $test ); + } + + public function filter_max_option_size( $current ) { + return 1000; + } +} diff --git a/tests/phpunit/tests/option/wpLoadAlloptions.php b/tests/phpunit/tests/option/wpLoadAlloptions.php index 329dc64e6e3a7..34b8ebac9012d 100644 --- a/tests/phpunit/tests/option/wpLoadAlloptions.php +++ b/tests/phpunit/tests/option/wpLoadAlloptions.php @@ -19,6 +19,32 @@ public function test_if_alloptions_is_cached() { $this->assertNotEmpty( wp_cache_get( 'alloptions', 'options' ) ); } + /** + * @ticket 42441 + * + * @covers ::wp_load_alloptions + */ + public function test_default_and_yes() { + add_option( 'foo', 'bar' ); + add_option( 'bar', 'foo', '', 'yes' ); + $alloptions = wp_load_alloptions(); + $this->assertArrayHasKey( 'foo', $alloptions ); + $this->assertArrayHasKey( 'bar', $alloptions ); + } + + /** + * @ticket 42441 + * + * @covers ::wp_load_alloptions + */ + public function test_default_and_no() { + add_option( 'foo', 'bar' ); + add_option( 'bar', 'foo', '', 'no' ); + $alloptions = wp_load_alloptions(); + $this->assertArrayHasKey( 'foo', $alloptions ); + $this->assertArrayNotHasKey( 'bar', $alloptions ); + } + /** * @depends test_if_alloptions_is_cached * diff --git a/tests/phpunit/tests/option/wpSetOptionAutoload.php b/tests/phpunit/tests/option/wpSetOptionAutoload.php index 8736005e32118..226ad4b155d1f 100644 --- a/tests/phpunit/tests/option/wpSetOptionAutoload.php +++ b/tests/phpunit/tests/option/wpSetOptionAutoload.php @@ -22,7 +22,7 @@ public function test_wp_set_option_autoload_yes() { add_option( $option, $value, '', 'no' ); $this->assertTrue( wp_set_option_autoload( $option, 'yes' ), 'Function did not succeed' ); - $this->assertSame( 'yes', $wpdb->get_var( $wpdb->prepare( "SELECT autoload FROM $wpdb->options WHERE option_name = %s", $option ) ), 'Option autoload value not updated in database' ); + $this->assertSame( 'on', $wpdb->get_var( $wpdb->prepare( "SELECT autoload FROM $wpdb->options WHERE option_name = %s", $option ) ), 'Option autoload value not updated in database' ); $this->assertFalse( wp_cache_get( $option, 'options' ), 'Option not deleted from individual cache' ); $this->assertFalse( wp_cache_get( 'alloptions', 'options' ), 'Alloptions cache not cleared' ); } @@ -41,7 +41,7 @@ public function test_wp_set_option_autoload_no() { add_option( $option, $value, '', 'yes' ); $this->assertTrue( wp_set_option_autoload( $option, 'no' ), 'Function did not succeed' ); - $this->assertSame( 'no', $wpdb->get_var( $wpdb->prepare( "SELECT autoload FROM $wpdb->options WHERE option_name = %s", $option ) ), 'Option autoload value not updated in database' ); + $this->assertSame( 'off', $wpdb->get_var( $wpdb->prepare( "SELECT autoload FROM $wpdb->options WHERE option_name = %s", $option ) ), 'Option autoload value not updated in database' ); $this->assertArrayNotHasKey( $option, wp_cache_get( 'alloptions', 'options' ), 'Option not deleted from alloptions cache' ); } @@ -59,7 +59,7 @@ public function test_wp_set_option_autoload_same() { add_option( $option, $value, '', 'yes' ); $this->assertFalse( wp_set_option_autoload( $option, 'yes' ), 'Function did unexpectedly succeed' ); - $this->assertSame( 'yes', $wpdb->get_var( $wpdb->prepare( "SELECT autoload FROM $wpdb->options WHERE option_name = %s", $option ) ), 'Option autoload value unexpectedly updated in database' ); + $this->assertSame( 'on', $wpdb->get_var( $wpdb->prepare( "SELECT autoload FROM $wpdb->options WHERE option_name = %s", $option ) ), 'Option autoload value unexpectedly updated in database' ); } /** @@ -92,7 +92,7 @@ public function test_wp_set_option_autoload_true() { add_option( $option, $value, '', false ); $this->assertTrue( wp_set_option_autoload( $option, true ), 'Function did not succeed' ); - $this->assertSame( 'yes', $wpdb->get_var( $wpdb->prepare( "SELECT autoload FROM $wpdb->options WHERE option_name = %s", $option ) ), 'Option autoload value not updated in database' ); + $this->assertSame( 'on', $wpdb->get_var( $wpdb->prepare( "SELECT autoload FROM $wpdb->options WHERE option_name = %s", $option ) ), 'Option autoload value not updated in database' ); } /** @@ -109,6 +109,6 @@ public function test_wp_set_option_autoload_false() { add_option( $option, $value, '', true ); $this->assertTrue( wp_set_option_autoload( $option, false ), 'Function did not succeed' ); - $this->assertSame( 'no', $wpdb->get_var( $wpdb->prepare( "SELECT autoload FROM $wpdb->options WHERE option_name = %s", $option ) ), 'Option autoload value not updated in database' ); + $this->assertSame( 'off', $wpdb->get_var( $wpdb->prepare( "SELECT autoload FROM $wpdb->options WHERE option_name = %s", $option ) ), 'Option autoload value not updated in database' ); } } diff --git a/tests/phpunit/tests/option/wpSetOptionAutoloadValues.php b/tests/phpunit/tests/option/wpSetOptionAutoloadValues.php index f474bd1093b3a..7f7e9a15b8d28 100644 --- a/tests/phpunit/tests/option/wpSetOptionAutoloadValues.php +++ b/tests/phpunit/tests/option/wpSetOptionAutoloadValues.php @@ -30,7 +30,7 @@ public function test_wp_set_option_autoload_values_all_yes_partial_update() { $num_queries = get_num_queries(); $this->assertSame( $expected, wp_set_option_autoload_values( $options ), 'Function produced unexpected result' ); $this->assertSame( $num_queries + 2, get_num_queries(), 'Function made unexpected amount of database queries' ); - $this->assertSame( array( 'yes', 'yes' ), $wpdb->get_col( $wpdb->prepare( "SELECT autoload FROM $wpdb->options WHERE option_name IN (" . implode( ',', array_fill( 0, count( $options ), '%s' ) ) . ')', ...array_keys( $options ) ) ), 'Option autoload values not updated in database' ); + $this->assertSame( array( 'on', 'on' ), $wpdb->get_col( $wpdb->prepare( "SELECT autoload FROM $wpdb->options WHERE option_name IN (" . implode( ',', array_fill( 0, count( $options ), '%s' ) ) . ')', ...array_keys( $options ) ) ), 'Option autoload values not updated in database' ); foreach ( $options as $option => $autoload ) { $this->assertFalse( wp_cache_get( $option, 'options' ), sprintf( 'Option %s not deleted from individual cache', $option ) ); } @@ -61,7 +61,7 @@ public function test_wp_set_option_autoload_values_all_no_partial_update() { $num_queries = get_num_queries(); $this->assertSame( $expected, wp_set_option_autoload_values( $options ), 'Function produced unexpected result' ); $this->assertSame( $num_queries + 2, get_num_queries(), 'Function made unexpected amount of database queries' ); - $this->assertSame( array( 'no', 'no' ), $wpdb->get_col( $wpdb->prepare( "SELECT autoload FROM $wpdb->options WHERE option_name IN (" . implode( ',', array_fill( 0, count( $options ), '%s' ) ) . ')', ...array_keys( $options ) ) ), 'Option autoload values not updated in database' ); + $this->assertSame( array( 'off', 'off' ), $wpdb->get_col( $wpdb->prepare( "SELECT autoload FROM $wpdb->options WHERE option_name IN (" . implode( ',', array_fill( 0, count( $options ), '%s' ) ) . ')', ...array_keys( $options ) ) ), 'Option autoload values not updated in database' ); foreach ( $options as $option => $autoload ) { $this->assertArrayNotHasKey( $option, wp_cache_get( 'alloptions', 'options' ), sprintf( 'Option %s not deleted from alloptions cache', $option ) ); } @@ -89,7 +89,7 @@ public function test_wp_set_option_autoload_values_all_yes_no_update() { $num_queries = get_num_queries(); $this->assertSame( $expected, wp_set_option_autoload_values( $options ), 'Function produced unexpected result' ); $this->assertSame( $num_queries + 1, get_num_queries(), 'Function made unexpected amount of database queries' ); - $this->assertSame( array( 'yes', 'yes' ), $wpdb->get_col( $wpdb->prepare( "SELECT autoload FROM $wpdb->options WHERE option_name IN (" . implode( ',', array_fill( 0, count( $options ), '%s' ) ) . ')', ...array_keys( $options ) ) ), 'Option autoload values not updated in database' ); + $this->assertSame( array( 'on', 'on' ), $wpdb->get_col( $wpdb->prepare( "SELECT autoload FROM $wpdb->options WHERE option_name IN (" . implode( ',', array_fill( 0, count( $options ), '%s' ) ) . ')', ...array_keys( $options ) ) ), 'Option autoload values not updated in database' ); foreach ( $options as $option => $autoload ) { $this->assertArrayHasKey( $option, wp_cache_get( 'alloptions', 'options' ), sprintf( 'Option %s unexpectedly deleted from alloptions cache', $option ) ); } @@ -124,7 +124,7 @@ public function test_wp_set_option_autoload_values_mixed_partial_update() { $num_queries = get_num_queries(); $this->assertSame( $expected, wp_set_option_autoload_values( $options ), 'Function produced unexpected result' ); $this->assertSame( $num_queries + 3, get_num_queries(), 'Function made unexpected amount of database queries' ); - $this->assertSameSets( array( 'yes', 'no', 'yes' ), $wpdb->get_col( $wpdb->prepare( "SELECT autoload FROM $wpdb->options WHERE option_name IN (" . implode( ',', array_fill( 0, count( $options ), '%s' ) ) . ')', ...array_keys( $options ) ) ), 'Option autoload values not updated in database' ); + $this->assertSameSets( array( 'on', 'off', 'on' ), $wpdb->get_col( $wpdb->prepare( "SELECT autoload FROM $wpdb->options WHERE option_name IN (" . implode( ',', array_fill( 0, count( $options ), '%s' ) ) . ')', ...array_keys( $options ) ) ), 'Option autoload values not updated in database' ); foreach ( $options as $option => $autoload ) { $this->assertFalse( wp_cache_get( $option, 'options' ), sprintf( 'Option %s not deleted from individual cache', $option ) ); } @@ -158,7 +158,7 @@ public function test_wp_set_option_autoload_values_mixed_only_update_no() { $num_queries = get_num_queries(); $this->assertSame( $expected, wp_set_option_autoload_values( $options ), 'Function produced unexpected result' ); $this->assertSame( $num_queries + 2, get_num_queries(), 'Function made unexpected amount of database queries' ); - $this->assertSameSets( array( 'yes', 'no', 'yes' ), $wpdb->get_col( $wpdb->prepare( "SELECT autoload FROM $wpdb->options WHERE option_name IN (" . implode( ',', array_fill( 0, count( $options ), '%s' ) ) . ')', ...array_keys( $options ) ) ), 'Option autoload values not updated in database' ); + $this->assertSameSets( array( 'on', 'off', 'on' ), $wpdb->get_col( $wpdb->prepare( "SELECT autoload FROM $wpdb->options WHERE option_name IN (" . implode( ',', array_fill( 0, count( $options ), '%s' ) ) . ')', ...array_keys( $options ) ) ), 'Option autoload values not updated in database' ); foreach ( $options as $option => $autoload ) { if ( 'no' === $autoload ) { $this->assertArrayNotHasKey( $option, wp_cache_get( 'alloptions', 'options' ), sprintf( 'Option %s not deleted from alloptions cache', $option ) ); @@ -199,7 +199,7 @@ static function ( $query ) { ); $this->assertSame( $expected, wp_set_option_autoload_values( $options ), 'Function produced unexpected result' ); - $this->assertSame( array( 'no', 'no' ), $wpdb->get_col( $wpdb->prepare( "SELECT autoload FROM $wpdb->options WHERE option_name IN (" . implode( ',', array_fill( 0, count( $options ), '%s' ) ) . ')', ...array_keys( $options ) ) ), 'Option autoload values not updated in database' ); + $this->assertSame( array( 'off', 'off' ), $wpdb->get_col( $wpdb->prepare( "SELECT autoload FROM $wpdb->options WHERE option_name IN (" . implode( ',', array_fill( 0, count( $options ), '%s' ) ) . ')', ...array_keys( $options ) ) ), 'Option autoload values not updated in database' ); } /** @@ -224,7 +224,7 @@ public function test_wp_set_option_autoload_values_with_bool() { $num_queries = get_num_queries(); $this->assertSame( $expected, wp_set_option_autoload_values( $options ), 'Function produced unexpected result' ); $this->assertSame( $num_queries + 3, get_num_queries(), 'Function made unexpected amount of database queries' ); - $this->assertSameSets( array( 'yes', 'no' ), $wpdb->get_col( $wpdb->prepare( "SELECT autoload FROM $wpdb->options WHERE option_name IN (" . implode( ',', array_fill( 0, count( $options ), '%s' ) ) . ')', ...array_keys( $options ) ) ), 'Option autoload values not updated in database' ); + $this->assertSameSets( array( 'on', 'off' ), $wpdb->get_col( $wpdb->prepare( "SELECT autoload FROM $wpdb->options WHERE option_name IN (" . implode( ',', array_fill( 0, count( $options ), '%s' ) ) . ')', ...array_keys( $options ) ) ), 'Option autoload values not updated in database' ); } /** diff --git a/tests/phpunit/tests/option/wpSetOptionsAutoload.php b/tests/phpunit/tests/option/wpSetOptionsAutoload.php index 5202283efa0c6..68a1191df18d4 100644 --- a/tests/phpunit/tests/option/wpSetOptionsAutoload.php +++ b/tests/phpunit/tests/option/wpSetOptionsAutoload.php @@ -30,7 +30,7 @@ public function test_wp_set_options_autoload_yes() { $num_queries = get_num_queries(); $this->assertSame( $expected, wp_set_options_autoload( array_keys( $options ), 'yes' ), 'Function did not succeed' ); $this->assertSame( $num_queries + 2, get_num_queries(), 'Updating options autoload value ran too many queries' ); - $this->assertSame( array( 'yes', 'yes' ), $wpdb->get_col( $wpdb->prepare( "SELECT autoload FROM $wpdb->options WHERE option_name IN (" . implode( ',', array_fill( 0, count( $options ), '%s' ) ) . ')', ...array_keys( $options ) ) ), 'Option autoload values not updated in database' ); + $this->assertSame( array( 'on', 'on' ), $wpdb->get_col( $wpdb->prepare( "SELECT autoload FROM $wpdb->options WHERE option_name IN (" . implode( ',', array_fill( 0, count( $options ), '%s' ) ) . ')', ...array_keys( $options ) ) ), 'Option autoload values not updated in database' ); foreach ( $options as $option => $value ) { $this->assertFalse( wp_cache_get( $option, 'options' ), sprintf( 'Option %s not deleted from individual cache', $option ) ); } @@ -59,7 +59,7 @@ public function test_wp_set_options_autoload_no() { $num_queries = get_num_queries(); $this->assertSame( $expected, wp_set_options_autoload( array_keys( $options ), 'no' ), 'Function did not succeed' ); $this->assertSame( $num_queries + 2, get_num_queries(), 'Updating options autoload value ran too many queries' ); - $this->assertSame( array( 'no', 'no' ), $wpdb->get_col( $wpdb->prepare( "SELECT autoload FROM $wpdb->options WHERE option_name IN (" . implode( ',', array_fill( 0, count( $options ), '%s' ) ) . ')', ...array_keys( $options ) ) ), 'Option autoload values not updated in database' ); + $this->assertSame( array( 'off', 'off' ), $wpdb->get_col( $wpdb->prepare( "SELECT autoload FROM $wpdb->options WHERE option_name IN (" . implode( ',', array_fill( 0, count( $options ), '%s' ) ) . ')', ...array_keys( $options ) ) ), 'Option autoload values not updated in database' ); foreach ( $options as $option => $value ) { $this->assertArrayNotHasKey( $option, wp_cache_get( 'alloptions', 'options' ), sprintf( 'Option %s not deleted from alloptions cache', $option ) ); } @@ -87,7 +87,7 @@ public function test_wp_set_options_autoload_same() { $num_queries = get_num_queries(); $this->assertSame( $expected, wp_set_options_autoload( array_keys( $options ), 'yes' ), 'Function did unexpectedly succeed' ); $this->assertSame( $num_queries + 1, get_num_queries(), 'Function attempted to update options autoload value in database' ); - $this->assertSame( array( 'yes', 'yes' ), $wpdb->get_col( $wpdb->prepare( "SELECT autoload FROM $wpdb->options WHERE option_name IN (" . implode( ',', array_fill( 0, count( $options ), '%s' ) ) . ')', ...array_keys( $options ) ) ), 'Options autoload value unexpectedly updated in database' ); + $this->assertSame( array( 'on', 'on' ), $wpdb->get_col( $wpdb->prepare( "SELECT autoload FROM $wpdb->options WHERE option_name IN (" . implode( ',', array_fill( 0, count( $options ), '%s' ) ) . ')', ...array_keys( $options ) ) ), 'Options autoload value unexpectedly updated in database' ); } /** @@ -133,7 +133,7 @@ public function test_wp_set_options_autoload_mixed() { ); $this->assertSame( $expected, wp_set_options_autoload( array_keys( $options ), 'yes' ), 'Function produced unexpected result' ); - $this->assertSame( array( 'yes', 'yes' ), $wpdb->get_col( $wpdb->prepare( "SELECT autoload FROM $wpdb->options WHERE option_name IN (" . implode( ',', array_fill( 0, count( $options ), '%s' ) ) . ')', ...array_keys( $options ) ) ), 'Option autoload values not updated in database' ); + $this->assertSame( array( 'on', 'on' ), $wpdb->get_col( $wpdb->prepare( "SELECT autoload FROM $wpdb->options WHERE option_name IN (" . implode( ',', array_fill( 0, count( $options ), '%s' ) ) . ')', ...array_keys( $options ) ) ), 'Option autoload values not updated in database' ); foreach ( $options as $option => $value ) { $this->assertFalse( wp_cache_get( $option, 'options' ), sprintf( 'Option %s not deleted from individual cache', $option ) ); } @@ -161,7 +161,7 @@ public function test_wp_set_options_autoload_true() { ); $this->assertSame( $expected, wp_set_options_autoload( array_keys( $options ), true ), 'Function produced unexpected result' ); - $this->assertSame( array( 'yes', 'yes' ), $wpdb->get_col( $wpdb->prepare( "SELECT autoload FROM $wpdb->options WHERE option_name IN (" . implode( ',', array_fill( 0, count( $options ), '%s' ) ) . ')', ...array_keys( $options ) ) ), 'Option autoload values not updated in database' ); + $this->assertSame( array( 'on', 'on' ), $wpdb->get_col( $wpdb->prepare( "SELECT autoload FROM $wpdb->options WHERE option_name IN (" . implode( ',', array_fill( 0, count( $options ), '%s' ) ) . ')', ...array_keys( $options ) ) ), 'Option autoload values not updated in database' ); } /** @@ -185,6 +185,6 @@ public function test_wp_set_options_autoload_false() { ); $this->assertSame( $expected, wp_set_options_autoload( array_keys( $options ), false ), 'Function produced unexpected result' ); - $this->assertSame( array( 'no', 'no' ), $wpdb->get_col( $wpdb->prepare( "SELECT autoload FROM $wpdb->options WHERE option_name IN (" . implode( ',', array_fill( 0, count( $options ), '%s' ) ) . ')', ...array_keys( $options ) ) ), 'Option autoload values not updated in database' ); + $this->assertSame( array( 'off', 'off' ), $wpdb->get_col( $wpdb->prepare( "SELECT autoload FROM $wpdb->options WHERE option_name IN (" . implode( ',', array_fill( 0, count( $options ), '%s' ) ) . ')', ...array_keys( $options ) ) ), 'Option autoload values not updated in database' ); } } diff --git a/tests/phpunit/tests/theme/autoloadThemeMods.php b/tests/phpunit/tests/theme/autoloadThemeMods.php index e653ac6a77a84..9dbd668f2a3f3 100644 --- a/tests/phpunit/tests/theme/autoloadThemeMods.php +++ b/tests/phpunit/tests/theme/autoloadThemeMods.php @@ -28,13 +28,13 @@ public function test_that_on_switch_theme_previous_theme_mods_should_not_be_auto switch_theme( $new_theme_stylesheet ); - $this->assertSame( 'no', $wpdb->get_var( $wpdb->prepare( "SELECT autoload FROM $wpdb->options WHERE option_name = %s", "theme_mods_$current_theme_stylesheet" ) ), 'Theme mods autoload value not set to no in database' ); - $this->assertSame( 'yes', $wpdb->get_var( $wpdb->prepare( "SELECT autoload FROM $wpdb->options WHERE option_name = %s", "theme_mods_$new_theme_stylesheet" ) ), 'Theme mods autoload value not set to yes in database' ); + $this->assertSame( 'off', $wpdb->get_var( $wpdb->prepare( "SELECT autoload FROM $wpdb->options WHERE option_name = %s", "theme_mods_$current_theme_stylesheet" ) ), 'Theme mods autoload value not set to no in database' ); + $this->assertSame( 'on', $wpdb->get_var( $wpdb->prepare( "SELECT autoload FROM $wpdb->options WHERE option_name = %s", "theme_mods_$new_theme_stylesheet" ) ), 'Theme mods autoload value not set to yes in database' ); switch_theme( $current_theme_stylesheet ); - $this->assertSame( 'yes', $wpdb->get_var( $wpdb->prepare( "SELECT autoload FROM $wpdb->options WHERE option_name = %s", "theme_mods_$current_theme_stylesheet" ) ), 'Theme mods autoload value not set to yes in database' ); - $this->assertSame( 'no', $wpdb->get_var( $wpdb->prepare( "SELECT autoload FROM $wpdb->options WHERE option_name = %s", "theme_mods_$new_theme_stylesheet" ) ), 'Theme mods autoload value not set to no in database' ); + $this->assertSame( 'on', $wpdb->get_var( $wpdb->prepare( "SELECT autoload FROM $wpdb->options WHERE option_name = %s", "theme_mods_$current_theme_stylesheet" ) ), 'Theme mods autoload value not set to yes in database' ); + $this->assertSame( 'off', $wpdb->get_var( $wpdb->prepare( "SELECT autoload FROM $wpdb->options WHERE option_name = %s", "theme_mods_$new_theme_stylesheet" ) ), 'Theme mods autoload value not set to no in database' ); // Basic assertion to make sure that we haven't lost the mods. $this->assertSame( 'a-value', get_theme_mod( 'foo-bar-option' ) ); From 06bbc9afde65b2670d2941af673851d346575128 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 4 Apr 2024 11:17:16 +0000 Subject: [PATCH 234/251] Docs: Fix typo in `wp_mediaelement_fallback` filter description. Follow-up to [23729], [28128]. Props dilipbheda, mukesh27. Fixes #60917. git-svn-id: https://develop.svn.wordpress.org/trunk@57921 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/media.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/media.php b/src/wp-includes/media.php index bf90a6e495b24..396764ff2d48c 100644 --- a/src/wp-includes/media.php +++ b/src/wp-includes/media.php @@ -3146,7 +3146,7 @@ function wp_playlist_shortcode( $attr ) { */ function wp_mediaelement_fallback( $url ) { /** - * Filters the Mediaelement fallback output for no-JS. + * Filters the MediaElement fallback output for no-JS. * * @since 3.6.0 * From 89bd74fea1a6f917b4cb408d35bb237e54107986 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Thu, 4 Apr 2024 13:36:25 +0000 Subject: [PATCH 235/251] I18N: Always search for script translations in `wp-content/languages/plugins`. Previously, when `WP_PLUGIN_DIR` was set to something other than `wp-content/plugins`, e.g. `wp-content/mods`, `load_script_textdomain` was searching for script translations in `wp-content/languages/mods`. However, that is incorrect, as `WP_PLUGIN_DIR` does not affect where translations are stored. The location is always `wp-content/languages/plugins`. Props coreymckrill, swissspidy. Fixes #60891. git-svn-id: https://develop.svn.wordpress.org/trunk@57922 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/l10n.php | 2 +- tests/phpunit/tests/l10n/loadScriptTextdomain.php | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/wp-includes/l10n.php b/src/wp-includes/l10n.php index 38c30b84e8a0f..b4f1701fe7191 100644 --- a/src/wp-includes/l10n.php +++ b/src/wp-includes/l10n.php @@ -1189,7 +1189,7 @@ function load_script_textdomain( $handle, $domain = 'default', $path = '' ) { $relative = trim( $relative, '/' ); $relative = explode( '/', $relative ); - $languages_path = WP_LANG_DIR . '/' . $relative[0]; + $languages_path = WP_LANG_DIR . '/plugins'; $relative = array_slice( $relative, 2 ); // Remove plugins/ or themes/. $relative = implode( '/', $relative ); diff --git a/tests/phpunit/tests/l10n/loadScriptTextdomain.php b/tests/phpunit/tests/l10n/loadScriptTextdomain.php index 80313f5f37ca7..182bfb9fbe1a4 100644 --- a/tests/phpunit/tests/l10n/loadScriptTextdomain.php +++ b/tests/phpunit/tests/l10n/loadScriptTextdomain.php @@ -13,6 +13,7 @@ class Tests_L10n_LoadScriptTextdomain extends WP_UnitTestCase { * @ticket 46336 * @ticket 46387 * @ticket 49145 + * @ticket 60891 * * @dataProvider data_resolve_relative_path */ @@ -121,6 +122,19 @@ static function () { }, ), ), + // @ticket 60891 + array( + '/languages/plugins/internationalized-plugin-en_US-2f86cb96a0233e7cb3b6f03ad573be0b.json', + 'plugin-in-custom-plugin-dir', + '/wp-content/mods/my-plugin/js/script.js', + 'internationalized-plugin', + array( + 'plugins_url', + static function () { + return 'https://example.com/wp-content/mods'; + }, + ), + ), ); } From 554f5b5723058b40f900eabadc7d9e949278c630 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Thu, 4 Apr 2024 13:37:56 +0000 Subject: [PATCH 236/251] Permalinks: Detect FrankenPHP web server support. Support pretty permalinks when FrankenPHP server is detected, which is built on top of Caddy. Caddy detection was added in [57612]. Props swissspidy, stephenmiracle. Fixes #60884. git-svn-id: https://develop.svn.wordpress.org/trunk@57923 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/vars.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/vars.php b/src/wp-includes/vars.php index 74a9cef032d88..b719b48d2e87f 100644 --- a/src/wp-includes/vars.php +++ b/src/wp-includes/vars.php @@ -127,11 +127,11 @@ $is_nginx = ( str_contains( $_SERVER['SERVER_SOFTWARE'], 'nginx' ) ); /** - * Whether the server software is Caddy or something else. + * Whether the server software is Caddy / FrankenPHP or something else. * * @global bool $is_caddy */ -$is_caddy = ( str_contains( $_SERVER['SERVER_SOFTWARE'], 'Caddy' ) ); +$is_caddy = ( str_contains( $_SERVER['SERVER_SOFTWARE'], 'Caddy' ) || str_contains( $_SERVER['SERVER_SOFTWARE'], 'FrankenPHP' ) ); /** * Whether the server software is IIS or something else. From 90ea8838716b3a7a1268e5a4e98a1cca97ff4708 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Thu, 4 Apr 2024 13:43:49 +0000 Subject: [PATCH 237/251] Build/Test Tools: Update a few image URLs in HTTP and image cropping tests. Follow-up to #60865 / [57903] where similar instances were recently updated due to an upstream change. Particularly the `test_wp_crop_image_with_url()` test recently began to fail on some environments, likely because of the same change. This updates the image URLs with the aim to bring more consistency and to get the test passing again more broadly. Fixes #60907. git-svn-id: https://develop.svn.wordpress.org/trunk@57924 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/http/functions.php | 2 +- tests/phpunit/tests/image/functions.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/phpunit/tests/http/functions.php b/tests/phpunit/tests/http/functions.php index a1e93e802c81b..dd5e072145b52 100644 --- a/tests/phpunit/tests/http/functions.php +++ b/tests/phpunit/tests/http/functions.php @@ -54,7 +54,7 @@ public function test_head_404() { * @covers ::wp_remote_retrieve_response_code */ public function test_get_request() { - $url = 'https://asdftestblog1.files.wordpress.com/2007/09/2007-06-30-dsc_4700-1.jpg'; + $url = 'https://asdftestblog1.wordpress.com/wp-content/uploads/2007/09/2007-06-30-dsc_4700-1.jpg'; $response = wp_remote_get( $url ); diff --git a/tests/phpunit/tests/image/functions.php b/tests/phpunit/tests/image/functions.php index 56c81a62f0c72..4f99caf740e63 100644 --- a/tests/phpunit/tests/image/functions.php +++ b/tests/phpunit/tests/image/functions.php @@ -638,7 +638,7 @@ public function test_wp_crop_image_with_file() { */ public function test_wp_crop_image_with_url() { $file = wp_crop_image( - 'https://asdftestblog1.files.wordpress.com/2008/04/canola.jpg', + 'https://asdftestblog1.wordpress.com/wp-content/uploads/2008/04/canola.jpg', 0, 0, 100, @@ -687,7 +687,7 @@ public function test_wp_crop_image_should_fail_with_wp_error_object_if_file_does */ public function test_wp_crop_image_should_fail_with_wp_error_object_if_url_does_not_exist() { $file = wp_crop_image( - 'https://asdftestblog1.files.wordpress.com/2008/04/canoladoesnotexist.jpg', + 'https://asdftestblog1.wordpress.com/wp-content/uploads/2008/04/canoladoesnotexist.jpg', 0, 0, 100, From c67ceb0d32ca160eac4e73bd0a15a9cbc1fac72c Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Thu, 4 Apr 2024 13:54:12 +0000 Subject: [PATCH 238/251] I18N: Bail early if an invalid text domain is passed to `load_textdomain()` et al. Some plugins pass invalid values such as `null` instead of a string, which has never been supported by WordPress (no translations are loaded) and was technically undefined behavior. With the introduction of the new l10n library in #59656, which has stricter type hints, this could end up causing warnings or even fatal errors. This change adds a deliberate short-circuit to `load_textdomain()` & co. to better handle such a case and document that it is not supported. Props verygoode, swissspidy. Fixes #60888. git-svn-id: https://develop.svn.wordpress.org/trunk@57925 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/l10n.php | 16 +++++++++++ tests/phpunit/tests/l10n/loadTextdomain.php | 32 +++++++++++++++++++++ 2 files changed, 48 insertions(+) diff --git a/src/wp-includes/l10n.php b/src/wp-includes/l10n.php index b4f1701fe7191..3b99ff848b810 100644 --- a/src/wp-includes/l10n.php +++ b/src/wp-includes/l10n.php @@ -728,6 +728,10 @@ function load_textdomain( $domain, $mofile, $locale = null ) { $l10n_unloaded = (array) $l10n_unloaded; + if ( ! is_string( $domain ) ) { + return false; + } + /** * Filters whether to short-circuit loading .mo file. * @@ -989,6 +993,10 @@ function load_plugin_textdomain( $domain, $deprecated = false, $plugin_rel_path /** @var WP_Textdomain_Registry $wp_textdomain_registry */ global $wp_textdomain_registry; + if ( ! is_string( $domain ) ) { + return false; + } + /** * Filters a plugin's locale. * @@ -1037,6 +1045,10 @@ function load_muplugin_textdomain( $domain, $mu_plugin_rel_path = '' ) { /** @var WP_Textdomain_Registry $wp_textdomain_registry */ global $wp_textdomain_registry; + if ( ! is_string( $domain ) ) { + return false; + } + /** This filter is documented in wp-includes/l10n.php */ $locale = apply_filters( 'plugin_locale', determine_locale(), $domain ); @@ -1076,6 +1088,10 @@ function load_theme_textdomain( $domain, $path = false ) { /** @var WP_Textdomain_Registry $wp_textdomain_registry */ global $wp_textdomain_registry; + if ( ! is_string( $domain ) ) { + return false; + } + /** * Filters a theme's locale. * diff --git a/tests/phpunit/tests/l10n/loadTextdomain.php b/tests/phpunit/tests/l10n/loadTextdomain.php index 234e98015ad49..d69c9e154752d 100644 --- a/tests/phpunit/tests/l10n/loadTextdomain.php +++ b/tests/phpunit/tests/l10n/loadTextdomain.php @@ -316,4 +316,36 @@ public function test_pre_load_textdomain_filter() { $this->assertSame( 0, $override_load_textdomain_callback->get_call_count(), 'Expected override_load_textdomain not to be called.' ); } + + /** + * @ticket 60888 + * @covers ::load_plugin_textdomain + */ + public function test_load_plugin_textdomain_invalid_domain() { + $this->assertFalse( load_plugin_textdomain( null ) ); + } + + /** + * @ticket 60888 + * @covers ::load_muplugin_textdomain + */ + public function test_load_muplugin_textdomain_invalid_domain() { + $this->assertFalse( load_muplugin_textdomain( null ) ); + } + + /** + * @ticket 60888 + * @covers ::load_theme_textdomain + */ + public function test_load_theme_textdomain_invalid_domain() { + $this->assertFalse( load_theme_textdomain( null ) ); + } + + /** + * @ticket 60888 + * @covers ::load_textdomain + */ + public function test_load_textdomain_invalid_domain() { + $this->assertFalse( load_textdomain( null, DIR_TESTDATA . '/pomo/thisfiledoesnotexist.mo' ) ); + } } From fa16bb37b2fb0a267fb545729fcf94a3267e5c84 Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Thu, 4 Apr 2024 15:11:37 +0000 Subject: [PATCH 239/251] Database: Remove back-compat for database servers that don't support `utf8mb4`. Since WordPress 6.5, the minimum supported version of MySQL and MariaDB is 5.5.5. This means all supported database servers now support the `utf8mb4` character set and therefore the conditional logic for this is no longer necessary. Props l1nuxjedi, craigfrancis, OllieJones, johnbillion Fixes #60096 git-svn-id: https://develop.svn.wordpress.org/trunk@57926 602fd350-edb4-49c9-b593-d223f7449a82 --- .../includes/class-wp-site-health.php | 118 ------------------ src/wp-admin/setup-config.php | 2 +- src/wp-includes/class-wpdb.php | 34 +---- tests/phpunit/tests/db.php | 27 ---- tests/phpunit/tests/db/charset.php | 27 ---- tests/phpunit/tests/db/dbDelta.php | 4 - 6 files changed, 4 insertions(+), 208 deletions(-) diff --git a/src/wp-admin/includes/class-wp-site-health.php b/src/wp-admin/includes/class-wp-site-health.php index d7728cd61f292..c0516096ed1fc 100644 --- a/src/wp-admin/includes/class-wp-site-health.php +++ b/src/wp-admin/includes/class-wp-site-health.php @@ -1283,120 +1283,6 @@ public function get_test_sql_server() { return $result; } - /** - * Tests if the database server is capable of using utf8mb4. - * - * @since 5.2.0 - * - * @return array The test results. - */ - public function get_test_utf8mb4_support() { - if ( ! $this->mysql_server_version ) { - $this->prepare_sql_data(); - } - - $result = array( - 'label' => __( 'UTF8MB4 is supported' ), - 'status' => 'good', - 'badge' => array( - 'label' => __( 'Performance' ), - 'color' => 'blue', - ), - 'description' => sprintf( - '

    %s

    ', - __( 'UTF8MB4 is the character set WordPress prefers for database storage because it safely supports the widest set of characters and encodings, including Emoji, enabling better support for non-English languages.' ) - ), - 'actions' => '', - 'test' => 'utf8mb4_support', - ); - - if ( ! $this->is_mariadb ) { - if ( version_compare( $this->mysql_server_version, '5.5.3', '<' ) ) { - $result['status'] = 'recommended'; - - $result['label'] = __( 'utf8mb4 requires a MySQL update' ); - - $result['description'] .= sprintf( - '

    %s

    ', - sprintf( - /* translators: %s: Version number. */ - __( 'WordPress’ utf8mb4 support requires MySQL version %s or greater. Please contact your server administrator.' ), - '5.5.3' - ) - ); - } else { - $result['description'] .= sprintf( - '

    %s

    ', - __( 'Your MySQL version supports utf8mb4.' ) - ); - } - } else { // MariaDB introduced utf8mb4 support in 5.5.0. - if ( version_compare( $this->mysql_server_version, '5.5.0', '<' ) ) { - $result['status'] = 'recommended'; - - $result['label'] = __( 'utf8mb4 requires a MariaDB update' ); - - $result['description'] .= sprintf( - '

    %s

    ', - sprintf( - /* translators: %s: Version number. */ - __( 'WordPress’ utf8mb4 support requires MariaDB version %s or greater. Please contact your server administrator.' ), - '5.5.0' - ) - ); - } else { - $result['description'] .= sprintf( - '

    %s

    ', - __( 'Your MariaDB version supports utf8mb4.' ) - ); - } - } - - // phpcs:ignore WordPress.DB.RestrictedFunctions.mysql_mysqli_get_client_info - $mysql_client_version = mysqli_get_client_info(); - - /* - * libmysql has supported utf8mb4 since 5.5.3, same as the MySQL server. - * mysqlnd has supported utf8mb4 since 5.0.9. - */ - if ( str_contains( $mysql_client_version, 'mysqlnd' ) ) { - $mysql_client_version = preg_replace( '/^\D+([\d.]+).*/', '$1', $mysql_client_version ); - if ( version_compare( $mysql_client_version, '5.0.9', '<' ) ) { - $result['status'] = 'recommended'; - - $result['label'] = __( 'utf8mb4 requires a newer client library' ); - - $result['description'] .= sprintf( - '

    %s

    ', - sprintf( - /* translators: 1: Name of the library, 2: Number of version. */ - __( 'WordPress’ utf8mb4 support requires MySQL client library (%1$s) version %2$s or newer. Please contact your server administrator.' ), - 'mysqlnd', - '5.0.9' - ) - ); - } - } else { - if ( version_compare( $mysql_client_version, '5.5.3', '<' ) ) { - $result['status'] = 'recommended'; - - $result['label'] = __( 'utf8mb4 requires a newer client library' ); - - $result['description'] .= sprintf( - '

    %s

    ', - sprintf( - /* translators: 1: Name of the library, 2: Number of version. */ - __( 'WordPress’ utf8mb4 support requires MySQL client library (%1$s) version %2$s or newer. Please contact your server administrator.' ), - 'libmysql', - '5.5.3' - ) - ); - } - } - - return $result; - } - /** * Tests if the site can communicate with WordPress.org. * @@ -2739,10 +2625,6 @@ public static function get_tests() { 'label' => __( 'Database Server version' ), 'test' => 'sql_server', ), - 'utf8mb4_support' => array( - 'label' => __( 'MySQL utf8mb4 support' ), - 'test' => 'utf8mb4_support', - ), 'ssl_support' => array( 'label' => __( 'Secure communication' ), 'test' => 'ssl_support', diff --git a/src/wp-admin/setup-config.php b/src/wp-admin/setup-config.php index 4f0833805cf8b..b394de867928f 100644 --- a/src/wp-admin/setup-config.php +++ b/src/wp-admin/setup-config.php @@ -396,7 +396,7 @@ function setup_config_display_header( $body_classes = array() ) { $config_file[ $line_num ] = "define( '" . $constant . "'," . $padding . "'" . addcslashes( constant( $constant ), "\\'" ) . "' );\r\n"; break; case 'DB_CHARSET': - if ( 'utf8mb4' === $wpdb->charset || ( ! $wpdb->charset && $wpdb->has_cap( 'utf8mb4' ) ) ) { + if ( 'utf8mb4' === $wpdb->charset || ( ! $wpdb->charset ) ) { $config_file[ $line_num ] = "define( '" . $constant . "'," . $padding . "'utf8mb4' );\r\n"; } break; diff --git a/src/wp-includes/class-wpdb.php b/src/wp-includes/class-wpdb.php index d9186b91f463f..aeb9679937935 100644 --- a/src/wp-includes/class-wpdb.php +++ b/src/wp-includes/class-wpdb.php @@ -878,15 +878,10 @@ public function determine_charset( $charset, $collate ) { return compact( 'charset', 'collate' ); } - if ( 'utf8' === $charset && $this->has_cap( 'utf8mb4' ) ) { + if ( 'utf8' === $charset ) { $charset = 'utf8mb4'; } - if ( 'utf8mb4' === $charset && ! $this->has_cap( 'utf8mb4' ) ) { - $charset = 'utf8'; - $collate = str_replace( 'utf8mb4_', 'utf8_', $collate ); - } - if ( 'utf8mb4' === $charset ) { // _general_ is outdated, so we can upgrade it to _unicode_, instead. if ( ! $collate || 'utf8_general_ci' === $collate ) { @@ -3242,11 +3237,6 @@ protected function get_table_charset( $table ) { if ( ! empty( $column->Collation ) ) { list( $charset ) = explode( '_', $column->Collation ); - // If the current connection can't support utf8mb4 characters, let's only send 3-byte utf8 characters. - if ( 'utf8mb4' === $charset && ! $this->has_cap( 'utf8mb4' ) ) { - $charset = 'utf8'; - } - $charsets[ strtolower( $charset ) ] = true; } @@ -4057,6 +4047,7 @@ public function get_charset_collate() { * @since 4.1.0 Added support for the 'utf8mb4' feature. * @since 4.6.0 Added support for the 'utf8mb4_520' feature. * @since 6.2.0 Added support for the 'identifier_placeholders' feature. + * @since 6.6.0 The `utf8mb4` feature now always returns true. * * @see wpdb::db_version() * @@ -4092,26 +4083,7 @@ public function has_cap( $db_cap ) { case 'set_charset': return version_compare( $db_version, '5.0.7', '>=' ); case 'utf8mb4': // @since 4.1.0 - if ( version_compare( $db_version, '5.5.3', '<' ) ) { - return false; - } - - $client_version = mysqli_get_client_info(); - - /* - * libmysql has supported utf8mb4 since 5.5.3, same as the MySQL server. - * mysqlnd has supported utf8mb4 since 5.0.9. - * - * Note: str_contains() is not used here, as this file can be included - * directly outside of WordPress core, e.g. by HyperDB, in which case - * the polyfills from wp-includes/compat.php are not loaded. - */ - if ( false !== strpos( $client_version, 'mysqlnd' ) ) { - $client_version = preg_replace( '/^\D+([\d.]+).*/', '$1', $client_version ); - return version_compare( $client_version, '5.0.9', '>=' ); - } else { - return version_compare( $client_version, '5.5.3', '>=' ); - } + return true; case 'utf8mb4_520': // @since 4.6.0 return version_compare( $db_version, '5.6', '>=' ); case 'identifier_placeholders': // @since 6.2.0 diff --git a/tests/phpunit/tests/db.php b/tests/phpunit/tests/db.php index 984fe6765cc02..3ac4507b6e0fd 100644 --- a/tests/phpunit/tests/db.php +++ b/tests/phpunit/tests/db.php @@ -1439,10 +1439,6 @@ public function test_charset_not_determined_when_disconnected() { public function test_charset_switched_to_utf8mb4() { global $wpdb; - if ( ! $wpdb->has_cap( 'utf8mb4' ) ) { - $this->markTestSkipped( 'This test requires utf8mb4 support.' ); - } - $charset = 'utf8'; $collate = 'utf8_general_ci'; @@ -1477,10 +1473,6 @@ public function test_collate_switched_to_utf8mb4_520() { public function test_non_unicode_collations() { global $wpdb; - if ( ! $wpdb->has_cap( 'utf8mb4' ) ) { - $this->markTestSkipped( 'This test requires utf8mb4 support.' ); - } - $charset = 'utf8'; $collate = 'utf8_swedish_ci'; @@ -1489,25 +1481,6 @@ public function test_non_unicode_collations() { $this->assertSame( 'utf8mb4_swedish_ci', $result['collate'] ); } - /** - * @ticket 37982 - */ - public function test_charset_switched_to_utf8() { - global $wpdb; - - if ( $wpdb->has_cap( 'utf8mb4' ) ) { - $this->markTestSkipped( 'This test requires utf8mb4 to not be supported.' ); - } - - $charset = 'utf8mb4'; - $collate = 'utf8mb4_general_ci'; - - $result = $wpdb->determine_charset( $charset, $collate ); - - $this->assertSame( 'utf8', $result['charset'] ); - $this->assertSame( 'utf8_general_ci', $result['collate'] ); - } - /** * @dataProvider data_prepare_with_placeholders */ diff --git a/tests/phpunit/tests/db/charset.php b/tests/phpunit/tests/db/charset.php index 52eb56a7a80f4..26074e74b8356 100644 --- a/tests/phpunit/tests/db/charset.php +++ b/tests/phpunit/tests/db/charset.php @@ -522,10 +522,6 @@ public function test_strip_invalid_text( $data, $expected, $message ) { $new_charset = $data[0]['charset']; } - if ( 'utf8mb4' === $new_charset && ! self::$_wpdb->has_cap( 'utf8mb4' ) ) { - $this->markTestSkipped( "The current MySQL server doesn't support the utf8mb4 character set." ); - } - if ( 'big5' === $new_charset && 'byte' === $data[0]['length']['type'] && str_contains( self::$db_server_info, 'MariaDB' ) ) { @@ -795,11 +791,6 @@ public function data_get_table_charset() { */ public function test_get_table_charset( $drop, $create, $table, $expected_charset ) { self::$_wpdb->query( $drop ); - - if ( ! self::$_wpdb->has_cap( 'utf8mb4' ) && preg_match( '/utf8mb[34]/i', $create ) ) { - $this->markTestSkipped( "This version of MySQL doesn't support utf8mb4." ); - } - self::$_wpdb->query( $create ); $charset = self::$_wpdb->get_table_charset( $table ); @@ -836,11 +827,6 @@ public function data_get_column_charset() { */ public function test_get_column_charset( $drop, $create, $table, $expected_charset ) { self::$_wpdb->query( $drop ); - - if ( ! self::$_wpdb->has_cap( 'utf8mb4' ) && preg_match( '/utf8mb[34]/i', $create ) ) { - $this->markTestSkipped( "This version of MySQL doesn't support utf8mb4." ); - } - self::$_wpdb->query( $create ); foreach ( $expected_charset as $column => $charset ) { @@ -864,10 +850,6 @@ public function test_get_column_charset( $drop, $create, $table, $expected_chars public function test_get_column_charset_non_mysql( $drop, $create, $table, $columns ) { self::$_wpdb->query( $drop ); - if ( ! self::$_wpdb->has_cap( 'utf8mb4' ) && preg_match( '/utf8mb[34]/i', $create ) ) { - $this->markTestSkipped( "This version of MySQL doesn't support utf8mb4." ); - } - self::$_wpdb->is_mysql = false; self::$_wpdb->query( $create ); @@ -891,10 +873,6 @@ public function test_get_column_charset_non_mysql( $drop, $create, $table, $colu public function test_get_column_charset_is_mysql_undefined( $drop, $create, $table, $columns ) { self::$_wpdb->query( $drop ); - if ( ! self::$_wpdb->has_cap( 'utf8mb4' ) && preg_match( '/utf8mb[34]/i', $create ) ) { - $this->markTestSkipped( "This version of MySQL doesn't support utf8mb4." ); - } - unset( self::$_wpdb->is_mysql ); self::$_wpdb->query( $create ); @@ -952,11 +930,6 @@ public function data_strip_invalid_text_from_query() { */ public function test_strip_invalid_text_from_query( $create, $query, $expected, $drop ) { self::$_wpdb->query( $drop ); - - if ( ! self::$_wpdb->has_cap( 'utf8mb4' ) && preg_match( '/utf8mb[34]/i', $create ) ) { - $this->markTestSkipped( "This version of MySQL doesn't support utf8mb4." ); - } - self::$_wpdb->query( $create ); $return = self::$_wpdb->strip_invalid_text_from_query( $query ); diff --git a/tests/phpunit/tests/db/dbDelta.php b/tests/phpunit/tests/db/dbDelta.php index bba1fb0524c76..dae1bf9298d84 100644 --- a/tests/phpunit/tests/db/dbDelta.php +++ b/tests/phpunit/tests/db/dbDelta.php @@ -426,10 +426,6 @@ protected function assertTableHasNotColumn( $column, $table ) { public function test_truncated_index() { global $wpdb; - if ( ! $wpdb->has_cap( 'utf8mb4' ) ) { - $this->markTestSkipped( 'This test requires utf8mb4 support in MySQL.' ); - } - // This table needs to be actually created. remove_filter( 'query', array( $this, '_create_temporary_tables' ) ); remove_filter( 'query', array( $this, '_drop_temporary_tables' ) ); From ea7888f114a9fe3c318716684d21703fe146ecbd Mon Sep 17 00:00:00 2001 From: Joe McGill Date: Thu, 4 Apr 2024 18:53:39 +0000 Subject: [PATCH 240/251] Themes: Avoid errors in some environments from `_get_block_templates_paths`. This adds an `is_dir()` check in `_get_block_templates_paths` before trying to run a `RecursiveDirectoryIterator` to avoid errors being reported in New Relic even thought the errors should be handled by a try/catch block. Follow-up to [57215]. Props iCaleb, sean212, mukesh27, joemcgill. Fixes #60915. git-svn-id: https://develop.svn.wordpress.org/trunk@57928 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/block-template-utils.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/wp-includes/block-template-utils.php b/src/wp-includes/block-template-utils.php index 61ae17cc1c0e4..bd8dfeefb2dea 100644 --- a/src/wp-includes/block-template-utils.php +++ b/src/wp-includes/block-template-utils.php @@ -229,14 +229,12 @@ function _get_block_templates_paths( $base_directory ) { return $template_path_list[ $base_directory ]; } $path_list = array(); - try { + if ( is_dir( $base_directory ) ) { $nested_files = new RecursiveIteratorIterator( new RecursiveDirectoryIterator( $base_directory ) ); $nested_html_files = new RegexIterator( $nested_files, '/^.+\.html$/i', RecursiveRegexIterator::GET_MATCH ); foreach ( $nested_html_files as $path => $file ) { $path_list[] = $path; } - } catch ( Exception $e ) { - // Do nothing. } $template_path_list[ $base_directory ] = $path_list; return $path_list; From 13fd2f829b01156174d1ca7ca2236eb9c7248e42 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 5 Apr 2024 12:10:13 +0000 Subject: [PATCH 241/251] Tests: Use an image on WordPress.org CDN in external HTTP tests. Due to some changes on the WP.com side to compress the requested images on the fly, the exact image size in the response could be different between platforms. This commit aims to make the affected tests more reliable. Follow-up to [139/tests], [31258], [34568], [47142], [57903], [57904], [57924]. Props peterwilsoncc, jorbin. See #60865. git-svn-id: https://develop.svn.wordpress.org/trunk@57931 602fd350-edb4-49c9-b593-d223f7449a82 --- .../phpunit/tests/functions/wpRemoteFopen.php | 4 +-- tests/phpunit/tests/http/functions.php | 28 +++++++++---------- tests/phpunit/tests/image/functions.php | 6 ++-- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/tests/phpunit/tests/functions/wpRemoteFopen.php b/tests/phpunit/tests/functions/wpRemoteFopen.php index 4ab2306583e95..51394fd031497 100644 --- a/tests/phpunit/tests/functions/wpRemoteFopen.php +++ b/tests/phpunit/tests/functions/wpRemoteFopen.php @@ -27,10 +27,10 @@ public function test_wp_remote_fopen_bad_url() { */ public function test_wp_remote_fopen() { // This URL gives a direct 200 response. - $url = 'https://asdftestblog1.wordpress.com/wp-content/uploads/2007/09/2007-06-30-dsc_4700-1.jpg'; + $url = 'https://s.w.org/screenshots/3.9/dashboard.png'; $response = wp_remote_fopen( $url ); $this->assertIsString( $response ); - $this->assertSame( 40148, strlen( $response ) ); + $this->assertSame( 153204, strlen( $response ) ); } } diff --git a/tests/phpunit/tests/http/functions.php b/tests/phpunit/tests/http/functions.php index dd5e072145b52..1da190997db06 100644 --- a/tests/phpunit/tests/http/functions.php +++ b/tests/phpunit/tests/http/functions.php @@ -11,7 +11,7 @@ class Tests_HTTP_Functions extends WP_UnitTestCase { */ public function test_head_request() { // This URL gives a direct 200 response. - $url = 'https://asdftestblog1.wordpress.com/wp-content/uploads/2007/09/2007-06-30-dsc_4700-1.jpg'; + $url = 'https://s.w.org/screenshots/3.9/dashboard.png'; $response = wp_remote_head( $url ); $this->skipTestOnTimeout( $response ); @@ -20,8 +20,8 @@ public function test_head_request() { $this->assertIsArray( $response ); - $this->assertSame( 'image/jpeg', $headers['Content-Type'] ); - $this->assertSame( '40148', $headers['Content-Length'] ); + $this->assertSame( 'image/png', $headers['Content-Type'] ); + $this->assertSame( '153204', $headers['Content-Length'] ); $this->assertSame( 200, wp_remote_retrieve_response_code( $response ) ); } @@ -30,7 +30,7 @@ public function test_head_request() { */ public function test_head_redirect() { // This URL will 301 redirect. - $url = 'https://asdftestblog1.wordpress.com/files/2007/09/2007-06-30-dsc_4700-1.jpg'; + $url = 'https://wp.org/screenshots/3.9/dashboard.png'; $response = wp_remote_head( $url ); $this->skipTestOnTimeout( $response ); @@ -41,7 +41,7 @@ public function test_head_redirect() { * @covers ::wp_remote_head */ public function test_head_404() { - $url = 'https://asdftestblog1.wordpress.com/wp-content/uploads/2007/09/awefasdfawef.jpg'; + $url = 'https://wordpress.org/screenshots/3.9/awefasdfawef.jpg'; $response = wp_remote_head( $url ); $this->skipTestOnTimeout( $response ); @@ -54,7 +54,7 @@ public function test_head_404() { * @covers ::wp_remote_retrieve_response_code */ public function test_get_request() { - $url = 'https://asdftestblog1.wordpress.com/wp-content/uploads/2007/09/2007-06-30-dsc_4700-1.jpg'; + $url = 'https://s.w.org/screenshots/3.9/dashboard.png'; $response = wp_remote_get( $url ); @@ -65,8 +65,8 @@ public function test_get_request() { $this->assertIsArray( $response ); // Should return the same headers as a HEAD request. - $this->assertSame( 'image/jpeg', $headers['Content-Type'] ); - $this->assertSame( '40148', $headers['Content-Length'] ); + $this->assertSame( 'image/png', $headers['Content-Type'] ); + $this->assertSame( '153204', $headers['Content-Length'] ); $this->assertSame( 200, wp_remote_retrieve_response_code( $response ) ); } @@ -76,8 +76,8 @@ public function test_get_request() { * @covers ::wp_remote_retrieve_response_code */ public function test_get_redirect() { - // This will redirect to asdftestblog1.files.wordpress.com. - $url = 'https://asdftestblog1.wordpress.com/files/2007/09/2007-06-30-dsc_4700-1.jpg'; + // This will redirect to wordpress.org. + $url = 'https://wp.org/screenshots/3.9/dashboard.png'; $response = wp_remote_get( $url ); @@ -86,8 +86,8 @@ public function test_get_redirect() { $headers = wp_remote_retrieve_headers( $response ); // Should return the same headers as a HEAD request. - $this->assertSame( 'image/jpeg', $headers['Content-Type'] ); - $this->assertSame( '40148', $headers['Content-Length'] ); + $this->assertSame( 'image/png', $headers['Content-Type'] ); + $this->assertSame( '153204', $headers['Content-Length'] ); $this->assertSame( 200, wp_remote_retrieve_response_code( $response ) ); } @@ -95,8 +95,8 @@ public function test_get_redirect() { * @covers ::wp_remote_get */ public function test_get_redirect_limit_exceeded() { - // This will redirect to asdftestblog1.files.wordpress.com. - $url = 'https://asdftestblog1.wordpress.com/files/2007/09/2007-06-30-dsc_4700-1.jpg'; + // This will redirect to wordpress.org. + $url = 'https://wp.org/screenshots/3.9/dashboard.png'; // Pretend we've already redirected 5 times. $response = wp_remote_get( $url, array( 'redirection' => -1 ) ); diff --git a/tests/phpunit/tests/image/functions.php b/tests/phpunit/tests/image/functions.php index 4f99caf740e63..e70d19c0327ba 100644 --- a/tests/phpunit/tests/image/functions.php +++ b/tests/phpunit/tests/image/functions.php @@ -638,7 +638,7 @@ public function test_wp_crop_image_with_file() { */ public function test_wp_crop_image_with_url() { $file = wp_crop_image( - 'https://asdftestblog1.wordpress.com/wp-content/uploads/2008/04/canola.jpg', + 'https://s.w.org/screenshots/3.9/dashboard.png', 0, 0, 100, @@ -646,7 +646,7 @@ public function test_wp_crop_image_with_url() { 100, 100, false, - DIR_TESTDATA . '/images/' . __FUNCTION__ . '.jpg' + DIR_TESTDATA . '/images/' . __FUNCTION__ . '.png' ); if ( is_wp_error( $file ) && $file->get_error_code() === 'invalid_image' ) { @@ -687,7 +687,7 @@ public function test_wp_crop_image_should_fail_with_wp_error_object_if_file_does */ public function test_wp_crop_image_should_fail_with_wp_error_object_if_url_does_not_exist() { $file = wp_crop_image( - 'https://asdftestblog1.wordpress.com/wp-content/uploads/2008/04/canoladoesnotexist.jpg', + 'https://wordpress.org/screenshots/3.9/canoladoesnotexist.jpg', 0, 0, 100, From 242f50f4d949fdda825d97678e2090dae0565b93 Mon Sep 17 00:00:00 2001 From: Tammie Lister Date: Fri, 5 Apr 2024 20:44:05 +0000 Subject: [PATCH 242/251] Twenty Twenty-Four: Fixes typo in testimonial pattern. There was a small typo which was in a string context only visible to translators for the testimonial pattern. This fixes that. Props shailu25, SergeyBiryukov. Fixes #60924. git-svn-id: https://develop.svn.wordpress.org/trunk@57932 602fd350-edb4-49c9-b593-d223f7449a82 --- .../themes/twentytwentyfour/patterns/testimonial-centered.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-content/themes/twentytwentyfour/patterns/testimonial-centered.php b/src/wp-content/themes/twentytwentyfour/patterns/testimonial-centered.php index 8e63924b28d3d..0f07d57c1fa91 100644 --- a/src/wp-content/themes/twentytwentyfour/patterns/testimonial-centered.php +++ b/src/wp-content/themes/twentytwentyfour/patterns/testimonial-centered.php @@ -8,7 +8,7 @@ */ ?> - +
    From 50b31d95d775c8e9344cd1bfb6898080c659f0af Mon Sep 17 00:00:00 2001 From: Aaron Jorbin Date: Fri, 5 Apr 2024 21:45:55 +0000 Subject: [PATCH 243/251] Media: Use flex-start for full browser support. The value of `start` is not fully supported by Opera Mini which has 1.01% usage. There is no material change in functionality with this change. Follow-up to [55919]. Props davidbaumwald, sabernhardt, khokansardar, devsahadat. Fixes #60876. git-svn-id: https://develop.svn.wordpress.org/trunk@57933 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/css/media.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-admin/css/media.css b/src/wp-admin/css/media.css index 18ba835b20205..78bb42d583942 100644 --- a/src/wp-admin/css/media.css +++ b/src/wp-admin/css/media.css @@ -1124,7 +1124,7 @@ border color while dragging a file over the uploader drop area */ .imgedit-panel-tools > .imgedit-menu { display: flex; column-gap: 4px; - align-items: start; + align-items: flex-start; flex-wrap: wrap; } From f21644014655205b0ddd0983a47d9e82da46312b Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sat, 6 Apr 2024 13:35:33 +0000 Subject: [PATCH 244/251] Coding Standards: Use strict comparison in `wp-includes/class-wp-image-editor-imagick.php`. Follow-up to [22094]. Props aristath, poena, afercia, SergeyBiryukov. See #60700. git-svn-id: https://develop.svn.wordpress.org/trunk@57934 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class-wp-image-editor-imagick.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/class-wp-image-editor-imagick.php b/src/wp-includes/class-wp-image-editor-imagick.php index 5de01d7322fd5..d38ee6fd631ee 100644 --- a/src/wp-includes/class-wp-image-editor-imagick.php +++ b/src/wp-includes/class-wp-image-editor-imagick.php @@ -342,7 +342,7 @@ public static function set_imagick_time_limit() { * @return true|WP_Error */ public function resize( $max_w, $max_h, $crop = false ) { - if ( ( $this->size['width'] == $max_w ) && ( $this->size['height'] == $max_h ) ) { + if ( ( $this->size['width'] === $max_w ) && ( $this->size['height'] === $max_h ) ) { return true; } From 3d2063c8f185c5ecfd79c41f0b98a0891f8a5f36 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 7 Apr 2024 11:16:06 +0000 Subject: [PATCH 245/251] HTTP API: Add support for a description for HTTP status code 425 (Too Early). Reference: [https://datatracker.ietf.org/doc/rfc8470/ RFC 8470: Using Early Data in HTTP]. Follow-up to [5446], [6104], [10740], [27422], [36274], [36294], [42207]. Props kkmuffme, mukesh27, joemcgill. Fixes #60942. git-svn-id: https://develop.svn.wordpress.org/trunk@57936 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class-wp-http.php | 1 + src/wp-includes/functions.php | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/wp-includes/class-wp-http.php b/src/wp-includes/class-wp-http.php index 48580680ba777..ea8adde0ba7c7 100644 --- a/src/wp-includes/class-wp-http.php +++ b/src/wp-includes/class-wp-http.php @@ -77,6 +77,7 @@ class WP_Http { const UNPROCESSABLE_ENTITY = 422; const LOCKED = 423; const FAILED_DEPENDENCY = 424; + const TOO_EARLY = 425; const UPGRADE_REQUIRED = 426; const PRECONDITION_REQUIRED = 428; const TOO_MANY_REQUESTS = 429; diff --git a/src/wp-includes/functions.php b/src/wp-includes/functions.php index 5a5435d33ff18..ae18925c62064 100644 --- a/src/wp-includes/functions.php +++ b/src/wp-includes/functions.php @@ -1347,6 +1347,7 @@ function wp( $query_vars = '' ) { * @since 3.9.0 Added status codes 418, 428, 429, 431, and 511. * @since 4.5.0 Added status codes 308, 421, and 451. * @since 5.1.0 Added status code 103. + * @since 6.5.0 Added status code 425. * * @global array $wp_header_to_desc * @@ -1408,6 +1409,7 @@ function get_status_header_desc( $code ) { 422 => 'Unprocessable Entity', 423 => 'Locked', 424 => 'Failed Dependency', + 425 => 'Too Early', 426 => 'Upgrade Required', 428 => 'Precondition Required', 429 => 'Too Many Requests', From 9b70a33d7ee6f6772b20f9e15c63606b1c61f4d6 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 7 Apr 2024 11:20:57 +0000 Subject: [PATCH 246/251] Docs: Correct `@since` version for status code 425 in `get_status_header_desc()`. Follow-up to [57936]. See #60942. git-svn-id: https://develop.svn.wordpress.org/trunk@57937 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/functions.php b/src/wp-includes/functions.php index ae18925c62064..b85036cb956bf 100644 --- a/src/wp-includes/functions.php +++ b/src/wp-includes/functions.php @@ -1347,7 +1347,7 @@ function wp( $query_vars = '' ) { * @since 3.9.0 Added status codes 418, 428, 429, 431, and 511. * @since 4.5.0 Added status codes 308, 421, and 451. * @since 5.1.0 Added status code 103. - * @since 6.5.0 Added status code 425. + * @since 6.6.0 Added status code 425. * * @global array $wp_header_to_desc * From 18db904c293f43f5e928b74835d0969cd60c1e2e Mon Sep 17 00:00:00 2001 From: Peter Wilson Date: Sun, 7 Apr 2024 23:51:57 +0000 Subject: [PATCH 247/251] Script Loader: Improve asset concatenation Etags. Include the asset version of JavaScript and CSS files when generating the ETag for concatenated assets in `load-scripts.php` and `load-styles.php`. This ensures the ETag is updated as script versions change (for example editor package updates) rather than only when the WordPress version changes. The `W\` prefix is added to the generated ETag to allow for CDNs and proxy servers modifying the script to add or improve the compression algorithm. Props azaozz, dav4, ironprogrammer, johnbillion, kkmuffme, monzuralam, peterwilsoncc, sergeybiryukov. Fixes #58433. git-svn-id: https://develop.svn.wordpress.org/trunk@57943 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/load-scripts.php | 23 +++++++++++++++++++++-- src/wp-admin/load-styles.php | 23 +++++++++++++++++++++-- 2 files changed, 42 insertions(+), 4 deletions(-) diff --git a/src/wp-admin/load-scripts.php b/src/wp-admin/load-scripts.php index 5675b86570038..c7c952f6514eb 100644 --- a/src/wp-admin/load-scripts.php +++ b/src/wp-admin/load-scripts.php @@ -45,7 +45,26 @@ wp_default_packages_vendor( $wp_scripts ); wp_default_packages_scripts( $wp_scripts ); -if ( isset( $_SERVER['HTTP_IF_NONE_MATCH'] ) && stripslashes( $_SERVER['HTTP_IF_NONE_MATCH'] ) === $wp_version ) { +$etag = "WP:{$wp_version};"; + +foreach ( $load as $handle ) { + if ( ! array_key_exists( $handle, $wp_scripts->registered ) ) { + continue; + } + + $ver = $wp_scripts->registered[ $handle ]->ver ? $wp_scripts->registered[ $handle ]->ver : $wp_version; + $etag .= "{$handle}:{$ver};"; +} + +/* + * This is not intended to be cryptographically secure, just a fast way to get + * a fixed length string based on the script versions. As this file does not + * load the full WordPress environment, it is not possible to use the salted + * wp_hash() function. + */ +$etag = 'W/"' . md5( $etag ) . '"'; + +if ( isset( $_SERVER['HTTP_IF_NONE_MATCH'] ) && stripslashes( $_SERVER['HTTP_IF_NONE_MATCH'] ) === $etag ) { header( "$protocol 304 Not Modified" ); exit; } @@ -59,7 +78,7 @@ $out .= get_file( $path ) . "\n"; } -header( "Etag: $wp_version" ); +header( "Etag: $etag" ); header( 'Content-Type: application/javascript; charset=UTF-8' ); header( 'Expires: ' . gmdate( 'D, d M Y H:i:s', time() + $expires_offset ) . ' GMT' ); header( "Cache-Control: public, max-age=$expires_offset" ); diff --git a/src/wp-admin/load-styles.php b/src/wp-admin/load-styles.php index fe4a4ee66e451..9fd0fc1f034cf 100644 --- a/src/wp-admin/load-styles.php +++ b/src/wp-admin/load-styles.php @@ -48,7 +48,26 @@ $wp_styles = new WP_Styles(); wp_default_styles( $wp_styles ); -if ( isset( $_SERVER['HTTP_IF_NONE_MATCH'] ) && stripslashes( $_SERVER['HTTP_IF_NONE_MATCH'] ) === $wp_version ) { +$etag = "WP:{$wp_version};"; + +foreach ( $load as $handle ) { + if ( ! array_key_exists( $handle, $wp_styles->registered ) ) { + continue; + } + + $ver = $wp_styles->registered[ $handle ]->ver ? $wp_styles->registered[ $handle ]->ver : $wp_version; + $etag .= "{$handle}:{$ver};"; +} + +/* + * This is not intended to be cryptographically secure, just a fast way to get + * a fixed length string based on the script versions. As this file does not + * load the full WordPress environment, it is not possible to use the salted + * wp_hash() function. + */ +$etag = 'W/"' . md5( $etag ) . '"'; + +if ( isset( $_SERVER['HTTP_IF_NONE_MATCH'] ) && stripslashes( $_SERVER['HTTP_IF_NONE_MATCH'] ) === $etag ) { header( "$protocol 304 Not Modified" ); exit; } @@ -84,7 +103,7 @@ } } -header( "Etag: $wp_version" ); +header( "Etag: $etag" ); header( 'Content-Type: text/css; charset=UTF-8' ); header( 'Expires: ' . gmdate( 'D, d M Y H:i:s', time() + $expires_offset ) . ' GMT' ); header( "Cache-Control: public, max-age=$expires_offset" ); From f18c917f6d9aee873513ab8ae531d670a865e638 Mon Sep 17 00:00:00 2001 From: Jorge Costa Date: Mon, 8 Apr 2024 16:45:22 +0000 Subject: [PATCH 248/251] Honor template_hierarchy filters when creating a template in the Site Editor. Currently, in blocks themes it's possible to use the ${type}_template_hierarchy filter to alter the template hierarchy. However, those filters are not taken into consideration by the Choose a pattern popup screen that appears when creating a new template in the Site Editor, causing a mismatch between the editor and the frontend. Props aljullu, mukesh27, ntsekouras, jorgefilipecosta, gziolo. Fixes #60846. git-svn-id: https://develop.svn.wordpress.org/trunk@57944 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/block-template-utils.php | 21 ++++++++++++++++--- .../block-templates/getTemplateHierarchy.php | 14 +++++++++++++ 2 files changed, 32 insertions(+), 3 deletions(-) diff --git a/src/wp-includes/block-template-utils.php b/src/wp-includes/block-template-utils.php index bd8dfeefb2dea..6062b1ccbfd1c 100644 --- a/src/wp-includes/block-template-utils.php +++ b/src/wp-includes/block-template-utils.php @@ -1397,13 +1397,16 @@ function wp_generate_block_templates_export_file() { */ function get_template_hierarchy( $slug, $is_custom = false, $template_prefix = '' ) { if ( 'index' === $slug ) { - return array( 'index' ); + /** This filter is documented in wp-includes/template.php */ + return apply_filters( 'index_template_hierarchy', array( 'index' ) ); } if ( $is_custom ) { - return array( 'page', 'singular', 'index' ); + /** This filter is documented in wp-includes/template.php */ + return apply_filters( 'page_template_hierarchy', array( 'page', 'singular', 'index' ) ); } if ( 'front-page' === $slug ) { - return array( 'front-page', 'home', 'index' ); + /** This filter is documented in wp-includes/template.php */ + return apply_filters( 'frontpage_template_hierarchy', array( 'front-page', 'home', 'index' ) ); } $matches = array(); @@ -1469,6 +1472,18 @@ function get_template_hierarchy( $slug, $is_custom = false, $template_prefix = ' $template_hierarchy[] = 'singular'; } $template_hierarchy[] = 'index'; + + $template_type = ''; + if ( ! empty( $template_prefix ) ) { + list( $template_type ) = explode( '-', $template_prefix ); + } else { + list( $template_type ) = explode( '-', $slug ); + } + $valid_template_types = array( '404', 'archive', 'attachment', 'author', 'category', 'date', 'embed', 'frontpage', 'home', 'index', 'page', 'paged', 'privacypolicy', 'search', 'single', 'singular', 'tag', 'taxonomy' ); + if ( in_array( $template_type, $valid_template_types ) ) { + /** This filter is documented in wp-includes/template.php */ + return apply_filters( "{$template_type}_template_hierarchy", $template_hierarchy ); + } return $template_hierarchy; } diff --git a/tests/phpunit/tests/block-templates/getTemplateHierarchy.php b/tests/phpunit/tests/block-templates/getTemplateHierarchy.php index fab91786650bf..1a22e04aa60e7 100644 --- a/tests/phpunit/tests/block-templates/getTemplateHierarchy.php +++ b/tests/phpunit/tests/block-templates/getTemplateHierarchy.php @@ -40,6 +40,20 @@ public function test_get_template_hierarchy( array $args, array $expected ) { $this->assertSame( $expected, get_template_hierarchy( ...$args ) ); } + /** + * @ticket 60846 + */ + public function test_get_template_hierarchy_with_hooks() { + add_filter( + 'date_template_hierarchy', + function ( $templates ) { + return array_merge( array( 'date-custom' ), $templates ); + } + ); + $expected = array( 'date-custom', 'date', 'archive', 'index' ); + $this->assertSame( $expected, get_template_hierarchy( 'date' ) ); + } + /** * Data provider. * From 6ef8cf9bf881ef9eb3e868dd082d29be6403a368 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 8 Apr 2024 19:19:08 +0000 Subject: [PATCH 249/251] Twenty Twenty-Four: Remove pattern from home template to improve performance. Creating the Home Business pattern was needed to show it on the template replacement flows, but there's no need to use it in the template, and the minor code repetition is better than having to do a an extra pattern replacement. Follow-up to [https://github.com/WordPress/twentytwentyfour/pull/486 PR #486]. Props onemaggie, youknowriad, poena, afercia. Fixes #60620. git-svn-id: https://develop.svn.wordpress.org/trunk@57945 602fd350-edb4-49c9-b593-d223f7449a82 --- .../themes/twentytwentyfour/templates/home.html | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/wp-content/themes/twentytwentyfour/templates/home.html b/src/wp-content/themes/twentytwentyfour/templates/home.html index 7c364b8558277..196f82e05e698 100644 --- a/src/wp-content/themes/twentytwentyfour/templates/home.html +++ b/src/wp-content/themes/twentytwentyfour/templates/home.html @@ -1 +1,9 @@ - + + + +
    + +
    + + + From 1393dc25b54479314acd2162fc39befd84dc46eb Mon Sep 17 00:00:00 2001 From: Jorge Costa Date: Mon, 8 Apr 2024 21:40:02 +0000 Subject: [PATCH 250/251] Coding Standards: Fix missing strict in_array on block-template-utils.php. Props swissspidy. git-svn-id: https://develop.svn.wordpress.org/trunk@57946 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/block-template-utils.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/block-template-utils.php b/src/wp-includes/block-template-utils.php index 6062b1ccbfd1c..ea064eec41518 100644 --- a/src/wp-includes/block-template-utils.php +++ b/src/wp-includes/block-template-utils.php @@ -1480,7 +1480,7 @@ function get_template_hierarchy( $slug, $is_custom = false, $template_prefix = ' list( $template_type ) = explode( '-', $slug ); } $valid_template_types = array( '404', 'archive', 'attachment', 'author', 'category', 'date', 'embed', 'frontpage', 'home', 'index', 'page', 'paged', 'privacypolicy', 'search', 'single', 'singular', 'tag', 'taxonomy' ); - if ( in_array( $template_type, $valid_template_types ) ) { + if ( in_array( $template_type, $valid_template_types, true ) ) { /** This filter is documented in wp-includes/template.php */ return apply_filters( "{$template_type}_template_hierarchy", $template_hierarchy ); } From bf19f16adc263f47385c0dfe706b0295a9e92695 Mon Sep 17 00:00:00 2001 From: Isabel Brison Date: Tue, 9 Apr 2024 07:18:41 +0000 Subject: [PATCH 251/251] =?UTF-8?q?Editor:=20skip=20outputting=20base=20la?= =?UTF-8?q?yout=20rules=20if=20content=20and=20wide=20size=20values=20don?= =?UTF-8?q?=E2=80=99t=20exist.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Skip outputting layout rules that reference content and wide sizes CSS variables, if no layout sizes exist in the current `theme.json`. Props andrewserong. Fixes #60936. git-svn-id: https://develop.svn.wordpress.org/trunk@57948 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class-wp-theme-json.php | 11 +++ tests/phpunit/tests/theme/wpThemeJson.php | 107 ++++++++++++++++------ 2 files changed, 88 insertions(+), 30 deletions(-) diff --git a/src/wp-includes/class-wp-theme-json.php b/src/wp-includes/class-wp-theme-json.php index d754da957a76a..7ab626ce8f96e 100644 --- a/src/wp-includes/class-wp-theme-json.php +++ b/src/wp-includes/class-wp-theme-json.php @@ -1388,6 +1388,7 @@ protected function get_block_classes( $style_nodes ) { * * @since 6.1.0 * @since 6.3.0 Reduced specificity for layout margin rules. + * @since 6.5.1 Only output rules referencing content and wide sizes when values exist. * * @param array $block_metadata Metadata about the block to get styles for. * @return string Layout styles for the block. @@ -1548,6 +1549,16 @@ protected function get_layout_styles( $block_metadata ) { ! empty( $base_style_rule['rules'] ) ) { foreach ( $base_style_rule['rules'] as $css_property => $css_value ) { + // Skip rules that reference content size or wide size if they are not defined in the theme.json. + if ( + is_string( $css_value ) && + ( str_contains( $css_value, '--global--content-size' ) || str_contains( $css_value, '--global--wide-size' ) ) && + ! isset( $this->theme_json['settings']['layout']['contentSize'] ) && + ! isset( $this->theme_json['settings']['layout']['wideSize'] ) + ) { + continue; + } + if ( static::is_safe_css_declaration( $css_property, $css_value ) ) { $declarations[] = array( 'name' => $css_property, diff --git a/tests/phpunit/tests/theme/wpThemeJson.php b/tests/phpunit/tests/theme/wpThemeJson.php index 3a72c72981beb..15a25825e1af7 100644 --- a/tests/phpunit/tests/theme/wpThemeJson.php +++ b/tests/phpunit/tests/theme/wpThemeJson.php @@ -393,6 +393,7 @@ public function test_get_settings_appearance_false_does_not_opt_in() { * @ticket 58549 * @ticket 58550 * @ticket 60365 + * @ticket 60936 */ public function test_get_stylesheet() { $theme_json = new WP_Theme_JSON( @@ -558,7 +559,7 @@ public function test_get_stylesheet() { ); $variables = 'body{--wp--preset--color--grey: grey;--wp--preset--gradient--custom-gradient: linear-gradient(135deg,rgba(0,0,0) 0%,rgb(0,0,0) 100%);--wp--preset--font-size--small: 14px;--wp--preset--font-size--big: 41px;--wp--preset--font-family--arial: Arial, serif;}.wp-block-group{--wp--custom--base-font: 16;--wp--custom--line-height--small: 1.2;--wp--custom--line-height--medium: 1.4;--wp--custom--line-height--large: 1.8;}'; - $styles = 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){max-width: var(--wp--style--global--content-size);margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignwide{max-width: var(--wp--style--global--wide-size);}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}body{color: var(--wp--preset--color--grey);}a:where(:not(.wp-element-button)){background-color: #333;color: #111;}.wp-element-button, .wp-block-button__link{box-shadow: 10px 10px 5px 0px rgba(0,0,0,0.66);}.wp-block-cover{min-height: unset;aspect-ratio: 16/9;}.wp-block-group{background: var(--wp--preset--gradient--custom-gradient);border-radius: 10px;min-height: 50vh;padding: 24px;}.wp-block-group a:where(:not(.wp-element-button)){color: #111;}.wp-block-heading{color: #123456;}.wp-block-heading a:where(:not(.wp-element-button)){background-color: #333;color: #111;font-size: 60px;}.wp-block-post-date{color: #123456;}.wp-block-post-date a:where(:not(.wp-element-button)){background-color: #777;color: #555;}.wp-block-post-excerpt{column-count: 2;}.wp-block-image{margin-bottom: 30px;}.wp-block-image img, .wp-block-image .wp-block-image__crop-area, .wp-block-image .components-placeholder{border-top-left-radius: 10px;border-bottom-right-radius: 1em;}.wp-block-image img, .wp-block-image .components-placeholder{filter: var(--wp--preset--duotone--custom-duotone);}'; + $styles = 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){margin-left: auto !important;margin-right: auto !important;}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}body{color: var(--wp--preset--color--grey);}a:where(:not(.wp-element-button)){background-color: #333;color: #111;}.wp-element-button, .wp-block-button__link{box-shadow: 10px 10px 5px 0px rgba(0,0,0,0.66);}.wp-block-cover{min-height: unset;aspect-ratio: 16/9;}.wp-block-group{background: var(--wp--preset--gradient--custom-gradient);border-radius: 10px;min-height: 50vh;padding: 24px;}.wp-block-group a:where(:not(.wp-element-button)){color: #111;}.wp-block-heading{color: #123456;}.wp-block-heading a:where(:not(.wp-element-button)){background-color: #333;color: #111;font-size: 60px;}.wp-block-post-date{color: #123456;}.wp-block-post-date a:where(:not(.wp-element-button)){background-color: #777;color: #555;}.wp-block-post-excerpt{column-count: 2;}.wp-block-image{margin-bottom: 30px;}.wp-block-image img, .wp-block-image .wp-block-image__crop-area, .wp-block-image .components-placeholder{border-top-left-radius: 10px;border-bottom-right-radius: 1em;}.wp-block-image img, .wp-block-image .components-placeholder{filter: var(--wp--preset--duotone--custom-duotone);}'; $presets = '.has-grey-color{color: var(--wp--preset--color--grey) !important;}.has-grey-background-color{background-color: var(--wp--preset--color--grey) !important;}.has-grey-border-color{border-color: var(--wp--preset--color--grey) !important;}.has-custom-gradient-gradient-background{background: var(--wp--preset--gradient--custom-gradient) !important;}.has-small-font-size{font-size: var(--wp--preset--font-size--small) !important;}.has-big-font-size{font-size: var(--wp--preset--font-size--big) !important;}.has-arial-font-family{font-family: var(--wp--preset--font-family--arial) !important;}'; $all = $variables . $styles . $presets; @@ -571,6 +572,7 @@ public function test_get_stylesheet() { /** * @ticket 54336 * @ticket 58550 + * @ticket 60936 */ public function test_get_stylesheet_support_for_shorthand_and_longhand_values() { $theme_json = new WP_Theme_JSON( @@ -608,7 +610,7 @@ public function test_get_stylesheet_support_for_shorthand_and_longhand_values() ) ); - $styles = 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){max-width: var(--wp--style--global--content-size);margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignwide{max-width: var(--wp--style--global--wide-size);}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}.wp-block-group{border-radius: 10px;margin: 1em;padding: 24px;}.wp-block-image{margin-bottom: 30px;padding-top: 15px;}.wp-block-image img, .wp-block-image .wp-block-image__crop-area, .wp-block-image .components-placeholder{border-top-left-radius: 10px;border-bottom-right-radius: 1em;}'; + $styles = 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){margin-left: auto !important;margin-right: auto !important;}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}.wp-block-group{border-radius: 10px;margin: 1em;padding: 24px;}.wp-block-image{margin-bottom: 30px;padding-top: 15px;}.wp-block-image img, .wp-block-image .wp-block-image__crop-area, .wp-block-image .components-placeholder{border-top-left-radius: 10px;border-bottom-right-radius: 1em;}'; $this->assertSame( $styles, $theme_json->get_stylesheet() ); $this->assertSame( $styles, $theme_json->get_stylesheet( array( 'styles' ) ) ); } @@ -616,6 +618,7 @@ public function test_get_stylesheet_support_for_shorthand_and_longhand_values() /** * @ticket 54336 * @ticket 58550 + * @ticket 60936 */ public function test_get_stylesheet_skips_disabled_protected_properties() { $theme_json = new WP_Theme_JSON( @@ -641,7 +644,7 @@ public function test_get_stylesheet_skips_disabled_protected_properties() { ) ); - $expected = 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){max-width: var(--wp--style--global--content-size);margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignwide{max-width: var(--wp--style--global--wide-size);}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}:where(.wp-block-columns.is-layout-flex){gap: 2em;}:where(.wp-block-columns.is-layout-grid){gap: 2em;}'; + $expected = 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){margin-left: auto !important;margin-right: auto !important;}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}:where(.wp-block-columns.is-layout-flex){gap: 2em;}:where(.wp-block-columns.is-layout-grid){gap: 2em;}'; $this->assertSame( $expected, $theme_json->get_stylesheet() ); $this->assertSame( $expected, $theme_json->get_stylesheet( array( 'styles' ) ) ); } @@ -650,6 +653,7 @@ public function test_get_stylesheet_skips_disabled_protected_properties() { * @ticket 54336 * @ticket 58548 * @ticket 58550 + * @ticket 60936 */ public function test_get_stylesheet_renders_enabled_protected_properties() { $theme_json = new WP_Theme_JSON( @@ -668,7 +672,7 @@ public function test_get_stylesheet_renders_enabled_protected_properties() { ) ); - $expected = 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.wp-site-blocks) > * { margin-block-start: 1em; margin-block-end: 0; }:where(.wp-site-blocks) > :first-child:first-child { margin-block-start: 0; }:where(.wp-site-blocks) > :last-child:last-child { margin-block-end: 0; }body { --wp--style--block-gap: 1em; }:where(body .is-layout-flow) > :first-child:first-child{margin-block-start: 0;}:where(body .is-layout-flow) > :last-child:last-child{margin-block-end: 0;}:where(body .is-layout-flow) > *{margin-block-start: 1em;margin-block-end: 0;}:where(body .is-layout-constrained) > :first-child:first-child{margin-block-start: 0;}:where(body .is-layout-constrained) > :last-child:last-child{margin-block-end: 0;}:where(body .is-layout-constrained) > *{margin-block-start: 1em;margin-block-end: 0;}:where(body .is-layout-flex) {gap: 1em;}:where(body .is-layout-grid) {gap: 1em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){max-width: var(--wp--style--global--content-size);margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignwide{max-width: var(--wp--style--global--wide-size);}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}'; + $expected = 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.wp-site-blocks) > * { margin-block-start: 1em; margin-block-end: 0; }:where(.wp-site-blocks) > :first-child:first-child { margin-block-start: 0; }:where(.wp-site-blocks) > :last-child:last-child { margin-block-end: 0; }body { --wp--style--block-gap: 1em; }:where(body .is-layout-flow) > :first-child:first-child{margin-block-start: 0;}:where(body .is-layout-flow) > :last-child:last-child{margin-block-end: 0;}:where(body .is-layout-flow) > *{margin-block-start: 1em;margin-block-end: 0;}:where(body .is-layout-constrained) > :first-child:first-child{margin-block-start: 0;}:where(body .is-layout-constrained) > :last-child:last-child{margin-block-end: 0;}:where(body .is-layout-constrained) > *{margin-block-start: 1em;margin-block-end: 0;}:where(body .is-layout-flex) {gap: 1em;}:where(body .is-layout-grid) {gap: 1em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){margin-left: auto !important;margin-right: auto !important;}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}'; $this->assertSame( $expected, $theme_json->get_stylesheet() ); $this->assertSame( $expected, $theme_json->get_stylesheet( array( 'styles' ) ) ); } @@ -708,6 +712,7 @@ public function test_get_stylesheet_preset_classes_work_with_compounded_selector * @ticket 53175 * @ticket 54336 * @ticket 58550 + * @ticket 60936 */ public function test_get_stylesheet_preset_rules_come_after_block_rules() { $theme_json = new WP_Theme_JSON( @@ -739,7 +744,7 @@ public function test_get_stylesheet_preset_rules_come_after_block_rules() { ) ); - $styles = 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){max-width: var(--wp--style--global--content-size);margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignwide{max-width: var(--wp--style--global--wide-size);}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}.wp-block-group{color: red;}'; + $styles = 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){margin-left: auto !important;margin-right: auto !important;}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}.wp-block-group{color: red;}'; $presets = '.wp-block-group.has-grey-color{color: var(--wp--preset--color--grey) !important;}.wp-block-group.has-grey-background-color{background-color: var(--wp--preset--color--grey) !important;}.wp-block-group.has-grey-border-color{border-color: var(--wp--preset--color--grey) !important;}'; $variables = '.wp-block-group{--wp--preset--color--grey: grey;}'; @@ -800,6 +805,7 @@ public function test_get_stylesheet_generates_proper_classes_and_css_vars_from_s * @ticket 53175 * @ticket 54336 * @ticket 58550 + * @ticket 60936 */ public function test_get_stylesheet_preset_values_are_marked_as_important() { $theme_json = new WP_Theme_JSON( @@ -834,7 +840,7 @@ public function test_get_stylesheet_preset_values_are_marked_as_important() { ); $this->assertSame( - 'body{--wp--preset--color--grey: grey;}body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){max-width: var(--wp--style--global--content-size);margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignwide{max-width: var(--wp--style--global--wide-size);}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}p{background-color: blue;color: red;font-size: 12px;line-height: 1.3;}.has-grey-color{color: var(--wp--preset--color--grey) !important;}.has-grey-background-color{background-color: var(--wp--preset--color--grey) !important;}.has-grey-border-color{border-color: var(--wp--preset--color--grey) !important;}', + 'body{--wp--preset--color--grey: grey;}body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){margin-left: auto !important;margin-right: auto !important;}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}p{background-color: blue;color: red;font-size: 12px;line-height: 1.3;}.has-grey-color{color: var(--wp--preset--color--grey) !important;}.has-grey-background-color{background-color: var(--wp--preset--color--grey) !important;}.has-grey-border-color{border-color: var(--wp--preset--color--grey) !important;}', $theme_json->get_stylesheet() ); } @@ -842,6 +848,7 @@ public function test_get_stylesheet_preset_values_are_marked_as_important() { /** * @ticket 56467 * @ticket 58550 + * @ticket 60936 */ public function test_get_stylesheet_handles_whitelisted_element_pseudo_selectors() { $theme_json = new WP_Theme_JSON( @@ -876,7 +883,7 @@ public function test_get_stylesheet_handles_whitelisted_element_pseudo_selectors ) ); - $base_styles = 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){max-width: var(--wp--style--global--content-size);margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignwide{max-width: var(--wp--style--global--wide-size);}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}'; + $base_styles = 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){margin-left: auto !important;margin-right: auto !important;}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}'; $element_styles = 'a:where(:not(.wp-element-button)){background-color: red;color: green;}a:where(:not(.wp-element-button)):hover{background-color: green;color: red;font-size: 10em;text-transform: uppercase;}a:where(:not(.wp-element-button)):focus{background-color: black;color: yellow;}'; @@ -889,6 +896,7 @@ public function test_get_stylesheet_handles_whitelisted_element_pseudo_selectors /** * @ticket 56467 * @ticket 58550 + * @ticket 60936 */ public function test_get_stylesheet_handles_only_pseudo_selector_rules_for_given_property() { $theme_json = new WP_Theme_JSON( @@ -919,7 +927,7 @@ public function test_get_stylesheet_handles_only_pseudo_selector_rules_for_given ) ); - $base_styles = 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){max-width: var(--wp--style--global--content-size);margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignwide{max-width: var(--wp--style--global--wide-size);}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}'; + $base_styles = 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){margin-left: auto !important;margin-right: auto !important;}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}'; $element_styles = 'a:where(:not(.wp-element-button)):hover{background-color: green;color: red;font-size: 10em;text-transform: uppercase;}a:where(:not(.wp-element-button)):focus{background-color: black;color: yellow;}'; @@ -932,6 +940,7 @@ public function test_get_stylesheet_handles_only_pseudo_selector_rules_for_given /** * @ticket 56467 * @ticket 58550 + * @ticket 60936 */ public function test_get_stylesheet_ignores_pseudo_selectors_on_non_whitelisted_elements() { $theme_json = new WP_Theme_JSON( @@ -962,7 +971,7 @@ public function test_get_stylesheet_ignores_pseudo_selectors_on_non_whitelisted_ ) ); - $base_styles = 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){max-width: var(--wp--style--global--content-size);margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignwide{max-width: var(--wp--style--global--wide-size);}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}'; + $base_styles = 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){margin-left: auto !important;margin-right: auto !important;}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}'; $element_styles = 'h4{background-color: red;color: green;}'; @@ -975,6 +984,7 @@ public function test_get_stylesheet_ignores_pseudo_selectors_on_non_whitelisted_ /** * @ticket 56467 * @ticket 58550 + * @ticket 60936 */ public function test_get_stylesheet_ignores_non_whitelisted_pseudo_selectors() { $theme_json = new WP_Theme_JSON( @@ -1005,7 +1015,7 @@ public function test_get_stylesheet_ignores_non_whitelisted_pseudo_selectors() { ) ); - $base_styles = 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){max-width: var(--wp--style--global--content-size);margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignwide{max-width: var(--wp--style--global--wide-size);}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}'; + $base_styles = 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){margin-left: auto !important;margin-right: auto !important;}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}'; $element_styles = 'a:where(:not(.wp-element-button)){background-color: red;color: green;}a:where(:not(.wp-element-button)):hover{background-color: green;color: red;}'; @@ -1019,6 +1029,7 @@ public function test_get_stylesheet_ignores_non_whitelisted_pseudo_selectors() { /** * @ticket 56467 * @ticket 58550 + * @ticket 60936 */ public function test_get_stylesheet_handles_priority_of_elements_vs_block_elements_pseudo_selectors() { $theme_json = new WP_Theme_JSON( @@ -1057,7 +1068,7 @@ public function test_get_stylesheet_handles_priority_of_elements_vs_block_elemen ) ); - $base_styles = 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){max-width: var(--wp--style--global--content-size);margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignwide{max-width: var(--wp--style--global--wide-size);}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}'; + $base_styles = 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){margin-left: auto !important;margin-right: auto !important;}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}'; $element_styles = '.wp-block-group a:where(:not(.wp-element-button)){background-color: red;color: green;}.wp-block-group a:where(:not(.wp-element-button)):hover{background-color: green;color: red;font-size: 10em;text-transform: uppercase;}.wp-block-group a:where(:not(.wp-element-button)):focus{background-color: black;color: yellow;}'; @@ -1070,6 +1081,7 @@ public function test_get_stylesheet_handles_priority_of_elements_vs_block_elemen /** * @ticket 56467 * @ticket 58550 + * @ticket 60936 */ public function test_get_stylesheet_handles_whitelisted_block_level_element_pseudo_selectors() { $theme_json = new WP_Theme_JSON( @@ -1108,7 +1120,7 @@ public function test_get_stylesheet_handles_whitelisted_block_level_element_pseu ) ); - $base_styles = 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){max-width: var(--wp--style--global--content-size);margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignwide{max-width: var(--wp--style--global--wide-size);}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}'; + $base_styles = 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){margin-left: auto !important;margin-right: auto !important;}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}'; $element_styles = 'a:where(:not(.wp-element-button)){background-color: red;color: green;}a:where(:not(.wp-element-button)):hover{background-color: green;color: red;}.wp-block-group a:where(:not(.wp-element-button)):hover{background-color: black;color: yellow;}'; @@ -1122,12 +1134,17 @@ public function test_get_stylesheet_handles_whitelisted_block_level_element_pseu * @ticket 56467 * @ticket 58548 * @ticket 58550 + * @ticket 60936 */ public function test_get_stylesheet_generates_layout_styles() { $theme_json = new WP_Theme_JSON( array( 'version' => WP_Theme_JSON::LATEST_SCHEMA, 'settings' => array( + 'layout' => array( + 'contentSize' => '640px', + 'wideSize' => '1200px', + ), 'spacing' => array( 'blockGap' => true, ), @@ -1143,7 +1160,7 @@ public function test_get_stylesheet_generates_layout_styles() { // Results also include root site blocks styles. $this->assertSame( - 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.wp-site-blocks) > * { margin-block-start: 1em; margin-block-end: 0; }:where(.wp-site-blocks) > :first-child:first-child { margin-block-start: 0; }:where(.wp-site-blocks) > :last-child:last-child { margin-block-end: 0; }body { --wp--style--block-gap: 1em; }:where(body .is-layout-flow) > :first-child:first-child{margin-block-start: 0;}:where(body .is-layout-flow) > :last-child:last-child{margin-block-end: 0;}:where(body .is-layout-flow) > *{margin-block-start: 1em;margin-block-end: 0;}:where(body .is-layout-constrained) > :first-child:first-child{margin-block-start: 0;}:where(body .is-layout-constrained) > :last-child:last-child{margin-block-end: 0;}:where(body .is-layout-constrained) > *{margin-block-start: 1em;margin-block-end: 0;}:where(body .is-layout-flex) {gap: 1em;}:where(body .is-layout-grid) {gap: 1em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){max-width: var(--wp--style--global--content-size);margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignwide{max-width: var(--wp--style--global--wide-size);}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}', + 'body { margin: 0;--wp--style--global--content-size: 640px;--wp--style--global--wide-size: 1200px; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.wp-site-blocks) > * { margin-block-start: 1em; margin-block-end: 0; }:where(.wp-site-blocks) > :first-child:first-child { margin-block-start: 0; }:where(.wp-site-blocks) > :last-child:last-child { margin-block-end: 0; }body { --wp--style--block-gap: 1em; }:where(body .is-layout-flow) > :first-child:first-child{margin-block-start: 0;}:where(body .is-layout-flow) > :last-child:last-child{margin-block-end: 0;}:where(body .is-layout-flow) > *{margin-block-start: 1em;margin-block-end: 0;}:where(body .is-layout-constrained) > :first-child:first-child{margin-block-start: 0;}:where(body .is-layout-constrained) > :last-child:last-child{margin-block-end: 0;}:where(body .is-layout-constrained) > *{margin-block-start: 1em;margin-block-end: 0;}:where(body .is-layout-flex) {gap: 1em;}:where(body .is-layout-grid) {gap: 1em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){max-width: var(--wp--style--global--content-size);margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignwide{max-width: var(--wp--style--global--wide-size);}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}', $theme_json->get_stylesheet( array( 'styles' ) ) ); } @@ -1152,12 +1169,17 @@ public function test_get_stylesheet_generates_layout_styles() { * @ticket 56467 * @ticket 58548 * @ticket 58550 + * @ticket 60936 */ public function test_get_stylesheet_generates_layout_styles_with_spacing_presets() { $theme_json = new WP_Theme_JSON( array( 'version' => WP_Theme_JSON::LATEST_SCHEMA, 'settings' => array( + 'layout' => array( + 'contentSize' => '640px', + 'wideSize' => '1200px', + ), 'spacing' => array( 'blockGap' => true, ), @@ -1173,7 +1195,7 @@ public function test_get_stylesheet_generates_layout_styles_with_spacing_presets // Results also include root site blocks styles. $this->assertSame( - 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.wp-site-blocks) > * { margin-block-start: var(--wp--preset--spacing--60); margin-block-end: 0; }:where(.wp-site-blocks) > :first-child:first-child { margin-block-start: 0; }:where(.wp-site-blocks) > :last-child:last-child { margin-block-end: 0; }body { --wp--style--block-gap: var(--wp--preset--spacing--60); }:where(body .is-layout-flow) > :first-child:first-child{margin-block-start: 0;}:where(body .is-layout-flow) > :last-child:last-child{margin-block-end: 0;}:where(body .is-layout-flow) > *{margin-block-start: var(--wp--preset--spacing--60);margin-block-end: 0;}:where(body .is-layout-constrained) > :first-child:first-child{margin-block-start: 0;}:where(body .is-layout-constrained) > :last-child:last-child{margin-block-end: 0;}:where(body .is-layout-constrained) > *{margin-block-start: var(--wp--preset--spacing--60);margin-block-end: 0;}:where(body .is-layout-flex) {gap: var(--wp--preset--spacing--60);}:where(body .is-layout-grid) {gap: var(--wp--preset--spacing--60);}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){max-width: var(--wp--style--global--content-size);margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignwide{max-width: var(--wp--style--global--wide-size);}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}', + 'body { margin: 0;--wp--style--global--content-size: 640px;--wp--style--global--wide-size: 1200px; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.wp-site-blocks) > * { margin-block-start: var(--wp--preset--spacing--60); margin-block-end: 0; }:where(.wp-site-blocks) > :first-child:first-child { margin-block-start: 0; }:where(.wp-site-blocks) > :last-child:last-child { margin-block-end: 0; }body { --wp--style--block-gap: var(--wp--preset--spacing--60); }:where(body .is-layout-flow) > :first-child:first-child{margin-block-start: 0;}:where(body .is-layout-flow) > :last-child:last-child{margin-block-end: 0;}:where(body .is-layout-flow) > *{margin-block-start: var(--wp--preset--spacing--60);margin-block-end: 0;}:where(body .is-layout-constrained) > :first-child:first-child{margin-block-start: 0;}:where(body .is-layout-constrained) > :last-child:last-child{margin-block-end: 0;}:where(body .is-layout-constrained) > *{margin-block-start: var(--wp--preset--spacing--60);margin-block-end: 0;}:where(body .is-layout-flex) {gap: var(--wp--preset--spacing--60);}:where(body .is-layout-grid) {gap: var(--wp--preset--spacing--60);}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){max-width: var(--wp--style--global--content-size);margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignwide{max-width: var(--wp--style--global--wide-size);}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}', $theme_json->get_stylesheet( array( 'styles' ) ) ); } @@ -1181,12 +1203,17 @@ public function test_get_stylesheet_generates_layout_styles_with_spacing_presets /** * @ticket 56467 * @ticket 58550 + * @ticket 60936 */ public function test_get_stylesheet_generates_fallback_gap_layout_styles() { $theme_json = new WP_Theme_JSON( array( 'version' => WP_Theme_JSON::LATEST_SCHEMA, 'settings' => array( + 'layout' => array( + 'contentSize' => '640px', + 'wideSize' => '1200px', + ), 'spacing' => array( 'blockGap' => null, ), @@ -1203,7 +1230,7 @@ public function test_get_stylesheet_generates_fallback_gap_layout_styles() { // Results also include root site blocks styles. $this->assertSame( - 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){max-width: var(--wp--style--global--content-size);margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignwide{max-width: var(--wp--style--global--wide-size);}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}', + 'body { margin: 0;--wp--style--global--content-size: 640px;--wp--style--global--wide-size: 1200px; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){max-width: var(--wp--style--global--content-size);margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignwide{max-width: var(--wp--style--global--wide-size);}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}', $stylesheet ); } @@ -1211,12 +1238,17 @@ public function test_get_stylesheet_generates_fallback_gap_layout_styles() { /** * @ticket 56467 * @ticket 58550 + * @ticket 60936 */ public function test_get_stylesheet_generates_base_fallback_gap_layout_styles() { $theme_json = new WP_Theme_JSON( array( 'version' => WP_Theme_JSON::LATEST_SCHEMA, 'settings' => array( + 'layout' => array( + 'contentSize' => '640px', + 'wideSize' => '1200px', + ), 'spacing' => array( 'blockGap' => null, ), @@ -1263,12 +1295,17 @@ public function test_get_stylesheet_skips_layout_styles() { /** * @ticket 56467 * @ticket 58550 + * @ticket 60936 */ public function test_get_stylesheet_generates_valid_block_gap_values_and_skips_null_or_false_values() { $theme_json = new WP_Theme_JSON( array( 'version' => WP_Theme_JSON::LATEST_SCHEMA, 'settings' => array( + 'layout' => array( + 'contentSize' => '640px', + 'wideSize' => '1200px', + ), 'spacing' => array( 'blockGap' => true, ), @@ -1305,7 +1342,7 @@ public function test_get_stylesheet_generates_valid_block_gap_values_and_skips_n ); $this->assertSame( - 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.wp-site-blocks) > * { margin-block-start: 1rem; margin-block-end: 0; }:where(.wp-site-blocks) > :first-child:first-child { margin-block-start: 0; }:where(.wp-site-blocks) > :last-child:last-child { margin-block-end: 0; }body { --wp--style--block-gap: 1rem; }:where(body .is-layout-flow) > :first-child:first-child{margin-block-start: 0;}:where(body .is-layout-flow) > :last-child:last-child{margin-block-end: 0;}:where(body .is-layout-flow) > *{margin-block-start: 1rem;margin-block-end: 0;}:where(body .is-layout-constrained) > :first-child:first-child{margin-block-start: 0;}:where(body .is-layout-constrained) > :last-child:last-child{margin-block-end: 0;}:where(body .is-layout-constrained) > *{margin-block-start: 1rem;margin-block-end: 0;}:where(body .is-layout-flex) {gap: 1rem;}:where(body .is-layout-grid) {gap: 1rem;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){max-width: var(--wp--style--global--content-size);margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignwide{max-width: var(--wp--style--global--wide-size);}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}.wp-block-post-content{color: gray;}.wp-block-social-links-is-layout-flow > :first-child:first-child{margin-block-start: 0;}.wp-block-social-links-is-layout-flow > :last-child:last-child{margin-block-end: 0;}.wp-block-social-links-is-layout-flow > *{margin-block-start: 0;margin-block-end: 0;}.wp-block-social-links-is-layout-constrained > :first-child:first-child{margin-block-start: 0;}.wp-block-social-links-is-layout-constrained > :last-child:last-child{margin-block-end: 0;}.wp-block-social-links-is-layout-constrained > *{margin-block-start: 0;margin-block-end: 0;}.wp-block-social-links-is-layout-flex{gap: 0;}.wp-block-social-links-is-layout-grid{gap: 0;}.wp-block-buttons-is-layout-flow > :first-child:first-child{margin-block-start: 0;}.wp-block-buttons-is-layout-flow > :last-child:last-child{margin-block-end: 0;}.wp-block-buttons-is-layout-flow > *{margin-block-start: 0;margin-block-end: 0;}.wp-block-buttons-is-layout-constrained > :first-child:first-child{margin-block-start: 0;}.wp-block-buttons-is-layout-constrained > :last-child:last-child{margin-block-end: 0;}.wp-block-buttons-is-layout-constrained > *{margin-block-start: 0;margin-block-end: 0;}.wp-block-buttons-is-layout-flex{gap: 0;}.wp-block-buttons-is-layout-grid{gap: 0;}', + 'body { margin: 0;--wp--style--global--content-size: 640px;--wp--style--global--wide-size: 1200px; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.wp-site-blocks) > * { margin-block-start: 1rem; margin-block-end: 0; }:where(.wp-site-blocks) > :first-child:first-child { margin-block-start: 0; }:where(.wp-site-blocks) > :last-child:last-child { margin-block-end: 0; }body { --wp--style--block-gap: 1rem; }:where(body .is-layout-flow) > :first-child:first-child{margin-block-start: 0;}:where(body .is-layout-flow) > :last-child:last-child{margin-block-end: 0;}:where(body .is-layout-flow) > *{margin-block-start: 1rem;margin-block-end: 0;}:where(body .is-layout-constrained) > :first-child:first-child{margin-block-start: 0;}:where(body .is-layout-constrained) > :last-child:last-child{margin-block-end: 0;}:where(body .is-layout-constrained) > *{margin-block-start: 1rem;margin-block-end: 0;}:where(body .is-layout-flex) {gap: 1rem;}:where(body .is-layout-grid) {gap: 1rem;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){max-width: var(--wp--style--global--content-size);margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignwide{max-width: var(--wp--style--global--wide-size);}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}.wp-block-post-content{color: gray;}.wp-block-social-links-is-layout-flow > :first-child:first-child{margin-block-start: 0;}.wp-block-social-links-is-layout-flow > :last-child:last-child{margin-block-end: 0;}.wp-block-social-links-is-layout-flow > *{margin-block-start: 0;margin-block-end: 0;}.wp-block-social-links-is-layout-constrained > :first-child:first-child{margin-block-start: 0;}.wp-block-social-links-is-layout-constrained > :last-child:last-child{margin-block-end: 0;}.wp-block-social-links-is-layout-constrained > *{margin-block-start: 0;margin-block-end: 0;}.wp-block-social-links-is-layout-flex{gap: 0;}.wp-block-social-links-is-layout-grid{gap: 0;}.wp-block-buttons-is-layout-flow > :first-child:first-child{margin-block-start: 0;}.wp-block-buttons-is-layout-flow > :last-child:last-child{margin-block-end: 0;}.wp-block-buttons-is-layout-flow > *{margin-block-start: 0;margin-block-end: 0;}.wp-block-buttons-is-layout-constrained > :first-child:first-child{margin-block-start: 0;}.wp-block-buttons-is-layout-constrained > :last-child:last-child{margin-block-end: 0;}.wp-block-buttons-is-layout-constrained > *{margin-block-start: 0;margin-block-end: 0;}.wp-block-buttons-is-layout-flex{gap: 0;}.wp-block-buttons-is-layout-grid{gap: 0;}', $theme_json->get_stylesheet() ); } @@ -1313,6 +1350,7 @@ public function test_get_stylesheet_generates_valid_block_gap_values_and_skips_n /** * @ticket 57354 * @ticket 58550 + * @ticket 60936 */ public function test_get_stylesheet_returns_outline_styles() { $theme_json = new WP_Theme_JSON( @@ -1341,7 +1379,7 @@ public function test_get_stylesheet_returns_outline_styles() { ) ); - $base_styles = 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){max-width: var(--wp--style--global--content-size);margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignwide{max-width: var(--wp--style--global--wide-size);}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}'; + $base_styles = 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){margin-left: auto !important;margin-right: auto !important;}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}'; $element_styles = '.wp-element-button, .wp-block-button__link{outline-color: red;outline-offset: 3px;outline-style: dashed;outline-width: 3px;}.wp-element-button:hover, .wp-block-button__link:hover{outline-color: blue;outline-offset: 3px;outline-style: solid;outline-width: 3px;}'; @@ -3510,6 +3548,7 @@ public function test_get_element_class_name_invalid() { * * @ticket 56467 * @ticket 58550 + * @ticket 60936 */ public function test_get_property_value_valid() { $theme_json = new WP_Theme_JSON( @@ -3532,7 +3571,7 @@ public function test_get_property_value_valid() { ) ); - $base_styles = 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){max-width: var(--wp--style--global--content-size);margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignwide{max-width: var(--wp--style--global--wide-size);}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}'; + $base_styles = 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){margin-left: auto !important;margin-right: auto !important;}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}'; $color_styles = 'body{background-color: #ffffff;color: #000000;}.wp-element-button, .wp-block-button__link{background-color: #000000;color: #ffffff;}'; $expected = $base_styles . $color_styles; $this->assertSame( $expected, $theme_json->get_stylesheet() ); @@ -3592,6 +3631,7 @@ public function data_get_property_value_should_return_string_for_invalid_paths_o * * @ticket 56467 * @ticket 58550 + * @ticket 60936 * @expectedIncorrectUsage get_property_value */ public function test_get_property_value_loop() { @@ -3615,7 +3655,7 @@ public function test_get_property_value_loop() { ) ); - $base_styles = 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){max-width: var(--wp--style--global--content-size);margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignwide{max-width: var(--wp--style--global--wide-size);}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}'; + $base_styles = 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){margin-left: auto !important;margin-right: auto !important;}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}'; $color_styles = 'body{background-color: #ffffff;}.wp-element-button, .wp-block-button__link{color: #ffffff;}'; $expected = $base_styles . $color_styles; $this->assertSame( $expected, $theme_json->get_stylesheet() ); @@ -3628,6 +3668,7 @@ public function test_get_property_value_loop() { * * @ticket 56467 * @ticket 58550 + * @ticket 60936 * @expectedIncorrectUsage get_property_value */ public function test_get_property_value_recursion() { @@ -3651,7 +3692,7 @@ public function test_get_property_value_recursion() { ) ); - $base_styles = 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){max-width: var(--wp--style--global--content-size);margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignwide{max-width: var(--wp--style--global--wide-size);}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}'; + $base_styles = 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){margin-left: auto !important;margin-right: auto !important;}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}'; $color_styles = 'body{background-color: #ffffff;color: #ffffff;}.wp-element-button, .wp-block-button__link{color: #ffffff;}'; $expected = $base_styles . $color_styles; $this->assertSame( $expected, $theme_json->get_stylesheet() ); @@ -3663,6 +3704,7 @@ public function test_get_property_value_recursion() { * * @ticket 56467 * @ticket 58550 + * @ticket 60936 * @expectedIncorrectUsage get_property_value */ public function test_get_property_value_self() { @@ -3678,7 +3720,7 @@ public function test_get_property_value_self() { ) ); - $base_styles = 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){max-width: var(--wp--style--global--content-size);margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignwide{max-width: var(--wp--style--global--wide-size);}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}'; + $base_styles = 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){margin-left: auto !important;margin-right: auto !important;}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}'; $color_styles = 'body{background-color: #ffffff;}'; $expected = $base_styles . $color_styles; $this->assertSame( $expected, $theme_json->get_stylesheet() ); @@ -3687,6 +3729,7 @@ public function test_get_property_value_self() { /** * @ticket 56467 * @ticket 58550 + * @ticket 60936 */ public function test_get_styles_for_block_with_padding_aware_alignments() { $theme_json = new WP_Theme_JSON( @@ -3713,7 +3756,7 @@ public function test_get_styles_for_block_with_padding_aware_alignments() { 'selector' => 'body', ); - $expected = 'body { margin: 0; }.wp-site-blocks { padding-top: var(--wp--style--root--padding-top); padding-bottom: var(--wp--style--root--padding-bottom); }.has-global-padding { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); }.has-global-padding :where(.has-global-padding:not(.wp-block-block)) { padding-right: 0; padding-left: 0; }.has-global-padding > .alignfull { margin-right: calc(var(--wp--style--root--padding-right) * -1); margin-left: calc(var(--wp--style--root--padding-left) * -1); }.has-global-padding :where(.has-global-padding:not(.wp-block-block)) > .alignfull { margin-right: 0; margin-left: 0; }.has-global-padding > .alignfull:where(:not(.has-global-padding):not(.is-layout-flex):not(.is-layout-grid)) > :where([class*="wp-block-"]:not(.alignfull):not([class*="__"]),p,h1,h2,h3,h4,h5,h6,ul,ol) { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); }.has-global-padding :where(.has-global-padding) > .alignfull:where(:not(.has-global-padding)) > :where([class*="wp-block-"]:not(.alignfull):not([class*="__"]),p,h1,h2,h3,h4,h5,h6,ul,ol) { padding-right: 0; padding-left: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){max-width: var(--wp--style--global--content-size);margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignwide{max-width: var(--wp--style--global--wide-size);}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}body{--wp--style--root--padding-top: 10px;--wp--style--root--padding-right: 12px;--wp--style--root--padding-bottom: 10px;--wp--style--root--padding-left: 12px;}'; + $expected = 'body { margin: 0; }.wp-site-blocks { padding-top: var(--wp--style--root--padding-top); padding-bottom: var(--wp--style--root--padding-bottom); }.has-global-padding { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); }.has-global-padding :where(.has-global-padding:not(.wp-block-block)) { padding-right: 0; padding-left: 0; }.has-global-padding > .alignfull { margin-right: calc(var(--wp--style--root--padding-right) * -1); margin-left: calc(var(--wp--style--root--padding-left) * -1); }.has-global-padding :where(.has-global-padding:not(.wp-block-block)) > .alignfull { margin-right: 0; margin-left: 0; }.has-global-padding > .alignfull:where(:not(.has-global-padding):not(.is-layout-flex):not(.is-layout-grid)) > :where([class*="wp-block-"]:not(.alignfull):not([class*="__"]),p,h1,h2,h3,h4,h5,h6,ul,ol) { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); }.has-global-padding :where(.has-global-padding) > .alignfull:where(:not(.has-global-padding)) > :where([class*="wp-block-"]:not(.alignfull):not([class*="__"]),p,h1,h2,h3,h4,h5,h6,ul,ol) { padding-right: 0; padding-left: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){margin-left: auto !important;margin-right: auto !important;}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}body{--wp--style--root--padding-top: 10px;--wp--style--root--padding-right: 12px;--wp--style--root--padding-bottom: 10px;--wp--style--root--padding-left: 12px;}'; $root_rules = $theme_json->get_root_layout_rules( WP_Theme_JSON::ROOT_BLOCK_SELECTOR, $metadata ); $style_rules = $theme_json->get_styles_for_block( $metadata ); $this->assertSame( $expected, $root_rules . $style_rules ); @@ -3722,6 +3765,7 @@ public function test_get_styles_for_block_with_padding_aware_alignments() { /** * @ticket 56467 * @ticket 58550 + * @ticket 60936 */ public function test_get_styles_for_block_without_padding_aware_alignments() { $theme_json = new WP_Theme_JSON( @@ -3745,7 +3789,7 @@ public function test_get_styles_for_block_without_padding_aware_alignments() { 'selector' => 'body', ); - $expected = 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){max-width: var(--wp--style--global--content-size);margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignwide{max-width: var(--wp--style--global--wide-size);}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}body{padding-top: 10px;padding-right: 12px;padding-bottom: 10px;padding-left: 12px;}'; + $expected = 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){margin-left: auto !important;margin-right: auto !important;}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}body{padding-top: 10px;padding-right: 12px;padding-bottom: 10px;padding-left: 12px;}'; $root_rules = $theme_json->get_root_layout_rules( WP_Theme_JSON::ROOT_BLOCK_SELECTOR, $metadata ); $style_rules = $theme_json->get_styles_for_block( $metadata ); $this->assertSame( $expected, $root_rules . $style_rules ); @@ -3783,6 +3827,7 @@ public function test_get_styles_for_block_with_content_width() { * @ticket 56611 * @ticket 58548 * @ticket 58550 + * @ticket 60936 */ public function test_get_styles_with_appearance_tools() { $theme_json = new WP_Theme_JSON( @@ -3799,7 +3844,7 @@ public function test_get_styles_with_appearance_tools() { 'selector' => 'body', ); - $expected = 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.wp-site-blocks) > * { margin-block-start: ; margin-block-end: 0; }:where(.wp-site-blocks) > :first-child:first-child { margin-block-start: 0; }:where(.wp-site-blocks) > :last-child:last-child { margin-block-end: 0; }body { --wp--style--block-gap: ; }:where(body .is-layout-flow) > :first-child:first-child{margin-block-start: 0;}:where(body .is-layout-flow) > :last-child:last-child{margin-block-end: 0;}:where(body .is-layout-flow) > *{margin-block-start: 1;margin-block-end: 0;}:where(body .is-layout-constrained) > :first-child:first-child{margin-block-start: 0;}:where(body .is-layout-constrained) > :last-child:last-child{margin-block-end: 0;}:where(body .is-layout-constrained) > *{margin-block-start: 1;margin-block-end: 0;}:where(body .is-layout-flex) {gap: 1;}:where(body .is-layout-grid) {gap: 1;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){max-width: var(--wp--style--global--content-size);margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignwide{max-width: var(--wp--style--global--wide-size);}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}'; + $expected = 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.wp-site-blocks) > * { margin-block-start: ; margin-block-end: 0; }:where(.wp-site-blocks) > :first-child:first-child { margin-block-start: 0; }:where(.wp-site-blocks) > :last-child:last-child { margin-block-end: 0; }body { --wp--style--block-gap: ; }:where(body .is-layout-flow) > :first-child:first-child{margin-block-start: 0;}:where(body .is-layout-flow) > :last-child:last-child{margin-block-end: 0;}:where(body .is-layout-flow) > *{margin-block-start: 1;margin-block-end: 0;}:where(body .is-layout-constrained) > :first-child:first-child{margin-block-start: 0;}:where(body .is-layout-constrained) > :last-child:last-child{margin-block-end: 0;}:where(body .is-layout-constrained) > *{margin-block-start: 1;margin-block-end: 0;}:where(body .is-layout-flex) {gap: 1;}:where(body .is-layout-grid) {gap: 1;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){margin-left: auto !important;margin-right: auto !important;}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}'; $root_rules = $theme_json->get_root_layout_rules( WP_Theme_JSON::ROOT_BLOCK_SELECTOR, $metadata ); $this->assertSame( $expected, $root_rules ); } @@ -4713,6 +4758,7 @@ public function data_set_spacing_sizes_when_invalid() { * * @ticket 56903 * @ticket 58550 + * @ticket 60936 * * @dataProvider data_update_separator_declarations * @@ -4752,7 +4798,7 @@ public function data_update_separator_declarations() { 'background' => 'blue', ), ), - 'expected_output' => 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){max-width: var(--wp--style--global--content-size);margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignwide{max-width: var(--wp--style--global--wide-size);}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}.wp-block-separator{background-color: blue;color: blue;}', + 'expected_output' => 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){margin-left: auto !important;margin-right: auto !important;}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}.wp-block-separator{background-color: blue;color: blue;}', ), // If background and text are defined, do not include border-color, as text color is enough. 'background and text, no border-color' => array( @@ -4762,7 +4808,7 @@ public function data_update_separator_declarations() { 'text' => 'red', ), ), - 'expected_output' => 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){max-width: var(--wp--style--global--content-size);margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignwide{max-width: var(--wp--style--global--wide-size);}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}.wp-block-separator{background-color: blue;color: red;}', + 'expected_output' => 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){margin-left: auto !important;margin-right: auto !important;}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}.wp-block-separator{background-color: blue;color: red;}', ), // If only text is defined, do not include border-color, as by itself is enough. 'only text' => array( @@ -4771,7 +4817,7 @@ public function data_update_separator_declarations() { 'text' => 'red', ), ), - 'expected_output' => 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){max-width: var(--wp--style--global--content-size);margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignwide{max-width: var(--wp--style--global--wide-size);}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}.wp-block-separator{color: red;}', + 'expected_output' => 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){margin-left: auto !important;margin-right: auto !important;}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}.wp-block-separator{color: red;}', ), // If background, text, and border-color are defined, include everything, CSS specificity will decide which to apply. 'background, text, and border-color' => array( @@ -4784,7 +4830,7 @@ public function data_update_separator_declarations() { 'color' => 'pink', ), ), - 'expected_output' => 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){max-width: var(--wp--style--global--content-size);margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignwide{max-width: var(--wp--style--global--wide-size);}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}.wp-block-separator{background-color: blue;border-color: pink;color: red;}', + 'expected_output' => 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){margin-left: auto !important;margin-right: auto !important;}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}.wp-block-separator{background-color: blue;border-color: pink;color: red;}', ), // If background and border color are defined, include everything, CSS specificity will decide which to apply. 'background, and border-color' => array( @@ -4796,7 +4842,7 @@ public function data_update_separator_declarations() { 'color' => 'pink', ), ), - 'expected_output' => 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){max-width: var(--wp--style--global--content-size);margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignwide{max-width: var(--wp--style--global--wide-size);}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}.wp-block-separator{background-color: blue;border-color: pink;}', + 'expected_output' => 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){margin-left: auto !important;margin-right: auto !important;}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}.wp-block-separator{background-color: blue;border-color: pink;}', ), ); } @@ -4833,6 +4879,7 @@ public function test_shadow_preset_styles() { /** * @ticket 57559 * @ticket 58550 + * @ticket 60936 */ public function test_get_shadow_styles_for_blocks() { $theme_json = new WP_Theme_JSON( @@ -4866,7 +4913,7 @@ public function test_get_shadow_styles_for_blocks() { ) ); - $global_styles = 'body{--wp--preset--shadow--natural: 5px 5px 0 0 black;}body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){max-width: var(--wp--style--global--content-size);margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignwide{max-width: var(--wp--style--global--wide-size);}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}'; + $global_styles = 'body{--wp--preset--shadow--natural: 5px 5px 0 0 black;}body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flow > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-flow > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-flow > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > .alignleft{float: left;margin-inline-start: 0;margin-inline-end: 2em;}body .is-layout-constrained > .alignright{float: right;margin-inline-start: 2em;margin-inline-end: 0;}body .is-layout-constrained > .aligncenter{margin-left: auto !important;margin-right: auto !important;}body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){margin-left: auto !important;margin-right: auto !important;}body .is-layout-flex{display: flex;}body .is-layout-flex{flex-wrap: wrap;align-items: center;}body .is-layout-flex > *{margin: 0;}body .is-layout-grid{display: grid;}body .is-layout-grid > *{margin: 0;}'; $element_styles = 'a:where(:not(.wp-element-button)){box-shadow: var(--wp--preset--shadow--natural);}.wp-element-button, .wp-block-button__link{box-shadow: var(--wp--preset--shadow--natural);}p{box-shadow: var(--wp--preset--shadow--natural);}'; $expected_styles = $global_styles . $element_styles; $this->assertSame( $expected_styles, $theme_json->get_stylesheet() );