Display the post password.

The password is passed through {@link esc_attr()} to ensure that it is safe for placing in an html attribute.

Signature

the_post_password()

Return

(void)

Source

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

Link here