WordPress.org

Make WordPress Core

#22731 closed defect (bug) (fixed)

CPT that only supports Title and Featured Image still shows additional Media views

Reported by: jchristopher Owned by: koopersmith
Milestone: 3.5 Priority: normal
Severity: normal Version: 3.5
Component: Media Keywords: has-patch needs-testing
Focuses: Cc:

Description

When working with a Custom Post Type that only supports a Title and Featured image and nothing else, the Media dialog shows up as expected, but has extra entries that serve no purpose: http://d.pr/i/NkuR

Attachments (2)

22731.diff (1.7 KB) - added by jeremyfelt 17 months ago.
Checks post_type_supports on media screen
22731.2.diff (8.5 KB) - added by koopersmith 17 months ago.

Download all attachments as: .zip

Change History (10)

jeremyfelt17 months ago

Checks post_type_supports on media screen

comment:1 jeremyfelt17 months ago

  • Keywords has-patch added

attachment:22731.diff checks post_type_supports() for editor and thumbnail before adding the related featured image and gallery strings to the media modal.

comment:2 nacin17 months ago

I think one problem with 22731.diff would be is that it can prevent a wp_editor() (when 'editor' is not supported) from leveraging most of media. Also, does our JS just happen to bail when these are not set?

The solution here should likely be to make "Set featured image" work like the custom header and background workflows: No sidebar, featured image only. This is a change from 3.4 (for things that do support the editor), which allowed for "Insert into post" and other management from the meta box. But recent feedback has been that no one seems to use the featured image box anyway. (Hence "Featured Image" made it back into the main modal.)

comment:3 helenyhou17 months ago

+1 to making the "Set featured image" button have intent. I mean... why wouldn't it? :)

comment:4 nacin17 months ago

  • Milestone changed from Awaiting Review to 3.5
  • Owner set to koopersmith
  • Status changed from new to assigned

comment:5 nacin17 months ago

  • Keywords ux-feedback has-patch removed

koopersmith17 months ago

comment:6 koopersmith17 months ago

  • Keywords has-patch needs-testing added

Opens a separate media frame from the featured image meta box. Adds wp.media.featuredImage to help share resources between that frame and the tab in the media editor frame.

comment:8 markjaquith17 months ago

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

In 23069:

When setting the featured image from the dedicated meta box, only show the featured image section in the media chooser. props koopersmith. fixes #22731

  • Less distracting
  • Some of these sections won't apply for CPTs without an editor
Note: See TracTickets for help on using tickets.