Filter hook 'is_post_embeddable'

in WP Core File wp-includes/post.php at line 2509

View Source

is_post_embeddable

Filter Hook
Description
Filter whether a post is embeddable.

Hook Information

File Location wp-includes/post.php View on GitHub
Hook Type Filter
Line Number 2509

Hook Parameters

Type Name Description
bool $is_embeddable Whether the post is embeddable.
WP_Post $post Post object.

Usage Examples

Basic Usage
<?php
// Hook into is_post_embeddable
add_filter('is_post_embeddable', 'my_custom_filter', 10, 2);

function my_custom_filter($is_embeddable, $post) {
    // Your custom filtering logic here
    return $is_embeddable;
}

Source Code Context

wp-includes/post.php:2509 - How this hook is used in WordPress core
<?php
2504  	 * @since 6.8.0
2505  	 *
2506  	 * @param bool    $is_embeddable Whether the post is embeddable.
2507  	 * @param WP_Post $post          Post object.
2508  	 */
2509  	return apply_filters( 'is_post_embeddable', $is_embeddable, $post );
2510  }
2511  
2512  /**
2513   * Retrieves an array of the latest posts, or posts matching the given criteria.
2514   *

PHP Documentation

<?php
/**
	 * 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.
	 */
Quick Info
  • Hook Type: Filter
  • Parameters: 2
  • File: wp-includes/post.php
Related Hooks

Related hooks will be displayed here in future updates.