wp_ajax_fetch_list

Ajax handler for fetching a list table.

Description

wp_ajax_fetch_list(); 

Usage

  1. if ( !function_exists( 'wp_ajax_fetch_list' ) ) { 
  2. require_once ABSPATH . '/wp-admin/includes/ajax-actions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = wp_ajax_fetch_list(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/wp-admin/includes/ajax-actions.php  
  1. function wp_ajax_fetch_list() { 
  2. $list_class = $_GET['list_args']['class']; 
  3. check_ajax_referer( "fetch-list-$list_class", '_ajax_fetch_list_nonce' ); 
  4.  
  5. $wp_list_table = _get_list_table( $list_class, array( 'screen' => $_GET['list_args']['screen']['id'] ) ); 
  6. if ( ! $wp_list_table ) { 
  7. wp_die( 0 ); 
  8.  
  9. if ( ! $wp_list_table->ajax_user_can() ) { 
  10. wp_die( -1 ); 
  11.  
  12. $wp_list_table->ajax_response(); 
  13.  
  14. wp_die( 0 );