Skip to content

Commit

Permalink
make sure BP is loaded to avoid warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
ideadude committed Dec 27, 2019
1 parent cb31e5c commit 9287ede
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions includes/profiles.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ function pmpro_bp_profile_nav() {

global $current_user, $bp;

if ( empty( $bp ) ) {
return;
}

$user_options = pmpro_bp_get_user_options( $current_user->ID );

if ( PMPROBP_LOCK_ALL_ACCESS == $user_options['pmpro_bp_restrictions'] ) {
Expand Down

0 comments on commit 9287ede

Please sign in to comment.