Skip to content

Commit e4b3f44

Browse files
Docs: Correct documentation for the_password_form hook.
This replaces an outdated note about the 20 characters limit on the password field in the WordPress database schema. The `post_password` column was increased to 255 characters in WordPress 4.7. Follow-up to [27676], [38590]. Props debarghyabanerjee, peterwilsoncc, dd32, mukesh27. Fixes #61703. git-svn-id: https://develop.svn.wordpress.org/trunk@58846 602fd350-edb4-49c9-b593-d223f7449a82
1 parent bdef9de commit e4b3f44

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/wp-includes/post-template.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1777,9 +1777,10 @@ function get_the_password_form( $post = 0 ) {
17771777
/**
17781778
* Filters the HTML output for the protected post password form.
17791779
*
1780-
* If modifying the password field, please note that the core database schema
1781-
* limits the password field to 20 characters regardless of the value of the
1782-
* size attribute in the form input.
1780+
* If modifying the password field, please note that the WordPress database schema
1781+
* limits the password field to 255 characters regardless of the value of the
1782+
* `minlength` or `maxlength` attributes or other validation that may be added to
1783+
* the input.
17831784
*
17841785
* @since 2.7.0
17851786
* @since 5.8.0 Added the `$post` parameter.

0 commit comments

Comments
 (0)