Changeset 52365 for trunk/src/wp-includes/class-wp-theme.php
- Timestamp:
- 12/14/2021 02:44:46 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-theme.php
r52334 r52365 1251 1251 1252 1252 if ( current_theme_supports( 'block-templates' ) ) { 1253 $block_templates = get_block_templates( array(), 'wp_template' ); 1253 1254 foreach ( get_post_types( array( 'public' => true ) ) as $type ) { 1254 $block_templates = get_block_templates( array( 'post_type' => $type ), 'wp_template' );1255 1255 foreach ( $block_templates as $block_template ) { 1256 if ( ! $block_template->is_custom ) { 1257 continue; 1258 } 1259 1260 if ( isset( $block_template->post_types ) && ! in_array( $type, $block_template->post_types, true ) ) { 1261 continue; 1262 } 1263 1256 1264 $post_templates[ $type ][ $block_template->slug ] = $block_template->title; 1257 1265 }
Note: See TracChangeset
for help on using the changeset viewer.