WordPress.org

Make WordPress Core

Opened 2 years ago

Last modified 8 weeks ago

#20516 new enhancement

Ability to remove a previously-used Header Image from the list of rotating "random" header images

Reported by: TomAuger Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 3.4
Component: Appearance Keywords: has-patch
Focuses: ui, administration Cc:

Description

Being able to add a bunch of header images and then selecting the "Random" option in the Appearance > Header section is awesome! However, it is equally important to be able to remove one/some/all of those header images from the list of rotating images. The current UI does not support this.

An approach that would be the least disruptive to the current UI layout would be to enable a "remove from list" link (I wouldn't use the word "delete" because it's not deleting the media resource) when the user hovers over the image. The link could appear below the thumbnail, much as the Post's Quick Edit link appear under the list of Posts/Pages.

Attachments (1)

remove-header-patch-01.patch (5.7 KB) - added by tomauger 8 weeks ago.
First scratch at removing header images

Download all attachments as: .zip

Change History (9)

comment:1 SergeyBiryukov2 years ago

  • Keywords ux-feedback added

comment:2 nacin3 months ago

  • Component changed from Themes to Appearance

comment:3 ocean908 weeks ago

  • Focuses ui added
  • Keywords needs-patch added; ux-feedback removed

Yes, please.

comment:4 tomauger8 weeks ago

I should take a look at this, now that I know a thing or two about a thing or two. I don't know about getting it in in time for 3.9 though.

tomauger8 weeks ago

First scratch at removing header images

comment:5 follow-up: tomauger8 weeks ago

This initial patch is a quick fix, allowing header images to be removed from the "available images" pool. It has a small jQuery error right now that prevents the user from removing multiple images without a refresh, which I will address in the next update.

The whole header image approach is bogus though and should be completely refactored (see #27202) once we get the Media Modal settled. Currently selecting ANY media library item as a Header Image will automatically create a new attachment, even if it's exactly cropped. So if you remove an image from the list, the next time you add it, your library will get yet another duplicate of that image.

comment:6 tomauger8 weeks ago

  • Focuses administration added
  • Keywords has-patch added; needs-patch removed

comment:7 ircbot8 weeks ago

This ticket was mentioned in IRC in #wordpress-dev by TomAuger. View the logs.

comment:8 in reply to: ↑ 5 SergeyBiryukov8 weeks ago

Replying to tomauger:

Currently selecting ANY media library item as a Header Image will automatically create a new attachment, even if it's exactly cropped. So if you remove an image from the list, the next time you add it, your library will get yet another duplicate of that image.

Related: [20806], #20657.

As noted in IRC, it was designed that way to prevent orphaning header image if the original attachment is deleted (and vice versa).

Currently you can remove an image from the list of available header images by deleting that attachment from Media Library. So I guess the patch should just allow to do that on the Custom Header screen itself.

Note: See TracTickets for help on using tickets.