Make WordPress Core


Ignore:
Timestamp:
07/25/2006 07:01:52 PM (19 years ago)
Author:
ryan
Message:

Admin AJAX tweaks from mdawaffe. fixes #2969

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/admin-ajax.php

    r4041 r4042  
    1313function get_out_now() { exit; }
    1414add_action( 'shutdown', 'get_out_now', -1 );
    15 
    16 function wp_clean_ajax_input( $i ) {
    17     global $wpdb;
    18     $i = is_array($i) ? array_map('wp_clean_ajax_input', $i) : $wpdb->escape( rawurldecode(stripslashes($i)) );
    19     return $i;
    20 }
    2115
    2216function wp_ajax_echo_meta( $pid, $mid, $key, $value ) {
     
    3630}
    3731
    38 $_POST = wp_clean_ajax_input( $_POST );
    3932$id = (int) $_POST['id'];
    4033switch ( $_POST['action'] ) :
     
    225218    break;
    226219default :
     220    do_action( 'wp_ajax_' . $_POST['action'] );
    227221    die('0');
    228222    break;
Note: See TracChangeset for help on using the changeset viewer.