Ticket #12400: 12400.diff
File 12400.diff, 767 bytes (added by , 15 years ago) |
---|
-
wp-ajax.php
1 <?php 2 /** 3 * Execute an AJAX action. 4 * 5 * @since 3.0 6 */ 7 define('DOING_AJAX', true); 8 require_once('wp-load.php'); 9 10 @header('Content-Type: text/html; charset=' . get_option('blog_charset')); 11 12 do_action('ajax_init'); 13 14 $hook = !empty($_REQUEST['action']) ? 'ajax_' . stripslashes($_REQUEST['action']) : false; 15 16 if ( !$hook || ! has_action($hook) ) { 17 status_header(400); // invalid request 18 exit; 19 } 20 21 do_action($hook); 22 ?> 23 No newline at end of file