| 360 | | // Reset the post |
| 361 | | bp_theme_compat_reset_post( array( |
| 362 | | 'ID' => 0, |
| 363 | | 'is_404' => true, |
| 364 | | 'post_status' => 'publish', |
| 365 | | ) ); |
| 366 | | |
| 367 | | // Set theme compat to false since the reset post function automatically sets |
| 368 | | // theme compat to true |
| 369 | | bp_set_theme_compat_active( false ); |
| | 360 | // Reset post if not on a directory page |
| | 361 | // if we're not on a directory page, this means we're faking a page and we |
| | 362 | // need to reset the post to avoid notices |
| | 363 | if ( ! bp_is_directory() ) { |
| | 364 | bp_theme_compat_reset_post( array( |
| | 365 | 'ID' => 0, |
| | 366 | 'is_404' => true, |
| | 367 | 'post_status' => 'publish', |
| | 368 | ) ); |
| | 369 | |
| | 370 | // Set theme compat to false since the reset post function automatically sets |
| | 371 | // theme compat to true |
| | 372 | bp_set_theme_compat_active( false ); |
| | 373 | } |