the_post_password

Advertisement

Summery Summery

Displays the post password.

Syntax Syntax

the_post_password()

Description Description

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

Source Source

File: wp-admin/includes/template.php

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

Advertisement

Changelog Changelog

Changelog
Version Description
2.7.0 Introduced.

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.