David Baumwald
a647192d7c
Role/Capability: Add a new update_role function.
...
Until now, changing a user's role involved deleting a user's role then re-adding. This change creates a new `update_role` function and associated method in `WP_Roles` to consolidate this process.
This commit also introduces new unit tests around `update_role` and adds additional "unhappy path" tests for roles and capabilities in general.
Props maksimkuzmin, peterwilsoncc, NomNom99, costdev, SergeyBiryukov.
Fixes #54572 .
git-svn-id: https://develop.svn.wordpress.org/trunk@54213 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-19 20:47:22 +00:00
..
2022-09-19 20:26:09 +00:00
2022-09-06 22:03:10 +00:00
2022-07-07 21:06:03 +00:00
2022-09-19 20:12:02 +00:00
2022-09-19 20:12:02 +00:00
2021-12-21 00:10:26 +00:00
2022-08-27 12:30:08 +00:00
2022-09-06 22:09:49 +00:00
2022-09-06 22:09:49 +00:00
2022-09-03 14:45:20 +00:00
2022-07-29 03:32:58 +00:00
2022-09-06 22:09:49 +00:00
2022-09-19 17:43:55 +00:00
2022-08-22 16:40:54 +00:00
2022-09-13 15:56:28 +00:00
2021-08-20 16:11:04 +00:00
2021-08-21 15:32:53 +00:00
2022-09-05 21:14:38 +00:00
2022-09-06 22:03:10 +00:00
2021-11-04 15:22:47 +00:00
2022-09-19 17:43:55 +00:00
2022-09-13 20:38:56 +00:00
2022-09-14 17:12:20 +00:00
2022-08-25 15:34:24 +00:00
2022-06-12 15:16:09 +00:00
2022-09-06 22:09:49 +00:00
2022-08-08 23:22:43 +00:00
2022-08-27 12:30:08 +00:00
2022-09-06 22:03:10 +00:00
2022-09-06 22:09:49 +00:00
2022-08-11 21:49:08 +00:00
2022-09-06 22:09:49 +00:00
2022-09-06 22:09:49 +00:00
2022-06-23 14:24:08 +00:00
2022-09-06 22:09:49 +00:00
2022-09-06 22:03:10 +00:00
2022-09-13 20:19:17 +00:00
2022-06-08 13:17:27 +00:00
2022-08-27 12:30:08 +00:00
2022-09-06 22:09:49 +00:00
2022-09-06 22:09:49 +00:00
2022-09-09 02:04:18 +00:00
2022-09-15 12:18:30 +00:00
2022-09-06 01:25:45 +00:00
2022-08-05 05:47:56 +00:00
2022-09-14 12:46:33 +00:00
2021-08-07 10:29:41 +00:00
2022-09-06 22:09:49 +00:00
2022-09-16 10:55:58 +00:00
2022-07-08 00:11:15 +00:00
2022-09-19 20:47:22 +00:00
2022-04-30 11:33:30 +00:00
2022-09-06 22:03:10 +00:00
2022-03-02 15:38:27 +00:00
2021-12-19 13:42:37 +00:00
2022-08-25 15:34:24 +00:00
2022-09-06 22:03:10 +00:00
2022-09-06 22:09:49 +00:00
2022-06-09 05:29:57 +00:00
2022-07-07 23:55:13 +00:00
2022-09-18 13:08:33 +00:00
2022-04-07 13:33:03 +00:00
2022-08-04 17:47:41 +00:00
2022-04-01 03:23:07 +00:00
2022-07-07 23:00:07 +00:00
2022-08-08 23:12:30 +00:00
2022-09-06 22:09:49 +00:00
2022-07-29 03:32:58 +00:00
2022-07-06 05:31:47 +00:00
2022-08-15 13:16:22 +00:00
2021-12-07 17:44:46 +00:00
2022-08-07 14:48:42 +00:00
2022-07-31 16:25:27 +00:00
2022-08-23 19:57:17 +00:00
2021-08-26 12:57:08 +00:00
2021-08-26 12:57:08 +00:00
2022-09-19 14:15:10 +00:00
2022-09-06 22:03:10 +00:00
2021-11-04 15:22:47 +00:00
2022-08-08 23:39:06 +00:00
2022-08-16 18:16:43 +00:00
2022-09-11 22:17:04 +00:00
2022-08-27 12:30:08 +00:00
2021-11-04 15:22:47 +00:00
2022-07-23 14:56:51 +00:00
2022-09-06 22:09:49 +00:00
2022-09-06 22:09:49 +00:00
2022-04-19 14:38:16 +00:00
2022-08-25 15:34:24 +00:00
2021-08-26 12:57:08 +00:00
2022-08-27 12:30:08 +00:00
2022-09-06 22:09:49 +00:00
2021-08-07 10:29:41 +00:00
2022-09-07 14:05:41 +00:00
2022-09-06 22:03:10 +00:00
2021-11-04 15:22:47 +00:00
2022-07-08 00:11:15 +00:00
2022-09-06 22:03:10 +00:00
2022-09-01 19:06:19 +00:00
2022-08-27 12:30:08 +00:00
2022-09-09 02:17:33 +00:00
2021-08-07 10:29:41 +00:00