Skip to:
Content

BuddyPress.org

Ticket #2681: 2681.001.patch

File 2681.001.patch, 707 bytes (added by r-a-y, 14 years ago)
  • buddypress/bp-core/bp-core-catchuri.php

     
    282282                bp_core_load_template( apply_filters( 'bp_core_template_display_profile', 'members/single/home' ) );
    283283}
    284284
     285/**
     286 * bp_core_redirect_canonical()
     287 *
     288 * Properly redirects BuddyPress pages to their proper URL to prevent
     289 * duplicate content errors.
     290 *
     291 * @see redirect_canonical()
     292 */
     293function bp_core_redirect_canonical() {
     294        if ( bp_is_blog_page() )
     295                return;
     296
     297        add_action( 'get_header', 'redirect_canonical', 0 );
     298}
     299add_action( 'bp_loaded', 'bp_core_redirect_canonical' );
     300
    285301?>
     302 No newline at end of file