[buddypress-trac] [BuddyPress] #4869: BP Theme Compat & BuddyPress Widgets styles

buddypress-trac noreply at wordpress.org
Wed Mar 20 21:54:34 UTC 2013


#4869: BP Theme Compat & BuddyPress Widgets styles
-------------------------+------------------
 Reporter:  imath        |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  1.7
Component:  Theme        |     Version:  1.7
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |
-------------------------+------------------
Changes (by r-a-y):

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


Comment:

 > Just checked, on multisite legacy's buddypress.css and buddypress.js are
 also loaded in child blogs.

 > I complete my last comment : the 2 files are loaded even if the primary
 blog uses BP Default.

 Confirmed.

 In 01.patch, I've done a number of things:
 * Move all theme compat logic away from the `BP_Legacy` class constructor
 and into the parent `BP_Theme_Compat` class under a new method -
 `start()`.
 * Add multisite and multiblog checks to the `start()` method
 * Add last check for a BP template (`members/members-loop.php`) as a final
 resort
 * Rework conditional logic so we don't have to check for bp-default and
 the members loop until necessary
 * Use the new parent `start()` method in the `BP_Legacy` class
 constructor.

 The decision to move all theme compat logic away from BP Legacy was so
 future BP template packs can easily use the parent `start()` method
 instead of having to add that logic in their class constructor.

 The multisite and multiblog checks address imath's problem about BP
 Legacy's styles being added where they shouldn't.

 The members/members-loop.php check was added so theme authors don't
 necessarily need to add `add_theme_support( 'buddypress' )` to their
 theme, which is great as a lot of theme authors will be late in updating
 their themes.

 Let me know what you think.

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


More information about the buddypress-trac mailing list