Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




wp_comment_form_unfiltered_html_nonce [ WordPress Function ]

wp_comment_form_unfiltered_html_nonce ( No parameters )
Uses:
  • $post
Defined at:



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.

Source


<?php
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);
}
?>

Examples [ wp-snippets.com ]

Top Google zoekresultaten

Meer ...

Gebruikersdiscussies [ wordpress.org ]

0 User Note(s)

Nog geen één. Wees de eerste!

Nieuw toevoegen ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics