Displays the post password.

Description Description

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

Top ↑

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 );

Top ↑

Changelog Changelog

Version Description
2.7.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

Top ↑

You must log in before being able to contribute a note or feedback.