Skip to:
Content

BuddyPress.org

#7730 closed enhancement (fixed)

Allow theme to override site template pack choice

Reported by: DJPaul Owned by: djpaul
Milestone: 3.0 Priority: normal
Severity: normal Version:
Component: Templates Keywords:
Cc:

Description

As part of the work for Nouveau, we need a way to let a theme override the site template pack setting.
e.g. new themes may force the "nouveau" template pack, or vice-versa, etc.

Attachments (2)

7730.01.patch (1.6 KB) - added by DJPaul 18 months ago.
7730.02.patch (1.7 KB) - added by DJPaul 18 months ago.

Download all attachments as: .zip

Change History (9)

@DJPaul
18 months ago

#1 @DJPaul
18 months ago

1.patch proposes support for add_theme_support("buddypress-use-XXX"), where XXX is the ID of any registered template pack.

e.g.

add_theme_support("buddypress-use-nouveau");
add_theme_support("buddypress-use-legacy");

If one is set, and a template pack with that ID exists, then BuddyPress will load that instead of the site preference.

Last edited 18 months ago by DJPaul (previous) (diff)

#2 @DJPaul
18 months ago

cc @hnla for comments

#3 @DJPaul
18 months ago

Forget 1.patch. Load order issues. Updating it, same principle though.

@DJPaul
18 months ago

#4 @DJPaul
18 months ago

There we go! 2.patch.

#5 @hnla
18 months ago

Will Patch and test when have a minute.

We seem to have an issue with Trac not seeming to post notifications, at least not to slack where I normally initially pick up on ticket comments, think email pings might also be failing?

#6 @hnla
18 months ago

@djpaul Initial test looks good, forced my Nouveau test bed back to using bp-legacy templates.

Wondering what tests/scenarios we need to think about.

#7 @djpaul
18 months ago

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

In 11936:

Core: allow theme to override site's template pack choice.

As part of the work for Nouveau, we need a way to let a theme override the site template pack setting.
e.g. new themes could force the "nouveau" template pack.

The syntax is buddypress-use-foobar, where "foobar" is the slug name of the template pack.
e.g. buddypress-use-legacy, buddypress-use-nouveau.

Fixes #7730

Note: See TracTickets for help on using tickets.