Title: default_role_dropdown_excluded_roles
Published: May 20, 2026

---

# apply_filters( ‘default_role_dropdown_excluded_roles’, string[] $roles_to_exclude )

## In this article

 * [Parameters](https://developer.wordpress.org/reference/hooks/default_role_dropdown_excluded_roles/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/hooks/default_role_dropdown_excluded_roles/?output_format=md#source)
 * [Changelog](https://developer.wordpress.org/reference/hooks/default_role_dropdown_excluded_roles/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/hooks/default_role_dropdown_excluded_roles/?output_format=md#wp--skip-link--target)

Filters the roles to be excluded from the default_role option.

## 󠀁[Parameters](https://developer.wordpress.org/reference/hooks/default_role_dropdown_excluded_roles/?output_format=md#parameters)󠁿

 `$roles_to_exclude`string[]

Array of roles to exclude from the dropdown.
 Defaults to administrator and editor.

## 󠀁[Source](https://developer.wordpress.org/reference/hooks/default_role_dropdown_excluded_roles/?output_format=md#source)󠁿

    ```php
    $excluded_roles = (array) apply_filters( 'default_role_dropdown_excluded_roles', array( 'administrator', 'editor' ) );
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-admin/options-general.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-admin/options-general.php#L316)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-admin/options-general.php#L316-L316)

## 󠀁[Changelog](https://developer.wordpress.org/reference/hooks/default_role_dropdown_excluded_roles/?output_format=md#changelog)󠁿

| Version | Description | 
| [7.0.0](https://developer.wordpress.org/reference/since/7.0.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fdefault_role_dropdown_excluded_roles%2F)
before being able to contribute a note or feedback.