wpseek.com
A WordPress-centric search engine for devs and theme authors



the_post_password › WordPress Function

Since2.7.0
Deprecatedn/a
the_post_password ( No parameters )
Defined at:
Codex:

Displays the post password.

The password is passed through esc_attr() to ensure that it is safe for placing in an HTML attribute.


Source

function the_post_password() {
	$post = get_post();
	if ( isset( $post->post_password ) ) {
		echo esc_attr( $post->post_password );
	}
}