Skip to content

Commit

Permalink
Doc standards fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
peterwilsoncc committed Sep 14, 2024
1 parent bd7fc60 commit 9a18a25
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/wp-includes/block-template.php
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,8 @@ function _resolve_template_for_new_post( $wp_query ) {
/**
* Register a block template.
*
* @since 6.7.0
*
* @param string $template_name Template name in the form of `plugin_uri//template_name`.
* @param array|string $args {
* @type string $title Optional. Title of the template as it will be shown in the Site Editor
Expand All @@ -374,8 +376,6 @@ function _resolve_template_for_new_post( $wp_query ) {
* @type string $plugin Optional. Slug of the plugin that registers the template.
* }
* @return WP_Block_Template|WP_Error The registered template object on success, WP_Error object on failure.
*
* @since 6.7.0
*/
function wp_register_block_template( $template_name, $args = array() ) {
return WP_Block_Templates_Registry::get_instance()->register( $template_name, $args );
Expand All @@ -384,11 +384,11 @@ function wp_register_block_template( $template_name, $args = array() ) {
/**
* Unregister a block template.
*
* @since 6.7.0
*
* @param string $template_name Template name in the form of `plugin_uri//template_name`.
* @return WP_Block_Template|WP_Error The unregistered template object on success, WP_Error object on failure or if the
* template doesn't exist.
*
* @since 6.7.0
*/
function wp_unregister_block_template( $template_name ) {
return WP_Block_Templates_Registry::get_instance()->unregister( $template_name );
Expand Down
1 change: 1 addition & 0 deletions src/wp-includes/class-wp-block-templates-registry.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ public function get_by_slug( $template_slug ) {
* @type string[] $slug__not_in List of slugs to skip.
* @type string $post_type Post type to get the templates for.
* }
* @return WP_Block_Template[] Associative array of `$template_name => $template` pairs.
*/
public function get_by_query( $query = array() ) {
$all_templates = $this->get_all_registered();
Expand Down

0 comments on commit 9a18a25

Please sign in to comment.