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_afterhook to achieve that:
https://plugins.trac.ww.wp.xz.cn/browser/simple-cloudflare-turnstile/trunk/inc/wordpress.php#L157
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Enqueue scripts when comment form is displayed only’ is closed to new replies.