Changeset 58707
- Timestamp:
- 07/11/2024 01:38:30 PM (4 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-templates-controller.php
r58705 r58707 669 669 */ 670 670 public function prepare_item_for_response( $item, $request ) { 671 // Resolve pattern blocks so they don't need to be resolved client-side 672 // in the editor, improving performance. 671 /* 672 * Resolve pattern blocks so they don't need to be resolved client-side 673 * in the editor, improving performance. 674 */ 673 675 $blocks = parse_blocks( $item->content ); 674 676 $blocks = resolve_pattern_blocks( $blocks ); … … 807 809 private static function get_wp_templates_original_source_field( $template_object ) { 808 810 if ( 'wp_template' === $template_object->type || 'wp_template_part' === $template_object->type ) { 809 // Added by theme. 810 // Template originally provided by a theme, but customized by a user. 811 // Templates originally didn't have the 'origin' field so identify 812 // older customized templates by checking for no origin and a 'theme' 813 // or 'custom' source. 811 /* 812 * Added by theme. 813 * Template originally provided by a theme, but customized by a user. 814 * Templates originally didn't have the 'origin' field so identify 815 * older customized templates by checking for no origin and a 'theme' 816 * or 'custom' source. 817 */ 814 818 if ( $template_object->has_theme_file && 815 819 ( 'theme' === $template_object->origin || ( … … 832 836 } 833 837 834 // Added by site. 835 // Template was created from scratch, but has no author. Author support 836 // was only added to templates in WordPress 5.9. Fallback to showing the 837 // site logo and title. 838 /* 839 * Added by site. 840 * Template was created from scratch, but has no author. Author support 841 * was only added to templates in WordPress 5.9. Fallback to showing the 842 * site logo and title. 843 */ 838 844 if ( empty( $template_object->has_theme_file ) && 'custom' === $template_object->source && empty( $template_object->author ) ) { 839 845 return 'site';
Note: See TracChangeset
for help on using the changeset viewer.