Changeset 52631
- Timestamp:
- 01/24/2022 03:26:56 PM (16 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/block-template-utils.php
r52610 r52631 499 499 * @access private 500 500 * 501 * @param array $template_file Theme file.502 * @param array$template_type 'wp_template' or 'wp_template_part'.501 * @param array $template_file Theme file. 502 * @param string $template_type 'wp_template' or 'wp_template_part'. 503 503 * 504 504 * @return WP_Block_Template Template. … … 601 601 * @since 5.8.0 602 602 * 603 * @param array $query {603 * @param array $query { 604 604 * Optional. Arguments to retrieve templates. 605 605 * … … 609 609 * @type string $post_type Post type to get the templates for. 610 610 * } 611 * @param array$template_type 'wp_template' or 'wp_template_part'.611 * @param string $template_type 'wp_template' or 'wp_template_part'. 612 612 * 613 613 * @return array Templates. … … 623 623 * @param WP_Block_Template[]|null $block_templates Return an array of block templates to short-circuit the default query, 624 624 * or null to allow WP to run it's normal queries. 625 * @param array $query {625 * @param array $query { 626 626 * Optional. Arguments to retrieve templates. 627 627 * … … 630 630 * @type string $post_type Post type to get the templates for. 631 631 * } 632 * @param array$template_type wp_template or wp_template_part.632 * @param string $template_type wp_template or wp_template_part. 633 633 */ 634 634 $templates = apply_filters( 'pre_get_block_templates', null, $query, $template_type ); … … 726 726 * 727 727 * @param WP_Block_Template[] $query_result Array of found block templates. 728 * @param array $query {728 * @param array $query { 729 729 * Optional. Arguments to retrieve templates. 730 730 * … … 732 732 * @type int $wp_id Post ID of customized template. 733 733 * } 734 * @param array$template_type wp_template or wp_template_part.734 * @param string $template_type wp_template or wp_template_part. 735 735 */ 736 736 return apply_filters( 'get_block_templates', $query_result, $query, $template_type ); … … 743 743 * 744 744 * @param string $id Template unique identifier (example: theme_slug//template_slug). 745 * @param array$template_type Optional. Template type: `'wp_template'` or '`wp_template_part'`.745 * @param string $template_type Optional. Template type: `'wp_template'` or '`wp_template_part'`. 746 746 * Default `'wp_template'`. 747 747 * … … 759 759 * or null to allow WP to run its normal queries. 760 760 * @param string $id Template unique identifier (example: theme_slug//template_slug). 761 * @param array$template_type Template type: `'wp_template'` or '`wp_template_part'`.761 * @param string $template_type Template type: `'wp_template'` or '`wp_template_part'`. 762 762 */ 763 763 $block_template = apply_filters( 'pre_get_block_template', null, $id, $template_type ); … … 816 816 * 817 817 * @param string $id Template unique identifier (example: theme_slug//template_slug). 818 * @param array$template_type Optional. Template type: `'wp_template'` or '`wp_template_part'`.818 * @param string $template_type Optional. Template type: `'wp_template'` or '`wp_template_part'`. 819 819 * Default `'wp_template'`. 820 * @return WP_Block_Template|null The found block template, or null if there isn't one. 820 821 */ 821 822 function get_block_file_template( $id, $template_type = 'wp_template' ) { … … 825 826 * Return a non-null value to bypass the WordPress queries. 826 827 * 827 *828 828 * @since 5.9.0 829 829 * 830 830 * @param WP_Block_Template|null $block_template Return block template object to short-circuit the default query, 831 831 * or null to allow WP to run its normal queries. 832 * @param string $idTemplate unique identifier (example: theme_slug//template_slug).833 * @param array $template_typeTemplate type: `'wp_template'` or '`wp_template_part'`.832 * @param string $id Template unique identifier (example: theme_slug//template_slug). 833 * @param string $template_type Template type: `'wp_template'` or '`wp_template_part'`. 834 834 */ 835 835 $block_template = apply_filters( 'pre_get_block_file_template', null, $id, $template_type ); … … 840 840 $parts = explode( '//', $id, 2 ); 841 841 if ( count( $parts ) < 2 ) { 842 /** This filter is documented at the end of this function*/842 /** This filter is documented in wp-includes/block-template-utils.php */ 843 843 return apply_filters( 'get_block_file_template', null, $id, $template_type ); 844 844 } … … 846 846 847 847 if ( wp_get_theme()->get_stylesheet() !== $theme ) { 848 /** This filter is documented at the end of this function*/848 /** This filter is documented in wp-includes/block-template-utils.php */ 849 849 return apply_filters( 'get_block_file_template', null, $id, $template_type ); 850 850 } … … 852 852 $template_file = _get_block_template_file( $template_type, $slug ); 853 853 if ( null === $template_file ) { 854 /** This filter is documented at the end of this function*/854 /** This filter is documented in wp-includes/block-template-utils.php */ 855 855 return apply_filters( 'get_block_file_template', null, $id, $template_type ); 856 856 } … … 863 863 * @since 5.9.0 864 864 * 865 * @param WP_Block_Template $block_template The found block template.866 * @param string $id Template unique identifier (example: theme_slug//template_slug).867 * @param array$template_type Template type: `'wp_template'` or '`wp_template_part'`.865 * @param WP_Block_Template|null $block_template The found block template, or null if there is none. 866 * @param string $id Template unique identifier (example: theme_slug//template_slug). 867 * @param string $template_type Template type: `'wp_template'` or '`wp_template_part'`. 868 868 */ 869 869 return apply_filters( 'get_block_file_template', $block_template, $id, $template_type );
Note: See TracChangeset
for help on using the changeset viewer.