/** * 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); } }
/** * 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); } }
/** * 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); } }
/** * Loads the user fields component. * * @internal Do not use this function. The component isn't ready. * @todo Pretty much everything. * * @since 0.1 */ function members_component_user_fields() { if (is_admin() && is_active_members_component('user_fields')) { require_once MEMBERS_COMPONENTS . '/user-fields/default.php'; } }