Changeset 7437
- Timestamp:
- 10/17/2013 04:04:41 PM (13 years ago)
- File:
-
- 1 edited
-
trunk/bp-core/bp-core-catchuri.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-catchuri.php
r7291 r7437 622 622 extract( $r ); 623 623 624 // Special case: when a BuddyPress directory (eg example.com/members) 625 // is set to be the front page, ensure that the current canonical URL 626 // is the home page URL. 627 if ( 'page' == get_option( 'show_on_front' ) && $page_on_front = (int) get_option( 'page_on_front' ) ) { 628 $front_page_component = array_search( $page_on_front, bp_core_get_directory_page_ids() ); 629 630 // If requesting the front page component directory, canonical 631 // URL is the front page 632 if ( false !== $front_page_component && is_page( $page_on_front ) ) { 633 $bp->canonical_stack['canonical_url'] = trailingslashit( bp_get_root_domain() ); 634 635 // Except when the front page is set to the registration page 636 // and the current user is logged in. In this case we send to 637 // the members directory to avoid redirect loops 638 } else if ( bp_is_register_page() && 'register' == $front_page_component && is_user_logged_in() ) { 639 $bp->canonical_stack['canonical_url'] = apply_filters( 'bp_loggedin_register_page_redirect_to', trailingslashit( bp_get_root_domain() . '/' . bp_get_members_root_slug() ) ); 640 } 641 } 642 624 643 if ( empty( $bp->canonical_stack['canonical_url'] ) ) { 625 644 // Build the URL in the address bar
Note: See TracChangeset
for help on using the changeset viewer.