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.


Built from https://develop.svn.wordpress.org/trunk@59201


git-svn-id: http://core.svn.wordpress.org/trunk@58596 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Peter Wilson 2024-10-09 22:11:16 +00:00
parent 70bfe13aa0
commit a74b414813
2 changed files with 3 additions and 3 deletions

View File

@ -377,7 +377,7 @@ function _resolve_template_for_new_post( $wp_query ) {
* } * }
* @return WP_Block_Template|WP_Error The registered template object on success, WP_Error object on failure. * @return WP_Block_Template|WP_Error The registered template object on success, WP_Error object on failure.
*/ */
function wp_register_block_template( $template_name, $args = array() ) { function register_block_template( $template_name, $args = array() ) {
return WP_Block_Templates_Registry::get_instance()->register( $template_name, $args ); return WP_Block_Templates_Registry::get_instance()->register( $template_name, $args );
} }
@ -390,6 +390,6 @@ function wp_register_block_template( $template_name, $args = array() ) {
* @return WP_Block_Template|WP_Error The unregistered template object on success, WP_Error object on failure or if the * @return WP_Block_Template|WP_Error The unregistered template object on success, WP_Error object on failure or if the
* template doesn't exist. * template doesn't exist.
*/ */
function wp_unregister_block_template( $template_name ) { function unregister_block_template( $template_name ) {
return WP_Block_Templates_Registry::get_instance()->unregister( $template_name ); return WP_Block_Templates_Registry::get_instance()->unregister( $template_name );
} }

View File

@ -16,7 +16,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '6.7-beta2-59200'; $wp_version = '6.7-beta2-59201';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.