Template; } else if (is_page()) { $template_link = get_option("siteurl")."/wp-admin/theme-editor.php?file=page.php&theme=".wp_get_theme()->Template; $template = "page.php"; } else if (is_single()) { $template_link = get_option("siteurl")."/wp-admin/theme-editor.php?file=single.php&theme=".wp_get_theme()->Template; $template = "single.php"; } else if (is_search()) { $template_link = get_option("siteurl")."/wp-admin/theme-editor.php?file=search.php&theme=".wp_get_theme()->Template; $template = "search.php"; } else if (is_category()) { $template_link = get_option("siteurl")."/wp-admin/theme-editor.php?file=category.php&theme=".wp_get_theme()->Template; $template = "category.php"; } else if (is_archive()) { $template_link = get_option("siteurl")."/wp-admin/theme-editor.php?file=archive.php&theme=".wp_get_theme()->Template; $template = "archive.php"; } else if (is_tag()) { $template_link = get_option("siteurl")."/wp-admin/theme-editor.php?file=tag.php&theme=".wp_get_theme()->Template; $template = "tag.php"; } else if (is_404()) { $template_link = get_option("siteurl")."/wp-admin/theme-editor.php?file=404.php&theme=".wp_get_theme()->Template; $template = "404.php"; } if ($template_link != "") { $wp_admin_bar->add_menu( array( "id" => "whichtemplatemenu", "title" => "Template: ".$template, "href" => $template_link, "meta" => array("target" => "blank") ) ); } } ?>