Changeset 13733 for trunk/wp-admin/includes/post.php
- Timestamp:
- 03/17/2010 04:27:25 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/post.php
r13729 r13733 271 271 unset($post_data['post_category']); 272 272 } 273 273 274 274 $tax_input = array(); 275 275 if ( isset($post_data['tax_input'])) { … … 279 279 $taxonomy = get_taxonomy( $tax_name ); 280 280 if ( $taxonomy->hierarchical ) 281 $tax_input[$tax_name] = array_map( 'absint', $terms ); 281 $tax_input[$tax_name] = array_map( 'absint', $terms ); 282 282 else { 283 283 $tax_input[$tax_name] = preg_replace( '/\s*,\s*/', ',', rtrim( trim($terms), ' ,' ) ); … … 315 315 continue; 316 316 } 317 317 318 318 $tax_names = get_object_taxonomies( get_post($post_ID) ); 319 319 320 320 if ( isset($new_cats) && in_array( 'category', $tax_names ) ) { 321 321 $cats = (array) wp_get_post_categories($post_ID); 322 322 $post_data['post_category'] = array_unique( array_merge($cats, $new_cats) ); 323 323 } 324 324 325 325 foreach ( $tax_names as $tax_name ) { 326 326 if( isset( $tax_input[$tax_name]) ) {
Note: See TracChangeset
for help on using the changeset viewer.