IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
|
| 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() ) : |
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
|
| 405 | 405 | } |
| 406 | 406 | |
| 407 | 407 | /** |
| | 408 | * Retrieve path of embed template in current or parent template. |
| | 409 | * By default the WordPress-template is returned. |
| | 410 | * |
| | 411 | * The template path is filterable via the dynamic {@see '$type_template'} hook, |
| | 412 | * e.g. 'embed_template'. |
| | 413 | * |
| | 414 | * @since 4.5.0 |
| | 415 | * |
| | 416 | * @see get_query_template() |
| | 417 | * |
| | 418 | * @return string Full path to embed template file. |
| | 419 | */ |
| | 420 | function get_embed_template() { |
| | 421 | |
| | 422 | $object = get_queried_object(); |
| | 423 | $templates = array(); |
| | 424 | if ( ! empty( $object->post_type ) ) { |
| | 425 | $templates[] = "embed-{$object->post_type}-{$object->post_name}.php"; |
| | 426 | $templates[] = "embed-{$object->post_type}.php"; |
| | 427 | } |
| | 428 | |
| | 429 | $templates[] = "embed.php"; |
| | 430 | |
| | 431 | $template = get_query_template( 'embed', $templates ); |
| | 432 | |
| | 433 | // Fallback to default WordPress-template. |
| | 434 | if ( $template === '' ) { |
| | 435 | $template = ABSPATH . WPINC . '/embed-template.php'; |
| | 436 | } |
| | 437 | |
| | 438 | return $template; |
| | 439 | } |
| | 440 | |
| | 441 | /** |
| 408 | 442 | * Retrieves the path of the singular template in current or parent template. |
| 409 | 443 | * |
| 410 | 444 | * The template path is filterable via the dynamic {@see '$type_template'} hook, |