]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/class-oembed.php
Wordpress 4.6
[autoinstalls/wordpress.git] / wp-includes / class-oembed.php
index 3e19f3ba508ab54b6a2ee3e5a49b5fd14689c9e6..9790d266f67b6532410ac24adcb16df80f3331a2 100644 (file)
@@ -38,7 +38,7 @@ class WP_oEmbed {
        public static $early_providers = array();
 
        /**
-        * A list of private/protected methods, used for backwards compatibility.
+        * A list of private/protected methods, used for backward compatibility.
         *
         * @since 4.2.0
         * @access private
@@ -115,7 +115,7 @@ class WP_oEmbed {
                self::$early_providers = array();
 
                /**
-                * Filter the list of whitelisted oEmbed providers.
+                * Filters the list of whitelisted oEmbed providers.
                 *
                 * Since WordPress 4.4, oEmbed discovery is enabled for all users and allows embedding of sanitized
                 * iframes. The providers in this list are whitelisted, meaning they are trusted and allowed to
@@ -192,7 +192,7 @@ class WP_oEmbed {
        }
 
        /**
-        * Exposes private/protected methods for backwards compatibility.
+        * Exposes private/protected methods for backward compatibility.
         *
         * @since 4.0.0
         * @access public
@@ -221,6 +221,7 @@ class WP_oEmbed {
         * @return false|string False on failure, otherwise the oEmbed provider URL.
         */
        public function get_provider( $url, $args = '' ) {
+               $args = wp_parse_args( $args );
 
                $provider = false;
 
@@ -315,6 +316,8 @@ class WP_oEmbed {
         * @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 = '' ) {
+               $args = wp_parse_args( $args );
+
                /**
                 * Filters the oEmbed result before any HTTP requests are made.
                 *
@@ -343,7 +346,7 @@ class WP_oEmbed {
                }
 
                /**
-                * Filter the HTML returned by the oEmbed provider.
+                * Filters the HTML returned by the oEmbed provider.
                 *
                 * @since 2.9.0
                 *
@@ -370,7 +373,7 @@ class WP_oEmbed {
                );
 
                /**
-                * Filter oEmbed remote get arguments.
+                * Filters oEmbed remote get arguments.
                 *
                 * @since 4.0.0
                 *
@@ -386,7 +389,7 @@ class WP_oEmbed {
                if ( $html = wp_remote_retrieve_body( $request ) ) {
 
                        /**
-                        * Filter the link types that contain oEmbed provider URLs.
+                        * Filters the link types that contain oEmbed provider URLs.
                         *
                         * @since 2.9.0
                         *
@@ -457,7 +460,7 @@ class WP_oEmbed {
                $provider = add_query_arg( 'url', urlencode($url), $provider );
 
                /**
-                * Filter the oEmbed URL to be fetched.
+                * Filters the oEmbed URL to be fetched.
                 *
                 * @since 2.9.0
                 *
@@ -620,7 +623,7 @@ class WP_oEmbed {
                }
 
                /**
-                * Filter the returned oEmbed HTML.
+                * Filters the returned oEmbed HTML.
                 *
                 * Use this filter to add support for custom data types, or to filter the result.
                 *