WordPress.org

Make WordPress Core

Ticket #8770: wpadmin-includes-template_dec31-08.diff

File wpadmin-includes-template_dec31-08.diff, 739 bytes (added by jeremyclarke, 9 years ago)

patch wp-admin/includes/template.php fix wp_dropdown_roles()

  • wp-admin/includes/template.php

     
    26022602        $p = '';
    26032603        $r = '';
    26042604       
    2605         $role_names = $wp_roles->role_names;
    2606         $role_names = apply_filters('role_names_listing', $role_names);
     2605        $editable_roles = get_editable_roles();
    26072606       
    2608         foreach( $role_names as $role => $name ) {
    2609                 $name = translate_with_context($name);
     2607        foreach( $editable_roles as $role => $details ) {
     2608                $name = translate_with_context($details['name']);
    26102609                if ( $selected == $role ) // Make default first in list
    26112610                        $p = "\n\t<option selected='selected' value='$role'>$name</option>";
    26122611                else