static function textarea($params_array)
 {
     if (!empty($params_array['value'])) {
         $control_value = $params_array['value'];
     } else {
         //get control option from database
         $control_value = stripcslashes(td_panel_data_source::read($params_array));
     }
     return '<textarea class="td_textarea_control" name="' . self::generate_name($params_array) . '">' . $control_value . '</textarea>';
 }
            td_panel_data_source::update_category_option($td_category->cat_ID, 'tdc_image', $td_cat_options['tdc_image']['src']);
        }
    }
    if (!empty($td_cat_options['tdc_bg_repeat'])) {
        echo 'background repeat: ' . $td_cat_options['tdc_bg_repeat'] . '<br>';
        td_panel_data_source::update_category_option($td_category->cat_ID, 'tdc_bg_repeat', $td_cat_options['tdc_bg_repeat']);
    }
    if (!empty($td_cat_options['tdc_bg_color'])) {
        if ($td_cat_options['tdc_bg_color'] != '#') {
            echo 'background color: ' . $td_cat_options['tdc_bg_color'] . '<br>';
            td_panel_data_source::update_category_option($td_category->cat_ID, 'tdc_bg_color', $td_cat_options['tdc_bg_color']);
        }
    }
    if (!empty($td_cat_options['tdc_hide_on_post'])) {
        echo 'hide on post: ' . $td_cat_options['tdc_hide_on_post'] . '<br>';
        td_panel_data_source::update_category_option($td_category->cat_ID, 'tdc_hide_on_post', $td_cat_options['tdc_hide_on_post']);
    }
    echo '</p>';
    //print_r(get_option( 'tax_meta_'. $td_category->cat_ID));
    //die;
    update_option(TD_THEME_OPTIONS_NAME, td_global::$td_options);
}
?>

                        <script type="text/javascript">
                            alert('Import is done!');
                        </script>

                    </div>
                    <div class="td-box-row-margin-bottom"></div>
                </div>
<?php

$td_fonts_user_inserted = 0;
if (!empty($_REQUEST['td_option']) and $_REQUEST['td_option'] == 'save_fonts') {
    if (td_panel_data_source::insert_in_system_fonts_user($_POST['td_fonts_user_insert'])) {
        $td_fonts_user_inserted = 1;
    }
}
?>

<div class="wrap">
<form id="td_panel_import_export_settings" name="td_panel_import_export_settings" action="?page=td_theme_panel&td_page=td_view_custom_fonts&td_option=save_fonts" method="post">
    <div class="td-container-wrap">

	    <div class="td-panel-main-header">
		    <img src="<?php 
echo get_template_directory_uri() . '/includes/wp_booster/wp-admin/images/panel/panel-wrap/panel-logo.png';
?>
" alt=""/>
		    <span class="td-panel-header-name"><?php 
echo TD_THEME_NAME . ' - Theme panel';
?>
</span>
		    <span class="td-panel-header-version">version: <?php 
echo TD_THEME_VERSION;
?>
</span>
	    </div>


        <div id="td-container-left">
Beispiel #4
0
    static function html_editor($params_array)
    {
        $buffy = '';
        if (!empty($params_array['value'])) {
            $control_value = $params_array['value'];
        } else {
            //get control option from database
            $control_value = stripcslashes(td_panel_data_source::read($params_array));
        }
        $td_css_inline = new td_css_inline();
        if (!empty($params_array['css'])) {
            $td_css_inline->add_css($params_array['css']);
        }
        $editor_uid = td_global::td_generate_unique_id();
        $editor_text_uid = $editor_uid . '_text';
        ob_start();
        ?>
        <div class="td-code-editor-wrap td-html-editor-wrap">
            <textarea class="td-code-editor-textarea <?php 
        echo $editor_text_uid;
        ?>
" name="<?php 
        echo self::generate_name($params_array);
        ?>
"><?php 
        echo $control_value;
        ?>
</textarea>
            <div id="<?php 
        echo $editor_uid;
        ?>
" class="td-code-editor" <?php 
        echo $td_css_inline->get_inline_css();
        ?>
></div>
            <div class="td-clear-fix"></div>
        </div>
        <script>
            (function (){
                var editor_textarea = jQuery('.<?php 
        echo $editor_text_uid;
        ?>
');
                ace.require("ace/ext/language_tools");
                var editor = ace.edit("<?php 
        echo $editor_uid;
        ?>
");
                editor.getSession().setValue(editor_textarea.val());
                editor.getSession().on('change', function(){
                    editor_textarea.val(editor.getSession().getValue());
                });

                editor.setTheme("ace/theme/textmate");
                //editor.setShowPrintMargin(false);
                editor.getSession().setMode("ace/mode/html");
                editor.setOptions({
                    enableBasicAutocompletion: true,
                    enableSnippets: true,
                    enableLiveAutocompletion: false
                });
            })();
        </script>
        <?php 
        $buffy .= ob_get_clean();
        return $buffy;
    }