Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Blaze: only enqueue script in post editor
Fixes #28184 1. We do not need Blaze in the site editor, since we cannot promote specific posts from there. 2. The Blaze panel relies on @wordpress/editor, which we cannot use in the site editor or the widget editor. 3. When we enqueue the Blaze panel in the site editor or the widget editor, we run into this issue: #20357. This causes Fatal errors just like the one we experienced and worked around in #21763. To solve this issue, we switch to using the admin_enqueue_scripts hook to decide whether when to enqueue our script. It allows us to conditionally enqueue the file based on the page we're on, which is something the enqueue_block_editor_assets hook does not allow yet.
- Loading branch information