[wp-trac] [WordPress Trac] #14041: Ensure a 'has_children' parameter is given to start_el

WordPress Trac wp-trac at lists.automattic.com
Tue Jun 22 13:10:33 UTC 2010


#14041: Ensure a 'has_children' parameter is given to start_el
--------------------------+-------------------------------------------------
 Reporter:  jaapjanfrans  |        Owner:         
     Type:  enhancement   |       Status:  closed 
 Priority:  normal        |    Milestone:         
Component:  General       |      Version:  3.0    
 Severity:  minor         |   Resolution:  invalid
 Keywords:                |  
--------------------------+-------------------------------------------------
Changes (by scribu):

  * keywords:  reporter-feedback =>
  * status:  new => closed
  * resolution:  => invalid
  * milestone:  Unassigned =>


Comment:

 First of all, call_user_func_array() only accepts a numeric array, so
 $cb_args['has_children'] wouldn't work.

 Secondly, it checks if $args[0] is an array so that start_el() can be
 both:

 {{{start_el($arg1 = 'foo', $arg2 = 'bar', ...)}}}

 and

 {{{start_el($args = array())}}}

 Anyway, it's just a convenience. You can do the check yourself, since you
 have access to $children_elements.

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


More information about the wp-trac mailing list