Changeset 54817 for trunk/src/wp-includes/block-template-utils.php
- Timestamp:
- 11/11/2022 04:24:47 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/block-template-utils.php
r54761 r54817 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(); … … 711 711 $theme = $terms[0]->name; 712 712 $template_file = _get_block_template_file( $post->post_type, $post->post_name ); 713 $has_theme_file = wp_get_theme()->get_stylesheet() === $theme && null !== $template_file;713 $has_theme_file = get_stylesheet() === $theme && null !== $template_file; 714 714 715 715 $origin = get_post_meta( $post->ID, 'origin', true ); … … 908 908 'taxonomy' => 'wp_theme', 909 909 'field' => 'name', 910 'terms' => wp_get_theme()->get_stylesheet(),910 'terms' => get_stylesheet(), 911 911 ), 912 912 ), … … 974 974 975 975 $is_not_custom = false === array_search( 976 wp_get_theme()->get_stylesheet() . '//' . $template_file['slug'],976 get_stylesheet() . '//' . $template_file['slug'], 977 977 wp_list_pluck( $query_result, 'id' ), 978 978 true … … 1115 1115 list( $theme, $slug ) = $parts; 1116 1116 1117 if ( wp_get_theme()->get_stylesheet() !== $theme ) {1117 if ( get_stylesheet() !== $theme ) { 1118 1118 /** This filter is documented in wp-includes/block-template-utils.php */ 1119 1119 return apply_filters( 'get_block_file_template', null, $id, $template_type );
Note: See TracChangeset
for help on using the changeset viewer.