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

WordPress Trac wp-trac at lists.automattic.com
Sun Dec 6 18:14:43 UTC 2009


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

Comment(by Denis-de-Bernardy):

 sorry... I was misinterpreting what the two of you had written. it seemed
 to me that the difference between:

 {{{
 $args = wp_parse_args($args, $defaults, 'foobar'); // applies
 wp_parse_args-foobar filter to the result
 }}}

 and:

 {{{
 $args = wp_parse_args($args, $defaults);
 $args = apply_filters('foobar', $args);
 }}}

 went down to the second being less CPU intensive.

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


More information about the wp-trac mailing list