Commit 0964835
committed
Administration: Warn when open registration and new user default is privileged.
Previously, WordPress allowed site owners to open registration AND to set the default new user level to "Administrator" or "Editor". While this combination may make sense for some sites, this is genrally a really really bad idea.
With this changeset:
- Administrator and Editor roles are now removed from the new user default role selector in the General Options admin screen.
- If such a role was selected before, an alert is shown in Site Health.
- A new filter is introduced: `default_role_dropdown_excluded_roles` allows developers to change the default excluded roles in the dropdown.
Props kraftbj, subrataemfluence, roytanck, dd32, ottok, jrf, eatingrules, verygoode, generosus, stevejburge, arunu1996, benniledl, audrasjb, mukesh27, swissspidy, Mte90, zodiac1978, pooja1210, davidbaumwald, johnbillion, jorbin, SirLouen, oglekler, kirasong, shailu25, huzaifaalmesbah, jsmansart.
Fixes #43936.
git-svn-id: https://develop.svn.wordpress.org/trunk@61687 602fd350-edb4-49c9-b593-d223f7449a821 parent ee7a6d8 commit 0964835
File tree
3 files changed
+70
-4
lines changed- src/wp-admin
- includes
3 files changed
+70
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1882 | 1882 | | |
1883 | 1883 | | |
1884 | 1884 | | |
| 1885 | + | |
| 1886 | + | |
| 1887 | + | |
| 1888 | + | |
| 1889 | + | |
| 1890 | + | |
| 1891 | + | |
| 1892 | + | |
| 1893 | + | |
| 1894 | + | |
| 1895 | + | |
| 1896 | + | |
| 1897 | + | |
| 1898 | + | |
| 1899 | + | |
| 1900 | + | |
| 1901 | + | |
| 1902 | + | |
| 1903 | + | |
| 1904 | + | |
| 1905 | + | |
| 1906 | + | |
| 1907 | + | |
| 1908 | + | |
| 1909 | + | |
| 1910 | + | |
| 1911 | + | |
| 1912 | + | |
| 1913 | + | |
| 1914 | + | |
| 1915 | + | |
| 1916 | + | |
| 1917 | + | |
| 1918 | + | |
| 1919 | + | |
| 1920 | + | |
1885 | 1921 | | |
1886 | 1922 | | |
1887 | 1923 | | |
| |||
2889 | 2925 | | |
2890 | 2926 | | |
2891 | 2927 | | |
| 2928 | + | |
| 2929 | + | |
| 2930 | + | |
| 2931 | + | |
2892 | 2932 | | |
2893 | 2933 | | |
2894 | 2934 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
967 | 967 | | |
968 | 968 | | |
969 | 969 | | |
| 970 | + | |
970 | 971 | | |
971 | | - | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
972 | 975 | | |
973 | | - | |
| 976 | + | |
974 | 977 | | |
975 | 978 | | |
976 | | - | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
977 | 982 | | |
978 | 983 | | |
979 | 984 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
304 | 304 | | |
305 | 305 | | |
306 | 306 | | |
307 | | - | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
308 | 329 | | |
309 | 330 | | |
310 | 331 | | |
| |||
0 commit comments