Make WordPress Core

Changeset 20866

Timestamp:
05/24/2012 06:40:53 AM (12 years ago)
Author:
markjaquith
Message:

Set $action for core ajax callbacks, as it will not be provided by the do_action() call until WordPress 3.5. props kurtpayne. fixes #20699

File:
1 edited

Legend:

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

    r20378 r20866  
    477477
    478478function wp_ajax_delete_post( $action ) {
     479
     480
    479481    $id = isset( $_POST['id'] ) ? (int) $_POST['id'] : 0;
    480482
     
    493495
    494496function wp_ajax_trash_post( $action ) {
     497
     498
    495499    $id = isset( $_POST['id'] ) ? (int) $_POST['id'] : 0;
    496500
     
    514518
    515519function wp_ajax_untrash_post( $action ) {
     520
     521
    516522    wp_ajax_trash_post( $action );
    517523}
    518524
    519525function wp_ajax_delete_page( $action ) {
     526
     527
    520528    $id = isset( $_POST['id'] ) ? (int) $_POST['id'] : 0;
    521529
     
    571579
    572580function wp_ajax_add_link_category( $action ) {
     581
     582
    573583    check_ajax_referer( $action );
    574584    if ( !current_user_can( 'manage_categories' ) )
     
    691701function wp_ajax_get_comments( $action ) {
    692702    global $wp_list_table, $post_id;
     703
     704
    693705
    694706    check_ajax_referer( $action );
     
    726738function wp_ajax_replyto_comment( $action ) {
    727739    global $wp_list_table, $wpdb;
     740
     741
    728742
    729743    check_ajax_referer( $action, '_ajax_nonce-replyto-comment' );
     
    10091023function wp_ajax_add_user( $action ) {
    10101024    global $wp_list_table;
     1025
     1026
    10111027
    10121028    check_ajax_referer( $action );
Note: See TracChangeset for help on using the changeset viewer.