Changeset 56712 for trunk/src/wp-admin/includes/post.php
- Timestamp:
- 09/26/2023 03:03:19 PM (19 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/post.php
r56587 r56712 642 642 643 643 if ( isset( $new_cats ) && in_array( 'category', $tax_names, true ) ) { 644 $cats = (array) wp_get_post_categories( $post_id ); 645 $post_data['post_category'] = array_unique( array_merge( $cats, $new_cats ) ); 644 $cats = (array) wp_get_post_categories( $post_id ); 645 646 if ( 647 isset( $post_data['indeterminate_post_category'] ) 648 && is_array( $post_data['indeterminate_post_category'] ) 649 ) { 650 $indeterminate_post_category = $post_data['indeterminate_post_category']; 651 } else { 652 $indeterminate_post_category = array(); 653 } 654 655 $indeterminate_cats = array_intersect( $cats, $indeterminate_post_category ); 656 $determinate_cats = array_diff( $new_cats, $indeterminate_post_category ); 657 $post_data['post_category'] = array_unique( array_merge( $indeterminate_cats, $determinate_cats ) ); 658 646 659 unset( $post_data['tax_input']['category'] ); 647 660 }
Note: See TracChangeset
for help on using the changeset viewer.