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.

git-svn-id: https://develop.svn.wordpress.org/trunk@51148 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
desrosj committed Jun 14, 2021
1 parent e40fec8 commit 15c8c70
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/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

0 comments on commit 15c8c70

Please sign in to comment.