是嵌入式帖子的查询?
原型
is_embed()
返回值
(bool)
我们是否在嵌入式帖子中。
源文件
路径:wp-includes/query.php
<?php
...
function is_embed() {
global $wp_query;
if ( ! isset( $wp_query ) ) {
_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
return false;
}
return $wp_query->is_embed();
}
...
?>
其他
英文文档:https://developer.wordpress.org/reference/functions/is_embed/