return $styling;
    }
    function add_fields($field, $mod_name)
    {
        if ($mod_name != 'layout-part') {
            return;
        }
        global $Themify_Builder_Layouts;
        $output = '';
        switch ($field['type']) {
            case 'layout_part_select':
                $output .= '<select name="' . esc_attr($field['id']) . '" id="' . esc_attr($field['id']) . '" class="tfb_lb_option">';
                $output .= '<option></option>';
                $args = array('post_type' => $Themify_Builder_Layouts->layout_part->post_type_name, 'posts_per_page' => -1);
                $posts = get_posts($args);
                foreach ($posts as $part) {
                    $output .= '<option value="' . esc_attr($part->post_name) . '">' . esc_html($part->post_title) . '</option>';
                }
                $output .= '</select><br/>';
                $output .= sprintf('<a href="%s" target="_blank" class="add_new"><span class="themify_builder_icon add"></span> %s</a>', esc_url(add_query_arg('post_type', $Themify_Builder_Layouts->layout_part->post_type_name, admin_url('post-new.php'))), __('New Layout Part', 'themify'));
                $output .= sprintf('<a href="%s" target="_blank" class="add_new"><span class="themify_builder_icon ti-folder"></span> %s</a>', esc_url(add_query_arg('post_type', $Themify_Builder_Layouts->layout_part->post_type_name, admin_url('edit.php'))), __('Manage Layout Part', 'themify'));
                break;
        }
        echo $output;
    }
}
///////////////////////////////////////
// Module Options
///////////////////////////////////////
Themify_Builder_Model::register_module('TB_Layout_Part_Module');
    {
        $image_sizes = themify_get_image_sizes_list(false);
        $options = array(array('id' => 'mod_title_highlight', 'type' => 'text', 'label' => __('Module Title', 'themify'), 'class' => 'large'), array('id' => 'layout_highlight', 'type' => 'layout', 'label' => __('Highlight Layout', 'themify'), 'options' => array(array('img' => 'grid4.png', 'value' => 'grid4', 'label' => __('Grid 4', 'themify')), array('img' => 'grid3.png', 'value' => 'grid3', 'label' => __('Grid 3', 'themify')), array('img' => 'grid2.png', 'value' => 'grid2', 'label' => __('Grid 2', 'themify')), array('img' => 'fullwidth.png', 'value' => 'fullwidth', 'label' => __('fullwidth', 'themify')))), array('id' => 'type_query_highlight', 'type' => 'radio', 'label' => __('Query by', 'themify'), 'options' => array('category' => __('Category', 'themify'), 'post_slug' => __('Slug', 'themify')), 'default' => 'category', 'option_js' => true), array('id' => 'category_highlight', 'type' => 'query_category', 'label' => __('Category', 'themify'), 'options' => array('taxonomy' => 'highlight-category'), 'help' => sprintf(__('Add more <a href="%s" target="_blank">highlight posts</a>', 'themify'), admin_url('post-new.php?post_type=highlight')), 'wrap_with_class' => 'tf-group-element tf-group-element-category'), array('id' => 'query_slug_highlight', 'type' => 'text', 'label' => __('Highlight Slugs', 'themify'), 'class' => 'large', 'wrap_with_class' => 'tf-group-element tf-group-element-post_slug', 'help' => '<br/>' . __('Insert Highlight slug. Multiple slug should be separated by comma (,)', 'themify')), array('id' => 'post_per_page_highlight', 'type' => 'text', 'label' => __('Limit', 'themify'), 'class' => 'xsmall', 'help' => __('number of posts to show', 'themify')), array('id' => 'offset_highlight', 'type' => 'text', 'label' => __('Offset', 'themify'), 'class' => 'xsmall', 'help' => __('number of post to displace or pass over', 'themify')), array('id' => 'order_highlight', 'type' => 'select', 'label' => __('Order', 'themify'), 'help' => __('Descending = show newer posts first', 'themify'), 'options' => array('desc' => __('Descending', 'themify'), 'asc' => __('Ascending', 'themify'))), array('id' => 'orderby_highlight', 'type' => 'select', 'label' => __('Order By', 'themify'), 'options' => array('date' => __('Date', 'themify'), 'id' => __('Id', 'themify'), 'author' => __('Author', 'themify'), 'title' => __('Title', 'themify'), 'name' => __('Name', 'themify'), 'modified' => __('Modified', 'themify'), 'rand' => __('Rand', 'themify'), 'comment_count' => __('Comment Count', 'themify'))), array('id' => 'display_highlight', 'type' => 'select', 'label' => __('Display', 'themify'), 'options' => array('content' => __('Content', 'themify'), 'excerpt' => __('Excerpt', 'themify'), 'none' => __('None', 'themify'))), array('id' => 'hide_feat_img_highlight', 'type' => 'select', 'label' => __('Hide Featured Image', 'themify'), 'empty' => array('val' => '', 'label' => ''), 'options' => array('yes' => __('Yes', 'themify'), 'no' => __('No', 'themify'))), array('id' => 'image_size_highlight', 'type' => 'select', 'label' => Themify_Builder_Model::is_img_php_disabled() ? __('Image Size', 'themify') : false, 'empty' => array('val' => '', 'label' => ''), 'hide' => Themify_Builder_Model::is_img_php_disabled() ? false : true, 'options' => $image_sizes), array('id' => 'img_width_highlight', 'type' => 'text', 'label' => __('Image Width', 'themify'), 'class' => 'xsmall'), array('id' => 'img_height_highlight', 'type' => 'text', 'label' => __('Image Height', 'themify'), 'class' => 'xsmall'), array('id' => 'hide_post_title_highlight', 'type' => 'select', 'label' => __('Hide Post Title', 'themify'), 'empty' => array('val' => '', 'label' => ''), 'options' => array('yes' => __('Yes', 'themify'), 'no' => __('No', 'themify'))), array('id' => 'hide_page_nav_highlight', 'type' => 'select', 'label' => __('Hide Page Navigation', 'themify'), 'options' => array('yes' => __('Yes', 'themify'), 'no' => __('No', 'themify'))));
        return $options;
    }
    public function get_styling()
    {
        $styling = array(array('id' => 'separator_animation', 'title' => '', 'description' => '', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Animation', 'themify') . '</h4>')), array('id' => 'animation_effect', 'type' => 'animation_select', 'label' => __('Effect', 'themify')), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_image_background', 'title' => '', 'description' => '', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Background', 'themify') . '</h4>')), array('id' => 'background_color', 'type' => 'color', 'label' => __('Background Color', 'themify'), 'class' => 'small', 'prop' => 'background-color', 'selector' => array('.module-highlight .post')), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_font', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Font', 'themify') . '</h4>')), array('id' => 'font_family', 'type' => 'font_select', 'label' => __('Font Family', 'themify'), 'class' => 'font-family-select', 'prop' => 'font-family', 'selector' => array('.module-highlight .post-title', '.module-highlight .post-title a')), array('id' => 'font_color', 'type' => 'color', 'label' => __('Font Color', 'themify'), 'class' => 'small', 'prop' => 'color', 'selector' => array('.module-highlight .post', '.module-highlight h1', '.module-highlight h2', '.module-highlight h3:not(.module-title)', '.module-highlight h4', '.module-highlight h5', '.module-highlight h6', '.module-highlight .post-title', '.module-highlight .post-title a')), array('id' => 'multi_font_size', 'type' => 'multi', 'label' => __('Font Size', 'themify'), 'fields' => array(array('id' => 'font_size', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'font_size_unit', 'type' => 'select', 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'px', 'name' => __('px', 'themify')), array('value' => 'em', 'name' => __('em', 'themify')))))), array('id' => 'multi_line_height', 'type' => 'multi', 'label' => __('Line Height', 'themify'), 'fields' => array(array('id' => 'line_height', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'line_height_unit', 'type' => 'select', 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'px', 'name' => __('px', 'themify')), array('value' => 'em', 'name' => __('em', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'text_align', 'label' => __('Text Align', 'themify'), 'type' => 'radio', 'meta' => array(array('value' => '', 'name' => __('Default', 'themify'), 'selected' => true), array('value' => 'left', 'name' => __('Left', 'themify')), array('value' => 'center', 'name' => __('Center', 'themify')), array('value' => 'right', 'name' => __('Right', 'themify')), array('value' => 'justify', 'name' => __('Justify', 'themify'))), 'prop' => 'text-align', 'selector' => '.module-highlight .post'), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_link', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Link', 'themify') . '</h4>')), array('id' => 'link_color', 'type' => 'color', 'label' => __('Color', 'themify'), 'class' => 'small', 'prop' => 'color', 'selector' => '.module-highlight a'), array('id' => 'text_decoration', 'type' => 'select', 'label' => __('Text Decoration', 'themify'), 'meta' => array(array('value' => '', 'name' => '', 'selected' => true), array('value' => 'underline', 'name' => __('Underline', 'themify')), array('value' => 'overline', 'name' => __('Overline', 'themify')), array('value' => 'line-through', 'name' => __('Line through', 'themify')), array('value' => 'none', 'name' => __('None', 'themify'))), 'prop' => 'text-decoration', 'selector' => '.module-highlight a'), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_padding', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Padding', 'themify') . '</h4>')), array('id' => 'multi_padding_top', 'type' => 'multi', 'label' => __('Padding', 'themify'), 'fields' => array(array('id' => 'padding_top', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'padding-top', 'selector' => '.module-highlight .post'), array('id' => 'padding_top_unit', 'type' => 'select', 'description' => __('top', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_padding_right', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'padding_right', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'padding-right', 'selector' => '.module-highlight .post'), array('id' => 'padding_right_unit', 'type' => 'select', 'description' => __('right', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_padding_bottom', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'padding_bottom', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'padding-bottom', 'selector' => '.module-highlight .post'), array('id' => 'padding_bottom_unit', 'type' => 'select', 'description' => __('bottom', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_padding_left', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'padding_left', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'padding-left', 'selector' => '.module-highlight .post'), array('id' => 'padding_left_unit', 'type' => 'select', 'description' => __('left', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_margin', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Margin', 'themify') . '</h4>')), array('id' => 'multi_margin_top', 'type' => 'multi', 'label' => __('Margin', 'themify'), 'fields' => array(array('id' => 'margin_top', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'margin-top', 'selector' => '.module-highlight .post'), array('id' => 'margin_top_unit', 'type' => 'select', 'description' => __('top', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_margin_right', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'margin_right', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'margin-right', 'selector' => '.module-highlight .post'), array('id' => 'margin_right_unit', 'type' => 'select', 'description' => __('right', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_margin_bottom', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'margin_bottom', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'margin-bottom', 'selector' => '.module-highlight .post'), array('id' => 'margin_bottom_unit', 'type' => 'select', 'description' => __('bottom', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_margin_left', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'margin_left', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'margin-left', 'selector' => '.module-highlight .post'), array('id' => 'margin_left_unit', 'type' => 'select', 'description' => __('left', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_border', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Border', 'themify') . '</h4>')), array('id' => 'multi_border_top', 'type' => 'multi', 'label' => __('Border', 'themify'), 'fields' => array(array('id' => 'border_top_color', 'type' => 'color', 'class' => 'small', 'prop' => 'border-top-color', 'selector' => '.module-highlight .post'), array('id' => 'border_top_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall', 'prop' => 'border-top-width', 'selector' => '.module-highlight .post'), array('id' => 'border_top_style', 'type' => 'select', 'description' => __('top', 'themify'), 'meta' => Themify_Builder_model::get_border_styles(), 'prop' => 'border-top-style', 'selector' => '.module-highlight .post'))), array('id' => 'multi_border_right', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'border_right_color', 'type' => 'color', 'class' => 'small', 'prop' => 'border-right-color', 'selector' => '.module-highlight .post'), array('id' => 'border_right_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall', 'prop' => 'border-right-width', 'selector' => '.module-highlight .post'), array('id' => 'border_right_style', 'type' => 'select', 'description' => __('right', 'themify'), 'meta' => Themify_Builder_model::get_border_styles(), 'prop' => 'border-right-style', 'selector' => '.module-highlight .post'))), array('id' => 'multi_border_bottom', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'border_bottom_color', 'type' => 'color', 'class' => 'small', 'prop' => 'border-bottom-color', 'selector' => '.module-highlight .post'), array('id' => 'border_bottom_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall', 'prop' => 'border-bottom-width', 'selector' => '.module-highlight .post'), array('id' => 'border_bottom_style', 'type' => 'select', 'description' => __('bottom', 'themify'), 'meta' => Themify_Builder_model::get_border_styles(), 'prop' => 'border-bottom-style', 'selector' => '.module-highlight .post'))), array('id' => 'multi_border_left', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'border_left_color', 'type' => 'color', 'class' => 'small', 'prop' => 'border-left-color', 'selector' => '.module-highlight .post'), array('id' => 'border_left_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall', 'prop' => 'border-left-width', 'selector' => '.module-highlight .post'), array('id' => 'border_left_style', 'type' => 'select', 'description' => __('left', 'themify'), 'meta' => Themify_Builder_model::get_border_styles(), 'prop' => 'border-left-style', 'selector' => '.module-highlight .post'))), array('type' => 'separator', 'meta' => array('html' => '<hr/>')), array('id' => 'css_highlight', 'type' => 'text', 'label' => __('Additional CSS Class', 'themify'), 'class' => 'large exclude-from-reset-field', 'description' => sprintf('<br/><small>%s</small>', __('Add additional CSS class(es) for custom styling', 'themify'))));
        return $styling;
    }
    function set_metabox()
    {
        // Highlight Meta Box Options
        $meta_box = array(Themify_Builder_Model::$post_image, Themify_Builder_Model::$featured_image_size, Themify_Builder_Model::$image_width, Themify_Builder_Model::$image_height, Themify_Builder_Model::$external_link, Themify_Builder_Model::$lightbox_link);
        return $meta_box;
    }
    function do_shortcode($atts)
    {
        global $ThemifyBuilder;
        extract(shortcode_atts(array('id' => '', 'title' => 'yes', 'image' => 'yes', 'image_w' => 68, 'image_h' => 68, 'display' => 'content', 'more_link' => false, 'more_text' => __('More &rarr;', 'themify'), 'limit' => 6, 'category' => 0, 'order' => 'DESC', 'orderby' => 'date', 'style' => 'grid3', 'section_link' => false), $atts));
        $sync = array('mod_title_highlight' => '', 'layout_highlight' => $style, 'category_highlight' => $category, 'post_per_page_highlight' => $limit, 'offset_highlight' => '', 'order_highlight' => $order, 'orderby_highlight' => $orderby, 'display_highlight' => $display, 'hide_feat_img_highlight' => $image == 'yes' ? 'no' : 'yes', 'image_size_highlight' => '', 'img_width_highlight' => $image_w, 'img_height_highlight' => $image_h, 'hide_post_title_highlight' => $title == 'yes' ? 'no' : 'yes', 'hide_post_date_highlight' => '', 'hide_post_meta_highlight' => '', 'hide_page_nav_highlight' => 'yes', 'animation_effect' => '', 'css_highlight' => '');
        $module = array('module_ID' => $this->slug . '-' . rand(0, 10000), 'mod_name' => $this->slug, 'mod_settings' => $sync);
        return $ThemifyBuilder->retrieve_template('template-' . $this->slug . '.php', $module, '', '', false);
    }
}
///////////////////////////////////////
// Module Options
///////////////////////////////////////
if ($this->is_cpt_active('highlight')) {
    Themify_Builder_Model::register_module('TB_Highlight_Module');
}
            die(-1);
        }
        global $wp_widget_factory;
        require_once ABSPATH . 'wp-admin/includes/widgets.php';
        $widget_class = $_POST['load_class'];
        if ($widget_class == '') {
            die(-1);
        }
        $get_instance = isset($_POST['widget_instance']) ? $_POST['widget_instance'] : '';
        $instance = array();
        if (is_array($get_instance) && count($get_instance) > 0) {
            foreach ($get_instance as $k => $s) {
                $instance = $s;
            }
        }
        $widget = new $widget_class();
        $widget->number = next_widget_id_number($_POST['id_base']);
        ob_start();
        $widget->form($instance);
        $form = ob_get_clean();
        $widget->form = $form;
        echo $widget->form;
        echo '<br/>';
        die;
    }
}
///////////////////////////////////////
// Module Options
///////////////////////////////////////
Themify_Builder_Model::register_module('TB_Widget_Module');
/**
 * Module Name: Gallery
 * Description: Display WP Gallery Images
 */
class TB_Gallery_Module extends Themify_Builder_Module
{
    function __construct()
    {
        parent::__construct(array('name' => __('Gallery', 'themify'), 'slug' => 'gallery'));
    }
    public function get_options()
    {
        $options = array(array('id' => 'mod_title_gallery', 'type' => 'text', 'label' => __('Module Title', 'themify'), 'class' => 'large'), array('id' => 'layout_gallery', 'type' => 'radio', 'label' => __('Gallery Layout', 'themify'), 'options' => array('grid' => __('Grid', 'themify'), 'showcase' => __('Showcase', 'themify'), 'lightboxed' => __('Lightboxed', 'themify')), 'default' => 'grid', 'option_js' => true), array('id' => 'thumbnail_gallery', 'type' => 'image', 'label' => __('Thumbnail', 'themify'), 'class' => 'large', 'wrap_with_class' => 'tf-group-element tf-group-element-lightboxed'), array('id' => 'shortcode_gallery', 'type' => 'textarea', 'class' => 'fullwidth tf-shortcode-input', 'label' => __('Insert Gallery Shortcode', 'themify'), 'help' => sprintf('<a href="#" class="builder_button tf-gallery-btn">%s</a>', __('Insert Gallery', 'themify'))), array('id' => 'thumb_w_gallery', 'type' => 'text', 'label' => __('Thumbnail Width', 'themify'), 'class' => 'xsmall', 'hide' => Themify_Builder_Model::is_img_php_disabled() ? true : false, 'help' => 'px'), array('id' => 'thumb_h_gallery', 'type' => 'text', 'label' => __('Thumbnail Height', 'themify'), 'class' => 'xsmall', 'hide' => Themify_Builder_Model::is_img_php_disabled() ? true : false, 'help' => 'px'), array('id' => 'image_size_gallery', 'type' => 'select', 'label' => Themify_Builder_Model::is_img_php_disabled() ? __('Image Size', 'themify') : false, 'empty' => array('val' => '', 'label' => ''), 'hide' => Themify_Builder_Model::is_img_php_disabled() ? false : true, 'options' => themify_get_image_sizes_list(false)), array('id' => 'appearance_gallery', 'type' => 'checkbox', 'label' => __('Image Appearance', 'themify'), 'options' => array(array('name' => 'rounded', 'value' => __('Rounded', 'themify')), array('name' => 'drop-shadow', 'value' => __('Drop Shadow', 'themify')), array('name' => 'bordered', 'value' => __('Bordered', 'themify')), array('name' => 'circle', 'value' => __('Circle', 'themify'), 'help' => __('(square format image only)', 'themify')))));
        return $options;
    }
    public function get_animation()
    {
        $animation = array(array('id' => 'multi_Animation Effect', 'type' => 'multi', 'label' => __('Effect', 'themify'), 'fields' => array(array('id' => 'animation_effect', 'type' => 'animation_select', 'label' => __('Effect', 'themify')), array('id' => 'animation_effect_delay', 'type' => 'text', 'label' => __('Delay', 'themify'), 'class' => 'xsmall', 'description' => __('Delay (s)', 'themify')), array('id' => 'animation_effect_repeat', 'type' => 'text', 'label' => __('Repeat', 'themify'), 'class' => 'xsmall', 'description' => __('Repeat (x)', 'themify')))));
        return $animation;
    }
    public function get_styling()
    {
        $styling = array(array('id' => 'separator_image_background', 'title' => '', 'description' => '', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Background', 'themify') . '</h4>')), array('id' => 'background_color', 'type' => 'color', 'label' => __('Background Color', 'themify'), 'class' => 'small', 'prop' => 'background-color', 'selector' => '.module-gallery'), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_font', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Font', 'themify') . '</h4>')), array('id' => 'font_family', 'type' => 'font_select', 'label' => __('Font Family', 'themify'), 'class' => 'font-family-select', 'prop' => 'font-family', 'selector' => '.module-gallery'), array('id' => 'font_color', 'type' => 'color', 'label' => __('Font Color', 'themify'), 'class' => 'small', 'prop' => 'color', 'selector' => '.module-gallery'), array('id' => 'multi_font_size', 'type' => 'multi', 'label' => __('Font Size', 'themify'), 'fields' => array(array('id' => 'font_size', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'font-size', 'selector' => '.module-gallery'), array('id' => 'font_size_unit', 'type' => 'select', 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'px', 'name' => __('px', 'themify')), array('value' => 'em', 'name' => __('em', 'themify')))))), array('id' => 'multi_line_height', 'type' => 'multi', 'label' => __('Line Height', 'themify'), 'fields' => array(array('id' => 'line_height', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'line-height', 'selector' => '.module-gallery'), array('id' => 'line_height_unit', 'type' => 'select', 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'px', 'name' => __('px', 'themify')), array('value' => 'em', 'name' => __('em', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'text_align', 'label' => __('Text Align', 'themify'), 'type' => 'radio', 'meta' => array(array('value' => '', 'name' => __('Default', 'themify'), 'selected' => true), array('value' => 'left', 'name' => __('Left', 'themify')), array('value' => 'center', 'name' => __('Center', 'themify')), array('value' => 'right', 'name' => __('Right', 'themify')), array('value' => 'justify', 'name' => __('Justify', 'themify'))), 'prop' => 'text-align', 'selector' => '.module-gallery'), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_link', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Link', 'themify') . '</h4>')), array('id' => 'link_color', 'type' => 'color', 'label' => __('Color', 'themify'), 'class' => 'small', 'prop' => 'color', 'selector' => '.module-gallery a'), array('id' => 'text_decoration', 'type' => 'select', 'label' => __('Text Decoration', 'themify'), 'meta' => array(array('value' => '', 'name' => '', 'selected' => true), array('value' => 'underline', 'name' => __('Underline', 'themify')), array('value' => 'overline', 'name' => __('Overline', 'themify')), array('value' => 'line-through', 'name' => __('Line through', 'themify')), array('value' => 'none', 'name' => __('None', 'themify'))), 'prop' => 'text-decoration', 'selector' => '.module-gallery a'), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_padding', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Padding', 'themify') . '</h4>')), array('id' => 'multi_padding_top', 'type' => 'multi', 'label' => __('Padding', 'themify'), 'fields' => array(array('id' => 'padding_top', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'padding-top', 'selector' => '.module-gallery'), array('id' => 'padding_top_unit', 'type' => 'select', 'description' => __('top', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_padding_right', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'padding_right', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'padding-right', 'selector' => '.module-gallery'), array('id' => 'padding_right_unit', 'type' => 'select', 'description' => __('right', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_padding_bottom', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'padding_bottom', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'padding-bottom', 'selector' => '.module-gallery'), array('id' => 'padding_bottom_unit', 'type' => 'select', 'description' => __('bottom', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_padding_left', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'padding_left', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'padding-left', 'selector' => '.module-gallery'), array('id' => 'padding_left_unit', 'type' => 'select', 'description' => __('left', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_margin', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Margin', 'themify') . '</h4>')), array('id' => 'multi_margin_top', 'type' => 'multi', 'label' => __('Margin', 'themify'), 'fields' => array(array('id' => 'margin_top', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'margin-top', 'selector' => '.module-gallery'), array('id' => 'margin_top_unit', 'type' => 'select', 'description' => __('top', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_margin_right', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'margin_right', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'margin-right', 'selector' => '.module-gallery'), array('id' => 'margin_right_unit', 'type' => 'select', 'description' => __('right', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_margin_bottom', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'margin_bottom', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'margin-bottom', 'selector' => '.module-gallery'), array('id' => 'margin_bottom_unit', 'type' => 'select', 'description' => __('bottom', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_margin_left', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'margin_left', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'margin-left', 'selector' => '.module-gallery'), array('id' => 'margin_left_unit', 'type' => 'select', 'description' => __('left', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_border', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Border', 'themify') . '</h4>')), array('id' => 'multi_border_top', 'type' => 'multi', 'label' => __('Border', 'themify'), 'fields' => array(array('id' => 'border_top_color', 'type' => 'color', 'class' => 'small', 'prop' => 'border-top-color', 'selector' => '.module-gallery'), array('id' => 'border_top_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall', 'prop' => 'border-top-width', 'selector' => '.module-gallery'), array('id' => 'border_top_style', 'type' => 'select', 'description' => __('top', 'themify'), 'meta' => Themify_Builder_model::get_border_styles(), 'prop' => 'border-top-style', 'selector' => '.module-gallery'))), array('id' => 'multi_border_right', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'border_right_color', 'type' => 'color', 'class' => 'small', 'prop' => 'border-right-color', 'selector' => '.module-gallery'), array('id' => 'border_right_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall', 'prop' => 'border-right-width', 'selector' => '.module-gallery'), array('id' => 'border_right_style', 'type' => 'select', 'description' => __('right', 'themify'), 'meta' => Themify_Builder_model::get_border_styles(), 'prop' => 'border-right-style', 'selector' => '.module-gallery'))), array('id' => 'multi_border_bottom', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'border_bottom_color', 'type' => 'color', 'class' => 'small', 'prop' => 'border-bottom-color', 'selector' => '.module-gallery'), array('id' => 'border_bottom_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall', 'prop' => 'border-bottom-width', 'selector' => '.module-gallery'), array('id' => 'border_bottom_style', 'type' => 'select', 'description' => __('bottom', 'themify'), 'meta' => Themify_Builder_model::get_border_styles(), 'prop' => 'border-bottom-style', 'selector' => '.module-gallery'))), array('id' => 'multi_border_left', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'border_left_color', 'type' => 'color', 'class' => 'small', 'prop' => 'border-left-color', 'selector' => '.module-gallery'), array('id' => 'border_left_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall', 'prop' => 'border-left-width', 'selector' => '.module-gallery'), array('id' => 'border_left_style', 'type' => 'select', 'description' => __('left', 'themify'), 'meta' => Themify_Builder_model::get_border_styles(), 'prop' => 'border-left-style', 'selector' => '.module-gallery'))), array('type' => 'separator', 'meta' => array('html' => '<hr/>')), array('id' => 'css_gallery', 'type' => 'text', 'label' => __('Additional CSS Class', 'themify'), 'class' => 'large exclude-from-reset-field', 'description' => sprintf('<br/><small>%s</small>', __('Add additional CSS class(es) for custom styling', 'themify'))));
        return $styling;
    }
}
///////////////////////////////////////
// Module Options
///////////////////////////////////////
Themify_Builder_Model::register_module('TB_Gallery_Module');
            if ($position = get_post_meta($post->ID, '_testimonial_position', true)) {
                $out .= '<em class="testimonial-title">' . $position;
            }
            if ($link = get_post_meta($post->ID, '_testimonial_link', true)) {
                if ($position) {
                    $out .= ', ';
                } else {
                    $out .= '<em class="testimonial-title">';
                }
                $out .= '<a href="' . esc_url($link) . '">';
            }
            if ($company = get_post_meta($post->ID, '_testimonial_company', true)) {
                $out .= $company;
            } else {
                $out .= $link;
            }
            if ($link) {
                $out .= '</a>';
            }
            $out .= '</em>';
            return $out;
        }
        return '';
    }
}
///////////////////////////////////////
// Module Options
///////////////////////////////////////
$image_sizes = themify_get_image_sizes_list(false);
Themify_Builder_Model::register_module('TB_Testimonial_Module', apply_filters('themify_builder_module_testimonial', array('options' => array(array('id' => 'mod_title_testimonial', 'type' => 'text', 'label' => __('Module Title', 'themify'), 'class' => 'large'), array('id' => 'layout_testimonial', 'type' => 'layout', 'label' => __('Testimonial Layout', 'themify'), 'options' => array(array('img' => 'grid4.png', 'value' => 'grid4', 'label' => __('Grid 4', 'themify')), array('img' => 'grid3.png', 'value' => 'grid3', 'label' => __('Grid 3', 'themify')), array('img' => 'grid2.png', 'value' => 'grid2', 'label' => __('Grid 2', 'themify')), array('img' => 'fullwidth.png', 'value' => 'fullwidth', 'label' => __('fullwidth', 'themify')))), array('id' => 'category_testimonial', 'type' => 'query_category', 'label' => __('Category', 'themify'), 'options' => array('taxonomy' => 'testimonial-category'), 'help' => sprintf(__('Add more <a href="%s" target="_blank">testimonials</a>', 'themify'), admin_url('post-new.php?post_type=testimonial'))), array('id' => 'post_per_page_testimonial', 'type' => 'text', 'label' => __('Limit', 'themify'), 'class' => 'xsmall', 'help' => __('number of posts to show', 'themify')), array('id' => 'offset_testimonial', 'type' => 'text', 'label' => __('Offset', 'themify'), 'class' => 'xsmall', 'help' => __('number of post to displace or pass over', 'themify')), array('id' => 'order_testimonial', 'type' => 'select', 'label' => __('Order', 'themify'), 'help' => __('Descending = show newer posts first', 'themify'), 'options' => array('desc' => __('Descending', 'themify'), 'asc' => __('Ascending', 'themify'))), array('id' => 'orderby_testimonial', 'type' => 'select', 'label' => __('Order By', 'themify'), 'options' => array('date' => __('Date', 'themify'), 'id' => __('Id', 'themify'), 'author' => __('Author', 'themify'), 'title' => __('Title', 'themify'), 'name' => __('Name', 'themify'), 'modified' => __('Modified', 'themify'), 'rand' => __('Rand', 'themify'), 'comment_count' => __('Comment Count', 'themify'))), array('id' => 'display_testimonial', 'type' => 'select', 'label' => __('Display', 'themify'), 'options' => array('content' => __('Content', 'themify'), 'excerpt' => __('Excerpt', 'themify'), 'none' => __('None', 'themify'))), array('id' => 'hide_feat_img_testimonial', 'type' => 'select', 'label' => __('Hide Featured Image', 'themify'), 'empty' => array('val' => '', 'label' => ''), 'options' => array('yes' => __('Yes', 'themify'), 'no' => __('No', 'themify'))), array('id' => 'image_size_testimonial', 'type' => 'select', 'label' => $this->is_img_php_disabled() ? __('Image Size', 'themify') : false, 'empty' => array('val' => '', 'label' => ''), 'hide' => $this->is_img_php_disabled() ? false : true, 'options' => $image_sizes), array('id' => 'img_width_testimonial', 'type' => 'text', 'label' => __('Image Width', 'themify'), 'class' => 'xsmall'), array('id' => 'img_height_testimonial', 'type' => 'text', 'label' => __('Image Height', 'themify'), 'class' => 'xsmall'), array('id' => 'hide_post_title_testimonial', 'type' => 'select', 'label' => __('Hide Post Title', 'themify'), 'empty' => array('val' => '', 'label' => ''), 'options' => array('yes' => __('Yes', 'themify'), 'no' => __('No', 'themify'))), array('id' => 'hide_page_nav_testimonial', 'type' => 'select', 'label' => __('Hide Page Navigation', 'themify'), 'options' => array('yes' => __('Yes', 'themify'), 'no' => __('No', 'themify')))), 'styling' => array(array('id' => 'separator_animation', 'title' => '', 'description' => '', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Animation', 'themify') . '</h4>')), array('id' => 'animation_effect', 'type' => 'animation_select', 'label' => __('Effect', 'themify')), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_image_background', 'title' => '', 'description' => '', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Background', 'themify') . '</h4>')), array('id' => 'background_color', 'type' => 'color', 'label' => __('Background Color', 'themify'), 'class' => 'small'), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_font', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Font', 'themify') . '</h4>')), array('id' => 'font_family', 'type' => 'font_select', 'label' => __('Font Family', 'themify'), 'class' => 'font-family-select'), array('id' => 'font_color', 'type' => 'color', 'label' => __('Font Color', 'themify'), 'class' => 'small'), array('id' => 'multi_font_size', 'type' => 'multi', 'label' => __('Font Size', 'themify'), 'fields' => array(array('id' => 'font_size', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'font_size_unit', 'type' => 'select', 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'px', 'name' => __('px', 'themify')), array('value' => 'em', 'name' => __('em', 'themify')))))), array('id' => 'multi_line_height', 'type' => 'multi', 'label' => __('Line Height', 'themify'), 'fields' => array(array('id' => 'line_height', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'line_height_unit', 'type' => 'select', 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'px', 'name' => __('px', 'themify')), array('value' => 'em', 'name' => __('em', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'text_align', 'label' => __('Text Align', 'themify'), 'type' => 'radio', 'meta' => array(array('value' => '', 'name' => __('Default', 'themify'), 'selected' => true), array('value' => 'left', 'name' => __('Left', 'themify')), array('value' => 'center', 'name' => __('Center', 'themify')), array('value' => 'right', 'name' => __('Right', 'themify')), array('value' => 'justify', 'name' => __('Justify', 'themify')))), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_link', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Link', 'themify') . '</h4>')), array('id' => 'link_color', 'type' => 'color', 'label' => __('Color', 'themify'), 'class' => 'small'), array('id' => 'text_decoration', 'type' => 'select', 'label' => __('Text Decoration', 'themify'), 'meta' => array(array('value' => '', 'name' => '', 'selected' => true), array('value' => 'underline', 'name' => __('Underline', 'themify')), array('value' => 'overline', 'name' => __('Overline', 'themify')), array('value' => 'line-through', 'name' => __('Line through', 'themify')), array('value' => 'none', 'name' => __('None', 'themify')))), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_padding', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Padding', 'themify') . '</h4>')), array('id' => 'multi_padding_top', 'type' => 'multi', 'label' => __('Padding', 'themify'), 'fields' => array(array('id' => 'padding_top', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'padding_top_unit', 'type' => 'select', 'description' => __('top', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_padding_right', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'padding_right', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'padding_right_unit', 'type' => 'select', 'description' => __('right', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_padding_bottom', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'padding_bottom', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'padding_bottom_unit', 'type' => 'select', 'description' => __('bottom', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_padding_left', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'padding_left', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'padding_left_unit', 'type' => 'select', 'description' => __('left', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_margin', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Margin', 'themify') . '</h4>')), array('id' => 'multi_margin_top', 'type' => 'multi', 'label' => __('Margin', 'themify'), 'fields' => array(array('id' => 'margin_top', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'margin_top_unit', 'type' => 'select', 'description' => __('top', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_margin_right', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'margin_right', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'margin_right_unit', 'type' => 'select', 'description' => __('right', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_margin_bottom', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'margin_bottom', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'margin_bottom_unit', 'type' => 'select', 'description' => __('bottom', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_margin_left', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'margin_left', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'margin_left_unit', 'type' => 'select', 'description' => __('left', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_border', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Border', 'themify') . '</h4>')), array('id' => 'multi_border_top', 'type' => 'multi', 'label' => __('Border', 'themify'), 'fields' => array(array('id' => 'border_top_color', 'type' => 'color', 'class' => 'small'), array('id' => 'border_top_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall'), array('id' => 'border_top_style', 'type' => 'select', 'description' => __('top', 'themify'), 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'solid', 'name' => __('Solid', 'themify')), array('value' => 'dashed', 'name' => __('Dashed', 'themify')), array('value' => 'dotted', 'name' => __('Dotted', 'themify')), array('value' => 'double', 'name' => __('Double', 'themify')))))), array('id' => 'multi_border_right', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'border_right_color', 'type' => 'color', 'class' => 'small'), array('id' => 'border_right_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall'), array('id' => 'border_right_style', 'type' => 'select', 'description' => __('right', 'themify'), 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'solid', 'name' => __('Solid', 'themify')), array('value' => 'dashed', 'name' => __('Dashed', 'themify')), array('value' => 'dotted', 'name' => __('Dotted', 'themify')), array('value' => 'double', 'name' => __('Double', 'themify')))))), array('id' => 'multi_border_bottom', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'border_bottom_color', 'type' => 'color', 'class' => 'small'), array('id' => 'border_bottom_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall'), array('id' => 'border_bottom_style', 'type' => 'select', 'description' => __('bottom', 'themify'), 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'solid', 'name' => __('Solid', 'themify')), array('value' => 'dashed', 'name' => __('Dashed', 'themify')), array('value' => 'dotted', 'name' => __('Dotted', 'themify')), array('value' => 'double', 'name' => __('Double', 'themify')))))), array('id' => 'multi_border_left', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'border_left_color', 'type' => 'color', 'class' => 'small'), array('id' => 'border_left_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall'), array('id' => 'border_left_style', 'type' => 'select', 'description' => __('left', 'themify'), 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'solid', 'name' => __('Solid', 'themify')), array('value' => 'dashed', 'name' => __('Dashed', 'themify')), array('value' => 'dotted', 'name' => __('Dotted', 'themify')), array('value' => 'double', 'name' => __('Double', 'themify')))))), array('type' => 'separator', 'meta' => array('html' => '<hr/>')), array('id' => 'css_testimonial', 'type' => 'text', 'label' => __('Additional CSS Class', 'themify'), 'class' => 'large exclude-from-reset-field', 'description' => sprintf('<br/><small>%s</small>', __('Add additional CSS class(es) for custom styling', 'themify')))), 'styling_selector' => array('.module-testimonial .post' => array('background_color', 'font_family', 'font_size', 'line_height', 'text_align', 'color', 'padding', 'margin', 'border_top', 'border_right', 'border_bottom', 'border_left'), '.module-testimonial a' => array('link_color', 'text_decoration'), '.module-testimonial .post-title' => array('font_family', 'color'), '.module-testimonial .post-title a' => array('font_family', 'color')))));
<?php

if (!defined('ABSPATH')) {
    exit;
}
// Exit if accessed directly
/**
 * Module Name: Box
 * Description: Display box content
 */
class TB_Box_Module extends Themify_Builder_Module
{
    function __construct()
    {
        parent::__construct(array('name' => __('Box', 'themify'), 'slug' => 'box'));
    }
}
///////////////////////////////////////
// Module Options
///////////////////////////////////////
Themify_Builder_Model::register_module('TB_Box_Module', apply_filters('themify_builder_module_box', array('options' => array(array('id' => 'mod_title_box', 'type' => 'text', 'label' => __('Module Title', 'themify'), 'class' => 'large'), array('id' => 'content_box', 'type' => 'wp_editor', 'class' => 'fullwidth'), array('id' => 'color_box', 'type' => 'layout', 'label' => __('Box Color', 'themify'), 'options' => array(array('img' => 'color-default.png', 'value' => 'default', 'label' => __('default', 'themify')), array('img' => 'color-black.png', 'value' => 'black', 'label' => __('black', 'themify')), array('img' => 'color-grey.png', 'value' => 'gray', 'label' => __('gray', 'themify')), array('img' => 'color-blue.png', 'value' => 'blue', 'label' => __('blue', 'themify')), array('img' => 'color-light-blue.png', 'value' => 'light-blue', 'label' => __('light-blue', 'themify')), array('img' => 'color-green.png', 'value' => 'green', 'label' => __('green', 'themify')), array('img' => 'color-light-green.png', 'value' => 'light-green', 'label' => __('light-green', 'themify')), array('img' => 'color-purple.png', 'value' => 'purple', 'label' => __('purple', 'themify')), array('img' => 'color-light-purple.png', 'value' => 'light-purple', 'label' => __('light-purple', 'themify')), array('img' => 'color-brown.png', 'value' => 'brown', 'label' => __('brown', 'themify')), array('img' => 'color-orange.png', 'value' => 'orange', 'label' => __('orange', 'themify')), array('img' => 'color-yellow.png', 'value' => 'yellow', 'label' => __('yellow', 'themify')), array('img' => 'color-red.png', 'value' => 'red', 'label' => __('red', 'themify')), array('img' => 'color-pink.png', 'value' => 'pink', 'label' => __('pink', 'themify'))), 'bottom' => true), array('id' => 'appearance_box', 'type' => 'checkbox', 'label' => __('Appearance', 'themify'), 'default' => array('rounded', 'gradient'), 'options' => array(array('name' => 'rounded', 'value' => __('Rounded', 'themify')), array('name' => 'gradient', 'value' => __('Gradient', 'themify')), array('name' => 'glossy', 'value' => __('Glossy', 'themify')), array('name' => 'embossed', 'value' => __('Embossed', 'themify')), array('name' => 'shadow', 'value' => __('Shadow', 'themify'))))), 'styling' => array(array('id' => 'separator_animation', 'title' => '', 'description' => '', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Animation', 'themify') . '</h4>')), array('id' => 'animation_effect', 'type' => 'animation_select', 'label' => __('Effect', 'themify'), 'class' => ''), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_image_background', 'title' => '', 'description' => '', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Background', 'themify') . '</h4>')), array('id' => 'background_image', 'type' => 'image', 'label' => __('Background Image', 'themify'), 'class' => 'xlarge'), array('id' => 'background_color', 'type' => 'color', 'label' => __('Background Color', 'themify'), 'class' => 'small'), array('id' => 'background_repeat', 'label' => __('Background Repeat', 'themify'), 'type' => 'select', 'default' => '', 'meta' => array(array('value' => 'repeat', 'name' => __('Repeat All', 'themify')), array('value' => 'repeat-x', 'name' => __('Repeat Horizontally', 'themify')), array('value' => 'repeat-y', 'name' => __('Repeat Vertically', 'themify')), array('value' => 'repeat-none', 'name' => __('Do not repeat', 'themify')), array('value' => 'fullcover', 'name' => __('Fullcover', 'themify')))), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_font', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Font', 'themify') . '</h4>')), array('id' => 'font_family', 'type' => 'font_select', 'label' => __('Font Family', 'themify'), 'class' => 'font-family-select'), array('id' => 'font_color', 'type' => 'color', 'label' => __('Font Color', 'themify'), 'class' => 'small'), array('id' => 'multi_font_size', 'type' => 'multi', 'label' => __('Font Size', 'themify'), 'fields' => array(array('id' => 'font_size', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'font_size_unit', 'type' => 'select', 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'px', 'name' => __('px', 'themify')), array('value' => 'em', 'name' => __('em', 'themify')))))), array('id' => 'multi_line_height', 'type' => 'multi', 'label' => __('Line Height', 'themify'), 'fields' => array(array('id' => 'line_height', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'line_height_unit', 'type' => 'select', 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'px', 'name' => __('px', 'themify')), array('value' => 'em', 'name' => __('em', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'text_align', 'label' => __('Text Align', 'themify'), 'type' => 'radio', 'meta' => array(array('value' => '', 'name' => __('Default', 'themify'), 'selected' => true), array('value' => 'left', 'name' => __('Left', 'themify')), array('value' => 'center', 'name' => __('Center', 'themify')), array('value' => 'right', 'name' => __('Right', 'themify')), array('value' => 'justify', 'name' => __('Justify', 'themify')))), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_link', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Link', 'themify') . '</h4>')), array('id' => 'link_color', 'type' => 'color', 'label' => __('Color', 'themify'), 'class' => 'small'), array('id' => 'text_decoration', 'type' => 'select', 'label' => __('Text Decoration', 'themify'), 'meta' => array(array('value' => '', 'name' => '', 'selected' => true), array('value' => 'underline', 'name' => __('Underline', 'themify')), array('value' => 'overline', 'name' => __('Overline', 'themify')), array('value' => 'line-through', 'name' => __('Line through', 'themify')), array('value' => 'none', 'name' => __('None', 'themify')))), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_padding', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Padding', 'themify') . '</h4>')), array('id' => 'multi_padding_top', 'type' => 'multi', 'label' => __('Padding', 'themify'), 'fields' => array(array('id' => 'padding_top', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'padding_top_unit', 'type' => 'select', 'description' => __('top', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_padding_right', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'padding_right', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'padding_right_unit', 'type' => 'select', 'description' => __('right', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_padding_bottom', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'padding_bottom', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'padding_bottom_unit', 'type' => 'select', 'description' => __('bottom', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_padding_left', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'padding_left', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'padding_left_unit', 'type' => 'select', 'description' => __('left', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_margin', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Margin', 'themify') . '</h4>')), array('id' => 'multi_margin_top', 'type' => 'multi', 'label' => __('Margin', 'themify'), 'fields' => array(array('id' => 'margin_top', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'margin_top_unit', 'type' => 'select', 'description' => __('top', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_margin_right', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'margin_right', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'margin_right_unit', 'type' => 'select', 'description' => __('right', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_margin_bottom', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'margin_bottom', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'margin_bottom_unit', 'type' => 'select', 'description' => __('bottom', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_margin_left', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'margin_left', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'margin_left_unit', 'type' => 'select', 'description' => __('left', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_border', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Border', 'themify') . '</h4>')), array('id' => 'multi_border_top', 'type' => 'multi', 'label' => __('Border', 'themify'), 'fields' => array(array('id' => 'border_top_color', 'type' => 'color', 'class' => 'small'), array('id' => 'border_top_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall'), array('id' => 'border_top_style', 'type' => 'select', 'description' => __('top', 'themify'), 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'solid', 'name' => __('Solid', 'themify')), array('value' => 'dashed', 'name' => __('Dashed', 'themify')), array('value' => 'dotted', 'name' => __('Dotted', 'themify')), array('value' => 'double', 'name' => __('Double', 'themify')))))), array('id' => 'multi_border_right', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'border_right_color', 'type' => 'color', 'class' => 'small'), array('id' => 'border_right_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall'), array('id' => 'border_right_style', 'type' => 'select', 'description' => __('right', 'themify'), 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'solid', 'name' => __('Solid', 'themify')), array('value' => 'dashed', 'name' => __('Dashed', 'themify')), array('value' => 'dotted', 'name' => __('Dotted', 'themify')), array('value' => 'double', 'name' => __('Double', 'themify')))))), array('id' => 'multi_border_bottom', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'border_bottom_color', 'type' => 'color', 'class' => 'small'), array('id' => 'border_bottom_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall'), array('id' => 'border_bottom_style', 'type' => 'select', 'description' => __('bottom', 'themify'), 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'solid', 'name' => __('Solid', 'themify')), array('value' => 'dashed', 'name' => __('Dashed', 'themify')), array('value' => 'dotted', 'name' => __('Dotted', 'themify')), array('value' => 'double', 'name' => __('Double', 'themify')))))), array('id' => 'multi_border_left', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'border_left_color', 'type' => 'color', 'class' => 'small'), array('id' => 'border_left_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall'), array('id' => 'border_left_style', 'type' => 'select', 'description' => __('left', 'themify'), 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'solid', 'name' => __('Solid', 'themify')), array('value' => 'dashed', 'name' => __('Dashed', 'themify')), array('value' => 'dotted', 'name' => __('Dotted', 'themify')), array('value' => 'double', 'name' => __('Double', 'themify')))))), array('type' => 'separator', 'meta' => array('html' => '<hr/>')), array('id' => 'add_css_box', 'type' => 'text', 'label' => __('Additional CSS Class', 'themify'), 'description' => sprintf('<br/><small>%s</small>', __('Add additional CSS class(es) for custom styling', 'themify')), 'class' => 'large exclude-from-reset-field')), 'styling_selector' => array('.module-box' => array('font_family', 'font_size', 'line_height', 'text_align', 'margin'), '.module-box .module-box-content' => array('background_image', 'background_color', 'color', 'padding', 'border_top', 'border_right', 'border_bottom', 'border_left'), '.module-box a' => array('link_color', 'text_decoration')))));
            if ($position = get_post_meta($post->ID, '_testimonial_position', true)) {
                $out .= '<em class="testimonial-title">' . $position;
            }
            if ($link = get_post_meta($post->ID, '_testimonial_link', true)) {
                if ($position) {
                    $out .= ', ';
                } else {
                    $out .= '<em class="testimonial-title">';
                }
                $out .= '<a href="' . esc_url($link) . '">';
            }
            if ($company = get_post_meta($post->ID, '_testimonial_company', true)) {
                $out .= $company;
            } else {
                $out .= $link;
            }
            if ($link) {
                $out .= '</a>';
            }
            $out .= '</em>';
            return $out;
        }
        return '';
    }
}
///////////////////////////////////////
// Module Options
///////////////////////////////////////
if ($this->is_cpt_active('testimonial')) {
    Themify_Builder_Model::register_module('TB_Testimonial_Module');
}
Exemple #8
0
{
    function __construct()
    {
        parent::__construct(array('name' => __('Image', 'themify'), 'slug' => 'image'));
    }
    public function get_title($module)
    {
        return isset($module['mod_settings']['title_image']) ? esc_html($module['mod_settings']['title_image']) : '';
    }
    public function get_options()
    {
        $image_sizes = themify_get_image_sizes_list(false);
        $options = array(array('id' => 'mod_title_image', 'type' => 'text', 'label' => __('Module Title', 'themify'), 'class' => 'large'), array('id' => 'style_image', 'type' => 'layout', 'label' => __('Image Style', 'themify'), 'options' => array(array('img' => 'image-top.png', 'value' => 'image-top', 'label' => __('Image Top', 'themify')), array('img' => 'image-left.png', 'value' => 'image-left', 'label' => __('Image Left', 'themify')), array('img' => 'image-right.png', 'value' => 'image-right', 'label' => __('Image Right', 'themify')), array('img' => 'image-overlay.png', 'value' => 'image-overlay', 'label' => __('Image Overlay', 'themify')), array('img' => 'image-center.png', 'value' => 'image-center', 'label' => __('Centered Image', 'themify')))), array('id' => 'url_image', 'type' => 'image', 'label' => __('Image URL', 'themify'), 'class' => 'xlarge'), array('id' => 'appearance_image', 'type' => 'checkbox', 'label' => __('Image Appearance', 'themify'), 'options' => array(array('name' => 'rounded', 'value' => __('Rounded', 'themify')), array('name' => 'drop-shadow', 'value' => __('Drop Shadow', 'themify')), array('name' => 'bordered', 'value' => __('Bordered', 'themify')), array('name' => 'circle', 'value' => __('Circle', 'themify'), 'help' => __('(square format image only)', 'themify')))), array('id' => 'image_size_image', 'type' => 'select', 'label' => Themify_Builder_Model::is_img_php_disabled() ? __('Image Size', 'themify') : false, 'empty' => array('val' => '', 'label' => ''), 'hide' => Themify_Builder_Model::is_img_php_disabled() ? false : true, 'options' => $image_sizes), array('id' => 'width_image', 'type' => 'text', 'label' => __('Width', 'themify'), 'class' => 'xsmall', 'help' => 'px', 'value' => ''), array('id' => 'auto_fullwidth', 'type' => 'checkbox', 'pushed' => 'pushed', 'options' => array(array('name' => '1', 'value' => __('Auto fullwidth image', 'themify')))), array('id' => 'height_image', 'type' => 'text', 'label' => __('Height', 'themify'), 'class' => 'xsmall', 'help' => 'px', 'value' => ''), array('id' => 'title_image', 'type' => 'text', 'label' => __('Image Title', 'themify'), 'class' => 'fullwidth'), array('id' => 'link_image', 'type' => 'text', 'label' => __('Image Link', 'themify'), 'class' => 'fullwidth'), array('id' => 'param_image', 'type' => 'checkbox', 'label' => false, 'pushed' => 'pushed', 'options' => array(array('name' => 'lightbox', 'value' => __('Open link in lightbox', 'themify')), array('name' => 'zoom', 'value' => __('Show zoom icon', 'themify')), array('name' => 'newtab', 'value' => __('Open link in new tab', 'themify'))), 'new_line' => false), array('id' => 'alt_image', 'type' => 'text', 'label' => __('Image Alt', 'themify'), 'class' => 'fullwidth'), array('id' => 'caption_image', 'type' => 'textarea', 'label' => __('Image Caption', 'themify'), 'class' => 'fullwidth'));
        return $options;
    }
    public function get_animation()
    {
        $animation = array(array('id' => 'multi_Animation Effect', 'type' => 'multi', 'label' => __('Effect', 'themify'), 'fields' => array(array('id' => 'animation_effect', 'type' => 'animation_select', 'label' => __('Effect', 'themify')), array('id' => 'animation_effect_delay', 'type' => 'text', 'label' => __('Delay', 'themify'), 'class' => 'xsmall', 'description' => __('Delay (s)', 'themify')), array('id' => 'animation_effect_repeat', 'type' => 'text', 'label' => __('Repeat', 'themify'), 'class' => 'xsmall', 'description' => __('Repeat (x)', 'themify')))));
        return $animation;
    }
    public function get_styling()
    {
        $styling = array(array('id' => 'separator_image_background', 'title' => '', 'description' => '', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Background', 'themify') . '</h4>')), array('id' => 'background_color', 'type' => 'color', 'label' => __('Background Color', 'themify'), 'class' => 'small', 'prop' => 'background-color', 'selector' => '.module-image'), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_font', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Font', 'themify') . '</h4>')), array('id' => 'font_family', 'type' => 'font_select', 'label' => __('Font Family', 'themify'), 'class' => 'font-family-select', 'prop' => 'font-family', 'selector' => array('.module-image .image-content', '.module-image .image-title', '.module-image .image-title a')), array('id' => 'font_color', 'type' => 'color', 'label' => __('Font Color', 'themify'), 'class' => 'small', 'prop' => 'color', 'selector' => array('.module-image .image-content', '.module-image .image-title', '.module-image .image-title a', '.module-image h1', '.module-image h2', '.module-image h3:not(.module-title)', '.module-image h4', '.module-image h5', '.module-image h6')), array('id' => 'multi_font_size', 'type' => 'multi', 'label' => __('Font Size', 'themify'), 'fields' => array(array('id' => 'font_size', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'font-size', 'selector' => '.module-image .image-content'), array('id' => 'font_size_unit', 'type' => 'select', 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'px', 'name' => __('px', 'themify')), array('value' => 'em', 'name' => __('em', 'themify')))))), array('id' => 'multi_line_height', 'type' => 'multi', 'label' => __('Line Height', 'themify'), 'fields' => array(array('id' => 'line_height', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'line-height', 'selector' => '.module-image .image-content'), array('id' => 'line_height_unit', 'type' => 'select', 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'px', 'name' => __('px', 'themify')), array('value' => 'em', 'name' => __('em', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'text_align', 'label' => __('Text Align', 'themify'), 'type' => 'radio', 'meta' => array(array('value' => '', 'name' => __('Default', 'themify'), 'selected' => true), array('value' => 'left', 'name' => __('Left', 'themify')), array('value' => 'center', 'name' => __('Center', 'themify')), array('value' => 'right', 'name' => __('Right', 'themify')), array('value' => 'justify', 'name' => __('Justify', 'themify'))), 'prop' => 'text-align', 'selector' => '.module-image .image-content'), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_link', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Link', 'themify') . '</h4>')), array('id' => 'link_color', 'type' => 'color', 'label' => __('Color', 'themify'), 'class' => 'small', 'prop' => 'color', 'selector' => '.module-image a'), array('id' => 'text_decoration', 'type' => 'select', 'label' => __('Text Decoration', 'themify'), 'meta' => array(array('value' => '', 'name' => '', 'selected' => true), array('value' => 'underline', 'name' => __('Underline', 'themify')), array('value' => 'overline', 'name' => __('Overline', 'themify')), array('value' => 'line-through', 'name' => __('Line through', 'themify')), array('value' => 'none', 'name' => __('None', 'themify'))), 'prop' => 'text-decoration', 'selector' => '.module-image a'), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_padding', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Padding', 'themify') . '</h4>')), array('id' => 'multi_padding_top', 'type' => 'multi', 'label' => __('Padding', 'themify'), 'fields' => array(array('id' => 'padding_top', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'padding-top', 'selector' => '.module-image'), array('id' => 'padding_top_unit', 'type' => 'select', 'description' => __('top', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_padding_right', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'padding_right', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'padding-right', 'selector' => '.module-image'), array('id' => 'padding_right_unit', 'type' => 'select', 'description' => __('right', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_padding_bottom', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'padding_bottom', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'padding-bottom', 'selector' => '.module-image'), array('id' => 'padding_bottom_unit', 'type' => 'select', 'description' => __('bottom', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_padding_left', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'padding_left', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'padding-left', 'selector' => '.module-image'), array('id' => 'padding_left_unit', 'type' => 'select', 'description' => __('left', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_margin', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Margin', 'themify') . '</h4>')), array('id' => 'multi_margin_top', 'type' => 'multi', 'label' => __('Margin', 'themify'), 'fields' => array(array('id' => 'margin_top', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'margin-top', 'selector' => '.module-image'), array('id' => 'margin_top_unit', 'type' => 'select', 'description' => __('top', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_margin_right', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'margin_right', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'margin-right', 'selector' => '.module-image'), array('id' => 'margin_right_unit', 'type' => 'select', 'description' => __('right', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_margin_bottom', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'margin_bottom', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'margin-bottom', 'selector' => '.module-image'), array('id' => 'margin_bottom_unit', 'type' => 'select', 'description' => __('bottom', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_margin_left', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'margin_left', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'margin-left', 'selector' => '.module-image'), array('id' => 'margin_left_unit', 'type' => 'select', 'description' => __('left', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_border', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Border', 'themify') . '</h4>')), array('id' => 'multi_border_top', 'type' => 'multi', 'label' => __('Border', 'themify'), 'fields' => array(array('id' => 'border_top_color', 'type' => 'color', 'class' => 'small', 'prop' => 'border-top-color', 'selector' => '.module-image'), array('id' => 'border_top_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall', 'prop' => 'border-top-width', 'selector' => '.module-image'), array('id' => 'border_top_style', 'type' => 'select', 'description' => __('top', 'themify'), 'meta' => Themify_Builder_model::get_border_styles(), 'prop' => 'border-top-style', 'selector' => '.module-image'))), array('id' => 'multi_border_right', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'border_right_color', 'type' => 'color', 'class' => 'small', 'prop' => 'border-right-color', 'selector' => '.module-image'), array('id' => 'border_right_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall', 'prop' => 'border-right-width', 'selector' => '.module-image'), array('id' => 'border_right_style', 'type' => 'select', 'description' => __('right', 'themify'), 'meta' => Themify_Builder_model::get_border_styles(), 'prop' => 'border-right-style', 'selector' => '.module-image'))), array('id' => 'multi_border_bottom', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'border_bottom_color', 'type' => 'color', 'class' => 'small', 'prop' => 'border-bottom-color', 'selector' => '.module-image'), array('id' => 'border_bottom_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall', 'prop' => 'border-bottom-width', 'selector' => '.module-image'), array('id' => 'border_bottom_style', 'type' => 'select', 'description' => __('bottom', 'themify'), 'meta' => Themify_Builder_model::get_border_styles(), 'prop' => 'border-bottom-style', 'selector' => '.module-image'))), array('id' => 'multi_border_left', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'border_left_color', 'type' => 'color', 'class' => 'small', 'prop' => 'border-left-color', 'selector' => '.module-image'), array('id' => 'border_left_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall', 'prop' => 'border-left-width', 'selector' => '.module-image'), array('id' => 'border_left_style', 'type' => 'select', 'description' => __('left', 'themify'), 'meta' => Themify_Builder_model::get_border_styles(), 'prop' => 'border-left-style', 'selector' => '.module-image'))), array('type' => 'separator', 'meta' => array('html' => '<hr/>')), array('id' => 'css_image', 'type' => 'text', 'label' => __('Additional CSS Class', 'themify'), 'class' => 'large exclude-from-reset-field', 'description' => sprintf('<br/><small>%s</small>', __('Add additional CSS class(es) for custom styling', 'themify'))));
        return $styling;
    }
}
///////////////////////////////////////
// Module Options
///////////////////////////////////////
Themify_Builder_Model::register_module('TB_Image_Module');
<?php

if (!defined('ABSPATH')) {
    exit;
}
// Exit if accessed directly
/**
 * Module Name: Divider
 * Description: Display Divider
 */
class TB_Divider_Module extends Themify_Builder_Module
{
    function __construct()
    {
        parent::__construct(array('name' => __('Divider', 'themify'), 'slug' => 'divider'));
    }
}
///////////////////////////////////////
// Module Options
///////////////////////////////////////
Themify_Builder_Model::register_module('TB_Divider_Module', apply_filters('themify_builder_module_divider', array('options' => array(array('id' => 'mod_title_divider', 'type' => 'text', 'label' => __('Module Title', 'themify'), 'class' => 'large'), array('id' => 'style_divider', 'type' => 'layout', 'label' => __('Divider Style', 'themify'), 'options' => array(array('img' => 'solid.png', 'value' => 'solid', 'label' => __('Solid', 'themify')), array('img' => 'dotted.png', 'value' => 'dotted', 'label' => __('Dotted', 'themify')), array('img' => 'dashed.png', 'value' => 'dashed', 'label' => __('Dashed', 'themify')), array('img' => 'double.png', 'value' => 'double', 'label' => __('Double', 'themify')))), array('id' => 'stroke_w_divider', 'type' => 'text', 'label' => __('Stroke Thickness', 'themify'), 'class' => 'xsmall', 'help' => 'px'), array('id' => 'color_divider', 'type' => 'text', 'label' => __('Divider Color', 'themify'), 'class' => 'small', 'colorpicker' => true), array('id' => 'top_margin_divider', 'type' => 'text', 'label' => __('Top Margin', 'themify'), 'class' => 'xsmall', 'help' => 'px'), array('id' => 'bottom_margin_divider', 'type' => 'text', 'label' => __('Bottom Margin', 'themify'), 'class' => 'xsmall', 'help' => 'px')), 'styling' => array(array('id' => 'css_divider', 'type' => 'text', 'label' => __('Additional CSS Class', 'themify'), 'class' => 'large exclude-from-reset-field', 'description' => sprintf('<br/><small>%s</small>', __('Add additional CSS class(es) for custom styling', 'themify')))))));
        add_action('themify_builder_lightbox_fields', array($this, 'add_fields'), 10, 2);
    }
    function add_fields($field, $mod_name)
    {
        if ($mod_name != 'layout-part') {
            return;
        }
        global $Themify_Builder_Layouts;
        $output = '';
        switch ($field['type']) {
            case 'layout_part_select':
                $output .= '<select name="' . $field['id'] . '" id="' . $field['id'] . '" class="tfb_lb_option">';
                $output .= '<option></option>';
                $args = array('post_type' => $Themify_Builder_Layouts->layout_part->post_type_name, 'posts_per_page' => -1);
                $posts = get_posts($args);
                foreach ($posts as $part) {
                    $output .= '<option value="' . $part->post_name . '">' . $part->post_title . '</option>';
                }
                $output .= '</select><br/>';
                $output .= sprintf(__('<a href="%s" target="_blank" class="add_new"><span class="themify_builder_icon add"></span> New Layout Part</a>', 'themify'), admin_url('post-new.php?post_type=' . $Themify_Builder_Layouts->layout_part->post_type_name));
                $output .= sprintf(__('<a href="%s" target="_blank" class="add_new"><span class="themify_builder_icon ti-folder"></span> Manage Layout Part</a>', 'themify'), admin_url('edit.php?post_type=' . $Themify_Builder_Layouts->layout_part->post_type_name));
                break;
        }
        echo $output;
    }
}
///////////////////////////////////////
// Module Options
///////////////////////////////////////
Themify_Builder_Model::register_module('TB_Layout_Part_Module', apply_filters('themify_builder_module_layout_part', array('options' => array(array('id' => 'mod_title_layout_part', 'type' => 'text', 'label' => __('Module Title', 'themify'), 'class' => 'large'), array('id' => 'selected_layout_part', 'type' => 'layout_part_select', 'label' => __('Select Layout Part', 'themify'), 'class' => '')), 'styling' => array(array('id' => 'add_css_layout_part', 'type' => 'text', 'label' => __('Additional CSS Class', 'themify'), 'description' => sprintf('<br/><small>%s</small>', __('Add additional CSS class(es) for custom styling', 'themify')), 'class' => 'large exclude-from-reset-field')))));
    {
        $image_sizes = themify_get_image_sizes_list(false);
        $options = array(array('id' => 'mod_title_portfolio', 'type' => 'text', 'label' => __('Module Title', 'themify'), 'class' => 'large'), array('id' => 'layout_portfolio', 'type' => 'layout', 'label' => __('Portfolio Layout', 'themify'), 'options' => array(array('img' => 'grid4.png', 'value' => 'grid4', 'label' => __('Grid 4', 'themify')), array('img' => 'grid3.png', 'value' => 'grid3', 'label' => __('Grid 3', 'themify')), array('img' => 'grid2.png', 'value' => 'grid2', 'label' => __('Grid 2', 'themify')), array('img' => 'fullwidth.png', 'value' => 'fullwidth', 'label' => __('fullwidth', 'themify')))), array('id' => 'type_query_portfolio', 'type' => 'radio', 'label' => __('Query by', 'themify'), 'options' => array('category' => __('Category', 'themify'), 'post_slug' => __('Slug', 'themify')), 'default' => 'category', 'option_js' => true), array('id' => 'category_portfolio', 'type' => 'query_category', 'label' => __('Category', 'themify'), 'options' => array('taxonomy' => 'portfolio-category'), 'help' => sprintf(__('Add more <a href="%s" target="_blank">portfolio posts</a>', 'themify'), admin_url('post-new.php?post_type=portfolio')), 'wrap_with_class' => 'tf-group-element tf-group-element-category'), array('id' => 'query_slug_portfolio', 'type' => 'text', 'label' => __('Portfolio Slugs', 'themify'), 'class' => 'large', 'wrap_with_class' => 'tf-group-element tf-group-element-post_slug', 'help' => '<br/>' . __('Insert Portfolio slug. Multiple slug should be separated by comma (,)', 'themify')), array('id' => 'post_per_page_portfolio', 'type' => 'text', 'label' => __('Limit', 'themify'), 'class' => 'xsmall', 'help' => __('number of posts to show', 'themify')), array('id' => 'offset_portfolio', 'type' => 'text', 'label' => __('Offset', 'themify'), 'class' => 'xsmall', 'help' => __('number of post to displace or pass over', 'themify')), array('id' => 'order_portfolio', 'type' => 'select', 'label' => __('Order', 'themify'), 'help' => __('Descending = show newer posts first', 'themify'), 'options' => array('desc' => __('Descending', 'themify'), 'asc' => __('Ascending', 'themify'))), array('id' => 'orderby_portfolio', 'type' => 'select', 'label' => __('Order By', 'themify'), 'options' => array('date' => __('Date', 'themify'), 'id' => __('Id', 'themify'), 'author' => __('Author', 'themify'), 'title' => __('Title', 'themify'), 'name' => __('Name', 'themify'), 'modified' => __('Modified', 'themify'), 'rand' => __('Rand', 'themify'), 'comment_count' => __('Comment Count', 'themify'))), array('id' => 'display_portfolio', 'type' => 'select', 'label' => __('Display', 'themify'), 'options' => array('content' => __('Content', 'themify'), 'excerpt' => __('Excerpt', 'themify'), 'none' => __('None', 'themify'))), array('id' => 'hide_feat_img_portfolio', 'type' => 'select', 'label' => __('Hide Featured Image', 'themify'), 'empty' => array('val' => '', 'label' => ''), 'options' => array('yes' => __('Yes', 'themify'), 'no' => __('No', 'themify'))), array('id' => 'image_size_portfolio', 'type' => 'select', 'label' => Themify_Builder_Model::is_img_php_disabled() ? __('Image Size', 'themify') : false, 'empty' => array('val' => '', 'label' => ''), 'hide' => Themify_Builder_Model::is_img_php_disabled() ? false : true, 'options' => $image_sizes), array('id' => 'img_width_portfolio', 'type' => 'text', 'label' => __('Image Width', 'themify'), 'class' => 'xsmall'), array('id' => 'img_height_portfolio', 'type' => 'text', 'label' => __('Image Height', 'themify'), 'class' => 'xsmall'), array('id' => 'unlink_feat_img_portfolio', 'type' => 'select', 'label' => __('Unlink Featured Image', 'themify'), 'empty' => array('val' => '', 'label' => ''), 'options' => array('yes' => __('Yes', 'themify'), 'no' => __('No', 'themify'))), array('id' => 'hide_post_title_portfolio', 'type' => 'select', 'label' => __('Hide Post Title', 'themify'), 'empty' => array('val' => '', 'label' => ''), 'options' => array('yes' => __('Yes', 'themify'), 'no' => __('No', 'themify'))), array('id' => 'unlink_post_title_portfolio', 'type' => 'select', 'label' => __('Unlink Post Title', 'themify'), 'empty' => array('val' => '', 'label' => ''), 'options' => array('yes' => __('Yes', 'themify'), 'no' => __('No', 'themify'))), array('id' => 'hide_post_date_portfolio', 'type' => 'select', 'label' => __('Hide Post Date', 'themify'), 'empty' => array('val' => '', 'label' => ''), 'options' => array('yes' => __('Yes', 'themify'), 'no' => __('No', 'themify'))), array('id' => 'hide_post_meta_portfolio', 'type' => 'select', 'label' => __('Hide Post Meta', 'themify'), 'empty' => array('val' => '', 'label' => ''), 'options' => array('yes' => __('Yes', 'themify'), 'no' => __('No', 'themify'))), array('id' => 'hide_page_nav_portfolio', 'type' => 'select', 'label' => __('Hide Page Navigation', 'themify'), 'options' => array('yes' => __('Yes', 'themify'), 'no' => __('No', 'themify'))));
        return $options;
    }
    public function get_styling()
    {
        $styling = array(array('id' => 'separator_animation', 'title' => '', 'description' => '', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Animation', 'themify') . '</h4>')), array('id' => 'animation_effect', 'type' => 'animation_select', 'label' => __('Effect', 'themify')), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_image_background', 'title' => '', 'description' => '', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Background', 'themify') . '</h4>')), array('id' => 'background_color', 'type' => 'color', 'label' => __('Background Color', 'themify'), 'class' => 'small', 'prop' => 'background-color', 'selector' => array('.module-portfolio .post')), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_font', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Font', 'themify') . '</h4>')), array('id' => 'font_family', 'type' => 'font_select', 'label' => __('Font Family', 'themify'), 'class' => 'font-family-select', 'prop' => 'font-family', 'selector' => array('.module-portfolio .post-title', '.module-portfolio .post-title a')), array('id' => 'font_color', 'type' => 'color', 'label' => __('Font Color', 'themify'), 'class' => 'small', 'prop' => 'color', 'selector' => array('.module-portfolio .post', '.module-portfolio h1', '.module-portfolio h2', '.module-portfolio h3:not(.module-title)', '.module-portfolio h4', '.module-portfolio h5', '.module-portfolio h6', '.module-portfolio .post-title', '.module-portfolio .post-title a')), array('id' => 'multi_font_size', 'type' => 'multi', 'label' => __('Font Size', 'themify'), 'fields' => array(array('id' => 'font_size', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'font_size_unit', 'type' => 'select', 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'px', 'name' => __('px', 'themify')), array('value' => 'em', 'name' => __('em', 'themify')))))), array('id' => 'multi_line_height', 'type' => 'multi', 'label' => __('Line Height', 'themify'), 'fields' => array(array('id' => 'line_height', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'line_height_unit', 'type' => 'select', 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'px', 'name' => __('px', 'themify')), array('value' => 'em', 'name' => __('em', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'text_align', 'label' => __('Text Align', 'themify'), 'type' => 'radio', 'meta' => array(array('value' => '', 'name' => __('Default', 'themify'), 'selected' => true), array('value' => 'left', 'name' => __('Left', 'themify')), array('value' => 'center', 'name' => __('Center', 'themify')), array('value' => 'right', 'name' => __('Right', 'themify')), array('value' => 'justify', 'name' => __('Justify', 'themify'))), 'prop' => 'text-align', 'selector' => '.module-portfolio .post'), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_link', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Link', 'themify') . '</h4>')), array('id' => 'link_color', 'type' => 'color', 'label' => __('Color', 'themify'), 'class' => 'small', 'prop' => 'color', 'selector' => '.module-portfolio a'), array('id' => 'text_decoration', 'type' => 'select', 'label' => __('Text Decoration', 'themify'), 'meta' => array(array('value' => '', 'name' => '', 'selected' => true), array('value' => 'underline', 'name' => __('Underline', 'themify')), array('value' => 'overline', 'name' => __('Overline', 'themify')), array('value' => 'line-through', 'name' => __('Line through', 'themify')), array('value' => 'none', 'name' => __('None', 'themify'))), 'prop' => 'text-decoration', 'selector' => '.module-portfolio a'), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_padding', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Padding', 'themify') . '</h4>')), array('id' => 'multi_padding_top', 'type' => 'multi', 'label' => __('Padding', 'themify'), 'fields' => array(array('id' => 'padding_top', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'padding-top', 'selector' => '.module-portfolio .post'), array('id' => 'padding_top_unit', 'type' => 'select', 'description' => __('top', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_padding_right', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'padding_right', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'padding-right', 'selector' => '.module-portfolio .post'), array('id' => 'padding_right_unit', 'type' => 'select', 'description' => __('right', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_padding_bottom', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'padding_bottom', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'padding-bottom', 'selector' => '.module-portfolio .post'), array('id' => 'padding_bottom_unit', 'type' => 'select', 'description' => __('bottom', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_padding_left', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'padding_left', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'padding-left', 'selector' => '.module-portfolio .post'), array('id' => 'padding_left_unit', 'type' => 'select', 'description' => __('left', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_margin', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Margin', 'themify') . '</h4>')), array('id' => 'multi_margin_top', 'type' => 'multi', 'label' => __('Margin', 'themify'), 'fields' => array(array('id' => 'margin_top', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'margin-top', 'selector' => '.module-portfolio .post'), array('id' => 'margin_top_unit', 'type' => 'select', 'description' => __('top', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_margin_right', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'margin_right', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'margin-right', 'selector' => '.module-portfolio .post'), array('id' => 'margin_right_unit', 'type' => 'select', 'description' => __('right', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_margin_bottom', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'margin_bottom', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'margin-bottom', 'selector' => '.module-portfolio .post'), array('id' => 'margin_bottom_unit', 'type' => 'select', 'description' => __('bottom', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_margin_left', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'margin_left', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'margin-left', 'selector' => '.module-portfolio .post'), array('id' => 'margin_left_unit', 'type' => 'select', 'description' => __('left', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_border', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Border', 'themify') . '</h4>')), array('id' => 'multi_border_top', 'type' => 'multi', 'label' => __('Border', 'themify'), 'fields' => array(array('id' => 'border_top_color', 'type' => 'color', 'class' => 'small', 'prop' => 'border-top-color', 'selector' => '.module-portfolio .post'), array('id' => 'border_top_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall', 'prop' => 'border-top-width', 'selector' => '.module-portfolio .post'), array('id' => 'border_top_style', 'type' => 'select', 'description' => __('top', 'themify'), 'meta' => Themify_Builder_model::get_border_styles(), 'prop' => 'border-top-style', 'selector' => '.module-portfolio .post'))), array('id' => 'multi_border_right', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'border_right_color', 'type' => 'color', 'class' => 'small', 'prop' => 'border-right-color', 'selector' => '.module-portfolio .post'), array('id' => 'border_right_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall', 'prop' => 'border-right-width', 'selector' => '.module-portfolio .post'), array('id' => 'border_right_style', 'type' => 'select', 'description' => __('right', 'themify'), 'meta' => Themify_Builder_model::get_border_styles(), 'prop' => 'border-right-style', 'selector' => '.module-portfolio .post'))), array('id' => 'multi_border_bottom', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'border_bottom_color', 'type' => 'color', 'class' => 'small', 'prop' => 'border-bottom-color', 'selector' => '.module-portfolio .post'), array('id' => 'border_bottom_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall', 'prop' => 'border-bottom-width', 'selector' => '.module-portfolio .post'), array('id' => 'border_bottom_style', 'type' => 'select', 'description' => __('bottom', 'themify'), 'meta' => Themify_Builder_model::get_border_styles(), 'prop' => 'border-bottom-style', 'selector' => '.module-portfolio .post'))), array('id' => 'multi_border_left', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'border_left_color', 'type' => 'color', 'class' => 'small', 'prop' => 'border-left-color', 'selector' => '.module-portfolio .post'), array('id' => 'border_left_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall', 'prop' => 'border-left-width', 'selector' => '.module-portfolio .post'), array('id' => 'border_left_style', 'type' => 'select', 'description' => __('left', 'themify'), 'meta' => Themify_Builder_model::get_border_styles(), 'prop' => 'border-left-style', 'selector' => '.module-portfolio .post'))), array('type' => 'separator', 'meta' => array('html' => '<hr/>')), array('id' => 'css_portfolio', 'type' => 'text', 'label' => __('Additional CSS Class', 'themify'), 'class' => 'large exclude-from-reset-field', 'description' => sprintf('<br/><small>%s</small>', __('Add additional CSS class(es) for custom styling', 'themify'))));
        return $styling;
    }
    function set_metabox()
    {
        /** Portfolio Meta Box Options */
        $meta_box = array(Themify_Builder_Model::$post_image, Themify_Builder_Model::$featured_image_size, Themify_Builder_Model::$image_width, Themify_Builder_Model::$image_height, array("name" => "hide_post_title", "title" => __('Hide Post Title', 'themify'), "description" => "", "type" => "dropdown", "meta" => array(array("value" => "default", "name" => "", "selected" => true), array("value" => "yes", 'name' => __('Yes', 'themify')), array("value" => "no", 'name' => __('No', 'themify')))), array("name" => "unlink_post_title", "title" => __('Unlink Post Title', 'themify'), "description" => __('Unlink post title (it will display the post title without link)', 'themify'), "type" => "dropdown", "meta" => array(array("value" => "default", "name" => "", "selected" => true), array("value" => "yes", 'name' => __('Yes', 'themify')), array("value" => "no", 'name' => __('No', 'themify')))), array("name" => "hide_post_date", "title" => __('Hide Post Date', 'themify'), "description" => "", "type" => "dropdown", "meta" => array(array("value" => "default", "name" => "", "selected" => true), array("value" => "yes", 'name' => __('Yes', 'themify')), array("value" => "no", 'name' => __('No', 'themify')))), array("name" => "hide_post_meta", "title" => __('Hide Post Meta', 'themify'), "description" => "", "type" => "dropdown", "meta" => array(array("value" => "default", "name" => "", "selected" => true), array("value" => "yes", 'name' => __('Yes', 'themify')), array("value" => "no", 'name' => __('No', 'themify')))), array("name" => "hide_post_image", "title" => __('Hide Featured Image', 'themify'), "description" => "", "type" => "dropdown", "meta" => array(array("value" => "default", "name" => "", "selected" => true), array("value" => "yes", 'name' => __('Yes', 'themify')), array("value" => "no", 'name' => __('No', 'themify')))), array("name" => "unlink_post_image", "title" => __('Unlink Featured Image', 'themify'), "description" => __('Display the Featured Image without link)', 'themify'), "type" => "dropdown", "meta" => array(array("value" => "default", "name" => "", "selected" => true), array("value" => "yes", 'name' => __('Yes', 'themify')), array("value" => "no", 'name' => __('No', 'themify')))), Themify_Builder_Model::$external_link, Themify_Builder_Model::$lightbox_link);
        return $meta_box;
    }
    function do_shortcode($atts)
    {
        global $ThemifyBuilder;
        extract(shortcode_atts(array('id' => '', 'title' => 'yes', 'unlink_title' => 'no', 'image' => 'yes', 'image_w' => '', 'image_h' => '', 'display' => 'none', 'post_meta' => 'yes', 'post_date' => 'yes', 'more_link' => false, 'more_text' => __('More &rarr;', 'themify'), 'limit' => 4, 'category' => 0, 'order' => 'DESC', 'orderby' => 'date', 'style' => '', 'sorting' => 'no', 'page_nav' => 'no', 'paged' => '0', 'autoplay' => '', 'effect' => '', 'timeout' => '', 'speed' => ''), $atts));
        $sync = array('mod_title_portfolio' => '', 'layout_portfolio' => $style, 'category_portfolio' => $category, 'post_per_page_portfolio' => $limit, 'offset_portfolio' => '', 'order_portfolio' => $order, 'orderby_portfolio' => $orderby, 'display_portfolio' => $display, 'hide_feat_img_portfolio' => $image == 'yes' ? 'no' : 'yes', 'image_size_portfolio' => '', 'img_width_portfolio' => $image_w, 'img_height_portfolio' => $image_h, 'unlink_feat_img_portfolio' => 'no', 'hide_post_title_portfolio' => $title == 'yes' ? 'no' : 'yes', 'unlink_post_title_portfolio' => $unlink_title, 'hide_post_date_portfolio' => $post_date == 'yes' ? 'no' : 'yes', 'hide_post_meta_portfolio' => $post_meta == 'yes' ? 'no' : 'yes', 'hide_page_nav_portfolio' => $page_nav == 'no' ? 'yes' : 'no', 'animation_effect' => '', 'css_portfolio' => '');
        $module = array('module_ID' => $this->slug . '-' . rand(0, 10000), 'mod_name' => $this->slug, 'mod_settings' => $sync);
        return $ThemifyBuilder->retrieve_template('template-' . $this->slug . '.php', $module, '', '', false);
    }
}
///////////////////////////////////////
// Module Options
///////////////////////////////////////
if ($this->is_cpt_active('portfolio')) {
    Themify_Builder_Model::register_module('TB_Portfolio_Module');
}
        ///////////////////////////////////////
        $this->meta_box = $this->set_metabox();
        $this->initialize_cpt(array('plural' => __('Slides', 'themify'), 'singular' => __('Slide', 'themify'), 'supports' => array('title', 'editor', 'author', 'custom-fields'), 'menu_icon' => 'dashicons-slides'));
        if (!shortcode_exists('themify_' . $this->slug . '_posts')) {
            add_shortcode('themify_' . $this->slug . '_posts', array($this, 'do_shortcode'));
        }
    }
    function set_metabox()
    {
        global $ThemifyBuilder;
        /** Slider Meta Box Options */
        $meta_box = array(Themify_Builder_Model::$post_image, Themify_Builder_Model::$featured_image_size, Themify_Builder_Model::$image_width, Themify_Builder_Model::$image_height, Themify_Builder_Model::$external_link, Themify_Builder_Model::$lightbox_link, array('name' => 'video_url', 'title' => __('Video URL', 'themify'), 'description' => __('URL to embed a video instead of featured image', 'themify'), 'type' => 'textbox', 'meta' => array()));
        return $meta_box;
    }
    function do_shortcode($atts)
    {
        global $ThemifyBuilder;
        extract(shortcode_atts(array('visible' => '1', 'scroll' => '1', 'auto' => 0, 'pause_hover' => 'no', 'wrap' => 'yes', 'excerpt_length' => '20', 'speed' => 'normal', 'slider_nav' => 'yes', 'pager' => 'yes', 'limit' => 5, 'category' => 0, 'image' => 'yes', 'image_w' => '240px', 'image_h' => '180px', 'more_text' => __('More...', 'themify'), 'title' => 'yes', 'display' => 'none', 'post_meta' => 'no', 'post_date' => 'no', 'width' => '', 'height' => '', 'class' => '', 'unlink_title' => 'no', 'unlink_image' => 'no', 'image_size' => 'thumbnail', 'post_type' => 'post', 'taxonomy' => 'category', 'order' => 'DESC', 'orderby' => 'date', 'effect' => 'scroll', 'style' => 'slider-default'), $atts));
        $sync = array('mod_title_slider' => '', 'layout_display_slider' => 'slider', 'slider_category_slider' => $category, 'posts_per_page_slider' => $limit, 'offset_slider' => '', 'order_slider' => $order, 'orderby_slider' => $orderby, 'display_slider' => $display, 'hide_post_title_slider' => $title == 'yes' ? 'no' : 'yes', 'unlink_post_title_slider' => $unlink_title, 'hide_feat_img_slider' => '', 'unlink_feat_img_slider' => $unlink_image, 'layout_slider' => $style, 'image_size_slider' => $image_size, 'img_w_slider' => $image_w, 'img_h_slider' => $image_h, 'visible_opt_slider' => $visible, 'auto_scroll_opt_slider' => $auto, 'scroll_opt_slider' => $scroll, 'speed_opt_slider' => $speed, 'effect_slider' => $effect, 'pause_on_hover_slider' => $pause_hover, 'wrap_slider' => $wrap, 'show_nav_slider' => $pager, 'show_arrow_slider' => $slider_nav, 'left_margin_slider' => '', 'right_margin_slider' => '', 'css_slider' => $class);
        $module = array('module_ID' => $this->slug . '-' . rand(0, 10000), 'mod_name' => $this->slug, 'settings' => $sync);
        return $ThemifyBuilder->retrieve_template('template-' . $this->slug . '-' . $this->slug . '.php', $module, '', '', false);
    }
}
///////////////////////////////////////
// Module Options
///////////////////////////////////////
$visible_opt = array(1 => 1, 2, 3, 4, 5, 6, 7);
$auto_scroll_opt = array('off' => __('Off', 'themify'), 1 => __('1 sec', 'themify'), 2 => __('2 sec', 'themify'), 3 => __('3 sec', 'themify'), 4 => __('4 sec', 'themify'), 5 => __('5 sec', 'themify'), 6 => __('6 sec', 'themify'), 7 => __('7 sec', 'themify'), 8 => __('8 sec', 'themify'), 9 => __('9 sec', 'themify'), 10 => __('10 sec', 'themify'));
$image_sizes = themify_get_image_sizes_list(false);
Themify_Builder_Model::register_module('TB_Slider_Module', apply_filters('themify_builder_module_slider', array('options' => array(array('id' => 'mod_title_slider', 'type' => 'text', 'label' => __('Module Title', 'themify'), 'class' => 'large'), array('id' => 'layout_display_slider', 'type' => 'radio', 'label' => __('Display', 'themify'), 'options' => array('blog' => __('Blog Posts', 'themify'), 'slider' => __('Slider Posts', 'themify'), 'portfolio' => __('Portfolio', 'themify'), 'testimonial' => __('Testimonial', 'themify'), 'image' => __('Images', 'themify'), 'video' => __('Videos', 'themify'), 'text' => __('Text', 'themify')), 'default' => 'blog', 'option_js' => true), array('id' => 'blog_category_slider', 'type' => 'query_category', 'label' => __('Category', 'themify'), 'options' => array(), 'help' => sprintf(__('Add more <a href="%s" target="_blank">blog posts</a>', 'themify'), admin_url('post-new.php')), 'wrap_with_class' => 'tf-group-element tf-group-element-blog'), array('id' => 'slider_category_slider', 'type' => 'query_category', 'label' => __('Category', 'themify'), 'options' => array('taxonomy' => 'slider-category'), 'help' => sprintf(__('Add more <a href="%s" target="_blank">slider posts</a>', 'themify'), admin_url('post-new.php?post_type=slider')), 'wrap_with_class' => 'tf-group-element tf-group-element-slider'), array('id' => 'portfolio_category_slider', 'type' => 'query_category', 'label' => __('Category', 'themify'), 'options' => array('taxonomy' => 'portfolio-category'), 'help' => sprintf(__('Add more <a href="%s" target="_blank">portfolio posts</a>', 'themify'), admin_url('post-new.php?post_type=portfolio')), 'wrap_with_class' => 'tf-group-element tf-group-element-portfolio'), array('id' => 'testimonial_category_slider', 'type' => 'query_category', 'label' => __('Category', 'themify'), 'options' => array('taxonomy' => 'testimonial-category'), 'help' => sprintf(__('Add more <a href="%s" target="_blank">testimonial posts</a>', 'themify'), admin_url('post-new.php?post_type=testimonial')), 'wrap_with_class' => 'tf-group-element tf-group-element-testimonial'), array('id' => 'posts_per_page_slider', 'type' => 'text', 'label' => __('Query', 'themify'), 'class' => 'xsmall', 'help' => __('number of posts to query', 'themify'), 'wrap_with_class' => 'tf-group-element tf-group-element-blog tf-group-element-portfolio tf-group-element-slider tf-group-element-testimonial'), array('id' => 'offset_slider', 'type' => 'text', 'label' => __('Offset', 'themify'), 'class' => 'xsmall', 'help' => __('number of post to displace or pass over', 'themify'), 'wrap_with_class' => 'tf-group-element tf-group-element-blog tf-group-element-portfolio tf-group-element-slider tf-group-element-testimonial'), array('id' => 'order_slider', 'type' => 'select', 'label' => __('Order', 'themify'), 'help' => __('Descending = show newer posts first', 'themify'), 'options' => array('desc' => __('Descending', 'themify'), 'asc' => __('Ascending', 'themify')), 'wrap_with_class' => 'tf-group-element tf-group-element-blog tf-group-element-slider tf-group-element-portfolio tf-group-element-testimonial'), array('id' => 'orderby_slider', 'type' => 'select', 'label' => __('Order By', 'themify'), 'options' => array('date' => __('Date', 'themify'), 'id' => __('Id', 'themify'), 'author' => __('Author', 'themify'), 'title' => __('Title', 'themify'), 'name' => __('Name', 'themify'), 'modified' => __('Modified', 'themify'), 'rand' => __('Random', 'themify'), 'comment_count' => __('Comment Count', 'themify')), 'wrap_with_class' => 'tf-group-element tf-group-element-blog tf-group-element-slider tf-group-element-portfolio tf-group-element-testimonial'), array('id' => 'display_slider', 'type' => 'select', 'label' => __('Display', 'themify'), 'options' => array('content' => __('Content', 'themify'), 'excerpt' => __('Excerpt', 'themify'), 'none' => __('None', 'themify')), 'wrap_with_class' => 'tf-group-element tf-group-element-blog tf-group-element-slider tf-group-element-portfolio tf-group-element-testimonial'), array('id' => 'hide_post_title_slider', 'type' => 'select', 'label' => __('Hide Post Title', 'themify'), 'empty' => array('val' => '', 'label' => ''), 'options' => array('yes' => __('Yes', 'themify'), 'no' => __('No', 'themify')), 'wrap_with_class' => 'tf-group-element tf-group-element-blog tf-group-element-slider tf-group-element-portfolio tf-group-element-testimonial'), array('id' => 'unlink_post_title_slider', 'type' => 'select', 'label' => __('Unlink Post Title', 'themify'), 'empty' => array('val' => '', 'label' => ''), 'options' => array('yes' => __('Yes', 'themify'), 'no' => __('No', 'themify')), 'wrap_with_class' => 'tf-group-element tf-group-element-blog tf-group-element-slider tf-group-element-portfolio'), array('id' => 'hide_feat_img_slider', 'type' => 'select', 'label' => __('Hide Featured Image', 'themify'), 'empty' => array('val' => '', 'label' => ''), 'options' => array('yes' => __('Yes', 'themify'), 'no' => __('No', 'themify')), 'wrap_with_class' => 'tf-group-element tf-group-element-blog tf-group-element-slider tf-group-element-portfolio tf-group-element-testimonial'), array('id' => 'unlink_feat_img_slider', 'type' => 'select', 'label' => __('Unlink Featured Image', 'themify'), 'empty' => array('val' => '', 'label' => ''), 'options' => array('yes' => __('Yes', 'themify'), 'no' => __('No', 'themify')), 'wrap_with_class' => 'tf-group-element tf-group-element-blog tf-group-element-slider tf-group-element-portfolio'), array('id' => 'open_link_new_tab_slider', 'type' => 'select', 'label' => __('Open link in a new tab', 'themify'), 'empty' => array('val' => '', 'label' => ''), 'options' => array('yes' => __('Yes', 'themify'), 'no' => __('No', 'themify')), 'wrap_with_class' => 'tf-group-element tf-group-element-blog tf-group-element-slider tf-group-element-portfolio tf-group-element-testimonial'), array('id' => 'img_content_slider', 'type' => 'builder', 'options' => array(array('id' => 'img_url_slider', 'type' => 'image', 'label' => __('Image URL', 'themify'), 'class' => 'xlarge'), array('id' => 'img_title_slider', 'type' => 'text', 'label' => __('Image Title', 'themify'), 'class' => 'fullwidth'), array('id' => 'img_link_slider', 'type' => 'text', 'label' => __('Image Link', 'themify'), 'class' => 'fullwidth'), array('id' => 'img_caption_slider', 'type' => 'textarea', 'label' => __('Image Caption', 'themify'), 'class' => 'fullwidth', 'rows' => 6)), 'wrap_with_class' => 'tf-group-element tf-group-element-image'), array('id' => 'video_content_slider', 'type' => 'builder', 'options' => array(array('id' => 'video_url_slider', 'type' => 'text', 'label' => __('Video URL', 'themify'), 'class' => 'xlarge', 'help' => array('new_line' => true, 'text' => __('YouTube, Vimeo, etc', 'themify'))), array('id' => 'video_title_slider', 'type' => 'text', 'label' => __('Video Title', 'themify'), 'class' => 'fullwidth'), array('id' => 'video_title_link_slider', 'type' => 'text', 'label' => __('Video Title Link', 'themify'), 'class' => 'fullwidth'), array('id' => 'video_caption_slider', 'type' => 'textarea', 'label' => __('Video Caption', 'themify'), 'class' => 'fullwidth', 'rows' => 6), array('id' => 'video_width_slider', 'type' => 'text', 'label' => __('Video Width', 'themify'), 'class' => 'xsmall')), 'wrap_with_class' => 'tf-group-element tf-group-element-video'), array('id' => 'text_content_slider', 'type' => 'builder', 'options' => array(array('id' => 'text_caption_slider', 'type' => 'wp_editor', 'label' => false, 'class' => 'fullwidth builder-field', 'rows' => 6)), 'wrap_with_class' => 'tf-group-element tf-group-element-text'), array('id' => 'layout_slider', 'type' => 'layout', 'label' => __('Slider Layout', 'themify'), 'separated' => 'top', 'options' => array(array('img' => 'slider-default.png', 'value' => 'slider-default', 'label' => __('Slider Default', 'themify')), array('img' => 'slider-image-top.png', 'value' => 'slider-overlay', 'label' => __('Slider Overlay', 'themify')), array('img' => 'slider-caption-overlay.png', 'value' => 'slider-caption-overlay', 'label' => __('Slider Caption Overlay', 'themify')), array('img' => 'slider-agency.png', 'value' => 'slider-agency', 'label' => __('Agency', 'themify')))), array('id' => 'image_size_slider', 'type' => 'select', 'label' => $this->is_img_php_disabled() ? __('Image Size', 'themify') : false, 'empty' => array('val' => '', 'label' => ''), 'hide' => $this->is_img_php_disabled() ? false : true, 'options' => $image_sizes, 'wrap_with_class' => 'tf-group-element tf-group-element-blog tf-group-element-slider tf-group-element-portfolio tf-group-element-image'), array('id' => 'img_w_slider', 'type' => 'text', 'label' => __('Image Width', 'themify'), 'class' => 'xsmall', 'help' => 'px', 'wrap_with_class' => 'tf-group-element tf-group-element-blog tf-group-element-slider tf-group-element-portfolio tf-group-element-image'), array('id' => 'img_h_slider', 'type' => 'text', 'label' => __('Image Height', 'themify'), 'class' => 'xsmall', 'help' => 'px', 'wrap_with_class' => 'tf-group-element tf-group-element-blog tf-group-element-slider tf-group-element-portfolio tf-group-element-image'), array('id' => 'slider_option_slider', 'type' => 'slider', 'label' => __('Slider Options', 'themify'), 'options' => array(array('id' => 'visible_opt_slider', 'type' => 'select', 'default' => 1, 'options' => $visible_opt, 'help' => __('Visible', 'themify')), array('id' => 'auto_scroll_opt_slider', 'type' => 'select', 'default' => 4, 'options' => $auto_scroll_opt, 'help' => __('Auto Scroll', 'themify')), array('id' => 'scroll_opt_slider', 'type' => 'select', 'options' => $visible_opt, 'help' => __('Scroll', 'themify')), array('id' => 'speed_opt_slider', 'type' => 'select', 'options' => array('normal' => __('Normal', 'themify'), 'fast' => __('Fast', 'themify'), 'slow' => __('Slow', 'themify')), 'help' => __('Speed', 'themify')), array('id' => 'effect_slider', 'type' => 'select', 'options' => array('scroll' => __('Slide', 'themify'), 'fade' => __('Fade', 'themify'), 'continuously' => __('Continuously', 'themify')), 'help' => __('Effect', 'themify')), array('id' => 'pause_on_hover_slider', 'type' => 'select', 'options' => array('resume' => __('Resume', 'themify'), 'immediate' => __('Immediate', 'themify'), 'false' => __('Disable', 'themify')), 'help' => __('Pause On Hover', 'themify')), array('id' => 'wrap_slider', 'type' => 'select', 'help' => __('Wrap', 'themify'), 'options' => array('yes' => __('Yes', 'themify'), 'no' => __('No', 'themify'))), array('id' => 'show_nav_slider', 'type' => 'select', 'help' => __('Show slider pagination', 'themify'), 'options' => array('yes' => __('Yes', 'themify'), 'no' => __('No', 'themify'))), array('id' => 'show_arrow_slider', 'type' => 'select', 'help' => __('Show slider arrow buttons', 'themify'), 'options' => array('yes' => __('Yes', 'themify'), 'no' => __('No', 'themify'))), array('id' => 'left_margin_slider', 'type' => 'text', 'class' => 'xsmall', 'unit' => 'px', 'help' => __('Left margin space between slides', 'themify')), array('id' => 'right_margin_slider', 'type' => 'text', 'class' => 'xsmall', 'unit' => 'px', 'help' => __('Right margin space between slides', 'themify'))))), 'styling' => array(array('id' => 'separator_animation', 'title' => '', 'description' => '', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Animation', 'themify') . '</h4>')), array('id' => 'animation_effect', 'type' => 'animation_select', 'label' => __('Effect', 'themify'), 'class' => ''), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_image_background', 'title' => '', 'description' => '', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Background', 'themify') . '</h4>')), array('id' => 'background_color', 'type' => 'color', 'label' => __('Background Color', 'themify'), 'class' => 'small'), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_font', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Font', 'themify') . '</h4>')), array('id' => 'font_family', 'type' => 'font_select', 'label' => __('Font Family', 'themify'), 'class' => 'font-family-select'), array('id' => 'font_color', 'type' => 'color', 'label' => __('Font Color', 'themify'), 'class' => 'small'), array('id' => 'multi_font_size', 'type' => 'multi', 'label' => __('Font Size', 'themify'), 'fields' => array(array('id' => 'font_size', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'font_size_unit', 'type' => 'select', 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'px', 'name' => __('px', 'themify')), array('value' => 'em', 'name' => __('em', 'themify')))))), array('id' => 'multi_line_height', 'type' => 'multi', 'label' => __('Line Height', 'themify'), 'fields' => array(array('id' => 'line_height', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'line_height_unit', 'type' => 'select', 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'px', 'name' => __('px', 'themify')), array('value' => 'em', 'name' => __('em', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'text_align', 'label' => __('Text Align', 'themify'), 'type' => 'radio', 'meta' => array(array('value' => '', 'name' => __('Default', 'themify'), 'selected' => true), array('value' => 'left', 'name' => __('Left', 'themify')), array('value' => 'center', 'name' => __('Center', 'themify')), array('value' => 'right', 'name' => __('Right', 'themify')), array('value' => 'justify', 'name' => __('Justify', 'themify')))), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_link', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Link', 'themify') . '</h4>')), array('id' => 'link_color', 'type' => 'color', 'label' => __('Color', 'themify'), 'class' => 'small'), array('id' => 'text_decoration', 'type' => 'select', 'label' => __('Text Decoration', 'themify'), 'meta' => array(array('value' => '', 'name' => '', 'selected' => true), array('value' => 'underline', 'name' => __('Underline', 'themify')), array('value' => 'overline', 'name' => __('Overline', 'themify')), array('value' => 'line-through', 'name' => __('Line through', 'themify')), array('value' => 'none', 'name' => __('None', 'themify')))), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_padding', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Padding', 'themify') . '</h4>')), array('id' => 'multi_padding_top', 'type' => 'multi', 'label' => __('Padding', 'themify'), 'fields' => array(array('id' => 'padding_top', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'padding_top_unit', 'type' => 'select', 'description' => __('top', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_padding_right', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'padding_right', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'padding_right_unit', 'type' => 'select', 'description' => __('right', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_padding_bottom', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'padding_bottom', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'padding_bottom_unit', 'type' => 'select', 'description' => __('bottom', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_padding_left', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'padding_left', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'padding_left_unit', 'type' => 'select', 'description' => __('left', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_margin', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Margin', 'themify') . '</h4>')), array('id' => 'multi_margin_top', 'type' => 'multi', 'label' => __('Margin', 'themify'), 'fields' => array(array('id' => 'margin_top', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'margin_top_unit', 'type' => 'select', 'description' => __('top', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_margin_right', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'margin_right', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'margin_right_unit', 'type' => 'select', 'description' => __('right', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_margin_bottom', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'margin_bottom', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'margin_bottom_unit', 'type' => 'select', 'description' => __('bottom', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_margin_left', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'margin_left', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'margin_left_unit', 'type' => 'select', 'description' => __('left', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_border', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Border', 'themify') . '</h4>')), array('id' => 'multi_border_top', 'type' => 'multi', 'label' => __('Border', 'themify'), 'fields' => array(array('id' => 'border_top_color', 'type' => 'color', 'class' => 'small'), array('id' => 'border_top_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall'), array('id' => 'border_top_style', 'type' => 'select', 'description' => __('top', 'themify'), 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'solid', 'name' => __('Solid', 'themify')), array('value' => 'dashed', 'name' => __('Dashed', 'themify')), array('value' => 'dotted', 'name' => __('Dotted', 'themify')), array('value' => 'double', 'name' => __('Double', 'themify')))))), array('id' => 'multi_border_right', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'border_right_color', 'type' => 'color', 'class' => 'small'), array('id' => 'border_right_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall'), array('id' => 'border_right_style', 'type' => 'select', 'description' => __('right', 'themify'), 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'solid', 'name' => __('Solid', 'themify')), array('value' => 'dashed', 'name' => __('Dashed', 'themify')), array('value' => 'dotted', 'name' => __('Dotted', 'themify')), array('value' => 'double', 'name' => __('Double', 'themify')))))), array('id' => 'multi_border_bottom', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'border_bottom_color', 'type' => 'color', 'class' => 'small'), array('id' => 'border_bottom_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall'), array('id' => 'border_bottom_style', 'type' => 'select', 'description' => __('bottom', 'themify'), 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'solid', 'name' => __('Solid', 'themify')), array('value' => 'dashed', 'name' => __('Dashed', 'themify')), array('value' => 'dotted', 'name' => __('Dotted', 'themify')), array('value' => 'double', 'name' => __('Double', 'themify')))))), array('id' => 'multi_border_left', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'border_left_color', 'type' => 'color', 'class' => 'small'), array('id' => 'border_left_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall'), array('id' => 'border_left_style', 'type' => 'select', 'description' => __('left', 'themify'), 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'solid', 'name' => __('Solid', 'themify')), array('value' => 'dashed', 'name' => __('Dashed', 'themify')), array('value' => 'dotted', 'name' => __('Dotted', 'themify')), array('value' => 'double', 'name' => __('Double', 'themify')))))), array('type' => 'separator', 'meta' => array('html' => '<hr/>')), array('id' => 'css_slider', 'type' => 'text', 'label' => __('Additional CSS Class', 'themify'), 'class' => 'large exclude-from-reset-field', 'description' => sprintf('<br/><small>%s</small>', __('Add additional CSS class(es) for custom styling', 'themify')))), 'styling_selector' => array('.module-slider' => array('background_color', 'padding', 'margin', 'border_top', 'border_right', 'border_bottom', 'border_left'), '.module-slider .slide-content' => array('font_family', 'font_size', 'line_height', 'text_align', 'color'), '.module-slider a' => array('link_color', 'text_decoration'), '.module-slider .slide-content .slide-title' => array('font_family', 'color'), '.module-slider .slide-content .slide-title a' => array('font_family', 'color')))));
    /**
     * Get an attachment ID from a given URL
     *
     * @source: http://frankiejarrett.com/get-an-attachment-id-by-url-in-wordpress/
     * @return int
     */
    public static function get_attachment_id_by_url($url)
    {
        // Split the $url into two parts with the wp-content directory as the separator
        $parsed_url = explode(parse_url(WP_CONTENT_URL, PHP_URL_PATH), $url);
        // Get the host of the current site and the host of the $url, ignoring www
        $this_host = str_ireplace('www.', '', parse_url(home_url(), PHP_URL_HOST));
        $file_host = str_ireplace('www.', '', parse_url($url, PHP_URL_HOST));
        // Return nothing if there aren't any $url parts or if the current host and $url host do not match
        if (!isset($parsed_url[1]) || empty($parsed_url[1]) || $this_host != $file_host) {
            return;
        }
        // Now we're going to quickly search the DB for any attachment GUID with a partial path match
        // Example: /uploads/2013/05/test-image.jpg
        global $wpdb;
        $url = method_exists($wpdb, 'esc_like') ? $wpdb->esc_like($parsed_url[1]) : like_escape($parsed_url[1]);
        $attachment = $wpdb->get_col($wpdb->prepare("SELECT ID FROM {$wpdb->posts} WHERE guid RLIKE %s;", $url));
        // Returns null if no attachment is found
        return isset($attachment[0]) ? $attachment[0] : null;
    }
}
///////////////////////////////////////
// Module Options
///////////////////////////////////////
Themify_Builder_Model::register_module('TB_Feature_Module');
<?php

if (!defined('ABSPATH')) {
    exit;
}
// Exit if accessed directly
/**
 * Module Name: Feature
 * Description: Display Feature content
 */
class TB_Feature_Module extends Themify_Builder_Module
{
    function __construct()
    {
        parent::__construct(array('name' => __('Feature', 'themify'), 'slug' => 'feature'));
    }
}
///////////////////////////////////////
// Module Options
///////////////////////////////////////
Themify_Builder_Model::register_module('TB_Feature_Module', apply_filters('themify_builder_module_feature', array('options' => array(array('id' => 'mod_title_feature', 'type' => 'text', 'label' => __('Module Title', 'themify'), 'class' => 'large'), array('id' => 'title_feature', 'type' => 'text', 'label' => __('Feature Title', 'themify'), 'class' => 'Large'), array('id' => 'content_feature', 'type' => 'wp_editor', 'class' => 'fullwidth'), array('id' => 'layout_feature', 'type' => 'layout', 'label' => __('Layout', 'themify'), 'options' => array(array('img' => 'icon-left.png', 'value' => 'icon-left', 'label' => __('Icon Left', 'themify')), array('img' => 'icon-right.png', 'value' => 'icon-right', 'label' => __('Icon Right', 'themify')), array('img' => 'icon-top.png', 'value' => 'icon-top', 'label' => __('Icon Top', 'themify')))), array('id' => 'multi_circle_feature', 'type' => 'multi', 'label' => __('Circle', 'themify'), 'fields' => array(array('id' => 'circle_percentage_feature', 'type' => 'text', 'label' => __('Percentage', 'themify')), array('id' => 'circle_stroke_feature', 'type' => 'text', 'label' => __('Stroke', 'themify'), 'class' => 'large', 'after' => 'px'), array('id' => 'circle_color_feature', 'type' => 'text', 'colorpicker' => true, 'class' => 'large', 'label' => __('Color', 'themify')), array('id' => 'circle_size_feature', 'type' => 'select', 'label' => __('Size', 'themify'), 'options' => array('small' => __('Small', 'themify'), 'medium' => __('Medium', 'themify'), 'large' => __('Large', 'themify'))))), array('id' => 'icon_type_feature', 'type' => 'radio', 'label' => __('Icon Type', 'themify'), 'options' => array('icon' => __('Icon', 'themify'), 'image' => __('Image', 'themify')), 'default' => 'icon', 'option_js' => true), array('id' => 'image_feature', 'type' => 'image', 'label' => __('Image URL', 'themify'), 'class' => 'xlarge', 'wrap_with_class' => 'tf-group-element tf-group-element-image'), array('id' => 'multi_icon_feature', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'icon_feature', 'type' => 'icon', 'label' => __('Icon', 'themify'), 'wrap_with_class' => 'tf-group-element tf-group-element-icon'), array('id' => 'icon_color_feature', 'type' => 'text', 'colorpicker' => true, 'label' => __('Color', 'themify'), 'class' => 'medium', 'wrap_with_class' => 'tf-group-element tf-group-element-icon'), array('id' => 'icon_bg_feature', 'type' => 'text', 'colorpicker' => true, 'label' => __('Background', 'themify'), 'class' => 'medium', 'wrap_with_class' => 'tf-group-element tf-group-element-icon'))), array('id' => 'link_feature', 'type' => 'text', 'label' => __('Link', 'themify'), 'class' => 'fullwidth'), array('id' => 'param_feature', 'type' => 'checkbox', 'label' => false, 'pushed' => 'pushed', 'options' => array(array('name' => 'lightbox', 'value' => __('Open link in lightbox', 'themify')), array('name' => 'newtab', 'value' => __('Open link in new tab', 'themify'))), 'new_line' => false)), 'styling' => array(array('id' => 'separator_animation', 'title' => '', 'description' => '', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Animation', 'themify') . '</h4>')), array('id' => 'animation_effect', 'type' => 'animation_select', 'label' => __('Effect', 'themify'), 'class' => ''), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_image_background', 'title' => '', 'description' => '', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Background', 'themify') . '</h4>')), array('id' => 'background_image', 'type' => 'image', 'label' => __('Background Image', 'themify'), 'class' => 'xlarge'), array('id' => 'background_color', 'type' => 'color', 'label' => __('Background Color', 'themify'), 'class' => 'small'), array('id' => 'background_repeat', 'label' => __('Background Repeat', 'themify'), 'type' => 'select', 'default' => '', 'meta' => array(array('value' => 'repeat', 'name' => __('Repeat All', 'themify')), array('value' => 'repeat-x', 'name' => __('Repeat Horizontally', 'themify')), array('value' => 'repeat-y', 'name' => __('Repeat Vertically', 'themify')), array('value' => 'repeat-none', 'name' => __('Do not repeat', 'themify')), array('value' => 'fullcover', 'name' => __('Fullcover', 'themify')))), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_font', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Font', 'themify') . '</h4>')), array('id' => 'font_family', 'type' => 'font_select', 'label' => __('Font Family', 'themify'), 'class' => 'font-family-select'), array('id' => 'font_color', 'type' => 'color', 'label' => __('Font Color', 'themify'), 'class' => 'small'), array('id' => 'multi_font_size', 'type' => 'multi', 'label' => __('Font Size', 'themify'), 'fields' => array(array('id' => 'font_size', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'font_size_unit', 'type' => 'select', 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'px', 'name' => __('px', 'themify')), array('value' => 'em', 'name' => __('em', 'themify')))))), array('id' => 'multi_line_height', 'type' => 'multi', 'label' => __('Line Height', 'themify'), 'fields' => array(array('id' => 'line_height', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'line_height_unit', 'type' => 'select', 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'px', 'name' => __('px', 'themify')), array('value' => 'em', 'name' => __('em', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'text_align', 'label' => __('Text Align', 'themify'), 'type' => 'radio', 'meta' => array(array('value' => '', 'name' => __('Default', 'themify'), 'selected' => true), array('value' => 'left', 'name' => __('Left', 'themify')), array('value' => 'center', 'name' => __('Center', 'themify')), array('value' => 'right', 'name' => __('Right', 'themify')), array('value' => 'justify', 'name' => __('Justify', 'themify')))), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_link', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Link', 'themify') . '</h4>')), array('id' => 'link_color', 'type' => 'color', 'label' => __('Color', 'themify'), 'class' => 'small'), array('id' => 'text_decoration', 'type' => 'select', 'label' => __('Text Decoration', 'themify'), 'meta' => array(array('value' => '', 'name' => '', 'selected' => true), array('value' => 'underline', 'name' => __('Underline', 'themify')), array('value' => 'overline', 'name' => __('Overline', 'themify')), array('value' => 'line-through', 'name' => __('Line through', 'themify')), array('value' => 'none', 'name' => __('None', 'themify')))), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_padding', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Padding', 'themify') . '</h4>')), array('id' => 'multi_padding_top', 'type' => 'multi', 'label' => __('Padding', 'themify'), 'fields' => array(array('id' => 'padding_top', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'padding_top_unit', 'type' => 'select', 'description' => __('top', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_padding_right', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'padding_right', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'padding_right_unit', 'type' => 'select', 'description' => __('right', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_padding_bottom', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'padding_bottom', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'padding_bottom_unit', 'type' => 'select', 'description' => __('bottom', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_padding_left', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'padding_left', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'padding_left_unit', 'type' => 'select', 'description' => __('left', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_margin', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Margin', 'themify') . '</h4>')), array('id' => 'multi_margin_top', 'type' => 'multi', 'label' => __('Margin', 'themify'), 'fields' => array(array('id' => 'margin_top', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'margin_top_unit', 'type' => 'select', 'description' => __('top', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_margin_right', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'margin_right', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'margin_right_unit', 'type' => 'select', 'description' => __('right', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_margin_bottom', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'margin_bottom', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'margin_bottom_unit', 'type' => 'select', 'description' => __('bottom', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_margin_left', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'margin_left', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'margin_left_unit', 'type' => 'select', 'description' => __('left', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_border', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Border', 'themify') . '</h4>')), array('id' => 'multi_border_top', 'type' => 'multi', 'label' => __('Border', 'themify'), 'fields' => array(array('id' => 'border_top_color', 'type' => 'color', 'class' => 'small'), array('id' => 'border_top_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall'), array('id' => 'border_top_style', 'type' => 'select', 'description' => __('top', 'themify'), 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'solid', 'name' => __('Solid', 'themify')), array('value' => 'dashed', 'name' => __('Dashed', 'themify')), array('value' => 'dotted', 'name' => __('Dotted', 'themify')), array('value' => 'double', 'name' => __('Double', 'themify')))))), array('id' => 'multi_border_right', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'border_right_color', 'type' => 'color', 'class' => 'small'), array('id' => 'border_right_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall'), array('id' => 'border_right_style', 'type' => 'select', 'description' => __('right', 'themify'), 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'solid', 'name' => __('Solid', 'themify')), array('value' => 'dashed', 'name' => __('Dashed', 'themify')), array('value' => 'dotted', 'name' => __('Dotted', 'themify')), array('value' => 'double', 'name' => __('Double', 'themify')))))), array('id' => 'multi_border_bottom', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'border_bottom_color', 'type' => 'color', 'class' => 'small'), array('id' => 'border_bottom_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall'), array('id' => 'border_bottom_style', 'type' => 'select', 'description' => __('bottom', 'themify'), 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'solid', 'name' => __('Solid', 'themify')), array('value' => 'dashed', 'name' => __('Dashed', 'themify')), array('value' => 'dotted', 'name' => __('Dotted', 'themify')), array('value' => 'double', 'name' => __('Double', 'themify')))))), array('id' => 'multi_border_left', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'border_left_color', 'type' => 'color', 'class' => 'small'), array('id' => 'border_left_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall'), array('id' => 'border_left_style', 'type' => 'select', 'description' => __('left', 'themify'), 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'solid', 'name' => __('Solid', 'themify')), array('value' => 'dashed', 'name' => __('Dashed', 'themify')), array('value' => 'dotted', 'name' => __('Dotted', 'themify')), array('value' => 'double', 'name' => __('Double', 'themify')))))), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'add_css_text', 'type' => 'text', 'label' => __('Additional CSS Class', 'themify'), 'description' => sprintf('<br/><small>%s</small>', __('Add additional CSS class(es) for custom styling', 'themify')), 'class' => 'large exclude-from-reset-field')), 'styling_selector' => array('.module-feature' => array('background_image', 'background_color', 'font_family', 'font_size', 'line_height', 'text_align', 'color', 'padding', 'margin', 'border_top', 'border_right', 'border_bottom', 'border_left'), '.module-feature a' => array('link_color', 'text_decoration'), '.module-feature .feature-title' => array('font_family', 'color')))));
<?php

if (!defined('ABSPATH')) {
    exit;
}
// Exit if accessed directly
/**
 * Module Name: Video
 * Description: Display Video content
 */
class TB_Video_Module extends Themify_Builder_Module
{
    function __construct()
    {
        parent::__construct(array('name' => __('Video', 'themify'), 'slug' => 'video'));
    }
}
///////////////////////////////////////
// Module Options
///////////////////////////////////////
Themify_Builder_Model::register_module('TB_Video_Module', apply_filters('themify_builder_module_video', array('options' => array(array('id' => 'mod_title_video', 'type' => 'text', 'label' => __('Module Title', 'themify'), 'class' => 'large'), array('id' => 'style_video', 'type' => 'layout', 'label' => __('Video Style', 'themify'), 'options' => array(array('img' => 'video-top.png', 'value' => 'video-top', 'label' => __('Video Top', 'themify')), array('img' => 'video-left.png', 'value' => 'video-left', 'label' => __('Video Left', 'themify')), array('img' => 'video-right.png', 'value' => 'video-right', 'label' => __('Video Right', 'themify')), array('img' => 'video-overlay.png', 'value' => 'video-overlay', 'label' => __('Video Overlay', 'themify')))), array('id' => 'url_video', 'type' => 'text', 'label' => __('Video URL', 'themify'), 'class' => 'fullwidth', 'help' => __('YouTube, Vimeo, etc. video <a href="http://themify.me/docs/video-embeds" target="_blank">embed link</a>', 'themify')), array('id' => 'width_video', 'type' => 'text', 'label' => __('Video Width', 'themify'), 'class' => 'xsmall', 'help' => __('Enter fixed witdth (eg. 200px) or relative (eg. 100%). Video height is auto adjusted.', 'themify'), 'break' => true, 'unit' => array('id' => 'unit_video', 'options' => array(array('id' => 'pixel_unit', 'value' => 'px'), array('id' => 'percent_unit', 'value' => '%')))), array('id' => 'title_video', 'type' => 'text', 'label' => __('Video Title', 'themify'), 'class' => 'xlarge'), array('id' => 'title_link_video', 'type' => 'text', 'label' => __('Video Title Link', 'themify'), 'class' => 'xlarge'), array('id' => 'caption_video', 'type' => 'textarea', 'label' => __('Video Caption', 'themify'), 'class' => 'fullwidth')), 'styling' => array(array('id' => 'separator_animation', 'title' => '', 'description' => '', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Animation', 'themify') . '</h4>')), array('id' => 'animation_effect', 'type' => 'animation_select', 'label' => __('Effect', 'themify'), 'class' => ''), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_image_background', 'title' => '', 'description' => '', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Background', 'themify') . '</h4>')), array('id' => 'background_color', 'type' => 'color', 'label' => __('Background Color', 'themify'), 'class' => 'small'), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_font', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Font', 'themify') . '</h4>')), array('id' => 'font_family', 'type' => 'font_select', 'label' => __('Font Family', 'themify'), 'class' => 'font-family-select'), array('id' => 'font_color', 'type' => 'color', 'label' => __('Font Color', 'themify'), 'class' => 'small'), array('id' => 'multi_font_size', 'type' => 'multi', 'label' => __('Font Size', 'themify'), 'fields' => array(array('id' => 'font_size', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'font_size_unit', 'type' => 'select', 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'px', 'name' => __('px', 'themify')), array('value' => 'em', 'name' => __('em', 'themify')))))), array('id' => 'multi_line_height', 'type' => 'multi', 'label' => __('Line Height', 'themify'), 'fields' => array(array('id' => 'line_height', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'line_height_unit', 'type' => 'select', 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'px', 'name' => __('px', 'themify')), array('value' => 'em', 'name' => __('em', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'text_align', 'label' => __('Text Align', 'themify'), 'type' => 'radio', 'meta' => array(array('value' => '', 'name' => __('Default', 'themify'), 'selected' => true), array('value' => 'left', 'name' => __('Left', 'themify')), array('value' => 'center', 'name' => __('Center', 'themify')), array('value' => 'right', 'name' => __('Right', 'themify')), array('value' => 'justify', 'name' => __('Justify', 'themify')))), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_link', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Link', 'themify') . '</h4>')), array('id' => 'link_color', 'type' => 'color', 'label' => __('Color', 'themify'), 'class' => 'small'), array('id' => 'text_decoration', 'type' => 'select', 'label' => __('Text Decoration', 'themify'), 'meta' => array(array('value' => '', 'name' => '', 'selected' => true), array('value' => 'underline', 'name' => __('Underline', 'themify')), array('value' => 'overline', 'name' => __('Overline', 'themify')), array('value' => 'line-through', 'name' => __('Line through', 'themify')), array('value' => 'none', 'name' => __('None', 'themify')))), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_padding', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Padding', 'themify') . '</h4>')), array('id' => 'multi_padding_top', 'type' => 'multi', 'label' => __('Padding', 'themify'), 'fields' => array(array('id' => 'padding_top', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'padding_top_unit', 'type' => 'select', 'description' => __('top', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_padding_right', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'padding_right', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'padding_right_unit', 'type' => 'select', 'description' => __('right', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_padding_bottom', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'padding_bottom', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'padding_bottom_unit', 'type' => 'select', 'description' => __('bottom', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_padding_left', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'padding_left', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'padding_left_unit', 'type' => 'select', 'description' => __('left', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_margin', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Margin', 'themify') . '</h4>')), array('id' => 'multi_margin_top', 'type' => 'multi', 'label' => __('Margin', 'themify'), 'fields' => array(array('id' => 'margin_top', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'margin_top_unit', 'type' => 'select', 'description' => __('top', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_margin_right', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'margin_right', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'margin_right_unit', 'type' => 'select', 'description' => __('right', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_margin_bottom', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'margin_bottom', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'margin_bottom_unit', 'type' => 'select', 'description' => __('bottom', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_margin_left', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'margin_left', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'margin_left_unit', 'type' => 'select', 'description' => __('left', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_border', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Border', 'themify') . '</h4>')), array('id' => 'multi_border_top', 'type' => 'multi', 'label' => __('Border', 'themify'), 'fields' => array(array('id' => 'border_top_color', 'type' => 'color', 'class' => 'small'), array('id' => 'border_top_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall'), array('id' => 'border_top_style', 'type' => 'select', 'description' => __('top', 'themify'), 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'solid', 'name' => __('Solid', 'themify')), array('value' => 'dashed', 'name' => __('Dashed', 'themify')), array('value' => 'dotted', 'name' => __('Dotted', 'themify')), array('value' => 'double', 'name' => __('Double', 'themify')))))), array('id' => 'multi_border_right', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'border_right_color', 'type' => 'color', 'class' => 'small'), array('id' => 'border_right_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall'), array('id' => 'border_right_style', 'type' => 'select', 'description' => __('right', 'themify'), 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'solid', 'name' => __('Solid', 'themify')), array('value' => 'dashed', 'name' => __('Dashed', 'themify')), array('value' => 'dotted', 'name' => __('Dotted', 'themify')), array('value' => 'double', 'name' => __('Double', 'themify')))))), array('id' => 'multi_border_bottom', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'border_bottom_color', 'type' => 'color', 'class' => 'small'), array('id' => 'border_bottom_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall'), array('id' => 'border_bottom_style', 'type' => 'select', 'description' => __('bottom', 'themify'), 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'solid', 'name' => __('Solid', 'themify')), array('value' => 'dashed', 'name' => __('Dashed', 'themify')), array('value' => 'dotted', 'name' => __('Dotted', 'themify')), array('value' => 'double', 'name' => __('Double', 'themify')))))), array('id' => 'multi_border_left', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'border_left_color', 'type' => 'color', 'class' => 'small'), array('id' => 'border_left_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall'), array('id' => 'border_left_style', 'type' => 'select', 'description' => __('left', 'themify'), 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'solid', 'name' => __('Solid', 'themify')), array('value' => 'dashed', 'name' => __('Dashed', 'themify')), array('value' => 'dotted', 'name' => __('Dotted', 'themify')), array('value' => 'double', 'name' => __('Double', 'themify')))))), array('type' => 'separator', 'meta' => array('html' => '<hr/>')), array('id' => 'css_video', 'type' => 'text', 'label' => __('Additional CSS Class', 'themify'), 'class' => 'large exclude-from-reset-field', 'description' => sprintf('<br/><small>%s</small>', __('Add additional CSS class(es) for custom styling', 'themify')))), 'styling_selector' => array('.module-video' => array('background_color', 'color', 'padding', 'margin', 'border_top', 'border_right', 'border_bottom', 'border_left'), '.module-video .video-content' => array('font_family', 'font_size', 'line_height', 'text_align', 'color'), '.module-video a' => array('link_color', 'text_decoration'), '.module-video .video-title' => array('font_family', 'color'), '.module-video .video-title a' => array('font_family', 'link_color')))));
<?php

if (!defined('ABSPATH')) {
    exit;
}
// Exit if accessed directly
/**
 * Module Name: Image
 * Description: Display Image content
 */
class TB_Image_Module extends Themify_Builder_Module
{
    function __construct()
    {
        parent::__construct(array('name' => __('Image', 'themify'), 'slug' => 'image'));
    }
}
///////////////////////////////////////
// Module Options
///////////////////////////////////////
$image_sizes = themify_get_image_sizes_list(false);
Themify_Builder_Model::register_module('TB_Image_Module', apply_filters('themify_builder_module_image', array('options' => array(array('id' => 'mod_title_image', 'type' => 'text', 'label' => __('Module Title', 'themify'), 'class' => 'large'), array('id' => 'style_image', 'type' => 'layout', 'label' => __('Image Style', 'themify'), 'options' => array(array('img' => 'image-top.png', 'value' => 'image-top', 'label' => __('Image Top', 'themify')), array('img' => 'image-left.png', 'value' => 'image-left', 'label' => __('Image Left', 'themify')), array('img' => 'image-right.png', 'value' => 'image-right', 'label' => __('Image Right', 'themify')), array('img' => 'image-overlay.png', 'value' => 'image-overlay', 'label' => __('Image Overlay', 'themify')), array('img' => 'image-center.png', 'value' => 'image-center', 'label' => __('Centered Image', 'themify')))), array('id' => 'url_image', 'type' => 'image', 'label' => __('Image URL', 'themify'), 'class' => 'xlarge'), array('id' => 'appearance_image', 'type' => 'checkbox', 'label' => __('Image Appearance', 'themify'), 'default' => 'rounded', 'options' => array(array('name' => 'rounded', 'value' => __('Rounded', 'themify')), array('name' => 'drop-shadow', 'value' => __('Drop Shadow', 'themify')), array('name' => 'bordered', 'value' => __('Bordered', 'themify')), array('name' => 'circle', 'value' => __('Circle', 'themify'), 'help' => __('(square format image only)', 'themify')))), array('id' => 'image_size_image', 'type' => 'select', 'label' => $this->is_img_php_disabled() ? __('Image Size', 'themify') : false, 'empty' => array('val' => '', 'label' => ''), 'hide' => $this->is_img_php_disabled() ? false : true, 'options' => $image_sizes), array('id' => 'width_image', 'type' => 'text', 'label' => __('Width', 'themify'), 'class' => 'xsmall', 'help' => 'px', 'value' => 300), array('id' => 'height_image', 'type' => 'text', 'label' => __('Height', 'themify'), 'class' => 'xsmall', 'help' => 'px', 'value' => 200), array('id' => 'title_image', 'type' => 'text', 'label' => __('Image Title', 'themify'), 'class' => 'fullwidth'), array('id' => 'link_image', 'type' => 'text', 'label' => __('Image Link', 'themify'), 'class' => 'fullwidth'), array('id' => 'param_image', 'type' => 'checkbox', 'label' => false, 'pushed' => 'pushed', 'options' => array(array('name' => 'lightbox', 'value' => __('Open link in lightbox', 'themify')), array('name' => 'zoom', 'value' => __('Show zoom icon', 'themify')), array('name' => 'newtab', 'value' => __('Open link in new tab', 'themify'))), 'new_line' => false), array('id' => 'caption_image', 'type' => 'textarea', 'label' => __('Image Caption', 'themify'), 'class' => 'fullwidth')), 'styling' => array(array('id' => 'separator_animation', 'title' => '', 'description' => '', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Animation', 'themify') . '</h4>')), array('id' => 'animation_effect', 'type' => 'animation_select', 'label' => __('Effect', 'themify'), 'class' => ''), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_image_background', 'title' => '', 'description' => '', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Background', 'themify') . '</h4>')), array('id' => 'background_color', 'type' => 'color', 'label' => __('Background Color', 'themify'), 'class' => 'small'), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_font', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Font', 'themify') . '</h4>')), array('id' => 'font_family', 'type' => 'font_select', 'label' => __('Font Family', 'themify'), 'class' => 'font-family-select'), array('id' => 'font_color', 'type' => 'color', 'label' => __('Font Color', 'themify'), 'class' => 'small'), array('id' => 'multi_font_size', 'type' => 'multi', 'label' => __('Font Size', 'themify'), 'fields' => array(array('id' => 'font_size', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'font_size_unit', 'type' => 'select', 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'px', 'name' => __('px', 'themify')), array('value' => 'em', 'name' => __('em', 'themify')))))), array('id' => 'multi_line_height', 'type' => 'multi', 'label' => __('Line Height', 'themify'), 'fields' => array(array('id' => 'line_height', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'line_height_unit', 'type' => 'select', 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'px', 'name' => __('px', 'themify')), array('value' => 'em', 'name' => __('em', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'text_align', 'label' => __('Text Align', 'themify'), 'type' => 'radio', 'meta' => array(array('value' => '', 'name' => __('Default', 'themify'), 'selected' => true), array('value' => 'left', 'name' => __('Left', 'themify')), array('value' => 'center', 'name' => __('Center', 'themify')), array('value' => 'right', 'name' => __('Right', 'themify')), array('value' => 'justify', 'name' => __('Justify', 'themify')))), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_link', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Link', 'themify') . '</h4>')), array('id' => 'link_color', 'type' => 'color', 'label' => __('Color', 'themify'), 'class' => 'small'), array('id' => 'text_decoration', 'type' => 'select', 'label' => __('Text Decoration', 'themify'), 'meta' => array(array('value' => '', 'name' => '', 'selected' => true), array('value' => 'underline', 'name' => __('Underline', 'themify')), array('value' => 'overline', 'name' => __('Overline', 'themify')), array('value' => 'line-through', 'name' => __('Line through', 'themify')), array('value' => 'none', 'name' => __('None', 'themify')))), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_padding', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Padding', 'themify') . '</h4>')), array('id' => 'multi_padding_top', 'type' => 'multi', 'label' => __('Padding', 'themify'), 'fields' => array(array('id' => 'padding_top', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'padding_top_unit', 'type' => 'select', 'description' => __('top', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_padding_right', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'padding_right', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'padding_right_unit', 'type' => 'select', 'description' => __('right', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_padding_bottom', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'padding_bottom', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'padding_bottom_unit', 'type' => 'select', 'description' => __('bottom', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_padding_left', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'padding_left', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'padding_left_unit', 'type' => 'select', 'description' => __('left', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_margin', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Margin', 'themify') . '</h4>')), array('id' => 'multi_margin_top', 'type' => 'multi', 'label' => __('Margin', 'themify'), 'fields' => array(array('id' => 'margin_top', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'margin_top_unit', 'type' => 'select', 'description' => __('top', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_margin_right', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'margin_right', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'margin_right_unit', 'type' => 'select', 'description' => __('right', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_margin_bottom', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'margin_bottom', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'margin_bottom_unit', 'type' => 'select', 'description' => __('bottom', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_margin_left', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'margin_left', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'margin_left_unit', 'type' => 'select', 'description' => __('left', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_border', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Border', 'themify') . '</h4>')), array('id' => 'multi_border_top', 'type' => 'multi', 'label' => __('Border', 'themify'), 'fields' => array(array('id' => 'border_top_color', 'type' => 'color', 'class' => 'small'), array('id' => 'border_top_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall'), array('id' => 'border_top_style', 'type' => 'select', 'description' => __('top', 'themify'), 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'solid', 'name' => __('Solid', 'themify')), array('value' => 'dashed', 'name' => __('Dashed', 'themify')), array('value' => 'dotted', 'name' => __('Dotted', 'themify')), array('value' => 'double', 'name' => __('Double', 'themify')))))), array('id' => 'multi_border_right', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'border_right_color', 'type' => 'color', 'class' => 'small'), array('id' => 'border_right_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall'), array('id' => 'border_right_style', 'type' => 'select', 'description' => __('right', 'themify'), 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'solid', 'name' => __('Solid', 'themify')), array('value' => 'dashed', 'name' => __('Dashed', 'themify')), array('value' => 'dotted', 'name' => __('Dotted', 'themify')), array('value' => 'double', 'name' => __('Double', 'themify')))))), array('id' => 'multi_border_bottom', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'border_bottom_color', 'type' => 'color', 'class' => 'small'), array('id' => 'border_bottom_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall'), array('id' => 'border_bottom_style', 'type' => 'select', 'description' => __('bottom', 'themify'), 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'solid', 'name' => __('Solid', 'themify')), array('value' => 'dashed', 'name' => __('Dashed', 'themify')), array('value' => 'dotted', 'name' => __('Dotted', 'themify')), array('value' => 'double', 'name' => __('Double', 'themify')))))), array('id' => 'multi_border_left', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'border_left_color', 'type' => 'color', 'class' => 'small'), array('id' => 'border_left_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall'), array('id' => 'border_left_style', 'type' => 'select', 'description' => __('left', 'themify'), 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'solid', 'name' => __('Solid', 'themify')), array('value' => 'dashed', 'name' => __('Dashed', 'themify')), array('value' => 'dotted', 'name' => __('Dotted', 'themify')), array('value' => 'double', 'name' => __('Double', 'themify')))))), array('type' => 'separator', 'meta' => array('html' => '<hr/>')), array('id' => 'css_image', 'type' => 'text', 'label' => __('Additional CSS Class', 'themify'), 'class' => 'large exclude-from-reset-field', 'description' => sprintf('<br/><small>%s</small>', __('Add additional CSS class(es) for custom styling', 'themify')))), 'styling_selector' => array('.module-image' => array('background_color', 'padding', 'margin', 'border_top', 'border_right', 'border_bottom', 'border_left'), '.module-image a' => array('link_color', 'text_decoration'), '.module-image .image-content' => array('font_family', 'font_size', 'line_height', 'text_align', 'color'), '.module-image .image-title' => array('font_family', 'color'), '.module-image .image-title a' => array('font_family', 'color')))));
class TB_Widgetized_Module extends Themify_Builder_Module
{
    function __construct()
    {
        parent::__construct(array('name' => __('Widgetized', 'themify'), 'slug' => 'widgetized'));
        add_action('themify_builder_lightbox_fields', array($this, 'widgetized_fields'), 10, 2);
    }
    function widgetized_fields($field, $mod_name)
    {
        global $wp_registered_sidebars;
        $output = '';
        if ($mod_name != 'widgetized') {
            return;
        }
        switch ($field['type']) {
            case 'widgetized_select':
                $output .= '<select name="' . $field['id'] . '" id="' . $field['id'] . '" class="tfb_lb_option">';
                foreach ($wp_registered_sidebars as $k => $v) {
                    $output .= '<option value="' . $v['id'] . '">' . $v['name'] . '</option>';
                }
                $output .= '</select>';
                break;
        }
        echo $output;
    }
}
///////////////////////////////////////
// Module Options
///////////////////////////////////////
Themify_Builder_Model::register_module('TB_Widgetized_Module', apply_filters('themify_builder_module_widget', array('options' => array(array('id' => 'mod_title_widgetized', 'type' => 'text', 'label' => __('Module Title', 'themify'), 'class' => 'large'), array('id' => 'sidebar_widgetized', 'type' => 'widgetized_select', 'label' => __('Widgetized Area', 'themify'), 'class' => 'large')), 'styling' => array(array('id' => 'separator_animation', 'title' => '', 'description' => '', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Animation', 'themify') . '</h4>')), array('id' => 'animation_effect', 'type' => 'animation_select', 'label' => __('Effect', 'themify'), 'class' => ''), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_image_background', 'title' => '', 'description' => '', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Background', 'themify') . '</h4>')), array('id' => 'background_image', 'type' => 'image', 'label' => __('Background Image', 'themify'), 'class' => 'xlarge'), array('id' => 'background_color', 'type' => 'color', 'label' => __('Background Color', 'themify'), 'class' => 'small'), array('id' => 'background_repeat', 'label' => __('Background Repeat', 'themify'), 'type' => 'select', 'default' => '', 'meta' => array(array('value' => 'repeat', 'name' => __('Repeat All', 'themify')), array('value' => 'repeat-x', 'name' => __('Repeat Horizontally', 'themify')), array('value' => 'repeat-y', 'name' => __('Repeat Vertically', 'themify')), array('value' => 'repeat-none', 'name' => __('Do not repeat', 'themify')), array('value' => 'fullcover', 'name' => __('Fullcover', 'themify')))), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_font', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Font', 'themify') . '</h4>')), array('id' => 'font_family', 'type' => 'font_select', 'label' => __('Font Family', 'themify'), 'class' => 'font-family-select'), array('id' => 'font_color', 'type' => 'color', 'label' => __('Font Color', 'themify'), 'class' => 'small'), array('id' => 'multi_font_size', 'type' => 'multi', 'label' => __('Font Size', 'themify'), 'fields' => array(array('id' => 'font_size', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'font_size_unit', 'type' => 'select', 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'px', 'name' => __('px', 'themify')), array('value' => 'em', 'name' => __('em', 'themify')))))), array('id' => 'multi_line_height', 'type' => 'multi', 'label' => __('Line Height', 'themify'), 'fields' => array(array('id' => 'line_height', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'line_height_unit', 'type' => 'select', 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'px', 'name' => __('px', 'themify')), array('value' => 'em', 'name' => __('em', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'text_align', 'label' => __('Text Align', 'themify'), 'type' => 'radio', 'meta' => array(array('value' => '', 'name' => __('Default', 'themify'), 'selected' => true), array('value' => 'left', 'name' => __('Left', 'themify')), array('value' => 'center', 'name' => __('Center', 'themify')), array('value' => 'right', 'name' => __('Right', 'themify')), array('value' => 'justify', 'name' => __('Justify', 'themify')))), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_link', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Link', 'themify') . '</h4>')), array('id' => 'link_color', 'type' => 'color', 'label' => __('Color', 'themify'), 'class' => 'small'), array('id' => 'text_decoration', 'type' => 'select', 'label' => __('Text Decoration', 'themify'), 'meta' => array(array('value' => '', 'name' => '', 'selected' => true), array('value' => 'underline', 'name' => __('Underline', 'themify')), array('value' => 'overline', 'name' => __('Overline', 'themify')), array('value' => 'line-through', 'name' => __('Line through', 'themify')), array('value' => 'none', 'name' => __('None', 'themify')))), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_padding', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Padding', 'themify') . '</h4>')), array('id' => 'multi_padding_top', 'type' => 'multi', 'label' => __('Padding', 'themify'), 'fields' => array(array('id' => 'padding_top', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'padding_top_unit', 'type' => 'select', 'description' => __('top', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_padding_right', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'padding_right', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'padding_right_unit', 'type' => 'select', 'description' => __('right', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_padding_bottom', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'padding_bottom', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'padding_bottom_unit', 'type' => 'select', 'description' => __('bottom', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_padding_left', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'padding_left', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'padding_left_unit', 'type' => 'select', 'description' => __('left', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_margin', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Margin', 'themify') . '</h4>')), array('id' => 'multi_margin_top', 'type' => 'multi', 'label' => __('Margin', 'themify'), 'fields' => array(array('id' => 'margin_top', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'margin_top_unit', 'type' => 'select', 'description' => __('top', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_margin_right', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'margin_right', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'margin_right_unit', 'type' => 'select', 'description' => __('right', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_margin_bottom', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'margin_bottom', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'margin_bottom_unit', 'type' => 'select', 'description' => __('bottom', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_margin_left', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'margin_left', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'margin_left_unit', 'type' => 'select', 'description' => __('left', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('type' => 'separator', 'meta' => array('html' => '<hr/>')), array('id' => 'custom_css_widgetized', 'type' => 'text', 'label' => __('Additional CSS Class', 'themify'), 'description' => sprintf('<br/><small>%s</small>', __('Add additional CSS class(es) for custom styling', 'themify')), 'class' => 'large exclude-from-reset-field')), 'styling_selector' => array('.module-widgetized .widget' => array('background_image', 'background_color', 'background_repeat', 'background_position', 'padding', 'margin'), '.module-widgetized' => array('font_family', 'font_size', 'line_height', 'text_align', 'color'), '.module-widgetized a' => array('link_color', 'text_decoration')))));
Exemple #18
0
    }
    public function get_options()
    {
        global $ThemifyBuilder;
        $image_sizes = themify_get_image_sizes_list(false);
        $taxonomies = $ThemifyBuilder->get_public_taxonomies();
        $term_options = array();
        foreach ($taxonomies as $key => $label) {
            $term_options[] = array('id' => "{$key}_post", 'label' => $label, 'type' => 'query_category', 'options' => array('taxonomy' => $key), 'wrap_with_class' => "tf-group-element tf-group-element-{$key}");
        }
        /* allow query posts by slug */
        $taxonomies['post_slug'] = __('Slug', 'themify');
        $options = array(array('id' => 'mod_title_post', 'type' => 'text', 'label' => __('Module Title', 'themify'), 'class' => 'large'), array('id' => 'layout_post', 'type' => 'layout', 'label' => __('Post Layout', 'themify'), 'options' => array(array('img' => 'list-post.png', 'value' => 'list-post', 'label' => __('List Post', 'themify')), array('img' => 'grid3.png', 'value' => 'grid3', 'label' => __('Grid 3', 'themify')), array('img' => 'grid2.png', 'value' => 'grid2', 'label' => __('Grid 2', 'themify')), array('img' => 'grid4.png', 'value' => 'grid4', 'label' => __('Grid 4', 'themify')), array('img' => 'list-thumb-image.png', 'value' => 'list-thumb-image', 'label' => __('List Thumb Image', 'themify')), array('img' => 'grid2-thumb.png', 'value' => 'grid2-thumb', 'label' => __('Grid 2 Thumb', 'themify')))), array('id' => 'post_type_post', 'type' => 'select', 'label' => __('Post Type', 'themify'), 'options' => $ThemifyBuilder->get_public_post_types()), array('id' => 'type_query_post', 'type' => 'radio', 'label' => __('Query by', 'themify'), 'options' => $taxonomies, 'default' => 'category', 'option_js' => true), array('type' => 'group', 'fields' => $term_options), array('id' => 'query_slug_post', 'type' => 'text', 'label' => __('Post Slugs', 'themify'), 'class' => 'large', 'wrap_with_class' => 'tf-group-element tf-group-element-post_slug', 'help' => '<br/>' . __('Insert post slug. Multiple slug should be separated by comma (,)', 'themify')), array('id' => 'post_per_page_post', 'type' => 'text', 'label' => __('Limit', 'themify'), 'class' => 'xsmall', 'help' => __('number of posts to show', 'themify')), array('id' => 'offset_post', 'type' => 'text', 'label' => __('Offset', 'themify'), 'class' => 'xsmall', 'help' => __('number of post to displace or pass over', 'themify')), array('id' => 'order_post', 'type' => 'select', 'label' => __('Order', 'themify'), 'help' => __('Descending = show newer posts first', 'themify'), 'options' => array('desc' => __('Descending', 'themify'), 'asc' => __('Ascending', 'themify'))), array('id' => 'orderby_post', 'type' => 'select', 'label' => __('Order By', 'themify'), 'options' => array('date' => __('Date', 'themify'), 'id' => __('Id', 'themify'), 'author' => __('Author', 'themify'), 'title' => __('Title', 'themify'), 'name' => __('Name', 'themify'), 'modified' => __('Modified', 'themify'), 'rand' => __('Random', 'themify'), 'comment_count' => __('Comment Count', 'themify'))), array('id' => 'display_post', 'type' => 'select', 'label' => __('Display', 'themify'), 'options' => array('content' => __('Content', 'themify'), 'excerpt' => __('Excerpt', 'themify'), 'none' => __('None', 'themify'))), array('id' => 'hide_feat_img_post', 'type' => 'select', 'label' => __('Hide Featured Image', 'themify'), 'empty' => array('val' => '', 'label' => ''), 'options' => array('yes' => __('Yes', 'themify'), 'no' => __('No', 'themify'))), array('id' => 'image_size_post', 'type' => 'select', 'label' => Themify_Builder_Model::is_img_php_disabled() ? __('Image Size', 'themify') : false, 'empty' => array('val' => '', 'label' => ''), 'hide' => Themify_Builder_Model::is_img_php_disabled() ? false : true, 'options' => $image_sizes), array('id' => 'img_width_post', 'type' => 'text', 'label' => __('Image Width', 'themify'), 'class' => 'xsmall'), array('id' => 'img_height_post', 'type' => 'text', 'label' => __('Image Height', 'themify'), 'class' => 'xsmall'), array('id' => 'unlink_feat_img_post', 'type' => 'select', 'label' => __('Unlink Featured Image', 'themify'), 'empty' => array('val' => '', 'label' => ''), 'options' => array('yes' => __('Yes', 'themify'), 'no' => __('No', 'themify'))), array('id' => 'hide_post_title_post', 'type' => 'select', 'label' => __('Hide Post Title', 'themify'), 'empty' => array('val' => '', 'label' => ''), 'options' => array('yes' => __('Yes', 'themify'), 'no' => __('No', 'themify'))), array('id' => 'unlink_post_title_post', 'type' => 'select', 'label' => __('Unlink Post Title', 'themify'), 'empty' => array('val' => '', 'label' => ''), 'options' => array('yes' => __('Yes', 'themify'), 'no' => __('No', 'themify'))), array('id' => 'hide_post_date_post', 'type' => 'select', 'label' => __('Hide Post Date', 'themify'), 'empty' => array('val' => '', 'label' => ''), 'options' => array('yes' => __('Yes', 'themify'), 'no' => __('No', 'themify'))), array('id' => 'hide_post_meta_post', 'type' => 'select', 'label' => __('Hide Post Meta', 'themify'), 'empty' => array('val' => '', 'label' => ''), 'options' => array('yes' => __('Yes', 'themify'), 'no' => __('No', 'themify'))), array('id' => 'hide_page_nav_post', 'type' => 'select', 'label' => __('Hide Page Navigation', 'themify'), 'empty' => array('val' => '', 'label' => ''), 'options' => array('yes' => __('Yes', 'themify'), 'no' => __('No', 'themify')), 'default' => 'Yes'));
        return $options;
    }
    public function get_animation()
    {
        $animation = array(array('id' => 'multi_Animation Effect', 'type' => 'multi', 'label' => __('Effect', 'themify'), 'fields' => array(array('id' => 'animation_effect', 'type' => 'animation_select', 'label' => __('Effect', 'themify')), array('id' => 'animation_effect_delay', 'type' => 'text', 'label' => __('Delay', 'themify'), 'class' => 'xsmall', 'description' => __('Delay (s)', 'themify')), array('id' => 'animation_effect_repeat', 'type' => 'text', 'label' => __('Repeat', 'themify'), 'class' => 'xsmall', 'description' => __('Repeat (x)', 'themify')))));
        return $animation;
    }
    public function get_styling()
    {
        $styling = array(array('id' => 'separator_image_background', 'title' => '', 'description' => '', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Background', 'themify') . '</h4>')), array('id' => 'background_color', 'type' => 'color', 'label' => __('Background Color', 'themify'), 'class' => 'small', 'prop' => 'background-color', 'selector' => array('.module-post .post')), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_font', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Font', 'themify') . '</h4>')), array('id' => 'font_family', 'type' => 'font_select', 'label' => __('Font Family', 'themify'), 'class' => 'font-family-select', 'prop' => 'font-family', 'selector' => array('.module-post .post-title', '.module-post .post-title a')), array('id' => 'font_color', 'type' => 'color', 'label' => __('Font Color', 'themify'), 'class' => 'small', 'prop' => 'color', 'selector' => array('.module-post .post', '.module-post h1', '.module-post h2', '.module-post h3:not(.module-title)', '.module-post h4', '.module-post h5', '.module-post h6', '.module-post .post-title', '.module-post .post-title a')), array('id' => 'multi_font_size', 'type' => 'multi', 'label' => __('Font Size', 'themify'), 'fields' => array(array('id' => 'font_size', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'font_size_unit', 'type' => 'select', 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'px', 'name' => __('px', 'themify')), array('value' => 'em', 'name' => __('em', 'themify')))))), array('id' => 'multi_line_height', 'type' => 'multi', 'label' => __('Line Height', 'themify'), 'fields' => array(array('id' => 'line_height', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'line_height_unit', 'type' => 'select', 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'px', 'name' => __('px', 'themify')), array('value' => 'em', 'name' => __('em', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'text_align', 'label' => __('Text Align', 'themify'), 'type' => 'radio', 'meta' => array(array('value' => '', 'name' => __('Default', 'themify'), 'selected' => true), array('value' => 'left', 'name' => __('Left', 'themify')), array('value' => 'center', 'name' => __('Center', 'themify')), array('value' => 'right', 'name' => __('Right', 'themify')), array('value' => 'justify', 'name' => __('Justify', 'themify'))), 'prop' => 'text-align', 'selector' => '.module-post .post'), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_link', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Link', 'themify') . '</h4>')), array('id' => 'link_color', 'type' => 'color', 'label' => __('Color', 'themify'), 'class' => 'small', 'prop' => 'color', 'selector' => '.module-post a'), array('id' => 'text_decoration', 'type' => 'select', 'label' => __('Text Decoration', 'themify'), 'meta' => array(array('value' => '', 'name' => '', 'selected' => true), array('value' => 'underline', 'name' => __('Underline', 'themify')), array('value' => 'overline', 'name' => __('Overline', 'themify')), array('value' => 'line-through', 'name' => __('Line through', 'themify')), array('value' => 'none', 'name' => __('None', 'themify'))), 'prop' => 'text-decoration', 'selector' => '.module-post a'), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_padding', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Padding', 'themify') . '</h4>')), array('id' => 'multi_padding_top', 'type' => 'multi', 'label' => __('Padding', 'themify'), 'fields' => array(array('id' => 'padding_top', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'padding-top', 'selector' => '.module-post .post'), array('id' => 'padding_top_unit', 'type' => 'select', 'description' => __('top', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_padding_right', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'padding_right', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'padding-right', 'selector' => '.module-post .post'), array('id' => 'padding_right_unit', 'type' => 'select', 'description' => __('right', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_padding_bottom', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'padding_bottom', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'padding-bottom', 'selector' => '.module-post .post'), array('id' => 'padding_bottom_unit', 'type' => 'select', 'description' => __('bottom', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_padding_left', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'padding_left', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'padding-left', 'selector' => '.module-post .post'), array('id' => 'padding_left_unit', 'type' => 'select', 'description' => __('left', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_margin', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Margin', 'themify') . '</h4>')), array('id' => 'multi_margin_top', 'type' => 'multi', 'label' => __('Margin', 'themify'), 'fields' => array(array('id' => 'margin_top', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'margin-top', 'selector' => '.module-post .post'), array('id' => 'margin_top_unit', 'type' => 'select', 'description' => __('top', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_margin_right', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'margin_right', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'margin-right', 'selector' => '.module-post .post'), array('id' => 'margin_right_unit', 'type' => 'select', 'description' => __('right', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_margin_bottom', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'margin_bottom', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'margin-bottom', 'selector' => '.module-post .post'), array('id' => 'margin_bottom_unit', 'type' => 'select', 'description' => __('bottom', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_margin_left', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'margin_left', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'margin-left', 'selector' => '.module-post .post'), array('id' => 'margin_left_unit', 'type' => 'select', 'description' => __('left', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_border', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Border', 'themify') . '</h4>')), array('id' => 'multi_border_top', 'type' => 'multi', 'label' => __('Border', 'themify'), 'fields' => array(array('id' => 'border_top_color', 'type' => 'color', 'class' => 'small', 'prop' => 'border-top-color', 'selector' => '.module-post .post'), array('id' => 'border_top_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall', 'prop' => 'border-top-width', 'selector' => '.module-post .post'), array('id' => 'border_top_style', 'type' => 'select', 'description' => __('top', 'themify'), 'meta' => Themify_Builder_model::get_border_styles(), 'prop' => 'border-top-style', 'selector' => '.module-post .post'))), array('id' => 'multi_border_right', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'border_right_color', 'type' => 'color', 'class' => 'small', 'prop' => 'border-right-color', 'selector' => '.module-post .post'), array('id' => 'border_right_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall', 'prop' => 'border-right-width', 'selector' => '.module-post .post'), array('id' => 'border_right_style', 'type' => 'select', 'description' => __('right', 'themify'), 'meta' => Themify_Builder_model::get_border_styles(), 'prop' => 'border-right-style', 'selector' => '.module-post .post'))), array('id' => 'multi_border_bottom', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'border_bottom_color', 'type' => 'color', 'class' => 'small', 'prop' => 'border-bottom-color', 'selector' => '.module-post .post'), array('id' => 'border_bottom_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall', 'prop' => 'border-bottom-width', 'selector' => '.module-post .post'), array('id' => 'border_bottom_style', 'type' => 'select', 'description' => __('bottom', 'themify'), 'meta' => Themify_Builder_model::get_border_styles(), 'prop' => 'border-bottom-style', 'selector' => '.module-post .post'))), array('id' => 'multi_border_left', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'border_left_color', 'type' => 'color', 'class' => 'small', 'prop' => 'border-left-color', 'selector' => '.module-post .post'), array('id' => 'border_left_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall', 'prop' => 'border-left-width', 'selector' => '.module-post .post'), array('id' => 'border_left_style', 'type' => 'select', 'description' => __('left', 'themify'), 'meta' => Themify_Builder_model::get_border_styles(), 'prop' => 'border-left-style', 'selector' => '.module-post .post'))), array('type' => 'separator', 'meta' => array('html' => '<hr/>')), array('id' => 'css_post', 'type' => 'text', 'label' => __('Additional CSS Class', 'themify'), 'class' => 'large exclude-from-reset-field', 'description' => sprintf('<br/><small>%s</small>', __('Add additional CSS class(es) for custom styling', 'themify'))));
        return $styling;
    }
}
///////////////////////////////////////
// Module Options
///////////////////////////////////////
Themify_Builder_Model::register_module('TB_Post_Module');
// Exit if accessed directly
/**
 * Module Name: Video
 * Description: Display Video content
 */
class TB_Video_Module extends Themify_Builder_Module
{
    function __construct()
    {
        parent::__construct(array('name' => __('Video', 'themify'), 'slug' => 'video'));
    }
    public function get_title($module)
    {
        return isset($module['mod_settings']['title_video']) ? esc_html($module['mod_settings']['title_video']) : '';
    }
    public function get_options()
    {
        $options = array(array('id' => 'mod_title_video', 'type' => 'text', 'label' => __('Module Title', 'themify'), 'class' => 'large'), array('id' => 'style_video', 'type' => 'layout', 'label' => __('Video Style', 'themify'), 'options' => array(array('img' => 'video-top.png', 'value' => 'video-top', 'label' => __('Video Top', 'themify')), array('img' => 'video-left.png', 'value' => 'video-left', 'label' => __('Video Left', 'themify')), array('img' => 'video-right.png', 'value' => 'video-right', 'label' => __('Video Right', 'themify')), array('img' => 'video-overlay.png', 'value' => 'video-overlay', 'label' => __('Video Overlay', 'themify')))), array('id' => 'url_video', 'type' => 'text', 'label' => __('Video URL', 'themify'), 'class' => 'fullwidth', 'help' => __('YouTube, Vimeo, etc. video <a href="http://themify.me/docs/video-embeds" target="_blank">embed link</a>', 'themify')), array('id' => 'width_video', 'type' => 'text', 'label' => __('Video Width', 'themify'), 'class' => 'xsmall', 'help' => __('Enter fixed witdth (eg. 200px) or relative (eg. 100%). Video height is auto adjusted.', 'themify'), 'break' => true, 'unit' => array('id' => 'unit_video', 'options' => array(array('id' => 'pixel_unit', 'value' => 'px'), array('id' => 'percent_unit', 'value' => '%')))), array('id' => 'title_video', 'type' => 'text', 'label' => __('Video Title', 'themify'), 'class' => 'xlarge'), array('id' => 'title_link_video', 'type' => 'text', 'label' => __('Video Title Link', 'themify'), 'class' => 'xlarge'), array('id' => 'caption_video', 'type' => 'textarea', 'label' => __('Video Caption', 'themify'), 'class' => 'fullwidth'));
        return $options;
    }
    public function get_styling()
    {
        $styling = array(array('id' => 'separator_animation', 'title' => '', 'description' => '', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Animation', 'themify') . '</h4>')), array('id' => 'animation_effect', 'type' => 'animation_select', 'label' => __('Effect', 'themify'), 'class' => ''), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_image_background', 'title' => '', 'description' => '', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Background', 'themify') . '</h4>')), array('id' => 'background_color', 'type' => 'color', 'label' => __('Background Color', 'themify'), 'class' => 'small', 'prop' => 'background-color', 'selector' => '.module-video'), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_font', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Font', 'themify') . '</h4>')), array('id' => 'font_family', 'type' => 'font_select', 'label' => __('Font Family', 'themify'), 'class' => 'font-family-select', 'prop' => 'font-family', 'selector' => array('.module-video .video-content', '.module-video .video-title', '.module-video .video-title a')), array('id' => 'font_color', 'type' => 'color', 'label' => __('Font Color', 'themify'), 'class' => 'small', 'prop' => 'border-left-style', 'selector' => array('.module-video .video-content', '.module-video .video-title', '.module-video .video-title a', '.module-video h1', '.module-video h2', '.module-video h3:not(.module-title)', '.module-video h4', '.module-video h5', '.module-video h6')), array('id' => 'multi_font_size', 'type' => 'multi', 'label' => __('Font Size', 'themify'), 'fields' => array(array('id' => 'font_size', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'font-size', 'selector' => '.module-video .video-content'), array('id' => 'font_size_unit', 'type' => 'select', 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'px', 'name' => __('px', 'themify')), array('value' => 'em', 'name' => __('em', 'themify')))))), array('id' => 'multi_line_height', 'type' => 'multi', 'label' => __('Line Height', 'themify'), 'fields' => array(array('id' => 'line_height', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'line-height', 'selector' => '.module-video .video-content'), array('id' => 'line_height_unit', 'type' => 'select', 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'px', 'name' => __('px', 'themify')), array('value' => 'em', 'name' => __('em', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'text_align', 'label' => __('Text Align', 'themify'), 'type' => 'radio', 'meta' => array(array('value' => '', 'name' => __('Default', 'themify'), 'selected' => true), array('value' => 'left', 'name' => __('Left', 'themify')), array('value' => 'center', 'name' => __('Center', 'themify')), array('value' => 'right', 'name' => __('Right', 'themify')), array('value' => 'justify', 'name' => __('Justify', 'themify'))), 'prop' => 'text-align', 'selector' => '.module-video .video-content'), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_link', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Link', 'themify') . '</h4>')), array('id' => 'link_color', 'type' => 'color', 'label' => __('Color', 'themify'), 'class' => 'small', 'prop' => 'color', 'selector' => '.module-video a'), array('id' => 'text_decoration', 'type' => 'select', 'label' => __('Text Decoration', 'themify'), 'meta' => array(array('value' => '', 'name' => '', 'selected' => true), array('value' => 'underline', 'name' => __('Underline', 'themify')), array('value' => 'overline', 'name' => __('Overline', 'themify')), array('value' => 'line-through', 'name' => __('Line through', 'themify')), array('value' => 'none', 'name' => __('None', 'themify'))), 'prop' => 'text-decoration', 'selector' => '.module-video a'), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_padding', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Padding', 'themify') . '</h4>')), array('id' => 'multi_padding_top', 'type' => 'multi', 'label' => __('Padding', 'themify'), 'fields' => array(array('id' => 'padding_top', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'padding-top', 'selector' => '.module-video'), array('id' => 'padding_top_unit', 'type' => 'select', 'description' => __('top', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_padding_right', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'padding_right', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'padding-right', 'selector' => '.module-video'), array('id' => 'padding_right_unit', 'type' => 'select', 'description' => __('right', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_padding_bottom', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'padding_bottom', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'padding-bottom', 'selector' => '.module-video'), array('id' => 'padding_bottom_unit', 'type' => 'select', 'description' => __('bottom', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_padding_left', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'padding_left', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'padding-left', 'selector' => '.module-video'), array('id' => 'padding_left_unit', 'type' => 'select', 'description' => __('left', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_margin', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Margin', 'themify') . '</h4>')), array('id' => 'multi_margin_top', 'type' => 'multi', 'label' => __('Margin', 'themify'), 'fields' => array(array('id' => 'margin_top', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'margin-top', 'selector' => '.module-video'), array('id' => 'margin_top_unit', 'type' => 'select', 'description' => __('top', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_margin_right', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'margin_right', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'margin-right', 'selector' => '.module-video'), array('id' => 'margin_right_unit', 'type' => 'select', 'description' => __('right', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_margin_bottom', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'margin_bottom', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'margin-bottom', 'selector' => '.module-video'), array('id' => 'margin_bottom_unit', 'type' => 'select', 'description' => __('bottom', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_margin_left', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'margin_left', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'margin-left', 'selector' => '.module-video'), array('id' => 'margin_left_unit', 'type' => 'select', 'description' => __('left', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_border', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Border', 'themify') . '</h4>')), array('id' => 'multi_border_top', 'type' => 'multi', 'label' => __('Border', 'themify'), 'fields' => array(array('id' => 'border_top_color', 'type' => 'color', 'class' => 'small', 'prop' => 'border-top-color', 'selector' => '.module-video'), array('id' => 'border_top_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall', 'prop' => 'border-top-width', 'selector' => '.module-video'), array('id' => 'border_top_style', 'type' => 'select', 'description' => __('top', 'themify'), 'meta' => Themify_Builder_model::get_border_styles(), 'prop' => 'border-top-style', 'selector' => '.module-video'))), array('id' => 'multi_border_right', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'border_right_color', 'type' => 'color', 'class' => 'small', 'prop' => 'border-right-color', 'selector' => '.module-video'), array('id' => 'border_right_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall', 'prop' => 'border-right-width', 'selector' => '.module-video'), array('id' => 'border_right_style', 'type' => 'select', 'description' => __('right', 'themify'), 'meta' => Themify_Builder_model::get_border_styles(), 'prop' => 'border-right-style', 'selector' => '.module-video'))), array('id' => 'multi_border_bottom', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'border_bottom_color', 'type' => 'color', 'class' => 'small', 'prop' => 'border-bottom-color', 'selector' => '.module-video'), array('id' => 'border_bottom_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall', 'prop' => 'border-bottom-width', 'selector' => '.module-video'), array('id' => 'border_bottom_style', 'type' => 'select', 'description' => __('bottom', 'themify'), 'meta' => Themify_Builder_model::get_border_styles(), 'prop' => 'border-bottom-style', 'selector' => '.module-video'))), array('id' => 'multi_border_left', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'border_left_color', 'type' => 'color', 'class' => 'small', 'prop' => 'border-left-color', 'selector' => '.module-video'), array('id' => 'border_left_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall', 'prop' => 'border-left-width', 'selector' => '.module-video'), array('id' => 'border_left_style', 'type' => 'select', 'description' => __('left', 'themify'), 'meta' => Themify_Builder_model::get_border_styles(), 'prop' => 'border-left-style', 'selector' => '.module-video'))), array('type' => 'separator', 'meta' => array('html' => '<hr/>')), array('id' => 'css_video', 'type' => 'text', 'label' => __('Additional CSS Class', 'themify'), 'class' => 'large exclude-from-reset-field', 'description' => sprintf('<br/><small>%s</small>', __('Add additional CSS class(es) for custom styling', 'themify'))));
        return $styling;
    }
}
///////////////////////////////////////
// Module Options
///////////////////////////////////////
Themify_Builder_Model::register_module('TB_Video_Module');
<?php

if (!defined('ABSPATH')) {
    exit;
}
// Exit if accessed directly
/**
 * Module Name: Accordion
 * Description: Display Accordion content
 */
class TB_Accordion_Module extends Themify_Builder_Module
{
    function __construct()
    {
        parent::__construct(array('name' => __('Accordion', 'themify'), 'slug' => 'accordion'));
    }
}
///////////////////////////////////////
// Module Options
///////////////////////////////////////
Themify_Builder_Model::register_module('TB_Accordion_Module', apply_filters('themify_builder_module_accordion', array('options' => array(array('id' => 'mod_title_accordion', 'type' => 'text', 'label' => __('Module Title', 'themify'), 'class' => 'large'), array('id' => 'layout_accordion', 'type' => 'layout', 'label' => __('Accordion layout', 'themify'), 'options' => array(array('img' => 'accordion-default.png', 'value' => 'default', 'label' => __('Plus Icon Button', 'themify')), array('img' => 'accordion-separate.png', 'value' => 'separate', 'label' => __('Pipe', 'themify')))), array('id' => 'expand_collapse_accordion', 'type' => 'radio', 'label' => __('Expand / Collapse', 'themify'), 'default' => 'toggle', 'options' => array('toggle' => __('Toggle <small>(only clicked item is toggled)</small>', 'themify'), 'accordion' => __('Accordion <small>(collapse all, but keep clicked item expanded)</small>', 'themify')), 'break' => true), array('id' => 'color_accordion', 'type' => 'layout', 'label' => __('Accordion Color', 'themify'), 'options' => array(array('img' => 'color-default.png', 'value' => 'default', 'label' => __('default', 'themify')), array('img' => 'color-black.png', 'value' => 'black', 'label' => __('black', 'themify')), array('img' => 'color-grey.png', 'value' => 'gray', 'label' => __('gray', 'themify')), array('img' => 'color-blue.png', 'value' => 'blue', 'label' => __('blue', 'themify')), array('img' => 'color-light-blue.png', 'value' => 'light-blue', 'label' => __('light-blue', 'themify')), array('img' => 'color-green.png', 'value' => 'green', 'label' => __('green', 'themify')), array('img' => 'color-light-green.png', 'value' => 'light-green', 'label' => __('light-green', 'themify')), array('img' => 'color-purple.png', 'value' => 'purple', 'label' => __('purple', 'themify')), array('img' => 'color-light-purple.png', 'value' => 'light-purple', 'label' => __('light-purple', 'themify')), array('img' => 'color-brown.png', 'value' => 'brown', 'label' => __('brown', 'themify')), array('img' => 'color-orange.png', 'value' => 'orange', 'label' => __('orange', 'themify')), array('img' => 'color-yellow.png', 'value' => 'yellow', 'label' => __('yellow', 'themify')), array('img' => 'color-red.png', 'value' => 'red', 'label' => __('red', 'themify')), array('img' => 'color-pink.png', 'value' => 'pink', 'label' => __('pink', 'themify')))), array('id' => 'accordion_appearance_accordion', 'type' => 'checkbox', 'label' => __('Accordion Appearance', 'themify'), 'default' => array('rounded', 'gradient'), 'options' => array(array('name' => 'rounded', 'value' => __('Rounded', 'themify')), array('name' => 'gradient', 'value' => __('Gradient', 'themify')), array('name' => 'glossy', 'value' => __('Glossy', 'themify')), array('name' => 'embossed', 'value' => __('Embossed', 'themify')), array('name' => 'shadow', 'value' => __('Shadow', 'themify')))), array('id' => 'content_accordion', 'type' => 'builder', 'options' => array(array('id' => 'title_accordion', 'type' => 'text', 'label' => __('Accordion Title', 'themify'), 'class' => 'large'), array('id' => 'text_accordion', 'type' => 'wp_editor', 'label' => false, 'class' => 'fullwidth', 'rows' => 6), array('id' => 'default_accordion', 'type' => 'radio', 'label' => __('Default', 'themify'), 'default' => 'toggle', 'options' => array('closed' => __('closed', 'themify'), 'open' => __('open', 'themify')))))), 'styling' => array(array('id' => 'separator_animation', 'title' => '', 'description' => '', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Animation', 'themify') . '</h4>')), array('id' => 'animation_effect', 'type' => 'animation_select', 'label' => __('Effect', 'themify'), 'class' => ''), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_image_background', 'title' => '', 'description' => '', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Background', 'themify') . '</h4>')), array('id' => 'background_color', 'type' => 'color', 'label' => __('Background Color', 'themify'), 'class' => 'small'), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_font', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Font', 'themify') . '</h4>')), array('id' => 'font_family', 'type' => 'font_select', 'label' => __('Font Family', 'themify'), 'class' => 'font-family-select'), array('id' => 'font_color', 'type' => 'color', 'label' => __('Font Color', 'themify'), 'class' => 'small'), array('id' => 'multi_font_size', 'type' => 'multi', 'label' => __('Font Size', 'themify'), 'fields' => array(array('id' => 'font_size', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'font_size_unit', 'type' => 'select', 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'px', 'name' => __('px', 'themify')), array('value' => 'em', 'name' => __('em', 'themify')))))), array('id' => 'multi_line_height', 'type' => 'multi', 'label' => __('Line Height', 'themify'), 'fields' => array(array('id' => 'line_height', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'line_height_unit', 'type' => 'select', 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'px', 'name' => __('px', 'themify')), array('value' => 'em', 'name' => __('em', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'text_align', 'label' => __('Text Align', 'themify'), 'type' => 'radio', 'meta' => array(array('value' => '', 'name' => __('Default', 'themify'), 'selected' => true), array('value' => 'left', 'name' => __('Left', 'themify')), array('value' => 'center', 'name' => __('Center', 'themify')), array('value' => 'right', 'name' => __('Right', 'themify')), array('value' => 'justify', 'name' => __('Justify', 'themify')))), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_link', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Link', 'themify') . '</h4>')), array('id' => 'link_color', 'type' => 'color', 'label' => __('Color', 'themify'), 'class' => 'small'), array('id' => 'text_decoration', 'type' => 'select', 'label' => __('Text Decoration', 'themify'), 'meta' => array(array('value' => '', 'name' => '', 'selected' => true), array('value' => 'underline', 'name' => __('Underline', 'themify')), array('value' => 'overline', 'name' => __('Overline', 'themify')), array('value' => 'line-through', 'name' => __('Line through', 'themify')), array('value' => 'none', 'name' => __('None', 'themify')))), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_padding', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Padding', 'themify') . '</h4>')), array('id' => 'multi_padding_top', 'type' => 'multi', 'label' => __('Padding', 'themify'), 'fields' => array(array('id' => 'padding_top', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'padding_top_unit', 'type' => 'select', 'description' => __('top', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_padding_right', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'padding_right', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'padding_right_unit', 'type' => 'select', 'description' => __('right', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_padding_bottom', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'padding_bottom', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'padding_bottom_unit', 'type' => 'select', 'description' => __('bottom', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_padding_left', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'padding_left', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'padding_left_unit', 'type' => 'select', 'description' => __('left', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_margin', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Margin', 'themify') . '</h4>')), array('id' => 'multi_margin_top', 'type' => 'multi', 'label' => __('Margin', 'themify'), 'fields' => array(array('id' => 'margin_top', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'margin_top_unit', 'type' => 'select', 'description' => __('top', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_margin_right', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'margin_right', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'margin_right_unit', 'type' => 'select', 'description' => __('right', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_margin_bottom', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'margin_bottom', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'margin_bottom_unit', 'type' => 'select', 'description' => __('bottom', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_margin_left', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'margin_left', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'margin_left_unit', 'type' => 'select', 'description' => __('left', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_border', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Border', 'themify') . '</h4>')), array('id' => 'multi_border_top', 'type' => 'multi', 'label' => __('Border', 'themify'), 'fields' => array(array('id' => 'border_top_color', 'type' => 'color', 'class' => 'small'), array('id' => 'border_top_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall'), array('id' => 'border_top_style', 'type' => 'select', 'description' => __('top', 'themify'), 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'solid', 'name' => __('Solid', 'themify')), array('value' => 'dashed', 'name' => __('Dashed', 'themify')), array('value' => 'dotted', 'name' => __('Dotted', 'themify')), array('value' => 'double', 'name' => __('Double', 'themify')))))), array('id' => 'multi_border_right', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'border_right_color', 'type' => 'color', 'class' => 'small'), array('id' => 'border_right_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall'), array('id' => 'border_right_style', 'type' => 'select', 'description' => __('right', 'themify'), 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'solid', 'name' => __('Solid', 'themify')), array('value' => 'dashed', 'name' => __('Dashed', 'themify')), array('value' => 'dotted', 'name' => __('Dotted', 'themify')), array('value' => 'double', 'name' => __('Double', 'themify')))))), array('id' => 'multi_border_bottom', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'border_bottom_color', 'type' => 'color', 'class' => 'small'), array('id' => 'border_bottom_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall'), array('id' => 'border_bottom_style', 'type' => 'select', 'description' => __('bottom', 'themify'), 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'solid', 'name' => __('Solid', 'themify')), array('value' => 'dashed', 'name' => __('Dashed', 'themify')), array('value' => 'dotted', 'name' => __('Dotted', 'themify')), array('value' => 'double', 'name' => __('Double', 'themify')))))), array('id' => 'multi_border_left', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'border_left_color', 'type' => 'color', 'class' => 'small'), array('id' => 'border_left_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall'), array('id' => 'border_left_style', 'type' => 'select', 'description' => __('left', 'themify'), 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'solid', 'name' => __('Solid', 'themify')), array('value' => 'dashed', 'name' => __('Dashed', 'themify')), array('value' => 'dotted', 'name' => __('Dotted', 'themify')), array('value' => 'double', 'name' => __('Double', 'themify')))))), array('type' => 'separator', 'meta' => array('html' => '<hr/>')), array('id' => 'css_accordion', 'type' => 'text', 'label' => __('Additional CSS Class', 'themify'), 'class' => 'large exclude-from-reset-field', 'description' => sprintf('<br/><small>%s</small>', __('Add additional CSS class(es) for custom styling', 'themify')))), 'styling_selector' => array(' .ui.module-accordion' => array('font_size', 'line_height', 'text_align', 'font_family', 'color', 'margin'), ' .ui.module-accordion a' => array('link_color', 'text_decoration'), ' .ui.module-accordion .accordion-title a' => array('background_color', 'padding'), ' .ui.module-accordion .accordion-content' => array('background_color', 'padding', 'border_top', 'border_right', 'border_bottom', 'border_left')))));
Exemple #21
0
{
    function __construct()
    {
        parent::__construct(array('name' => __('Menu', 'themify'), 'slug' => 'menu'));
    }
    public function get_title($module)
    {
        return isset($module['mod_settings']['custom_menu']) ? $module['mod_settings']['custom_menu'] : '';
    }
    public function get_options()
    {
        $menus = get_terms('nav_menu', array('hide_empty' => true));
        $options = array(array('id' => 'mod_title_menu', 'type' => 'text', 'label' => __('Module Title', 'themify'), 'class' => 'large'), array('id' => 'layout_menu', 'type' => 'layout', 'label' => __('Menu Layout', 'themify'), 'options' => array(array('img' => 'menu-bar.png', 'value' => 'menu-bar', 'label' => __('Menu Bar', 'themify')), array('img' => 'menu-fullbar.png', 'value' => 'fullwidth', 'label' => __('Menu Fullbar', 'themify')), array('img' => 'menu-vertical.png', 'value' => 'vertical', 'label' => __('Menu Vertical', 'themify')))), array('id' => 'custom_menu', 'type' => 'select_menu', 'label' => __('Custom Menu', 'themify'), 'options' => $menus, 'help' => sprintf(__('Add more <a href="%s" target="_blank">menu</a>', 'themify'), admin_url('nav-menus.php')), 'break' => true), array('id' => 'color_menu', 'type' => 'layout', 'label' => __('Menu Color', 'themify'), 'options' => array(array('img' => 'color-default.png', 'value' => 'default', 'label' => __('default', 'themify')), array('img' => 'color-black.png', 'value' => 'black', 'label' => __('black', 'themify')), array('img' => 'color-grey.png', 'value' => 'gray', 'label' => __('gray', 'themify')), array('img' => 'color-blue.png', 'value' => 'blue', 'label' => __('blue', 'themify')), array('img' => 'color-light-blue.png', 'value' => 'light-blue', 'label' => __('light-blue', 'themify')), array('img' => 'color-green.png', 'value' => 'green', 'label' => __('green', 'themify')), array('img' => 'color-light-green.png', 'value' => 'light-green', 'label' => __('light-green', 'themify')), array('img' => 'color-purple.png', 'value' => 'purple', 'label' => __('purple', 'themify')), array('img' => 'color-light-purple.png', 'value' => 'light-purple', 'label' => __('light-purple', 'themify')), array('img' => 'color-brown.png', 'value' => 'brown', 'label' => __('brown', 'themify')), array('img' => 'color-orange.png', 'value' => 'orange', 'label' => __('orange', 'themify')), array('img' => 'color-yellow.png', 'value' => 'yellow', 'label' => __('yellow', 'themify')), array('img' => 'color-red.png', 'value' => 'red', 'label' => __('red', 'themify')), array('img' => 'color-pink.png', 'value' => 'pink', 'label' => __('pink', 'themify')), array('img' => 'color-transparent.png', 'value' => 'transparent', 'label' => __('Transparent', 'themify')))), array('id' => 'according_style_menu', 'type' => 'checkbox', 'label' => __('According Styles', 'themify'), 'options' => array(array('name' => 'rounded', 'value' => __('Rounded', 'themify')), array('name' => 'gradient', 'value' => __('Gradient', 'themify')), array('name' => 'glossy', 'value' => __('Glossy', 'themify')), array('name' => 'embossed', 'value' => __('Embossed', 'themify')), array('name' => 'shadow', 'value' => __('Shadow', 'themify')))));
        return $options;
    }
    public function get_animation()
    {
        $animation = array(array('id' => 'multi_Animation Effect', 'type' => 'multi', 'label' => __('Effect', 'themify'), 'fields' => array(array('id' => 'animation_effect', 'type' => 'animation_select', 'label' => __('Effect', 'themify')), array('id' => 'animation_effect_delay', 'type' => 'text', 'label' => __('Delay', 'themify'), 'class' => 'xsmall', 'description' => __('Delay (s)', 'themify')), array('id' => 'animation_effect_repeat', 'type' => 'text', 'label' => __('Repeat', 'themify'), 'class' => 'xsmall', 'description' => __('Repeat (x)', 'themify')))));
        return $animation;
    }
    public function get_styling()
    {
        $styling = array(array('id' => 'separator_image_background', 'title' => '', 'description' => '', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Background', 'themify') . '</h4>')), array('id' => 'background_color', 'type' => 'color', 'label' => __('Background Color', 'themify'), 'class' => 'small', 'prop' => 'background-color', 'selector' => '.module-menu .nav li'), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_font', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Font', 'themify') . '</h4>')), array('id' => 'font_family', 'type' => 'font_select', 'label' => __('Font Family', 'themify'), 'class' => 'font-family-select', 'prop' => 'font-family', 'selector' => '.module-menu .nav li'), array('id' => 'font_color', 'type' => 'color', 'label' => __('Font Color', 'themify'), 'class' => 'small', 'prop' => 'color', 'selector' => '.module-menu .nav li'), array('id' => 'multi_font_size', 'type' => 'multi', 'label' => __('Font Size', 'themify'), 'fields' => array(array('id' => 'font_size', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'font-size', 'selector' => '.module-menu .nav li'), array('id' => 'font_size_unit', 'type' => 'select', 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'px', 'name' => __('px', 'themify')), array('value' => 'em', 'name' => __('em', 'themify')))))), array('id' => 'multi_line_height', 'type' => 'multi', 'label' => __('Line Height', 'themify'), 'fields' => array(array('id' => 'line_height', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'line-height', 'selector' => '.module-menu .nav li'), array('id' => 'line_height_unit', 'type' => 'select', 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'px', 'name' => __('px', 'themify')), array('value' => 'em', 'name' => __('em', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'text_align', 'label' => __('Text Align', 'themify'), 'type' => 'radio', 'meta' => array(array('value' => '', 'name' => __('Default', 'themify'), 'selected' => true), array('value' => 'left', 'name' => __('Left', 'themify')), array('value' => 'center', 'name' => __('Center', 'themify')), array('value' => 'right', 'name' => __('Right', 'themify')), array('value' => 'justify', 'name' => __('Justify', 'themify'))), 'prop' => 'text-align', 'selector' => '.module-menu .nav li'), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_link', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Link', 'themify') . '</h4>')), array('id' => 'link_color', 'type' => 'color', 'label' => __('Color', 'themify'), 'class' => 'small', 'prop' => 'color', 'selector' => '.module-menu a'), array('id' => 'text_decoration', 'type' => 'select', 'label' => __('Text Decoration', 'themify'), 'meta' => array(array('value' => '', 'name' => '', 'selected' => true), array('value' => 'underline', 'name' => __('Underline', 'themify')), array('value' => 'overline', 'name' => __('Overline', 'themify')), array('value' => 'line-through', 'name' => __('Line through', 'themify')), array('value' => 'none', 'name' => __('None', 'themify'))), 'prop' => 'text-decoration', 'selector' => '.module-menu a'), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_padding', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Padding', 'themify') . '</h4>')), array('id' => 'multi_padding_top', 'type' => 'multi', 'label' => __('Padding', 'themify'), 'fields' => array(array('id' => 'padding_top', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'padding-top', 'selector' => '.module-menu .nav li'), array('id' => 'padding_top_unit', 'type' => 'select', 'description' => __('top', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_padding_right', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'padding_right', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'padding-right', 'selector' => '.module-menu .nav li'), array('id' => 'padding_right_unit', 'type' => 'select', 'description' => __('right', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_padding_bottom', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'padding_bottom', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'padding-bottom', 'selector' => '.module-menu .nav li'), array('id' => 'padding_bottom_unit', 'type' => 'select', 'description' => __('bottom', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_padding_left', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'padding_left', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'padding-left', 'selector' => '.module-menu .nav li'), array('id' => 'padding_left_unit', 'type' => 'select', 'description' => __('left', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_margin', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Margin', 'themify') . '</h4>')), array('id' => 'multi_margin_top', 'type' => 'multi', 'label' => __('Margin', 'themify'), 'fields' => array(array('id' => 'margin_top', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'margin-top', 'selector' => '.module-menu'), array('id' => 'margin_top_unit', 'type' => 'select', 'description' => __('top', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_margin_right', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'margin_right', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'margin-right', 'selector' => '.module-menu'), array('id' => 'margin_right_unit', 'type' => 'select', 'description' => __('right', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_margin_bottom', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'margin_bottom', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'margin-bottom', 'selector' => '.module-menu'), array('id' => 'margin_bottom_unit', 'type' => 'select', 'description' => __('bottom', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_margin_left', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'margin_left', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'margin-left', 'selector' => '.module-menu'), array('id' => 'margin_left_unit', 'type' => 'select', 'description' => __('left', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_border', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Border', 'themify') . '</h4>')), array('id' => 'multi_border_top', 'type' => 'multi', 'label' => __('Border', 'themify'), 'fields' => array(array('id' => 'border_top_color', 'type' => 'color', 'class' => 'small', 'prop' => 'border-top-color', 'selector' => '.module-menu .nav li'), array('id' => 'border_top_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall', 'prop' => 'border-top-width', 'selector' => '.module-menu .nav li'), array('id' => 'border_top_style', 'type' => 'select', 'description' => __('top', 'themify'), 'meta' => Themify_Builder_model::get_border_styles(), 'prop' => 'border-top-style', 'selector' => '.module-menu .nav li'))), array('id' => 'multi_border_right', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'border_right_color', 'type' => 'color', 'class' => 'small', 'prop' => 'border-right-color', 'selector' => '.module-menu .nav li'), array('id' => 'border_right_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall', 'prop' => 'border-right-width', 'selector' => '.module-menu .nav li'), array('id' => 'border_right_style', 'type' => 'select', 'description' => __('right', 'themify'), 'meta' => Themify_Builder_model::get_border_styles(), 'prop' => 'border-right-style', 'selector' => '.module-menu .nav li'))), array('id' => 'multi_border_bottom', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'border_bottom_color', 'type' => 'color', 'class' => 'small', 'prop' => 'border-bottom-color', 'selector' => '.module-menu .nav li'), array('id' => 'border_bottom_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall', 'prop' => 'border-bottom-width', 'selector' => '.module-menu .nav li'), array('id' => 'border_bottom_style', 'type' => 'select', 'description' => __('bottom', 'themify'), 'meta' => Themify_Builder_model::get_border_styles(), 'prop' => 'border-bottom-style', 'selector' => '.module-menu .nav li'))), array('id' => 'multi_border_left', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'border_left_color', 'type' => 'color', 'class' => 'small', 'prop' => 'border-left-color', 'selector' => '.module-menu .nav li'), array('id' => 'border_left_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall', 'prop' => 'border-left-width', 'selector' => '.module-menu .nav li'), array('id' => 'border_left_style', 'type' => 'select', 'description' => __('left', 'themify'), 'meta' => Themify_Builder_model::get_border_styles(), 'prop' => 'border-left-style', 'selector' => '.module-menu .nav li'))), array('type' => 'separator', 'meta' => array('html' => '<hr/>')), array('id' => 'css_menu', 'type' => 'text', 'label' => __('Additional CSS Class', 'themify'), 'class' => 'large exclude-from-reset-field', 'description' => sprintf('<br/><small>%s</small>', __('Add additional CSS class(es) for custom styling', 'themify'))));
        return $styling;
    }
}
///////////////////////////////////////
// Module Options
///////////////////////////////////////
Themify_Builder_Model::register_module('TB_Menu_Module');
<?php

if (!defined('ABSPATH')) {
    exit;
}
// Exit if accessed directly
/**
 * Module Name: Gallery
 * Description: Display WP Gallery Images
 */
class TB_Gallery_Module extends Themify_Builder_Module
{
    function __construct()
    {
        parent::__construct(array('name' => __('Gallery', 'themify'), 'slug' => 'gallery'));
    }
}
///////////////////////////////////////
// Module Options
///////////////////////////////////////
Themify_Builder_Model::register_module('TB_Gallery_Module', apply_filters('themify_builder_module_gallery', array('options' => array(array('id' => 'mod_title_gallery', 'type' => 'text', 'label' => __('Module Title', 'themify'), 'class' => 'large'), array('id' => 'layout_gallery', 'type' => 'layout', 'label' => __('Gallery Layout', 'themify'), 'options' => array(array('img' => 'grid4.png', 'value' => 'grid', 'label' => __('Grid', 'themify')), array('img' => 'showcase.png', 'value' => 'showcase', 'label' => __('Showcase', 'themify')))), array('id' => 'shortcode_gallery', 'type' => 'textarea', 'class' => 'fullwidth tf-shortcode-input', 'label' => __('Insert Gallery Shortcode', 'themify'), 'help' => sprintf('<a href="#" class="builder_button tf-gallery-btn">%s</a>', __('Insert Gallery', 'themify'))), array('id' => 'thumb_w_gallery', 'type' => 'text', 'label' => __('Thumbnail Width', 'themify'), 'class' => 'xsmall', 'hide' => $this->is_img_php_disabled() ? true : false, 'help' => 'px'), array('id' => 'thumb_h_gallery', 'type' => 'text', 'label' => __('Thumbnail Height', 'themify'), 'class' => 'xsmall', 'hide' => $this->is_img_php_disabled() ? true : false, 'help' => 'px'), array('id' => 'image_size_gallery', 'type' => 'select', 'label' => $this->is_img_php_disabled() ? __('Image Size', 'themify') : false, 'empty' => array('val' => '', 'label' => ''), 'hide' => $this->is_img_php_disabled() ? false : true, 'options' => themify_get_image_sizes_list(false)), array('id' => 'appearance_gallery', 'type' => 'checkbox', 'label' => __('Image Appearance', 'themify'), 'default' => 'rounded', 'options' => array(array('name' => 'rounded', 'value' => __('Rounded', 'themify')), array('name' => 'drop-shadow', 'value' => __('Drop Shadow', 'themify')), array('name' => 'bordered', 'value' => __('Bordered', 'themify')), array('name' => 'circle', 'value' => __('Circle', 'themify'), 'help' => __('(square format image only)', 'themify'))))), 'styling' => array(array('id' => 'separator_animation', 'title' => '', 'description' => '', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Animation', 'themify') . '</h4>')), array('id' => 'animation_effect', 'type' => 'animation_select', 'label' => __('Effect', 'themify'), 'class' => ''), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_image_background', 'title' => '', 'description' => '', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Background', 'themify') . '</h4>')), array('id' => 'background_color', 'type' => 'color', 'label' => __('Background Color', 'themify'), 'class' => 'small'), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_font', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Font', 'themify') . '</h4>')), array('id' => 'font_family', 'type' => 'font_select', 'label' => __('Font Family', 'themify'), 'class' => 'font-family-select'), array('id' => 'font_color', 'type' => 'color', 'label' => __('Font Color', 'themify'), 'class' => 'small'), array('id' => 'multi_font_size', 'type' => 'multi', 'label' => __('Font Size', 'themify'), 'fields' => array(array('id' => 'font_size', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'font_size_unit', 'type' => 'select', 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'px', 'name' => __('px', 'themify')), array('value' => 'em', 'name' => __('em', 'themify')))))), array('id' => 'multi_line_height', 'type' => 'multi', 'label' => __('Line Height', 'themify'), 'fields' => array(array('id' => 'line_height', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'line_height_unit', 'type' => 'select', 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'px', 'name' => __('px', 'themify')), array('value' => 'em', 'name' => __('em', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'text_align', 'label' => __('Text Align', 'themify'), 'type' => 'radio', 'meta' => array(array('value' => '', 'name' => __('Default', 'themify'), 'selected' => true), array('value' => 'left', 'name' => __('Left', 'themify')), array('value' => 'center', 'name' => __('Center', 'themify')), array('value' => 'right', 'name' => __('Right', 'themify')), array('value' => 'justify', 'name' => __('Justify', 'themify')))), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_link', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Link', 'themify') . '</h4>')), array('id' => 'link_color', 'type' => 'color', 'label' => __('Color', 'themify'), 'class' => 'small'), array('id' => 'text_decoration', 'type' => 'select', 'label' => __('Text Decoration', 'themify'), 'meta' => array(array('value' => '', 'name' => '', 'selected' => true), array('value' => 'underline', 'name' => __('Underline', 'themify')), array('value' => 'overline', 'name' => __('Overline', 'themify')), array('value' => 'line-through', 'name' => __('Line through', 'themify')), array('value' => 'none', 'name' => __('None', 'themify')))), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_padding', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Padding', 'themify') . '</h4>')), array('id' => 'multi_padding_top', 'type' => 'multi', 'label' => __('Padding', 'themify'), 'fields' => array(array('id' => 'padding_top', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'padding_top_unit', 'type' => 'select', 'description' => __('top', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_padding_right', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'padding_right', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'padding_right_unit', 'type' => 'select', 'description' => __('right', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_padding_bottom', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'padding_bottom', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'padding_bottom_unit', 'type' => 'select', 'description' => __('bottom', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_padding_left', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'padding_left', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'padding_left_unit', 'type' => 'select', 'description' => __('left', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_margin', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Margin', 'themify') . '</h4>')), array('id' => 'multi_margin_top', 'type' => 'multi', 'label' => __('Margin', 'themify'), 'fields' => array(array('id' => 'margin_top', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'margin_top_unit', 'type' => 'select', 'description' => __('top', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_margin_right', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'margin_right', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'margin_right_unit', 'type' => 'select', 'description' => __('right', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_margin_bottom', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'margin_bottom', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'margin_bottom_unit', 'type' => 'select', 'description' => __('bottom', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_margin_left', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'margin_left', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'margin_left_unit', 'type' => 'select', 'description' => __('left', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_border', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Border', 'themify') . '</h4>')), array('id' => 'multi_border_top', 'type' => 'multi', 'label' => __('Border', 'themify'), 'fields' => array(array('id' => 'border_top_color', 'type' => 'color', 'class' => 'small'), array('id' => 'border_top_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall'), array('id' => 'border_top_style', 'type' => 'select', 'description' => __('top', 'themify'), 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'solid', 'name' => __('Solid', 'themify')), array('value' => 'dashed', 'name' => __('Dashed', 'themify')), array('value' => 'dotted', 'name' => __('Dotted', 'themify')), array('value' => 'double', 'name' => __('Double', 'themify')))))), array('id' => 'multi_border_right', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'border_right_color', 'type' => 'color', 'class' => 'small'), array('id' => 'border_right_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall'), array('id' => 'border_right_style', 'type' => 'select', 'description' => __('right', 'themify'), 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'solid', 'name' => __('Solid', 'themify')), array('value' => 'dashed', 'name' => __('Dashed', 'themify')), array('value' => 'dotted', 'name' => __('Dotted', 'themify')), array('value' => 'double', 'name' => __('Double', 'themify')))))), array('id' => 'multi_border_bottom', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'border_bottom_color', 'type' => 'color', 'class' => 'small'), array('id' => 'border_bottom_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall'), array('id' => 'border_bottom_style', 'type' => 'select', 'description' => __('bottom', 'themify'), 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'solid', 'name' => __('Solid', 'themify')), array('value' => 'dashed', 'name' => __('Dashed', 'themify')), array('value' => 'dotted', 'name' => __('Dotted', 'themify')), array('value' => 'double', 'name' => __('Double', 'themify')))))), array('id' => 'multi_border_left', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'border_left_color', 'type' => 'color', 'class' => 'small'), array('id' => 'border_left_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall'), array('id' => 'border_left_style', 'type' => 'select', 'description' => __('left', 'themify'), 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'solid', 'name' => __('Solid', 'themify')), array('value' => 'dashed', 'name' => __('Dashed', 'themify')), array('value' => 'dotted', 'name' => __('Dotted', 'themify')), array('value' => 'double', 'name' => __('Double', 'themify')))))), array('type' => 'separator', 'meta' => array('html' => '<hr/>')), array('id' => 'css_gallery', 'type' => 'text', 'label' => __('Additional CSS Class', 'themify'), 'class' => 'large exclude-from-reset-field', 'description' => sprintf('<br/><small>%s</small>', __('Add additional CSS class(es) for custom styling', 'themify')))), 'styling_selector' => array('.module-gallery' => array('background_color', 'font_family', 'font_size', 'line_height', 'text_align', 'padding', 'margin', 'border_top', 'border_right', 'border_bottom', 'border_left'), '.module-gallery a' => array('link_color', 'text_decoration')))));
 * Module Name: Accordion
 * Description: Display Accordion content
 */
class TB_Accordion_Module extends Themify_Builder_Module
{
    function __construct()
    {
        parent::__construct(array('name' => __('Accordion', 'themify'), 'slug' => 'accordion'));
    }
    public function get_title($module)
    {
        $text = isset($module['mod_settings']['mod_title_accordion']) ? $module['mod_settings']['mod_title_accordion'] : '';
        $return = wp_trim_words($text, 100);
        return $return;
    }
    public function get_options()
    {
        $options = array(array('id' => 'mod_title_accordion', 'type' => 'text', 'label' => __('Module Title', 'themify'), 'class' => 'large'), array('id' => 'layout_accordion', 'type' => 'layout', 'label' => __('Accordion layout', 'themify'), 'options' => array(array('img' => 'accordion-default.png', 'value' => 'default', 'label' => __('Contiguous Panels', 'themify')), array('img' => 'accordion-separate.png', 'value' => 'separate', 'label' => __('Separated Panels', 'themify')))), array('id' => 'expand_collapse_accordion', 'type' => 'radio', 'label' => __('Expand / Collapse', 'themify'), 'default' => 'toggle', 'options' => array('toggle' => __('Toggle <small>(only clicked item is toggled)</small>', 'themify'), 'accordion' => __('Accordion <small>(collapse all, but keep clicked item expanded)</small>', 'themify')), 'break' => true), array('id' => 'color_accordion', 'type' => 'layout', 'label' => __('Accordion Color', 'themify'), 'options' => array(array('img' => 'color-default.png', 'value' => 'default', 'label' => __('default', 'themify')), array('img' => 'color-black.png', 'value' => 'black', 'label' => __('black', 'themify')), array('img' => 'color-grey.png', 'value' => 'gray', 'label' => __('gray', 'themify')), array('img' => 'color-blue.png', 'value' => 'blue', 'label' => __('blue', 'themify')), array('img' => 'color-light-blue.png', 'value' => 'light-blue', 'label' => __('light-blue', 'themify')), array('img' => 'color-green.png', 'value' => 'green', 'label' => __('green', 'themify')), array('img' => 'color-light-green.png', 'value' => 'light-green', 'label' => __('light-green', 'themify')), array('img' => 'color-purple.png', 'value' => 'purple', 'label' => __('purple', 'themify')), array('img' => 'color-light-purple.png', 'value' => 'light-purple', 'label' => __('light-purple', 'themify')), array('img' => 'color-brown.png', 'value' => 'brown', 'label' => __('brown', 'themify')), array('img' => 'color-orange.png', 'value' => 'orange', 'label' => __('orange', 'themify')), array('img' => 'color-yellow.png', 'value' => 'yellow', 'label' => __('yellow', 'themify')), array('img' => 'color-red.png', 'value' => 'red', 'label' => __('red', 'themify')), array('img' => 'color-pink.png', 'value' => 'pink', 'label' => __('pink', 'themify')), array('img' => 'color-transparent.png', 'value' => 'transparent', 'label' => __('Transparent', 'themify')))), array('id' => 'accordion_appearance_accordion', 'type' => 'checkbox', 'label' => __('Accordion Appearance', 'themify'), 'default' => array('rounded', 'gradient'), 'options' => array(array('name' => 'rounded', 'value' => __('Rounded', 'themify')), array('name' => 'gradient', 'value' => __('Gradient', 'themify')), array('name' => 'glossy', 'value' => __('Glossy', 'themify')), array('name' => 'embossed', 'value' => __('Embossed', 'themify')), array('name' => 'shadow', 'value' => __('Shadow', 'themify')))), array('id' => 'content_accordion', 'type' => 'builder', 'options' => array(array('id' => 'title_accordion', 'type' => 'text', 'label' => __('Accordion Title', 'themify'), 'class' => 'large'), array('id' => 'text_accordion', 'type' => 'wp_editor', 'label' => false, 'class' => 'fullwidth', 'rows' => 6), array('id' => 'default_accordion', 'type' => 'radio', 'label' => __('Default', 'themify'), 'default' => 'toggle', 'options' => array('closed' => __('closed', 'themify'), 'open' => __('open', 'themify'))))));
        return $options;
    }
    public function get_styling()
    {
        $styling = array(array('id' => 'separator_animation', 'title' => '', 'description' => '', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Animation', 'themify') . '</h4>')), array('id' => 'animation_effect', 'type' => 'animation_select', 'label' => __('Effect', 'themify'), 'class' => ''), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_image_background', 'title' => '', 'description' => '', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Background', 'themify') . '</h4>')), array('id' => 'background_color', 'type' => 'color', 'label' => __('Background Color', 'themify'), 'class' => 'small', 'prop' => 'background-color', 'selector' => array(' .ui.module-accordion .accordion-content', ' .ui.module-accordion .accordion-title a')), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_font', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Font', 'themify') . '</h4>')), array('id' => 'font_family', 'type' => 'font_select', 'label' => __('Font Family', 'themify'), 'class' => 'font-family-select', 'prop' => 'font-family', 'selector' => ' .ui.module-accordion'), array('id' => 'font_color', 'type' => 'color', 'label' => __('Font Color', 'themify'), 'class' => 'small', 'prop' => 'color', 'selector' => array(' .ui.module-accordion', ' .ui.module-accordion h1', ' .ui.module-accordion h2', ' .ui.module-accordion h3', ' .ui.module-accordion h4', ' .ui.module-accordion h5', ' .ui.module-accordion h6')), array('id' => 'multi_font_size', 'type' => 'multi', 'label' => __('Font Size', 'themify'), 'fields' => array(array('id' => 'font_size', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'font-size', 'selector' => ' .ui.module-accordion'), array('id' => 'font_size_unit', 'type' => 'select', 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'px', 'name' => __('px', 'themify')), array('value' => 'em', 'name' => __('em', 'themify')))))), array('id' => 'multi_line_height', 'type' => 'multi', 'label' => __('Line Height', 'themify'), 'fields' => array(array('id' => 'line_height', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'line-height', 'selector' => ' .ui.module-accordion'), array('id' => 'line_height_unit', 'type' => 'select', 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'px', 'name' => __('px', 'themify')), array('value' => 'em', 'name' => __('em', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'text_align', 'label' => __('Text Align', 'themify'), 'type' => 'radio', 'meta' => array(array('value' => '', 'name' => __('Default', 'themify'), 'selected' => true), array('value' => 'left', 'name' => __('Left', 'themify')), array('value' => 'center', 'name' => __('Center', 'themify')), array('value' => 'right', 'name' => __('Right', 'themify')), array('value' => 'justify', 'name' => __('Justify', 'themify'))), 'prop' => 'text-align', 'selector' => ' .ui.module-accordion'), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_link', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Link', 'themify') . '</h4>')), array('id' => 'link_color', 'type' => 'color', 'label' => __('Color', 'themify'), 'class' => 'small', 'prop' => 'color', 'selector' => ' .ui.module-accordion a'), array('id' => 'text_decoration', 'type' => 'select', 'label' => __('Text Decoration', 'themify'), 'meta' => array(array('value' => '', 'name' => '', 'selected' => true), array('value' => 'underline', 'name' => __('Underline', 'themify')), array('value' => 'overline', 'name' => __('Overline', 'themify')), array('value' => 'line-through', 'name' => __('Line through', 'themify')), array('value' => 'none', 'name' => __('None', 'themify'))), 'prop' => 'text-decoration', 'selector' => ' .ui.module-accordion a'), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_padding', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Padding', 'themify') . '</h4>')), array('id' => 'multi_padding_top', 'type' => 'multi', 'label' => __('Padding', 'themify'), 'fields' => array(array('id' => 'padding_top', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'padding-top', 'selector' => array(' .ui.module-accordion .accordion-content', ' .ui.module-accordion .accordion-title a')), array('id' => 'padding_top_unit', 'type' => 'select', 'description' => __('top', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_padding_right', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'padding_right', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'padding-right', 'selector' => array(' .ui.module-accordion .accordion-content', ' .ui.module-accordion .accordion-title a')), array('id' => 'padding_right_unit', 'type' => 'select', 'description' => __('right', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_padding_bottom', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'padding_bottom', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'padding-bottom', 'selector' => array(' .ui.module-accordion .accordion-content', ' .ui.module-accordion .accordion-title a')), array('id' => 'padding_bottom_unit', 'type' => 'select', 'description' => __('bottom', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_padding_left', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'padding_left', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'padding-left', 'selector' => array(' .ui.module-accordion .accordion-content', ' .ui.module-accordion .accordion-title a')), array('id' => 'padding_left_unit', 'type' => 'select', 'description' => __('left', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_margin', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Margin', 'themify') . '</h4>')), array('id' => 'multi_margin_top', 'type' => 'multi', 'label' => __('Margin', 'themify'), 'fields' => array(array('id' => 'margin_top', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'margin-top', 'selector' => ' .ui.module-accordion'), array('id' => 'margin_top_unit', 'type' => 'select', 'description' => __('top', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_margin_right', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'margin_right', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'margin-right', 'selector' => ' .ui.module-accordion'), array('id' => 'margin_right_unit', 'type' => 'select', 'description' => __('right', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_margin_bottom', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'margin_bottom', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'margin-bottom', 'selector' => ' .ui.module-accordion'), array('id' => 'margin_bottom_unit', 'type' => 'select', 'description' => __('bottom', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_margin_left', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'margin_left', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'margin-left', 'selector' => ' .ui.module-accordion'), array('id' => 'margin_left_unit', 'type' => 'select', 'description' => __('left', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_border', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Border', 'themify') . '</h4>')), array('id' => 'multi_border_top', 'type' => 'multi', 'label' => __('Border', 'themify'), 'fields' => array(array('id' => 'border_top_color', 'type' => 'color', 'class' => 'small', 'prop' => 'border-top-color', 'selector' => ' .ui.module-accordion .accordion-content'), array('id' => 'border_top_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall', 'prop' => 'border-top-width', 'selector' => ' .ui.module-accordion .accordion-content'), array('id' => 'border_top_style', 'type' => 'select', 'description' => __('top', 'themify'), 'meta' => Themify_Builder_model::get_border_styles(), 'prop' => 'border-top-style', 'selector' => ' .ui.module-accordion .accordion-content'))), array('id' => 'multi_border_right', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'border_right_color', 'type' => 'color', 'class' => 'small', 'prop' => 'border-right-color', 'selector' => ' .ui.module-accordion .accordion-content'), array('id' => 'border_right_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall', 'prop' => 'border-right-width', 'selector' => ' .ui.module-accordion .accordion-content'), array('id' => 'border_right_style', 'type' => 'select', 'description' => __('right', 'themify'), 'meta' => Themify_Builder_model::get_border_styles(), 'prop' => 'border-right-style', 'selector' => ' .ui.module-accordion .accordion-content'))), array('id' => 'multi_border_bottom', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'border_bottom_color', 'type' => 'color', 'class' => 'small', 'prop' => 'border-bottom-color', 'selector' => ' .ui.module-accordion .accordion-content'), array('id' => 'border_bottom_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall', 'prop' => 'border-bottom-width', 'selector' => ' .ui.module-accordion .accordion-content'), array('id' => 'border_bottom_style', 'type' => 'select', 'description' => __('bottom', 'themify'), 'meta' => Themify_Builder_model::get_border_styles(), 'prop' => 'border-bottom-style', 'selector' => ' .ui.module-accordion .accordion-content'))), array('id' => 'multi_border_left', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'border_left_color', 'type' => 'color', 'class' => 'small', 'prop' => 'border-left-color', 'selector' => ' .ui.module-accordion .accordion-content'), array('id' => 'border_left_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall', 'prop' => 'border-left-width', 'selector' => ' .ui.module-accordion .accordion-content'), array('id' => 'border_left_style', 'type' => 'select', 'description' => __('left', 'themify'), 'meta' => Themify_Builder_model::get_border_styles(), 'prop' => 'border-left-style', 'selector' => ' .ui.module-accordion .accordion-content'))), array('type' => 'separator', 'meta' => array('html' => '<hr/>')), array('id' => 'css_accordion', 'type' => 'text', 'label' => __('Additional CSS Class', 'themify'), 'class' => 'large exclude-from-reset-field', 'description' => sprintf('<br/><small>%s</small>', __('Add additional CSS class(es) for custom styling', 'themify'))));
        return $styling;
    }
}
///////////////////////////////////////
// Module Options
///////////////////////////////////////
Themify_Builder_Model::register_module('TB_Accordion_Module');
 * Module Name: Callout
 * Description: Display Callout content
 */
class TB_Callout_Module extends Themify_Builder_Module
{
    function __construct()
    {
        parent::__construct(array('name' => __('Callout', 'themify'), 'slug' => 'callout'));
    }
    public function get_title($module)
    {
        $text = isset($module['mod_settings']['heading_callout']) ? $module['mod_settings']['heading_callout'] : '';
        $return = wp_trim_words($text, 100);
        return $return;
    }
    public function get_options()
    {
        $options = array(array('id' => 'mod_title_callout', 'type' => 'text', 'label' => __('Module Title', 'themify'), 'class' => 'large'), array('id' => 'layout_callout', 'type' => 'layout', 'label' => __('Callout Style', 'themify'), 'options' => array(array('img' => 'callout-button-right.png', 'value' => 'button-right', 'label' => __('Button Right', 'themify')), array('img' => 'callout-button-left.png', 'value' => 'button-left', 'label' => __('Button Left', 'themify')), array('img' => 'callout-button-bottom.png', 'value' => 'button-bottom', 'label' => __('Button Bottom', 'themify')), array('img' => 'callout-button-bottom-center.png', 'value' => 'button-bottom-center', 'label' => __('Button Bottom Center', 'themify')))), array('id' => 'heading_callout', 'type' => 'text', 'label' => __('Callout Heading', 'themify'), 'class' => 'xlarge'), array('id' => 'text_callout', 'type' => 'textarea', 'label' => __('Callout Text', 'themify'), 'class' => 'fullwidth'), array('id' => 'color_callout', 'type' => 'layout', 'label' => __('Callout Color', 'themify'), 'options' => array(array('img' => 'color-default.png', 'value' => 'default', 'label' => __('Default', 'themify')), array('img' => 'color-black.png', 'value' => 'black', 'label' => __('Black', 'themify')), array('img' => 'color-grey.png', 'value' => 'gray', 'label' => __('Gray', 'themify')), array('img' => 'color-blue.png', 'value' => 'blue', 'label' => __('Blue', 'themify')), array('img' => 'color-light-blue.png', 'value' => 'light-blue', 'label' => __('Light-blue', 'themify')), array('img' => 'color-green.png', 'value' => 'green', 'label' => __('Green', 'themify')), array('img' => 'color-light-green.png', 'value' => 'light-green', 'label' => __('Light-green', 'themify')), array('img' => 'color-purple.png', 'value' => 'purple', 'label' => __('Purple', 'themify')), array('img' => 'color-light-purple.png', 'value' => 'light-purple', 'label' => __('Light-purple', 'themify')), array('img' => 'color-brown.png', 'value' => 'brown', 'label' => __('Brown', 'themify')), array('img' => 'color-orange.png', 'value' => 'orange', 'label' => __('Orange', 'themify')), array('img' => 'color-yellow.png', 'value' => 'yellow', 'label' => __('Yellow', 'themify')), array('img' => 'color-red.png', 'value' => 'red', 'label' => __('Red', 'themify')), array('img' => 'color-pink.png', 'value' => 'pink', 'label' => __('Pink', 'themify')), array('img' => 'color-transparent.png', 'value' => 'transparent', 'label' => __('Transparent', 'themify')))), array('id' => 'appearance_callout', 'type' => 'checkbox', 'label' => __('Callout Appearance', 'themify'), 'default' => array('rounded', 'gradient'), 'options' => Themify_Builder_model::get_appearance()), array('id' => 'action_btn_link_callout', 'type' => 'text', 'label' => __('Action Button Link', 'themify'), 'class' => 'xlarge'), array('id' => 'open_link_new_tab_callout', 'type' => 'select', 'label' => __('Open link in a new tab', 'themify'), 'empty' => array('val' => '', 'label' => ''), 'options' => array('yes' => __('Yes', 'themify'), 'no' => __('No', 'themify'))), array('id' => 'action_btn_text_callout', 'type' => 'text', 'label' => __('Action Button Text', 'themify'), 'class' => 'medium'), array('id' => 'action_btn_color_callout', 'type' => 'layout', 'label' => __('Action Button Color', 'themify'), 'options' => array(array('img' => 'color-default.png', 'value' => 'default', 'label' => __('Default', 'themify')), array('img' => 'color-black.png', 'value' => 'black', 'label' => __('Black', 'themify')), array('img' => 'color-grey.png', 'value' => 'gray', 'label' => __('Gray', 'themify')), array('img' => 'color-blue.png', 'value' => 'blue', 'label' => __('Blue', 'themify')), array('img' => 'color-light-blue.png', 'value' => 'light-blue', 'label' => __('Light-blue', 'themify')), array('img' => 'color-green.png', 'value' => 'green', 'label' => __('Green', 'themify')), array('img' => 'color-light-green.png', 'value' => 'light-green', 'label' => __('Light-green', 'themify')), array('img' => 'color-purple.png', 'value' => 'purple', 'label' => __('Purple', 'themify')), array('img' => 'color-light-purple.png', 'value' => 'light-purple', 'label' => __('Light-purple', 'themify')), array('img' => 'color-brown.png', 'value' => 'brown', 'label' => __('Brown', 'themify')), array('img' => 'color-orange.png', 'value' => 'orange', 'label' => __('Orange', 'themify')), array('img' => 'color-yellow.png', 'value' => 'yellow', 'label' => __('Yellow', 'themify')), array('img' => 'color-red.png', 'value' => 'red', 'label' => __('Red', 'themify')), array('img' => 'color-pink.png', 'value' => 'pink', 'label' => __('Pink', 'themify')), array('img' => 'color-transparent.png', 'value' => 'transparent', 'label' => __('Transparent', 'themify')))), array('id' => 'action_btn_appearance_callout', 'type' => 'checkbox', 'label' => __('Action Button Appearance', 'themify'), 'default' => array('rounded', 'gradient'), 'options' => Themify_Builder_Model::get_appearance()));
        return $options;
    }
    public function get_styling()
    {
        $styling = array(array('id' => 'separator_animation', 'title' => '', 'description' => '', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Animation', 'themify') . '</h4>')), array('id' => 'animation_effect', 'type' => 'animation_select', 'label' => __('Effect', 'themify'), 'class' => ''), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_image_background', 'title' => '', 'description' => '', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Background', 'themify') . '</h4>')), array('id' => 'background_image', 'type' => 'image', 'label' => __('Background Image', 'themify'), 'class' => 'xlarge', 'prop' => 'background-image', 'selector' => '.module-callout'), array('id' => 'background_color', 'type' => 'color', 'label' => __('Background Color', 'themify'), 'class' => 'small', 'prop' => 'background-color', 'selector' => '.module-callout'), array('id' => 'background_repeat', 'label' => __('Background Repeat', 'themify'), 'type' => 'select', 'default' => '', 'meta' => array(array('value' => 'repeat', 'name' => __('Repeat All', 'themify')), array('value' => 'repeat-x', 'name' => __('Repeat Horizontally', 'themify')), array('value' => 'repeat-y', 'name' => __('Repeat Vertically', 'themify')), array('value' => 'repeat-none', 'name' => __('Do not repeat', 'themify')), array('value' => 'fullcover', 'name' => __('Fullcover', 'themify'))), 'prop' => 'background-repeat', 'selector' => '.module-callout'), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_font', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Font', 'themify') . '</h4>')), array('id' => 'font_family', 'type' => 'font_select', 'label' => __('Font Family', 'themify'), 'class' => 'font-family-select', 'prop' => 'font-family', 'selector' => array('.module-callout', '.module-callout .callout-button')), array('id' => 'font_color', 'type' => 'color', 'label' => __('Font Color', 'themify'), 'class' => 'small', 'prop' => 'color', 'selector' => array('.module-callout', '.module-callout h1', '.module-callout h2', '.module-callout h3', '.module-callout h4', '.module-callout h5', '.module-callout h6', '.module-callout .callout-button')), array('id' => 'multi_font_size', 'type' => 'multi', 'label' => __('Font Size', 'themify'), 'fields' => array(array('id' => 'font_size', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'font-size', 'selector' => '.module-callout'), array('id' => 'font_size_unit', 'type' => 'select', 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'px', 'name' => __('px', 'themify')), array('value' => 'em', 'name' => __('em', 'themify')))))), array('id' => 'multi_line_height', 'type' => 'multi', 'label' => __('Line Height', 'themify'), 'fields' => array(array('id' => 'line_height', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'line-height', 'selector' => '.module-callout'), array('id' => 'line_height_unit', 'type' => 'select', 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'px', 'name' => __('px', 'themify')), array('value' => 'em', 'name' => __('em', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'text_align', 'label' => __('Text Align', 'themify'), 'type' => 'radio', 'meta' => array(array('value' => '', 'name' => __('Default', 'themify'), 'selected' => true), array('value' => 'left', 'name' => __('Left', 'themify')), array('value' => 'center', 'name' => __('Center', 'themify')), array('value' => 'right', 'name' => __('Right', 'themify')), array('value' => 'justify', 'name' => __('Justify', 'themify'))), 'prop' => 'text-align', 'selector' => '.module-callout'), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_link', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Link', 'themify') . '</h4>')), array('id' => 'link_color', 'type' => 'color', 'label' => __('Color', 'themify'), 'class' => 'small', 'prop' => 'color', 'selector' => '.module-callout a'), array('id' => 'text_decoration', 'type' => 'select', 'label' => __('Text Decoration', 'themify'), 'meta' => array(array('value' => '', 'name' => '', 'selected' => true), array('value' => 'underline', 'name' => __('Underline', 'themify')), array('value' => 'overline', 'name' => __('Overline', 'themify')), array('value' => 'line-through', 'name' => __('Line through', 'themify')), array('value' => 'none', 'name' => __('None', 'themify'))), 'prop' => 'text-decoration', 'selector' => '.module-callout a'), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_padding', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Padding', 'themify') . '</h4>')), array('id' => 'multi_padding_top', 'type' => 'multi', 'label' => __('Padding', 'themify'), 'fields' => array(array('id' => 'padding_top', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'padding-top', 'selector' => '.module-callout'), array('id' => 'padding_top_unit', 'type' => 'select', 'description' => __('top', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_padding_right', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'padding_right', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'padding-right', 'selector' => '.module-callout'), array('id' => 'padding_right_unit', 'type' => 'select', 'description' => __('right', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_padding_bottom', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'padding_bottom', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'padding-bottom', 'selector' => '.module-callout'), array('id' => 'padding_bottom_unit', 'type' => 'select', 'description' => __('bottom', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_padding_left', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'padding_left', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'padding-left', 'selector' => '.module-callout'), array('id' => 'padding_left_unit', 'type' => 'select', 'description' => __('left', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_margin', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Margin', 'themify') . '</h4>')), array('id' => 'multi_margin_top', 'type' => 'multi', 'label' => __('Margin', 'themify'), 'fields' => array(array('id' => 'margin_top', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'margin-top', 'selector' => '.module-callout'), array('id' => 'margin_top_unit', 'type' => 'select', 'description' => __('top', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_margin_right', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'margin_right', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'margin-right', 'selector' => '.module-callout'), array('id' => 'margin_right_unit', 'type' => 'select', 'description' => __('right', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_margin_bottom', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'margin_bottom', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'margin-bottom', 'selector' => '.module-callout'), array('id' => 'margin_bottom_unit', 'type' => 'select', 'description' => __('bottom', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_margin_left', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'margin_left', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'margin-left', 'selector' => '.module-callout'), array('id' => 'margin_left_unit', 'type' => 'select', 'description' => __('left', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_border', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Border', 'themify') . '</h4>')), array('id' => 'multi_border_top', 'type' => 'multi', 'label' => __('Border', 'themify'), 'fields' => array(array('id' => 'border_top_color', 'type' => 'color', 'class' => 'small', 'prop' => 'border-top-color', 'selector' => '.module-callout'), array('id' => 'border_top_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall', 'prop' => 'border-top-width', 'selector' => '.module-callout'), array('id' => 'border_top_style', 'type' => 'select', 'description' => __('top', 'themify'), 'meta' => Themify_Builder_model::get_border_styles(), 'prop' => 'border-top-style', 'selector' => '.module-callout'))), array('id' => 'multi_border_right', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'border_right_color', 'type' => 'color', 'class' => 'small', 'prop' => 'border-right-color', 'selector' => '.module-callout'), array('id' => 'border_right_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall', 'prop' => 'border-right-width', 'selector' => '.module-callout'), array('id' => 'border_right_style', 'type' => 'select', 'description' => __('right', 'themify'), 'meta' => Themify_Builder_model::get_border_styles(), 'prop' => 'border-right-style', 'selector' => '.module-callout'))), array('id' => 'multi_border_bottom', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'border_bottom_color', 'type' => 'color', 'class' => 'small', 'prop' => 'border-bottom-color', 'selector' => '.module-callout'), array('id' => 'border_bottom_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall', 'prop' => 'border-bottom-width', 'selector' => '.module-callout'), array('id' => 'border_bottom_style', 'type' => 'select', 'description' => __('bottom', 'themify'), 'meta' => Themify_Builder_model::get_border_styles(), 'prop' => 'border-bottom-style', 'selector' => '.module-callout'))), array('id' => 'multi_border_left', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'border_left_color', 'type' => 'color', 'class' => 'small', 'prop' => 'border-left-color', 'selector' => '.module-callout'), array('id' => 'border_left_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall', 'prop' => 'border-left-width', 'selector' => '.module-callout'), array('id' => 'border_left_style', 'type' => 'select', 'description' => __('left', 'themify'), 'meta' => Themify_Builder_model::get_border_styles(), 'prop' => 'border-left-style', 'selector' => '.module-callout'))), array('type' => 'separator', 'meta' => array('html' => '<hr/>')), array('id' => 'css_callout', 'type' => 'text', 'label' => __('Additional CSS Class', 'themify'), 'class' => 'large exclude-from-reset-field', 'description' => sprintf('<br/><small>%s</small>', __('Add additional CSS class(es) for custom styling', 'themify'))));
        return $styling;
    }
}
///////////////////////////////////////
// Module Options
///////////////////////////////////////
Themify_Builder_Model::register_module('TB_Callout_Module');
<?php

if (!defined('ABSPATH')) {
    exit;
}
// Exit if accessed directly
/**
 * Module Name: Menu
 * Description: Display Custom Menu
 */
class TB_Menu_Module extends Themify_Builder_Module
{
    function __construct()
    {
        parent::__construct(array('name' => __('Menu', 'themify'), 'slug' => 'menu'));
    }
}
///////////////////////////////////////
// Module Options
///////////////////////////////////////
$menus = get_terms('nav_menu', array('hide_empty' => true));
Themify_Builder_Model::register_module('TB_Menu_Module', apply_filters('themify_builder_module_menu', array('options' => array(array('id' => 'mod_title_menu', 'type' => 'text', 'label' => __('Module Title', 'themify'), 'class' => 'large'), array('id' => 'layout_menu', 'type' => 'layout', 'label' => __('Menu Layout', 'themify'), 'options' => array(array('img' => 'menu-bar.png', 'value' => 'menu-bar', 'label' => __('Menu Bar', 'themify')), array('img' => 'menu-fullbar.png', 'value' => 'fullwidth', 'label' => __('Menu Fullbar', 'themify')), array('img' => 'menu-vertical.png', 'value' => 'vertical', 'label' => __('Menu Vertical', 'themify')))), array('id' => 'custom_menu', 'type' => 'select_menu', 'label' => __('Custom Menu', 'themify'), 'options' => $menus, 'help' => sprintf(__('Add more <a href="%s" target="_blank">menu</a>', 'themify'), admin_url('nav-menus.php')), 'break' => true), array('id' => 'color_menu', 'type' => 'layout', 'label' => __('Menu Color', 'themify'), 'options' => array(array('img' => 'color-default.png', 'value' => 'default', 'label' => __('default', 'themify')), array('img' => 'color-black.png', 'value' => 'black', 'label' => __('black', 'themify')), array('img' => 'color-grey.png', 'value' => 'gray', 'label' => __('gray', 'themify')), array('img' => 'color-blue.png', 'value' => 'blue', 'label' => __('blue', 'themify')), array('img' => 'color-light-blue.png', 'value' => 'light-blue', 'label' => __('light-blue', 'themify')), array('img' => 'color-green.png', 'value' => 'green', 'label' => __('green', 'themify')), array('img' => 'color-light-green.png', 'value' => 'light-green', 'label' => __('light-green', 'themify')), array('img' => 'color-purple.png', 'value' => 'purple', 'label' => __('purple', 'themify')), array('img' => 'color-light-purple.png', 'value' => 'light-purple', 'label' => __('light-purple', 'themify')), array('img' => 'color-brown.png', 'value' => 'brown', 'label' => __('brown', 'themify')), array('img' => 'color-orange.png', 'value' => 'orange', 'label' => __('orange', 'themify')), array('img' => 'color-yellow.png', 'value' => 'yellow', 'label' => __('yellow', 'themify')), array('img' => 'color-red.png', 'value' => 'red', 'label' => __('red', 'themify')), array('img' => 'color-pink.png', 'value' => 'pink', 'label' => __('pink', 'themify')))), array('id' => 'according_style_menu', 'type' => 'checkbox', 'label' => __('According Styles', 'themify'), 'default' => array('rounded', 'gradient'), 'options' => array(array('name' => 'rounded', 'value' => __('Rounded', 'themify')), array('name' => 'gradient', 'value' => __('Gradient', 'themify')), array('name' => 'glossy', 'value' => __('Glossy', 'themify')), array('name' => 'embossed', 'value' => __('Embossed', 'themify')), array('name' => 'shadow', 'value' => __('Shadow', 'themify'))))), 'styling' => array(array('id' => 'separator_animation', 'title' => '', 'description' => '', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Animation', 'themify') . '</h4>')), array('id' => 'animation_effect', 'type' => 'animation_select', 'label' => __('Effect', 'themify'), 'class' => ''), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_image_background', 'title' => '', 'description' => '', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Background', 'themify') . '</h4>')), array('id' => 'background_color', 'type' => 'color', 'label' => __('Background Color', 'themify'), 'class' => 'small'), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_font', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Font', 'themify') . '</h4>')), array('id' => 'font_family', 'type' => 'font_select', 'label' => __('Font Family', 'themify'), 'class' => 'font-family-select'), array('id' => 'font_color', 'type' => 'color', 'label' => __('Font Color', 'themify'), 'class' => 'small'), array('id' => 'multi_font_size', 'type' => 'multi', 'label' => __('Font Size', 'themify'), 'fields' => array(array('id' => 'font_size', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'font_size_unit', 'type' => 'select', 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'px', 'name' => __('px', 'themify')), array('value' => 'em', 'name' => __('em', 'themify')))))), array('id' => 'multi_line_height', 'type' => 'multi', 'label' => __('Line Height', 'themify'), 'fields' => array(array('id' => 'line_height', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'line_height_unit', 'type' => 'select', 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'px', 'name' => __('px', 'themify')), array('value' => 'em', 'name' => __('em', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'text_align', 'label' => __('Text Align', 'themify'), 'type' => 'radio', 'meta' => array(array('value' => '', 'name' => __('Default', 'themify'), 'selected' => true), array('value' => 'left', 'name' => __('Left', 'themify')), array('value' => 'center', 'name' => __('Center', 'themify')), array('value' => 'right', 'name' => __('Right', 'themify')), array('value' => 'justify', 'name' => __('Justify', 'themify')))), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_link', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Link', 'themify') . '</h4>')), array('id' => 'link_color', 'type' => 'color', 'label' => __('Color', 'themify'), 'class' => 'small'), array('id' => 'text_decoration', 'type' => 'select', 'label' => __('Text Decoration', 'themify'), 'meta' => array(array('value' => '', 'name' => '', 'selected' => true), array('value' => 'underline', 'name' => __('Underline', 'themify')), array('value' => 'overline', 'name' => __('Overline', 'themify')), array('value' => 'line-through', 'name' => __('Line through', 'themify')), array('value' => 'none', 'name' => __('None', 'themify')))), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_padding', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Padding', 'themify') . '</h4>')), array('id' => 'multi_padding_top', 'type' => 'multi', 'label' => __('Padding', 'themify'), 'fields' => array(array('id' => 'padding_top', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'padding_top_unit', 'type' => 'select', 'description' => __('top', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_padding_right', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'padding_right', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'padding_right_unit', 'type' => 'select', 'description' => __('right', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_padding_bottom', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'padding_bottom', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'padding_bottom_unit', 'type' => 'select', 'description' => __('bottom', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_padding_left', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'padding_left', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'padding_left_unit', 'type' => 'select', 'description' => __('left', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_margin', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Margin', 'themify') . '</h4>')), array('id' => 'multi_margin_top', 'type' => 'multi', 'label' => __('Margin', 'themify'), 'fields' => array(array('id' => 'margin_top', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'margin_top_unit', 'type' => 'select', 'description' => __('top', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_margin_right', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'margin_right', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'margin_right_unit', 'type' => 'select', 'description' => __('right', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_margin_bottom', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'margin_bottom', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'margin_bottom_unit', 'type' => 'select', 'description' => __('bottom', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_margin_left', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'margin_left', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'margin_left_unit', 'type' => 'select', 'description' => __('left', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_border', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Border', 'themify') . '</h4>')), array('id' => 'multi_border_top', 'type' => 'multi', 'label' => __('Border', 'themify'), 'fields' => array(array('id' => 'border_top_color', 'type' => 'color', 'class' => 'small'), array('id' => 'border_top_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall'), array('id' => 'border_top_style', 'type' => 'select', 'description' => __('top', 'themify'), 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'solid', 'name' => __('Solid', 'themify')), array('value' => 'dashed', 'name' => __('Dashed', 'themify')), array('value' => 'dotted', 'name' => __('Dotted', 'themify')), array('value' => 'double', 'name' => __('Double', 'themify')))))), array('id' => 'multi_border_right', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'border_right_color', 'type' => 'color', 'class' => 'small'), array('id' => 'border_right_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall'), array('id' => 'border_right_style', 'type' => 'select', 'description' => __('right', 'themify'), 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'solid', 'name' => __('Solid', 'themify')), array('value' => 'dashed', 'name' => __('Dashed', 'themify')), array('value' => 'dotted', 'name' => __('Dotted', 'themify')), array('value' => 'double', 'name' => __('Double', 'themify')))))), array('id' => 'multi_border_bottom', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'border_bottom_color', 'type' => 'color', 'class' => 'small'), array('id' => 'border_bottom_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall'), array('id' => 'border_bottom_style', 'type' => 'select', 'description' => __('bottom', 'themify'), 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'solid', 'name' => __('Solid', 'themify')), array('value' => 'dashed', 'name' => __('Dashed', 'themify')), array('value' => 'dotted', 'name' => __('Dotted', 'themify')), array('value' => 'double', 'name' => __('Double', 'themify')))))), array('id' => 'multi_border_left', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'border_left_color', 'type' => 'color', 'class' => 'small'), array('id' => 'border_left_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall'), array('id' => 'border_left_style', 'type' => 'select', 'description' => __('left', 'themify'), 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'solid', 'name' => __('Solid', 'themify')), array('value' => 'dashed', 'name' => __('Dashed', 'themify')), array('value' => 'dotted', 'name' => __('Dotted', 'themify')), array('value' => 'double', 'name' => __('Double', 'themify')))))), array('type' => 'separator', 'meta' => array('html' => '<hr/>')), array('id' => 'css_menu', 'type' => 'text', 'label' => __('Additional CSS Class', 'themify'), 'class' => 'large exclude-from-reset-field', 'description' => sprintf('<br/><small>%s</small>', __('Add additional CSS class(es) for custom styling', 'themify')))), 'styling_selector' => array('.module-menu' => array('margin'), '.module-menu .nav li' => array('background_color', 'font_family', 'font_size', 'line_height', 'text_align', 'color', 'padding', 'border_top', 'border_right', 'border_bottom', 'border_left'), '.module-menu a' => array('link_color', 'text_decoration')))));
Exemple #26
0
    function __construct()
    {
        parent::__construct(array('name' => __('Box', 'themify'), 'slug' => 'box'));
    }
    public function get_title($module)
    {
        $text = isset($module['mod_settings']['content_box']) ? $module['mod_settings']['content_box'] : '';
        $return = wp_trim_words($text, 100);
        return $return;
    }
    public function get_options()
    {
        $options = array(array('id' => 'mod_title_box', 'type' => 'text', 'label' => __('Module Title', 'themify'), 'class' => 'large'), array('id' => 'content_box', 'type' => 'wp_editor', 'class' => 'fullwidth'), array('id' => 'color_box', 'type' => 'layout', 'label' => __('Box Color', 'themify'), 'options' => array(array('img' => 'color-default.png', 'value' => 'default', 'label' => __('default', 'themify')), array('img' => 'color-black.png', 'value' => 'black', 'label' => __('black', 'themify')), array('img' => 'color-grey.png', 'value' => 'gray', 'label' => __('gray', 'themify')), array('img' => 'color-blue.png', 'value' => 'blue', 'label' => __('blue', 'themify')), array('img' => 'color-light-blue.png', 'value' => 'light-blue', 'label' => __('light-blue', 'themify')), array('img' => 'color-green.png', 'value' => 'green', 'label' => __('green', 'themify')), array('img' => 'color-light-green.png', 'value' => 'light-green', 'label' => __('light-green', 'themify')), array('img' => 'color-purple.png', 'value' => 'purple', 'label' => __('purple', 'themify')), array('img' => 'color-light-purple.png', 'value' => 'light-purple', 'label' => __('light-purple', 'themify')), array('img' => 'color-brown.png', 'value' => 'brown', 'label' => __('brown', 'themify')), array('img' => 'color-orange.png', 'value' => 'orange', 'label' => __('orange', 'themify')), array('img' => 'color-yellow.png', 'value' => 'yellow', 'label' => __('yellow', 'themify')), array('img' => 'color-red.png', 'value' => 'red', 'label' => __('red', 'themify')), array('img' => 'color-pink.png', 'value' => 'pink', 'label' => __('pink', 'themify'))), 'bottom' => true), array('id' => 'appearance_box', 'type' => 'checkbox', 'label' => __('Appearance', 'themify'), 'options' => array(array('name' => 'rounded', 'value' => __('Rounded', 'themify')), array('name' => 'gradient', 'value' => __('Gradient', 'themify')), array('name' => 'glossy', 'value' => __('Glossy', 'themify')), array('name' => 'embossed', 'value' => __('Embossed', 'themify')), array('name' => 'shadow', 'value' => __('Shadow', 'themify')))));
        return $options;
    }
    public function get_animation()
    {
        $animation = array(array('id' => 'multi_Animation Effect', 'type' => 'multi', 'label' => __('Effect', 'themify'), 'fields' => array(array('id' => 'animation_effect', 'type' => 'animation_select', 'label' => __('Effect', 'themify')), array('id' => 'animation_effect_delay', 'type' => 'text', 'label' => __('Delay', 'themify'), 'class' => 'xsmall', 'description' => __('Delay (s)', 'themify')), array('id' => 'animation_effect_repeat', 'type' => 'text', 'label' => __('Repeat', 'themify'), 'class' => 'xsmall', 'description' => __('Repeat (x)', 'themify')))));
        return $animation;
    }
    public function get_styling()
    {
        $styling = array(array('id' => 'separator_image_background', 'title' => '', 'description' => '', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Background', 'themify') . '</h4>')), array('id' => 'background_image', 'type' => 'image', 'label' => __('Background Image', 'themify'), 'class' => 'xlarge', 'prop' => 'background-image', 'selector' => '.module-box .module-box-content'), array('id' => 'background_color', 'type' => 'color', 'label' => __('Background Color', 'themify'), 'class' => 'small', 'prop' => 'background-color', 'selector' => '.module-box .module-box-content'), array('id' => 'background_repeat', 'label' => __('Background Repeat', 'themify'), 'type' => 'select', 'default' => '', 'meta' => array(array('value' => 'repeat', 'name' => __('Repeat All', 'themify')), array('value' => 'repeat-x', 'name' => __('Repeat Horizontally', 'themify')), array('value' => 'repeat-y', 'name' => __('Repeat Vertically', 'themify')), array('value' => 'repeat-none', 'name' => __('Do not repeat', 'themify')), array('value' => 'fullcover', 'name' => __('Fullcover', 'themify'))), 'prop' => 'background-repeat', 'selector' => '.module-box .module-box-content'), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_font', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Font', 'themify') . '</h4>')), array('id' => 'font_family', 'type' => 'font_select', 'label' => __('Font Family', 'themify'), 'class' => 'font-family-select', 'prop' => 'font-family', 'selector' => '.module-box'), array('id' => 'font_color', 'type' => 'color', 'label' => __('Font Color', 'themify'), 'class' => 'small', 'prop' => 'color', 'selector' => '.module-box .module-box-content'), array('id' => 'multi_font_size', 'type' => 'multi', 'label' => __('Font Size', 'themify'), 'fields' => array(array('id' => 'font_size', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'font-size', 'selector' => '.module-box'), array('id' => 'font_size_unit', 'type' => 'select', 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'px', 'name' => __('px', 'themify')), array('value' => 'em', 'name' => __('em', 'themify')))))), array('id' => 'multi_line_height', 'type' => 'multi', 'label' => __('Line Height', 'themify'), 'fields' => array(array('id' => 'line_height', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'line-height', 'selector' => '.module-box'), array('id' => 'line_height_unit', 'type' => 'select', 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'px', 'name' => __('px', 'themify')), array('value' => 'em', 'name' => __('em', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'text_align', 'label' => __('Text Align', 'themify'), 'type' => 'radio', 'meta' => array(array('value' => '', 'name' => __('Default', 'themify'), 'selected' => true), array('value' => 'left', 'name' => __('Left', 'themify')), array('value' => 'center', 'name' => __('Center', 'themify')), array('value' => 'right', 'name' => __('Right', 'themify')), array('value' => 'justify', 'name' => __('Justify', 'themify'))), 'prop' => 'text-align', 'selector' => '.module-box'), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_link', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Link', 'themify') . '</h4>')), array('id' => 'link_color', 'type' => 'color', 'label' => __('Color', 'themify'), 'class' => 'small', 'prop' => 'color', 'selector' => '.module-box a'), array('id' => 'text_decoration', 'type' => 'select', 'label' => __('Text Decoration', 'themify'), 'meta' => array(array('value' => '', 'name' => '', 'selected' => true), array('value' => 'underline', 'name' => __('Underline', 'themify')), array('value' => 'overline', 'name' => __('Overline', 'themify')), array('value' => 'line-through', 'name' => __('Line through', 'themify')), array('value' => 'none', 'name' => __('None', 'themify'))), 'prop' => 'text-decoration', 'selector' => '.module-box a'), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_padding', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Padding', 'themify') . '</h4>')), array('id' => 'multi_padding_top', 'type' => 'multi', 'label' => __('Padding', 'themify'), 'fields' => array(array('id' => 'padding_top', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'padding-top', 'selector' => '.module-box .module-box-content'), array('id' => 'padding_top_unit', 'type' => 'select', 'description' => __('top', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_padding_right', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'padding_right', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'padding-right', 'selector' => '.module-box .module-box-content'), array('id' => 'padding_right_unit', 'type' => 'select', 'description' => __('right', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_padding_bottom', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'padding_bottom', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'padding-bottom', 'selector' => '.module-box .module-box-content'), array('id' => 'padding_bottom_unit', 'type' => 'select', 'description' => __('bottom', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_padding_left', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'padding_left', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'padding-left', 'selector' => '.module-box .module-box-content'), array('id' => 'padding_left_unit', 'type' => 'select', 'description' => __('left', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_margin', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Margin', 'themify') . '</h4>')), array('id' => 'multi_margin_top', 'type' => 'multi', 'label' => __('Margin', 'themify'), 'fields' => array(array('id' => 'margin_top', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'margin-top', 'selector' => '.module-box'), array('id' => 'margin_top_unit', 'type' => 'select', 'description' => __('top', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_margin_right', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'margin_right', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'margin-right', 'selector' => '.module-box'), array('id' => 'margin_right_unit', 'type' => 'select', 'description' => __('right', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_margin_bottom', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'margin_bottom', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'margin-bottom', 'selector' => '.module-box'), array('id' => 'margin_bottom_unit', 'type' => 'select', 'description' => __('bottom', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_margin_left', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'margin_left', 'type' => 'text', 'class' => 'xsmall', 'prop' => 'margin-left', 'selector' => '.module-box'), array('id' => 'margin_left_unit', 'type' => 'select', 'description' => __('left', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_border', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Border', 'themify') . '</h4>')), array('id' => 'multi_border_top', 'type' => 'multi', 'label' => __('Border', 'themify'), 'fields' => array(array('id' => 'border_top_color', 'type' => 'color', 'class' => 'small', 'prop' => 'border-top-color', 'selector' => '.module-box .module-box-content'), array('id' => 'border_top_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall', 'prop' => 'border-top-width', 'selector' => '.module-box .module-box-content'), array('id' => 'border_top_style', 'type' => 'select', 'description' => __('top', 'themify'), 'meta' => Themify_Builder_model::get_border_styles(), 'prop' => 'border-top-style', 'selector' => '.module-box .module-box-content'))), array('id' => 'multi_border_right', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'border_right_color', 'type' => 'color', 'class' => 'small', 'prop' => 'border-right-color', 'selector' => '.module-box .module-box-content'), array('id' => 'border_right_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall', 'prop' => 'border-right-width', 'selector' => '.module-box .module-box-content'), array('id' => 'border_right_style', 'type' => 'select', 'description' => __('right', 'themify'), 'meta' => Themify_Builder_model::get_border_styles(), 'prop' => 'border-right-style', 'selector' => '.module-box .module-box-content'))), array('id' => 'multi_border_bottom', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'border_bottom_color', 'type' => 'color', 'class' => 'small', 'prop' => 'border-bottom-color', 'selector' => '.module-box .module-box-content'), array('id' => 'border_bottom_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall', 'prop' => 'border-bottom-width', 'selector' => '.module-box .module-box-content'), array('id' => 'border_bottom_style', 'type' => 'select', 'description' => __('bottom', 'themify'), 'meta' => Themify_Builder_model::get_border_styles(), 'prop' => 'border-bottom-style', 'selector' => '.module-box .module-box-content'))), array('id' => 'multi_border_left', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'border_left_color', 'type' => 'color', 'class' => 'small', 'prop' => 'border-left-color', 'selector' => '.module-box .module-box-content'), array('id' => 'border_left_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall', 'prop' => 'border-left-width', 'selector' => '.module-box .module-box-content'), array('id' => 'border_left_style', 'type' => 'select', 'description' => __('left', 'themify'), 'meta' => Themify_Builder_model::get_border_styles(), 'prop' => 'border-left-style', 'selector' => '.module-box .module-box-content'))), array('type' => 'separator', 'meta' => array('html' => '<hr/>')), array('id' => 'add_css_box', 'type' => 'text', 'label' => __('Additional CSS Class', 'themify'), 'description' => sprintf('<br/><small>%s</small>', __('Add additional CSS class(es) for custom styling', 'themify')), 'class' => 'large exclude-from-reset-field'));
        return $styling;
    }
}
///////////////////////////////////////
// Module Options
///////////////////////////////////////
Themify_Builder_Model::register_module('TB_Box_Module');
Exemple #27
0
if (!defined('ABSPATH')) {
    exit;
}
// Exit if accessed directly
/**
 * Module Name: Map
 * Description: Display Map
 */
class TB_Map_Module extends Themify_Builder_Module
{
    function __construct()
    {
        parent::__construct(array('name' => __('Map', 'themify'), 'slug' => 'map'));
        add_action('wp_enqueue_scripts', array($this, 'load_map_script'));
    }
    function load_map_script()
    {
        //Register map scripts
        wp_register_script('themify-builder-map-script', themify_https_esc('http://maps.google.com/maps/api/js') . '?sensor=false', array(), false, true);
    }
}
///////////////////////////////////////
// Module Options
///////////////////////////////////////
$zoom_opt = array();
for ($i = 1; $i < 17; $i++) {
    array_push($zoom_opt, $i);
}
Themify_Builder_Model::register_module('TB_Map_Module', apply_filters('themify_builder_module_map', array('options' => array(array('id' => 'mod_title_map', 'type' => 'text', 'label' => __('Module Title', 'themify'), 'class' => 'large'), array('id' => 'address_map', 'type' => 'textarea', 'value' => '', 'class' => 'fullwidth', 'label' => __('Address', 'themify')), array('id' => 'zoom_map', 'type' => 'selectbasic', 'label' => __('Zoom', 'themify'), 'default' => 8, 'options' => $zoom_opt), array('id' => 'w_map', 'type' => 'text', 'class' => 'xsmall', 'label' => __('Width', 'themify'), 'unit' => array('id' => 'unit_w', 'selected' => '%', 'options' => array(array('id' => 'pixel_unit_w', 'value' => 'px'), array('id' => 'percent_unit_w', 'value' => '%'))), 'value' => 100), array('id' => 'h_map', 'type' => 'text', 'label' => __('Height', 'themify'), 'class' => 'xsmall', 'unit' => array('id' => 'unit_h', 'options' => array(array('id' => 'pixel_unit_h', 'value' => 'px'))), 'value' => 300), array('id' => 'multi_map_border', 'type' => 'multi', 'label' => __('Border', 'themify'), 'fields' => array(array('id' => 'b_style_map', 'type' => 'select', 'label' => '', 'options' => array('solid' => __('Solid', 'themify'), 'dotted' => __('Dotted', 'themify'), 'dashed' => __('Dashed', 'themify'))), array('id' => 'b_width_map', 'type' => 'text', 'label' => '', 'class' => 'medium', 'after' => 'px'), array('id' => 'b_color_map', 'type' => 'text', 'colorpicker' => true, 'class' => 'large', 'label' => ''))), array('id' => 'type_map', 'type' => 'select', 'label' => __('Type', 'themify'), 'options' => array('ROADMAP' => __('Road Map', 'themify'), 'SATELLITE' => __('Satellite', 'themify'), 'HYBRID' => __('Hybrid', 'themify'), 'TERRAIN' => __('Terrain', 'themify'))), array('id' => 'scrollwheel_map', 'type' => 'select', 'label' => __('Scrollwheel', 'themify'), 'options' => array('enable' => __('Enable', 'themify'), 'disable' => __('Disable', 'themify'))), array('id' => 'draggable_map', 'type' => 'select', 'label' => __('Draggable', 'themify'), 'options' => array('enable' => __('Enable', 'themify'), 'disable' => __('Disable', 'themify'))), array('id' => 'draggable_disable_mobile_map', 'type' => 'select', 'label' => __('Disable draggable on mobile', 'themify'), 'options' => array('yes' => __('Yes', 'themify'), 'no' => __('No', 'themify'))), array('id' => 'info_window_map', 'type' => 'textarea', 'value' => '', 'class' => 'fullwidth', 'label' => __('Info window', 'themify'), 'help' => __('Additional info that will be shown when clicking on map marker', 'themify'))), 'styling' => array(array('id' => 'separator_animation', 'title' => '', 'description' => '', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Animation', 'themify') . '</h4>')), array('id' => 'animation_effect', 'type' => 'animation_select', 'label' => __('Effect', 'themify'), 'class' => ''), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_image_background', 'title' => '', 'description' => '', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Background', 'themify') . '</h4>')), array('id' => 'background_color', 'type' => 'color', 'label' => __('Background Color', 'themify'), 'class' => 'small'), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_padding', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Padding', 'themify') . '</h4>')), array('id' => 'multi_padding_top', 'type' => 'multi', 'label' => __('Padding', 'themify'), 'fields' => array(array('id' => 'padding_top', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'padding_top_unit', 'type' => 'select', 'description' => __('top', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_padding_right', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'padding_right', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'padding_right_unit', 'type' => 'select', 'description' => __('right', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_padding_bottom', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'padding_bottom', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'padding_bottom_unit', 'type' => 'select', 'description' => __('bottom', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_padding_left', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'padding_left', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'padding_left_unit', 'type' => 'select', 'description' => __('left', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_margin', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Margin', 'themify') . '</h4>')), array('id' => 'multi_margin_top', 'type' => 'multi', 'label' => __('Margin', 'themify'), 'fields' => array(array('id' => 'margin_top', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'margin_top_unit', 'type' => 'select', 'description' => __('top', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_margin_right', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'margin_right', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'margin_right_unit', 'type' => 'select', 'description' => __('right', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_margin_bottom', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'margin_bottom', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'margin_bottom_unit', 'type' => 'select', 'description' => __('bottom', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_margin_left', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'margin_left', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'margin_left_unit', 'type' => 'select', 'description' => __('left', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_border', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Border', 'themify') . '</h4>')), array('id' => 'multi_border_top', 'type' => 'multi', 'label' => __('Border', 'themify'), 'fields' => array(array('id' => 'border_top_color', 'type' => 'color', 'class' => 'small'), array('id' => 'border_top_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall'), array('id' => 'border_top_style', 'type' => 'select', 'description' => __('top', 'themify'), 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'solid', 'name' => __('Solid', 'themify')), array('value' => 'dashed', 'name' => __('Dashed', 'themify')), array('value' => 'dotted', 'name' => __('Dotted', 'themify')), array('value' => 'double', 'name' => __('Double', 'themify')))))), array('id' => 'multi_border_right', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'border_right_color', 'type' => 'color', 'class' => 'small'), array('id' => 'border_right_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall'), array('id' => 'border_right_style', 'type' => 'select', 'description' => __('right', 'themify'), 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'solid', 'name' => __('Solid', 'themify')), array('value' => 'dashed', 'name' => __('Dashed', 'themify')), array('value' => 'dotted', 'name' => __('Dotted', 'themify')), array('value' => 'double', 'name' => __('Double', 'themify')))))), array('id' => 'multi_border_bottom', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'border_bottom_color', 'type' => 'color', 'class' => 'small'), array('id' => 'border_bottom_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall'), array('id' => 'border_bottom_style', 'type' => 'select', 'description' => __('bottom', 'themify'), 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'solid', 'name' => __('Solid', 'themify')), array('value' => 'dashed', 'name' => __('Dashed', 'themify')), array('value' => 'dotted', 'name' => __('Dotted', 'themify')), array('value' => 'double', 'name' => __('Double', 'themify')))))), array('id' => 'multi_border_left', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'border_left_color', 'type' => 'color', 'class' => 'small'), array('id' => 'border_left_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall'), array('id' => 'border_left_style', 'type' => 'select', 'description' => __('left', 'themify'), 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'solid', 'name' => __('Solid', 'themify')), array('value' => 'dashed', 'name' => __('Dashed', 'themify')), array('value' => 'dotted', 'name' => __('Dotted', 'themify')), array('value' => 'double', 'name' => __('Double', 'themify')))))), array('type' => 'separator', 'meta' => array('html' => '<hr/>')), array('id' => 'css_map', 'type' => 'text', 'label' => __('Additional CSS Class', 'themify'), 'class' => 'large exclude-from-reset-field', 'description' => sprintf('<br/><small>%s</small>', __('Add additional CSS class(es) for custom styling', 'themify')))), 'styling_selector' => array('.module-map' => array('background_color', 'padding', 'margin', 'border_top', 'border_right', 'border_bottom', 'border_left')))));