Forums
Forums / Plugin: WP Comment Policy Checkbox / Using different hook for better compatibility
(@cyman)
6 years, 3 months ago
Hey!
I propose an improvement to this great plugin. For better compatibility with all the themes, I recommend hooking to comment_form_fields filter instead of comment_form_default_fields which is used now.
comment_form_fields
comment_form_default_fields
From https://developer.ww.wp.xz.cn/reference/functions/comment_form/ it is apparent that when the theme sets is own 'fields' in the $args the checkbox is not shown.
'fields'
$args
I can provide a PR if needed.
Let me know! Thank you.
The topic ‘Using different hook for better compatibility’ is closed to new replies.
(@cyman)
6 years, 3 months ago
Hey!
I propose an improvement to this great plugin. For better compatibility with all the themes, I recommend hooking to
comment_form_fieldsfilter instead ofcomment_form_default_fieldswhich is used now.From https://developer.ww.wp.xz.cn/reference/functions/comment_form/ it is apparent that when the theme sets is own
'fields'in the$argsthe checkbox is not shown.I can provide a PR if needed.
Let me know! Thank you.