WordPress/wp-includes
Peter Wilson 096c95390c Editor: Preload Global Styles REST requests based on user permissions.
For the Post Editor, preload '/wp/v2/global-styles/' . $global_styles_id with a context corresponding to user caps, that is, 'edit' for users that can edit global styles, and 'view' for everyone else.

Preloading the global styles endpoint according to role context means that admins and non admins, e.g., editors, avoid unnecessary client side requests.

Props ramonopoly.
Fixes #62322.


Built from https://develop.svn.wordpress.org/trunk@59795


git-svn-id: http://core.svn.wordpress.org/trunk@59137 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-10 03:56:23 +00:00
..