Some more class instantiations. props eko-fr, fixes #18049.

git-svn-id: http://svn.automattic.com/wordpress/trunk@18563 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2011-08-18 06:16:57 +00:00
parent 0caf6ee451
commit ba5c2141bb
2 changed files with 3 additions and 0 deletions

View File

@ -20,6 +20,7 @@ function current_theme_info() {
delete_option( 'current_theme' ); delete_option( 'current_theme' );
$current_theme = get_current_theme(); $current_theme = get_current_theme();
} }
$ct = new stdClass;
$ct->name = $current_theme; $ct->name = $current_theme;
$ct->title = $themes[$current_theme]['Title']; $ct->title = $themes[$current_theme]['Title'];
$ct->version = $themes[$current_theme]['Version']; $ct->version = $themes[$current_theme]['Version'];

View File

@ -164,6 +164,8 @@ class WP_Admin_Bar {
function add_node( $parent_id, &$menu, $child ) { function add_node( $parent_id, &$menu, $child ) {
foreach( $menu as $id => $menu_item ) { foreach( $menu as $id => $menu_item ) {
if ( $parent_id == $id ) { if ( $parent_id == $id ) {
if ( ! isset( $menu->{$parent_id}['children'] ) )
$menu->{$parent_id}['children'] = new stdClass;
$menu->{$parent_id}['children']->{$child['id']} = $child; $menu->{$parent_id}['children']->{$child['id']} = $child;
$child = null; $child = null;
return true; return true;