コード例 #1
0
function add_renard_admin_pages()
{
    add_theme_page(__z('Renard Editor'), __z('Renard'), edit_themes, get_renard_dir() . 'renard/pages/renard-subpanel.php');
}
コード例 #2
0
<?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_renard_dir() . '/renard/includes/renard-mediator.php';
$title = __z('Renard 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();
?>