[wp-trac] [WordPress Trac] #45250: Block editor scripts should be enqueued in an action hooked to `admin_enqueue_scripts` as done in Gutenberg

WordPress Trac noreply at wordpress.org
Fri Nov 23 08:39:38 UTC 2018


#45250: Block editor scripts should be enqueued in an action hooked to
`admin_enqueue_scripts` as done in Gutenberg
--------------------------+----------------------
 Reporter:  Chouby        |       Owner:  (none)
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  Editor        |     Version:  5.0
 Severity:  normal        |  Resolution:  wontfix
 Keywords:  has-patch     |     Focuses:
--------------------------+----------------------

Comment (by Chouby):

 @pento, I am not sure that we understood each other. The issue is not at
 all related to metaboxes.

 It appears that in Polylang, I am using the action `add_meta_boxes` for
 other features than adding the metabox and that's ''how'' I noticed the
 issue reported here.

 The issue is about a different behavior between the plugin Gutenberg
 (installed on top of WP 4.9.8) on one side and WP 5.0 on the other side.
 In Gutenberg, the action is fired before the scripts are enqueued. In WP
 5.0, the action is fired after the scripts are enqueued.

 My understanding of the project is that, since most of the development and
 tests have been done in Gutenberg, WP 5.0 should behave exactly as WP
 4.9.8 + Gutenberg. But maybe I am wrong on this assumption?

 The purpose of the ticket and patch was to restore the same behavior in WP
 5.0 as in Gutenberg.

 I am thoroughly testing the development versions of WP 5.0 so I noticed
 the issue and found a workaround so I won't insist more than that.
 However, this may impact other 3rd party devs. I can't know for sure.

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


More information about the wp-trac mailing list