Skip to content

Commit

Permalink
Merge pull request #44 from itthinx/pre-1.10.3
Browse files Browse the repository at this point in the history
Pre 1.10.3
  • Loading branch information
itthinx authored Jun 20, 2016
2 parents 78020e5 + 4575c45 commit 4f1511e
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 8 deletions.
4 changes: 2 additions & 2 deletions groups.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* Plugin Name: Groups
* Plugin URI: http://www.itthinx.com/plugins/groups
* Description: Groups provides group-based user membership management, group-based capabilities and content access control.
* Version: 1.10.2
* Version: 1.10.3
* Author: itthinx
* Author URI: http://www.itthinx.com
* Donate-Link: http://www.itthinx.com
Expand All @@ -30,7 +30,7 @@
if ( !defined( 'ABSPATH' ) ) {
exit;
}
define( 'GROUPS_CORE_VERSION', '1.10.2' );
define( 'GROUPS_CORE_VERSION', '1.10.3' );
define( 'GROUPS_FILE', __FILE__ );
if ( !defined( 'GROUPS_CORE_DIR' ) ) {
define( 'GROUPS_CORE_DIR', untrailingslashit( plugin_dir_path( __FILE__ ) ) );
Expand Down
12 changes: 11 additions & 1 deletion lib/access/class-groups-access-meta-boxes.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,17 @@ public static function capability( $object = null, $box = null ) {
} else {
$label_title = __( 'No groups grant access through this capability. To grant access to group members using this capability, you should assign it to a group and enable the capability for access restriction.', GROUPS_PLUGIN_DOMAIN );
}
$output .= sprintf( '<option value="%s" %s>', esc_attr( $capability->capability_id ), in_array( $capability->capability, $read_caps ) ? ' selected="selected" ' : '' );

$selected = apply_filters(
'groups_access_restrictions_capability_selected',
in_array( $capability->capability, $read_caps ),
$capability->capability,
$capability->capability_id,
$read_caps,
$post_id,
$post_type
);
$output .= sprintf( '<option value="%s" %s>', esc_attr( $capability->capability_id ), $selected ? ' selected="selected" ': '' );
$output .= wp_filter_nohtml_kses( $capability->capability );
if ( $show_groups ) {
if ( count( $group_names ) > 0 ) {
Expand Down
12 changes: 7 additions & 5 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Contributors: itthinx, proaktion
Donate link: http://www.itthinx.com/plugins/groups
Tags: access, access control, capability, capabilities, content, download, downloads, file, file access, files, group, groups, member, members, membership, memberships, paypal, permission, permissions, subscription, subscriptions, woocommerce
Requires at least: 4.0
Tested up to: 4.5
Stable tag: 1.10.2
Tested up to: 4.5.2
Stable tag: 1.10.3
License: GPLv3

Groups is an efficient and powerful solution, providing group-based user membership management, group-based capabilities and content access control.
Expand Down Expand Up @@ -181,6 +181,9 @@ See also [Groups](http://www.itthinx.com/plugins/groups/)

== Changelog ==

= 1.10.3 =
* Added the groups_access_restrictions_capability_selected filter.

= 1.10.2 =
* Tested for WordPress 4.5.

Expand Down Expand Up @@ -526,6 +529,5 @@ Some installations wouldn't work correctly, showing no capabilities and making i

== Upgrade Notice ==

= 1.10.2 =
Tested for WordPress 4.5.

= 1.10.3 =
This release adds a filter which can be used to modify selected access restriction capabilities.

0 comments on commit 4f1511e

Please sign in to comment.