[wp-trac] [WordPress Trac] #51330: Allow more granular control over enqueuing editor scripts and styles

WordPress Trac noreply at wordpress.org
Sat Oct 3 15:20:34 UTC 2020


#51330: Allow more granular control over enqueuing editor scripts and styles
-------------------------+-----------------------
 Reporter:  zieladam     |       Owner:  zieladam
     Type:  enhancement  |      Status:  reopened
 Priority:  normal       |   Milestone:  5.6
Component:  Editor       |     Version:
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |     Focuses:
-------------------------+-----------------------
Changes (by Frank Klein):

 * status:  closed => reopened
 * resolution:  fixed =>


Comment:

 Thanks for working on this, because
 `_should_load_block_editor_scripts_and_styles` is an improvement over
 having to check `WP_Screen:: is_block_editor`. Especially because
 `is_block_editor()` is poorly designed, see [this
 comment](https://core.trac.wordpress.org/ticket/45037#comment:21).

 But `is_block_editor` is a public method, and therefore a public API. The
 newly introduced function on the other hand is private--and there's no
 reason for that. It's only a getter function with a filter, and should
 therefore follow the established WordPress pattern of being public.

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


More information about the wp-trac mailing list