get_embed_template()
最后更新于:2021-11-26 09:08:35
get_embed_template()Retrieves an embed template path in the current or parent template.
响应
(string) Full path to embed template file.
源文件
文件: gc-includes/template.php
function get_embed_template() {
$object = get_queried_object();
$templates = array();
if ( ! empty( $object->post_type ) ) {
$post_format = get_post_format( $object );
if ( $post_format ) {
$templates[] = "embed-{$object->post_type}-{$post_format}.php";
}
$templates[] = "embed-{$object->post_type}.php";
}
$templates[] = 'embed.php';
return get_query_template( 'embed', $templates );
}