[wp-trac] [WordPress Trac] #49869: Apply comment field filters to backend
WordPress Trac
noreply at wordpress.org
Fri Apr 10 17:34:01 UTC 2020
#49869: Apply comment field filters to backend
--------------------------+------------------------------
Reporter: ttodua | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Comments | Version:
Severity: normal | Resolution:
Keywords: | Focuses:
--------------------------+------------------------------
Comment (by ttodua):
Moreover, if WP was more object-oriented in full details, there should
have been the 3rd place where the same hook should be applied - to
EXISTING DATA.
So, ideally:
-in output (during comment-form):
{{{
$output_fields = apply_filters('comment_form_default_fields', $fields,
"is_frontend");
}}}
-in backend (during save):
{{{
$output_fields = apply_filters('comment_form_default_fields', $fields,
"is_backend");
}}}
-in getting the existing data (i.e. in function
"get_comment_author_link"):
{{{
$existing_fields= apply_filters('comment_form_default_fields', $fields,
"is_existing");
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/49869#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list