[wp-trac] [WordPress Trac] #22250: Useful helper function, add_action_with_args()

WordPress Trac noreply at wordpress.org
Mon Oct 22 08:34:58 UTC 2012


#22250: Useful helper function, add_action_with_args()
-------------------------+------------------------------
 Reporter:  rzen         |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  General      |     Version:
 Severity:  normal       |  Resolution:
 Keywords:  2nd-opinion  |
-------------------------+------------------------------

Comment (by TJNowell):

 It should be kept in mind that this functionality isn't the only method of
 doing things, e.g. when designing a car, adding more wheels and mechanisms
 to go over a hill might work, but so does getting out the car and
 walking..

 My main issue with this is if somebody uses it, and does something like
 this:

 {{{

 function __echo_text( $input ) { echo $input; }

 add_action( 'wp_footer', '__echo_text', 10, 'Some super important text
 that the client hates to such a degree that they want to eat your babies
 and wear your intestines.' );
 }}}

 Requiring forks of said codebase, and additional maintenance to support
 changes ( perhaps the plugin or framework developer has decided it is not
 an issue, or feels that the text in question is necessary for
 functionality to work, perhaps you're spanish and that super important
 text is english and there's no translation support ).

 Ofc one could add a filter on this, but if so one shouldn't trust the
 developer at the other end to do this, and it still leaves the issue of
 what the filter should be called etc

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


More information about the wp-trac mailing list