null ) ) as $stylesheet => $theme ) { $name = sanitize_text_field( $theme->get( 'Name' ) ); $parent = sanitize_text_field( $theme->get( 'Template' ) ); $metadata = array( 'stylesheet' => $stylesheet, 'version' => sanitize_text_field( $theme->get( 'Version' ) ), 'author' => sanitize_text_field( $theme->get( 'Author' ) ), 'active' => $stylesheet === $active, 'parent_stylesheet' => $parent !== '' ? $parent : null, 'is_active_parent' => $active !== $template && $stylesheet === $template, ); $nodes[] = new Node( 'theme:' . $stylesheet, 'theme', 'themes', $name !== '' ? $name : $stylesheet, 'unknown', 0, $metadata ); } return array( 'nodes' => $nodes, 'edges' => array() ); } }