[wp-trac] [WordPress Trac] #16327: oEmbed - Add a function to remove an oEmbed provider

WordPress Trac wp-trac at lists.automattic.com
Wed Feb 2 13:37:01 UTC 2011


#16327: oEmbed - Add a function to remove an oEmbed provider
--------------------------+-----------------------------
 Reporter:  r-a-y         |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Future Release
Component:  Media         |     Version:  2.9
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |
--------------------------+-----------------------------
Changes (by nacin):

 * version:  3.1 => 2.9
 * milestone:  Awaiting Review => Future Release


Comment:

 Clever, but I think we should just have:
 {{{
 function wp_oembed_remove_provider( $format ) {
         require_once( ABSPATH . WPINC . '/class-oembed.php' );
         $oembed = _wp_oembed_get_object();
         if ( isset( $oembed->providers[ $format ] ) ) {
                 unset( $oembed->providers[ $format ] );
                 return true;
         }
         return false;
 }
 }}}

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/16327#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list