Skip to:
Content

BuddyPress.org

Ticket #4846: 4846.patch

File 4846.patch, 2.3 KB (added by boonebgorges, 11 years ago)
  • bp-core/bp-core-actions.php

    diff --git bp-core/bp-core-actions.php bp-core/bp-core-actions.php
    index f19b30b..8912f3d 100644
    add_action( 'init', 'bp_init', 10 ); 
    3636add_action( 'wp',                      'bp_ready',                  10    );
    3737add_action( 'set_current_user',        'bp_setup_current_user',     10    );
    3838add_action( 'setup_theme',             'bp_setup_theme',            10    );
    39 add_action( 'after_setup_theme',       'bp_after_setup_theme',      10    );
     39add_action( 'after_setup_theme',       'bp_after_setup_theme',      100   ); // After WP themes
    4040add_action( 'wp_enqueue_scripts',      'bp_enqueue_scripts',        10    );
    4141add_action( 'admin_bar_menu',          'bp_setup_admin_bar',        20    ); // After WP core
    4242add_action( 'template_redirect',       'bp_template_redirect',      10    );
  • bp-core/bp-core-dependency.php

    diff --git bp-core/bp-core-dependency.php bp-core/bp-core-dependency.php
    index 9fd177b..553d658 100644
    function bp_setup_theme() { 
    196196 * Piggy back action for BuddyPress sepecific theme actions once the theme has
    197197 * been setup and the theme's functions.php has loaded.
    198198 *
     199 * Hooked to 'after_setup_theme' with a priority of 100. This allows plenty of
     200 * time for other themes to load their features, such as BuddyPress support,
     201 * before our theme compatibility layer kicks in.
     202 *
    199203 * @since BuddyPress (1.6)
    200204 *
    201205 * @uses do_action() Calls 'bp_after_setup_theme'
  • bp-templates/bp-legacy/buddypress-functions.php

    diff --git bp-templates/bp-legacy/buddypress-functions.php bp-templates/bp-legacy/buddypress-functions.php
    index 5e8ec4b..929dfa9 100644
    class BP_Legacy extends BP_Theme_Compat { 
    4747        public function __construct() {
    4848
    4949                // Bail if theme is a derivative of bp-default
    50                 if ( in_array( 'bp-default', array( get_template(), get_stylesheet() ) ) )
     50                if ( in_array( 'bp-default', array( get_template(), get_stylesheet() ) ) ) {
    5151                        return;
     52                }
     53
     54                // Or if the theme supports 'buddypress'
     55                if ( current_theme_supports( 'buddypress' ) ) {
     56                        return;
     57                }
    5258
    5359                $this->setup_globals();
    5460                $this->setup_actions();