wp_comment_form_unfiltered_html_nonce

Definition:
function wp_comment_form_unfiltered_html_nonce() {}

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.

Source code

function wp_comment_form_unfiltered_html_nonce() {

	global $post;



	$post_id = 0;

	if ( !empty($post) )

		$post_id = $post->ID;



	if ( current_user_can('unfiltered_html') )

		wp_nonce_field('unfiltered-html-comment_' . $post_id, '_wp_unfiltered_html_comment', false);

}

3481

No comments yet... Be the first to leave a reply!

Leave a comment