Ticket #9674: 9674.13.diff
File 9674.13.diff, 2.2 KB (added by , 15 years ago) |
---|
-
wp-admin/edit-tags.php
11 11 12 12 $title = __('Tags'); 13 13 14 wp_reset_vars( array('action', 'tag', 'taxonomy' ) );14 wp_reset_vars( array('action', 'tag', 'taxonomy', 'post_type') ); 15 15 16 16 if ( empty($taxonomy) ) 17 17 $taxonomy = 'post_tag'; … … 19 19 if ( !is_taxonomy($taxonomy) ) 20 20 wp_die(__('Invalid taxonomy')); 21 21 22 if ( isset($_GET['post_type']) && in_array( $_GET['post_type'], get_post_types( array('_show' => true) ) ) ) 23 $post_type = $_GET['post_type']; 24 else 22 if ( empty($post_type) || !in_array( $post_type, get_post_types( array('_show' => true) ) ) ) 25 23 $post_type = 'post'; 26 24 27 25 if ( 'post' != $post_type ) { 28 26 $parent_file = "edit.php?post_type=$post_type"; 29 $submenu_file = "edit-tags.php?taxonomy=$taxonomy& post_type=$post_type";27 $submenu_file = "edit-tags.php?taxonomy=$taxonomy&post_type=$post_type"; 30 28 } else { 31 29 $parent_file = 'edit.php'; 32 30 $submenu_file = "edit-tags.php?taxonomy=$taxonomy"; … … 162 160 <div class="wrap nosubsub"> 163 161 <?php screen_icon(); ?> 164 162 <h2><?php echo esc_html( $title ); 165 if ( isset($_GET['s']) && $_GET['s'])163 if ( !empty($_GET['s']) ) 166 164 printf( '<span class="subtitle">' . __('Search results for “%s”') . '</span>', esc_html( stripslashes($_GET['s']) ) ); ?> 167 165 </h2> 168 166 … … 174 172 175 173 <form class="search-form" action="" method="get"> 176 174 <input type="hidden" name="taxonomy" value="<?php echo esc_attr($taxonomy); ?>" /> 175 <input type="hidden" name="post_type" value="<?php echo esc_attr($post_type); ?>" /> 177 176 <p class="search-box"> 178 177 <label class="screen-reader-text" for="tag-search-input"><?php _e( 'Search Tags' ); ?>:</label> 179 178 <input type="text" id="tag-search-input" name="s" value="<?php _admin_search_query(); ?>" /> … … 188 187 <div class="col-wrap"> 189 188 <form id="posts-filter" action="" method="get"> 190 189 <input type="hidden" name="taxonomy" value="<?php echo esc_attr($taxonomy); ?>" /> 190 <input type="hidden" name="post_type" value="<?php echo esc_attr($post_type); ?>" /> 191 191 <div class="tablenav"> 192 192 <?php 193 193 $pagenum = isset( $_GET['pagenum'] ) ? absint( $_GET['pagenum'] ) : 0;