WordPress开发者和主题制作者的搜索引擎



wp_ajax_dashboard_widgets ›

Since3.4.0
已弃用n/a
wp_ajax_dashboard_widgets ( 没有参数 )
定义在:
文档:

Ajax handler for dashboard widgets.



源码

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

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

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