_wp_dashboard_control_callback

Outputs controls for the current dashboard widget.

Description

_wp_dashboard_control_callback( (mixed) $dashboard, (array) $meta_box ); 

Parameters (2)

0. $dashboard (mixed)
The dashboard.
1. $meta_box (array)
The meta box.

Usage

  1. if ( !function_exists( '_wp_dashboard_control_callback' ) ) { 
  2. require_once ABSPATH . '/wp-admin/includes/dashboard.php'; 
  3.  
  4. // The dashboard. 
  5. $dashboard = null; 
  6.  
  7. // The meta box. 
  8. $meta_box = array(); 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = _wp_dashboard_control_callback($dashboard, $meta_box); 
  12.  

Defined (1)

The function is defined in the following location(s).

/wp-admin/includes/dashboard.php  
  1. function _wp_dashboard_control_callback( $dashboard, $meta_box ) { 
  2. echo '<form method="post" class="dashboard-widget-control-form">'; 
  3. wp_nonce_field( 'edit-dashboard-widget_' . $meta_box['id'], 'dashboard-widget-nonce' ); 
  4. echo '<input type="hidden" name="widget_id" value="' . esc_attr($meta_box['id']) . '" />'; 
  5. submit_button( __('Submit') ); 
  6. echo '</form>';