[wp-trac] [WordPress Trac] #62322: Global styles: preload user global styles based on user caps in the Post Editor

WordPress Trac noreply at wordpress.org
Mon Feb 10 03:55:01 UTC 2025


#62322: Global styles: preload user global styles based on user caps in the Post
Editor
----------------------------------------+----------------------------
 Reporter:  ramonopoly                  |       Owner:  peterwilsoncc
     Type:  enhancement                 |      Status:  closed
 Priority:  normal                      |   Milestone:  6.8
Component:  Editor                      |     Version:  6.7
 Severity:  normal                      |  Resolution:  fixed
 Keywords:  has-patch, gutenberg-merge  |     Focuses:
----------------------------------------+----------------------------
Changes (by peterwilsoncc):

 * owner:  (none) => peterwilsoncc
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"59795" 59795]:
 {{{
 #!CommitTicketReference repository="" revision="59795"
 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.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/62322#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list