Ticket #6230: bp-core-theme-compatibility.php.diff
File bp-core-theme-compatibility.php.diff, 761 bytes (added by , 10 years ago) |
---|
-
bp-core-theme-compatibility.php
453 453 * properties of {@link WP_Post}; see that class for more details. 454 454 */ 455 455 function bp_theme_compat_reset_post( $args = array() ) { 456 global $wp_query, $post; 456 global $wp_query, $post, $bp; 457 458 // set proper page ID if one exists for the current component 459 if ( empty( $args['ID'] ) ) { 460 $page_ids = bp_get_option( 'bp-pages' ); 461 if ( isset( $page_ids[$bp->current_component] ) ) { 462 $args['ID'] = $page_ids[$bp->current_component]; 463 } 464 } 457 465 458 466 // Switch defaults if post is set 459 467 if ( isset( $wp_query->post ) ) {