Make WordPress Core


Ignore:
Timestamp:
10/06/2013 10:55:42 AM (11 years ago)
Author:
nacin
Message:

Reverse the order of roles in wp_dropdown_roles(). Reset to 'subscriber' when the default role is removed and when a save is invalid.

props garyc40, wonderboymusic.
fixes #14578.

File:
1 edited

Legend:

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

    r25673 r25695  
    194194        if ( $this->use_db )
    195195            update_option( $this->role_key, $this->roles );
     196
     197        if ( get_option( 'default_role' ) == $role )
     198            update_option( 'default_role', 'subscriber' );
    196199    }
    197200
Note: See TracChangeset for help on using the changeset viewer.