Allow for removing all tags in quick edit. Check only if $tags_input isset (can be empty) before running wp_set_post_tags. props sivel, fixes #12318.

git-svn-id: https://develop.svn.wordpress.org/trunk@14117 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2010-04-16 21:39:10 +00:00
parent 55b9eedb4b
commit 8bc3075b1f
1 changed files with 1 additions and 5 deletions

View File

@ -2066,10 +2066,6 @@ function wp_insert_post($postarr = array(), $wp_error = false) {
$post_category = array();
}
// Set the default tag list
if ( !isset($tags_input) )
$tags_input = array();
if ( empty($post_author) )
$post_author = $user_ID;
@ -2215,7 +2211,7 @@ function wp_insert_post($postarr = array(), $wp_error = false) {
wp_set_post_categories( $post_ID, $post_category );
// old-style tags_input
if ( !empty($tags_input) )
if ( isset( $tags_input ) )
wp_set_post_tags( $post_ID, $tags_input );
// new-style support for all tag-like taxonomies
if ( !empty($tax_input) ) {