mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-02 05:31:25 +01:00
Comments: Ensure $comment_id
parameter on get_edit_comment_link
filter is always a comment ID.
Follow up to [58875]. Props david.binda, peterwilsoncc, mukesh27, davidbaumwald. Fixes #61727. Built from https://develop.svn.wordpress.org/trunk@59012 git-svn-id: http://core.svn.wordpress.org/trunk@58408 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ee69ec404e
commit
f8a7a22bee
@ -1618,14 +1618,17 @@ function get_edit_comment_link( $comment_id = 0, $context = 'display' ) {
|
||||
|
||||
$location = admin_url( $action ) . $comment->comment_ID;
|
||||
|
||||
// Ensure the $comment_id variable passed to the filter is always an ID.
|
||||
$comment_id = (int) $comment->comment_ID;
|
||||
|
||||
/**
|
||||
* Filters the comment edit link.
|
||||
*
|
||||
* @since 6.7.0 The $comment_id and $context parameters are now being passed to the filter.
|
||||
*
|
||||
* @param string $location The edit link.
|
||||
* @param int $comment_id Optional. Unique ID of the comment to generate an edit link.
|
||||
* @param int $context Optional. Context to include HTML entities in link. Default 'display'.
|
||||
* @param int $comment_id Unique ID of the comment to generate an edit link.
|
||||
* @param string $context Context to include HTML entities in link. Default 'display'.
|
||||
*/
|
||||
return apply_filters( 'get_edit_comment_link', $location, $comment_id, $context );
|
||||
}
|
||||
|
@ -16,7 +16,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.7-alpha-59011';
|
||||
$wp_version = '6.7-alpha-59012';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user