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
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
}
/**
- * Exposes private/protected methods for backwards compatibility.
+ * Exposes private/protected methods for backward compatibility.
*
* @since 4.0.0
* @access public
* @return false|string False on failure, otherwise the oEmbed provider URL.
*/
public function get_provider( $url, $args = '' ) {
+ $args = wp_parse_args( $args );
$provider = false;
* @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.
*
}
/**
- * Filter the HTML returned by the oEmbed provider.
+ * Filters the HTML returned by the oEmbed provider.
*
* @since 2.9.0
*
);
/**
- * Filter oEmbed remote get arguments.
+ * Filters oEmbed remote get arguments.
*
* @since 4.0.0
*
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
*
$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
*
}
/**
- * 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.
*