Make WordPress Core

Ticket #9674: 9674.13.diff

File 9674.13.diff, 2.2 KB (added by dd32, 15 years ago)
  • wp-admin/edit-tags.php

     
    1111
    1212$title = __('Tags');
    1313
    14 wp_reset_vars( array('action', 'tag', 'taxonomy') );
     14wp_reset_vars( array('action', 'tag', 'taxonomy', 'post_type') );
    1515
    1616if ( empty($taxonomy) )
    1717        $taxonomy = 'post_tag';
     
    1919if ( !is_taxonomy($taxonomy) )
    2020        wp_die(__('Invalid taxonomy'));
    2121
    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
     22if ( empty($post_type) || !in_array( $post_type, get_post_types( array('_show' => true) ) ) )
    2523        $post_type = 'post';
    2624
    2725if ( 'post' != $post_type ) {
    2826        $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";
    3028} else {
    3129        $parent_file = 'edit.php';
    3230        $submenu_file = "edit-tags.php?taxonomy=$taxonomy";     
     
    162160<div class="wrap nosubsub">
    163161<?php screen_icon(); ?>
    164162<h2><?php echo esc_html( $title );
    165 if ( isset($_GET['s']) && $_GET['s'] )
     163if ( !empty($_GET['s']) )
    166164        printf( '<span class="subtitle">' . __('Search results for &#8220;%s&#8221;') . '</span>', esc_html( stripslashes($_GET['s']) ) ); ?>
    167165</h2>
    168166
     
    174172
    175173<form class="search-form" action="" method="get">
    176174<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); ?>" />
    177176<p class="search-box">
    178177        <label class="screen-reader-text" for="tag-search-input"><?php _e( 'Search Tags' ); ?>:</label>
    179178        <input type="text" id="tag-search-input" name="s" value="<?php _admin_search_query(); ?>" />
     
    188187<div class="col-wrap">
    189188<form id="posts-filter" action="" method="get">
    190189<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); ?>" />
    191191<div class="tablenav">
    192192<?php
    193193$pagenum = isset( $_GET['pagenum'] ) ? absint( $_GET['pagenum'] ) : 0;