wp_comment_form_unfiltered_html_nonce
函数
wp_comment_form_unfiltered_html_nonce ( No parameters )
- 定义位置
-
-
wp-includes/comment-template.php
, line 1297
-
wp-includes/comment-template.php
- 引入
- 2.1.3
- 弃用
- –
Displays form token for unfiltered comments.
Will only display nonce token if the current user has permissions for
unfiltered html. Won’t display the token for other users.
The function was backported to 2.0.10 and was added to versions 2.1.3 and
above. Does not exist in versions prior to 2.0.10 in the 2.0 branch and in
the 2.1 branch, prior to 2.1.3. Technically added in 2.2.0.
Backported to 2.0.10.
function wp_comment_form_unfiltered_html_nonce() { $post = get_post(); $post_id = $post ? $post->ID : 0; if ( current_user_can( 'unfiltered_html' ) ) { wp_nonce_field( 'unfiltered-html-comment_' . $post_id, '_wp_unfiltered_html_comment_disabled', false ); echo "n"; } }
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。