mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 07:40:07 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@25695 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -2957,6 +2957,11 @@ function sanitize_option($option, $value) {
|
||||
$value = esc_url_raw( $value );
|
||||
$value = str_replace( 'http://', '', $value );
|
||||
break;
|
||||
|
||||
case 'default_role' :
|
||||
if ( ! get_role( $value ) && get_role( 'subscriber' ) )
|
||||
$value = 'subscriber';
|
||||
break;
|
||||
}
|
||||
|
||||
$value = apply_filters("sanitize_option_{$option}", $value, $option);
|
||||
|
||||
Reference in New Issue
Block a user