wpseek.com
A WordPress-centric search engine for devs and theme authors
is_post_embeddable › WordPress Function
Since6.8.0
Deprecatedn/a
› is_post_embeddable ( $post = null )
| Parameters: |
|
| Returns: |
|
| Defined at: |
|
| Codex: |
Determines whether a post is embeddable.
Related Functions: is_post_type_viewable, get_post_embed_url, is_post_publicly_viewable, get_post_embed_html, is_post_status_viewable
Source
function is_post_embeddable( $post = null ) {
$post = get_post( $post );
if ( ! $post ) {
return false;
}
$post_type = get_post_type_object( $post->post_type );
if ( ! $post_type ) {
return false;
}
$is_embeddable = $post_type->embeddable;
/**
* Filter whether a post is embeddable.
*
* @since 6.8.0
*
* @param bool $is_embeddable Whether the post is embeddable.
* @param WP_Post $post Post object.
*/
return apply_filters( 'is_post_embeddable', $is_embeddable, $post );
}