[wp-trac] [WordPress Trac] #11212: Add filter to wp_parse_args()

WordPress Trac wp-trac at lists.automattic.com
Sat Nov 21 11:42:13 UTC 2009


#11212: Add filter to wp_parse_args()
--------------------------+-------------------------------------------------
 Reporter:  Viper007Bond  |       Owner:                
     Type:  enhancement   |      Status:  new           
 Priority:  lowest        |   Milestone:  Future Release
Component:  General       |     Version:  2.9           
 Severity:  normal        |    Keywords:  has-patch     
--------------------------+-------------------------------------------------
Changes (by Viper007Bond):

  * milestone:  2.9 => Future Release


Comment:

 It was a crazy idea that's evolving into something that maybe has
 potential, so yeah, lotta bad ideas at first. :P

 The latest concept (that I mentioned above) is just adding a third
 (optional) parameter to the function called "context" (or something).
 You'd pass the function name (`__FUNCTION__` is an easy way to do this)
 and then if that parameter is set, then a filter called
 `wp_parse_args_the_context_value` would be run. No context, no filter is
 run.

 Using that setup (passing what function is using `wp_parse_args()`), you
 can do quite a bit. For example, here's the reason I came up with this
 concept in the first place:

 http://wordpress.pastebin.com/f58e26402

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


More information about the wp-trac mailing list