Skip to content

Commit

Permalink
Don't redirect away from BP profile pages.
Browse files Browse the repository at this point in the history
  • Loading branch information
ideadude committed Apr 7, 2020
1 parent de51957 commit e5bc3b1
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions includes/restrictions.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ function pmpro_bp_bp_get_add_friend_button($args) {
* Redirect away from any BuddyPress page if set to.
*/
function pmpro_bp_lockdown_all_bp() {

if ( !function_exists( 'pmpro_getMembershipLevelForUser' ) ) {
return;
}
Expand All @@ -157,7 +157,12 @@ function pmpro_bp_lockdown_all_bp() {
if ( 'buddypress' == $register_page && in_array( bp_current_component(), array( 'register', 'activate' ) ) ) {
return;
}


// Don't redirect awawy from BuddyPress profile pages.
if ( bp_is_my_profile() ) {
return;
}

global $current_user;
$user_id = $current_user->ID;

Expand Down

0 comments on commit e5bc3b1

Please sign in to comment.