Filters the roles to be excluded from the default_role option.
$roles_to_excludestring[]wp-admin/options-general.php:316file scope * * @since 7.0.0 * * @param string[] $roles_to_exclude Array of roles to exclude from the dropdown. * Defaults to administrator and editor. */ $excluded_roles = (array) apply_filters( 'default_role_dropdown_excluded_roles', array( 'administrator', 'editor' ) ); $editable_roles = array_reverse( get_editable_roles() ); $selected = get_option( 'default_role' ); foreach ( $editable_roles as $role => $details ) {Introduced in 7.0.0. Unchanged from 7.0.4 through 7.1.0.
Signature, return type and hooks compared across 2 parsed releases.