wp_ajax_dashboard_widgets

Ajax handler for dashboard widgets.

Description

wp_ajax_dashboard_widgets(); 

Usage

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

Defined (1)

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

/wp-admin/includes/ajax-actions.php  
  1. function wp_ajax_dashboard_widgets() { 
  2. require_once ABSPATH . 'wp-admin/includes/dashboard.php'; 
  3.  
  4. $pagenow = $_GET['pagenow']; 
  5. if ( $pagenow === 'dashboard-user' || $pagenow === 'dashboard-network' || $pagenow === 'dashboard' ) { 
  6. set_current_screen( $pagenow ); 
  7.  
  8. switch ( $_GET['widget'] ) { 
  9. case 'dashboard_primary' : 
  10. break; 
  11. wp_die();