Docs: Improve and add missing DocBlocks for methods and properties in WP_oEmbed.

Props ramiy.
See #36296.

Built from https://develop.svn.wordpress.org/trunk@37067


git-svn-id: http://core.svn.wordpress.org/trunk@37034 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Drew Jaynes 2016-03-23 16:52:29 +00:00
parent 44f38aae77
commit d6a45b15f3
2 changed files with 44 additions and 8 deletions

View File

@ -1,7 +1,8 @@
<?php
/**
* API for fetching the HTML to embed remote content based on a provided URL.
* Used internally by the {@link WP_Embed} class, but is designed to be generic.
* API for fetching the HTML to embed remote content based on a provided URL
*
* Used internally by the WP_Embed class, but is designed to be generic.
*
* @link https://codex.wordpress.org/oEmbed oEmbed Codex Article
* @link http://oembed.com/ oEmbed Homepage
@ -11,26 +12,45 @@
*/
/**
* oEmbed class.
* Core class used to implement oEmbed functionality.
*
* @package WordPress
* @subpackage oEmbed
* @since 2.9.0
*/
class WP_oEmbed {
public $providers = array();
/**
* A list of oEmbed providers.
*
* @since 2.9.0
* @access public
* @var array
*/
public $providers = array();
/**
* A list of an early oEmbed providers.
*
* @since 4.0.0
* @access public
* @static
* @var array
*/
public static $early_providers = array();
/**
* A list of private/protected methods, used for backwards compatibility.
*
* @since 4.2.0
* @access private
* @var array
*/
private $compat_methods = array( '_fetch_with_format', '_parse_json', '_parse_xml', '_parse_body' );
/**
* Constructor
* Constructor.
*
* @since 2.9.0
* @access public
*/
public function __construct() {
$host = urlencode( home_url() );
@ -283,6 +303,9 @@ class WP_oEmbed {
* @see WP_oEmbed::fetch()
* @see WP_oEmbed::data2html()
*
* @since 2.9.0
* @access public
*
* @param string $url The URL to the content that should be attempted to be embedded.
* @param array $args Optional arguments. Usually passed from a shortcode.
* @return false|string False on failure, otherwise the UNSANITIZED (and potentially unsafe) HTML that should be used to embed.
@ -308,6 +331,9 @@ class WP_oEmbed {
/**
* Attempts to discover link tags at the given URL for an oEmbed provider.
*
* @since 2.9.0
* @access public
*
* @param string $url The URL that should be inspected for discovery `<link>` tags.
* @return false|string False on failure, otherwise the oEmbed provider URL.
*/
@ -389,6 +415,9 @@ class WP_oEmbed {
/**
* Connects to a oEmbed provider and returns the result.
*
* @since 2.9.0
* @access public
*
* @param string $provider The URL to the oEmbed provider.
* @param string $url The URL to the content that is desired to be embedded.
* @param array $args Optional arguments. Usually passed from a shortcode.
@ -426,6 +455,7 @@ class WP_oEmbed {
*
* @since 3.0.0
* @access private
*
* @param string $provider_url_with_args URL to the provider with full arguments list (url, maxheight, etc.)
* @param string $format Format to use
* @return false|object|WP_Error False on failure, otherwise the result in the form of an object.
@ -524,6 +554,9 @@ class WP_oEmbed {
/**
* Converts a data object from {@link WP_oEmbed::fetch()} and returns the HTML.
*
* @since 2.9.0
* @access public
*
* @param object $data A data object result from an oEmbed provider.
* @param string $url The URL to the content that is desired to be embedded.
* @return false|string False on error, otherwise the HTML needed to embed.
@ -577,7 +610,10 @@ class WP_oEmbed {
/**
* Strip any new lines from the HTML.
*
* @since 2.9.0 as strip_scribd_newlines()
* @since 3.0.0
* @access public
*
* @param string $html Existing HTML.
* @param object $data Data object from WP_oEmbed::data2html()
* @param string $url The original URL passed to oEmbed.

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.5-beta4-37066';
$wp_version = '4.5-beta4-37067';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.