Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
_wp_dashboard_control_callback() WordPress Function
The _wp_dashboard_control_callback() function is used to display a control on the WordPress dashboard. The function takes two arguments: the id of the control and the callback function that will render the control. The callback function must return an array that contains the following keys: - id: The id of the control. - title: The title of the control. - callback: The callback function that will render the control. The callback function will receive two arguments: the id of the control and an array of args that can be used to customize the control.
_wp_dashboard_control_callback( mixed $dashboard, array $meta_box ) #
Outputs controls for the current dashboard widget.
Parameters
- $dashboard
(mixed)(Required)
- $meta_box
(array)(Required)
Source
File: wp-admin/includes/dashboard.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( __( 'Save Changes' ) ); echo '</form>'; }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
2.7.0 | Introduced. |