Skip to content

Commit

Permalink
Editor: Replace a Gutenberg specific function with the Core equivalent.
Browse files Browse the repository at this point in the history
This replaces a stray instance of `gutenberg_experimental_set()` with the WordPress Core version of this function, `_wp_array_set()`.

A stray `gutenberg` text domain is also removed from a `__()` call.

Props walbo, chaion07, JeffPaul.
Fixes #53369.
Built from https://develop.svn.wordpress.org/trunk@51148


git-svn-id: http://core.svn.wordpress.org/trunk@50757 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
desrosj authored and F-Wilke committed Jul 31, 2021
1 parent a404e7c commit 64f20ad
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions wp-includes/blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -988,10 +988,10 @@ function wp_migrate_old_typography_shape( $metadata ) {
if ( null !== $support_for_key ) {
trigger_error(
/* translators: %1$s: Block type, %2$s: typography supports key e.g: fontSize, lineHeight etc... */
sprintf( __( 'Block %1$s is declaring %2$s support on block.json under supports.%2$s. %2$s support is now declared under supports.typography.%2$s.', 'gutenberg' ), $metadata['name'], $typography_key ),
sprintf( __( 'Block %1$s is declaring %2$s support on block.json under supports.%2$s. %2$s support is now declared under supports.typography.%2$s.' ), $metadata['name'], $typography_key ),
headers_sent() || WP_DEBUG ? E_USER_WARNING : E_USER_NOTICE
);
gutenberg_experimental_set( $metadata['supports'], array( 'typography', $typography_key ), $support_for_key );
_wp_array_set( $metadata['supports'], array( 'typography', $typography_key ), $support_for_key );
unset( $metadata['supports'][ $typography_key ] );
}
}
Expand Down
2 changes: 1 addition & 1 deletion wp-includes/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.8-beta1-51147';
$wp_version = '5.8-beta1-51148';

/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
Expand Down

0 comments on commit 64f20ad

Please sign in to comment.