is_embed(): bool
- Since
- 4.4.0
- Source
wp-includes/query.php:898
Is the query for an embedded post?
Return
bool- Whether the query is for an embedded post.
Uses · 2
- _doing_it_wrong()Marks something as being incorrectly called.
- __()Retrieves the translation of $text.
Used by · 5
- is_admin_bar_showing()Determines whether the admin bar should be showing.
- wp_embed_excerpt_more()Filters the string in the 'more' link displayed after a trimmed excerpt.
- wp_hoist_late_printed_styles()Adds the hooks needed for CSS output to be delayed until after the content of the page has been established.
- wp_old_slug_redirect()Redirect old slugs to the correct permalink.
- wp_robots_noindex_embeds()Adds `noindex` to the robots meta tag for embeds.
Source
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();}History
Introduced in 4.4.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 7.1.0 tag, from
src/wp-includes/query.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it. - Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.