WordPress.org

Make WordPress Core

Changeset 46351


Ignore:
Timestamp:
09/30/2019 03:43:36 PM (2 months ago)
Author:
desrosj
Message:

Docs: Correct WP_Styles_Registry documentation.

This change updates the file’s docblock to correctly indicate WordPress/Blocks as the @package/@subpackage, updates the _doing_it_wrong() versions to 5.3.0 instead of the Gutenberg plugin versions, and removes some stray gutenberg text domains.

Props david.binda.
Fixes #48181.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-block-styles-registry.php

    r46111 r46351  
    33 * Blocks API: WP_Block_Styles_Registry class
    44 *
    5  * @package Gutenberg
     5 * @package WordPress
     6 * @subpackage Blocks
    67 * @since 5.3.0
    78 */
     
    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        }
     
    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        }
Note: See TracChangeset for help on using the changeset viewer.