Skip to:
Content

BuddyPress.org

Ticket #5211: 5211.02.patch

File 5211.02.patch, 1.3 KB (added by r-a-y, 13 years ago)
  • bp-activity/bp-activity-loader.php

    class BP_Activity_Component extends BP_Component {  
    107107                );
    108108
    109109                parent::setup_globals( $args );
     110
     111                // Set canonical stack on certain action items
     112                if ( ! bp_displayed_user_id() && bp_is_activity_component() ) {
     113                        if ( bp_is_current_action( 'feed' ) ) {
     114                                $bp->canonical_stack['canonical_url'] = trailingslashit( bp_get_activity_directory_permalink() . 'feed' );
     115                        }
     116                }
    110117        }
    111118
    112119        /**
  • bp-core/bp-core-catchuri.php

    function bp_get_canonical_url( $args = array() ) {  
    629629
    630630                // If requesting the front page component directory, canonical
    631631                // URL is the front page
    632                 if ( false !== $front_page_component && is_page( $page_on_front ) ) {
     632                if ( false !== $front_page_component && is_page( $page_on_front ) && empty( $bp->canonical_stack['canonical_url'] ) ) {
    633633                        $bp->canonical_stack['canonical_url'] = trailingslashit( bp_get_root_domain() );
    634634
    635635                // Except when the front page is set to the registration page