Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/wp get sidebars widgets

This function's access is marked as private. That means it is not intended for use by plugin and theme developers, but only in other core functions. It is listed here for completeness. Use any of these functions instead.


Retrieve full list of sidebars and their widgets.

Will upgrade sidebar widget list, if needed. Will also save updated list, if needed.


(boolean) (optional) Not used (deprecated).
Default: true

Return Values

Upgraded list of widgets to version 3 array format when called from the admin.


array(4) {
  array(0) {
  array(5) {
    string(8) "search-2"
    string(14) "recent-posts-2"
    string(17) "recent-comments-2"
    string(10) "archives-2"
    string(12) "categories-2"
    string(6) "meta-2"
  array(0) {
  array(0) {


Change Log

Since: 2.2

Source File

wp_get_sidebars_widgets() is located in wp-includes/widgets.php


Sidebars: is_active_sidebar(), is_dynamic_sidebar(), dynamic_sidebar(), register_sidebars(), register_sidebar(), unregister_sidebar(), wp_register_sidebar_widget(), wp_unregister_sidebar_widget(), wp_get_sidebars_widgets(), wp_set_sidebars_widgets()

See also index of Function Reference and index of Template Tags.