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)


Top ↑

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>';
}


Top ↑

Changelog

Changelog
VersionDescription
2.7.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.