[wp-trac] [WordPress Trac] #50328: Enqueue script and style assets only for blocks present on the page
WordPress Trac
noreply at wordpress.org
Wed Jul 1 18:11:54 UTC 2020
#50328: Enqueue script and style assets only for blocks present on the page
-------------------------+-------------------------
Reporter: aduth | Owner: gziolo
Type: enhancement | Status: assigned
Priority: normal | Milestone: 5.5
Component: Editor | Version:
Severity: normal | Resolution:
Keywords: | Focuses: javascript
-------------------------+-------------------------
Comment (by gziolo):
It looks like the following check fixes the issue for the editor:
{{{#!php
<?php
$skip_assets = is_admin() || is_feed() || ( defined( 'REST_REQUEST' ) &&
REST_REQUEST );
}}}
I'm not sure it's the best way to approach it though.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/50328#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list