Changeset 13492
- Timestamp:
- 05/29/2023 05:51:12 AM (16 months ago)
- Location:
- trunk/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-activity/classes/class-bp-activity-component.php
r13471 r13492 506 506 */ 507 507 public function parse_query( $query ) { 508 /* 509 * If BP Rewrites are not in use, no need to parse BP URI globals another time. 510 * Legacy Parser should have already set these. 511 */ 512 if ( 'rewrites' !== bp_core_get_query_parser() ) { 513 return parent::parse_query( $query ); 514 } 515 508 516 if ( bp_is_directory_homepage( $this->id ) ) { 509 517 $query->set( $this->rewrite_ids['directory'], 1 ); -
trunk/src/bp-blogs/classes/class-bp-blogs-component.php
r13481 r13492 445 445 */ 446 446 public function parse_query( $query ) { 447 if ( ! is_multisite() ) { 447 /* 448 * Only Multisite configs have a Sites directory. 449 * If BP Rewrites are not in use, no need to parse BP URI globals another time. 450 * Legacy Parser should have already set these. 451 */ 452 if ( ! is_multisite() || 'rewrites' !== bp_core_get_query_parser() ) { 448 453 return parent::parse_query( $query ); 449 454 } -
trunk/src/bp-core/bp-core-template-loader.php
r13468 r13492 566 566 } 567 567 568 // Set some needed URI globals. 569 $bp = buddypress(); 570 $bp->unfiltered_uri = explode( '/', $GLOBALS['wp']->request ); 571 $bp->unfiltered_uri_offset = 0; 568 // Eventually Set some missing URI globals. 569 $bp = buddypress(); 570 571 if ( ! $bp->unfiltered_uri ) { 572 $bp->unfiltered_uri = explode( '/', $GLOBALS['wp']->request ); 573 $bp->unfiltered_uri_offset = 0; 574 } 572 575 573 576 /** -
trunk/src/bp-core/classes/class-bp-component.php
r13471 r13492 578 578 579 579 // Allow components to parse the main query. 580 if ( 'rewrites' === bp_core_get_query_parser() ) { 581 /** 582 * Only fire this hook when pretty links are disabled. 583 * 584 * @todo Remove once BP Rewrites merge process is ended. 585 */ 586 add_action( 'bp_parse_query', array( $this, 'parse_query' ), 10 ); 587 } 580 add_action( 'bp_parse_query', array( $this, 'parse_query' ), 10 ); 588 581 589 582 // Generate rewrite rules. … … 1236 1229 */ 1237 1230 public function parse_query( $query ) { 1238 if ( is_buddypress() ) {1231 if ( is_buddypress() && 'rewrites' === bp_core_get_query_parser() ) { 1239 1232 add_filter( 'posts_pre_query', array( $this, 'pre_query' ), 10, 2 ); 1240 1233 } -
trunk/src/bp-core/classes/class-bp-core.php
r13471 r13492 424 424 */ 425 425 public function parse_query( $query ) { 426 /* 427 * If BP Rewrites are not in use, no need to parse BP URI globals another time. 428 * Legacy Parser should have already set these. 429 */ 430 if ( 'rewrites' !== bp_core_get_query_parser() ) { 431 return parent::parse_query( $query ); 432 } 433 426 434 $is_search = $query->get( 'pagename' ) === bp_get_search_slug() || ( isset( $_GET['bp_search'] ) && 1 === (int) $_GET['bp_search'] ); 427 435 -
trunk/src/bp-groups/classes/class-bp-groups-component.php
r13481 r13492 1067 1067 */ 1068 1068 public function parse_query( $query ) { 1069 /* 1070 * If BP Rewrites are not in use, no need to parse BP URI globals another time. 1071 * Legacy Parser should have already set these. 1072 */ 1073 if ( 'rewrites' !== bp_core_get_query_parser() ) { 1074 return parent::parse_query( $query ); 1075 } 1076 1069 1077 if ( bp_is_directory_homepage( $this->id ) ) { 1070 1078 $query->set( $this->rewrite_ids['directory'], 1 ); -
trunk/src/bp-members/classes/class-bp-members-component.php
r13481 r13492 777 777 */ 778 778 public function parse_query( $query ) { 779 /* 780 * If BP Rewrites are not in use, no need to parse BP URI globals another time. 781 * Legacy Parser should have already set these. 782 */ 783 if ( 'rewrites' !== bp_core_get_query_parser() ) { 784 return parent::parse_query( $query ); 785 } 786 779 787 // Init the current member and member type. 780 788 $member = false;
Note: See TracChangeset
for help on using the changeset viewer.