Make WordPress Core


Ignore:
Timestamp:
06/15/2021 03:21:50 PM (5 years ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Remove a one-time $message variable in some _doing_it_wrong() calls.

This brings some consistency with most other calls.

Follow-up to [23378], [25605], [34745], [36219], [44108], [46111], [48156].

See #52627.

File:
1 edited

Legend:

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

    r50532 r51154  
    3939        public function register( $category_name, $category_properties ) {
    4040                if ( ! isset( $category_name ) || ! is_string( $category_name ) ) {
    41                         _doing_it_wrong( __METHOD__, __( 'Block pattern category name must be a string.' ), '5.5.0' );
     41                        _doing_it_wrong(
     42                                __METHOD__,
     43                                __( 'Block pattern category name must be a string.' ),
     44                                '5.5.0'
     45                        );
    4246                        return false;
    4347                }
    … …  
    6165        public function unregister( $category_name ) {
    6266                if ( ! $this->is_registered( $category_name ) ) {
    63                         /* translators: %s: Block pattern name. */
    64                         $message = sprintf( __( 'Block pattern category "%s" not found.' ), $category_name );
    65                         _doing_it_wrong( __METHOD__, $message, '5.5.0' );
     67                        _doing_it_wrong(
     68                                __METHOD__,
     69                                /* translators: %s: Block pattern name. */
     70                                sprintf( __( 'Block pattern category "%s" not found.' ), $category_name ),
     71                                '5.5.0'
     72                        );
    6673                        return false;
    6774                }
Note: See TracChangeset for help on using the changeset viewer.