the_password_form WordPress Filter Hook

The the_password_form hook is used to display the password form for password-protected posts and pages.

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 core database schema limits the password field to 20 characters regardless of the value of the size attribute in the form input.


Top ↑

Parameters

$output

(string)The password form HTML output.

$post

(WP_Post)Post object.


Top ↑

Source

File: wp-includes/post-template.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
5.8.0Added the $post parameter.
2.7.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.