@@ -348,7 +357,6 @@
//add users related caps
$grouped_caps['Users'] = [
- 'add_users',
'create_users',
'delete_users',
'edit_users',
@@ -804,9 +812,25 @@
$type_label = (defined('CME_LEGACY_MENU_NAME_LABEL') && !empty($type_obj->labels->menu_name)) ? $type_obj->labels->menu_name : $type_obj->labels->name;
+ if (!empty($type_obj->name)) {
+ if ('taxonomy' == $item_type) {
+ $type_tooltip = sprintf(__( 'The slug for this taxonomy is %s', 'capsman-enhanced' ), '
' . esc_html($type_obj->name) . '' );
+ } else {
+ $type_tooltip = sprintf(__( 'The slug for this post type is %s', 'capsman-enhanced' ), '
' . esc_html($type_obj->name) . '' );
+ }
+ $type_tooltip_class = 'ppc-tool-tip disabled';
+ $type_tooltip_msg = '
+ '. $type_tooltip .'
+
+ ';
+ } else {
+ $type_tooltip_class = '';
+ $type_tooltip_msg = '';
+ }
+
$row .= "
";
$row .= ' ';
- $row .= "" . esc_html($type_label) . '';
+ $row .= "" . esc_html($type_label) . ' '. $type_tooltip_msg .'';
$row .= ' x ';
$row .= ' | ';
@@ -817,10 +841,12 @@
$td_classes = array();
$checkbox = '';
$cap_title = '';
+ $disabled_cap = false;
if ($type_obj->name === 'attachment') {
$attachement_cap_position++;
}
+
if ( ! empty($type_obj->cap->$prop) && ( in_array( $type_obj->name, array( 'post', 'page' ) )
|| ! in_array( $type_obj->cap->$prop, $default_caps )
|| ( ( 'manage_categories' == $type_obj->cap->$prop ) && ( 'manage_terms' == $prop ) && ( 'category' == $type_obj->name ) ) ) ) {
@@ -847,6 +873,7 @@
|| $type_obj->cap->$prop == str_replace( '_pages', "_" . _cme_get_plural($type_obj->name, $type_obj), $prop )
)
&& (!in_array($type_obj->cap->$prop, $grouped_caps_lists)) //capabilitiy not enforced in $grouped_caps_lists
+ && $type_obj->cap->$prop !== 'manage_post_tags'
) {
// only present these term caps up top if we are ensuring that they get enforced separately from manage_terms
if ( in_array( $prop, array( 'edit_terms', 'delete_terms', 'assign_terms' ) ) && ( ! in_array( $type_obj->name, cme_get_detailed_taxonomies() ) || defined( 'OLD_PRESSPERMIT_ACTIVE' ) ) ) {
@@ -881,6 +908,7 @@
$type_caps [$cap_name] = true;
$display_row = true;
$any_caps = true;
+ $disabled_cap = false;
}
} else {
@@ -888,11 +916,23 @@
if ( in_array( $prop, array( 'edit_terms', 'delete_terms', 'assign_terms' ) ) && ( ! in_array( $type_obj->name, cme_get_detailed_taxonomies() ) || defined( 'OLD_PRESSPERMIT_ACTIVE' ) ) ) {
continue;
}
+
+ if ($type_obj->cap->$prop === 'manage_post_tags') {
+ $type_obj->cap->$prop = 'manage_categories';
+ }
+ $disabled_cap = true;
$display_row = true;
$cap_name = sanitize_key($type_obj->cap->$prop);
$cap_title = '';
- $tool_tip = sprintf( __( 'This capability is controlled by %s Use the sidebar settings to allow this to be controlled independently.', 'capsman-enhanced' ), '
' . $cap_name . '.
' );
+
+
+ if ($cap_name === 'manage_categories') {
+ $tool_tip = sprintf(__( 'This capability is controlled by %s', 'capsman-enhanced' ), '
manage_categories' );
+
+ } else {
+ $tool_tip = sprintf(__('This capability is controlled by %s Use the sidebar settings to allow this to be controlled independently.', 'capsman-enhanced'), '
' . $cap_name . '.
');
+ }
$checkbox = '