Make WordPress Core

Changeset 51307


Ignore:
Timestamp:
07/02/2021 02:34:24 PM (4 years ago)
Author:
desrosj
Message:

Editor: Ensure the Query block pattern category is translatable.

Because the __() translation function was used here, the Query block pattern category string is not translatable. _x() is the correct function here as that passes the second parameter as context and not text domain.

Follow up to [50948].

Props walbo.
Fixes #53577.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/block-patterns.php

    r51208 r51307  
    4242    register_block_pattern_category( 'header', array( 'label' => _x( 'Headers', 'Block pattern category' ) ) );
    4343    register_block_pattern_category( 'text', array( 'label' => _x( 'Text', 'Block pattern category' ) ) );
    44     register_block_pattern_category( 'query', array( 'label' => __( 'Query', 'Block pattern category' ) ) );
     44    register_block_pattern_category( 'query', array( 'label' => _x( 'Query', 'Block pattern category' ) ) );
    4545}
    4646
Note: See TracChangeset for help on using the changeset viewer.