diff --git src/bp-core/bp-core-catchuri.php src/bp-core/bp-core-catchuri.php
index 8b49816..e3abb72 100644
|
|
function bp_core_enable_root_profiles() { |
342 | 342 | function bp_core_load_template( $templates ) { |
343 | 343 | global $post, $bp, $wp_query, $wpdb; |
344 | 344 | |
| 345 | // Store the name of the requested template for later use |
| 346 | buddypress()->requested_template = $templates; |
| 347 | |
345 | 348 | // Determine if the root object WP page exists for this request |
346 | 349 | // note: get_page_by_path() breaks non-root pages |
347 | 350 | if ( !empty( $bp->unfiltered_uri_offset ) ) { |
diff --git src/bp-core/bp-core-template.php src/bp-core/bp-core-template.php
index 3d71621..1e6018c 100644
|
|
function bp_is_directory() { |
1294 | 1294 | } |
1295 | 1295 | |
1296 | 1296 | /** |
| 1297 | * Get the top-level template requested on this pageload. |
| 1298 | * |
| 1299 | * @since BuddyPress (2.1.0) |
| 1300 | * |
| 1301 | * @return string |
| 1302 | */ |
| 1303 | function bp_get_requested_template() { |
| 1304 | return apply_filters( 'bp_get_requested_template', buddypress()->requested_template ); |
| 1305 | } |
| 1306 | |
| 1307 | /** |
1297 | 1308 | * Check to see if a component's URL should be in the root, not under a member page. |
1298 | 1309 | * |
1299 | 1310 | * - Yes ('groups' is root) : http://domain.com/groups/the-group |
diff --git src/bp-loader.php src/bp-loader.php
index e73cbf9..5e0ad53 100644
|
|
class BuddyPress { |
95 | 95 | */ |
96 | 96 | public $active_components = array(); |
97 | 97 | |
| 98 | /** |
| 99 | * @var string Template requested for the current pageload. |
| 100 | */ |
| 101 | public $requested_template = ''; |
| 102 | |
98 | 103 | /** Option Overload *******************************************************/ |
99 | 104 | |
100 | 105 | /** |
diff --git src/bp-templates/bp-legacy/buddypress/members/single/home.php src/bp-templates/bp-legacy/buddypress/members/single/home.php
index 0022cb3..0a61a71 100644
|
|
|
24 | 24 | |
25 | 25 | <?php do_action( 'bp_before_member_body' ); |
26 | 26 | |
27 | | if ( bp_is_user_activity() || !bp_current_component() ) : |
| 27 | // If a plugin is requesting the plugins.php template, skip |
| 28 | // the component logic and load it directly |
| 29 | if ( 'members/single/plugins' === bp_get_requested_template() ) : |
| 30 | bp_get_template_part( 'members/single/plugins' ); |
| 31 | |
| 32 | elseif ( bp_is_user_activity() || !bp_current_component() ) : |
28 | 33 | bp_get_template_part( 'members/single/activity' ); |
29 | 34 | |
30 | 35 | elseif ( bp_is_user_blogs() ) : |
diff --git src/bp-templates/bp-legacy/buddypress/members/single/plugins.php src/bp-templates/bp-legacy/buddypress/members/single/plugins.php
index 4c956fb..50833ef 100644
|
|
|
12 | 12 | |
13 | 13 | <?php do_action( 'bp_before_member_plugin_template' ); ?> |
14 | 14 | |
15 | | <?php if ( ! bp_is_current_component_core() ) : ?> |
16 | | |
17 | 15 | <div class="item-list-tabs no-ajax" id="subnav"> |
18 | 16 | <ul> |
19 | 17 | <?php bp_get_options_nav(); ?> |
… |
… |
|
22 | 20 | </ul> |
23 | 21 | </div><!-- .item-list-tabs --> |
24 | 22 | |
25 | | <?php endif; ?> |
26 | | |
27 | 23 | <h3><?php do_action( 'bp_template_title' ); ?></h3> |
28 | 24 | |
29 | 25 | <?php do_action( 'bp_template_content' ); ?> |