WordPress.org

Make WordPress Core

Changeset 9281


Ignore:
Timestamp:
10/22/08 17:15:19 (5 years ago)
Author:
ryan
Message:

Allow action? in admin-ajax.php. Props misterbisson. fixes #7945

File:
1 edited

Legend:

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

    r9225 r9281  
    3838} 
    3939 
    40 if ( isset($_GET['action']) && 'ajax-tag-search' == $_GET['action'] ) { 
     40if ( isset( $_GET['action'] ) ) : 
     41switch ( $action = $_GET['action'] ) : 
     42case 'ajax-tag-search' : 
    4143    if ( !current_user_can( 'manage_categories' ) ) 
    4244        die('-1'); 
     
    5456    echo join( $results, "\n" ); 
    5557    die; 
    56 } 
     58    break; 
     59default : 
     60    do_action( 'wp_ajax_' . $_GET['action'] ); 
     61    die('0'); 
     62    break; 
     63endswitch; 
     64endif; 
    5765 
    5866$id = isset($_POST['id'])? (int) $_POST['id'] : 0; 
Note: See TracChangeset for help on using the changeset viewer.