diff --git a/user-role-editor/includes/ure-options.php b/user-role-editor/includes/ure-options.php index 5df8a9f..1be304d 100644 --- a/user-role-editor/includes/ure-options.php +++ b/user-role-editor/includes/ure-options.php @@ -103,6 +103,24 @@ } } } + +//add caps from custom post types +foreach(get_post_types(array('_builtin'=>false),'objects') as $key=>$object){ + //1 + //echo "post type key:$key";var_dump($object->cap); + foreach($object->cap as $capability){ + $cap['inner']=$capability; + $cap['human']= __(ure_ConvertCapsToReadable($capability),'ure'); + if ( isset( $built_in_wp_caps[ $key ] ) ) { + $cap['wp_core'] = true; + } else { + $cap['wp_core'] = false; + } + $ure_fullCapabilities[$capability] = $cap; + //echo "adding $capability";var_dump($cap); + } + +} asort($ure_fullCapabilities); diff --git a/user-role-editor/user-role-editor.php b/user-role-editor/user-role-editor.php index 71a1d72..a4a2558 100644 --- a/user-role-editor/user-role-editor.php +++ b/user-role-editor/user-role-editor.php @@ -51,6 +51,7 @@ define('URE_SPACE_REPLACER', '_URE-SR_'); define('URE_PARENT', 'users.php'); define('URE_KEY_CAPABILITY', 'administrator'); +define('URE_SHOW_ADMIN_ROLE',true); require_once('includes/ure-lib.php');