WordPress.org

Make WordPress Core


Ignore:
Timestamp:
03/23/2016 04:51:48 PM (6 years ago)
Author:
DrewAPicture
Message:

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

Props ramiy.
See #36296.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-oembed.php

    r37039 r37067  
    11<?php
    22/**
    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.
    56 *
    67 * @link https://codex.wordpress.org/oEmbed oEmbed Codex Article
     
    1213
    1314/**
    14  * oEmbed class.
     15 * Core class used to implement oEmbed functionality.
    1516 *
    16  * @package WordPress
    17  * @subpackage oEmbed
    1817 * @since 2.9.0
    1918 */
    2019class WP_oEmbed {
     20
     21    /**
     22     * A list of oEmbed providers.
     23     *
     24     * @since 2.9.0
     25     * @access public
     26     * @var array
     27     */
    2128    public $providers = array();
    22     /**
     29
     30    /**
     31     * A list of an early oEmbed providers.
     32     *
     33     * @since 4.0.0
     34     * @access public
    2335     * @static
    2436     * @var array
     
    2638    public static $early_providers = array();
    2739
     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     */
    2847    private $compat_methods = array( '_fetch_with_format', '_parse_json', '_parse_xml', '_parse_body' );
    2948
    3049    /**
    31      * Constructor
     50     * Constructor.
    3251     *
    3352     * @since 2.9.0
     53     * @access public
    3454     */
    3555    public function __construct() {
     
    284304     * @see WP_oEmbed::data2html()
    285305     *
     306     * @since 2.9.0
     307     * @access public
     308     *
    286309     * @param string $url The URL to the content that should be attempted to be embedded.
    287310     * @param array $args Optional arguments. Usually passed from a shortcode.
     
    308331    /**
    309332     * Attempts to discover link tags at the given URL for an oEmbed provider.
     333     *
     334     * @since 2.9.0
     335     * @access public
    310336     *
    311337     * @param string $url The URL that should be inspected for discovery `<link>` tags.
     
    390416     * Connects to a oEmbed provider and returns the result.
    391417     *
     418     * @since 2.9.0
     419     * @access public
     420     *
    392421     * @param string $provider The URL to the oEmbed provider.
    393422     * @param string $url The URL to the content that is desired to be embedded.
     
    427456     * @since 3.0.0
    428457     * @access private
     458     *
    429459     * @param string $provider_url_with_args URL to the provider with full arguments list (url, maxheight, etc.)
    430460     * @param string $format Format to use
     
    524554    /**
    525555     * Converts a data object from {@link WP_oEmbed::fetch()} and returns the HTML.
     556     *
     557     * @since 2.9.0
     558     * @access public
    526559     *
    527560     * @param object $data A data object result from an oEmbed provider.
     
    578611     * Strip any new lines from the HTML.
    579612     *
    580      * @access public
     613     * @since 2.9.0 as strip_scribd_newlines()
     614     * @since 3.0.0
     615     * @access public
     616     *
    581617     * @param string $html Existing HTML.
    582618     * @param object $data Data object from WP_oEmbed::data2html()
Note: See TracChangeset for help on using the changeset viewer.