[wp-trac] [WordPress Trac] #12171: add_category_form_fields Action Fires Twice

WordPress Trac wp-trac at lists.automattic.com
Mon Feb 8 07:30:53 UTC 2010


#12171: add_category_form_fields Action Fires Twice
--------------------------+-------------------------------------------------
 Reporter:  blepoxp       |       Owner:  dd32     
     Type:  defect (bug)  |      Status:  assigned 
 Priority:  normal        |   Milestone:  3.0      
Component:  Taxonomy      |     Version:  3.0      
 Severity:  normal        |    Keywords:  has-patch
--------------------------+-------------------------------------------------

Comment(by dd32):

 A few things can be done here, However, I'm wondering if it'd be best to
 rename the new hook to avoid the conflict instead.

 Eg, Change it from {{{do_action('add_' . $taxonomy . '_form_pre',
 $taxonomy);}}} to {{{do_action($taxonomy . '_add_form_pre', $taxonomy);}}}

 This'd allow for the new generic hook to apply to categories, whilst also
 having the backwards compat for the old category actions args the same.

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


More information about the wp-trac mailing list