関数 wp_nonce_ays()
定義ファイル :/blog/wp-includes/functions.php 12
wp_nonce_ays()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | /** * 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. * * @since 2.0.4 * * @param string $action The nonce action. */ function wp_nonce_ays( $action ) { $title = __( 'WordPress Failure Notice' ); if ( 'log-out' == $action ) { $html = sprintf( __( 'You are attempting to log out of %s' ), get_bloginfo( 'name' ) ) . '</p><p>'; $redirect_to = isset( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : ''; $html .= sprintf( __( "Do you really want to <a href='%s'>log out</a>?"), wp_logout_url( $redirect_to ) ); } else { $html = __( 'Are you sure you want to do this?' ); if ( wp_get_referer() ) $html .= "</p><p><a href='" . esc_url( remove_query_arg( 'updated', wp_get_referer() ) ) . "'>" . __( 'Please try again.' ) . "</a>"; } wp_die( $html, $title, array('response' => 403) ); } |