<?php

/* The "Easier Theme Editor" subpanel page
 * It's just a modification of WordPress 2.0's theme editor
 */
require_once '/' . ABSPATH . 'wp-content/plugins' . get_eztags_dir() . '/includes/eztags-mediator.php';
$title = _z('Easier Theme Editor');
$parent_file = 'themes.php';
wp_reset_vars(array('action', 'redirect', 'profile', 'error', 'warning', 'a', 'file', 'theme'));
$themes = get_themes();
if (empty($theme)) {
    $theme = get_current_theme();
} else {
    $theme = stripslashes($theme);
}
if (!isset($themes[$theme])) {
    wp_die(__('The requested theme does not exist.'));
}
$allowed_files = array_merge($themes[$theme]['Stylesheet Files'], $themes[$theme]['Template Files']);
if (empty($file)) {
    $file = $allowed_files[0];
}
$file = validate_file_to_edit($file, $allowed_files);
$real_file = get_real_file_to_edit($file);
$file_show = basename($file);
?>

<script type="text/javascript">
document.title = '<?php 
bloginfo();
?>
function add_eztags_admin_pages()
{
    add_theme_page(_z('Easier Template Tags'), _z('Easier Theme Editor'), edit_themes, get_eztags_dir() . 'pages/eztags-subpanel.php');
}