Skip to content

Commit

Permalink
Merge pull request #55 from messica/dev
Browse files Browse the repository at this point in the history
BUG FIX: Fixed issue where the 'restrict all of BuddyPress' setting wasn't being applied correctly when levels were set to use non-member settings.
  • Loading branch information
ideadude authored May 26, 2019
2 parents 08b8d42 + 34af3d8 commit 4ee5ff1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
8 changes: 1 addition & 7 deletions includes/common.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,16 @@ function pmpro_bp_get_level_options( $level_id ) {
// defaults
$options = $default_options;
} elseif ( $level_id == 0 ) {

// non-member users
$options = get_option( 'pmpro_bp_options_users', $default_options );

// Non-members might be locked down.
if ( PMPROBP_LOCK_ALL_ACCESS == $options['pmpro_bp_restrictions'] ) {
$options = $default_options;
}

} else {
// level options
$options = get_option( 'pmpro_bp_options_' . $level_id, $default_options );

// might be set to mirror non-member users
if ( $options['pmpro_bp_restrictions'] == PMPROBP_USE_NON_MEMBER_SETTINGS ) {
$non_member_user_options = pmpro_bp_get_level_options( 0 );
$options['pmpro_bp_restrictions'] = $non_member_user_options['pmpro_bp_restrictions'];
$options['pmpro_bp_group_creation'] = $non_member_user_options['pmpro_bp_group_creation'];
$options['pmpro_bp_group_single_viewing'] = $non_member_user_options['pmpro_bp_group_single_viewing'];
$options['pmpro_bp_groups_page_viewing'] = $non_member_user_options['pmpro_bp_groups_page_viewing'];
Expand Down
2 changes: 1 addition & 1 deletion pmpro-buddypress.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Plugin Name: Paid Memberships Pro - BuddyPress Add On
Plugin URI: https://www.paidmembershipspro.com/add-ons/buddypress-integration
Description: Manage access to your BuddyPress Community using Paid Memberships Pro.
Version: 1.2.3
Version: 1.2.4
Author: Paid Memberships Pro
Author URI: https://www.paidmembershipspro.com
Text Domain: pmpro-buddypress
Expand Down
7 changes: 5 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
Contributors: strangerstudios, great-h-master
Tags: paid memberships pro, pmpro, buddypress
Requires at least: 4
Tested up to: 5.2
Stable tag: 1.2.3
Tested up to: 5.2.1
Stable tag: 1.2.4

Manage access to your BuddyPress Community using Paid Memberships Pro

Expand Down Expand Up @@ -99,6 +99,9 @@ This plugin also allows you to use the BuddyPress user registration process (in

== Changelog ==

= 1.2.4 =
* BUG FIX: Fixed issue where the 'restrict all of BuddyPress' setting wasn't being applied correctly when levels were set to use non-member settings.

= 1.2.3 =
* BUG FIX: Only getting members in directory if membership levels exist.
* BUG FIX: Now locking down all of BuddyPress when a level's settings are set to use non-member settings and BuddyPress is locked down for non-members.
Expand Down

0 comments on commit 4ee5ff1

Please sign in to comment.