[wp-trac] Re: [WordPress Trac] #9424: Allow the media buttons to be filtered so they can be removed/altered

WordPress Trac wp-trac at lists.automattic.com
Wed Apr 1 00:02:24 GMT 2009


#9424: Allow the media buttons to be filtered so they can be removed/altered
---------------------------+------------------------------------------------
 Reporter:  simonwheatley  |       Owner:            
     Type:  enhancement    |      Status:  new       
 Priority:  normal         |   Milestone:  Unassigned
Component:  Media          |     Version:            
 Severity:  normal         |    Keywords:  has-patch 
---------------------------+------------------------------------------------

Comment(by azaozz):

 There are already five hooks that deal with these buttons and there are "a
 thousand" hooks that deal with media uploading and handling.

 Hooks are "cheap" but do we really need four more for a total of nine
 hooks filtering four links? The problem is that we will have to keep track
 of all actions and filters when updating the media features.

 The whole `media_buttons()` function can easily be replaced by using:
 {{{
 remove_action( 'media_buttons', 'media_buttons' );
 add_action( 'media_buttons', 'my_custom_buttons' );
 }}}

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


More information about the wp-trac mailing list