Switch language

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




wp_nonce_ays [ WordPress Function ]

wp_nonce_ays ( $action )
Parameters:
  • (string) $action The nonce action.
Defined at:



Display "Are You Sure" message to confirm the action being taken.

If the action has the nonce explain message, then it will be displayed along with the "Are you sure?" message.

Source


<?php
function wp_nonce_ays$action ) {
    
$title __'WordPress Failure Notice' );
    
$html esc_htmlwp_explain_nonce$action ) );
    if ( 
'log-out' == $action )
        
$html .= "</p><p>" sprintf__"Do you really want to <a href='%s'>log out</a>?"), wp_logout_url() );
    elseif ( 
wp_get_referer() )
        
$html .= "</p><p><a href='" esc_urlremove_query_arg'updated'wp_get_referer() ) ) . "'>" __'Please try again.' ) . "</a>";

    
wp_die$html$title, array('response' => 403) );
}
?>

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