Make WordPress Core


Ignore:
Timestamp:
01/06/2009 10:00:05 PM (16 years ago)
Author:
ryan
Message:

Add get_editable_roles() and role filtering. Props jeremyclarke. fixes #8770

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/template.php

    r10292 r10323  
    26222622    $r = '';
    26232623   
    2624     $role_names = $wp_roles->role_names;
    2625     $role_names = apply_filters('role_names_listing', $role_names);
     2624    $editable_roles = get_editable_roles();
    26262625   
    2627     foreach( $role_names as $role => $name ) {
    2628         $name = translate_with_context($name);
     2626    foreach( $editable_roles as $role => $details ) {
     2627        $name = translate_with_context($details['name']);
    26292628        if ( $selected == $role ) // Make default first in list
    26302629            $p = "\n\t<option selected='selected' value='$role'>$name</option>";
Note: See TracChangeset for help on using the changeset viewer.