Make WordPress Core

Opened 10 years ago

Closed 9 years ago

#39509 closed defect (bug) (fixed)

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

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

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 10 years ago.
fix in class WP_Screen and includesScreen unit test

Download all attachments as: .zip

Change History (9)

@postpostmodern
10 years ago

fix in class WP_Screen and includesScreen unit test

#1 @johnbillion
10 years ago

  • Focuses administration added
  • Keywords has-patch added
  • Milestone Awaiting Review4.8

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


9 years ago

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


9 years ago

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


9 years ago

#5 @joemcgill
9 years ago

  • Keywords has-unit-tests added
  • Owner set to joemcgill
  • Status newassigned

#6 @joemcgill
9 years ago

  • Keywords commit added

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

#8 @joemcgill
9 years ago

  • Resolutionfixed
  • Status assignedclosed

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.