3
votes
Deferring Script wp-i18n causes a console error 'wp is not defined' - Gravityforms
It is necessary to exclude defer addition for files that have -js-after
In my case, the error was caused by the files hooks.min.js and i18n.min.js.
This function worked great in my case:
function ...
1
vote
Accepted
How to render initial posts on page load in a Gutenberg block using the Interactivity API?
You could consider running actions.getPosts on mount via data-wp-init like:
<div … data-wp-init="actions.getPosts">
As per the documentation:
This directive runs a callback only when ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
javascript × 2692jquery × 543
php × 521
ajax × 311
plugins × 292
block-editor × 253
wp-enqueue-script × 222
plugin-development × 214
css × 183
functions × 152
html × 127
theme-development × 110
customization × 75
theme-customizer × 70
woocommerce-offtopic × 69
rest-api × 66
themes × 59
posts × 57
wp-admin × 54
shortcode × 53
tinymce × 51
custom-post-types × 49
hooks × 49
scripts × 47
forms × 45