Changeset 53727
- Timestamp:
- 07/20/2022 01:12:30 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/block-template-utils.php
r53402 r53727 198 198 * 199 199 * @param string $type Template part area name. 200 *201 200 * @return string Input if supported, else the uncategorized value. 202 201 */ … … 251 250 * @param string $template_type 'wp_template' or 'wp_template_part'. 252 251 * @param string $slug Template slug. 253 *254 252 * @return array|null Template. 255 253 */ … … 296 294 * 297 295 * @param string $template_type 'wp_template' or 'wp_template_part'. 298 *299 296 * @return array Template. 300 297 */ … … 371 368 * 372 369 * @param array $template_info Template to add information to (requires 'type' and 'slug' fields). 373 *374 370 * @return array Template info. 375 371 */ … … 397 393 * 398 394 * @param array $blocks array of blocks. 399 *400 395 * @return array block references to the passed blocks and their inner blocks. 401 396 */ … … 430 425 * 431 426 * @param string $template_content serialized wp_template content. 432 *433 427 * @return string Updated 'wp_template' content. 434 428 */ … … 501 495 * @param array $template_file Theme file. 502 496 * @param string $template_type 'wp_template' or 'wp_template_part'. 503 *504 497 * @return WP_Block_Template Template. 505 498 */ … … 545 538 * 546 539 * @param WP_Post $post Template post. 547 *548 540 * @return WP_Block_Template|WP_Error Template. 549 541 */ … … 610 602 * } 611 603 * @param string $template_type 'wp_template' or 'wp_template_part'. 612 *613 604 * @return array Templates. 614 605 */ … … 745 736 * @param string $template_type Optional. Template type: `'wp_template'` or '`wp_template_part'`. 746 737 * Default `'wp_template'`. 747 *748 738 * @return WP_Block_Template|null Template. 749 739 */ 750 740 function get_block_template( $id, $template_type = 'wp_template' ) { 751 741 /** 752 * Filters the block template object before the query takes place.742 * Filters the block template object before the query takes place. 753 743 * 754 744 * Return a non-null value to bypass the WordPress queries. … … 758 748 * @param WP_Block_Template|null $block_template Return block template object to short-circuit the default query, 759 749 * or null to allow WP to run its normal queries. 760 * @param string $idTemplate unique identifier (example: theme_slug//template_slug).761 * @param string $template_typeTemplate type: `'wp_template'` or '`wp_template_part'`.750 * @param string $id Template unique identifier (example: theme_slug//template_slug). 751 * @param string $template_type Template type: `'wp_template'` or '`wp_template_part'`. 762 752 */ 763 753 $block_template = apply_filters( 'pre_get_block_template', null, $id, $template_type );
Note: See TracChangeset
for help on using the changeset viewer.