Skip to content

Commit

Permalink
Fix dependency of enqueued scripts for the future action box
Browse files Browse the repository at this point in the history
  • Loading branch information
andergmartins committed May 17, 2024
1 parent 28148ff commit 7303206
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public function enqueueBlockEditorAssets()
wp_enqueue_script(
'postexpirator-block-editor',
POSTEXPIRATOR_BASEURL . 'assets/js/block-editor.js',
['wp-edit-post'],
['wp-edit-post', 'wp-i18n', 'wp-components', 'wp-url', 'wp-data', 'wp-api-fetch', 'wp-element', 'inline-edit-post', 'wp-html-entities', 'wp-plugins'],
POSTEXPIRATOR_VERSION,
true
);
Expand Down
7 changes: 6 additions & 1 deletion src/Modules/Expirator/Controllers/BulkEditController.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,15 @@ public function initialize()

public function enqueueScripts()
{
wp_enqueue_script("wp-components");
wp_enqueue_script("wp-plugins");
wp_enqueue_script("wp-element");
wp_enqueue_script("wp-data");

wp_enqueue_script(
'postexpirator-bulk-edit',
POSTEXPIRATOR_BASEURL . '/assets/js/bulk-edit.js',
['wp-i18n', 'wp-components', 'wp-url', 'wp-data', 'wp-api-fetch', 'wp-element', 'inline-edit-post', 'wp-html-entities'],
['wp-i18n', 'wp-components', 'wp-url', 'wp-data', 'wp-api-fetch', 'wp-element', 'inline-edit-post', 'wp-html-entities', 'wp-plugins'],
POSTEXPIRATOR_VERSION,
true
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -301,10 +301,15 @@ public function enqueueScripts()
return;
}

wp_enqueue_script("wp-components");
wp_enqueue_script("wp-plugins");
wp_enqueue_script("wp-element");
wp_enqueue_script("wp-data");

wp_enqueue_script(
'publishpress-future-classic-editor',
POSTEXPIRATOR_BASEURL . 'assets/js/classic-editor.js',
['wp-i18n', 'wp-components', 'wp-url', 'wp-data', 'wp-api-fetch', 'wp-element', 'wp-html-entities'],
['wp-i18n', 'wp-components', 'wp-url', 'wp-data', 'wp-api-fetch', 'wp-element', 'inline-edit-post', 'wp-html-entities', 'wp-plugins'],
PUBLISHPRESS_FUTURE_VERSION,
true
);
Expand Down
7 changes: 6 additions & 1 deletion src/Modules/Expirator/Controllers/QuickEditController.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,15 @@ public function processQuickEditUpdate($postId)

public function enqueueScripts()
{
wp_enqueue_script("wp-components");
wp_enqueue_script("wp-plugins");
wp_enqueue_script("wp-element");
wp_enqueue_script("wp-data");

wp_enqueue_script(
'postexpirator-quick-edit',
POSTEXPIRATOR_BASEURL . '/assets/js/quick-edit.js',
['wp-i18n', 'wp-components', 'wp-url', 'wp-data', 'wp-api-fetch', 'wp-element', 'inline-edit-post', 'wp-html-entities'],
['wp-i18n', 'wp-components', 'wp-url', 'wp-data', 'wp-api-fetch', 'wp-element', 'inline-edit-post', 'wp-html-entities', 'wp-plugins'],
POSTEXPIRATOR_VERSION,
true
);
Expand Down

0 comments on commit 7303206

Please sign in to comment.