spacedmonkey
12a2275de7
REST API: Introduce filter for controlling menu read access.
...
The menu, menu item, and menu location endpoints were added to the REST API in [52079]. In that commit, menu data was treated as private and restricted to logged-in users with the edit_theme_options capability. However, in many cases, this data can be considered public. Previously, there was no simple way for developers to allow this data to be exposed via the REST API.
This commit introduces the rest_menu_read_access filter, enabling developers to control read access to menus, menu items, and menu locations in the REST API. The same filter is applied across all three REST API classes, simplifying the process of opting into exposing this data.
Each instance of the filter provides the current request and the relevant class instance as context, allowing developers to selectively or globally enable access to the data.
Props spacedmonkey, antonvlasenko, kadamwhite, julianmar, masteradhoc.
Fixes #54304 .
Built from https://develop.svn.wordpress.org/trunk@59718
git-svn-id: http://core.svn.wordpress.org/trunk@59060 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-28 04:09:22 +00:00
..
2024-12-13 19:06:24 +00:00
2024-03-04 14:08:24 +00:00
2024-09-13 05:37:16 +00:00
2024-12-21 17:23:24 +00:00
2024-12-13 19:06:24 +00:00
2024-11-22 10:57:19 +00:00
2024-10-13 19:09:12 +00:00
2024-10-20 23:25:16 +00:00
2024-12-10 11:41:16 +00:00
2023-10-20 13:29:27 +00:00
2024-02-15 23:49:10 +00:00
2024-12-02 08:10:17 +00:00
2024-09-18 18:04:14 +00:00
2025-01-27 19:25:25 +00:00
2024-09-17 20:58:15 +00:00
2023-10-26 20:33:22 +00:00
2024-12-03 15:22:18 +00:00
2024-03-27 12:30:12 +00:00
2024-03-25 12:23:08 +00:00
2025-01-28 04:09:22 +00:00
2024-09-30 23:27:19 +00:00
2024-11-26 21:17:25 +00:00
2024-07-18 13:48:15 +00:00
2024-11-20 21:29:22 +00:00
2024-09-27 18:19:17 +00:00
2023-11-26 16:43:30 +00:00
2025-01-23 23:54:23 +00:00
2024-11-19 22:18:21 +00:00
2024-09-18 21:20:15 +00:00
2024-06-12 12:44:13 +00:00
2024-10-20 23:25:16 +00:00
2024-11-29 22:46:21 +00:00
2024-10-03 00:25:15 +00:00
2024-11-22 10:57:19 +00:00
2024-12-19 13:26:28 +00:00
2024-09-18 22:37:15 +00:00
2024-03-23 14:20:11 +00:00
2024-08-22 23:47:15 +00:00
2024-10-15 14:13:19 +00:00
2023-09-26 00:27:12 +00:00
2025-01-24 23:28:23 +00:00
2024-04-26 15:02:14 +00:00
2024-09-30 22:50:19 +00:00
2025-01-22 19:48:25 +00:00
2024-09-17 21:08:16 +00:00
2024-10-25 20:26:20 +00:00
2024-09-30 22:50:19 +00:00
2024-03-18 15:46:13 +00:00
2025-01-21 21:26:23 +00:00
2024-07-18 00:52:17 +00:00
2024-09-24 16:40:17 +00:00
2024-09-23 12:35:15 +00:00
2024-09-03 16:33:15 +00:00
2023-11-02 00:04:24 +00:00
2024-09-30 17:08:26 +00:00
2024-09-20 01:55:35 +00:00
2024-05-02 20:09:15 +00:00
2024-09-27 09:20:18 +00:00
2024-05-30 08:54:07 +00:00
2024-09-26 12:47:16 +00:00
2024-09-20 02:07:12 +00:00
2024-09-20 02:07:12 +00:00
2023-10-12 12:34:33 +00:00
2024-05-02 00:01:09 +00:00
2025-01-17 21:37:21 +00:00
2024-06-21 17:26:14 +00:00
2024-11-03 23:03:19 +00:00
2025-01-22 19:48:25 +00:00
2024-09-22 22:50:18 +00:00
2024-10-13 19:09:12 +00:00
2025-01-22 19:48:25 +00:00
2024-10-13 19:09:12 +00:00
2025-01-22 19:48:25 +00:00
2025-01-21 22:38:23 +00:00
2024-11-27 11:40:18 +00:00
2024-08-25 23:48:13 +00:00
2024-06-14 12:18:11 +00:00
2025-01-23 23:54:23 +00:00
2024-09-27 19:28:14 +00:00
2024-10-22 10:16:16 +00:00
2024-09-30 22:50:19 +00:00
2024-09-30 22:50:19 +00:00
2023-09-21 18:29:12 +00:00
2023-10-11 07:05:25 +00:00
2023-09-21 18:29:12 +00:00
2025-01-22 19:48:25 +00:00
2024-11-29 23:48:15 +00:00
2025-01-07 22:35:23 +00:00
2024-11-29 23:48:15 +00:00
2024-02-27 22:38:15 +00:00
2025-01-08 12:54:18 +00:00
2024-12-05 21:37:20 +00:00
2024-02-06 01:25:14 +00:00
2024-04-22 20:25:08 +00:00
2023-10-06 14:06:22 +00:00
2024-06-21 17:26:14 +00:00
2024-09-13 22:12:15 +00:00
2024-09-19 12:12:16 +00:00
2024-03-06 05:05:12 +00:00
2025-01-11 13:44:25 +00:00
2024-09-03 18:19:14 +00:00
2025-01-08 12:54:18 +00:00
2024-05-30 15:15:10 +00:00
2025-01-24 13:32:21 +00:00
2024-12-05 22:05:20 +00:00
2024-09-03 18:19:14 +00:00
2024-11-02 15:01:19 +00:00
2024-10-19 23:54:18 +00:00
2024-09-03 18:19:14 +00:00
2024-12-11 15:20:18 +00:00
2024-08-10 23:00:14 +00:00
2024-09-30 22:50:19 +00:00
2025-01-22 19:48:25 +00:00
2024-09-11 12:08:19 +00:00
2024-08-10 23:00:14 +00:00
2024-02-16 21:47:12 +00:00
2024-10-30 22:34:19 +00:00
2024-02-14 19:27:09 +00:00
2025-01-22 19:48:25 +00:00
2024-11-20 02:50:24 +00:00
2024-06-04 11:55:14 +00:00
2024-11-04 02:34:16 +00:00
2024-06-06 08:02:16 +00:00
2024-12-09 02:55:18 +00:00
2024-10-07 22:28:15 +00:00
2024-07-19 23:44:16 +00:00
2024-12-19 10:24:23 +00:00
2024-02-16 21:47:12 +00:00
2024-07-26 07:56:13 +00:00
2024-11-02 15:01:19 +00:00
2025-01-27 15:45:23 +00:00
2024-09-30 18:18:16 +00:00
2024-10-03 00:25:15 +00:00
2024-12-08 23:43:21 +00:00
2025-01-17 00:12:26 +00:00
2024-11-22 19:19:20 +00:00
2024-09-03 18:19:14 +00:00
2024-09-30 23:58:16 +00:00
2025-01-27 14:41:22 +00:00
2025-01-22 19:48:25 +00:00
2024-12-09 02:55:18 +00:00
2025-01-24 13:32:21 +00:00
2024-03-04 12:41:10 +00:00
2025-01-22 19:48:25 +00:00
2024-03-04 12:41:10 +00:00
2024-11-11 17:50:17 +00:00
2024-10-23 22:39:17 +00:00
2024-12-14 23:53:24 +00:00
2025-01-27 14:41:22 +00:00
2024-05-26 20:51:13 +00:00
2024-05-26 20:51:13 +00:00
2025-01-26 22:22:24 +00:00
2024-12-09 02:55:18 +00:00
2024-10-27 19:05:18 +00:00
2024-12-16 14:08:24 +00:00
2025-01-21 22:59:18 +00:00
2024-12-02 17:08:20 +00:00
2025-01-24 23:00:22 +00:00
2024-10-15 23:41:16 +00:00
2024-09-30 05:19:16 +00:00
2025-01-22 19:48:25 +00:00
2025-01-17 00:12:26 +00:00
2025-01-22 19:48:25 +00:00
2024-06-13 20:50:14 +00:00
2024-04-12 17:47:13 +00:00
2025-01-16 16:18:24 +00:00
2025-01-04 10:27:21 +00:00
2024-03-25 17:19:17 +00:00
2025-01-22 19:48:25 +00:00
2025-01-17 00:12:26 +00:00
2025-01-22 19:48:25 +00:00
2024-08-05 19:00:19 +00:00
2025-01-15 22:13:24 +00:00
2025-01-14 11:38:24 +00:00
2024-05-27 16:29:16 +00:00
2025-01-24 10:58:24 +00:00
2024-12-20 23:35:23 +00:00
2025-01-24 13:32:21 +00:00
2024-11-25 10:10:17 +00:00
2025-01-27 23:07:23 +00:00
2024-09-18 19:08:11 +00:00
2024-09-18 21:40:12 +00:00
2025-01-07 22:53:22 +00:00
2024-10-13 18:49:16 +00:00
2024-05-25 03:04:12 +00:00
2024-05-03 04:47:12 +00:00
2025-01-17 00:12:26 +00:00
2023-10-01 00:22:27 +00:00
2024-02-21 19:26:08 +00:00
2025-01-08 12:36:23 +00:00
2023-12-08 06:32:24 +00:00
2024-12-23 23:03:30 +00:00
2024-06-12 06:11:13 +00:00
2024-09-03 18:19:14 +00:00
2025-01-22 19:48:25 +00:00
2025-01-17 00:12:26 +00:00
2025-01-22 19:48:25 +00:00
2025-01-28 04:09:22 +00:00
2025-01-24 21:20:23 +00:00
2025-01-22 19:48:25 +00:00