WordPress.org

Make WordPress Core

Changeset 3249


Ignore:
Timestamp:
11/30/2005 08:04:04 PM (16 years ago)
Author:
ryan
Message:

add_role() and remove_role() convenience wrappers around

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/capabilities.php

    r3242 r3249  
    281281}
    282282
    283 // Convenience wrapper around $wp_roles.
     283// Convenience wrappers around $wp_roles.
    284284function get_role($role) {
    285285    global $wp_roles;
    286286
    287287    return $wp_roles->get_role($role);
     288}
     289
     290function add_role($role, $display_name, $capabilities = '') {
     291    global $wp_roles;
     292
     293    return $wp_roles->add_role($role, $display_name, $capabilities = '');
     294}
     295
     296function remove_role($role) {
     297    global $wp_roles;
     298
     299    return $wp_roles->remove_role($role);
    288300}
    289301
Note: See TracChangeset for help on using the changeset viewer.