Пример #1
0
    public function td_custom_typology_generate_font_controls()
    {
        //insert separator after this section numbers from td_fonts::$typography_sections. the counting of td_fonts::$typography_sections starts from 1
        $td_section_separator_array = array(0 => 'Post Page', 16 => 'Slides', 19 => 'Menu`s', 23 => 'Pages', 27 => 'Tabs');
        $td_section_counter = 0;
        foreach (td_fonts::$typography_sections as $font_section_settings_id => $font_section_name) {
            //create the section separators
            if (array_key_exists($td_section_counter, $td_section_separator_array)) {
                echo '<hr>
                      <div class="td-section-separator">' . $td_section_separator_array[$td_section_counter] . '</div>';
            }
            echo td_panel_generator::box_start($font_section_name, false);
            ?>
            <div class="td-box-row">
                <div class="td-box-description">
                    <span class="td-box-title td-title-on-row">FONT FAMILY</span>
                </div>
                <div class="td-box-control-full">
                    <?php 
            echo td_panel_generator::dropdown(array('ds' => 'td_fonts', 'item_id' => $font_section_settings_id, 'option_id' => 'font_family', 'values' => $this->td_typology_fonts_array));
            ?>
                </div>
            </div>


            <div class="td-box-row">
                <div class="td-box-description">
                    <span class="td-box-title td-title-on-row">FONT SIZE</span>
                </div>
                <div class="td-box-control-full">
                    <?php 
            echo td_panel_generator::dropdown(array('ds' => 'td_fonts', 'item_id' => $font_section_settings_id, 'option_id' => 'font_size', 'values' => $this->td_font_size_list));
            ?>
                </div>
            </div>


            <div class="td-box-row">
                <div class="td-box-description">
                    <span class="td-box-title td-title-on-row">LINE HEIGHT</span>
                </div>
                <div class="td-box-control-full">
                    <?php 
            echo td_panel_generator::dropdown(array('ds' => 'td_fonts', 'item_id' => $font_section_settings_id, 'option_id' => 'line_height', 'values' => $this->td_line_height_list));
            ?>
                </div>
            </div>


            <div class="td-box-row">
                <div class="td-box-description">
                    <span class="td-box-title td-title-on-row">FONT STYLE</span>
                </div>
                <div class="td-box-control-full">
                    <?php 
            echo td_panel_generator::dropdown(array('ds' => 'td_fonts', 'item_id' => $font_section_settings_id, 'option_id' => 'font_style', 'values' => $this->td_font_style_list));
            ?>
                </div>
            </div>


            <div class="td-box-row">
                <div class="td-box-description">
                    <span class="td-box-title td-title-on-row">FONT WEIGHT</span>
                    <p>Default font weight = normal</p>
                </div>
                <div class="td-box-control-full">
                    <?php 
            echo td_panel_generator::dropdown(array('ds' => 'td_fonts', 'item_id' => $font_section_settings_id, 'option_id' => 'font_weight', 'values' => $this->td_font_weight));
            ?>
                </div>
            </div>


            <div class="td-box-row">
                <div class="td-box-description">
                    <span class="td-box-title td-title-on-row">TEXT TRANSFORM</span>
                </div>
                <div class="td-box-control-full">
                    <?php 
            echo td_panel_generator::dropdown(array('ds' => 'td_fonts', 'item_id' => $font_section_settings_id, 'option_id' => 'text_transform', 'values' => $this->td_text_transform));
            ?>
                </div>
            </div>


            <div class="td-box-row">
                <div class="td-box-description">
                    <span class="td-box-title td-title-on-row">TEXT COLOR</span>
                </div>
                <div class="td-box-control-full">
                    <?php 
            echo td_panel_generator::color_piker(array('ds' => 'td_fonts', 'item_id' => $font_section_settings_id, 'option_id' => 'color', 'default_color' => ''));
            ?>
                </div>
            </div>


            <?php 
            echo td_panel_generator::box_end();
            $td_section_counter++;
        }
        //end foreach
    }
Пример #2
0
<!-- FOOTER bottom text color -->
<div class="td-box-row">
    <div class="td-box-description">
        <span class="td-box-title">TEXT COLOR</span>
        <p>Select sub footer bottom text color</p>
    </div>
    <div class="td-box-control-full">
        <?php 
