/**
 * Displays a message if the Content Permissions component is active but no role
 * has been given the capability of 'restrict_content', which is a required capability to 
 * use the component.
 *
 * @since 0.1
 * @uses is_active_members_component() Checks if the content_permissions component is active.
 * @uses members_check_form_cap() Checks if the restrict_content capability has been given to a role.
 */
function members_message_no_restrict_content()
{
    if (is_active_members_component('content_permissions') && !members_check_for_cap('restrict_content')) {
        $message = __('No role currently has the <code>restrict_content</code> capability.  To use the <em>Content Permissions</em> component, at least one role must have this capability.', 'members');
        members_admin_message('', $message);
    }
}
Exemplo n.º 2
0
/**
 * Message to show when no role has the 'edit_roles' capability.
 * @since 0.1
 */
function members_message_no_edit_roles()
{
    if (is_active_members_component('edit_roles') && !members_check_for_cap('edit_roles')) {
        $message = __('No role currently has the <code>edit_roles</code> capability.  Please add this to each role that should be able to manage/edit roles. If you do not change this, any user that has the <code>edit_users</code> capability will be able to edit roles.', 'members');
        members_admin_message('', $message);
    }
}
Exemplo n.º 3
0
/**
 * Displays a message if the New Roles component is active and no 
 * roles have the 'create_roles' capability.
 *
 * @since 0.1
 */
function members_message_no_create_roles()
{
    if (is_active_members_component('new_roles') && !members_check_for_cap('create_roles')) {
        $message = __('To create new roles, you must give the <code>create_roles</code> capability to at least one role.', 'members');
        members_admin_message('', $message);
    }
}
Exemplo n.º 4
0
?>

<div class="wrap">

	<?php 
screen_icon();
?>

	<h2><?php 
_e('Add New Role', 'members');
?>
</h2>

	<?php 
if (!empty($new_role_added)) {
    members_admin_message('', sprintf(__('The %s role has been created.', 'members'), esc_html($_POST['role-name'])));
}
?>

	<?php 
do_action('members_pre_new_role_form');
// Available action hook for displaying messages.
?>

	<div id="poststuff">

		<form name="form0" method="post" action="<?php 
echo admin_url('users.php?page=role-new');
?>
">
Exemplo n.º 5
0
/**
 * Message to show when multiple roles have been deleted (bulk delete).
 *
 * @since 0.1.0
 */
function members_message_roles_deleted()
{
    members_admin_message('', __('Selected roles deleted.', 'members'));
}
Exemplo n.º 6
0
    }
    // End check for new capabilities
}
// End check for form submission
?>

<div class="wrap">

	<h2><?php 
printf(__('Edit the %1$s role', 'members'), $role->name);
?>
</h2>

	<?php 
if (isset($role_updated) and $role_updated) {
    members_admin_message('', __('Role updated.', 'members'));
}
?>

	<?php 
do_action('members_pre_edit_role_form');
//Available pre-form hook for displaying messages.
?>

	<div id="poststuff">

		<form name="form0" method="post" action="<?php 
echo admin_url(esc_url("users.php?page=roles&amp;action=edit&amp;role={$role->name}"));
?>
" style="border:none;background:transparent;">