CMS-like permissions for reading and editing. Content-specific restrictions and roles supplement/override WordPress roles. User groups optional.
WP Super Cache : set WPSC option to disable caching for logged users (unless you only use Role Scoper to customize editing access).
WPML Multilingual CMS : plugin creates a separate post / page / category for each translation. Role Scoper does not automatically synchronize role assignments or restrictions for new translations, but they can be set manually by an Administrator.
QTranslate : Role Scoper ensures compatibility by disabling the caching of page and category listings. To enable caching, change QTranslate get_pages and get_terms filter priority to 2 or higher, then add the following line to wp-config.php: define('SCOPER_QTRANSLATE_COMPAT', true);
Get Recent Comments : not compatible due to direct database query. Use WP Recent Comments widget instead.
The Events Calendar : Not compatible as of TEV 1.6.3. For unofficial workaround, change the-events-calendar.class.php as follows :
change:
add_filter( 'posts_join', array( $this, 'events_search_join' ) );
add_filter( 'posts_where', array( $this, 'events_search_where' ) );
add_filter( 'posts_orderby',array( $this, 'events_search_orderby' ) );
add_filter( 'posts_fields', array( $this, 'events_search_fields' ) );
add_filter( 'post_limits', array( $this, 'events_search_limits' ) );
to:
if( ! is_admin() ) {
add_filter( 'posts_join', array( $this, 'events_search_join' ) );
add_filter( 'posts_where', array( $this, 'events_search_where' ) );
add_filter( 'posts_orderby',array( $this, 'events_search_orderby' ) );
add_filter( 'posts_fields', array( $this, 'events_search_fields' ) );
add_filter( 'post_limits', array( $this, 'events_search_limits' ) );
}
PHP Execution : as of v1.0.0, mechanism to limit editing based on post author capabilities is inherently incompatible w/ Role Scoper. Edit php-execution-plugin/includes/class.php_execution.php as follows :
change:
add_filter('user_has_cap', array(&$this,'action_user_has_cap'),10,3);
to:
add_filter( 'map_meta_cap', array( &$this,'map_meta_cap' ), 10, 4 );
replace function action_user_has_cap with :
function map_meta_cap( $caps, $meta_cap, $user_id, $args ) {
$object_id = ( is_array($args) ) ? $args[0] : $args;
if ( ! $post = get_post( $object_id ) )
return $caps;
if ( function_exists( 'get_post_type_object' ) ) {
$type_obj = get_post_type_object( $post->post_type );
$is_edit_cap = ( ( $type_obj->cap->edit_post == $meta_cap ) && in_array( $type_obj->cap->edit_others_posts, $caps ) );
} else {
$is_edit_cap = in_array( $meta_cap, array( 'edit_post', 'edit_page' ) ) && array_intersect( $caps, array( 'edit_others_posts', 'edit_others_pages' ) );
}
if ( $is_edit_cap ) {
$id = $post->post_author;
if ( isset( $this->cap_cache[$id] ) ) {
$author_can_exec_php = $this->cap_cache[$id];
} else {
$author = new WP_User($id);
$author_can_exec_php = ! empty( $author->allcaps[PHP_EXECUTION_CAPABILITY] );
$this->cap_cache[$id] = $author_can_exec_php;
}
if ( $author_can_exec_php )
$caps []= PHP_EXECUTION_CAPABILITY;
}
return $caps;
}
Read access to uploaded file attachments is normally filtered to match post/page access.
To disable this attachment filtering, disable the option in Roles > Options or copy the following line to wp-config.php: define('DISABLE_ATTACHMENT_FILTERING', true);
To reinstate attachment filtering, remove the definition from wp-config.php and re-enable File Filtering via Roles > Options.
To fail with a null response when file access is denied (no WP 404 screen, but still includes a 404 in response header), copy the folling line to wp-config.php:
define ('SCOPER_QUIET_FILE_404', true);
Normally, files which are in the uploads directory but have no post/page attachment will not be blocked. To block such files, copy the following line to wp-config.php:
define('SCOPER_BLOCK_UNATTACHED_UPLOADS', true);
The Hidden Content Teaser may be configured to display the first X characters of a post/page if no excerpt or more tag is available.
To specify the number of characters (default is 50), copy the following line to wp-config.php:
define('SCOPER_TEASER_NUM_CHARS', 100); // set to any number of your choice
Requires: 3.0 or higher
Compatible up to: 3.3.1
Last Updated: 2012-2-10
Downloads: 206,229




