diff --git src/wp-includes/template-loader.php src/wp-includes/template-loader.php
index d3eebe9..5432523 100644
|
|
|
elseif ( is_feed() ) : |
| 39 | 39 | elseif ( is_trackback() ) : |
| 40 | 40 | include( ABSPATH . 'wp-trackback.php' ); |
| 41 | 41 | return; |
| 42 | | elseif ( is_embed() ) : |
| 43 | | $template = ABSPATH . WPINC . '/embed-template.php'; |
| 44 | | |
| 45 | | /** |
| 46 | | * Filter the template used for embedded posts. |
| 47 | | * |
| 48 | | * @since 4.4.0 |
| 49 | | * |
| 50 | | * @param string $template Path to the template file. |
| 51 | | */ |
| 52 | | $template = apply_filters( 'embed_template', $template ); |
| 53 | | |
| 54 | | include ( $template ); |
| 55 | | return; |
| 56 | 42 | endif; |
| 57 | 43 | |
| 58 | 44 | if ( defined('WP_USE_THEMES') && WP_USE_THEMES ) : |
| 59 | 45 | $template = false; |
| 60 | | if ( is_404() && $template = get_404_template() ) : |
| | 46 | if ( is_embed() && $template = get_embed_template() ) : |
| | 47 | elseif ( is_404() && $template = get_404_template() ) : |
| 61 | 48 | elseif ( is_search() && $template = get_search_template() ) : |
| 62 | 49 | elseif ( is_front_page() && $template = get_front_page_template() ) : |
| 63 | 50 | elseif ( is_home() && $template = get_home_template() ) : |
| … |
… |
if ( defined('WP_USE_THEMES') && WP_USE_THEMES ) : |
| 78 | 65 | else : |
| 79 | 66 | $template = get_index_template(); |
| 80 | 67 | endif; |
| | 68 | |
| 81 | 69 | /** |
| 82 | 70 | * Filter the path of the current template before including it. |
| 83 | 71 | * |
diff --git src/wp-includes/template.php src/wp-includes/template.php
index 620d89d..26b8826 100644
|
|
|
function get_comments_popup_template() { |
| 488 | 488 | } |
| 489 | 489 | |
| 490 | 490 | /** |
| | 491 | * Retrieve path of embed template in current or parent template. |
| | 492 | * |
| | 493 | * Checks for embed template in current template, if it exists or in the |
| | 494 | * parent template. |
| | 495 | * |
| | 496 | * The template path is filterable via the dynamic {@see '$type_template'} hook, |
| | 497 | * e.g. 'embed_template'. |
| | 498 | * |
| | 499 | * @since 4.4.0 |
| | 500 | * |
| | 501 | * @see get_query_template() |
| | 502 | * |
| | 503 | * @return string Full path to embed template file. |
| | 504 | */ |
| | 505 | function get_embed_template() { |
| | 506 | $template = get_query_template( 'embed', array( 'wp-embed.php' ) ); |
| | 507 | |
| | 508 | if ( '' === $template ) { |
| | 509 | $template = ABSPATH . WPINC . '/embed-template.php'; |
| | 510 | } |
| | 511 | |
| | 512 | return $template; |
| | 513 | } |
| | 514 | |
| | 515 | /** |
| 491 | 516 | * Retrieve the name of the highest priority template file that exists. |
| 492 | 517 | * |
| 493 | 518 | * Searches in the STYLESHEETPATH before TEMPLATEPATH so that themes which |