[buddypress-trac] [BuddyPress] #4846: Theme compat is overaggressive in loading its files, especially JS

buddypress-trac noreply at wordpress.org
Fri Feb 22 14:52:25 UTC 2013


#4846: Theme compat is overaggressive in loading its files, especially JS
-----------------------------------+------------------
 Reporter:  boonebgorges           |       Owner:
     Type:  defect (bug)           |      Status:  new
 Priority:  high                   |   Milestone:  1.7
Component:  Theme                  |     Version:  1.7
 Severity:  critical               |  Resolution:
 Keywords:  2nd-opinion has-patch  |
-----------------------------------+------------------
Changes (by boonebgorges):

 * keywords:  2nd-opinion => 2nd-opinion has-patch


Comment:

 4846.patch implements a `current_theme_supports( 'buddypress' )` check
 before loading bp-legacy theme compat. I had to change the load order for
 this to work properly. The WP Codex recommends that themes register
 feature support at `after_setup_theme`:
 http://codex.wordpress.org/Function_Reference/add_theme_support That means
 that, in order for our `current_theme_supports()` check to work, it needs
 to load later than `after_setup_theme:10`. I've opted to move the
 `bp_after_setup_theme` hook to 100. I'm posting it here before committing,
 to see if there are objections to this specific method.

 Also, it feels like checking for theme support in the Theme_Compat
 constructor is wrong somehow. My gut feeling is that we ought to be
 checking one step upstream, at `bp_load_theme_functions()`, so that the
 theme compat layer doesn't get loaded at all (saving a bit of overhead).
 Thoughts?

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/4846#comment:4>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list