[wp-trac] [WordPress Trac] #53678: Comment author filter is not applied to comment reply
WordPress Trac
noreply at wordpress.org
Sun Nov 14 17:54:27 UTC 2021
#53678: Comment author filter is not applied to comment reply
------------------------------+---------------------
Reporter: mjulian7 | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 5.9
Component: Comments | Version:
Severity: minor | Resolution:
Keywords: has-patch commit | Focuses:
------------------------------+---------------------
Comment (by SergeyBiryukov):
Hi there, welcome to WordPress Trac! Thanks for the PR.
This looks good, but we should pass the full comment object to
`get_comment_author()`, instead of just the ID, same as other comment
template functions do:
* `comment_author()`
* `get_comment_author_link()`
* `get_comment_text()`
* `comment_form_title()`
That way, it can reuse the existing object and avoid an creating a new
`WP_Comment` instance, with an extra cache lookup or database query. See
[34039], [34042], [34129], and other similar changes on #33638 for more
context.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/53678#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list