Opened 10 months ago
Closed 9 months ago
#60526 closed defect (bug) (duplicate)
Comment fields filter missing
Reported by: | ttodua | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Comments | Keywords: | |
Focuses: | Cc: |
Description
so, take:
add_filter('comment_form_default_fields', 'website_remove'); function website_remove($fields) { if( isset($fields['url']) ) unset($fields['url']); return $fields; }
it only removes 'url' input field from output of comment form visually and it does not have any point, because in backend https://core.trac.wordpress.org/browser/tags/6.4.2/src/wp-includes/comment.php#L3460 it is still accepted. So, indeptendently whether you have shown it on front-end or not, bots can still submit form-data with url
field included.
that filter should be supposed to affect both front-end and back-end, otherwise that filter is useless (we can just do display:none
for those fields).
Attachments (1)
Change History (3)
Note: See
TracTickets for help on using
tickets.
#49869 was marked as a duplicate.