Changeset 56413
- Timestamp:
- 08/18/2023 01:20:56 PM (13 months ago)
- Location:
- trunk/src/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/block-template-utils.php
r56385 r56413 412 412 } 413 413 414 $theme_data = WP_Theme_JSON_Resolver::get_theme_data( array(), array( 'with_supports' => false ) )->get_custom_templates();414 $theme_data = wp_get_theme_data_custom_templates(); 415 415 if ( isset( $theme_data[ $template_item['slug'] ] ) ) { 416 416 $template_item['title'] = $theme_data[ $template_item['slug'] ]['title']; -
trunk/src/wp-includes/global-styles-and-settings.php
r56412 r56413 443 443 444 444 /** 445 * Returns the metadata for the custom templates defined by the theme via theme.json. 446 * 447 * @since 6.4.0 448 * 449 * @return array Associative array of `$template_name => $template_data` pairs, 450 * with `$template_data` having "title" and "postTypes" fields. 451 */ 452 function wp_get_theme_data_custom_templates() { 453 return WP_Theme_JSON_Resolver::get_theme_data( array(), array( 'with_supports' => false ) )->get_custom_templates(); 454 } 455 456 /** 445 457 * Returns the metadata for the template parts defined by the theme. 446 458 *
Note: See TracChangeset
for help on using the changeset viewer.