Definition:
function wp_get_term_taxonomy_parent_id( $term_id, $taxonomy ) {}
Returns the term’s parent’s term_ID
Parameters
- int $term_id
- string $taxonomy
Return values
returns:false on error
Source code
function wp_get_term_taxonomy_parent_id( $term_id, $taxonomy ) {
$term = get_term( $term_id, $taxonomy );
if ( !$term || is_wp_error( $term ) )
return false;
return (int) $term->parent;
}
10783

February 24, 2011 


No comments yet... Be the first to leave a reply!