Make WordPress Core


Ignore:
Timestamp:
10/09/2024 10:09:30 PM (7 months ago)
Author:
peterwilsoncc
Message:

Editor: Remove prefix from wp_(un)register_block_template() functions.

Removes the wp_ prefix from block template registration functions for consistency with other block related registration functions.

  • wp_register_block_template() becomes register_block_template().
  • wp_unregister_block_template() becomes unregister_block_template().

Props aljullu, aristath, youknowriad, swissspidy.
Fixes #62193.

File:
1 edited

Legend:

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

    r59073 r59201  
    378378 * @return WP_Block_Template|WP_Error The registered template object on success, WP_Error object on failure.
    379379 */
    380 function wp_register_block_template( $template_name, $args = array() ) {
     380function register_block_template( $template_name, $args = array() ) {
    381381    return WP_Block_Templates_Registry::get_instance()->register( $template_name, $args );
    382382}
     
    391391 *                                    template doesn't exist.
    392392 */
    393 function wp_unregister_block_template( $template_name ) {
     393function unregister_block_template( $template_name ) {
    394394    return WP_Block_Templates_Registry::get_instance()->unregister( $template_name );
    395395}
Note: See TracChangeset for help on using the changeset viewer.