diff --git a/wp-includes/post-template.php b/wp-includes/post-template.php
index be15252..002d274 100644
a
|
b
|
function prepend_attachment($content) { |
1541 | 1541 | function get_the_password_form( $post = 0 ) { |
1542 | 1542 | $post = get_post( $post ); |
1543 | 1543 | $label = 'pwbox-' . ( empty($post->ID) ? rand() : $post->ID ); |
| 1544 | |
| 1545 | // Display error message if post password is incorrect |
| 1546 | if ( isset( $_COOKIE['wp-postpass_' . COOKIEHASH] ) ) |
| 1547 | echo '<p><strong>' . get_the_password_form_wrong_password() . '</strong></p>'; |
| 1548 | |
1544 | 1549 | $output = '<form action="' . esc_url( site_url( 'wp-login.php?action=postpass', 'login_post' ) ) . '" class="post-password-form" method="post"> |
1545 | 1550 | <p>' . __( 'This content is password protected. To view it please enter your password below:' ) . '</p> |
1546 | 1551 | <p><label for="' . $label . '">' . __( 'Password:' ) . ' <input name="post_password" id="' . $label . '" type="password" size="20" /></label> <input type="submit" name="Submit" value="' . esc_attr_x( 'Enter', 'post password form' ) . '" /></p></form> |
… |
… |
function get_the_password_form( $post = 0 ) { |
1561 | 1566 | } |
1562 | 1567 | |
1563 | 1568 | /** |
| 1569 | * Displays message if incorrect password supplied on protected post. |
| 1570 | * |
| 1571 | * @since 4.5.2 |
| 1572 | * |
| 1573 | * @return string HTML content for the error message if post password inputted incorrectly. |
| 1574 | */ |
| 1575 | function get_the_password_form_wrong_password() { |
| 1576 | |
| 1577 | $output = esc_html_x('Wrong password. Please try again.', 'incorrect post password'); |
| 1578 | |
| 1579 | /** |
| 1580 | * Filter the HTML output for the error message if post password inputted incorrectly. |
| 1581 | * |
| 1582 | * @since 4.5.2 |
| 1583 | * |
| 1584 | * @param string $output The error message output. |
| 1585 | */ |
| 1586 | return apply_filters( 'the_password_form_wrong_password', $output ); |
| 1587 | } |
| 1588 | |
| 1589 | /** |
1564 | 1590 | * Whether currently in a page template. |
1565 | 1591 | * |
1566 | 1592 | * This template tag allows you to determine if you are in a page template. |