Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#39509 closed defect (bug) (fixed)

WP_Screen does not set post type on wp-admin/upload.php

Reported by: postpostmodern's profile postpostmodern Owned by: joemcgill's profile joemcgill
Milestone: 4.8 Priority: normal
Severity: normal Version: 4.7
Component: Media Keywords: has-patch has-unit-tests commit
Focuses: administration Cc:

Description

One place this manifests is in the restrict_manage_posts action in class-wp-media-list-table.php - which passes an empty string as $this->screen->post_type as it's argument.

Attachments (1)

wp_screen_attachment.diff (1.6 KB) - added by postpostmodern 8 years ago.
fix in class WP_Screen and includesScreen unit test

Download all attachments as: .zip

Change History (9)

@postpostmodern
8 years ago

fix in class WP_Screen and includesScreen unit test

#1 @johnbillion
8 years ago

  • Focuses administration added
  • Keywords has-patch added
  • Milestone changed from Awaiting Review to 4.8

This ticket was mentioned in Slack in #core-media by joemcgill. View the logs.


8 years ago

This ticket was mentioned in Slack in #core-media by joemcgill. View the logs.


8 years ago

This ticket was mentioned in Slack in #core-media by joemcgill. View the logs.


8 years ago

#5 @joemcgill
8 years ago

  • Keywords has-unit-tests added
  • Owner set to joemcgill
  • Status changed from new to assigned

#6 @joemcgill
8 years ago

  • Keywords commit added

I've tested and this looks good to me. Marking for commit.

#8 @joemcgill
8 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 40800:

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.

Note: See TracTickets for help on using tickets.