diff --git a/wp-includes/link-template.php b/wp-includes/link-template.php index 4cfc47f83e..99d6d52912 100644 --- a/wp-includes/link-template.php +++ b/wp-includes/link-template.php @@ -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 string $location The edit link. + * @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 ); } diff --git a/wp-includes/version.php b/wp-includes/version.php index 3d19edc6d7..3acc53fd8f 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -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.