diff --git a/src/wp-includes/class-wp-oembed.php b/src/wp-includes/class-wp-oembed.php
index 881de68103..a74540d55b 100644
a
|
b
|
class WP_oEmbed { |
247 | 247 | * |
248 | 248 | * @see WP_oEmbed::discover() |
249 | 249 | * |
250 | | * @param string $url The URL to the content. |
251 | | * @param string|array $args Optional provider arguments. |
| 250 | * @param string $url The URL to the content. |
| 251 | * @param string|array $args { |
| 252 | * Optional. Additional arguments and parameters for retrieving embed HTML. Default empty. |
| 253 | * |
| 254 | * @type bool $discover Optional. Determines whether to attempt to discover link tags at the given URL |
| 255 | * for an oEmbed provider when the oEmbed provider URL is not found in the |
| 256 | * built-in providers list. |
| 257 | * } |
252 | 258 | * @return string|false The oEmbed provider URL on success, false on failure. |
253 | 259 | */ |
254 | 260 | public function get_provider( $url, $args = '' ) { |
… |
… |
class WP_oEmbed { |
338 | 344 | * |
339 | 345 | * @since 4.8.0 |
340 | 346 | * |
341 | | * @param string $url The URL to the content that should be attempted to be embedded. |
342 | | * @param array|string $args Optional. Arguments, usually passed from a shortcode. Default empty. |
| 347 | * @param string $url The URL to the content that should be attempted to be embedded. |
| 348 | * @param string|array $args { |
| 349 | * Optional. Additional arguments and parameters for retrieving embed HTML. Default empty. |
| 350 | * |
| 351 | * @type int|string $width Optional. The "maxwidth" value passed to the provider URL. |
| 352 | * @type int|string $height Optional. The "maxheight" value passed to the provider URL. |
| 353 | * @type bool $discover Optional. Determines whether to attempt to discover link tags at the given URL |
| 354 | * for an oEmbed provider when the oEmbed provider URL is not found in the |
| 355 | * built-in providers list. |
| 356 | * } |
343 | 357 | * @return object|false The result in the form of an object on success, false on failure. |
344 | 358 | */ |
345 | 359 | public function get_data( $url, $args = '' ) { |
… |
… |
class WP_oEmbed { |
363 | 377 | /** |
364 | 378 | * The do-it-all function that takes a URL and attempts to return the HTML. |
365 | 379 | * |
366 | | * @see WP_oEmbed::fetch() |
| 380 | * @since 2.9.0 |
| 381 | * |
367 | 382 | * @see WP_oEmbed::data2html() |
368 | 383 | * |
369 | | * @since 2.9.0 |
| 384 | * @see WP_oEmbed::fetch() |
| 385 | * |
| 386 | * @param string $url The URL to the content that should be attempted to be embedded. |
| 387 | * @param string|array $args { |
| 388 | * Optional. Additional arguments and parameters for retrieving embed HTML. Default empty. |
370 | 389 | * |
371 | | * @param string $url The URL to the content that should be attempted to be embedded. |
372 | | * @param array|string $args Optional. Arguments, usually passed from a shortcode. Default empty. |
| 390 | * @type int|string $width Optional. The "maxwidth" value passed to the provider URL. |
| 391 | * @type int|string $height Optional. The "maxheight" value passed to the provider URL. |
| 392 | * @type bool $discover Optional. Determines whether to attempt to discover link tags at the given URL |
| 393 | * for an oEmbed provider when the oEmbed provider URL is not found in the |
| 394 | * built-in providers list. |
| 395 | * } |
373 | 396 | * @return string|false The UNSANITIZED (and potentially unsafe) HTML that should be used to embed on success, |
374 | 397 | * false on failure. |
375 | 398 | */ |
… |
… |
class WP_oEmbed { |
385 | 408 | * |
386 | 409 | * @since 4.5.3 |
387 | 410 | * |
388 | | * @param null|string $result The UNSANITIZED (and potentially unsafe) HTML that should be used to embed. |
389 | | * Default null to continue retrieving the result. |
390 | | * @param string $url The URL to the content that should be attempted to be embedded. |
391 | | * @param array $args Optional. Arguments, usually passed from a shortcode. Default empty. |
| 411 | * @param null|string $result The UNSANITIZED (and potentially unsafe) HTML that should be used to embed. |
| 412 | * Default null to continue retrieving the result. |
| 413 | * @param string $url The URL to the content that should be attempted to be embedded. |
| 414 | * @param string|array $args { |
| 415 | * Optional. Additional arguments and parameters for retrieving embed HTML. Default empty. |
| 416 | * |
| 417 | * @type int|string $width Optional. The "maxwidth" value passed to the provider URL. |
| 418 | * @type int|string $height Optional. The "maxheight" value passed to the provider URL. |
| 419 | * @type bool $discover Optional. Determines whether to attempt to discover link tags at the given URL |
| 420 | * for an oEmbed provider when the oEmbed provider URL is not found in the |
| 421 | * built-in providers list. |
| 422 | * } |
392 | 423 | */ |
393 | 424 | $pre = apply_filters( 'pre_oembed_result', null, $url, $args ); |
394 | 425 | |
… |
… |
class WP_oEmbed { |
407 | 438 | * |
408 | 439 | * @since 2.9.0 |
409 | 440 | * |
410 | | * @param string|false $data The returned oEmbed HTML (false if unsafe). |
411 | | * @param string $url URL of the content to be embedded. |
412 | | * @param array $args Optional arguments, usually passed from a shortcode. |
| 441 | * @param string|false $data The returned oEmbed HTML (false if unsafe). |
| 442 | * @param string $url URL of the content to be embedded. |
| 443 | * @param string|array $args { |
| 444 | * Optional. Additional arguments and parameters for retrieving embed HTML. Default empty. |
| 445 | * |
| 446 | * @type int|string $width Optional. The "maxwidth" value passed to the provider URL. |
| 447 | * @type int|string $height Optional. The "maxheight" value passed to the provider URL. |
| 448 | * @type bool $discover Optional. Determines whether to attempt to discover link tags at the given URL |
| 449 | * for an oEmbed provider when the oEmbed provider URL is not found in the |
| 450 | * built-in providers list. |
| 451 | * } |
413 | 452 | */ |
414 | 453 | return apply_filters( 'oembed_result', $this->data2html( $data, $url ), $url, $args ); |
415 | 454 | } |
… |
… |
class WP_oEmbed { |
511 | 550 | * |
512 | 551 | * @param string $provider The URL to the oEmbed provider. |
513 | 552 | * @param string $url The URL to the content that is desired to be embedded. |
514 | | * @param array|string $args Optional. Arguments, usually passed from a shortcode. Default empty. |
| 553 | * @param string|array $args { |
| 554 | * Optional. Additional arguments and parameters for retrieving embed HTML. Default empty. |
| 555 | * |
| 556 | * @type int|string $width Optional. The "maxwidth" value passed to the provider URL. |
| 557 | * @type int|string $height Optional. The "maxheight" value passed to the provider URL. |
| 558 | * @type bool $discover Optional. Determines whether to attempt to discover link tags at the given URL |
| 559 | * for an oEmbed provider when the oEmbed provider URL is not found in the |
| 560 | * built-in providers list. |
| 561 | * } |
515 | 562 | * @return object|false The result in the form of an object on success, false on failure. |
516 | 563 | */ |
517 | 564 | public function fetch( $provider, $url, $args = '' ) { |
… |
… |
class WP_oEmbed { |
528 | 575 | * @since 2.9.0 |
529 | 576 | * @since 4.9.0 The `dnt` (Do Not Track) query parameter was added to all oEmbed provider URLs. |
530 | 577 | * |
531 | | * @param string $provider URL of the oEmbed provider. |
532 | | * @param string $url URL of the content to be embedded. |
533 | | * @param array $args Optional arguments, usually passed from a shortcode. |
| 578 | * @param string $provider URL of the oEmbed provider. |
| 579 | * @param string $url URL of the content to be embedded. |
| 580 | * @param string|array $args { |
| 581 | * Optional. Additional arguments and parameters for retrieving embed HTML. Default empty. |
| 582 | * |
| 583 | * @type int|string $width Optional. The "maxwidth" value passed to the provider URL. |
| 584 | * @type int|string $height Optional. The "maxheight" value passed to the provider URL. |
| 585 | * @type bool $discover Optional. Determines whether to attempt to discover link tags at the given URL |
| 586 | * for an oEmbed provider when the oEmbed provider URL is not found in the |
| 587 | * built-in providers list. |
| 588 | * } |
534 | 589 | */ |
535 | 590 | $provider = apply_filters( 'oembed_fetch_url', $provider, $url, $args ); |
536 | 591 | |
diff --git a/src/wp-includes/embed.php b/src/wp-includes/embed.php
index a9704b7872..0eeef7f612 100644
a
|
b
|
function wp_embed_defaults( $url = '' ) { |
98 | 98 | * |
99 | 99 | * @see WP_oEmbed |
100 | 100 | * |
101 | | * @param string $url The URL that should be embedded. |
102 | | * @param array $args Optional. Additional arguments and parameters for retrieving embed HTML. |
103 | | * Default empty. |
| 101 | * @param string $url The URL that should be embedded. |
| 102 | * @param string|array $args { |
| 103 | * Optional. Additional arguments and parameters for retrieving embed HTML. Default empty. |
| 104 | * |
| 105 | * @type int|string $width Optional. The "maxwidth" value passed to the provider URL. |
| 106 | * @type int|string $height Optional. The "maxheight" value passed to the provider URL. |
| 107 | * @type bool $discover Optional. Determines whether to attempt to discover link tags at the given URL |
| 108 | * for an oEmbed provider when the oEmbed provider URL is not found in the |
| 109 | * built-in providers list. |
| 110 | * } |
104 | 111 | * @return string|false The embed HTML on success, false on failure. |
105 | 112 | */ |
106 | 113 | function wp_oembed_get( $url, $args = '' ) { |