Changeset 47317 for trunk/src/wp-includes/post.php
- Timestamp:
- 02/19/2020 03:50:38 AM (6 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/post.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/post.php
r47274 r47317 4218 4218 } 4219 4219 4220 // Discard 'tags_input' parameter if it's the same as existing post tags. 4221 if ( isset( $postarr['tags_input'] ) && is_object_in_taxonomy( $postarr['post_type'], 'post_tag' ) ) { 4222 $tags = get_the_terms( $postarr['ID'], 'post_tag' ); 4223 $tag_names = array(); 4224 4225 if ( $tags && ! is_wp_error( $tags ) ) { 4226 $tag_names = wp_list_pluck( $tags, 'name' ); 4227 } 4228 4229 if ( $postarr['tags_input'] === $tag_names ) { 4230 unset( $postarr['tags_input'] ); 4231 } 4232 } 4233 4220 4234 return wp_insert_post( $postarr, $wp_error ); 4221 4235 }
Note: See TracChangeset
for help on using the changeset viewer.