wp_dashboard_trigger_widget_control

函数


wp_dashboard_trigger_widget_control ( $widget_control_id = false )
参数
  • (int|false)
    $widget_control_id
    Optional. Registered widget ID. Default false.
    Required:
    Default: false
定义位置
  • wp-admin/includes/dashboard.php
    , line 1198
引入
2.5.0
弃用

Calls widget control callback.

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 ],
			)
		);
	}
}