Docs: Document the `$args` parameter of `wp_oembed_get()`.
Link to `wp_oembed_get()` as the canonical source when documenting additional arguments in various `WP_oEmbed` methods. Follow-up to [49620]. See #51269. Built from https://develop.svn.wordpress.org/trunk@49626 git-svn-id: http://core.svn.wordpress.org/trunk@49364 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
9f065de733
commit
1642f9bb1d
|
@ -238,11 +238,11 @@ class WP_oEmbed {
|
|||
*
|
||||
* @param string $url The URL to the content.
|
||||
* @param string|array $args {
|
||||
* Optional. Additional arguments and parameters for retrieving embed HTML. Default empty.
|
||||
* Optional. Additional provider arguments. Default empty.
|
||||
*
|
||||
* @type bool $discover Optional. Determines whether to attempt to discover link tags at the given URL
|
||||
* for an oEmbed provider when the oEmbed provider URL is not found in the
|
||||
* built-in providers list.
|
||||
* @type bool $discover Optional. Determines whether to attempt to discover link tags
|
||||
* at the given URL for an oEmbed provider when the provider URL
|
||||
* is not found in the built-in providers list. Default true.
|
||||
* }
|
||||
* @return string|false The oEmbed provider URL on success, false on failure.
|
||||
*/
|
||||
|
@ -334,15 +334,8 @@ class WP_oEmbed {
|
|||
* @since 4.8.0
|
||||
*
|
||||
* @param string $url The URL to the content that should be attempted to be embedded.
|
||||
* @param string|array $args {
|
||||
* Optional. Additional arguments and parameters for retrieving embed HTML. Default empty.
|
||||
*
|
||||
* @type int|string $width Optional. The "maxwidth" value passed to the provider URL.
|
||||
* @type int|string $height Optional. The "maxheight" value passed to the provider URL.
|
||||
* @type bool $discover Optional. Determines whether to attempt to discover link tags
|
||||
* at the given URL for an oEmbed provider when the oEmbed
|
||||
* provider URL is not found in the built-in providers list.
|
||||
* }
|
||||
* @param string|array $args Optional. Additional arguments for retrieving embed HTML.
|
||||
* See wp_oembed_get() for accepted arguments. Default empty.
|
||||
* @return object|false The result in the form of an object on success, false on failure.
|
||||
*/
|
||||
public function get_data( $url, $args = '' ) {
|
||||
|
@ -372,15 +365,8 @@ class WP_oEmbed {
|
|||
* @since 2.9.0
|
||||
*
|
||||
* @param string $url The URL to the content that should be attempted to be embedded.
|
||||
* @param string|array $args {
|
||||
* Optional. Additional arguments and parameters for retrieving embed HTML. Default empty.
|
||||
*
|
||||
* @type int|string $width Optional. The "maxwidth" value passed to the provider URL.
|
||||
* @type int|string $height Optional. The "maxheight" value passed to the provider URL.
|
||||
* @type bool $discover Optional. Determines whether to attempt to discover link tags
|
||||
* at the given URL for an oEmbed provider when the oEmbed
|
||||
* provider URL is not found in the built-in providers list.
|
||||
* }
|
||||
* @param string|array $args Optional. Additional arguments for retrieving embed HTML.
|
||||
* See wp_oembed_get() for accepted arguments. Default empty.
|
||||
* @return string|false The UNSANITIZED (and potentially unsafe) HTML that should be used to embed
|
||||
* on success, false on failure.
|
||||
*/
|
||||
|
@ -399,15 +385,8 @@ class WP_oEmbed {
|
|||
* @param null|string $result The UNSANITIZED (and potentially unsafe) HTML that should be used to embed.
|
||||
* Default null to continue retrieving the result.
|
||||
* @param string $url The URL to the content that should be attempted to be embedded.
|
||||
* @param string|array $args {
|
||||
* Optional. Additional arguments and parameters for retrieving embed HTML. Default empty.
|
||||
*
|
||||
* @type int|string $width Optional. The "maxwidth" value passed to the provider URL.
|
||||
* @type int|string $height Optional. The "maxheight" value passed to the provider URL.
|
||||
* @type bool $discover Optional. Determines whether to attempt to discover link tags
|
||||
* at the given URL for an oEmbed provider when the oEmbed
|
||||
* provider URL is not found in the built-in providers list.
|
||||
* }
|
||||
* @param string|array $args Optional. Additional arguments for retrieving embed HTML.
|
||||
* See wp_oembed_get() for accepted arguments. Default empty.
|
||||
*/
|
||||
$pre = apply_filters( 'pre_oembed_result', null, $url, $args );
|
||||
|
||||
|
@ -428,15 +407,8 @@ class WP_oEmbed {
|
|||
*
|
||||
* @param string|false $data The returned oEmbed HTML (false if unsafe).
|
||||
* @param string $url URL of the content to be embedded.
|
||||
* @param string|array $args {
|
||||
* Optional. Additional arguments and parameters for retrieving embed HTML. Default empty.
|
||||
*
|
||||
* @type int|string $width Optional. The "maxwidth" value passed to the provider URL.
|
||||
* @type int|string $height Optional. The "maxheight" value passed to the provider URL.
|
||||
* @type bool $discover Optional. Determines whether to attempt to discover link tags
|
||||
* at the given URL for an oEmbed provider when the oEmbed
|
||||
* provider URL is not found in the built-in providers list.
|
||||
* }
|
||||
* @param string|array $args Optional. Additional arguments for retrieving embed HTML.
|
||||
* See wp_oembed_get() for accepted arguments. Default empty.
|
||||
*/
|
||||
return apply_filters( 'oembed_result', $this->data2html( $data, $url ), $url, $args );
|
||||
}
|
||||
|
@ -538,15 +510,8 @@ class WP_oEmbed {
|
|||
*
|
||||
* @param string $provider The URL to the oEmbed provider.
|
||||
* @param string $url The URL to the content that is desired to be embedded.
|
||||
* @param string|array $args {
|
||||
* Optional. Additional arguments and parameters for retrieving embed HTML. Default empty.
|
||||
*
|
||||
* @type int|string $width Optional. The "maxwidth" value passed to the provider URL.
|
||||
* @type int|string $height Optional. The "maxheight" value passed to the provider URL.
|
||||
* @type bool $discover Optional. Determines whether to attempt to discover link tags
|
||||
* at the given URL for an oEmbed provider when the oEmbed
|
||||
* provider URL is not found in the built-in providers list.
|
||||
* }
|
||||
* @param string|array $args Optional. Additional arguments for retrieving embed HTML.
|
||||
* See wp_oembed_get() for accepted arguments. Default empty.
|
||||
* @return object|false The result in the form of an object on success, false on failure.
|
||||
*/
|
||||
public function fetch( $provider, $url, $args = '' ) {
|
||||
|
@ -565,15 +530,8 @@ class WP_oEmbed {
|
|||
*
|
||||
* @param string $provider URL of the oEmbed provider.
|
||||
* @param string $url URL of the content to be embedded.
|
||||
* @param string|array $args {
|
||||
* Optional. Additional arguments and parameters for retrieving embed HTML. Default empty.
|
||||
*
|
||||
* @type int|string $width Optional. The "maxwidth" value passed to the provider URL.
|
||||
* @type int|string $height Optional. The "maxheight" value passed to the provider URL.
|
||||
* @type bool $discover Optional. Determines whether to attempt to discover link tags
|
||||
* at the given URL for an oEmbed provider when the oEmbed
|
||||
* provider URL is not found in the built-in providers list.
|
||||
* }
|
||||
* @param array $args Optional. Additional arguments for retrieving embed HTML.
|
||||
* See wp_oembed_get() for accepted arguments. Default empty.
|
||||
*/
|
||||
$provider = apply_filters( 'oembed_fetch_url', $provider, $url, $args );
|
||||
|
||||
|
|
|
@ -99,8 +99,15 @@ function wp_embed_defaults( $url = '' ) {
|
|||
* @see WP_oEmbed
|
||||
*
|
||||
* @param string $url The URL that should be embedded.
|
||||
* @param array $args Optional. Additional arguments and parameters for retrieving embed HTML.
|
||||
* Default empty.
|
||||
* @param array $args {
|
||||
* Optional. Additional arguments for retrieving embed HTML. Default empty.
|
||||
*
|
||||
* @type int|string $width Optional. The `maxwidth` value passed to the provider URL.
|
||||
* @type int|string $height Optional. The `maxheight` value passed to the provider URL.
|
||||
* @type bool $discover Optional. Determines whether to attempt to discover link tags
|
||||
* at the given URL for an oEmbed provider when the provider URL
|
||||
* is not found in the built-in providers list. Default true.
|
||||
* }
|
||||
* @return string|false The embed HTML on success, false on failure.
|
||||
*/
|
||||
function wp_oembed_get( $url, $args = '' ) {
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.6-beta4-49625';
|
||||
$wp_version = '5.6-beta4-49626';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue