Skip to:
Content

BuddyPress.org

Opened 14 years ago

Closed 14 years ago

Last modified 12 years ago

#4375 closed defect (bug) (fixed)

custom-background body class stripped out of body classes

Reported by: wpmuguru Owned by:
Priority: normal Milestone: 1.6
Component: Core Version: 1.6
Severity: normal Keywords: has-patch
Cc:

Description

If you implement BP with a third party theme that uses the WP custom background feature, the theme has to filter the body class at a lower priority than BP and add the custom-background class back into the body classes array on the BP content areas.

Attachments (1)

4375.diff (577 bytes ) - added by wpmuguru 14 years ago.

Download all attachments as: .zip

Change History (9)

@wpmuguru
14 years ago

#1 @wpmuguru
14 years ago

Also, there is no RC version to set this ticket to. The issue is still present in RC1.

#2 @DJPaul
14 years ago

  • Milestone Awaiting Review1.6
  • Version 1.6-beta1.6-rc

Moving to 1.6 for review. wpmuguru, do you know if this is a new bug in BP 1.6, or if it's present in BP 1.5.6?

#3 @wpmuguru
14 years ago

Yes it was in 1.5.X since WP 3.3 was released. Someone put in a support question on it & that's what reminded me to check and see if it had been fixed in 1.6.

#4 in reply to: ↑ description ; follow-up: @DJPaul
14 years ago

the theme has to filter the body class at a lower priority than BP and add the custom-background class back into the body classes array

I don't quite understand where you think BP removes the class, or what type of template it affects. Are we talking e.g. blog posts, or BuddyPress content pages?

Only thing I can see is the IF near the "preserve any custom classes already set" comment in bp_get_the_body_class() -- is this where the bug is?

#5 in reply to: ↑ 4 @wpmuguru
14 years ago

Replying to DJPaul:

I don't quite understand where you think BP removes the class, or what type of template it affects. Are we talking e.g. blog posts, or BuddyPress content pages?

The BuddyPress content pages.

Only thing I can see is the IF near the "preserve any custom classes already set" comment in bp_get_the_body_class() -- is this where the bug is?

custom-background is not passed through the $custom-classes. It's passed through $wp_classes which is ignored on the BP content pages by

		if ( !bp_is_blog_page() ) {

			// Preserve any custom classes already set
			if ( !empty( $custom_classes ) ) {
				$wp_classes = (array) $custom_classes;
			} else {
				$wp_classes = array();
			}
		}
Version 0, edited 14 years ago by wpmuguru (next)

#6 @DJPaul
14 years ago

Ok, thanks. Something like your patch makes sense then.

#7 @djpaul
14 years ago

  • Resolutionfixed
  • Status newclosed

(In [6198]) Don't remove .custom-background <body> class from BuddyPress content pages when using a theme which supports custom backgrounds. Fixes #4375, props wpmuguru for initial patch.

#8 @johnjamesjacoby
12 years ago

  • Version 1.6-rc1.6
Note: See TracTickets for help on using tickets.