oembed_request_post_id WordPress Filter Hook

The oembed_request_post_id Wordpress hook enables you to set the post ID for an oEmbed request. This is useful for ensuring that the correct post is embedded when using the [embed] shortcode.

apply_filters( 'oembed_request_post_id', int $post_id, string $url ) #

Filters the determined post ID.


Parameters

$post_id

(int)The post ID.

$url

(string)The requested URL.


Top ↑

Source

File: wp-includes/class-wp-oembed-controller.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
4.4.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.