<div id="crayon-te-content">

<?php 
$crayon_root_te = dirname(dirname(dirname(__FILE__)));
require_once $crayon_root_te . '/crayon_wp.class.php';
require_once CrayonWP::wp_load_path();
require_once CRAYON_TE_PHP;
require_once CRAYON_PARSER_PHP;
CrayonSettingsWP::load_settings();
$langs = CrayonParser::parse_all();
$curr_lang = CrayonGlobalSettings::val(CrayonSettings::FALLBACK_LANG);
$themes = CrayonResources::themes()->get();
$curr_theme = CrayonGlobalSettings::val(CrayonSettings::THEME);
$fonts = CrayonResources::fonts()->get();
$curr_font = CrayonGlobalSettings::val(CrayonSettings::FONT);
CrayonTagEditorWP::init_settings();
class CrayonTEContent
{
    public static function select_resource($id, $resources, $current, $set_class = TRUE)
    {
        $id = CrayonSettings::PREFIX . $id;
        if (count($resources) > 0) {
            $class = $set_class ? 'class="' . CrayonSettings::SETTING . ' ' . CrayonSettings::SETTING_SPECIAL . '"' : '';
            echo '<select id="' . $id . '" name="' . $id . '" ' . $class . ' ' . CrayonSettings::SETTING_ORIG_VALUE . '="' . $current . '">';
            foreach ($resources as $resource) {
                $asterisk = $current == $resource->id() ? ' *' : '';
                echo '<option value="' . $resource->id() . '" ' . selected($current, $resource->id()) . ' >' . $resource->name() . $asterisk . '</option>';
            }
            echo '</select>';
        } else {
            // None found, default to text box