[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
Fri Aug 9 17:59:57 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: closed
Priority: normal | Milestone: 6.7
Component: Comments | Version:
Severity: normal | Resolution: fixed
Keywords: good-first-bug has-patch has-unit- | Focuses: template
tests |
-------------------------------------------------+-------------------------
Changes (by flixos90):
* status: reviewing => closed
* resolution: => fixed
Comment:
In [changeset:"58875" 58875]:
{{{
#!CommitTicketReference repository="" revision="58875"
Comments: Add optional `$context` parameter to `get_edit_comment_link()`
to get the URL without HTML entities.
This brings the function in line with the similar `get_edit_post_link()`
parameter. The 'get_edit_comment_link' filter now additionally receives
the `$comment_id` and `$context` as parameters.
Additionally, as a minor enhancement, the capability check is now more
defensive, as it will no longer cause an error if the given comment ID is
invalid.
As part of the changeset, comprehensive test coverage for the
`get_edit_comment_link()` including the new behavior is added.
Props deepakrohilla.
Fixes #61727.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/61727#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list