oembed_request_post_id
Filters the determined post ID.
Использование
add_filter( 'oembed_request_post_id', 'wp_kama_oembed_request_post_id_filter', 10, 2 ); /** * Function for `oembed_request_post_id` filter-hook. * * @param int $post_id The post ID. * @param string $url The requested URL. * * @return int */ function wp_kama_oembed_request_post_id_filter( $post_id, $url ){ // filter... return $post_id; }
- $post_id(int)
- The post ID.
- $url(строка)
- The requested URL.
Список изменений
С версии 4.4.0 | Введена. |
Где вызывается хук
oembed_request_post_id
oembed_request_post_id
wp-includes/class-wp-oembed-controller.php 130
$post_id = apply_filters( 'oembed_request_post_id', $post_id, $request['url'] );
wp-includes/embed.php 668
$post_id = apply_filters( 'oembed_request_post_id', $post_id, $url );