Make WordPress Core

Changeset 37069


Ignore:
Timestamp:
03/23/2016 05:07:58 PM (8 years ago)
Author:
DrewAPicture
Message:

Docs: Properly mark $args parameters in two WP_oEmbed methods as optional.

Also clarify that the $args parameters can accept a string (the default) in addition to an array.

Props ramiy.
See #36296.

File:
1 edited

Legend:

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

    r37068 r37069  
    311311     * @access public
    312312     *
    313      * @param string $url The URL to the content that should be attempted to be embedded.
    314      * @param array $args Optional arguments. Usually passed from a shortcode.
     313     * @param string       $url The URL to the content that should be attempted to be embedded.
     314     * @param array|string $args Optional. Arguments, usually passed from a shortcode. Default empty.
    315315     * @return false|string False on failure, otherwise the UNSANITIZED (and potentially unsafe) HTML that should be used to embed.
    316316     */
     
    423423     * @access public
    424424     *
    425      * @param string $provider The URL to the oEmbed provider.
    426      * @param string $url The URL to the content that is desired to be embedded.
    427      * @param array $args Optional arguments. Usually passed from a shortcode.
     425     * @param string       $provider The URL to the oEmbed provider.
     426     * @param string       $url      The URL to the content that is desired to be embedded.
     427     * @param array|string $args     Optional. Arguments, usually passed from a shortcode. Default empty.
    428428     * @return false|object False on failure, otherwise the result in the form of an object.
    429429     */
Note: See TracChangeset for help on using the changeset viewer.