Make is much easier for a theme to style the Post Password form.
Fixes #18729 props philiparthurmoore for the original patches. git-svn-id: https://develop.svn.wordpress.org/trunk@25010 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
4d75b0f336
commit
2008bdf818
@ -1232,10 +1232,9 @@ function prepend_attachment($content) {
|
||||
*/
|
||||
function get_the_password_form( $post = 0 ) {
|
||||
$post = get_post( $post );
|
||||
$label = 'pwbox-' . ( empty($post->ID) ? rand() : $post->ID );
|
||||
$output = '<form action="' . esc_url( site_url( 'wp-login.php?action=postpass', 'login_post' ) ) . '" method="post">
|
||||
<p>' . __("This post is password protected. To view it please enter your password below:") . '</p>
|
||||
<p><label for="' . $label . '">' . __("Password:") . ' <input name="post_password" id="' . $label . '" type="password" size="20" /></label> <input type="submit" name="Submit" value="' . esc_attr__("Submit") . '" /></p>
|
||||
$output = '<form action="' . esc_url( site_url( 'wp-login.php?action=postpass', 'login_post' ) ) . '" class="post-password-form" method="post">
|
||||
<p>' . __( 'This post is password protected. To view it please enter your password below:' ) . '</p>
|
||||
<p><label>' . __( 'Password:' ) . ' <input name="post_password" type="password" size="20" /></label> <input type="submit" name="Submit" value="' . esc_attr__( 'Submit' ) . '" /></p>
|
||||
</form>
|
||||
';
|
||||
return apply_filters( 'the_password_form', $output );
|
||||
|
Loading…
Reference in New Issue
Block a user