WordPress.org

Make WordPress Core

Changeset 12683


Ignore:
Timestamp:
01/10/2010 01:24:56 AM (8 years ago)
Author:
ryan
Message:

Add post_type inputs. Fix submenu highlighting. Props dd32. see #9674

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit-tags.php

    r12616 r12683  
    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) )
     
    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';
     
    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>
     
    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>
     
    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
Note: See TracChangeset for help on using the changeset viewer.