<?php
/**
 * Execute an AJAX action.
 *
 * @since 3.0
 */
define('DOING_AJAX', true);
require_once('wp-load.php');

@header('Content-Type: text/html; charset=' . get_option('blog_charset'));

do_action('ajax_init');

$hook = !empty($_REQUEST['action']) ? 'ajax_' . stripslashes($_REQUEST['action']) : false;

if ( empty($hook) || ! has_action($hook) ) {
	status_header(404);
	exit;
}

// Perform the Ajax action. Note: UNSLASHED data is passed in the first parameter.
do_action($hook, stripslashes_deep($_REQUEST) );
?>