echo td_panel_generator::color_picker(array('ds' => 'td_option', 'option_id' => 'tds_footer_bottom_text_color', 'default_color' => '#cccccc'));
?>
    </div>
</div>

<?php 
echo td_panel_generator::box_end();
?>


<hr>
<div class="td-section-separator">Content</div>


<!-- POSTS PAGE -->
<?php 
echo td_panel_generator::ajax_box('Posts', array('td_ajax_calling_file' => basename(__FILE__), 'td_ajax_box_id' => 'td_posts'));
?>



Пример #3
0
    /**
     * render the categories forms
     */
    static function render_categories_form()
    {
        //get all categories from database
        $categories = get_categories(array('hide_empty' => 0));
        $td_category_walker_panel = new td_category_walker_panel();
        $td_category_walker_panel->walk($categories, 4);
        //print_r($rawalker->td_category_buffer);
        //die;
        //get_categories(array('hide_empty' => 0));//wordpress way
        $categories = td_util::get_category2id_array(false);
        //our function
        foreach ($td_category_walker_panel->td_category_buffer as $display_category_name => $category_id) {
            ?>
            <!-- LAYOUT SETTINGS -->
            <?php 
            echo td_panel_generator::box_start($display_category_name, false);
            ?>

                <!-- DISPLAY VIEW -->
                <div class="td-box-row">
                    <div class="td-box-description">
                        <span class="td-box-title">ARTICLE DISPLAY VIEW</span>
                        <p>Select a module type, this is how your article list will be displayed</p>
                    </div>
                    <div class="td-box-control-full td-panel-module">
                        <?php 
            echo td_panel_generator::visual_select_o(array('ds' => 'td_category', 'item_id' => $category_id, 'option_id' => 'tdc_layout', 'values' => array(array('text' => '', 'title' => '', 'val' => '', 'img' => get_template_directory_uri() . '/wp-admin/images/panel/module-default.png'), array('text' => '', 'title' => '', 'val' => '1', 'img' => get_template_directory_uri() . '/wp-admin/images/panel/module-1.png'), array('text' => '', 'title' => '', 'val' => '2', 'img' => get_template_directory_uri() . '/wp-admin/images/panel/module-2.png'), array('text' => '', 'title' => '', 'val' => '3', 'img' => get_template_directory_uri() . '/wp-admin/images/panel/module-3.png'), array('text' => '', 'title' => '', 'val' => '4', 'img' => get_template_directory_uri() . '/wp-admin/images/panel/module-4.png'), array('text' => '', 'title' => '', 'val' => '5', 'img' => get_template_directory_uri() . '/wp-admin/images/panel/module-5.png'), array('text' => '', 'title' => '', 'val' => '6', 'img' => get_template_directory_uri() . '/wp-admin/images/panel/module-6.png'), array('text' => '', 'title' => '', 'val' => '7', 'img' => get_template_directory_uri() . '/wp-admin/images/panel/module-7.png'), array('text' => '', 'title' => '', 'val' => '8', 'img' => get_template_directory_uri() . '/wp-admin/images/panel/module-8.png'), array('text' => '', 'title' => '', 'val' => '9', 'img' => get_template_directory_uri() . '/wp-admin/images/panel/module-9.png'), array('text' => '', 'title' => '', 'val' => 'search', 'img' => get_template_directory_uri() . '/wp-admin/images/panel/module-10.png'))));
            ?>
                    </div>
                </div>

                <!-- Custom Sidebar + position -->
                <div class="td-box-row">
                    <div class="td-box-description">
                        <span class="td-box-title">CUSTOM SIDEBAR + POSITION</span>
                        <p>Sidebar position and custom sidebars</p>
                    </div>
                    <div class="td-box-control-full td-panel-sidebar-pos">
                        <div class="td-display-inline-block">
                            <?php 
            echo td_panel_generator::visual_select_o(array('ds' => 'td_category', 'item_id' => $category_id, 'option_id' => 'tdc_sidebar_pos', 'values' => array(array('text' => '', 'title' => '', 'val' => '', 'img' => get_template_directory_uri() . '/wp-admin/images/panel/sidebar-default.png'), array('text' => '', 'title' => '', 'val' => 'sidebar_left', 'img' => get_template_directory_uri() . '/wp-admin/images/panel/sidebar-left.png'), array('text' => '', 'title' => '', 'val' => 'no_sidebar', 'img' => get_template_directory_uri() . '/wp-admin/images/panel/sidebar-full.png'), array('text' => '', 'title' => '', 'val' => 'sidebar_right', 'img' => get_template_directory_uri() . '/wp-admin/images/panel/sidebar-right.png'))));
            ?>
                            <div class="td-panel-control-comment td-text-align-right">Select sidebar position</div>
                        </div>
                        <div class="td-display-inline-block td_sidebars_pulldown_align">
                            <?php 
            echo td_panel_generator::sidebar_pulldown(array('ds' => 'td_category', 'item_id' => $category_id, 'option_id' => 'tdc_sidebar_name'));
            ?>
                            <div class="td-panel-control-comment td-text-align-right">Create or select an existing sidebar</div>
                        </div>
                    </div>
                </div>

                <!-- Show Featured slider -->
                <div class="td-box-row">
                    <div class="td-box-description">
                        <span class="td-box-title">SHOW FEATURED SLIDER</span>
                        <p>Enable or disable the featured slider (only posts that are in the Featured category are showed in slider)</p>
                    </div>
                    <div class="td-box-control-full">
                        <?php 
            echo td_panel_generator::checkbox(array('ds' => 'td_category', 'item_id' => $category_id, 'option_id' => 'tdc_slider', 'true_value' => '', 'false_value' => 'yes'));
            ?>
                    </div>
                </div>

                <!-- Category color -->
                <div class="td-box-row">
                    <div class="td-box-description">
                        <span class="td-box-title">CATEGORY TAG COLOR ON POST PAGE</span>
                        <p>Pick a color for this category tag on post page</p>
                    </div>
                    <div class="td-box-control-full">
                        <?php 
            echo td_panel_generator::color_piker(array('ds' => 'td_category', 'item_id' => $category_id, 'option_id' => 'tdc_color', 'default_color' => ''));
            ?>
                    </div>
                </div>

                <!-- BACKGROUND UPLOAD -->
                <div class="td-box-row">
                    <div class="td-box-description">
                        <span class="td-box-title">BACKGROUND UPLOAD</span>
                        <p>Upload your logo (300 x 100px) .png</p>
                    </div>
                    <div class="td-box-control-full">
                        <?php 
            echo td_panel_generator::upload_image(array('ds' => 'td_category', 'item_id' => $category_id, 'option_id' => 'tdc_image'));
            ?>
                    </div>
                </div>

                <!-- BACKGROUND STYLE -->
                <div class="td-box-row">
                    <div class="td-box-description">
                        <span class="td-box-title">BACKGROUND STYLE</span>
                        <p>How the background will be dispalyed</p>
                    </div>
                    <div class="td-box-control-full">
                        <?php 
            echo td_panel_generator::radio_button_control(array('ds' => 'td_category', 'item_id' => $category_id, 'option_id' => 'tdc_bg_repeat', 'values' => array(array('text' => 'Default', 'val' => ''), array('text' => 'Stretch', 'val' => 'stretch'), array('text' => 'Tiled', 'val' => 'tile'))));
            ?>
                    </div>
                </div>

                <!-- Background color -->
                <div class="td-box-row">
                    <div class="td-box-description">
                        <span class="td-box-title">BACKGROUND COLOR</span>
                        <p>Use a solid color instead of an image</p>
                    </div>
                    <div class="td-box-control-full">
                        <?php 
            echo td_panel_generator::color_piker(array('ds' => 'td_category', 'item_id' => $category_id, 'option_id' => 'tdc_bg_color', 'default_color' => ''));
            ?>
                    </div>
                </div>

                <!-- Hide category tag on post -->
                <div class="td-box-row">
                    <div class="td-box-description">
                        <span class="td-box-title">HIDE CATEGORY TAG ON POST</span>
                        <p>Show or hide category tags on post page</p>
                    </div>
                    <div class="td-box-control-full">
                        <?php 
            echo td_panel_generator::checkbox(array('ds' => 'td_category', 'item_id' => $category_id, 'option_id' => 'tdc_hide_on_post', 'true_value' => 'hide', 'false_value' => ''));
            ?>
                    </div>
                </div>

            <?php 
            echo td_panel_generator::box_end();
        }
        //end foreach
    }