[wp-trac] [WordPress Trac] #48654: Consider a solution/endpoint to lazy-load scripts and styles

WordPress Trac noreply at wordpress.org
Fri Nov 29 22:45:30 UTC 2019


#48654: Consider a solution/endpoint to lazy-load scripts and styles
-------------------------------------------------+-------------------------
 Reporter:  youknowriad                          |       Owner:  (none)
     Type:  feature request                      |      Status:  new
 Priority:  normal                               |   Milestone:  Awaiting
                                                 |  Review
Component:  REST API                             |     Version:  4.7
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch dev-feedback needs-unit-   |     Focuses:
  tests                                          |  javascript, rest-api
-------------------------------------------------+-------------------------

Comment (by spacedmonkey):

 In [https://core.trac.wordpress.org/attachment/ticket/48654/48654.2.diff
 48654.2.diff] I added a basic permission model.

 Here are the basic permissions rules.

 All core scripts and styles are set as public. All can be found in WP core
 so should be considered public.

 All public script / styles for blocks, also public. These are designed to
 be displayed on the front end.

 All editor script / styles for blocks, check if user has access to
 `edit_posts`. These are designed to be displayed on the editor.

 All other  script / styles  check for `manage_options`.

 This model is not perfect, but it to get the ball rolling.

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


More information about the wp-trac mailing list