WordPress at Your Fingertips
function is not described

wp_ajax_dashboard_widgets() WP 3.4.0

Ajax handler for dashboard widgets.

No Hooks.

Return

null. Nothing.

Usage

wp_ajax_dashboard_widgets();

Changelog

Since 3.4.0 Introduced.

Code of wp_ajax_dashboard_widgets() WP 5.8.2

function wp_ajax_dashboard_widgets() {
	require_once ABSPATH . 'wp-admin/includes/dashboard.php';

	$pagenow = $_GET['pagenow'];
	if ( 'dashboard-user' === $pagenow || 'dashboard-network' === $pagenow || 'dashboard' === $pagenow ) {
		set_current_screen( $pagenow );
	}

	switch ( $_GET['widget'] ) {
		case 'dashboard_primary':
			wp_dashboard_primary();
			break;
	}
	wp_die();
}