调用widget控件回调。

原型

wp_dashboard_trigger_widget_control( int $widget_control_id = false )

参数

$widget_control_id (int) (Optional) 已注册的小组件ID。

源文件

路径:wp-admin/includes/dashboard.php

<?php
...
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] ) );
	}
}
...
?>

其他

英文文档:https://developer.wordpress.org/reference/functions/wp_dashboard_trigger_widget_control/