Skip to:
Content

BuddyPress.org

Ticket #5199: 5199.patch

File 5199.patch, 675 bytes (added by boonebgorges, 13 years ago)
  • bp-core/bp-core-catchuri.php

    diff --git bp-core/bp-core-catchuri.php bp-core/bp-core-catchuri.php
    index ed159be..d7fbef5 100644
    function bp_get_canonical_url( $args = array() ) {  
    621621        $r = wp_parse_args( $args, $defaults );
    622622        extract( $r );
    623623
     624        if ( 'page' == get_option( 'show_on_front' ) ) {
     625                $page_on_front = get_option( 'page_on_front' );
     626                if ( $page_on_front && is_page( $page_on_front ) ) {
     627                        $bp->canonical_stack['canonical_url'] = bp_get_root_domain();
     628                }
     629        }
     630
    624631        if ( empty( $bp->canonical_stack['canonical_url'] ) ) {
    625632                // Build the URL in the address bar
    626633                $requested_url  = bp_get_requested_url();