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

git-svn-id: https://develop.svn.wordpress.org/trunk@18563 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2011-08-18 06:16:57 +00:00
parent 13999695f1
commit 5464b1abc2
2 changed files with 3 additions and 0 deletions

View File

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

View File

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