check_ajax_referer [ WordPress Function ]
check_ajax_referer ( $action = -1, $query_arg = false, $die = true )
| Parameters: |
|
| Defined at: |
|
Benzer Fonksiyonlar: check_admin_referer, check_password_reset_key, wp_get_referer, wp_check_browser_version, wp_check_filetype
Verifies the AJAX request to prevent processing requests external of the blog.
Source
<?php
function check_ajax_referer( $action = -1, $query_arg = false, $die = true ) {
if ( $query_arg )
$nonce = $_REQUEST[$query_arg];
else
$nonce = isset($_REQUEST['_ajax_nonce']) ? $_REQUEST['_ajax_nonce'] : $_REQUEST['_wpnonce'];
$result = wp_verify_nonce( $nonce, $action );
if ( $die && false == $result ) {
if ( defined( 'DOING_AJAX' ) && DOING_AJAX )
wp_die( -1 );
else
die( '-1' );
}
do_action('check_ajax_referer', $action, $result);
return $result;
}
?>
Examples [ wp-snippets.com ]
Google Arama Sonuçlarý
- Function Reference/check ajax referer « WordPress Codex
Description. This function can be replaced via plugins. If plugins do not redefine these functions, then this will be used instead. Verifies the AJAX request to ...
codex.wordpress.org - check_ajax_referer Wordpress hook details -- Adam Brown, BYU ...
Runs in the default check_ajax_referer function (which is called when an AJAX ... Note that check_ajax_referer is also a "pluggable" function, meaning that ...
adambrown.info - Improving security in Wordpress plugins using Nonces | Prelovac.com
check_ajax_referer('my-nonce');. Here is another example (taken ... check_ajax_referer( "wp-live-blogroll" );. Including nonces should not take ...
www.prelovac.com - check_ajax_referer | A HitchHackers guide through WordPress
Feb 11, 2011 ... function check_ajax_referer( $action = -1, $query_arg = false, $die = true ) { if ( $ query_arg ) $nonce = $_REQUEST[$query_arg]; else $nonce ...
hitchhackerguide.com