[wp-testers] Problem with appearance -> background

Philip M. Hofer (Frumph) philip at frumph.net
Mon Jun 11 18:06:10 UTC 2012


Sorry champ, if it works that way then I will not support giving themes the 
default.

Bad programming.

Why?

Because no matter what happens, because of order of execution the 
custom-background and background-image: none; will ALWAYS overwrite it.



-----Original Message----- 
From: Andrew Nacin
Sent: Monday, June 11, 2012 10:57 AM
To: wp-testers at lists.automattic.com
Subject: Re: [wp-testers] Problem with appearance -> background

On Mon, Jun 11, 2012 at 4:37 AM, Jon Cave <jon at lionsgoroar.co.uk> wrote:

> On Mon, Jun 11, 2012 at 5:13 AM, Philip M. Hofer (Frumph)
> <philip at frumph.net> wrote:
> > The body class "custom-background" is staying even after clearing
> everything
> > from the appearance -> background
>
> Confirmed. I reopened http://core.trac.wordpress.org/ticket/20448 with a
> patch.
>
> Thanks for the report.


Frumph —

Best I can tell, this is not actually a bug. I don't think you "cleared
everything" from Appearance > Background. You pressed "Remove Background
Image," but your theme registers a default image, either via the
BACKGROUND_IMAGE constant (old) or the default-image argument passed to
add_theme_support() (3.4).

As you "removed" that image, we have to print out a "background-image:
none", in order to override any background image references in the
stylesheet.

If your theme registers a default image, we are always going to print
body.custom-background.

But, if your theme does not register a default image and you do register a
default color, then there is a small bug: If you have no customizations at
all (nothing in the DB), then it is possible to end up with the
"custom-background" body class but not actually have the <style> block
printed. The class should not be there.

I've added a comment to the same ticket,
http://core.trac.wordpress.org/ticket/20448.

If this behavior strikes you as off, please let us know.
_______________________________________________
wp-testers mailing list
wp-testers at lists.automattic.com
http://lists.automattic.com/mailman/listinfo/wp-testers 



More information about the wp-testers mailing list