[wp-trac] [WordPress Trac] #61727: Add `$context` parameter to `get_edit_comment_link()` to get the URL without HTML entities
WordPress Trac
noreply at wordpress.org
Tue Sep 10 09:54:22 UTC 2024
#61727: Add `$context` parameter to `get_edit_comment_link()` to get the URL
without HTML entities
-------------------------------------------------+-------------------------
Reporter: flixos90 | Owner: flixos90
Type: enhancement | Status: reopened
Priority: normal | Milestone: 6.7
Component: Comments | Version:
Severity: normal | Resolution:
Keywords: good-first-bug has-patch has-unit- | Focuses: template
tests |
-------------------------------------------------+-------------------------
Changes (by david.binda):
* status: closed => reopened
* resolution: fixed =>
Comment:
Sorry for reopening the ticket, but I've run into an issue where the
`$comment_id` passed as an optional argument to the
`get_edit_comment_link` filter callback is not an `int` but an object of
the `WP_Comment` class.
This happens in case the object is passed as an argument to the
`get_edit_comment_link` function. The docblock of the
`get_edit_comment_link` function and it's implementation actually allows
the `WP_Commnet` object to be passed in instead of an `int`.
IMHO, either the documentation of the `get_edit_comment_link` filter needs
to be updated the way it matches such behaviour, or the code needs to be
updated the way it ensures the `$comment_id` param is always an `int`.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/61727#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list