On this page
is_embed(): bool
Is the query for an embedded post?
Return
bool Whether the query is for an embedded post.
Source
File: wp-includes/query.php. View all references
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();
}
Related
Uses
| Uses | Description |
|---|---|
| WP_Query::is_embed() wp-includes/class-wp-query.php | Is the query for an embedded post? |
| __() wp-includes/l10n.php | Retrieves the translation of $text. |
| _doing_it_wrong() wp-includes/functions.php | Marks something as being incorrectly called. |
Used By
| Used By | Description |
|---|---|
| wp_robots_noindex_embeds() wp-includes/robots-template.php | Adds |
| wp_embed_excerpt_more() wp-includes/embed.php | Filters the string in the ‘more’ link displayed after a trimmed excerpt. |
| wp_old_slug_redirect() wp-includes/query.php | Redirect old slugs to the correct permalink. |
| is_admin_bar_showing() wp-includes/admin-bar.php | Determines whether the admin bar should be showing. |
Changelog
| Version | Description |
|---|---|
| 4.4.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/is_embed