Changeset 14155
- Timestamp:
- 04/18/2010 03:54:45 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/post.php
r14147 r14155 269 269 if ( empty($terms) ) 270 270 continue; 271 $taxonomy = get_taxonomy( $tax_name ); 272 if ( $taxonomy->hierarchical ) 271 if ( is_taxonomy_hierarchical( $tax_name ) ) 273 272 $tax_input[$tax_name] = array_map( 'absint', $terms ); 274 273 else { … … 317 316 foreach ( $tax_names as $tax_name ) { 318 317 if( isset( $tax_input[$tax_name]) ) { 319 $taxonomy = get_taxonomy( $tax_name ); 320 if( $taxonomy->hierarchical ) 318 if ( is_taxonomy_hierarchical( $tax_name ) ) 321 319 $terms = (array) wp_get_object_terms( $post_ID, $tax_name, array('fields' => 'ids') ); 322 320 else … … 862 860 else 863 861 $post_type = 'post'; 864 $post_type_object = get_post_type_object($post_type);865 862 866 863 $avail_post_stati = get_available_post_statuses($post_type); … … 892 889 893 890 // Hierarchical types require special args. 894 if ( $post_type_object->hierarchical) {891 if ( is_post_type_hierarchical( $post_type ) ) { 895 892 $query['orderby'] = 'menu_order title'; 896 893 $query['order'] = 'asc'; -
trunk/wp-includes/post.php
r14133 r14155 2511 2511 // Hierarchical taxonomies must always pass IDs rather than names so that children with the same 2512 2512 // names but different parents aren't confused. 2513 $taxonomy_obj = get_taxonomy( $taxonomy ); 2514 if ( $taxonomy_obj->hierarchical ) { 2513 if ( is_taxonomy_hierarchical( $taxonomy ) ) { 2515 2514 $tags = array_map( 'intval', $tags ); 2516 2515 $tags = array_unique( $tags ); -
trunk/wp-includes/rewrite.php
r13774 r14155 1437 1437 foreach ( get_post_types( array('_builtin' => false ) ) as $ptype ) { 1438 1438 if ( strpos($struct, "%$ptype%") !== false ) { 1439 $ptype = get_post_type_object($ptype);1440 1439 $post = true; 1441 $page = $ptype->hierarchical; // This is for page style attachment url's1440 $page = is_post_type_hierarchical( $ptype ); // This is for page style attachment url's 1442 1441 break; 1443 1442 }
Note: See TracChangeset
for help on using the changeset viewer.