wp_dashboard_trigger_widget_control

Calls widget control callback.

Description

wp_dashboard_trigger_widget_control( (bool) $widget_control_id = false ); 

Parameters (1)

0. $widget_control_id — Optional. (bool) => false
The widget control id.

Usage

  1. if ( !function_exists( 'wp_dashboard_trigger_widget_control' ) ) { 
  2. require_once ABSPATH . '/wp-admin/includes/dashboard.php'; 
  3.  
  4. // The widget control id. 
  5. $widget_control_id = false; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = wp_dashboard_trigger_widget_control($widget_control_id); 
  9.  

Defined (1)

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

/wp-admin/includes/dashboard.php  
  1. function wp_dashboard_trigger_widget_control( $widget_control_id = false ) { 
  2. global $wp_dashboard_control_callbacks; 
  3.  
  4. 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]) ) { 
  5. call_user_func( $wp_dashboard_control_callbacks[$widget_control_id], '', array( 'id' => $widget_control_id, 'callback' => $wp_dashboard_control_callbacks[$widget_control_id] ) );