Make WordPress Core


Ignore:
Timestamp:
05/19/2017 06:28:58 PM (8 years ago)
Author:
joemcgill
Message:

Media: Ensure WP_Screen sets post type on wp-admin/upload.php.

The post type property is set to 'attachment' when on the upload screen.

Props postpostmodern.
Fixes #39509.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-screen.php

    r40308 r40800  
    308308                    if ( null === $post_type && is_object_in_taxonomy( 'post', $taxonomy ? $taxonomy : 'post_tag' ) )
    309309                        $post_type = 'post';
     310                    break;
     311                case 'upload':
     312                    $post_type = 'attachment';
    310313                    break;
    311314            }
Note: See TracChangeset for help on using the changeset viewer.