New way of loading widgets that works with PHP 5. Thanks to filosofo for testing. see #4169

git-svn-id: http://svn.automattic.com/wordpress/trunk@5363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
rob1n
2007-05-01 01:58:18 +00:00
parent 5339481434
commit b21f9bdc98
3 changed files with 5 additions and 12 deletions

View File

@@ -1502,8 +1502,10 @@ function wp_parse_args( $args, $defaults = '' ) {
endif;
}
function wp_load_widgets() {
require_once ABSPATH . WPINC . '/widgets.php';
function wp_maybe_load_widgets() {
if ( !function_exists( 'dynamic_sidebar' ) ) {
require_once ABSPATH . WPINC . '/widgets.php';
}
}
?>