?> <?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'); ?> "> <?php wp_nonce_field(members_get_nonce('new-role')); ?> <table class="form-table"> <tr> <th> <label for="role-name"><?php _e('Role Name', 'members'); ?> </label> </th> <td> <input type="text" id="role-name" name="role-name" value="" size="30" /> <br /> <label for="role-name"><?php
?> <?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&action=edit&role={$role->name}")); ?> "> <?php nxt_nonce_field(members_get_nonce('edit-roles')); ?> <table class="form-table"> <tr> <th> <?php _e('Role Name', 'members'); ?> </th> <td> <input type="text" disabled="disabled" readonly="readonly" value="<?php echo esc_attr($role->name); ?> " />
" title="<?php printf(esc_attr__('Edit the %s role', 'members'), $name); ?> "><?php _e('Edit', 'members'); ?> </a> <?php } ?> <?php if (is_multisite() && is_super_admin() && $role !== get_option('default_role') || current_user_can('delete_roles') && $role !== get_option('default_role') && !current_user_can($role)) { ?> | <a href="<?php echo admin_url(wp_nonce_url("users.php?page=roles&action=delete&role={$role}", members_get_nonce('edit-roles'))); ?> " title="<?php printf(esc_attr__('Delete the %s role', 'members'), $name); ?> "><?php _e('Delete', 'members'); ?> </a> <?php } ?> <?php if (current_user_can('manage_options') && $role == get_option('default_role')) { ?>
remove_role($role); /* Load the edit roles page. */ require_once 'edit-roles.php'; break; /* If a role has been updated. Is this needed still? */ /* If a role has been updated. Is this needed still? */ case 'role-updated': /* Set some default variables. */ $title = __('Edit Role', 'members'); $role = $_GET['role']; /* Load the edit role form. */ require_once 'edit-role-form.php'; break; /* If a role has been selected to be edited. */ /* If a role has been selected to be edited. */ case 'edit': /* Verify the referer. */ check_admin_referer(members_get_nonce('edit-roles')); /* Set some default variables. */ $title = __('Edit Role', 'members'); $role = $_GET['role']; /* Load the edit role form. */ require_once 'edit-role-form.php'; break; /* The default page is the edit roles page. */ /* The default page is the edit roles page. */ default: /* Load the edit roles page.*/ require_once 'edit-roles.php'; break; }
<?php $name = str_replace('|User role', '', $name); ?> <tr valign="top" class="<?php if (isset($avail_roles[$role])) { echo 'active'; } else { echo 'inactive'; } ?> "> <td class='plugin-title'> <?php $view_link = admin_url(wp_nonce_url("users.php?page=stats&role={$role}&view=month", members_get_nonce('view-stats'))); ?> <a href="<?php echo $view_link; ?> " title="<?php printf(__('View stats for the %1$s role', 'members'), $name); ?> "><strong><?php echo $name; ?> </strong></a> <div class="row-actions">