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: http://svn.automattic.com/wordpress/trunk@14117 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2010-04-16 21:39:10 +00:00
parent f07882dfba
commit e6e03bd7df
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) ) {