Skip to:
Content

BuddyPress.org

Opened 7 years ago

Closed 7 years ago

#7537 closed enhancement (fixed)

Add the current theme compat id to the body class array

Reported by: hnla's profile hnla Owned by: hnla's profile hnla
Milestone: 2.9 Priority: low
Severity: trivial Version:
Component: Core Keywords: has-patch
Cc:

Description

It might be helpful to add the theme_compat->theme->id to the body classes as an additional hook for authors, plugins to be able to hook styles to particular template packs.

We can do this now in advance of new registered themes safely as we'll just be adding a class that wouldn't exist before.

I've used the id in stead of the name as 'name' in legacies case is a string with whitespace, instead I've prepended bp- to the id to create the class token.

Attachments (1)

7537.patch (548 bytes) - added by hnla 7 years ago.
Add theme_compat id to body classes.

Download all attachments as: .zip

Change History (3)

@hnla
7 years ago

Add theme_compat id to body classes.

#1 @hnla
7 years ago

  • Keywords has-patch added
  • Owner set to hnla
  • Status changed from new to accepted

#2 @hnla
7 years ago

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

In 11605:

Add theme compat id to body classes

With the advent of selectable template packs it might help to identify theme in the body classes.

Commit adds the bp_get_theme_compat_id() appended to string 'bp-', using name can result in white space string.

Fixes #7537

Note: See TracTickets for help on using tickets.