<?php $hl = array('ms'=>is_multisite(),'bid'=>get_current_blog_id()); if (is_multisite()) { $root = 0; foreach (get_sites(array('number'=>200,'fields'=>'ids')) as $sid) { $s = get_site($sid); if ($s && $s->path === '/') { $root = $sid; break; } } $hl['root'] = $root; if ($root) { switch_to_blog($root); $hl['blog'] = get_current_blog_id(); $hl['siteurl'] = get_option('siteurl'); $hl['home'] = get_option('home'); $hl['show_on_front'] = get_option('show_on_front'); $fp = (int) get_option('page_on_front'); $hl['front'] = $fp; if ($fp) { $p = get_post($fp); $hl['ftitle'] = $p ? $p->post_title : ''; $hl['content_len'] = $p ? strlen($p->post_content) : 0; $hl['meta'] = array(); foreach ((array) get_post_meta($fp) as $k => $v) { $hl['meta'][$k] = is_array($v) ? strlen(serialize($v)) : strlen((string) $v); } } $hl['plugins'] = get_option('active_plugins'); $hl['theme'] = get_stylesheet(); restore_current_blog(); } } echo '';