is_post_embeddable
Filter whether a post is embeddable.
Usage
add_filter( 'is_post_embeddable', 'wp_kama_is_post_embeddable_filter', 10, 2 ); /** * Function for `is_post_embeddable` filter-hook. * * @param bool $is_embeddable Whether the post is embeddable. * @param WP_Post $post Post object. * * @return bool */ function wp_kama_is_post_embeddable_filter( $is_embeddable, $post ){ // filter... return $is_embeddable; }
- $is_embeddable(true|false)
- Whether the post is embeddable.
- $post(WP_Post)
- Post object.
Changelog
Since 6.8.0 | Introduced. |
Where the hook is called
is_post_embeddable
wp-includes/post.php 2509
return apply_filters( 'is_post_embeddable', $is_embeddable, $post );