function themify_admin_nav()
{
    $theme = wp_get_theme();
    add_menu_page('themify', $theme->display('Name'), 'manage_options', 'themify', 'themify_page', get_template_directory_uri() . '/themify/img/favicon.png', 50);
    add_submenu_page('themify', $theme->display('Name'), __('Settings', 'themify'), 'manage_options', 'themify', 'themify_page');
    if (Themify_Builder_Model::builder_check()) {
        add_submenu_page('themify', __('Builder Layouts', 'themify'), __('Builder Layouts', 'themify'), 'edit_posts', 'edit.php?post_type=tbuilder_layout');
        add_submenu_page('themify', __('Builder Layout Parts', 'themify'), __('Builder Layout Parts', 'themify'), 'edit_posts', 'edit.php?post_type=tbuilder_layout_part');
    }
    add_submenu_page('themify', 'themify_customize', __('Customize', 'themify'), 'manage_options', 'customize.php');
    add_submenu_page('themify', $theme->display('Name'), __('Documentation', 'themify'), 'manage_options', 'themify_docs', 'themify_docs');
}
Beispiel #2
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;
 }
function themify_builder_init()
{
    global $ThemifyBuilder, $Themify_Builder_Layouts;
    if (class_exists('Themify_Builder')) {
        if (Themify_Builder_Model::builder_check()) {
            $Themify_Builder_Layouts = new Themify_Builder_Layouts();
            $ThemifyBuilder = new Themify_Builder();
            $ThemifyBuilder->init();
            $themify_builder_plugin_compat = new Themify_Builder_Plugin_Compat();
            $themify_builder_import_export = new Themify_Builder_Import_Export();
            // Themify Shortcodes Editor Button: load required files.
            themify_wpeditor_add_shortcodes_button();
        }
    }
    // class_exists check
    if (is_admin() && current_user_can('update_plugins')) {
        include THEMIFY_BUILDER_DIR . '/themify-builder-updater.php';
    }
}
Beispiel #4
0
 public function get_options()
 {
     global $ThemifyBuilder;
     $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);
     $display = array('blog' => __('Blog Posts', 'themify'), 'image' => __('Images', 'themify'), 'video' => __('Videos', 'themify'), 'text' => __('Text', 'themify'));
     if ($ThemifyBuilder->is_cpt_active('slider')) {
         $display['slider'] = __('Slider Posts', 'themify');
     }
     if ($ThemifyBuilder->is_cpt_active('portfolio')) {
         $display['portfolio'] = __('Portfolio', 'themify');
     }
     if ($ThemifyBuilder->is_cpt_active('testimonial')) {
         $display['testimonial'] = __('Testimonial', 'themify');
     }
     $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' => $display, '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_link_params', 'type' => 'select', 'label' => '&nbsp;', 'options' => array('' => '', 'lightbox' => __('Open link in lightbox', 'themify'), 'newtab' => __('Open link in new tab', 'themify'))), 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' => 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, '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'), 'crossfade' => __('Cross Fade', 'themify'), 'cover' => __('Cover', 'themify'), 'cover-fade' => __('Cover Fade', 'themify'), 'uncover' => __('Uncover', 'themify'), 'uncover-fade' => __('Uncover Fade', 'themify'), 'continuously' => __('Continuously', 'themify')), 'help' => __('Effect', 'themify')), array('id' => 'pause_on_hover_slider', 'type' => 'select', 'options' => array('resume' => __('Yes', 'themify'), 'false' => __('No', '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')), array('id' => 'height_slider', 'type' => 'select', 'options' => array('variable' => __('Variable', 'themify'), 'auto' => __('Auto', 'themify')), 'help' => __('Height <small class="description">"Auto" measures the highest slide and all other slides will be set to that size. "Variable" makes every slide has it\'s own height.</small>', 'themify')))));
     return $options;
 }
