Make WordPress Core

Changeset 19385


Ignore:
Timestamp:
11/21/2011 08:48:57 PM (13 years ago)
Author:
nacin
Message:

Remove $post_type global usage from media list table. Correct $post_type to 'attachment' for upload screens. see #18722.

Location:
trunk/wp-admin/includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/class-wp-media-list-table.php

    r19252 r19385  
    8585
    8686    function extra_tablenav( $which ) {
    87         global $post_type;
    88         $post_type_obj = get_post_type_object( $post_type );
    8987?>
    9088        <div class="alignleft actions">
    9189<?php
    9290        if ( 'top' == $which && !is_singular() && !$this->detached && !$this->is_trash ) {
    93             $this->months_dropdown( $post_type );
     91            $this->months_dropdown( 'attachment' );
    9492
    9593            do_action( 'restrict_manage_posts' );
  • trunk/wp-admin/includes/screen.php

    r19361 r19385  
    490490                    $taxonomy = 'post_tag';
    491491                $id = 'edit-' . $taxonomy;
     492                break;
     493            case 'upload' :
     494                if ( null === $post_type )
     495                    $post_type = 'attachment';
    492496                break;
    493497        }
Note: See TracChangeset for help on using the changeset viewer.