61 | | /* If we are running BuddyPress on any blog, not just a root blog, we need to first |
62 | | shift off the blog name if we are running a subdirectory install of WPMU. */ |
63 | | if ( $current_blog->path != '/' ) |
64 | | array_shift( $bp_uri ); |
| 61 | /* Any subdirectory names must be removed from $bp_uri. This includes two cases: (1) when WP is installed in a subdirectory, and (2) when BP is running on secondary blog of a subdirectory multisite installation. */ |
| 62 | if ( $chunks = explode( '/', $current_blog->path ) ) { |
| 63 | foreach( $chunks as $key => $chunk ) { |
| 64 | $bkey = array_search( $chunk, $bp_uri ); |
| 65 | if ( $bkey !== false ) |
| 66 | unset( $bp_uri[$bkey] ); |
| 67 | $bp_uri = array_values( $bp_uri ); |
| 68 | } |
| 69 | } |