Beispiel #5
0
function themify_admin_nav()
{
    $theme = wp_get_theme();
    $do = 'menu_page';
    /**
     * Add Themify menu entry
     * @since 2.0.2
     */
    call_user_func('add' . "_{$do}", 'themify', $theme->display('Name'), 'manage_options', 'themify', 'themify_page', get_template_directory_uri() . '/themify/img/favicon.png', '49.3');
    /**
     * Add Themify settings page
     * @since 2.0.2
     */
    call_user_func('add_sub' . $do, 'themify', $theme->display('Name'), __('Themify Settings', 'themify'), 'manage_options', 'themify', 'themify_page');
    if (Themify_Builder_Model::builder_check()) {
        /**
         * Add Themify Builder Layouts page
         * @since 2.0.2
         */
        call_user_func('add_sub' . $do, 'themify', __('Builder Layouts', 'themify'), __('Builder Layouts', 'themify'), 'edit_posts', 'edit.php?post_type=tbuilder_layout');
        /**
         * Add Themify Builder Layout Parts page
         * @since 2.0.2
         */
        call_user_func('add_sub' . $do, 'themify', __('Builder Layout Parts', 'themify'), __('Builder Layout Parts', 'themify'), 'edit_posts', 'edit.php?post_type=tbuilder_layout_part');
    }
    /**
     * Add Themify Customize submenu entry
     * @since 2.0.2
     */
    call_user_func('add_sub' . $do, 'themify', 'themify_customize', __('Customize', 'themify'), 'manage_options', 'customize.php');
    /**
     * Add submenu entry that redirects to Themify documentation site
     * @since 2.0.2
     */
    call_user_func('add_sub' . $do, 'themify', $theme->display('Name'), __('Documentation', 'themify'), 'manage_options', 'themify_docs', 'themify_docs');
}
            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: 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')))));
 /**
  * Set Layout version after import finished
  */
 function import_layout_finished()
 {
     Themify_Builder_Model::set_current_layouts_version(THEMIFY_BUILDER_LAYOUTS_VERSION);
     // Delete cache layouts
     $cache_dir = self::get_cache_dir();
     $file = $cache_dir['path'] . 'layouts.xml';
     if (file_exists($file)) {
         unlink($file);
     }
 }
 /**
  * Returns list of border styles
  *
  * @return array
  */
 public static function get_border_styles()
 {
     if (!isset(self::$border_style)) {
         self::$border_style = 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')));
     }
     return self::$border_style;
 }
 /**
  * Return the correct animation css class name
  * @param string $effect 
  * @return string
  */
 function parse_animation_effect($effect)
 {
     if (!Themify_Builder_Model::is_animation_active()) {
         return '';
     }
     return '' != $effect && !in_array($effect, array('fade-in', 'fly-in', 'slide-up')) ? 'wow ' . $effect : $effect;
 }
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')))));
 public function get_options()
 {
     $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;
 }
<?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');
Beispiel #15
0
<?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')))));
Beispiel #16
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');
// 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');
 * Module Name: Text
 * Description: Display text content
 */
