wp_get_widget_defaults

Retrieve default registered sidebars list.

Description

(array) wp_get_widget_defaults(); 

Returns (array)


Usage

  1. if ( !function_exists( 'wp_get_widget_defaults' ) ) { 
  2. require_once ABSPATH . WPINC . '/widgets.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = wp_get_widget_defaults(); 
  7.  

Defined (1)

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

/wp-includes/widgets.php  
  1. function wp_get_widget_defaults() { 
  2. global $wp_registered_sidebars; 
  3.  
  4. $defaults = array(); 
  5.  
  6. foreach ( (array) $wp_registered_sidebars as $index => $sidebar ) 
  7. $defaults[$index] = array(); 
  8.  
  9. return $defaults;