コード例 #1
0
                echo get_file_description($allowed_file);
                ?>
</a></li>
<?php 
            }
            ?>
	</ul>
<?php 
        }
        ?>
</div>
	<?php 
        if (!$error) {
            ?>
		<form name="template" id="template" action="themes.php?page=<?php 
            echo get_eztags_dir();
            ?>
pages/eztags-subpanel.php" method="post">
	<?php 
            wp_nonce_field('edit-theme_' . $file . $theme);
            ?>
		 <div>
<textarea cols="70" rows="25" name="newcontent" id="newcontent" tabindex="1"><?php 
            if ($file_is_php) {
                $content = std2ez($content);
            }
            echo $content;
            ?>
</textarea>
		 <input type="hidden" name="action" value="update" />
		 <input type="hidden" name="file" value="<?php 
コード例 #2
0
<?php

/* Get the relative path where the plugin is installed */
function get_eztags_dir()
{
    preg_match('/\\/wp-content\\/plugins\\/(.*)$/', htmlspecialchars(__FILE__), $matches);
    list($match, $relative_file) = $matches;
    $eztags_dir = dirname($relative_file);
    if ($eztags_dir) {
        $eztags_dir .= '/';
    }
    return $eztags_dir;
}
/* Set up stuff for internationalization */
$eztags_domain = 'eztags';
load_plugin_textdomain($eztags_domain, 'wp-content/plugins/' . get_eztags_dir() . 'languages');
function _ez($str)
{
    global $eztags_domain;
    _e($str, $eztags_domain);
}
function _z($str)
{
    global $eztags_domain;
    return __($str, $eztags_domain);
}
/* Set up for binding custom tags */
$_eztags_bind_array = array();
function eztags_wind(&$content)
{
    global $_eztags_bind_array;
コード例 #3
0
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');
}