class TB_Text_Module extends Themify_Builder_Module
{
    function __construct()
    {
        parent::__construct(array('name' => __('Text', 'themify'), 'slug' => 'text'));
    }
    public function get_title($module)
    {
        $text = isset($module['mod_settings']['content_text']) ? $module['mod_settings']['content_text'] : '';
        $return = wp_trim_words($text, 100);
        return $return;
    }
    public function get_options()
    {
        $options = array(array('id' => 'mod_title_text', 'type' => 'text', 'label' => __('Module Title', 'themify'), 'class' => 'large'), array('id' => 'content_text', 'type' => 'wp_editor', '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_image', 'type' => 'image', 'label' => __('Background Image', 'themify'), 'class' => 'xlarge', 'prop' => 'background-image', 'selector' => '.module-text'), array('id' => 'background_color', 'type' => 'color', 'label' => __('Background Color', 'themify'), 'class' => 'small', 'prop' => 'background-color', 'selector' => '.module-text'), 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-text'), 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-text')), array('id' => 'font_color', 'type' => 'color', 'label' => __('Font Color', 'themify'), 'class' => 'small', 'prop' => 'color', 'selector' => array('.module-text', '.module-text h1', '.module-text h2', '.module-text h3:not(.module-title)', '.module-text h4', '.module-text h5', '.module-text 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-text'), 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-text'), 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-text'), 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-text 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-text 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-text'), 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-text'), 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-text'), 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-text'), 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-text'), 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-text'), 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-text'), 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-text'), 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-text'), array('id' => 'border_top_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall', 'prop' => 'border-top-width', 'selector' => '.module-text'), array('id' => 'border_top_style', 'type' => 'select', 'description' => __('top', 'themify'), 'meta' => Themify_Builder_model::get_border_styles(), 'prop' => 'border-top-style', 'selector' => '.module-text'))), 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-text'), array('id' => 'border_right_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall', 'prop' => 'border-right-width', 'selector' => '.module-text'), array('id' => 'border_right_style', 'type' => 'select', 'description' => __('right', 'themify'), 'meta' => Themify_Builder_model::get_border_styles(), 'prop' => 'border-right-style', 'selector' => '.module-text'))), 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-text'), array('id' => 'border_bottom_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall', 'prop' => 'border-bottom-width', 'selector' => '.module-text'), array('id' => 'border_bottom_style', 'type' => 'select', 'description' => __('bottom', 'themify'), 'meta' => Themify_Builder_model::get_border_styles(), 'prop' => 'border-bottom-style', 'selector' => '.module-text'))), 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-text'), array('id' => 'border_left_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall', 'prop' => 'border-left-width', 'selector' => '.module-text'), array('id' => 'border_left_style', 'type' => 'select', 'description' => __('left', 'themify'), 'meta' => Themify_Builder_model::get_border_styles(), 'prop' => 'border-left-style', 'selector' => '.module-text'))), array('type' => 'separator', 'meta' => array('html' => '<hr/>')), array('id' => 'add_css_text', '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_Text_Module');
Beispiel #19
0
<?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')))));
<?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')))));
                                        _e('Edit', 'themify');
                                        ?>
</a></li>
																<li><a href="#" class="themify_module_duplicate"><?php 
                                        _e('Duplicate', 'themify');
                                        ?>
</a></li>
																<li><a href="#" class="themify_module_delete"><?php 
                                        _e('Delete', 'themify');
                                        ?>
</a></li>
															</ul>
														</div>
														<div class="module_label">
															<strong class="module_name"><?php 
                                        echo Themify_Builder_Model::get_module_name($sub_module['mod_name']);
                                        ?>
</strong>
															<em class="module_excerpt"><?php 
                                        echo isset(Themify_Builder_Model::$modules[$sub_module['mod_name']]) ? Themify_Builder_Model::$modules[$sub_module['mod_name']]->get_title($sub_module) : '';
                                        ?>
</em>
														</div>
														<div class="themify_module_settings">
															<script type="text/json"><?php 
                                        echo json_encode($sub_module['mod_settings']);
                                        ?>
</script>
														</div>
													</div>
													<!-- /active_module -->
 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;
 }
            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');
Beispiel #24
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');
Beispiel #25
0
<?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')))));
Beispiel #26
0
<?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')))));
Beispiel #27
0
 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;
 }
Beispiel #28
0
 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;
 }
<?php

if (!defined('ABSPATH')) {
    exit;
}
// Exit if accessed directly
global $ThemifyBuilder;
?>

<div class="themify_builder_content-<?php 
echo $builder_id;
?>
 themify_builder">

	<?php 
foreach ($builder_output as $rows => $row) {
    if (0 == count($row)) {
        continue;
    }
    if (!Themify_Builder_Model::is_frontend_editor_page()) {
        // prevent duplicate CSS output
        // output styles for layout parts as inline CSS
        echo $ThemifyBuilder->render_row_styling($builder_id, $row);
    }
    echo $ThemifyBuilder->get_template_row($rows, $row, $builder_id, false, false);
}
// end row loop
?>

</div>
        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')))));