diff --git bp-core/bp-core-actions.php bp-core/bp-core-actions.php
index f19b30b..8912f3d 100644
|
|
add_action( 'init', 'bp_init', 10 ); |
36 | 36 | add_action( 'wp', 'bp_ready', 10 ); |
37 | 37 | add_action( 'set_current_user', 'bp_setup_current_user', 10 ); |
38 | 38 | add_action( 'setup_theme', 'bp_setup_theme', 10 ); |
39 | | add_action( 'after_setup_theme', 'bp_after_setup_theme', 10 ); |
| 39 | add_action( 'after_setup_theme', 'bp_after_setup_theme', 100 ); // After WP themes |
40 | 40 | add_action( 'wp_enqueue_scripts', 'bp_enqueue_scripts', 10 ); |
41 | 41 | add_action( 'admin_bar_menu', 'bp_setup_admin_bar', 20 ); // After WP core |
42 | 42 | add_action( 'template_redirect', 'bp_template_redirect', 10 ); |
diff --git bp-core/bp-core-dependency.php bp-core/bp-core-dependency.php
index 9fd177b..553d658 100644
|
|
function bp_setup_theme() { |
196 | 196 | * Piggy back action for BuddyPress sepecific theme actions once the theme has |
197 | 197 | * been setup and the theme's functions.php has loaded. |
198 | 198 | * |
| 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 | * |
199 | 203 | * @since BuddyPress (1.6) |
200 | 204 | * |
201 | 205 | * @uses do_action() Calls 'bp_after_setup_theme' |
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 { |
47 | 47 | public function __construct() { |
48 | 48 | |
49 | 49 | // 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() ) ) ) { |
51 | 51 | return; |
| 52 | } |
| 53 | |
| 54 | // Or if the theme supports 'buddypress' |
| 55 | if ( current_theme_supports( 'buddypress' ) ) { |
| 56 | return; |
| 57 | } |
52 | 58 | |
53 | 59 | $this->setup_globals(); |
54 | 60 | $this->setup_actions(); |