From 136aa0d6d0d7e455d3b716e8f5ff614545f2dbcf Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Thu, 3 Aug 2017 14:58:26 +0000 Subject: [PATCH] General: Add missing parameters to instances of the `the_permalink` filter. This ensures every instance of this filter receives the same parameters. Props keesiemeijer for identifying the issue See #38462 git-svn-id: https://develop.svn.wordpress.org/trunk@41217 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/comment-template.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/comment-template.php b/src/wp-includes/comment-template.php index 3fd466f933..b9b4cae49d 100644 --- a/src/wp-includes/comment-template.php +++ b/src/wp-includes/comment-template.php @@ -2220,7 +2220,7 @@ function comment_form( $args = array(), $post_id = null ) { 'must_log_in' => '

' . sprintf( /* translators: %s: login URL */ __( 'You must be logged in to post a comment.' ), - wp_login_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) ) + wp_login_url( apply_filters( 'the_permalink', get_permalink( $post_id ), $post_id ) ) ) . '

', /** This filter is documented in wp-includes/link-template.php */ 'logged_in_as' => '

' . sprintf( @@ -2230,7 +2230,7 @@ function comment_form( $args = array(), $post_id = null ) { /* translators: %s: user name */ esc_attr( sprintf( __( 'Logged in as %s. Edit your profile.' ), $user_identity ) ), $user_identity, - wp_logout_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) ) + wp_logout_url( apply_filters( 'the_permalink', get_permalink( $post_id ), $post_id ) ) ) . '

', 'comment_notes_before' => '

' . __( 'Your email address will not be published.' ) . ''. ( $req ? $required_text : '' ) . '

', 'comment_notes_after' => '',