wp_ajax_dashboard_widgets()
Ajax handler for dashboard widgets.
Source
File: wp-admin/includes/ajax-actions.php
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;
case 'dashboard_petitions' :
cp_dashboard_petitions();
break;
}
wp_die();
}
Changelog
Version | Description |
---|---|
WP-3.4.0 | Introduced. |