Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#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:


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 6 years ago.
Checks post_type_supports on media screen
22731.2.diff (8.5 KB) - added by koopersmith 6 years ago.

Download all attachments as: .zip

Change History (10)

6 years ago

Checks post_type_supports on media screen

#1 @jeremyfelt
6 years 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.

#2 @nacin
6 years 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.)

#3 @helenyhou
6 years ago

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

#4 @nacin
6 years ago

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

#5 @nacin
6 years ago

  • Keywords ux-feedback has-patch removed

6 years ago

#6 @koopersmith
6 years 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.

#8 @markjaquith
6 years 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.