Ticket #32246: class-oembed.php.patch
File class-oembed.php.patch, 3.2 KB (added by , 9 years ago) |
---|
-
wp-includes/class-oembed.php
11 11 */ 12 12 13 13 /** 14 * oEmbed class.14 * WordPress oEmbed class. 15 15 * 16 16 * @package WordPress 17 17 * @subpackage oEmbed … … 18 18 * @since 2.9.0 19 19 */ 20 20 class WP_oEmbed { 21 22 /** 23 * A list of oEmbed providers. 24 * 25 * @since 2.9.0 26 * @access public 27 * @var array 28 */ 21 29 public $providers = array(); 30 22 31 /** 32 * A list of an early oEmbed providers. 33 * 34 * @since 4.0.0 35 * @access public 23 36 * @static 24 37 * @var array 25 38 */ 26 39 public static $early_providers = array(); 27 40 41 /** 42 * A list of private/protected methods, used for backwards compatibility. 43 * 44 * @since 4.2.0 45 * @access private 46 * @var array 47 */ 28 48 private $compat_methods = array( '_fetch_with_format', '_parse_json', '_parse_xml', '_parse_body' ); 29 49 30 50 /** 31 * Constructor 51 * Constructor. 32 52 * 33 53 * @since 2.9.0 54 * @access public 34 55 */ 35 56 public function __construct() { 36 57 $host = urlencode( home_url() ); … … 283 304 * @see WP_oEmbed::fetch() 284 305 * @see WP_oEmbed::data2html() 285 306 * 307 * @since 2.9.0 308 * @access public 309 * 286 310 * @param string $url The URL to the content that should be attempted to be embedded. 287 311 * @param array $args Optional arguments. Usually passed from a shortcode. 288 312 * @return false|string False on failure, otherwise the UNSANITIZED (and potentially unsafe) HTML that should be used to embed. … … 308 332 /** 309 333 * Attempts to discover link tags at the given URL for an oEmbed provider. 310 334 * 335 * @since 2.9.0 336 * @access public 337 * 311 338 * @param string $url The URL that should be inspected for discovery `<link>` tags. 312 339 * @return false|string False on failure, otherwise the oEmbed provider URL. 313 340 */ … … 389 416 /** 390 417 * Connects to a oEmbed provider and returns the result. 391 418 * 419 * @since 2.9.0 420 * @access public 421 * 392 422 * @param string $provider The URL to the oEmbed provider. 393 423 * @param string $url The URL to the content that is desired to be embedded. 394 424 * @param array $args Optional arguments. Usually passed from a shortcode. … … 426 456 * 427 457 * @since 3.0.0 428 458 * @access private 459 * 429 460 * @param string $provider_url_with_args URL to the provider with full arguments list (url, maxheight, etc.) 430 461 * @param string $format Format to use 431 462 * @return false|object|WP_Error False on failure, otherwise the result in the form of an object. … … 524 555 /** 525 556 * Converts a data object from {@link WP_oEmbed::fetch()} and returns the HTML. 526 557 * 558 * @since 2.9.0 559 * @access public 560 * 527 561 * @param object $data A data object result from an oEmbed provider. 528 562 * @param string $url The URL to the content that is desired to be embedded. 529 563 * @return false|string False on error, otherwise the HTML needed to embed. … … 577 611 /** 578 612 * Strip any new lines from the HTML. 579 613 * 614 * @since 2.9.0 615 * @since 3.0.0 Renamed from strip_scribd_newlines() to _strip_newlines() 580 616 * @access public 617 * 581 618 * @param string $html Existing HTML. 582 619 * @param object $data Data object from WP_oEmbed::data2html() 583 620 * @param string $url The original URL passed to oEmbed.