Skip to:
Content

Opened 6 months ago

Closed 6 months ago

#7537 closed enhancement (fixed)

Add the current theme compat id to the body class array

Reported by: hnla Owned by: 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 6 months ago.
Add theme_compat id to body classes.

Download all attachments as: .zip

Change History (3)

@hnla
6 months ago

Add theme_compat id to body classes.

#1 @hnla
6 months ago

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

#2 @hnla
6 months 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.