Opened 11 months ago

Last modified 7 months ago

#21000 new defect (bug)

custom-background still include background-image: none; when setting background color

Reported by: Frumph Owned by:
Priority: normal Milestone: Awaiting Review
Component: General Version: 3.4
Severity: normal Keywords: has-patch close
Cc: mdhansen@…

Description

I am sorry I missed this after the last inclusion before release, but in the function _custom_background_cb()

I overlooked testing logic in the callback before it was released.

if background color was specified but no image, act as if image shouldn't exist

The original complaint was that when you removed (both) the $background and $color that it outputted the background-image: none; However in 3.4 it's not account for $color in the function and !$background

This is the change I am requesting.

      if ($background) {
...

line: 1136 - wp-includes/theme.php

      } else $style .= ' background-image: none;';

This will make it handle the if ($color && !background) appropriately

Attachments (2)

theme-background-cb.diff (479 bytes) - added by Frumph 11 months ago.
adding a background: none for when there is a $color but not $background
21000-relative.patch (484 bytes) - added by MikeHansenMe 9 months ago.
Re-uploading the patch with relative filenames so it will apply easily.

Download all attachments as: .zip

Change History (10)

  • Version set to 3.4

background-image: none is no longer there. I cannot tell if you are proposing that we add a line or remove a line. Could you build a proper SVN patch so we can get a better idea?

adding a background: none for when there is a $color but not $background

  • Keywords has-patch added
  • Keywords dev-feedback added
  • Keywords needs-testing added; dev-feedback removed

Re-uploading the patch with relative filenames so it will apply easily.

  • Keywords needs-testing removed

Tested the patch and it works well. I also recreated the patch so that it will easily apply.

  • Cc mdhansen@… added
  • Keywords close added

I think this was fixed by another update recently. Now when background-image is not set it will default to the one in the style sheet if there is a rule.

Note: See TracTickets for help on using tickets.