WordPress.org

Make WordPress Core

Ticket #8050: 8050.1.patch

File 8050.1.patch, 716 bytes (added by kurtpayne, 4 years ago)

Documenting return type

  • wp-includes/taxonomy.php

     
    31383138} 
    31393139 
    31403140/** 
     3141 * Determine if the child is on the inheritence chain fom the given parent 
     3142 * @param int $parent the ID of the parent object 
     3143 * @param int $child the ID of the child object 
     3144 * @param string $object_type the relationship type (e.g. 'category') 
     3145 * @return bool 
     3146 */ 
     3147function has_child_relationship( $parent, $child, $object_type ) { 
     3148        return in_array( $parent, get_ancestors( $child, $object_type ) ); 
     3149} 
     3150 
     3151/** 
    31413152 * Returns the term's parent's term_ID 
    31423153 * 
    31433154 * @since 3.1.0