diff --git a/wp-admin/edit-tags.php b/wp-admin/edit-tags.php index 63f3bbd9e..1e89e1b14 100644 --- a/wp-admin/edit-tags.php +++ b/wp-admin/edit-tags.php @@ -11,7 +11,7 @@ require_once('admin.php'); $title = __('Tags'); -wp_reset_vars( array('action', 'tag', 'taxonomy') ); +wp_reset_vars( array('action', 'tag', 'taxonomy', 'post_type') ); if ( empty($taxonomy) ) $taxonomy = 'post_tag'; @@ -19,14 +19,12 @@ if ( empty($taxonomy) ) if ( !is_taxonomy($taxonomy) ) wp_die(__('Invalid taxonomy')); -if ( isset($_GET['post_type']) && in_array( $_GET['post_type'], get_post_types( array('_show' => true) ) ) ) - $post_type = $_GET['post_type']; -else +if ( empty($post_type) || !in_array( $post_type, get_post_types( array('_show' => true) ) ) ) $post_type = 'post'; if ( 'post' != $post_type ) { $parent_file = "edit.php?post_type=$post_type"; - $submenu_file = "edit-tags.php?taxonomy=$taxonomy&post_type=$post_type"; + $submenu_file = "edit-tags.php?taxonomy=$taxonomy&post_type=$post_type"; } else { $parent_file = 'edit.php'; $submenu_file = "edit-tags.php?taxonomy=$taxonomy"; @@ -162,7 +160,7 @@ $messages[6] = __('Tags deleted.'); ?>

' . __('Search results for “%s”') . '', esc_html( stripslashes($_GET['s']) ) ); ?>

@@ -174,6 +172,7 @@ endif; ?>
+
+