diff --git a/src/wp-includes/post-template.php b/src/wp-includes/post-template.php index ffcca1647d..23dbd2c1ee 100644 --- a/src/wp-includes/post-template.php +++ b/src/wp-includes/post-template.php @@ -1774,11 +1774,33 @@ function prepend_attachment( $content ) { * @return string HTML content for password form for password protected post. */ function get_the_password_form( $post = 0 ) { - $post = get_post( $post ); - $label = 'pwbox-' . ( empty( $post->ID ) ? rand() : $post->ID ); - $output = '
+'; /** @@ -1791,11 +1813,13 @@ function get_the_password_form( $post = 0 ) { * * @since 2.7.0 * @since 5.8.0 Added the `$post` parameter. + * @since 6.8.0 Added the `$invalid_password` parameter. * * @param string $output The password form HTML output. * @param WP_Post $post Post object. + * @param string $invalid_password The invalid password message. */ - return apply_filters( 'the_password_form', $output, $post ); + return apply_filters( 'the_password_form', $output, $post, $invalid_password ); } /**