wpseek.com
A WordPress-centric search engine for devs and theme authors



wp_ajax_dashboard_widgets › WordPress Function

Since3.4.0
Deprecatedn/a
wp_ajax_dashboard_widgets ( No parameters )
Defined at:
Codex:

Handles dashboard widgets via AJAX.



Source

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();
}