oembed_request_post_id filter-hook . WP 4.4.0
Filters the determined post ID.
Usage
add_filter( 'oembed_request_post_id', 'filter_function_name_6835', 10, 2 ); function filter_function_name_6835( $post_id, $url ){ // filter... return $post_id; }
- $post_id(int)
- The post ID.
- $url(string)
- The requested URL.
Changelog
Since 4.4.0 | Introduced. |
Where the hook is called
oembed_request_post_id
oembed_request_post_id
wp-includes/class-wp-oembed-controller.php 129
$post_id = apply_filters( 'oembed_request_post_id', $post_id, $request['url'] );
wp-includes/embed.php 635
$post_id = apply_filters( 'oembed_request_post_id', $post_id, $url );