mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-12-06 12:51:58 +00:00
Pruning shears.
git-svn-id: https://develop.svn.wordpress.org/trunk@15904 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -503,7 +503,7 @@ function get_objects_in_term( $terms, $taxonomies, $args = array() ) {
|
||||
if ( $term = get_term_by( $field, $term, $taxonomy ) )
|
||||
$term = $term->term_id;
|
||||
else
|
||||
continue;
|
||||
continue;
|
||||
}
|
||||
$children = array_merge( $children, get_term_children( $term, $taxonomy ) );
|
||||
$children[] = $term;
|
||||
@@ -2831,7 +2831,7 @@ function get_ancestors($object_id = 0, $object_type = '') {
|
||||
if ( empty( $object_id ) ) {
|
||||
return apply_filters('get_ancestors', $ancestors, $object_id, $object_type);
|
||||
}
|
||||
|
||||
|
||||
if ( is_taxonomy_hierarchical( $object_type ) ) {
|
||||
$term = get_term($object_id, $object_type);
|
||||
while ( ! is_wp_error($term) && ! empty( $term->parent ) && ! in_array( $term->parent, $ancestors ) ) {
|
||||
|
||||
Reference in New Issue
Block a user