| 1 | Index: wp-admin/edit-tags.php |
|---|
| 2 | =================================================================== |
|---|
| 3 | --- wp-admin/edit-tags.php (revision 12659) |
|---|
| 4 | +++ wp-admin/edit-tags.php (working copy) |
|---|
| 5 | @@ -11,7 +11,7 @@ |
|---|
| 6 | |
|---|
| 7 | $title = __('Tags'); |
|---|
| 8 | |
|---|
| 9 | -wp_reset_vars( array('action', 'tag', 'taxonomy') ); |
|---|
| 10 | +wp_reset_vars( array('action', 'tag', 'taxonomy', 'post_type') ); |
|---|
| 11 | |
|---|
| 12 | if ( empty($taxonomy) ) |
|---|
| 13 | $taxonomy = 'post_tag'; |
|---|
| 14 | @@ -19,14 +19,12 @@ |
|---|
| 15 | if ( !is_taxonomy($taxonomy) ) |
|---|
| 16 | wp_die(__('Invalid taxonomy')); |
|---|
| 17 | |
|---|
| 18 | -if ( isset($_GET['post_type']) && in_array( $_GET['post_type'], get_post_types( array('_show' => true) ) ) ) |
|---|
| 19 | - $post_type = $_GET['post_type']; |
|---|
| 20 | -else |
|---|
| 21 | +if ( empty($post_type) || !in_array( $post_type, get_post_types( array('_show' => true) ) ) ) |
|---|
| 22 | $post_type = 'post'; |
|---|
| 23 | |
|---|
| 24 | if ( 'post' != $post_type ) { |
|---|
| 25 | $parent_file = "edit.php?post_type=$post_type"; |
|---|
| 26 | - $submenu_file = "edit-tags.php?taxonomy=$taxonomy&post_type=$post_type"; |
|---|
| 27 | + $submenu_file = "edit-tags.php?taxonomy=$taxonomy&post_type=$post_type"; |
|---|
| 28 | } else { |
|---|
| 29 | $parent_file = 'edit.php'; |
|---|
| 30 | $submenu_file = "edit-tags.php?taxonomy=$taxonomy"; |
|---|
| 31 | @@ -162,7 +160,7 @@ |
|---|
| 32 | <div class="wrap nosubsub"> |
|---|
| 33 | <?php screen_icon(); ?> |
|---|
| 34 | <h2><?php echo esc_html( $title ); |
|---|
| 35 | -if ( isset($_GET['s']) && $_GET['s'] ) |
|---|
| 36 | +if ( !empty($_GET['s']) ) |
|---|
| 37 | printf( '<span class="subtitle">' . __('Search results for “%s”') . '</span>', esc_html( stripslashes($_GET['s']) ) ); ?> |
|---|
| 38 | </h2> |
|---|
| 39 | |
|---|
| 40 | @@ -174,6 +172,7 @@ |
|---|
| 41 | |
|---|
| 42 | <form class="search-form" action="" method="get"> |
|---|
| 43 | <input type="hidden" name="taxonomy" value="<?php echo esc_attr($taxonomy); ?>" /> |
|---|
| 44 | +<input type="hidden" name="post_type" value="<?php echo esc_attr($post_type); ?>" /> |
|---|
| 45 | <p class="search-box"> |
|---|
| 46 | <label class="screen-reader-text" for="tag-search-input"><?php _e( 'Search Tags' ); ?>:</label> |
|---|
| 47 | <input type="text" id="tag-search-input" name="s" value="<?php _admin_search_query(); ?>" /> |
|---|
| 48 | @@ -188,6 +187,7 @@ |
|---|
| 49 | <div class="col-wrap"> |
|---|
| 50 | <form id="posts-filter" action="" method="get"> |
|---|
| 51 | <input type="hidden" name="taxonomy" value="<?php echo esc_attr($taxonomy); ?>" /> |
|---|
| 52 | +<input type="hidden" name="post_type" value="<?php echo esc_attr($post_type); ?>" /> |
|---|
| 53 | <div class="tablenav"> |
|---|
| 54 | <?php |
|---|
| 55 | $pagenum = isset( $_GET['pagenum'] ) ? absint( $_GET['pagenum'] ) : 0; |
|---|