Skip to:
Content

BuddyPress.org

Opened 12 years ago

Closed 12 years ago

Last modified 10 years ago

#4375 closed defect (bug) (fixed)

custom-background body class stripped out of body classes

Reported by: wpmuguru's profile wpmuguru Owned by:
Milestone: 1.6 Priority: normal
Severity: normal Version: 1.6
Component: Core 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 12 years ago.

Download all attachments as: .zip

Change History (9)

@wpmuguru
12 years ago

#1 @wpmuguru
12 years ago

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

#2 @DJPaul
12 years ago

  • Milestone changed from Awaiting Review to 1.6
  • Version changed from 1.6-beta to 1.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
12 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
12 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
12 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();
			}
		}
Last edited 12 years ago by wpmuguru (previous) (diff)

#6 @DJPaul
12 years ago

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

#7 @djpaul
12 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(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
10 years ago

  • Version changed from 1.6-rc to 1.6
Note: See TracTickets for help on using tickets.