A WordPress-centric search engine for devs and theme authors



wp_dashboard_trigger_widget_control ›

Since2.5.0
Deprecatedn/a
wp_dashboard_trigger_widget_control ( $widget_control_id = false )
Parameters:
  • (int) $widget_control_id Registered Widget ID.
    Required: No
    Default: false
Defined at:
Codex:

Calls widget control callback.



Source

function wp_dashboard_trigger_widget_control( $widget_control_id = false ) {
	global $wp_dashboard_control_callbacks;

	if ( is_scalar( $widget_control_id ) && $widget_control_id && isset( $wp_dashboard_control_callbacks[ $widget_control_id ] ) && is_callable( $wp_dashboard_control_callbacks[ $widget_control_id ] ) ) {
		call_user_func(
			$wp_dashboard_control_callbacks[ $widget_control_id ],
			'',
			array(
				'id'       => $widget_control_id,
				'callback' => $wp_dashboard_control_callbacks[ $widget_control_id ],
			)
		);
	}
}