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

Enqueue block-editor.js dependencies that I didn't enqueue before #170

Merged
merged 2 commits into from
Nov 9, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion php/Blocks/Loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public function editor_assets() {
wp_enqueue_script(
$js_handle,
$this->assets['url']['entry'],
[],
Copy link
Contributor Author

@kienstra kienstra Nov 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made the dependencies argument [] instead of $js_config['dependencies'] in c347a98.

That was to prevent this PHP warning on /wp-admin/widgets.php:

Notice: Function wp_enqueue_script() was called incorrectly. "wp-editor" script should not be enqueued together with the new widgets editor (wp-edit-widgets or wp-customize-widgets). Please see Debugging in WordPress for more information. (This message was added in version 5.8.0.) in wp-includes/functions.php on line 6031

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But that warning is less important now.

Default themes like Twenty Twentythree don't have widgets, and widgets are soft-deprecated in favor of site editing.

$js_config['dependencies'],
$js_config['version'],
true
);
Expand Down