[buddypress-trac] [BuddyPress] #4879: add_theme_support( 'buddypress' ) should not load buddypress-functions.php

buddypress-trac noreply at wordpress.org
Wed Oct 16 00:52:43 UTC 2013


#4879: add_theme_support( 'buddypress' ) should not load buddypress-functions.php
-------------------------------------+---------------------------
 Reporter:  modemlooper              |       Owner:  boonebgorges
     Type:  defect (bug)             |      Status:  closed
 Priority:  normal                   |   Milestone:  1.9
Component:  Backwards Compatability  |     Version:  1.7
 Severity:  major                    |  Resolution:  fixed
 Keywords:  needs-testing has-patch  |
-------------------------------------+---------------------------
Changes (by boonebgorges):

 * owner:   => boonebgorges
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"7432"]:
 {{{
 #!CommitTicketReference repository="" revision="7432"
 Do a better job preventing theme compat from running when
 current_theme_supports( 'buddypress' )

 This changeset ensures that when a theme declares add_theme_support(
 'buddypress' ),
 BuddyPress will not load any of its theme compatibility layer. Previously,
 'buddypress' support would prevent templates from loading, but would still
 allow the buddypress-functions.php file to load in certain cases.

 To this end, two new functions are introduced:
 - bp_detect_theme_compat_with_current_theme(), which centralizes the logic
   used by BuddyPress to detect whether the current theme will require
 theme
   compatibility (themes do not need theme compat when
 current_theme_supports( 'buddypress' ),
   when it's related to bp-default, or when members/members-loop.php is
 found).
   The function sets a global flag which can be checked later.
 - bp_use_theme_compat_with_current_theme(), which is used to check the
 flag
   set in bp_detect_theme_compat_with_current_theme().

 Fixes #4879

 Props r-a-y
 }}}

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


More information about the buddypress-trac mailing list