Enqueue scripts when comment form is displayed only
-
We are loading comment form via Ajax and there is no reason to enqueue scripts until the comment form is displayed.
For example, Simple Cloudflare Turnstile plugin has been using
comment_form_after
hook to achieve that:
https://plugins.trac.www.ads-software.com/browser/simple-cloudflare-turnstile/trunk/inc/wordpress.php#L157
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- You must be logged in to reply to this topic.