From 979d8931d36bd249e37ce0248fd5f43894746334 Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Wed, 23 Mar 2016 17:07:58 +0000 Subject: [PATCH] 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. git-svn-id: https://develop.svn.wordpress.org/trunk@37069 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class-oembed.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/wp-includes/class-oembed.php b/src/wp-includes/class-oembed.php index 82dbe0d496..909524bc30 100644 --- a/src/wp-includes/class-oembed.php +++ b/src/wp-includes/class-oembed.php @@ -310,8 +310,8 @@ class WP_oEmbed { * @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. + * @param string $url The URL to the content that should be attempted to be embedded. + * @param array|string $args Optional. Arguments, usually passed from a shortcode. Default empty. * @return false|string False on failure, otherwise the UNSANITIZED (and potentially unsafe) HTML that should be used to embed. */ public function get_html( $url, $args = '' ) { @@ -422,9 +422,9 @@ class WP_oEmbed { * @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. + * @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|string $args Optional. Arguments, usually passed from a shortcode. Default empty. * @return false|object False on failure, otherwise the result in the form of an object. */ public function fetch( $provider, $url, $args = '' ) {