Make WordPress Core

Opened 14 years ago

Closed 12 years ago

#21000 closed defect (bug) (worksforme)

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

Reported by: frumph's profile Frumph Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.4
Component: General Keywords: has-patch close
Focuses: Cc:

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 13 years ago.
adding a background: none for when there is a $color but not $background
21000-relative.patch (484 bytes) - added by MikeHansenMe 13 years ago.
Re-uploading the patch with relative filenames so it will apply easily.

Download all attachments as: .zip

Change History (11)

#2 @nacin
13 years ago

  • 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?

@Frumph
13 years ago

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

#3 @Frumph
13 years ago

  • Keywords has-patch added

#4 @Frumph
13 years ago

  • Keywords dev-feedback added

#5 @Frumph
13 years ago

  • Keywords needs-testing added; dev-feedback removed

@MikeHansenMe
13 years ago

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

#6 @MikeHansenMe
13 years ago

  • Keywords needs-testing removed

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

#7 @MikeHansenMe
13 years ago

  • Cc mdhansen@… added

#8 @MikeHansenMe
13 years ago

  • 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.

#9 @nacin
12 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to worksforme
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.