Make WordPress Core


Ignore:
Timestamp:
10/23/2009 07:33:24 PM (15 years ago)
Author:
ryan
Message:

Allow non-admins to use Vimeo and allow regex in oEmbed URL formats. Props Viper007Bond. see #10337

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/media.php

    r12042 r12096  
    12631263 * @uses _wp_oembed_get_object()
    12641264 *
    1265  * @param string $format The format of URL that this provider can handle. Use asterisks as wildcards.
     1265 * @param string $format The format of URL that this provider can handle. You can use asterisks as wildcards.
    12661266 * @param string $provider The URL to the oEmbed provider.
    1267  */
    1268 function wp_oembed_add_provider( $format, $provider ) {
     1267 * @param boolean $regex Whether the $format parameter is in a regex format or not.
     1268 */
     1269function wp_oembed_add_provider( $format, $provider, $regex = false ) {
    12691270    require_once( 'class-oembed.php' );
    12701271    $oembed = _wp_oembed_get_object();
    1271     $oembed->providers[$format] = $provider;
    1272 }
     1272    $oembed->providers[$format] = array( $provider, $regex );
     1273}
Note: See TracChangeset for help on using the changeset viewer.