When editing terms, properly display an admin notice-warning when tag_ID is empty.

Also, avoids two related PHP notices when empty or not set (and thus the global `$tag` is a WP_Error object).

Fixes: #34515.

git-svn-id: https://develop.svn.wordpress.org/trunk@35875 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrea Fercia
2015-12-11 22:48:49 +00:00
parent 5a445d7515
commit 4dfb95179a
3 changed files with 9 additions and 2 deletions
+1 -1
View File
@@ -574,7 +574,7 @@ function wp_admin_bar_edit_menu( $wp_admin_bar ) {
) );
}
} elseif ( 'edit-tags' == $current_screen->base
&& isset( $tag ) && is_object( $tag )
&& isset( $tag ) && is_object( $tag ) && ! is_wp_error( $tag )
&& ( $tax = get_taxonomy( $tag->taxonomy ) )
&& $tax->public )
{