Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

wp_get_widget_defaults() WordPress Function

The wp_get_widget_defaults() function is used to get the default values for a widget. This function is used when registering a widget.

wp_get_widget_defaults() #

Retrieve default registered sidebars list.


Return

(array)


Top ↑

Source

File: wp-includes/widgets.php

function wp_get_widget_defaults() {
	global $wp_registered_sidebars;

	$defaults = array();

	foreach ( (array) $wp_registered_sidebars as $index => $sidebar ) {
		$defaults[ $index ] = array();
	}

	return $defaults;
}

Top ↑

Changelog

Changelog
VersionDescription
2.2.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.