[wp-trac] [WordPress Trac] #43936: Settings: Warn when open registration and new user default is privileged
WordPress Trac
noreply at wordpress.org
Thu May 3 11:22:48 UTC 2018
#43936: Settings: Warn when open registration and new user default is privileged
--------------------------+------------------------------
Reporter: kraftbj | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Users | Version:
Severity: normal | Resolution:
Keywords: has-patch | Focuses: administration
--------------------------+------------------------------
Changes (by subrataemfluence):
* keywords: => has-patch
Comment:
I have added an additional optional parameter which will allow to pass an
array of roles which need to be excluded from the dropdown.
Example:
{{{#!php
<?php
wp_dropdown_roles( get_option('default_role'), array( 'administrator',
'editor' ) );
}}}
The above roles won't render `Administrator` and `Author` in the dropdown.
However, if called like
{{{#!php
<?php
wp_dropdown_roles( get_option('default_role') );
}}}
All roles will be available in the dropdown like now.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/43936#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list