Changeset 37067
- Timestamp:
- 03/23/2016 04:51:48 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-oembed.php
r37039 r37067 1 1 <?php 2 2 /** 3 * API for fetching the HTML to embed remote content based on a provided URL. 4 * Used internally by the {@link WP_Embed} class, but is designed to be generic. 3 * API for fetching the HTML to embed remote content based on a provided URL 4 * 5 * Used internally by the WP_Embed class, but is designed to be generic. 5 6 * 6 7 * @link https://codex.wordpress.org/oEmbed oEmbed Codex Article … … 12 13 13 14 /** 14 * oEmbed class.15 * Core class used to implement oEmbed functionality. 15 16 * 16 * @package WordPress17 * @subpackage oEmbed18 17 * @since 2.9.0 19 18 */ 20 19 class WP_oEmbed { 20 21 /** 22 * A list of oEmbed providers. 23 * 24 * @since 2.9.0 25 * @access public 26 * @var array 27 */ 21 28 public $providers = array(); 22 /** 29 30 /** 31 * A list of an early oEmbed providers. 32 * 33 * @since 4.0.0 34 * @access public 23 35 * @static 24 36 * @var array … … 26 38 public static $early_providers = array(); 27 39 40 /** 41 * A list of private/protected methods, used for backwards compatibility. 42 * 43 * @since 4.2.0 44 * @access private 45 * @var array 46 */ 28 47 private $compat_methods = array( '_fetch_with_format', '_parse_json', '_parse_xml', '_parse_body' ); 29 48 30 49 /** 31 * Constructor 50 * Constructor. 32 51 * 33 52 * @since 2.9.0 53 * @access public 34 54 */ 35 55 public function __construct() { … … 284 304 * @see WP_oEmbed::data2html() 285 305 * 306 * @since 2.9.0 307 * @access public 308 * 286 309 * @param string $url The URL to the content that should be attempted to be embedded. 287 310 * @param array $args Optional arguments. Usually passed from a shortcode. … … 308 331 /** 309 332 * Attempts to discover link tags at the given URL for an oEmbed provider. 333 * 334 * @since 2.9.0 335 * @access public 310 336 * 311 337 * @param string $url The URL that should be inspected for discovery `<link>` tags. … … 390 416 * Connects to a oEmbed provider and returns the result. 391 417 * 418 * @since 2.9.0 419 * @access public 420 * 392 421 * @param string $provider The URL to the oEmbed provider. 393 422 * @param string $url The URL to the content that is desired to be embedded. … … 427 456 * @since 3.0.0 428 457 * @access private 458 * 429 459 * @param string $provider_url_with_args URL to the provider with full arguments list (url, maxheight, etc.) 430 460 * @param string $format Format to use … … 524 554 /** 525 555 * Converts a data object from {@link WP_oEmbed::fetch()} and returns the HTML. 556 * 557 * @since 2.9.0 558 * @access public 526 559 * 527 560 * @param object $data A data object result from an oEmbed provider. … … 578 611 * Strip any new lines from the HTML. 579 612 * 580 * @access public 613 * @since 2.9.0 as strip_scribd_newlines() 614 * @since 3.0.0 615 * @access public 616 * 581 617 * @param string $html Existing HTML. 582 618 * @param object $data Data object from WP_oEmbed::data2html()
Note: See TracChangeset
for help on using the changeset viewer.