WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years ago

Last modified 5 years ago

#31033 closed enhancement (wontfix)

Organize the Custom Background function

Reported by: Shaped Pixels Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.1
Component: Customize Keywords:
Focuses: Cc:

Description

Two items here:

(1) I've noticed that the Background admin link under Appearance, now loads up in the Customizer. This is fine, but what I noticed (and a couple others have agreed with me in chat), that the "Background Image" tab creates confusion when the background colour is loaded separately in the "Colours" tab. Also, in the Background Image tab, you get two identical labels of "Background Image". I would like to recommend this get changed so that the Background Image tab is simply renamed as "Background" or "Page Background" which might be more relevant. Then, move the background colour setting into that location because it relates directly with the custom background function. Many people will do variations like a background colour only, a background colour with a transparent image, or just an image, but the colour should always exist with or without the image.

When I make themes, I've been de-registering both and then redoing a Page Background tab in the customizer.

(2) The second problem I've noticed, is that the "colour" when I select one, plus the default colour is not applied to the CSS. Right now for a theme I am creating, on the latest WordPress, I get this generated style:

<style type="text/css" id="custom-background-css">
body.custom-background { background-image: url('http://localhost/shapedpixels/wp-content/themes/shapedpixelspro/images/scanlines.png'); background-repeat: repeat; background-position: top left; background-attachment: fixed; }
</style>

The background colour I have set is not shown here, so I have to do an override from the theme's style.css level. Was this purposely taken out or is this a bug that the system is not loading the background colour with the image? Incidentally, this should not be loaded as "background-image:" but as "background:". I'm going to assume this is a possible bug?

Change History (3)

This ticket was mentioned in Slack in #core-customize by celloexpressions. View the logs.


6 years ago

#2 @valendesigns
6 years ago

  • Resolution set to wontfix
  • Status changed from new to closed
  • Type changed from defect (bug) to enhancement

So you can accomplish the things you want on a theme-by-theme basis by modifying the core controls with the get_ methods. And the second item is expected behavior - you need to handle the default functionality in CSS in addition to setting it in PHP.

#3 @ocean90
5 years ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.