WordPress.org

Make WordPress Core

Ticket #13783: 13783.diff

File 13783.diff, 2.0 KB (added by ryan, 8 years ago)
  • wp-admin/includes/template.php

     
    39003900 * @param string $id Screen id, optional.
    39013901 */
    39023902function set_current_screen( $id =  '' ) {
    3903         global $current_screen, $hook_suffix, $typenow;
     3903        global $current_screen, $hook_suffix, $typenow, $taxnow;
    39043904
    39053905        if ( empty($id) ) {
    39063906                $current_screen = $hook_suffix;
     
    39323932                        $typenow = 'post';
    39333933                $current_screen->id = $typenow;
    39343934                $current_screen->post_type = $typenow;
     3935        } elseif ( 'edit-tags' == $current_screen->id ) {
     3936                if ( empty($taxnow) )
     3937                        $taxnow = 'post_tag';
     3938                $current_screen->id = 'edit-' . $taxnow;
     3939                $current_screen->taxonomy = $taxnow;
    39353940        }
    39363941
    39373942        $current_screen = apply_filters('current_screen', $current_screen);
  • wp-admin/edit-tags.php

     
    296296</div>
    297297
    298298<div class="clear"></div>
    299 <?php $table_type = ('category' == $taxonomy ? 'categories' : 'edit-tags'); ?>
    300299<table class="widefat tag fixed" cellspacing="0">
    301300        <thead>
    302301        <tr>
    303 <?php print_column_headers($table_type); ?>
     302<?php print_column_headers($current_screen); ?>
    304303        </tr>
    305304        </thead>
    306305
    307306        <tfoot>
    308307        <tr>
    309 <?php print_column_headers($table_type, false); ?>
     308<?php print_column_headers($current_screen, false); ?>
    310309        </tr>
    311310        </tfoot>
    312311
  • wp-admin/admin.php

     
    8181}
    8282
    8383if ( isset($_GET['post_type']) )
    84         $typenow = sanitize_user($_GET['post_type'], true);
     84        $typenow = sanitize_key($_GET['post_type']);
    8585else
    8686        $typenow = '';
    8787
     88if ( isset($_GET['taxonomy']) )
     89        $taxnow = sanitize_key($_GET['taxonomy']);
     90else
     91        $taxnow = '';
     92
    8893require(ABSPATH . 'wp-admin/menu.php');
    8994
    9095if ( current_user_can( 'manage_options' ) )