Changeset 55744
- Timestamp:
- 05/11/2023 09:01:55 AM (21 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/block-template-utils.php
r55732 r55744 250 250 * @param string $template_type 'wp_template' or 'wp_template_part'. 251 251 * @param string $slug Template slug. 252 * @return array|null Template. 252 * @return array|null { 253 * Array with template metadata if $template_type is one of 'wp_template' or 'wp_template_part'. 254 * null otherwise. 255 * 256 * @type string $slug Template slug. 257 * @type string $path Template file path. 258 * @type string $theme Theme slug. 259 * @type string $type Template type. 260 * @type string $area Template area. Only for 'wp_template_part'. 261 * @type string $title Optional. Template title. 262 * @type string[] $postTypes Optional. List of post types that the template supports. Only for 'wp_template'. 263 * } 253 264 */ 254 265 function _get_block_template_file( $template_type, $slug ) { … … 358 369 359 370 if ( 'wp_template_part' === $template_type ) { 360 /*361 * Structure of a wp_template_part item:362 *363 * - slug364 * - path365 * - theme366 * - type367 * - area368 * - title (optional)369 */370 371 $candidate = _add_block_template_part_area_info( $new_template_item ); 371 372 if ( ! isset( $area ) || ( isset( $area ) && $area === $candidate['area'] ) ) { … … 375 376 376 377 if ( 'wp_template' === $template_type ) { 377 /*378 * Structure of a wp_template item:379 *380 * - slug381 * - path382 * - theme383 * - type384 * - title (optional)385 * - postTypes (optional)386 */387 378 $candidate = _add_block_template_info( $new_template_item ); 388 379 if (
Note: See TracChangeset
for help on using the changeset viewer.