| [ Root ] [ Index ] |
PHP Cross Reference of WordPress TrunkProvided by Yoast |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * Execute an AJAX action. 4 * 5 * To take full advantage of this file, call wp_ajaxurl(); in your theme 6 * or plugin while registering your front-end scripts. Doing so will make 7 * an ajaxurl variable available for use in javascripts. The ajaxurl 8 * variable will point to this file's absolute URL. 9 * 10 * In the admin area, an ajaxurl variable is always available, and points 11 * to wp-admin/admin-ajax.php instead. 12 * 13 * @since 3.0 14 */ 15 define('DOING_AJAX', true); 16 require_once ('wp-load.php'); 17 18 @header('Content-Type: text/html; charset=' . get_option('blog_charset')); 19 send_nosniff_header(); 20 21 do_action('ajax_init'); 22 23 $hook = !empty($_REQUEST['action']) ? 'ajax_' . $_REQUEST['action'] : false; 24 25 if ( empty($hook) || ! has_action($hook) ) { 26 status_header(400); 27 exit; 28 } 29 30 do_action($hook); 31 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Fri Mar 26 20:00:10 2010 | Cross-referenced by PHPXref 0.7 |