[buddypress-trac] [BuddyPress] #4879: add_theme_support( 'buddypress' ) should not load buddypress-functions.php
buddypress-trac
noreply at wordpress.org
Sat Sep 28 18:49:42 UTC 2013
#4879: add_theme_support( 'buddypress' ) should not load buddypress-functions.php
-------------------------------------+------------------
Reporter: modemlooper | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 1.9
Component: Backwards Compatability | Version: 1.7
Severity: major | Resolution:
Keywords: needs-testing has-patch |
-------------------------------------+------------------
Changes (by r-a-y):
* keywords: 2nd-opinion needs-testing => needs-testing has-patch
Comment:
As hnla alluded to in #5142, this is definitely a load order issue.
`BP_Theme_Compat::start()` runs ''after'' the `buddypress-functions.php`
file and that functions file contains the extended `BP_Theme_Compat`
class. Chicken before egg!
`01.patch` moves the enable theme compat logic into
`bp_load_theme_functions()` so we can determine whether we should load up
`buddypress-functions.php`.
I've also introduced new functions - `bp_enable_theme_compat()` and
`bp_set_enable_theme_compat()`.
`bp_enable_theme_compat()` is extremely useful for plugin devs as it helps
in determining whether a plugin should serve up templates depending if
theme compat or bp-default is enabled.
The only thing I'm worried about in the patch is deregistering the default
theme compat template stack. Could use some dev feedback on this.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/4879#comment:13>
BuddyPress <http://buddypress.org/>
BuddyPress
More information about the buddypress-trac
mailing list