WordPress.org

Make WordPress Core

Ticket #48181: 48181.diff

File 48181.diff, 1.8 KB (added by david.binda, 2 years ago)
  • src/wp-includes/class-wp-block-styles-registry.php

     
    22/**
    33 * Blocks API: WP_Block_Styles_Registry class
    44 *
    5  * @package Gutenberg
     5 * @package WordPress
     6 * @subpackage Blocks
    67 * @since 5.3.0
    78 */
    89
     
    4142        public function register( $block_name, $style_properties ) {
    4243
    4344                if ( ! isset( $block_name ) || ! is_string( $block_name ) ) {
    44                         $message = __( 'Block name name must be a string.', 'gutenberg' );
    45                         _doing_it_wrong( __METHOD__, $message, '6.2.0' );
     45                        $message = __( 'Block name name must be a string.' );
     46                        _doing_it_wrong( __METHOD__, $message, '5.3.0' );
    4647                        return false;
    4748                }
    4849
    4950                if ( ! isset( $style_properties['name'] ) || ! is_string( $style_properties['name'] ) ) {
    50                         $message = __( 'Block style name must be a string.', 'gutenberg' );
    51                         _doing_it_wrong( __METHOD__, $message, '6.2.0' );
     51                        $message = __( 'Block style name must be a string.' );
     52                        _doing_it_wrong( __METHOD__, $message, '5.3.0' );
    5253                        return false;
    5354                }
    5455
     
    7374        public function unregister( $block_name, $block_style_name ) {
    7475                if ( ! $this->is_registered( $block_name, $block_style_name ) ) {
    7576                        /* translators: 1: block name, 2: block style name */
    76                         $message = sprintf( __( 'Block "%1$s" does not contain a style named "%2$s.".', 'gutenberg' ), $block_name, $block_style_name );
    77                         _doing_it_wrong( __METHOD__, $message, '6.2.0' );
     77                        $message = sprintf( __( 'Block "%1$s" does not contain a style named "%2$s.".' ), $block_name, $block_style_name );
     78                        _doing_it_wrong( __METHOD__, $message, '5.3.0' );
    7879                        return false;
    7980                }
    8081