data_sources->get($src_name) ) || ! empty($src->no_object_roles) || ! empty($src->taxonomy_only) || ($src_name == 'group') )
wp_die(__('Invalid data source', 'scoper'));
$is_administrator = is_administrator_rs($src, 'user');
$role_bases = array();
if ( USER_ROLES_RS && ( $is_administrator || $scoper_admin->user_can_admin_object($src_name, $object_type, 0, true) ) )
$role_bases []= ROLE_BASIS_USER;
if ( GROUP_ROLES_RS && ( $is_administrator || $scoper_admin->user_can_admin_object($src_name, $object_type, 0, true) || current_user_can('manage_groups') ) )
$role_bases []= ROLE_BASIS_GROUPS;
if ( empty($role_bases) )
wp_die(__awp('Cheatin’ uh?'));
$otype = $scoper->data_sources->member_property($src_name, 'object_types', $object_type);
require_once( dirname(__FILE__).'/admin-bulk_rs.php' );
require_once( dirname(__FILE__).'/admin_lib-bulk-parent_rs.php');
$role_assigner = init_role_assigner();
$nonce_id = 'scoper-assign-roles';
$role_codes = ScoperAdminBulk::get_role_codes();
echo '';
// ==== Process Submission =====
$err = 0;
if ( isset($_POST['rs_submit'] ) ) {
$err = ScoperAdminBulk::role_submission(OBJECT_SCOPE_RS, ROLE_RESTRICTION_RS, '', $src_name, $role_codes, '', $nonce_id);
if ( scoper_get_option( 'file_filtering' ) )
scoper_flush_file_rules();
}
?>
object_types) ) ? "{$src_name}:{$object_type}" : $src_name;
$item_label_singular = $scoper_admin->interpret_src_otype($src_otype, 'singular_name');
$item_label = $scoper_admin->interpret_src_otype($src_otype);
echo '
' . sprintf(__('%s Restrictions', 'scoper'), $item_label_singular)
. ' (' . __('see notes', 'scoper') . ')'
. '
';
if ( scoper_get_option('display_hints') ) {
echo '
';
$link_open = "
";
$uses_taxonomies = scoper_get_taxonomy_usage( $src_name, $object_type );
if ( $uses_taxonomies && (1 == count($uses_taxonomies) ) ) {
$tx_display = $scoper->taxonomies->member_property( reset($uses_taxonomies), 'display_name' );
printf(__('Reduce access to a specific %1$s by requiring some role(s) to be %2$s%3$s-assigned%4$s. Corresponding WP-assigned Roles and RS-assigned General and %5$s Role assignments are ignored.', 'scoper'), $item_label_singular, $link_open, $item_label_singular, '', $tx_display);
} elseif ( count($uses_taxonomies) )
printf(__('Reduce access to a specific %1$s by requiring some role(s) to be %2$s%3$s-assigned%4$s. Corresponding WP-assigned Roles and RS-assigned General and Term Role assignments are ignored.', 'scoper'), $item_label_singular, $link_open, $item_label_singular, '');
else
printf(__('Reduce access to a specific %1$s by requiring some role(s) to be %2$s%3$s-assigned%4$s. Corresponding WP-assigned Roles and RS-assigned General Role assignments are ignored.', 'scoper'), $item_label_singular, $link_open, $item_label_singular, '');
echo '
';
}
$ignore_hierarchy = ! empty($otype->ignore_object_hierarchy);
?>
' . __("Notes", 'scoper') . ':
';
echo '- ';
printf(__('To edit all roles for any %1$s, click on the %1$s name.', 'scoper'), $otype->labels->singular_name );
echo '
';
echo '- ';
printf(__("To edit the %s via its default editor, click on the ID link.", 'scoper'), $otype->labels->singular_name );
echo '
';
if ( ! $is_administrator ) {
echo '- ';
printf(__('To enhance performance, the role editing checkboxes here may not include some roles which you can only edit due to your own %1$s-specific role. In such cases, click on the editing link to edit roles for the individual %1$s.', 'scoper'), $otype->labels->singular_name );
echo '
';
}
echo '
';
echo('
' . __('top', 'scoper') . '');
?>