Skip to:
Content

BuddyPress.org

Ticket #4772: 4772.patch

File 4772.patch, 1.3 KB (added by boonebgorges, 7 years ago)
  • bp-core/bp-core-catchuri.php

    diff --git bp-core/bp-core-catchuri.php bp-core/bp-core-catchuri.php
    index d20ba42..7250e4b 100644
    function bp_core_load_template( $templates ) { 
    377377
    378378        // Filter the template locations so that plugins can alter where they are located
    379379        $located_template = apply_filters( 'bp_located_template', locate_template( (array) $filtered_templates, false ), $filtered_templates );
     380
     381        if ( 'plugins' == substr( $templates, -7 ) ) {
     382                buddypress()->is_plugin = true;
     383        }
     384
    380385        if ( !empty( $located_template ) ) {
    381386
    382387                // Template was located, lets set this as a valid page and not a 404.
  • bp-templates/bp-legacy/buddypress/members/single/home.php

    diff --git bp-templates/bp-legacy/buddypress/members/single/home.php bp-templates/bp-legacy/buddypress/members/single/home.php
    index 9fcf24e..8b261b7 100644
     
    2424
    2525                <?php do_action( 'bp_before_member_body' );
    2626
     27                if ( ! empty( buddypress()->is_plugin ) ) :
     28                        bp_get_template_part( 'members/single/plugins' );
     29                else :
     30
    2731                if ( bp_is_user_activity() || !bp_current_component() ) :
    2832                        bp_get_template_part( 'members/single/activity' );
    2933
     
    5458
    5559                endif;
    5660
     61                endif;
     62
    5763                do_action( 'bp_after_member_body' ); ?>
    5864
    5965        </div><!-- #item-body -->