[wp-trac] [WordPress Trac] #8050: is_child()

WordPress Trac wp-trac at lists.automattic.com
Fri Jun 25 22:45:58 UTC 2010


#8050: is_child()
----------------------------+-----------------------------------------------
 Reporter:  youngmicroserf  |       Owner:  westi          
     Type:  enhancement     |      Status:  accepted       
 Priority:  normal          |   Milestone:  Awaiting Triage
Component:  Template        |     Version:                 
 Severity:  normal          |    Keywords:  needs-patch    
----------------------------+-----------------------------------------------

Comment(by scribu):

 If we get #12443 in, is_child() would be as simple as:

 {{{
 function is_child( $child, $parent, $object_type ) {
     return in_array( $parent, get_ancestors( $child, $object_type ) );
 }
 }}}

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


More information about the wp-trac mailing list