W3cubDocs

/WordPress

apply_filters( ‘the_password_form’, string $output, WP_Post $post )

Filters the HTML output for the protected post password form.

Description

If modifying the password field, please note that the WordPress database schema limits the password field to 255 characters regardless of the value of the minlength or maxlength attributes or other validation that may be added to the input.

Parameters

$outputstring
The password form HTML output.
$postWP_Post
Post object.

Source

return apply_filters( 'the_password_form', $output, $post );

Changelog

Version Description
5.8.0 Added the $post parameter.
2.7.0 Introduced.

© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/the_password_form