the_post_password() - WordPress 函数参考中文文档

返回介绍

the_post_password()

发布于 2017-09-11 字数947 浏览 914 评论 0

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.


源代码

File: wp-admin/includes/template.php

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

更新日志

Version 描述
2.7.0 Introduced.

相关函数

Uses

  • wp-includes/formatting.php:
    esc_attr()
  • wp-includes/post.php:
    get_post()

User Contributed Notes

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

目前还没有任何评论,快来抢沙发吧!