wp_list_widget_controls_dynamic_sidebar

Retrieves the widget control arguments.

Description

(array) wp_list_widget_controls_dynamic_sidebar( (array) $params ); 

Returns (array)

Parameters (1)

0. $params (array)
The params.

Usage

  1. if ( !function_exists( 'wp_list_widget_controls_dynamic_sidebar' ) ) { 
  2. require_once ABSPATH . '/wp-admin/includes/widgets.php'; 
  3.  
  4. // The params. 
  5. $params = array(); 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = wp_list_widget_controls_dynamic_sidebar($params); 
  9.  

Defined (1)

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

/wp-admin/includes/widgets.php  
  1. function wp_list_widget_controls_dynamic_sidebar( $params ) { 
  2. global $wp_registered_widgets; 
  3. static $i = 0; 
  4. $i++; 
  5.  
  6. $widget_id = $params[0]['widget_id']; 
  7. $id = isset($params[0]['_temp_id']) ? $params[0]['_temp_id'] : $widget_id; 
  8. $hidden = isset($params[0]['_hide']) ? ' style="display:none;"' : ''; 
  9.  
  10. $params[0]['before_widget'] = "<div id='widget-{$i}_{$id}' class='widget'$hidden>"; 
  11. $params[0]['after_widget'] = "</div>"; 
  12. $params[0]['before_title'] = "%BEG_OF_TITLE%"; // deprecated 
  13. $params[0]['after_title'] = "%END_OF_TITLE%"; // deprecated 
  14. if ( is_callable( $wp_registered_widgets[$widget_id]['callback'] ) ) { 
  15. $wp_registered_widgets[$widget_id]['_callback'] = $wp_registered_widgets[$widget_id]['callback']; 
  16. $wp_registered_widgets[$widget_id]['callback'] = 'wp_widget_control'; 
  17.  
  18. return $params;