Opened 10 months ago
Closed 10 months ago
#4375 closed defect (bug) (fixed)
custom-background body class stripped out of body classes
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.6 |
| Component: | Core | Version: | 1.6-rc |
| 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)
Change History (8)
- 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?
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.
comment:4
in reply to:
↑ description
;
follow-up:
↓ 5
DJPaul — 10 months 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?
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();
}
}

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