Follow development on the latest release

The future of the bp-default theme

Since BP 1.7 and the introduction of theme compatibility, BuddyPress has worked seamlessly with pretty much any WP theme. Yet we’ve been continuing to maintain the old bp-default theme, which dates back to when themes needed to be built specifically for use with BP. For the last two release cycles, we’ve maintained more-or-less 100% feature parity between our packaged theme compat templates (bp-legacy) and bp-default. After the release of BP 1.9, this will no longer be the case. In BuddyPress 1.9, we begin the process of phasing out the BuddyPress Default theme. bp-default will continue to be packaged with BuddyPress, and will still receive critical fixes and security updates. However, it will no longer get routine bug fixes or new features.

We’ve made this decision for a number of reasons. First, it simplifies the workflow for BP contributors – patches only need to be written for bp-legacy templates. More importantly, this move encourages BuddyPress users – from developers to site administrators – to stop using the old, buggy method of loading templates (see #5241 for just one recent example of how the old method causes problems). The techniques used by our theme compatibility layer, in contrast, are more robustly integrated with WordPress’s request parsing and template loading systems, and will become even more integrated when we move to using proper WP rewrite rules. In short, theme compat is the future, and the BuddyPress ecosystem will become more stable as people gradually move away from the old themes.

Toward this end, we have, as of [7569], stopped offering bp-default on installations that are not already using it. That means that if your site is not already running bp-default (or a child theme of bp-default), BuddyPress 1.9 will not register its bp-themes directory, and bp-default will not show up on Dashboard > Appearance. This’ll ensure that new installations don’t get locked into using the now-sunsetted bp-default theme.

If you are already using bp-default, either directly or as a parent theme, don’t worry. BuddyPress 1.9 will detect that you need bp-default, and will continue to register it with WordPress. Note that if you switch away from a bp-default theme (say, for testing), the theme will disappear from Dashboard > Appearance. If you need it back, add the following line to your bp-custom.php file:

add_filter( 'bp_do_register_theme_directory', '__return_true' );

In some future release, we’ll aim to remove bp-default altogether from the BuddyPress package. It’ll likely find a new home in the wordpress.org theme repository. We’re working on a method of doing this that’ll be as transparent as possible for existing users of the theme. If you’d like to participate in the conversation about how and when this will happen, follow #5212.

I think I speak for everyone who has worked extensively with bp-default and its derivatives when I say that this is something of a bittersweet moment. bp-default was often a bear to work with, but it also proved to be a remarkably flexible and powerful foundation for building BuddyPress sites. And oh, that beautiful blue header gradient! 🙂

Nice job handling the cases where users still need the old theme. It would be really frustrating to have a giant, site-melting change brought about by updating.

Is it too late to rename bp-legacy to something a little more obvious? BP-legacy sounds like it’s intended for users of BP 1.2. Is it accurate to say that the files are a compatibility layer? Would bp-compat make sense, or is that too close to theme-compat?

We can’t change the name of bp-legacy – it’s pretty hardcoded at this point. For some background information, the reason why it was named that way is because the basic template structure (the markup itself) was pulled pretty much verbatim out of the old bp-default templates. We knew at the time that this was a sort of interim fix, and that we’d be moving in the future to a new set of templates. See https://github.com/karmatosed/buddypress-templatepack. That’ll have a different name.

David Cavins
4:57 pm on November 13, 2013

Ha ha, so it really is a legacy system. In that case, the name is perfect!

hnla
6:03 pm on November 13, 2013

>Is it accurate to say that the files are a compatibility layer
>Ha ha, so it really is a legacy system
Yes & no

The files in that dir are the ones looked to when BP runs in theme compat mode, however one can overload those to a theme/child theme and re-write that makup as much as one desires.

I wouldn’t refer to the word ‘legacy’ where I can help it yes those files were copied verbatim-ish from bp-default but the crucial aspect of theme compat is the dir structure/file names and the theme class that sets the ball rolling. So no it’s not a legacy system, but BP has to find template files from somewhere with time that somewhere may change when template pack comes to fruition, but as for now simply ignore the word ‘Legacy’

hnla
6:06 pm on November 13, 2013

bp-default served with honour and deserves a well earned rest 🙂 This is the right way to go to keep core code and attention focussed on theme compat and not offer too many alternatives to have to consider and support. Moving to WP theme repo would be optimum scenario and short of a few hurdles shouldn’t be too hard to achieve.

Ah, just switched to BP1.9 and am using a child theme of Buddypress default theme (Frisco). Child theme failed to load, because it couldn’t find the default theme. Site switched to the new default WP theme and gave me a real shock – then another when I noticed BP-default disappeared. Had to create bp-custom.php as above – did the trick but not a nice intro to BP1.9

togethernet.co.uk – I just tested this on a fresh installation using Frisco, and wasn’t able to reproduce. BuddyPress correctly detected that frisco-for-buddypress uses bp-default as its parent theme, and did not deregister the theme directory. So the upgrade went smoothly.

Can you say more about how you “switched to BP1.9”? Did you do a normal upgrade via Dashboard > Plugins? Did the upgrade go smoothly, or did it quit part-way through?