mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-16 19:46:21 +00:00
Return empty array in wp_get_sidebars_widgets() if no sidebars are defined. fixes #14876.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15994 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c10da6c1ec
commit
8f1f98fa02
@ -995,6 +995,9 @@ function wp_get_sidebars_widgets($deprecated = true) {
|
||||
if ( $deprecated !== true )
|
||||
_deprecated_argument( __FUNCTION__, '2.8.1' );
|
||||
|
||||
if ( ! current_theme_supports( 'widgets' ) )
|
||||
return array();
|
||||
|
||||
global $wp_registered_widgets, $wp_registered_sidebars, $_wp_sidebars_widgets;
|
||||
|
||||
// If loading from front page, consult $_wp_sidebars_widgets rather than options
|
||||
|
Loading…
x
Reference in New Issue
Block a user