Changeset 15843 for trunk/wp-includes/taxonomy.php
- Timestamp:
- 10/19/2010 07:48:22 AM (16 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/taxonomy.php (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/taxonomy.php
r15842 r15843 504 504 $term = $term->term_id; 505 505 else 506 continue; 506 continue; 507 507 } 508 508 $children = array_merge( $children, get_term_children( $term, $taxonomy ) ); … … 1447 1447 1448 1448 $defaults = array(); 1449 1449 1450 1450 if ( 'category' == $taxonomy ) { 1451 1451 $defaults['default'] = get_option( 'default_category' ); … … 1453 1453 return 0; // Don't delete the default category 1454 1454 } 1455 1455 1456 1456 $args = wp_parse_args($args, $defaults); 1457 1457 extract($args, EXTR_SKIP); … … 2642 2642 } 2643 2643 // Back Compat filters. 2644 if ( 'post_tag' == $taxonomy ) 2644 if ( 'post_tag' == $taxonomy ) 2645 2645 $termlink = apply_filters( 'tag_link', $termlink, $term->term_id ); 2646 2646 elseif ( 'category' == $taxonomy ) … … 2816 2816 return false; 2817 2817 } 2818 2818 2819 2819 /** 2820 2820 * Get an array of ancestor IDs for a given object. … … 2826 2826 function get_ancestors($object_id = 0, $object_type = '') { 2827 2827 $object_id = (int) $object_id; 2828 2828 2829 2829 $ancestors = array(); 2830 2830 … … 2832 2832 return apply_filters('get_ancestors', $ancestors, $object_id, $object_type); 2833 2833 } 2834 2834 2835 2835 if ( is_taxonomy_hierarchical( $object_type ) ) { 2836 2836 $term = get_term($object_id, $object_type); … … 2841 2841 } elseif ( null !== get_post_type_object( $object_type ) ) { 2842 2842 $object = get_post($object_id); 2843 if ( ! is_wp_error( $object ) && isset( $object->ancestors ) && is_array( $object->ancestors ) ) 2843 if ( ! is_wp_error( $object ) && isset( $object->ancestors ) && is_array( $object->ancestors ) ) 2844 2844 $ancestors = $object->ancestors; 2845 2845 else {
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)