Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blaze: only enqueue script in post editor #28187

Merged
merged 1 commit into from
Jan 5, 2023

Commits on Jan 5, 2023

  1. 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.
    jeherve committed Jan 5, 2023
    Configuration menu
    Copy the full SHA
    fd29b2e View commit details
    Browse the repository at this point in the history