WordPress开发者和主题制作者的搜索引擎



the_post_password ›

Since2.7.0
已弃用n/a
the_post_password ( 没有参数 )
定义在:
文档:

Displays the post password.

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



源码

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