WordPress.org

Make WordPress Core

Changeset 3453


Ignore:
Timestamp:
01/18/2006 03:07:26 AM (12 years ago)
Author:
ryan
Message:

wp_roles cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/upgrade-schema.php

    r3437 r3453  
    252252
    253253    // Add roles
    254     $wp_roles->add_role('administrator', __('Administrator'));
    255     $wp_roles->add_role('editor', __('Editor'));
    256     $wp_roles->add_role('author', __('Author'));
    257     $wp_roles->add_role('contributor', __('Contributor'));
    258     $wp_roles->add_role('subscriber', __('Subscriber'));
     254    add_role('administrator', __('Administrator'));
     255    add_role('editor', __('Editor'));
     256    add_role('author', __('Author'));
     257    add_role('contributor', __('Contributor'));
     258    add_role('subscriber', __('Subscriber'));
    259259   
    260260    // Add caps for Administrator role
    261     $role = $wp_roles->get_role('administrator');
     261    $role = get_role('administrator');
    262262    $role->add_cap('switch_themes');
    263263    $role->add_cap('edit_themes');
     
    292292   
    293293    // Add caps for Editor role
    294     $role = $wp_roles->get_role('editor');
     294    $role = get_role('editor');
    295295    $role->add_cap('moderate_comments');
    296296    $role->add_cap('manage_categories');
     
    314314   
    315315    // Add caps for Author role
    316     $role = $wp_roles->get_role('author');
     316    $role = get_role('author');
    317317    $role->add_cap('upload_files');
    318318    $role->add_cap('edit_posts');
     
    325325   
    326326    // Add caps for Contributor role
    327     $role = $wp_roles->get_role('contributor');
     327    $role = get_role('contributor');
    328328    $role->add_cap('edit_posts');
    329329    $role->add_cap('read');
     
    332332   
    333333    // Add caps for Subscriber role
    334     $role = $wp_roles->get_role('subscriber');
     334    $role = get_role('subscriber');
    335335    $role->add_cap('read');
    336336    $role->add_cap('level_0');
Note: See TracChangeset for help on using the changeset viewer.