diff --git a/src/wp-includes/class-wp-oembed.php b/src/wp-includes/class-wp-oembed.php
index 9e688fc69e..9ce21d0ce6 100644
|
a
|
b
|
class WP_oEmbed { |
| 237 | 237 | * @see WP_oEmbed::discover() |
| 238 | 238 | * |
| 239 | 239 | * @param string $url The URL to the content. |
| 240 | | * @param string|array $args Optional provider arguments. |
| | 240 | * @param string|array $args { |
| | 241 | * Optional. Additional arguments and parameters for retrieving embed HTML. Default empty. |
| | 242 | * |
| | 243 | * @type bool $discover Optional. Determines whether to attempt to discover link tags at the given URL |
| | 244 | * for an oEmbed provider when the oEmbed provider URL is not found in the |
| | 245 | * built-in providers list. |
| | 246 | * } |
| 241 | 247 | * @return string|false The oEmbed provider URL on success, false on failure. |
| 242 | 248 | */ |
| 243 | 249 | public function get_provider( $url, $args = '' ) { |
| … |
… |
class WP_oEmbed { |
| 328 | 334 | * @since 4.8.0 |
| 329 | 335 | * |
| 330 | 336 | * @param string $url The URL to the content that should be attempted to be embedded. |
| 331 | | * @param array|string $args Optional. Arguments, usually passed from a shortcode. Default empty. |
| | 337 | * @param string|array $args { |
| | 338 | * Optional. Additional arguments and parameters for retrieving embed HTML. Default empty. |
| | 339 | * |
| | 340 | * @type int|string $width Optional. The "maxwidth" value passed to the provider URL. |
| | 341 | * @type int|string $height Optional. The "maxheight" value passed to the provider URL. |
| | 342 | * @type bool $discover Optional. Determines whether to attempt to discover link tags |
| | 343 | * at the given URL for an oEmbed provider when the oEmbed |
| | 344 | * provider URL is not found in the built-in providers list. |
| | 345 | * } |
| 332 | 346 | * @return object|false The result in the form of an object on success, false on failure. |
| 333 | 347 | */ |
| 334 | 348 | public function get_data( $url, $args = '' ) { |
| … |
… |
class WP_oEmbed { |
| 358 | 372 | * @since 2.9.0 |
| 359 | 373 | * |
| 360 | 374 | * @param string $url The URL to the content that should be attempted to be embedded. |
| 361 | | * @param array|string $args Optional. Arguments, usually passed from a shortcode. Default empty. |
| 362 | | * @return string|false The UNSANITIZED (and potentially unsafe) HTML that should be used to embed on success, |
| 363 | | * false on failure. |
| | 375 | * @param string|array $args { |
| | 376 | * Optional. Additional arguments and parameters for retrieving embed HTML. Default empty. |
| | 377 | * |
| | 378 | * @type int|string $width Optional. The "maxwidth" value passed to the provider URL. |
| | 379 | * @type int|string $height Optional. The "maxheight" value passed to the provider URL. |
| | 380 | * @type bool $discover Optional. Determines whether to attempt to discover link tags |
| | 381 | * at the given URL for an oEmbed provider when the oEmbed |
| | 382 | * provider URL is not found in the built-in providers list. |
| | 383 | * } |
| | 384 | * @return string|false The UNSANITIZED (and potentially unsafe) HTML that should be used to embed |
| | 385 | * on success, false on failure. |
| 364 | 386 | */ |
| 365 | 387 | public function get_html( $url, $args = '' ) { |
| 366 | 388 | /** |
| … |
… |
class WP_oEmbed { |
| 374 | 396 | * |
| 375 | 397 | * @since 4.5.3 |
| 376 | 398 | * |
| 377 | | * @param null|string $result The UNSANITIZED (and potentially unsafe) HTML that should be used to embed. |
| 378 | | * Default null to continue retrieving the result. |
| 379 | | * @param string $url The URL to the content that should be attempted to be embedded. |
| 380 | | * @param array $args Optional. Arguments, usually passed from a shortcode. Default empty. |
| | 399 | * @param null|string $result The UNSANITIZED (and potentially unsafe) HTML that should be used to embed. |
| | 400 | * Default null to continue retrieving the result. |
| | 401 | * @param string $url The URL to the content that should be attempted to be embedded. |
| | 402 | * @param string|array $args { |
| | 403 | * Optional. Additional arguments and parameters for retrieving embed HTML. Default empty. |
| | 404 | * |
| | 405 | * @type int|string $width Optional. The "maxwidth" value passed to the provider URL. |
| | 406 | * @type int|string $height Optional. The "maxheight" value passed to the provider URL. |
| | 407 | * @type bool $discover Optional. Determines whether to attempt to discover link tags |
| | 408 | * at the given URL for an oEmbed provider when the oEmbed |
| | 409 | * provider URL is not found in the built-in providers list. |
| | 410 | * } |
| 381 | 411 | */ |
| 382 | 412 | $pre = apply_filters( 'pre_oembed_result', null, $url, $args ); |
| 383 | 413 | |
| … |
… |
class WP_oEmbed { |
| 398 | 428 | * |
| 399 | 429 | * @param string|false $data The returned oEmbed HTML (false if unsafe). |
| 400 | 430 | * @param string $url URL of the content to be embedded. |
| 401 | | * @param array $args Optional arguments, usually passed from a shortcode. |
| | 431 | * @param string|array $args { |
| | 432 | * Optional. Additional arguments and parameters for retrieving embed HTML. Default empty. |
| | 433 | * |
| | 434 | * @type int|string $width Optional. The "maxwidth" value passed to the provider URL. |
| | 435 | * @type int|string $height Optional. The "maxheight" value passed to the provider URL. |
| | 436 | * @type bool $discover Optional. Determines whether to attempt to discover link tags |
| | 437 | * at the given URL for an oEmbed provider when the oEmbed |
| | 438 | * provider URL is not found in the built-in providers list. |
| | 439 | * } |
| 402 | 440 | */ |
| 403 | 441 | return apply_filters( 'oembed_result', $this->data2html( $data, $url ), $url, $args ); |
| 404 | 442 | } |
| … |
… |
class WP_oEmbed { |
| 500 | 538 | * |
| 501 | 539 | * @param string $provider The URL to the oEmbed provider. |
| 502 | 540 | * @param string $url The URL to the content that is desired to be embedded. |
| 503 | | * @param array|string $args Optional. Arguments, usually passed from a shortcode. Default empty. |
| | 541 | * @param string|array $args { |
| | 542 | * Optional. Additional arguments and parameters for retrieving embed HTML. Default empty. |
| | 543 | * |
| | 544 | * @type int|string $width Optional. The "maxwidth" value passed to the provider URL. |
| | 545 | * @type int|string $height Optional. The "maxheight" value passed to the provider URL. |
| | 546 | * @type bool $discover Optional. Determines whether to attempt to discover link tags |
| | 547 | * at the given URL for an oEmbed provider when the oEmbed |
| | 548 | * provider URL is not found in the built-in providers list. |
| | 549 | * } |
| 504 | 550 | * @return object|false The result in the form of an object on success, false on failure. |
| 505 | 551 | */ |
| 506 | 552 | public function fetch( $provider, $url, $args = '' ) { |
| … |
… |
class WP_oEmbed { |
| 517 | 563 | * @since 2.9.0 |
| 518 | 564 | * @since 4.9.0 The `dnt` (Do Not Track) query parameter was added to all oEmbed provider URLs. |
| 519 | 565 | * |
| 520 | | * @param string $provider URL of the oEmbed provider. |
| 521 | | * @param string $url URL of the content to be embedded. |
| 522 | | * @param array $args Optional arguments, usually passed from a shortcode. |
| | 566 | * @param string $provider URL of the oEmbed provider. |
| | 567 | * @param string $url URL of the content to be embedded. |
| | 568 | * @param string|array $args { |
| | 569 | * Optional. Additional arguments and parameters for retrieving embed HTML. Default empty. |
| | 570 | * |
| | 571 | * @type int|string $width Optional. The "maxwidth" value passed to the provider URL. |
| | 572 | * @type int|string $height Optional. The "maxheight" value passed to the provider URL. |
| | 573 | * @type bool $discover Optional. Determines whether to attempt to discover link tags |
| | 574 | * at the given URL for an oEmbed provider when the oEmbed |
| | 575 | * provider URL is not found in the built-in providers list. |
| | 576 | * } |
| 523 | 577 | */ |
| 524 | 578 | $provider = apply_filters( 'oembed_fetch_url', $provider, $url, $args ); |
| 525 | 579 | |