-
Notifications
You must be signed in to change notification settings - Fork 3
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
[wp compliance] new strategy for inline printing of scripts and stylesheets #887
Labels
Comments
ghost
added
the
[Priority : critical]
label
Apr 1, 2022
ghost
self-assigned this
Apr 1, 2022
ghost
pushed a commit
that referenced
this issue
Apr 2, 2022
ghost
pushed a commit
that referenced
this issue
Apr 2, 2022
ghost
pushed a commit
that referenced
this issue
Apr 2, 2022
ghost
pushed a commit
that referenced
this issue
Apr 2, 2022
ghost
pushed a commit
that referenced
this issue
Apr 2, 2022
ghost
pushed a commit
that referenced
this issue
Apr 2, 2022
Uses the technique described here : https://developer.wordpress.org/reference/functions/wp_add_inline_script/#comment-5304
ghost
pushed a commit
that referenced
this issue
Apr 2, 2022
ghost
pushed a commit
that referenced
this issue
Apr 2, 2022
ghost
pushed a commit
that referenced
this issue
Apr 2, 2022
ghost
added
the
Needs tests
label
Apr 3, 2022
ghost
pushed a commit
that referenced
this issue
Apr 3, 2022
ghost
closed this as completed
Apr 8, 2022
This issue was closed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Some scripts and stylesheets of the plugin needs to be printed inline and are not added to an alread registered script.
Classic Editor plugin does it for example here : classic-editor.php#L416
Another popular plugin, Beaver Builder does it too for example here : https://plugins.trac.wordpress.org/browser/beaver-builder-lite-version/trunk/classes/class-fl-builder.php#L763
For scripts that need to be printed inline and not added to an already registered script, it iscompliant to use wp_print_inline_script_tag() as described here : https://developer.wordpress.org/reference/functions/wp_add_inline_script/#comment-5304 => Important : this can't be done in footer hooks. It would be too late
The text was updated successfully, but these errors were encountered: