Skip to:
Content

BuddyPress.org

Ticket #4954: 4954.ray.01b.path.patch

File 4954.ray.01b.path.patch, 511 bytes (added by r-a-y, 10 years ago)

Requires 4954.ray.01.patch - Fixes calculating path for backpat globals

  • bp-core/bp-core-catchuri.php

    diff --git bp-core/bp-core-catchuri.php bp-core/bp-core-catchuri.php
    index 17b272e..a1df020 100644
    function bp_core_get_from_uri( $context = 'item' ) { 
    359359                }
    360360
    361361                // strip site path from URI
    362                 $path = str_replace( $site_path, '', esc_url( $_SERVER['REQUEST_URI'] ) );
     362                $path = substr( esc_url( $_SERVER['REQUEST_URI'] ), strlen( $site_path ) );
    363363
    364364                $bp_root_slugs = wp_list_pluck( (array) buddypress()->pages, 'slug' );
    365365