Skip to content
This repository has been archived by the owner on Sep 27, 2022. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Change count_added to merge_added for cap groups.
  • Loading branch information
Justin Tadlock committed Sep 6, 2015
1 parent ea9101b commit 2a7af34
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion admin/class-cap-group.php
Expand Up @@ -88,7 +88,7 @@ public function __construct( $name, $args = array() ) {
'label' => '',
'icon' => '',
'caps' => array( 'read' ),
'count_added' => true,
'merge_added' => true,
'diff_added' => false,
);

Expand Down
2 changes: 1 addition & 1 deletion admin/class-cap-tabs.php
Expand Up @@ -119,7 +119,7 @@ public function register() {
$caps = array_diff( $group->caps, $this->added_caps );

// Add group's caps to the added caps array.
if ( $group->count_added )
if ( $group->merge_added )
$this->added_caps = array_unique( array_merge( $this->added_caps, $caps ) );

// Create a new section.
Expand Down
2 changes: 1 addition & 1 deletion admin/functions-cap-groups.php
Expand Up @@ -24,7 +24,7 @@ function members_cap_groups() {
*/
function members_register_cap_groups() {

members_register_cap_group( 'all', array( 'label' => esc_html__( 'All', 'members' ), 'caps' => members_get_capabilities(), 'icon' => 'dashicons-plus', 'count_added' => false ) );
members_register_cap_group( 'all', array( 'label' => esc_html__( 'All', 'members' ), 'caps' => members_get_capabilities(), 'icon' => 'dashicons-plus', 'merge_added' => false ) );

members_register_cap_group( 'general', array( 'label' => esc_html__( 'General', 'members' ), 'caps' => members_get_wp_general_caps(), 'icon' => 'dashicons-wordpress' ) );

Expand Down

0 comments on commit 2a7af34

Please sign in to comment.