From 8bc3075b1f9b90c779a8ad3746a198e4ea9384fd Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Fri, 16 Apr 2010 21:39:10 +0000 Subject: [PATCH] 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 --- wp-includes/post.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/wp-includes/post.php b/wp-includes/post.php index 4484caf9c8..d0ec83810b 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -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) ) {