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/tests/phpunit/tests/rest-api/wpRestTemplatesController.php

    r59073 r59201  
    547547        );
    548548
    549         wp_register_block_template( $template_name, $args );
     549        register_block_template( $template_name, $args );
    550550
    551551        $request  = new WP_REST_Request( 'GET', '/wp/v2/templates/test-plugin//test-template' );
     
    567567        $this->assertSame( 'test-plugin', $data['plugin'], 'Plugin name mismatch.' );
    568568
    569         wp_unregister_block_template( $template_name );
     569        unregister_block_template( $template_name );
    570570
    571571        $request  = new WP_REST_Request( 'GET', '/wp/v2/templates/test-plugin//test-template' );
Note: See TracChangeset for help on using the changeset viewer.