Changeset 54818 for branches/6.1/src/wp-includes/block-template-utils.php
- Timestamp:
- 11/11/2022 04:29:27 PM (2 years ago)
- Location:
- branches/6.1
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/6.1
-
branches/6.1/src/wp-includes/block-template-utils.php
r54767 r54818 438 438 ! isset( $block['attrs']['theme'] ) 439 439 ) { 440 $block['attrs']['theme'] = wp_get_theme()->get_stylesheet();440 $block['attrs']['theme'] = get_stylesheet(); 441 441 $has_updated_content = true; 442 442 } … … 500 500 $default_template_types = get_default_block_template_types(); 501 501 $template_content = file_get_contents( $template_file['path'] ); 502 $theme = wp_get_theme()->get_stylesheet();502 $theme = get_stylesheet(); 503 503 504 504 $template = new WP_Block_Template(); … … 707 707 $theme = $terms[0]->name; 708 708 $template_file = _get_block_template_file( $post->post_type, $post->post_name ); 709 $has_theme_file = wp_get_theme()->get_stylesheet() === $theme && null !== $template_file;709 $has_theme_file = get_stylesheet() === $theme && null !== $template_file; 710 710 711 711 $origin = get_post_meta( $post->ID, 'origin', true ); … … 904 904 'taxonomy' => 'wp_theme', 905 905 'field' => 'name', 906 'terms' => wp_get_theme()->get_stylesheet(),906 'terms' => get_stylesheet(), 907 907 ), 908 908 ), … … 970 970 971 971 $is_not_custom = false === array_search( 972 wp_get_theme()->get_stylesheet() . '//' . $template_file['slug'],972 get_stylesheet() . '//' . $template_file['slug'], 973 973 wp_list_pluck( $query_result, 'id' ), 974 974 true … … 1111 1111 list( $theme, $slug ) = $parts; 1112 1112 1113 if ( wp_get_theme()->get_stylesheet() !== $theme ) {1113 if ( get_stylesheet() !== $theme ) { 1114 1114 /** This filter is documented in wp-includes/block-template-utils.php */ 1115 1115 return apply_filters( 'get_block_file_template', null, $id, $template_type );
Note: See TracChangeset
for help on using the changeset viewer.