mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-03 06:57:35 +01:00
Fix notice
git-svn-id: http://svn.automattic.com/wordpress/trunk@9540 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
2a615a4db8
commit
7effb8df55
@ -738,8 +738,13 @@ function pings_open( $post_id = NULL ) {
|
|||||||
*/
|
*/
|
||||||
function wp_comment_form_unfiltered_html_nonce() {
|
function wp_comment_form_unfiltered_html_nonce() {
|
||||||
global $post;
|
global $post;
|
||||||
|
|
||||||
|
$post_id = 0;
|
||||||
|
if ( !empty($post) )
|
||||||
|
$post_id = $post->ID;
|
||||||
|
|
||||||
if ( current_user_can('unfiltered_html') )
|
if ( current_user_can('unfiltered_html') )
|
||||||
wp_nonce_field('unfiltered-html-comment_' . $post->ID, '_wp_unfiltered_html_comment', false);
|
wp_nonce_field('unfiltered-html-comment_' . $post_id, '_wp_unfiltered_html_comment', false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user