[wp-trac] [WordPress Trac] #50328: Enqueue script and style assets only for blocks present on the page
WordPress Trac
noreply at wordpress.org
Tue May 11 09:42:03 UTC 2021
#50328: Enqueue script and style assets only for blocks present on the page
-------------------------------------------------+-------------------------
Reporter: aduth | Owner: gziolo
Type: enhancement | Status: closed
Priority: normal | Milestone: 5.8
Component: Editor | Version:
Severity: normal | Resolution: fixed
Keywords: has-patch has-unit-tests commit | Focuses: javascript
needs-dev-note |
-------------------------------------------------+-------------------------
Changes (by gziolo):
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"50836" 50836]:
{{{
#!CommitTicketReference repository="" revision="50836"
Editor: Enqueue script and style assets only for blocks present on the
page
Adds styles for individual core blocks to make it possible to render only
styles for those blocks that are rendered on the page (frontend). This is
optinal functionality for start that can be controlled with the new
`separate_core_block_assets` filter.
In addition to that, styles can be inlined when `path` is passed when
registering an individual styles. This functionality can be changed with
the new `styles_inline_size_limit` filter. The maximum size of inlined
styles in bytes defaults to 20 000.
Props aristath, aduth, westonruter, mcsf.
Fixes #50328, #52620.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/50328#comment:28>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list