输出当前仪表板小部件的控件。

原型

_wp_dashboard_control_callback( mixed $dashboard, array $meta_box )

参数

$dashboard (mixed) (Required)

$meta_box (array) (Required)

源文件

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

<?php
...
function _wp_dashboard_control_callback( $dashboard, $meta_box ) {
	echo '<form method="post" class="dashboard-widget-control-form wp-clearfix">';
	wp_dashboard_trigger_widget_control( $meta_box['id'] );
	wp_nonce_field( 'edit-dashboard-widget_' . $meta_box['id'], 'dashboard-widget-nonce' );
	echo '<input type="hidden" name="widget_id" value="' . esc_attr($meta_box['id']) . '" />';
	submit_button( __('Submit') );
	echo '</form>';
}
...
?>

其他

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