Changeset 13519 for trunk/src/bp-core/bp-core-template-loader.php
- Timestamp:
- 07/16/2023 03:43:26 PM (20 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/bp-core-template-loader.php
r13492 r13519 570 570 571 571 if ( ! $bp->unfiltered_uri ) { 572 $bp->unfiltered_uri = explode( '/', $GLOBALS['wp']->request ); 572 $unfiltered_uri = explode( '/', $GLOBALS['wp']->request ); 573 574 // Make sure to set the BP unfiltered_uri global when plain links are used. 575 if ( ! bp_has_pretty_urls() ) { 576 $bp_directories = array(); 577 foreach ( $bp->pages as $component_id => $page_properties ) { 578 if ( isset( $bp->{$component_id}->rewrite_ids['directory'] ) ) { 579 $bp_directories[ $bp->{$component_id}->rewrite_ids['directory'] ] = $page_properties->slug; 580 } elseif ( 'activate' === $component_id || 'register' === $component_id ) { 581 $bp_directories[ 'bp_member_' . $component_id ] = $page_properties->slug; 582 } 583 } 584 585 $url_query_chunks = bp_parse_args( $GLOBALS['wp']->query_string, array() ); 586 $directory = key( $url_query_chunks ); 587 if ( isset( $bp_directories[ $directory ] ) ) { 588 $url_query_chunks[ $directory ] = $bp_directories[ $directory ]; 589 } 590 591 $unfiltered_uri = array_values( $url_query_chunks ); 592 } 593 594 $bp->unfiltered_uri = $unfiltered_uri; 573 595 $bp->unfiltered_uri_offset = 0; 574 596 }
Note: See TracChangeset
for help on using the changeset viewer.