diff --git a/wp-includes/class-wp-theme.php b/wp-includes/class-wp-theme.php
index 1759230331..f87ce28054 100644
a
|
b
|
final class WP_Theme implements ArrayAccess { |
1203 | 1203 | $types = explode( ',', _cleanup_header_comment( $type[1] ) ); |
1204 | 1204 | } |
1205 | 1205 | |
| 1206 | $extend_types = array(); |
| 1207 | foreach ( $types as $type ) { |
| 1208 | |
| 1209 | /** |
| 1210 | * Filter and extend post types supported by current template. |
| 1211 | * |
| 1212 | * @since x.x.x |
| 1213 | * |
| 1214 | * @param string $type Post type to extend. |
| 1215 | * @param string[] $extend_types Array of post types that extend $type parameter |
| 1216 | */ |
| 1217 | $extend_types = apply_filters( 'template_post_types', $type, $extend_types ); |
| 1218 | } |
| 1219 | $types = array_unique( array_merge( $extend_types, $types ) ); |
| 1220 | |
1206 | 1221 | foreach ( $types as $type ) { |
1207 | 1222 | $type = sanitize_key( $type ); |
1208 | 1223 | if ( ! isset( $post_templates[ $type ] ) ) { |