Skip to:

Opened 14 years ago

Closed 13 years ago

Last modified 8 years ago

#2763 closed enhancement (fixed)

get_xxx() replacement

Reported by: r-a-y's profile r-a-y Owned by:
Milestone: 1.5 Priority: normal
Severity: Version: 1.5
Component: Templates Keywords: dev-feedback has-patch


Anyone see any thing wrong with changing all get_xxx() calls in bp-default to get_xxx('buddypress')?

For example, theme designers can override their regular header.php with header-buddypress.php.

This is primarily for people using bp-template-pack and want a separate look for the BP portion of their site.

If header-buddypress.php doesn't exist, get_header() will always fallback to header.php anyway.


Attachments (1)

2763.01.patch (9.9 KB) - added by r-a-y 13 years ago.
Patch against BP 1.3-bleeding (r4144)

Download all attachments as: .zip

Change History (9)

#1 @hnla
14 years ago

So by default the calls look for *-buddypress.php falling back to the standard files.

Sounds like that increases flexibility quite nicely and has no consequences for existing themes, win win?

#2 @DJPaul
14 years ago

  • Keywords dev-feedback added

Trunk added get_xxx (sidebar, header, footer) only a while ago. Themes will need a few updates for 1.3. Once/if/when we get the revised comments styling in, and also improve the main nav menu styling, we need to do a blog post on to let people know about the changes.

On topic: I have no problems with the idea, and it's a neat solution for a question I've seen fairly often on the support. Would like some feedback from another core dev, but, patches welcome ;)

#3 @r-a-y
14 years ago

I believe all versions of bp-default since BP 1.2 have get_header() and get_footer().
get_sidebar() is the newbie on the block for BP 1.3.

I'll create a patch with all the get_xxx('buddypress') replacements if another core dev says they like the idea ;)

*Sidenote: this is part of my "reimagining" of BP Template Pack. Got an AJAX fix for bp-default coming up in half an hour.

#4 @r-a-y
14 years ago

If anyone was looking for an AJAX fix... none is needed! :p

Just an error on my part. D'oh!

#5 @boonebgorges
14 years ago

+1. Like hnla said - flexibility with good fallbacks is a win-win.

13 years ago

Patch against BP 1.3-bleeding (r4144)

#6 @r-a-y
13 years ago

  • Keywords has-patch added
  • Version changed from 1.2.6 to 1.3

#7 @boonebgorges
13 years ago

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

(In [4347]) Adds 'buddypress' param to get_xxx() template calls. Fixes #2763. Props r-a-y

#8 @DJPaul
8 years ago

  • Component changed from Appearance - Template Parts to Templates
Note: See TracTickets for help on using tickets.