コード例 #1
0
ファイル: map.php プロジェクト: spokencode/bophillips
<?php

/**
 * @class FLMapModule
 */
class FLMapModule extends FLBuilderModule
{
    /** 
     * @method __construct
     */
    public function __construct()
    {
        parent::__construct(array('name' => __('Map', 'fl-builder'), 'description' => __('Display a Google map.', 'fl-builder'), 'category' => __('Advanced Modules', 'fl-builder')));
    }
}
/**
 * Register the module and its form settings.
 */
FLBuilder::register_module('FLMapModule', array('general' => array('title' => __('General', 'fl-builder'), 'sections' => array('general' => array('title' => '', 'fields' => array('address' => array('type' => 'text', 'label' => __('Address', 'fl-builder'), 'placeholder' => __('1865 Winchester Blvd #202 Campbell, CA 95008', 'fl-builder'), 'preview' => array('type' => 'refresh')), 'height' => array('type' => 'text', 'label' => __('Height', 'fl-builder'), 'default' => '400', 'size' => '5', 'description' => 'px')))))));
コード例 #2
0
ファイル: video.php プロジェクト: nullality/FEWD-SEA-7
                $this->data->poster = isset($this->settings->poster_src) ? $this->settings->poster_src : '';
                $this->data->loop = isset($this->settings->loop) && $this->settings->loop ? ' loop="yes"' : '';
                $this->data->autoplay = isset($this->settings->autoplay) && $this->settings->autoplay ? ' autoplay="yes"' : '';
                // WebM format
                $webm_data = FLBuilderPhoto::get_attachment_data($this->settings->video_webm);
                $this->data->video_webm = isset($this->settings->video_webm) && $webm_data ? ' webm="' . $webm_data->url . '"' : '';
            }
        }
        return $this->data;
    }
    /**
     * @method update
     * @param $settings {object}
     */
    public function update($settings)
    {
        // Cache the attachment data.
        if ($settings->video_type == 'media_library') {
            $video = FLBuilderPhoto::get_attachment_data($settings->video);
            if ($video) {
                $settings->data = $video;
            }
        }
        return $settings;
    }
}
/**
 * Register the module and its form settings.
 */
FLBuilder::register_module('FLVideoModule', array('general' => array('title' => __('General', 'fl-builder'), 'sections' => array('general' => array('title' => '', 'fields' => array('video_type' => array('type' => 'select', 'label' => __('Video Type', 'fl-builder'), 'default' => 'wordpress', 'options' => array('media_library' => __('Media Library', 'fl-builder'), 'embed' => __('Embed', 'fl-builder')), 'toggle' => array('media_library' => array('fields' => array('video', 'video_webm', 'poster', 'autoplay', 'loop')), 'embed' => array('fields' => array('embed_code')))), 'video' => array('type' => 'video', 'label' => __('Video (MP4)', 'fl-builder'), 'help' => __('A video in the MP4 format. Most modern browsers support this format.', 'fl-builder')), 'video_webm' => array('type' => 'video', 'label' => __('Video (WebM)', 'fl-builder'), 'help' => __('A video in the WebM format to use as fallback. This format is required to support browsers such as FireFox and Opera.', 'fl-builder'), 'preview' => array('type' => 'none')), 'poster' => array('type' => 'photo', 'label' => _x('Poster', 'Video preview/fallback image.', 'fl-builder')), 'autoplay' => array('type' => 'select', 'label' => __('Auto Play', 'fl-builder'), 'default' => '0', 'options' => array('0' => __('No', 'fl-builder'), '1' => __('Yes', 'fl-builder')), 'preview' => array('type' => 'none')), 'loop' => array('type' => 'select', 'label' => __('Loop', 'fl-builder'), 'default' => '0', 'options' => array('0' => __('No', 'fl-builder'), '1' => __('Yes', 'fl-builder')), 'preview' => array('type' => 'none')), 'embed_code' => array('type' => 'textarea', 'label' => __('Video Embed Code', 'fl-builder'), 'rows' => '6')))))));
コード例 #3
0
<?php

/**
 * @class FLRichTextModule
 */
class FLPricingTableModule extends FLBuilderModule
{
    /**
     * @method __construct
     */
    public function __construct()
    {
        parent::__construct(array('name' => __('Pricing Table', 'fl-builder'), 'description' => __('A simple pricing table generator.', 'fl-builder'), 'category' => __('Advanced Modules', 'fl-builder')));
    }
}
/**
 * Register the module and its form settings.
 */
FLBuilder::register_module('FLPricingTableModule', array('columns' => array('title' => __('Pricing Boxes', 'fl-builder'), 'sections' => array('general' => array('title' => '', 'fields' => array('pricing_columns' => array('type' => 'form', 'label' => __('Pricing Box', 'fl-builder'), 'form' => 'pricing_column_form', 'preview_text' => 'title', 'multiple' => true))))), 'style' => array('title' => __('Style', 'fl-builder'), 'sections' => array('general' => array('title' => '', 'fields' => array('spacing' => array('type' => 'select', 'label' => __('Box Spacing', 'fl-builder'), 'default' => 'wide', 'options' => array('wide' => __('Wide', 'fl-builder'), 'tight' => __('Tight', 'fl-builder'))), 'min_height' => array('type' => 'text', 'label' => __('Features Min Height', 'fl-builder'), 'default' => '0', 'size' => '5', 'description' => 'px', 'help' => __('Use this to normalize the height of your boxes when they have different numbers of features.', 'fl-builder')), 'border_size' => array('type' => 'select', 'label' => __('Border Size', 'fl-builder'), 'default' => 'wide', 'options' => array('wide' => _x('Wide', 'Border size.', 'fl-builder'), 'tight' => _x('Tight', 'Border size.', 'fl-builder')))))))));
/**
 * Register a settings form to use in the "form" field type above.
 */
FLBuilder::register_settings_form('pricing_column_form', array('title' => __('Add Pricing Box', 'fl-builder'), 'tabs' => array('general' => array('title' => __('General', 'fl-builder'), 'sections' => array('title' => array('title' => __('Title', 'fl-builder'), 'fields' => array('title' => array('type' => 'text', 'label' => __('Title', 'fl-builder')), 'title_size' => array('type' => 'text', 'label' => __('Title Size', 'fl-builder'), 'default' => '24', 'maxlength' => '3', 'size' => '4', 'description' => 'px'))), 'price-box' => array('title' => __('Price Box', 'fl-builder'), 'fields' => array('price' => array('type' => 'text', 'label' => __('Price', 'fl-builder')), 'duration' => array('type' => 'text', 'label' => __('Duration', 'fl-builder'), 'placeholder' => __('per Year', 'fl-builder')), 'price_size' => array('type' => 'text', 'label' => __('Price Size', 'fl-builder'), 'default' => '31', 'maxlength' => '3', 'size' => '4', 'description' => 'px'))), 'button' => array('title' => __('Button', 'fl-builder'), 'fields' => array('button_text' => array('type' => 'text', 'label' => __('Button Text', 'fl-builder')), 'button_url' => array('type' => 'link', 'label' => __('Button URL', 'fl-builder')))), 'features' => array('title' => _x('Features', 'Price features displayed in pricing box.', 'fl-builder'), 'fields' => array('features' => array('type' => 'text', 'label' => '', 'placeholder' => __('One feature per line. HTML is okay.', 'fl-builder'), 'multiple' => true))))), 'style' => array('title' => __('Style', 'fl-builder'), 'sections' => array('style' => array('title' => 'Style', 'fields' => array('background' => array('type' => 'color', 'label' => __('Box Background', 'fl-builder'), 'default' => 'F2F2F2'), 'foreground' => array('type' => 'color', 'label' => __('Box Foreground', 'fl-builder'), 'default' => 'ffffff'), 'column_background' => array('type' => 'color', 'default' => '66686b', 'label' => __('Accent Color', 'fl-builder')), 'column_color' => array('type' => 'color', 'default' => 'ffffff', 'label' => __('Accent Text Color', 'fl-builder')), 'margin' => array('type' => 'text', 'label' => __('Box Top Margin', 'fl-builder'), 'default' => '0', 'maxlength' => '3', 'size' => '3', 'description' => 'px'))))))));
コード例 #4
0
ファイル: numbers.php プロジェクト: onedaylabs/onedaylabs.com
    }
    public function render_number()
    {
        $number = $this->settings->number ? $this->settings->number : 0;
        $layout = $this->settings->layout ? $this->settings->layout : 'default';
        $type = $this->settings->number_type ? $this->settings->number_type : 'percent';
        $prefix = $type == 'percent' ? '' : $this->settings->number_prefix;
        $suffix = $type == 'percent' ? '%' : $this->settings->number_suffix;
        $html = '<div class="fl-number-string">' . $prefix . '<span class="fl-number-int">' . number_format($number) . '</span>' . $suffix . '</div>';
        echo $html;
    }
    public function render_circle_bar()
    {
        $width = !empty($this->settings->circle_width) ? $this->settings->circle_width : 100;
        $pos = $width / 2;
        $radius = $pos - 10;
        $dash = number_format(M_PI * 2 * $radius, 2, '.', '');
        $html = '<div class="svg-container">';
        $html .= '<svg class="svg" viewBox="0 0 ' . $width . ' ' . $width . '" version="1.1" preserveAspectRatio="xMinYMin meet">
			<circle class="fl-bar-bg" r="' . $radius . '" cx="' . $pos . '" cy="' . $pos . '" fill="transparent" stroke-dasharray="' . $dash . '" stroke-dashoffset="0"></circle>
			<circle class="fl-bar" r="' . $radius . '" cx="' . $pos . '" cy="' . $pos . '" fill="transparent" stroke-dasharray="' . $dash . '" stroke-dashoffset="' . $dash . '" transform="rotate(-90 ' . $pos . ' ' . $pos . ')"></circle>
		</svg>';
        $html .= '</div>';
        echo $html;
    }
}
/**
 * Register the module and its form settings.
 */
FLBuilder::register_module('FLNumbersModule', array('general' => array('title' => __('General', 'fl-builder'), 'sections' => array('general' => array('title' => '', 'fields' => array('layout' => array('type' => 'select', 'label' => __('Layout', 'fl-builder'), 'default' => 'default', 'options' => array('default' => __('Only Numbers', 'fl-builder'), 'circle' => __('Circle Counter', 'fl-builder'), 'bars' => __('Bars Counter', 'fl-builder')), 'toggle' => array('circle' => array('sections' => array('circle_bar_style')), 'bars' => array('sections' => array('bar_style'), 'fields' => array('number_position')))), 'number_type' => array('type' => 'select', 'label' => __('Number Type', 'fl-builder'), 'default' => 'percent', 'options' => array('percent' => __('Percent', 'fl-builder'), 'standard' => __('Standard', 'fl-builder')), 'toggle' => array('standard' => array('fields' => array('number_prefix', 'number_suffix')))), 'number' => array('type' => 'text', 'label' => __('Number', 'fl-builder'), 'size' => '5', 'default' => '100', 'placeholder' => '100'), 'max_number' => array('type' => 'text', 'label' => __('Total', 'fl-builder'), 'size' => '5', 'help' => __('The total number of units for this counter. For example, if the Number is set to 250 and the Total is set to 500, the counter will animate to 50%.', 'fl-builder')), 'number_position' => array('type' => 'select', 'label' => __('Number Position', 'fl-builder'), 'size' => '5', 'help' => __('Where to display the number in relation to the bar.', 'fl-builder'), 'options' => array('default' => __('Inside Bar', 'fl-builder'), 'above' => __('Above Bar', 'fl-builder'), 'below' => __('Below Bar', 'fl-builder'))), 'before_number_text' => array('type' => 'text', 'label' => __('Text Before Number', 'fl-builder'), 'size' => '20', 'help' => __('Text to appear above the number. Leave it empty for none.', 'fl-builder')), 'after_number_text' => array('type' => 'text', 'label' => __('Text After Number', 'fl-builder'), 'size' => '20', 'help' => __('Text to appear after the number. Leave it empty for none.', 'fl-builder')), 'number_prefix' => array('type' => 'text', 'label' => __('Number Prefix', 'fl-builder'), 'size' => '10', 'help' => __('For example, if your number is US$ 10, your prefix would be "US$ ".', 'fl-builder')), 'number_suffix' => array('type' => 'text', 'label' => __('Number Suffix', 'fl-builder'), 'size' => '10', 'help' => __('For example, if your number is 10%, your prefix would be "%".', 'fl-builder')), 'animation_speed' => array('type' => 'text', 'label' => __('Animation Speed', 'fl-builder'), 'size' => '5', 'default' => '1', 'placeholder' => '1', 'description' => __('second(s)', 'fl-builder'), 'help' => __('Number of seconds to complete the animation.', 'fl-builder')), 'delay' => array('type' => 'text', 'label' => __('Animation Delay', 'fl-builder'), 'size' => '5', 'default' => '1', 'placeholder' => '1', 'description' => __('second(s)', 'fl-builder')))))), 'style' => array('title' => __('Style', 'fl-builder'), 'sections' => array('text_style' => array('title' => __('Colors', 'fl-builder'), 'fields' => array('text_color' => array('type' => 'color', 'label' => __('Text Color', 'fl-builder'), 'show_reset' => true, 'preview' => array('type' => 'css', 'selector' => '.fl-number-before-text, .fl-number-after-text', 'property' => 'color')), 'number_color' => array('type' => 'color', 'label' => __('Number Color', 'fl-builder'), 'show_reset' => true, 'preview' => array('type' => 'css', 'selector' => '.fl-number-string', 'property' => 'color')), 'number_size' => array('type' => 'text', 'label' => __('Number Size', 'fl-builder'), 'default' => '32', 'maxlength' => '3', 'size' => '4', 'description' => 'px', 'preview' => array('type' => 'css', 'selector' => '.fl-number-string', 'property' => 'font-size', 'unit' => 'px')))), 'circle_bar_style' => array('title' => __('Circle Bar Styles', 'fl-builder'), 'fields' => array('circle_width' => array('type' => 'text', 'label' => __('Cirle Size', 'fl-builder'), 'default' => '200', 'maxlength' => '4', 'size' => '4', 'description' => 'px', 'preview' => array('type' => 'css', 'rules' => array(array('selector' => '.fl-number-circle-container', 'property' => 'max-width', 'unit' => 'px'), array('selector' => '.fl-number-circle-container', 'property' => 'max-height', 'unit' => 'px')))), 'circle_dash_width' => array('type' => 'text', 'label' => __('Cirle Stroke Size', 'fl-builder'), 'default' => '10', 'maxlength' => '2', 'size' => '4', 'description' => 'px', 'preview' => array('type' => 'css', 'selector' => '.svg circle', 'property' => 'stroke-width', 'unit' => 'px')), 'circle_color' => array('type' => 'color', 'label' => __('Circle Foreground Color', 'fl-builder'), 'default' => 'f7951e', 'show_reset' => true, 'preview' => array('type' => 'css', 'selector' => '.svg .fl-bar', 'property' => 'stroke')), 'circle_bg_color' => array('type' => 'color', 'label' => __('Circle Background Color', 'fl-builder'), 'default' => 'eaeaea', 'show_reset' => true, 'preview' => array('type' => 'css', 'selector' => '.svg .fl-bar-bg', 'property' => 'stroke')))), 'bar_style' => array('title' => __('Bar Styles', 'fl-builder'), 'fields' => array('bar_color' => array('type' => 'color', 'label' => __('Bar Foreground Color', 'fl-builder'), 'default' => 'f7951e', 'show_reset' => true, 'preview' => array('type' => 'css', 'selector' => '.fl-number-bar', 'property' => 'background-color')), 'bar_bg_color' => array('type' => 'color', 'label' => __('Bar Background Color', 'fl-builder'), 'default' => 'eaeaea', 'show_reset' => true, 'preview' => array('type' => 'css', 'selector' => '.fl-number-bars-container', 'property' => 'background-color'))))))));
コード例 #5
0
ファイル: wm_content_module.php プロジェクト: pab44/pab44
$module_form_children = wma_bb_shortcode_def($module, 'form_children');
/**
 * 20) Registration
 */
/**
 * Module registration class
 */
class WM_BB_Module_Content_module extends FLBuilderModule
{
    public function __construct()
    {
        $module = wma_bb_get_custom_module_slug(__FILE__);
        parent::__construct(apply_filters('wmhook_wmamp_' . 'bb_module_construct_' . $module, wma_bb_shortcode_def($module, 'register')));
    }
}
// /WM_BB_Module_Content_module
/**
 * 30) Forms
 */
/**
 * Register the module and its form
 */
if (!empty($module_form) && is_array($module_form)) {
    FLBuilder::register_module('WM_BB_Module_Content_module', $module_form);
}
/**
 * Module children form
 */
if (!empty($module_form_children) && is_array($module_form_children)) {
    FLBuilder::register_settings_form('wm_children_form_' . $module, $module_form_children);
}
コード例 #6
0
ファイル: callout.php プロジェクト: spokencode/bophillips
    }
    /**
     * @method render_image
     */
    public function render_image($position)
    {
        if ($this->settings->image_type == 'photo' && $this->settings->photo_position == $position) {
            if (empty($this->settings->photo)) {
                return;
            }
            $photo_data = FLBuilderPhoto::get_attachment_data($this->settings->photo);
            if (!$photo_data) {
                $photo_data = $this->settings->photo_data;
            }
            $photo_settings = array('align' => 'center', 'crop' => $this->settings->photo_crop, 'link_target' => $this->settings->link_target, 'link_type' => 'url', 'link_url' => $this->settings->link, 'photo' => $photo_data, 'photo_src' => $this->settings->photo_src, 'photo_source' => 'library');
            echo '<div class="fl-callout-photo">';
            FLBuilder::render_module_html('photo', $photo_settings);
            echo '</div>';
        } else {
            if ($this->settings->image_type == 'icon' && $this->settings->icon_position == $position) {
                $icon_settings = array('bg_color' => $this->settings->icon_bg_color, 'bg_hover_color' => $this->settings->icon_bg_hover_color, 'color' => $this->settings->icon_color, 'exclude_wrapper' => true, 'hover_color' => $this->settings->icon_hover_color, 'icon' => $this->settings->icon, 'link' => $this->settings->link, 'link_target' => $this->settings->link_target, 'size' => $this->settings->icon_size, 'text' => '', 'three_d' => $this->settings->icon_3d);
                FLBuilder::render_module_html('icon', $icon_settings);
            }
        }
    }
}
/**
 * Register the module and its form settings.
 */
FLBuilder::register_module('FLCalloutModule', array('general' => array('title' => __('General', 'fl-builder'), 'sections' => array('title' => array('title' => '', 'fields' => array('title' => array('type' => 'text', 'label' => __('Heading', 'fl-builder'), 'preview' => array('type' => 'text', 'selector' => '.fl-callout-title')))), 'text' => array('title' => __('Text', 'fl-builder'), 'fields' => array('text' => array('type' => 'editor', 'label' => '', 'media_buttons' => false, 'preview' => array('type' => 'text', 'selector' => '.fl-callout-text')))))), 'style' => array('title' => __('Style', 'fl-builder'), 'sections' => array('overall_structure' => array('title' => __('Structure', 'fl-builder'), 'fields' => array('align' => array('type' => 'select', 'label' => __('Overall Alignment', 'fl-builder'), 'default' => 'left', 'options' => array('center' => __('Center', 'fl-builder'), 'left' => __('Left', 'fl-builder'), 'right' => __('Right', 'fl-builder')), 'help' => __('The alignment that will apply to all elements within the callout.', 'fl-builder'), 'preview' => array('type' => 'none')))), 'title_structure' => array('title' => __('Heading Structure', 'fl-builder'), 'fields' => array('title_tag' => array('type' => 'select', 'label' => __('Heading Tag', 'fl-builder'), 'default' => 'h3', 'options' => array('h1' => 'h1', 'h2' => 'h2', 'h3' => 'h3', 'h4' => 'h4', 'h5' => 'h5', 'h6' => 'h6')), 'title_size' => array('type' => 'select', 'label' => __('Heading Size', 'fl-builder'), 'default' => 'default', 'options' => array('default' => __('Default', 'fl-builder'), 'custom' => __('Custom', 'fl-builder')), 'toggle' => array('custom' => array('fields' => array('title_custom_size')))), 'title_custom_size' => array('type' => 'text', 'label' => __('Heading Custom Size', 'fl-builder'), 'default' => '24', 'maxlength' => '3', 'size' => '4', 'description' => 'px'))))), 'image' => array('title' => __('Image', 'fl-builder'), 'sections' => array('general' => array('title' => '', 'fields' => array('image_type' => array('type' => 'select', 'label' => __('Image Type', 'fl-builder'), 'default' => 'photo', 'options' => array('none' => _x('None', 'Image type.', 'fl-builder'), 'photo' => __('Photo', 'fl-builder'), 'icon' => __('Icon', 'fl-builder')), 'toggle' => array('none' => array(), 'photo' => array('sections' => array('photo')), 'icon' => array('sections' => array('icon', 'icon_colors', 'icon_structure')))))), 'photo' => array('title' => __('Photo', 'fl-builder'), 'fields' => array('photo' => array('type' => 'photo', 'label' => __('Photo', 'fl-builder')), 'photo_crop' => array('type' => 'select', 'label' => __('Crop', 'fl-builder'), 'default' => '', 'options' => array('' => _x('None', 'Photo Crop.', 'fl-builder'), 'landscape' => __('Landscape', 'fl-builder'), 'panorama' => __('Panorama', 'fl-builder'), 'portrait' => __('Portrait', 'fl-builder'), 'square' => __('Square', 'fl-builder'), 'circle' => __('Circle', 'fl-builder'))), 'photo_position' => array('type' => 'select', 'label' => __('Position', 'fl-builder'), 'default' => 'above-title', 'options' => array('above-title' => __('Above Heading', 'fl-builder'), 'below-title' => __('Below Heading', 'fl-builder'), 'left' => __('Left of Text and Heading', 'fl-builder'), 'right' => __('Right of Text and Heading', 'fl-builder'))))), 'icon' => array('title' => __('Icon', 'fl-builder'), 'fields' => array('icon' => array('type' => 'icon', 'label' => __('Icon', 'fl-builder')), 'icon_position' => array('type' => 'select', 'label' => __('Position', 'fl-builder'), 'default' => 'left-title', 'options' => array('above-title' => __('Above Heading', 'fl-builder'), 'below-title' => __('Below Heading', 'fl-builder'), 'left-title' => __('Left of Heading', 'fl-builder'), 'right-title' => __('Right of Heading', 'fl-builder'), 'left' => __('Left of Text and Heading', 'fl-builder'), 'right' => __('Right of Text and Heading', 'fl-builder'))))), 'icon_colors' => array('title' => __('Icon Colors', 'fl-builder'), 'fields' => array('icon_color' => array('type' => 'color', 'label' => __('Color', 'fl-builder'), 'show_reset' => true), 'icon_hover_color' => array('type' => 'color', 'label' => __('Hover Color', 'fl-builder'), 'show_reset' => true, 'preview' => array('type' => 'none')), 'icon_bg_color' => array('type' => 'color', 'label' => __('Background Color', 'fl-builder'), 'show_reset' => true), 'icon_bg_hover_color' => array('type' => 'color', 'label' => __('Background Hover Color', 'fl-builder'), 'show_reset' => true, 'preview' => array('type' => 'none')), 'icon_3d' => array('type' => 'select', 'label' => __('Gradient', 'fl-builder'), 'default' => '0', 'options' => array('0' => __('No', 'fl-builder'), '1' => __('Yes', 'fl-builder'))))), 'icon_structure' => array('title' => __('Icon Structure', 'fl-builder'), 'fields' => array('icon_size' => array('type' => 'text', 'label' => __('Size', 'fl-builder'), 'default' => '30', 'maxlength' => '3', 'size' => '4', 'description' => 'px'))))), 'cta' => array('title' => __('Call To Action', 'fl-builder'), 'sections' => array('link' => array('title' => __('Link', 'fl-builder'), 'fields' => array('link' => array('type' => 'link', 'label' => __('Link', 'fl-builder'), 'help' => __('The link applies to the entire module. If choosing a call to action type below, this link will also be used for the text or button.', 'fl-builder'), 'preview' => array('type' => 'none')), 'link_target' => array('type' => 'select', 'label' => __('Link Target', 'fl-builder'), 'default' => '_self', 'options' => array('_self' => __('Same Window', 'fl-builder'), '_blank' => __('New Window', 'fl-builder')), 'preview' => array('type' => 'none')))), 'cta' => array('title' => __('Call to Action', 'fl-builder'), 'fields' => array('cta_type' => array('type' => 'select', 'label' => __('Type', 'fl-builder'), 'default' => 'none', 'options' => array('none' => _x('None', 'Call to action.', 'fl-builder'), 'link' => __('Text', 'fl-builder'), 'button' => __('Button', 'fl-builder')), 'toggle' => array('none' => array(), 'link' => array('fields' => array('cta_text')), 'button' => array('fields' => array('cta_text', 'btn_icon', 'btn_icon_position'), 'sections' => array('btn_style', 'btn_colors', 'btn_structure')))), 'cta_text' => array('type' => 'text', 'label' => __('Text', 'fl-builder'), 'default' => __('Read More', 'fl-builder')), 'btn_icon' => array('type' => 'icon', 'label' => __('Button Icon', 'fl-builder'), 'show_remove' => true), 'btn_icon_position' => array('type' => 'select', 'label' => __('Button Icon Position', 'fl-builder'), 'default' => 'before', 'options' => array('before' => __('Before Text', 'fl-builder'), 'after' => __('After Text', 'fl-builder'))))), 'btn_colors' => array('title' => __('Button Colors', 'fl-builder'), 'fields' => array('btn_bg_color' => array('type' => 'color', 'label' => __('Background Color', 'fl-builder'), 'default' => '', 'show_reset' => true), 'btn_bg_hover_color' => array('type' => 'color', 'label' => __('Background Hover Color', 'fl-builder'), 'default' => '', 'show_reset' => true, 'preview' => array('type' => 'none')), 'btn_text_color' => array('type' => 'color', 'label' => __('Text Color', 'fl-builder'), 'default' => '', 'show_reset' => true), 'btn_text_hover_color' => array('type' => 'color', 'label' => __('Text Hover Color', 'fl-builder'), 'default' => '', 'show_reset' => true, 'preview' => array('type' => 'none')))), 'btn_style' => array('title' => __('Button Style', 'fl-builder'), 'fields' => array('btn_style' => array('type' => 'select', 'label' => __('Style', 'fl-builder'), 'default' => 'flat', 'options' => array('flat' => __('Flat', 'fl-builder'), 'gradient' => __('Gradient', 'fl-builder'), 'transparent' => __('Transparent', 'fl-builder')), 'toggle' => array('transparent' => array('fields' => array('btn_bg_opacity', 'btn_border_size')))), 'btn_border_size' => array('type' => 'text', 'label' => __('Border Size', 'fl-builder'), 'default' => '2', 'description' => 'px', 'maxlength' => '3', 'size' => '5', 'placeholder' => '0'), 'btn_bg_opacity' => array('type' => 'text', 'label' => __('Background Opacity', 'fl-builder'), 'default' => '0', 'description' => '%', 'maxlength' => '3', 'size' => '5', 'placeholder' => '0'))), 'btn_structure' => array('title' => __('Button Structure', 'fl-builder'), 'fields' => array('btn_width' => array('type' => 'select', 'label' => __('Button Width', 'fl-builder'), 'default' => 'auto', 'options' => array('auto' => _x('Auto', 'Width.', 'fl-builder'), 'full' => __('Full Width', 'fl-builder'))), 'btn_font_size' => array('type' => 'text', 'label' => __('Font Size', 'fl-builder'), 'default' => '14', 'maxlength' => '3', 'size' => '4', 'description' => 'px'), 'btn_padding' => array('type' => 'text', 'label' => __('Padding', 'fl-builder'), 'default' => '10', 'maxlength' => '3', 'size' => '4', 'description' => 'px'), 'btn_border_radius' => array('type' => 'text', 'label' => __('Round Corners', 'fl-builder'), 'default' => '4', 'maxlength' => '3', 'size' => '4', 'description' => 'px')))))));
コード例 #7
0
<?php

/**
 * @class FLSeparatorModule
 */
class FLSeparatorModule extends FLBuilderModule
{
    /**
     * @method __construct
     */
    public function __construct()
    {
        parent::__construct(array('name' => __('Separator', 'fl-builder'), 'description' => __('A divider line to separate content.', 'fl-builder'), 'category' => __('Basic Modules', 'fl-builder'), 'editor_export' => false, 'partial_refresh' => true));
    }
}
/**
 * Register the module and its form settings.
 */
FLBuilder::register_module('FLSeparatorModule', array('general' => array('title' => __('General', 'fl-builder'), 'sections' => array('general' => array('title' => '', 'fields' => array('color' => array('type' => 'color', 'label' => __('Color', 'fl-builder'), 'default' => 'cccccc', 'preview' => array('type' => 'css', 'selector' => '.fl-separator', 'property' => 'border-top-color')), 'opacity' => array('type' => 'text', 'label' => __('Opacity', 'fl-builder'), 'default' => '100', 'description' => '%', 'maxlength' => '3', 'size' => '5', 'preview' => array('type' => 'css', 'selector' => '.fl-separator', 'property' => 'opacity', 'unit' => '%')), 'height' => array('type' => 'text', 'label' => __('Height', 'fl-builder'), 'default' => '1', 'maxlength' => '2', 'size' => '3', 'description' => 'px', 'preview' => array('type' => 'css', 'selector' => '.fl-separator', 'property' => 'border-top-width', 'unit' => 'px')), 'style' => array('type' => 'select', 'label' => __('Style', 'fl-builder'), 'default' => 'solid', 'options' => array('solid' => _x('Solid', 'Border type.', 'fl-builder'), 'dashed' => _x('Dashed', 'Border type.', 'fl-builder'), 'dotted' => _x('Dotted', 'Border type.', 'fl-builder'), 'double' => _x('Double', 'Border type.', 'fl-builder')), 'preview' => array('type' => 'css', 'selector' => '.fl-separator', 'property' => 'border-top-style'), 'help' => __('The type of border to use. Double borders must have a height of at least 3px to render properly.', 'fl-builder'))))))));
コード例 #8
0
ファイル: heading.php プロジェクト: onedaylabs/onedaylabs.com
<?php

/**
 * @class FLHeadingModule
 */
class FLHeadingModule extends FLBuilderModule
{
    /**
     * @method __construct
     */
    public function __construct()
    {
        parent::__construct(array('name' => __('Heading', 'fl-builder'), 'description' => __('Display a title/page heading.', 'fl-builder'), 'category' => __('Basic Modules', 'fl-builder'), 'partial_refresh' => true));
    }
}
/**
 * Register the module and its form settings.
 */
FLBuilder::register_module('FLHeadingModule', array('general' => array('title' => __('General', 'fl-builder'), 'sections' => array('general' => array('title' => '', 'fields' => array('heading' => array('type' => 'text', 'label' => __('Heading', 'fl-builder'), 'default' => '', 'preview' => array('type' => 'text', 'selector' => '.fl-heading-text')))), 'link' => array('title' => __('Link', 'fl-builder'), 'fields' => array('link' => array('type' => 'link', 'label' => __('Link', 'fl-builder'), 'preview' => array('type' => 'none')), 'link_target' => array('type' => 'select', 'label' => __('Link Target', 'fl-builder'), 'default' => '_self', 'options' => array('_self' => __('Same Window', 'fl-builder'), '_blank' => __('New Window', 'fl-builder')), 'preview' => array('type' => 'none')))))), 'style' => array('title' => __('Style', 'fl-builder'), 'sections' => array('colors' => array('title' => __('Colors', 'fl-builder'), 'fields' => array('color' => array('type' => 'color', 'show_reset' => true, 'label' => __('Text Color', 'fl-builder')))), 'structure' => array('title' => __('Structure', 'fl-builder'), 'fields' => array('alignment' => array('type' => 'select', 'label' => __('Alignment', 'fl-builder'), 'default' => 'left', 'options' => array('left' => __('Left', 'fl-builder'), 'center' => __('Center', 'fl-builder'), 'right' => __('Right', 'fl-builder')), 'preview' => array('type' => 'css', 'selector' => '.fl-heading', 'property' => 'text-align')), 'tag' => array('type' => 'select', 'label' => __('HTML Tag', 'fl-builder'), 'default' => 'h3', 'options' => array('h1' => 'h1', 'h2' => 'h2', 'h3' => 'h3', 'h4' => 'h4', 'h5' => 'h5', 'h6' => 'h6')), 'font' => array('type' => 'font', 'default' => array('family' => 'Default', 'weight' => 300), 'label' => __('Font', 'fl-builder'), 'preview' => array('type' => 'font', 'selector' => '.fl-heading-text')), 'font_size' => array('type' => 'select', 'label' => __('Font Size', 'fl-builder'), 'default' => 'default', 'options' => array('default' => __('Default', 'fl-builder'), 'custom' => __('Custom', 'fl-builder')), 'toggle' => array('custom' => array('fields' => array('custom_font_size')))), 'custom_font_size' => array('type' => 'text', 'label' => __('Custom Font Size', 'fl-builder'), 'default' => '24', 'maxlength' => '3', 'size' => '4', 'description' => 'px'))), 'r_structure' => array('title' => __('Mobile Structure', 'fl-builder'), 'fields' => array('r_alignment' => array('type' => 'select', 'label' => __('Alignment', 'fl-builder'), 'default' => 'default', 'options' => array('default' => __('Default', 'fl-builder'), 'custom' => __('Custom', 'fl-builder')), 'toggle' => array('custom' => array('fields' => array('r_custom_alignment'))), 'preview' => array('type' => 'none')), 'r_custom_alignment' => array('type' => 'select', 'label' => __('Custom Alignment', 'fl-builder'), 'default' => 'center', 'options' => array('left' => __('Left', 'fl-builder'), 'center' => __('Center', 'fl-builder'), 'right' => __('Right', 'fl-builder')), 'preview' => array('type' => 'none')), 'r_font_size' => array('type' => 'select', 'label' => __('Font Size', 'fl-builder'), 'default' => 'default', 'options' => array('default' => __('Default', 'fl-builder'), 'custom' => __('Custom', 'fl-builder')), 'toggle' => array('custom' => array('fields' => array('r_custom_font_size'))), 'preview' => array('type' => 'none')), 'r_custom_font_size' => array('type' => 'text', 'label' => __('Custom Font Size', 'fl-builder'), 'default' => '24', 'maxlength' => '3', 'size' => '4', 'description' => 'px', 'preview' => array('type' => 'none'))))))));
コード例 #9
0
<?php

/**
 * This is an example module with only the basic
 * setup necessary to get it working.
 *
 * @class CBCustomSpotlightModule
 */
class CBCustomSpotlightModule extends FLBuilderModule
{
    /** 
     * Constructor function for the module. You must pass the
     * name, description, dir and url in an array to the parent class.
     *
     * @method __construct
     */
    public function __construct()
    {
        parent::__construct(array('name' => __('Spotlight', 'fl-builder'), 'description' => __('Let your viewer spotlight an image.', 'fl-builder'), 'category' => __('CB Custom Modules', 'fl-builder'), 'dir' => CB_CUSTOM_MODULE_DIR . 'cb-spotlight/', 'url' => CB_CUSTOM_MODULE_URL . 'cb-spotlight/', 'editor_export' => true, 'enabled' => true));
    }
}
/**
 * Register the module and its form settings.
 */
FLBuilder::register_module('CBCustomSpotlightModule', array('general' => array('title' => __('General', 'fl-builder'), 'sections' => array('settings' => array('title' => __('Settings', 'fl-builder'), 'fields' => array('cb_spotlight_text_field' => array('type' => 'text', 'label' => __('Header Text', 'fl-builder'), 'default' => '', 'placeholder' => __('Select an Image', 'fl-builder'), 'class' => 'my-css-class', 'help' => __('Set a header.', 'fl-builder')), 'cb_spotlight_column_order' => array('type' => 'select', 'label' => __('Select Column Order', 'fl-builder'), 'default' => 'txph', 'options' => array('txph' => __('Text | Photos', 'fl-builder'), 'phtx' => __('Photos | Text', 'fl-builder'))), 'cb_spotlight_column_widths' => array('type' => 'select', 'label' => __('Select Column Widths', 'fl-builder'), 'default' => '75/25', 'options' => array('50/50' => __('50% | 50%', 'fl-builder'), '75/25' => __('75% | 25%', 'fl-builder'), '25/75' => __('25% | 75%', 'fl-builder'), '66/34' => __('2/3  |  1/3', 'fl-builder'), '34/66' => __('1/3  |  2/3', 'fl-builder')), 'help' => __('This applies to medium-sized screens and above. On smaller screens, the columns will collapse.', 'fl-builder')))), 'design' => array('title' => __('Spotlight Images', 'fl-builder'), 'fields' => array('cb_spotlight_form_field_repeater' => array('type' => 'form', 'label' => __('Spotlight Image', 'fl-builder'), 'form' => 'cb_spotlight_form_field', 'preview_text' => 'cb_spotlight_text_field', 'multiple' => true)))))));
/**
 * Register form
 */
FLBuilder::register_settings_form('cb_spotlight_form_field', array('title' => __('New Image', 'fl-builder'), 'tabs' => array('image' => array('title' => __('Spotlight Image', 'fl-builder'), 'sections' => array('general' => array('title' => '', 'fields' => array('cb_spotlight_photo_field' => array('type' => 'photo', 'label' => __('Spotlight Image', 'fl-builder'), 'show_remove' => false), 'cb_spotlight_text_field' => array('type' => 'text', 'label' => __('Spotlight Image Link Text', 'fl-builder'), 'default' => '', 'maxlength' => '140', 'size' => '45', 'placeholder' => __('Describe image here', 'fl-builder'), 'class' => 'my-css-class', 'description' => __('', 'fl-builder'), 'help' => __('Users will click on this text to load this image.', 'fl-builder')))))))));
コード例 #10
0
ファイル: wm_tabs.php プロジェクト: KJaddoe/CSCMRA-Project
$module_form_children = wma_bb_shortcode_def($module, 'form_children');
/**
 * 20) Registration
 */
/**
 * Module registration class
 */
class WM_BB_Module_Tabs extends FLBuilderModule
{
    public function __construct()
    {
        $module = wma_bb_get_custom_module_slug(__FILE__);
        parent::__construct(apply_filters('wmhook_wmamp_' . 'bb_module_construct_' . $module, wma_bb_shortcode_def($module, 'register')));
    }
}
// /WM_BB_Module_Tabs
/**
 * 30) Forms
 */
/**
 * Register the module and its form
 */
if (!empty($module_form) && is_array($module_form)) {
    FLBuilder::register_module('WM_BB_Module_Tabs', $module_form);
}
/**
 * Module children form
 */
if (!empty($module_form_children) && is_array($module_form_children)) {
    FLBuilder::register_settings_form('wm_children_form_' . $module, $module_form_children);
}
コード例 #11
0
$module_form_children = wma_bb_shortcode_def($module, 'form_children');
/**
 * 20) Registration
 */
/**
 * Module registration class
 */
class WM_BB_Module_Accordion extends FLBuilderModule
{
    public function __construct()
    {
        $module = wma_bb_get_custom_module_slug(__FILE__);
        parent::__construct(apply_filters('wmhook_wmamp_' . 'bb_module_construct_' . $module, wma_bb_shortcode_def($module, 'register')));
    }
}
// /WM_BB_Module_Accordion
/**
 * 30) Forms
 */
/**
 * Register the module and its form
 */
if (!empty($module_form) && is_array($module_form)) {
    FLBuilder::register_module('WM_BB_Module_Accordion', $module_form);
}
/**
 * Module children form
 */
if (!empty($module_form_children) && is_array($module_form_children)) {
    FLBuilder::register_settings_form('wm_children_form_' . $module, $module_form_children);
}
コード例 #12
0
ファイル: button.php プロジェクト: spokencode/bophillips
    public function update($settings)
    {
        // Remove the old three_d setting.
        if (isset($settings->three_d)) {
            unset($settings->three_d);
        }
        return $settings;
    }
    /**
     * @method get_classname
     */
    public function get_classname()
    {
        $classname = 'fl-button-wrap';
        if (!empty($this->settings->width)) {
            $classname .= ' fl-button-width-' . $this->settings->width;
        }
        if (!empty($this->settings->align)) {
            $classname .= ' fl-button-' . $this->settings->align;
        }
        if (!empty($this->settings->icon)) {
            $classname .= ' fl-button-has-icon';
        }
        return $classname;
    }
}
/**
 * Register the module and its form settings.
 */
FLBuilder::register_module('FLButtonModule', array('general' => array('title' => __('General', 'fl-builder'), 'sections' => array('general' => array('title' => '', 'fields' => array('text' => array('type' => 'text', 'label' => __('Text', 'fl-builder'), 'default' => __('Click Here', 'fl-builder'), 'preview' => array('type' => 'text', 'selector' => '.fl-button-text')), 'icon' => array('type' => 'icon', 'label' => __('Icon', 'fl-builder'), 'show_remove' => true), 'icon_position' => array('type' => 'select', 'label' => __('Icon Position', 'fl-builder'), 'default' => 'before', 'options' => array('before' => __('Before Text', 'fl-builder'), 'after' => __('After Text', 'fl-builder'))))), 'link' => array('title' => __('Link', 'fl-builder'), 'fields' => array('link' => array('type' => 'link', 'label' => __('Link', 'fl-builder'), 'placeholder' => __('http://www.example.com', 'fl-builder'), 'preview' => array('type' => 'none')), 'link_target' => array('type' => 'select', 'label' => __('Link Target', 'fl-builder'), 'default' => '_self', 'options' => array('_self' => __('Same Window', 'fl-builder'), '_blank' => __('New Window', 'fl-builder')), 'preview' => array('type' => 'none')))))), 'style' => array('title' => __('Style', 'fl-builder'), 'sections' => array('colors' => array('title' => __('Colors', 'fl-builder'), 'fields' => array('bg_color' => array('type' => 'color', 'label' => __('Background Color', 'fl-builder'), 'default' => '', 'show_reset' => true), 'bg_hover_color' => array('type' => 'color', 'label' => __('Background Hover Color', 'fl-builder'), 'default' => '', 'show_reset' => true, 'preview' => array('type' => 'none')), 'text_color' => array('type' => 'color', 'label' => __('Text Color', 'fl-builder'), 'default' => '', 'show_reset' => true), 'text_hover_color' => array('type' => 'color', 'label' => __('Text Hover Color', 'fl-builder'), 'default' => '', 'show_reset' => true, 'preview' => array('type' => 'none')))), 'style' => array('title' => __('Style', 'fl-builder'), 'fields' => array('style' => array('type' => 'select', 'label' => __('Style', 'fl-builder'), 'default' => 'flat', 'options' => array('flat' => __('Flat', 'fl-builder'), 'gradient' => __('Gradient', 'fl-builder'), 'transparent' => __('Transparent', 'fl-builder')), 'toggle' => array('transparent' => array('fields' => array('bg_opacity', 'border_size')))), 'border_size' => array('type' => 'text', 'label' => __('Border Size', 'fl-builder'), 'default' => '2', 'description' => 'px', 'maxlength' => '3', 'size' => '5', 'placeholder' => '0'), 'bg_opacity' => array('type' => 'text', 'label' => __('Background Opacity', 'fl-builder'), 'default' => '0', 'description' => '%', 'maxlength' => '3', 'size' => '5', 'placeholder' => '0'))), 'formatting' => array('title' => __('Structure', 'fl-builder'), 'fields' => array('width' => array('type' => 'select', 'label' => __('Width', 'fl-builder'), 'default' => 'auto', 'options' => array('auto' => _x('Auto', 'Width.', 'fl-builder'), 'full' => __('Full Width', 'fl-builder'), 'custom' => __('Custom', 'fl-builder')), 'toggle' => array('auto' => array('fields' => array('align')), 'full' => array(), 'custom' => array('fields' => array('align', 'custom_width')))), 'custom_width' => array('type' => 'text', 'label' => __('Custom Width', 'fl-builder'), 'default' => '200', 'maxlength' => '3', 'size' => '4', 'description' => 'px'), 'align' => array('type' => 'select', 'label' => __('Alignment', 'fl-builder'), 'default' => 'left', 'options' => array('center' => __('Center', 'fl-builder'), 'left' => __('Left', 'fl-builder'), 'right' => __('Right', 'fl-builder'))), 'font_size' => array('type' => 'text', 'label' => __('Font Size', 'fl-builder'), 'default' => '16', 'maxlength' => '3', 'size' => '4', 'description' => 'px'), 'padding' => array('type' => 'text', 'label' => __('Padding', 'fl-builder'), 'default' => '12', 'maxlength' => '3', 'size' => '4', 'description' => 'px'), 'border_radius' => array('type' => 'text', 'label' => __('Round Corners', 'fl-builder'), 'default' => '4', 'maxlength' => '3', 'size' => '4', 'description' => 'px')))))));
コード例 #13
0
<?php

/**
 * @class FLVideoModule
 */
class BRJ_ColorSampleModule extends BRJ_WorkspaceModule
{
    /**
     * @method __construct
     */
    public function __construct()
    {
        parent::__construct(array('name' => __('Color Sample', 'fl-builder'), 'description' => __('Render a color sample block', 'fl-builder'), 'category' => BB_THEME_ELEMENTS_MODULE_CATEGORY, 'dir' => BB_THEME_ELEMENTS_DIR . 'modules/color-sample/', 'url' => BB_THEME_ELEMENTS_URL . 'modules/color-sample/'));
    }
}
/**
 * Register the module and its form settings.
 */
FLBuilder::register_module('BRJ_ColorSampleModule', array('general' => array('title' => __('General', 'fl-builder'), 'sections' => array('general' => array('title' => '', 'fields' => array('color' => array('type' => 'color', 'label' => 'Color'), 'name' => array('type' => 'text', 'label' => 'Name'), 'rules' => array('type' => 'form', 'label' => 'Target', 'multiple' => true)))))));
コード例 #14
0
ファイル: wm_message.php プロジェクト: pab44/pab44
$module_form_children = wma_bb_shortcode_def($module, 'form_children');
/**
 * 20) Registration
 */
/**
 * Module registration class
 */
class WM_BB_Module_Message extends FLBuilderModule
{
    public function __construct()
    {
        $module = wma_bb_get_custom_module_slug(__FILE__);
        parent::__construct(apply_filters('wmhook_wmamp_' . 'bb_module_construct_' . $module, wma_bb_shortcode_def($module, 'register')));
    }
}
// /WM_BB_Module_Message
/**
 * 30) Forms
 */
/**
 * Register the module and its form
 */
if (!empty($module_form) && is_array($module_form)) {
    FLBuilder::register_module('WM_BB_Module_Message', $module_form);
}
/**
 * Module children form
 */
if (!empty($module_form_children) && is_array($module_form_children)) {
    FLBuilder::register_settings_form('wm_children_form_' . $module, $module_form_children);
}
コード例 #15
0
        $this->add_css('font-awesome');
        add_action('brj_theme_elements_render/after_setup_theme', 'BRJ_Sidebar::render_php');
        add_action('after_setup_theme', 'BRJ_Sidebar::register_sidebars');
    }
    static function render_php()
    {
        $modules = BRJ_ThemeElements::get_modules();
        $modules = $modules['brj-sidebar'];
        if (!empty($modules)) {
            require dirname(__FILE__) . '/generator/generator.php';
        }
    }
    static function get_args($module)
    {
        $args = array('name' => $module->settings->label, 'id' => $module->settings->handle, 'description' => $module->settings->description, 'class' => $module->settings->class, 'before_widget' => $module->settings->before_widget, 'after_widget' => $module->settings->after_widget, 'before_title' => $module->settings->before_title, 'after_title' => $module->settings->after_title);
        return $args;
    }
    static function register_sidebars()
    {
        $modules = BRJ_ThemeElements::get_modules();
        $modules = $modules['brj-sidebar'];
        if (!empty($modules)) {
            foreach ($modules as $module) {
                $args = self::get_args($module);
                register_sidebar($args);
            }
        }
    }
}
FLBuilder::register_module('BRJ_Sidebar', array('general' => array('title' => __('General', 'fl-builder'), 'sections' => array('general' => array('title' => '', 'fields' => array('handle' => array('type' => 'text', 'label' => 'Handle', 'placeholder' => 'default_sidebar'), 'label' => array('type' => 'text', 'label' => 'Name', 'placeholder' => 'Default Sidebar'), 'description' => array('type' => 'textarea', 'label' => 'Description'), 'class' => array('type' => 'text', 'label' => 'Class'), 'before_widget' => array('type' => 'text', 'label' => 'Before Widget', 'placeholder' => ''), 'after_widget' => array('type' => 'text', 'label' => 'After Widget', 'placeholder' => ''), 'before_title' => array('type' => 'text', 'label' => 'Before Title', 'placeholder' => ''), 'after_title' => array('type' => 'text', 'label' => 'After Title', 'placeholder' => '')))))));
コード例 #16
0
ファイル: menu.php プロジェクト: spokencode/bophillips
                include FL_BUILDER_DIR . 'img/svg/hamburger-menu.svg';
                echo '</div>';
                if ($toggle == 'hamburger-label') {
                    echo '<span class="fl-menu-mobile-toggle-label">' . __('Menu', 'fl-builder') . '</span>';
                }
                echo '</button>';
            } elseif ($toggle == 'text') {
                echo '<button class="fl-menu-mobile-toggle text"><span class="fl-menu-mobile-toggle-label">' . __('Menu', 'fl-builder') . '</span></button>';
            }
        }
    }
}
/**
 * Register the module and its form settings.
 */
FLBuilder::register_module('FLMenuModule', array('general' => array('title' => __('General', 'fl-builder'), 'sections' => array('general' => array('title' => '', 'fields' => array('menu' => FLMenuModule::_get_menus(), 'menu_layout' => array('type' => 'select', 'label' => __('Layout', 'fl-builder'), 'default' => 'horizontal', 'options' => array('horizontal' => __('Horizontal', 'fl-builder'), 'vertical' => __('Vertical', 'fl-builder'), 'accordion' => __('Accordion', 'fl-builder'), 'expanded' => __('Expanded', 'fl-builder')), 'toggle' => array('horizontal' => array('fields' => array('submenu_hover_toggle', 'menu_align')), 'vertical' => array('fields' => array('submenu_hover_toggle')), 'accordion' => array('fields' => array('submenu_click_toggle')))), 'submenu_hover_toggle' => array('type' => 'select', 'label' => __('Submenu Icon', 'fl-builder'), 'default' => 'none', 'options' => array('arrows' => __('Arrows', 'fl-builder'), 'plus' => __('Plus sign', 'fl-builder'), 'none' => __('None', 'fl-builder'))), 'submenu_click_toggle' => array('type' => 'select', 'label' => __('Submenu Icon click', 'fl-builder'), 'default' => 'arrows', 'options' => array('arrows' => __('Arrows', 'fl-builder'), 'plus' => __('Plus sign', 'fl-builder'))), 'mobile_toggle' => array('type' => 'select', 'label' => __('Mobile Style', 'fl-builder'), 'default' => 'expanded', 'options' => array('expanded' => __('Expanded', 'fl-builder'), 'hamburger' => __('Hamburger Icon', 'fl-builder'), 'hamburger-label' => __('Hamburger Icon + Label', 'fl-builder'), 'text' => __('Menu Button', 'fl-builder')), 'toggle' => array('hamburger' => array('fields' => array('mobile_full_width')), 'hamburger-label' => array('fields' => array('mobile_full_width')))), 'mobile_full_width' => array('type' => 'select', 'label' => __('Mobile Width', 'fl-builder'), 'help' => __('Choose Full Width if you want the menu to span the width of the screen on mobile devices.', 'fl-builder'), 'default' => 'no', 'options' => array('no' => __('Default', 'fl-builder'), 'yes' => __('Full Width', 'fl-builder')), 'toggle' => array('yes' => array('fields' => array('mobile_menu_bg')))))))), 'style' => array('title' => __('Style', 'fl-builder'), 'sections' => array('general_style' => array('title' => '', 'fields' => array('menu_align' => array('type' => 'select', 'label' => __('Menu Alignment', 'fl-builder'), 'default' => 'default', 'options' => array('default' => __('Default', 'fl-builder'), 'left' => __('Left', 'fl-builder'), 'center' => __('Center', 'fl-builder'), 'right' => __('Right', 'fl-builder'))), 'drop_shadow' => array('type' => 'select', 'label' => __('Submenu Drop Shadow', 'fl-builder'), 'default' => 'yes', 'options' => array('no' => __('No', 'fl-builder'), 'yes' => __('Yes', 'fl-builder'))))), 'text_style' => array('title' => __('Text', 'fl-builder'), 'fields' => array('link_color' => array('type' => 'color', 'label' => __('Link Color', 'fl-builder'), 'show_reset' => true, 'preview' => array('type' => 'css', 'rules' => array(array('selector' => '.fl-menu a, .menu > li > a, .menu > li > .fl-has-submenu-container > a, .sub-menu > li > a', 'property' => 'color'), array('selector' => '.menu .fl-menu-toggle:before, .menu .fl-menu-toggle:after', 'property' => 'border-color')))), 'link_hover_color' => array('type' => 'color', 'label' => __('Link Hover Color', 'fl-builder'), 'show_reset' => true, 'preview' => array('type' => 'css', 'selector' => '.fl-menu a, .menu > li.current-menu-item > a, .menu > li.current-menu-item > .fl-has-submenu-container > a, .sub-menu > li.current-menu-item > a', 'property' => 'color')), 'text_size' => array('type' => 'text', 'label' => __('Link Size', 'fl-builder'), 'default' => '13', 'maxlength' => '3', 'size' => '4', 'description' => 'px', 'preview' => array('type' => 'css', 'selector' => '.menu', 'property' => 'font-size', 'unit' => 'px')), 'text_transform' => array('type' => 'select', 'label' => __('Link Format', 'fl-builder'), 'default' => 'none', 'options' => array('none' => __('None', 'fl-builder'), 'uppercase' => __('Uppercase', 'fl-builder'), 'lowercase' => __('Lowercase', 'fl-builder'), 'capitalize' => __('Capitalize', 'fl-builder')), 'preview' => array('type' => 'css', 'selector' => '.menu', 'property' => 'text-transform')), 'font_weight' => array('type' => 'select', 'label' => __('Link Weight', 'fl-builder'), 'default' => 'normal', 'options' => array('normal' => __('Normal', 'fl-builder'), 'bold' => __('Bold', 'fl-builder'), 'light' => __('Light', 'fl-builder')), 'preview' => array('type' => 'css', 'selector' => '.menu', 'property' => 'font-weight')), 'horizontal_spacing' => array('type' => 'text', 'label' => __('Horizontal Spacing', 'fl-builder'), 'default' => '10', 'maxlength' => '3', 'size' => '4', 'description' => 'px', 'preview' => array('type' => 'css', 'rules' => array(array('selector' => '.menu a', 'property' => 'padding-left', 'unit' => 'px'), array('selector' => '.menu a', 'property' => 'padding-right', 'unit' => 'px')))), 'vertical_spacing' => array('type' => 'text', 'label' => __('Vertical Spacing', 'fl-builder'), 'default' => '10', 'maxlength' => '3', 'size' => '4', 'description' => 'px', 'preview' => array('type' => 'css', 'rules' => array(array('selector' => '.menu a', 'property' => 'padding-top', 'unit' => 'px'), array('selector' => '.menu a', 'property' => 'padding-bottom', 'unit' => 'px')))))), 'menu_style' => array('title' => __('Backgrounds', 'fl-builder'), 'fields' => array('menu_bg_color' => array('type' => 'color', 'label' => __('Menu Background Color', 'fl-builder'), 'show_reset' => true, 'preview' => array('type' => 'css', 'selector' => '.menu', 'property' => 'background-color')), 'mobile_menu_bg' => array('type' => 'color', 'label' => __('Menu Background Color (Mobile)', 'fl-builder'), 'show_reset' => true), 'menu_bg_opacity' => array('type' => 'text', 'label' => __('Menu Background Opacity', 'fl-builder'), 'default' => '100', 'maxlength' => '3', 'size' => '4', 'description' => '%'), 'submenu_bg_color' => array('type' => 'color', 'label' => __('Submenu Background Color', 'fl-builder'), 'show_reset' => true, 'default' => 'e3e3e3', 'preview' => array('type' => 'css', 'selector' => '.fl-menu .sub-menu', 'property' => 'background-color')), 'submenu_bg_opacity' => array('type' => 'text', 'label' => __('Submenu Background Opacity', 'fl-builder'), 'default' => '100', 'maxlength' => '3', 'size' => '4', 'description' => '%'), 'link_hover_bg_color' => array('type' => 'color', 'label' => __('Link Background Hover Color', 'fl-builder'), 'show_reset' => true, 'preview' => array('type' => 'css', 'selector' => '.menu > li.current-menu-item > a, .menu > li.current-menu-item > .fl-has-submenu-container > a, .sub-menu > li.current-menu-item > a, .sub-menu > li.current-menu-item > .fl-has-submenu-container > a', 'property' => 'background-color')))), 'separator_style' => array('title' => __('Separator', 'fl-builder'), 'fields' => array('show_separator' => array('type' => 'select', 'label' => __('Show Separators', 'fl-builder'), 'default' => 'no', 'options' => array('no' => __('No', 'fl-builder'), 'yes' => __('Yes', 'fl-builder')), 'toggle' => array('yes' => array('fields' => array('separator_color', 'separator_opacity')))), 'separator_color' => array('type' => 'color', 'label' => __('Separator Color', 'fl-builder'), 'show_reset' => true), 'separator_opacity' => array('type' => 'text', 'label' => __('Separator Opacity', 'fl-builder'), 'default' => '100', 'maxlength' => '3', 'size' => '4', 'description' => '%')))))));
class FL_Menu_Module_Walker extends Walker_Nav_Menu
{
    function start_el(&$output, $item, $depth = 0, $args = array(), $id = 0)
    {
        global $wp_query;
        $indent = $depth ? str_repeat("\t", $depth) : '';
        $class_names = $value = '';
        $classes = empty($item->classes) ? array() : (array) $item->classes;
        $submenu = $args->has_children ? ' fl-has-submenu' : '';
        $class_names = join(' ', apply_filters('nav_menu_css_class', array_filter($classes), $item));
        $class_names = ' class="' . esc_attr($class_names) . $submenu . '"';
        $output .= $indent . '<li id="menu-item-' . $item->ID . '"' . $value . $class_names . '>';
        $attributes = !empty($item->attr_title) ? ' title="' . esc_attr($item->attr_title) . '"' : '';
        $attributes .= !empty($item->target) ? ' target="' . esc_attr($item->target) . '"' : '';
        $attributes .= !empty($item->xfn) ? ' rel="' . esc_attr($item->xfn) . '"' : '';
コード例 #17
0
        if (isset($_POST['email'])) {
            $template .= "Email: {$_POST['email']} \r\n";
        }
        if (isset($_POST['phone'])) {
            $template .= "Phone: {$_POST['phone']} \r\n";
        }
        $template .= __('Message', 'fl-builder') . ": \r\n" . $_POST['message'];
        // Double check the mailto email is proper and send
        if ($mailto) {
            wp_mail($mailto, $subject, $template);
            die('1');
        } else {
            die($mailto);
        }
    }
    public static function mail_from($original_email_address)
    {
        global $fl_contact_from_email;
        return $fl_contact_from_email != '' ? $fl_contact_from_email : $original_email_address;
    }
    public static function from_name($original_name)
    {
        global $fl_contact_from_name;
        return $fl_contact_from_name != '' ? $fl_contact_from_name : $original_name;
    }
}
/**
 * Register the module and its form settings.
 */
FLBuilder::register_module('FLContactFormModule', array('general' => array('title' => __('General', 'fl-builder'), 'sections' => array('general' => array('title' => '', 'fields' => array('mailto_email' => array('type' => 'text', 'label' => __('Send To Email', 'fl-builder'), 'default' => '', 'placeholder' => __('*****@*****.**', 'fl-builder'), 'help' => __('The contact form will send to this e-mail', 'fl-builder'), 'preview' => array('type' => 'none')), 'name_toggle' => array('type' => 'select', 'label' => __('Name Field', 'fl-builder'), 'default' => 'show', 'options' => array('show' => __('Show', 'fl-builder'), 'hide' => __('Hide', 'fl-builder'))), 'subject_toggle' => array('type' => 'select', 'label' => __('Subject Field', 'fl-builder'), 'default' => 'hide', 'options' => array('show' => __('Show', 'fl-builder'), 'hide' => __('Hide', 'fl-builder'))), 'email_toggle' => array('type' => 'select', 'label' => __('Email Field', 'fl-builder'), 'default' => 'show', 'options' => array('show' => __('Show', 'fl-builder'), 'hide' => __('Hide', 'fl-builder'))), 'phone_toggle' => array('type' => 'select', 'label' => __('Phone Field', 'fl-builder'), 'default' => 'hide', 'options' => array('show' => __('Show', 'fl-builder'), 'hide' => __('Hide', 'fl-builder'))))), 'success' => array('title' => __('Success', 'fl-builder'), 'fields' => array('success_action' => array('type' => 'select', 'label' => __('Success Action', 'fl-builder'), 'options' => array('none' => __('None', 'fl-builder'), 'show_message' => __('Show Message', 'fl-builder'), 'redirect' => __('Redirect', 'fl-builder')), 'toggle' => array('show_message' => array('fields' => array('success_message')), 'redirect' => array('fields' => array('success_url'))), 'preview' => array('type' => 'none')), 'success_message' => array('type' => 'editor', 'label' => '', 'media_buttons' => false, 'rows' => 8, 'default' => __('Thanks for your message! We’ll be in touch soon.', 'fl-builder'), 'preview' => array('type' => 'none')), 'success_url' => array('type' => 'link', 'label' => __('Success URL', 'fl-builder'), 'preview' => array('type' => 'none'))))))));
コード例 #18
0
ファイル: icon-group.php プロジェクト: spokencode/bophillips
<?php

/**
 * @class FLIconGroupModule
 */
class FLIconGroupModule extends FLBuilderModule
{
    /**
     * @method __construct
     */
    public function __construct()
    {
        parent::__construct(array('name' => __('Icon Group', 'fl-builder'), 'description' => __('Display a group of linked Font Awesome icons.', 'fl-builder'), 'category' => __('Advanced Modules', 'fl-builder'), 'editor_export' => false));
    }
}
/**
 * Register the module and its form settings.
 */
FLBuilder::register_module('FLIconGroupModule', array('icons' => array('title' => __('Icons', 'fl-builder'), 'sections' => array('general' => array('title' => '', 'fields' => array('icons' => array('type' => 'form', 'label' => __('Icon', 'fl-builder'), 'form' => 'icon_group_form', 'preview_text' => 'icon', 'multiple' => true))))), 'style' => array('title' => __('Style', 'fl-builder'), 'sections' => array('colors' => array('title' => __('Colors', 'fl-builder'), 'fields' => array('color' => array('type' => 'color', 'label' => __('Color', 'fl-builder'), 'show_reset' => true), 'hover_color' => array('type' => 'color', 'label' => __('Hover Color', 'fl-builder'), 'show_reset' => true, 'preview' => array('type' => 'none')), 'bg_color' => array('type' => 'color', 'label' => __('Background Color', 'fl-builder'), 'show_reset' => true), 'bg_hover_color' => array('type' => 'color', 'label' => __('Background Hover Color', 'fl-builder'), 'show_reset' => true, 'preview' => array('type' => 'none')), 'three_d' => array('type' => 'select', 'label' => __('Gradient', 'fl-builder'), 'default' => '0', 'options' => array('0' => __('No', 'fl-builder'), '1' => __('Yes', 'fl-builder'))))), 'structure' => array('title' => __('Structure', 'fl-builder'), 'fields' => array('size' => array('type' => 'text', 'label' => __('Size', 'fl-builder'), 'default' => '30', 'maxlength' => '3', 'size' => '4', 'description' => 'px'), 'spacing' => array('type' => 'text', 'label' => __('Spacing', 'fl-builder'), 'default' => '10', 'maxlength' => '2', 'size' => '4', 'description' => 'px'), 'align' => array('type' => 'select', 'label' => __('Alignment', 'fl-builder'), 'default' => 'center', 'options' => array('center' => __('Center', 'fl-builder'), 'left' => __('Left', 'fl-builder'), 'right' => __('Right', 'fl-builder')))))))));
/**
 * Register a settings form to use in the "form" field type above.
 */
FLBuilder::register_settings_form('icon_group_form', array('title' => __('Add Icon', 'fl-builder'), 'tabs' => array('general' => array('title' => __('General', 'fl-builder'), 'sections' => array('general' => array('title' => '', 'fields' => array('icon' => array('type' => 'icon', 'label' => __('Icon', 'fl-builder')), 'link' => array('type' => 'link', 'label' => __('Link', 'fl-builder')))))))));
コード例 #19
0
<?php

/**
 * This is an example module with only the basic
 * setup necessary to get it working.
 *
 * @class CBCustomShadeModule
 */
class CBCustomShadeModule extends FLBuilderModule
{
    /** 
     * Constructor function for the module. You must pass the
     * name, description, dir and url in an array to the parent class.
     *
     * @method __construct
     */
    public function __construct()
    {
        parent::__construct(array('name' => __('Shade', 'fl-builder'), 'description' => __('Throw some custom shade.', 'fl-builder'), 'category' => __('CB Custom Modules', 'fl-builder'), 'dir' => CB_CUSTOM_MODULE_DIR . 'cb-shade/', 'url' => CB_CUSTOM_MODULE_URL . 'cb-shade/', 'editor_export' => true, 'enabled' => true, 'partial_refresh' => true));
    }
}
/**
 * Register the module and its form settings.
 */
FLBuilder::register_module('CBCustomShadeModule', array('content' => array('title' => __('Content', 'fl-builder'), 'sections' => array('content' => array('title' => __('Content', 'fl-builder'), 'fields' => array('cb_shade_link_field' => array('type' => 'link', 'label' => __('Link (optional)', 'fl-builder'), 'help' => __('Set the entire module to be a link. You can also input links in the editor below.', 'fl-builder')), 'cb_shade_vertical_align' => array('type' => 'select', 'label' => __('Vertical Alignment', 'fl-builder'), 'default' => 'center', 'options' => array('flex-start' => __('Top', 'fl-builder'), 'center' => __('Center', 'fl-builder'), 'flex-end' => __('Bottom', 'fl-builder')), 'help' => __('Vertical alignment is not currently supported in Internet Explorer.', 'fl-builder')), 'cb_shade_editor_field' => array('type' => 'editor', 'media_buttons' => true, 'rows' => 10))))), 'design' => array('title' => __('Design', 'fl-builder'), 'sections' => array('design' => array('title' => __('Design', 'fl-builder'), 'fields' => array('cb_shade_photo_field' => array('type' => 'photo', 'label' => __('Background Photo', 'fl-builder'), 'show_remove' => false), 'cb_shade_bg_align' => array('type' => 'select', 'label' => __('Background Alignment', 'fl-builder'), 'default' => 'center center', 'options' => array('top left' => __('Left Top', 'fl-builder'), 'center left' => __('Left Center', 'fl-builder'), 'bottom left' => __('Left Bottom', 'fl-builder'), 'top center' => __('Center Top', 'fl-builder'), 'center center' => __('Center', 'fl-builder'), 'bottom center' => __('Center Bottom', 'fl-builder'), 'top right' => __('Right Top', 'fl-builder'), 'center right' => __('Right Center', 'fl-builder'), 'bottom right' => __('Right Bottom', 'fl-builder'))), 'cb_shade_bg_size' => array('type' => 'select', 'label' => __('Background Size', 'fl-builder'), 'default' => 'cover', 'options' => array('contain' => __('Fit', 'fl-builder'), 'cover' => __('Fill', 'fl-builder'))), 'cb_shade_color_field' => array('type' => 'color', 'label' => __('Background/Overlay Color', 'fl-builder'), 'default' => '000000', 'show_reset' => true), 'cb_shade_text_field' => array('type' => 'text', 'label' => __('Custom Minimum Height', 'fl-builder'), 'default' => '', 'maxlength' => '4', 'size' => '6', 'placeholder' => __('420', 'fl-builder'), 'class' => 'my-css-class', 'description' => __('px', 'fl-builder'), 'help' => __('Set a custom minimum height in pixels. For smaller screens, the module height may increase to accomodate content.', 'fl-builder'))))))));
 /**
  * Register the product module and configure the module for use in the Page Builder
  * 
  * @since 1.0.4
  */
 function register_twenty_sixty_product_module()
 {
     require_once 'modules/twenty-sixty-product-module/twenty-sixty-product-module.php';
     $terms = get_terms('product_category', array('hide_empty' => false, 'fields' => 'all'));
     $product_categories = array();
     if (!empty($terms) && !is_wp_error($terms)) {
         foreach ($terms as $term) {
             $faq_categories[$term->slug] = __($term->name, 'fl-builder');
         }
     }
     FLBuilder::register_module('TwentySixtyProductModule', array('general' => array('title' => __('Products', 'fl-builder'), 'sections' => array('general' => array('title' => __('Section Title', 'fl-builder'), 'fields' => array('display_title' => array('type' => 'checkbox', 'label' => __('Display FAQ Category Title?', 'fl-builder'), 'default' => 0), 'product_category' => array('type' => 'select', 'label' => __('Select a product category', 'fl-builder'), 'help' => 'Select any of the Product Categories to display. If the category is left blank, all Products will be pulled in on the same page', 'default' => '', 'options' => $product_categories)))))));
 }
コード例 #21
0
                        $wk_direction = 'right top, left top';
                        $ie_direction = 'to left';
                        break;
                    case 'bottom':
                        $direction = 'bottom';
                        $wk_direction = 'left bottom, left top';
                        $ie_direction = 'to top';
                        break;
                }
            }
            // build csss gradient code
            $bg = 'background: #' . $this->settings->text_bg_color . ';';
            $bg .= 'background: -ms-linear-gradient(' . $direction . ', ' . $color_start . ' 0%, ' . $color_end . ' 100%);';
            $bg .= 'background: -moz-linear-gradient(' . $direction . ', ' . $color_start . ' 0%, ' . $color_end . ' 100%);';
            $bg .= 'background: -o-linear-gradient(' . $direction . ', ' . $color_start . ' 0%, ' . $color_end . ' 100%);';
            $bg .= 'background: -webkit-gradient(linear, ' . $wk_direction . ', color-stop(0, ' . $color_start . '), color-stop(1, ' . $color_end . '));';
            $bg .= 'background: -webkit-linear-gradient(' . $direction . ', ' . $color_start . ' 0%, ' . $color . ' 100%);';
            $bg .= 'background: linear-gradient(' . $ie_direction . ', ' . $color_start . ' 0%, ' . $color_end . ' 100%);';
        } else {
            // if gradient isn't selected, set the background with default values
            $bg = 'background-color: #' . $this->settings->text_bg_color . ';';
            $bg .= 'background-color: ' . $color_start . ';';
        }
        echo $bg;
    }
}
/**
 * Register the module and its form settings.
 */
FLBuilder::register_module('FLPostSliderModule', array('slider' => array('title' => __('Slider', 'fl-builder'), 'sections' => array('general' => array('title' => '', 'fields' => array('height' => array('type' => 'text', 'label' => __('Height', 'fl-builder'), 'default' => '400', 'maxlength' => '4', 'size' => '5', 'description' => 'px', 'help' => __('This setting is the minimum height of the post slider. Content will expand the height automatically.', 'fl-builder')), 'auto_play' => array('type' => 'select', 'label' => __('Auto Play', 'fl-builder'), 'default' => 'true', 'options' => array('false' => __('No', 'fl-builder'), 'true' => __('Yes', 'fl-builder'))), 'speed' => array('type' => 'text', 'label' => __('Delay', 'fl-builder'), 'default' => '5', 'size' => '5', 'description' => _x('seconds', 'Value unit for form field of time in seconds. Such as: "5 seconds"', 'fl-builder')), 'transition' => array('type' => 'select', 'label' => __('Transition', 'fl-builder'), 'default' => 'horizontal', 'options' => array('fade' => __('Fade', 'fl-builder'), 'horizontal' => __('Slide', 'fl-builder'))), 'slider_loop' => array('type' => 'select', 'label' => __('Loop', 'fl-builder'), 'default' => 'false', 'options' => array('false' => __('No', 'fl-builder'), 'true' => __('Yes', 'fl-builder'))), 'transitionDuration' => array('type' => 'text', 'label' => __('Transition Speed', 'fl-builder'), 'default' => '1', 'size' => '5', 'description' => _x('seconds', 'Value unit for form field of time in seconds. Such as: "5 seconds"', 'fl-builder')), 'posts_per_page' => array('type' => 'text', 'label' => __('Number of Posts', 'fl-builder'), 'default' => '10', 'size' => '4'))), 'controls' => array('title' => __('Slider Controls', 'fl-builder'), 'fields' => array('pagination' => array('type' => 'select', 'label' => __('Show Dots', 'fl-builder'), 'default' => 'yes', 'options' => array('no' => __('No', 'fl-builder'), 'yes' => __('Yes', 'fl-builder'))), 'navigation' => array('type' => 'select', 'label' => __('Show Arrows', 'fl-builder'), 'default' => 'no', 'options' => array('no' => __('No', 'fl-builder'), 'yes' => __('Yes', 'fl-builder')), 'toggle' => array('yes' => array('fields' => 'nav_arrow_color'))))))), 'layout' => array('title' => __('Layout', 'fl-builder'), 'sections' => array('featured_img' => array('title' => '', 'fields' => array('show_thumb' => array('type' => 'select', 'label' => __('Show Featured Image?', 'fl-builder'), 'default' => 'show', 'options' => array('show' => __('Show', 'fl-builder'), 'hide' => __('Hide', 'fl-builder')), 'toggle' => array('show' => array('sections' => array('image'), 'fields' => array('text_position', 'text_width')))))), 'image' => array('title' => __('Featured Image', 'fl-builder'), 'fields' => array('image_type' => array('type' => 'select', 'label' => __('Image', 'fl-builder'), 'default' => 'background', 'options' => array('background' => __('Background', 'fl-builder'), 'thumb' => __('Thumbnail', 'fl-builder')), 'toggle' => array('background' => array('fields' => array('text_position', 'thumb_size')), 'thumb' => array('fields' => array('thumb_crop', 'thumb_size', 'thumb_text_position')))), 'thumb_size' => array('type' => 'photo-sizes', 'label' => __('Size', 'fl-builder'), 'default' => 'large'), 'thumb_crop' => array('type' => 'select', 'label' => __('Crop', 'fl-builder'), 'default' => 'landscape', 'options' => array('landscape' => __('Landscape', 'fl-builder'), 'panorama' => __('Panorama', 'fl-builder'), 'portrait' => __('Portrait', 'fl-builder'), 'square' => __('Square', 'fl-builder'), 'circle' => __('Circle', 'fl-builder'))))), 'info' => array('title' => __('Post Info', 'fl-builder'), 'fields' => array('show_author' => array('type' => 'select', 'label' => __('Author', 'fl-builder'), 'default' => '1', 'options' => array('1' => __('Show', 'fl-builder'), '0' => __('Hide', 'fl-builder'))), 'show_date' => array('type' => 'select', 'label' => __('Date', 'fl-builder'), 'default' => '1', 'options' => array('1' => __('Show', 'fl-builder'), '0' => __('Hide', 'fl-builder')), 'toggle' => array('1' => array('fields' => array('date_format')))), 'date_format' => array('type' => 'select', 'label' => __('Date Format', 'fl-builder'), 'default' => 'default', 'options' => array('default' => __('Default', 'fl-builder'), 'M j, Y' => date('M j, Y'), 'F j, Y' => date('F j, Y'), 'm/d/Y' => date('m/d/Y'), 'm-d-Y' => date('m-d-Y'), 'd M Y' => date('d M Y'), 'd F Y' => date('d F Y'), 'Y-m-d' => date('Y-m-d'), 'Y/m/d' => date('Y/m/d'))), 'show_comments' => array('type' => 'select', 'label' => __('Comments', 'fl-builder'), 'default' => '1', 'options' => array('1' => __('Show', 'fl-builder'), '0' => __('Hide', 'fl-builder'))))), 'content' => array('title' => __('Content', 'fl-builder'), 'fields' => array('show_content' => array('type' => 'select', 'label' => __('Content', 'fl-builder'), 'default' => '1', 'options' => array('1' => __('Show', 'fl-builder'), '0' => __('Hide', 'fl-builder'))), 'show_more_link' => array('type' => 'select', 'label' => __('More Link', 'fl-builder'), 'default' => '0', 'options' => array('1' => __('Show', 'fl-builder'), '0' => __('Hide', 'fl-builder'))), 'more_link_text' => array('type' => 'text', 'label' => __('More Link Text', 'fl-builder'), 'default' => __('Read More', 'fl-builder')))))), 'style' => array('title' => __('Style', 'fl-builder'), 'sections' => array('title' => array('title' => __('Heading', 'fl-builder'), 'fields' => array('title_tag' => array('type' => 'select', 'label' => __('Heading Tag', 'fl-builder'), 'default' => 'h2', 'options' => array('h1' => 'h1', 'h2' => 'h2', 'h3' => 'h3', 'h4' => 'h4', 'h5' => 'h5', 'h6' => 'h6')), 'title_size' => array('type' => 'select', 'label' => __('Heading Size', 'fl-builder'), 'default' => 'default', 'options' => array('default' => __('Default', 'fl-builder'), 'custom' => __('Custom', 'fl-builder')), 'toggle' => array('custom' => array('fields' => array('title_custom_size')))), 'title_custom_size' => array('type' => 'text', 'label' => __('Heading Size', 'fl-builder'), 'default' => '24', 'maxlength' => '3', 'size' => '4', 'description' => 'px'))), 'text_position' => array('title' => __('Text', 'fl-builder'), 'fields' => array('text_position' => array('type' => 'select', 'label' => __('Position', 'fl-builder'), 'default' => 'left', 'help' => __('The position will move the content layout selections left, right or bottom over the background of the slide.', 'fl-builder'), 'options' => array('left' => __('Left', 'fl-builder'), 'right' => __('Right', 'fl-builder'), 'bottom' => __('Bottom', 'fl-builder')), 'toggle' => array('left' => array('fields' => array('text_width')), 'right' => array('fields' => array('text_width')))), 'thumb_text_position' => array('type' => 'select', 'label' => __('Position', 'fl-builder'), 'default' => 'left', 'help' => __('The position will move the content layout selections left or right or center of the thumbnail of the slide.', 'fl-builder'), 'options' => array('left' => __('Left', 'fl-builder'), 'right' => __('Right', 'fl-builder')), 'toggle' => array('left' => array('fields' => array('text_width')), 'right' => array('fields' => array('text_width')))), 'text_width' => array('type' => 'text', 'label' => __('Text Width', 'fl-builder'), 'default' => '50', 'description' => '%', 'maxlength' => '3', 'size' => '5'), 'text_padding' => array('type' => 'text', 'label' => __('Text Padding', 'fl-builder'), 'default' => '50', 'description' => 'px', 'maxlength' => '4', 'size' => '5'))), 'text_style' => array('title' => __('Colors', 'fl-builder'), 'fields' => array('text_color' => array('type' => 'color', 'label' => __('Text Color', 'fl-builder'), 'show_reset' => true, 'default' => 'ffffff', 'preview' => array('type' => 'css', 'rules' => array(array('selector' => '.fl-post-slider-background .fl-post-slider-content, .fl-post-slider-thumb, .fl-post-slider-no-thumb', 'property' => 'color')))), 'link_color' => array('type' => 'color', 'label' => __('Link Color', 'fl-builder'), 'show_reset' => true, 'default' => 'cccccc', 'preview' => array('type' => 'css', 'rules' => array(array('selector' => '.fl-post-slider-content a', 'property' => 'color')))), 'link_hover_color' => array('type' => 'color', 'label' => __('Link Hover Color', 'fl-builder'), 'default' => 'ffffff', 'show_reset' => true), 'text_bg_color' => array('type' => 'color', 'label' => __('Text Background Color', 'fl-builder'), 'help' => __('The color applies to the overlay behind text over the background selections.', 'fl-builder'), 'default' => '333333', 'show_reset' => true), 'text_bg_opacity' => array('type' => 'text', 'label' => __('Text Background Opacity', 'fl-builder'), 'default' => '50', 'maxlength' => '3', 'size' => '4', 'description' => '%'), 'bg_gradient' => array('type' => 'select', 'label' => __('Text Background Gradient', 'fl-builder'), 'default' => 'no', 'options' => array('no' => __('No', 'fl-builder'), 'yes' => __('Yes', 'fl-builder'))), 'text_bg_height' => array('type' => 'select', 'label' => __('Text Background Height', 'fl-builder'), 'default' => '100%', 'help' => __('Auto will allow the overlay to fit however long the text content is. 100% will fit the overlay to the top and bottom of the slide.', 'fl-builder'), 'options' => array('auto' => _x('Auto', 'Background height.', 'fl-builder'), '100%' => '100%')))))), 'content' => array('title' => __('Content', 'fl-builder'), 'file' => FL_BUILDER_DIR . 'includes/loop-settings.php')));
コード例 #22
0
ファイル: post-grid.php プロジェクト: spokencode/bophillips
 */
class FLPostGridModule extends FLBuilderModule
{
    /**
     * @method __construct
     */
    public function __construct()
    {
        parent::__construct(array('name' => __('Posts', 'fl-builder'), 'description' => __('Display a grid of your WordPress posts.', 'fl-builder'), 'category' => __('Advanced Modules', 'fl-builder'), 'editor_export' => false, 'enabled' => true));
    }
    /**
     * @method enqueue_scripts
     */
    public function enqueue_scripts()
    {
        if (FLBuilderModel::is_builder_active() || $this->settings->layout == 'grid') {
            $this->add_js('jquery-masonry');
        }
        if (FLBuilderModel::is_builder_active() || $this->settings->layout == 'gallery') {
            $this->add_js('fl-gallery-grid');
        }
        if (FLBuilderModel::is_builder_active() || $this->settings->pagination == 'scroll') {
            $this->add_js('jquery-infinitescroll');
        }
    }
}
/**
 * Register the module and its form settings.
 */
FLBuilder::register_module('FLPostGridModule', array('layout' => array('title' => __('Layout', 'fl-builder'), 'sections' => array('general' => array('title' => '', 'fields' => array('layout' => array('type' => 'select', 'label' => __('Layout Style', 'fl-builder'), 'default' => 'grid', 'options' => array('grid' => __('Grid', 'fl-builder'), 'gallery' => __('Gallery', 'fl-builder'), 'feed' => __('Feed', 'fl-builder')), 'toggle' => array('grid' => array('sections' => array('grid', 'image', 'content'), 'fields' => array('show_author')), 'feed' => array('sections' => array('image', 'content'), 'fields' => array('image_position', 'show_author', 'show_comments', 'content_type')), 'gallery' => array('tabs' => array('style')))), 'pagination' => array('type' => 'select', 'label' => __('Pagination Style', 'fl-builder'), 'default' => 'numbers', 'options' => array('numbers' => __('Numbers', 'fl-builder'), 'scroll' => __('Scroll', 'fl-builder'), 'none' => _x('None', 'Pagination style.', 'fl-builder'))), 'posts_per_page' => array('type' => 'text', 'label' => __('Posts Per Page', 'fl-builder'), 'default' => '10', 'size' => '4'))), 'grid' => array('title' => __('Grid', 'fl-builder'), 'fields' => array('post_width' => array('type' => 'text', 'label' => __('Post Width', 'fl-builder'), 'default' => '300', 'maxlength' => '3', 'size' => '4', 'description' => 'px'), 'post_spacing' => array('type' => 'text', 'label' => __('Post Spacing', 'fl-builder'), 'default' => '60', 'maxlength' => '3', 'size' => '4', 'description' => 'px'))), 'image' => array('title' => __('Featured Image', 'fl-builder'), 'fields' => array('show_image' => array('type' => 'select', 'label' => __('Image', 'fl-builder'), 'default' => '1', 'options' => array('1' => __('Show', 'fl-builder'), '0' => __('Hide', 'fl-builder')), 'toggle' => array('1' => array('fields' => array('image_size')))), 'image_position' => array('type' => 'select', 'label' => __('Position', 'fl-builder'), 'default' => 'above', 'options' => array('above' => __('Above Text', 'fl-builder'), 'beside' => __('Beside Text', 'fl-builder'))), 'image_size' => array('type' => 'photo-sizes', 'label' => __('Size', 'fl-builder'), 'default' => 'medium'))), 'info' => array('title' => __('Post Info', 'fl-builder'), 'fields' => array('show_author' => array('type' => 'select', 'label' => __('Author', 'fl-builder'), 'default' => '1', 'options' => array('1' => __('Show', 'fl-builder'), '0' => __('Hide', 'fl-builder'))), 'show_date' => array('type' => 'select', 'label' => __('Date', 'fl-builder'), 'default' => '1', 'options' => array('1' => __('Show', 'fl-builder'), '0' => __('Hide', 'fl-builder')), 'toggle' => array('1' => array('fields' => array('date_format')))), 'date_format' => array('type' => 'select', 'label' => __('Date Format', 'fl-builder'), 'default' => 'default', 'options' => array('default' => __('Default', 'fl-builder'), 'M j, Y' => date('M j, Y'), 'F j, Y' => date('F j, Y'), 'm/d/Y' => date('m/d/Y'), 'm-d-Y' => date('m-d-Y'), 'd M Y' => date('d M Y'), 'd F Y' => date('d F Y'), 'Y-m-d' => date('Y-m-d'), 'Y/m/d' => date('Y/m/d'))), 'show_comments' => array('type' => 'select', 'label' => __('Comments', 'fl-builder'), 'default' => '1', 'options' => array('1' => __('Show', 'fl-builder'), '0' => __('Hide', 'fl-builder'))))), 'content' => array('title' => __('Content', 'fl-builder'), 'fields' => array('show_content' => array('type' => 'select', 'label' => __('Content', 'fl-builder'), 'default' => '1', 'options' => array('1' => __('Show', 'fl-builder'), '0' => __('Hide', 'fl-builder'))), 'content_type' => array('type' => 'select', 'label' => __('Content Type', 'fl-builder'), 'default' => 'excerpt', 'options' => array('excerpt' => __('Excerpt', 'fl-builder'), 'full' => __('Full Text', 'fl-builder'))), 'show_more_link' => array('type' => 'select', 'label' => __('More Link', 'fl-builder'), 'default' => '0', 'options' => array('1' => __('Show', 'fl-builder'), '0' => __('Hide', 'fl-builder'))), 'more_link_text' => array('type' => 'text', 'label' => __('More Link Text', 'fl-builder'), 'default' => __('Read More', 'fl-builder')))))), 'style' => array('title' => __('Style', 'fl-builder'), 'sections' => array('gallery_general' => array('title' => '', 'fields' => array('hover_transition' => array('type' => 'select', 'label' => __('Hover Transition', 'fl-builder'), 'default' => 'fade', 'options' => array('fade' => __('Fade', 'fl-builder'), 'slide-up' => __('Slide Up', 'fl-builder'), 'slide-down' => __('Slide Down', 'fl-builder'), 'scale-up' => __('Scale Up', 'fl-builder'), 'scale-down' => __('Scale Down', 'fl-builder'))))), 'icons' => array('title' => __('Icons', 'fl-builder'), 'fields' => array('has_icon' => array('type' => 'select', 'label' => __('Use Icon for Posts', 'fl-builder'), 'default' => 'no', 'options' => array('yes' => __('Yes', 'fl-builder'), 'no' => __('No', 'fl-builder')), 'toggle' => array('yes' => array('fields' => array('icon', 'icon_position', 'icon_color', 'icon_size')))), 'icon' => array('type' => 'icon', 'label' => __('Post Icon', 'fl-builder')), 'icon_position' => array('type' => 'select', 'label' => __('Post Icon Position', 'fl-builder'), 'default' => 'above', 'options' => array('above' => __('Above Text', 'fl-builder'), 'below' => __('Below Text', 'fl-builder'))), 'icon_size' => array('type' => 'text', 'label' => __('Post Icon Size', 'fl-builder'), 'default' => '24', 'maxlength' => '3', 'size' => '4', 'description' => 'px'))), 'text_style' => array('title' => __('Colors', 'fl-builder'), 'fields' => array('text_color' => array('type' => 'color', 'label' => __('Text Color', 'fl-builder'), 'default' => 'ffffff', 'show_reset' => true), 'icon_color' => array('type' => 'color', 'label' => __('Post Icon Color', 'fl-builder'), 'show_reset' => true), 'text_bg_color' => array('type' => 'color', 'label' => __('Text Background Color', 'fl-builder'), 'default' => '333333', 'help' => __('The color applies to the overlay behind text over the background selections.', 'fl-builder'), 'show_reset' => true), 'text_bg_opacity' => array('type' => 'text', 'label' => __('Text Background Opacity', 'fl-builder'), 'default' => '50', 'maxlength' => '3', 'size' => '4', 'description' => '%'))))), 'content' => array('title' => __('Content', 'fl-builder'), 'file' => FL_BUILDER_DIR . 'includes/loop-settings.php')));
コード例 #23
0
        $timestamp = $date . ' ' . $time;
        $timezone = new DateTimeZone($this->settings->time_zone);
        $date = new DateTime($timestamp, $timezone);
        return $date->format('c');
    }
    /**
     * Renders a svg circle for the current number.
     *
     * @since 1.6.4
     * @return void
     */
    public function render_circle()
    {
        $width = !empty($this->settings->circle_width) ? $this->settings->circle_width : 100;
        $pos = $width / 2;
        $radius = $pos - 10;
        $dash = number_format(M_PI * 2 * $radius, 2, '.', '');
        $html = '<div class="svg-container">';
        $html .= '<svg class="svg" viewBox="0 0 ' . $width . ' ' . $width . '" version="1.1" preserveAspectRatio="xMinYMin meet">
			<circle class="fl-number-bg" r="' . $radius . '" cx="' . $pos . '" cy="' . $pos . '" fill="transparent" stroke-dasharray="' . $dash . '" stroke-dashoffset="0"></circle>
			<circle class="fl-number" r="' . $radius . '" cx="' . $pos . '" cy="' . $pos . '" fill="transparent" stroke-dasharray="' . $dash . '" stroke-dashoffset="' . $dash . '" transform="rotate(-90 ' . $pos . ' ' . $pos . ')"></circle>
		</svg>';
        $html .= '</div>';
        echo $html;
    }
}
/**
 * Register the module and its form settings.
 */
FLBuilder::register_module('FLCountdownModule', array('general' => array('title' => __('General', 'fl-builder'), 'sections' => array('date' => array('title' => __('Date', 'fl-builder'), 'fields' => array('day' => array('type' => 'text', 'label' => __('Day', 'fl-builder'), 'default' => date('j'), 'maxlength' => '2', 'size' => '5', 'preview' => array('type' => 'none')), 'month' => array('type' => 'text', 'label' => __('Month', 'fl-builder'), 'default' => date('n'), 'maxlength' => '2', 'size' => '5', 'preview' => array('type' => 'none')), 'year' => array('type' => 'text', 'label' => __('Year', 'fl-builder'), 'default' => date('Y'), 'maxlength' => '4', 'size' => '5', 'preview' => array('type' => 'none')))), 'time' => array('title' => __('Time', 'fl-builder'), 'fields' => array('time' => array('type' => 'time', 'label' => __('Time', 'fl-builder'), 'default' => array('hours' => '01', 'minutes' => '00', 'day_period' => 'am')), 'time_zone' => array('type' => 'timezone', 'label' => __('Time Zone', 'fl-builder'), 'default' => 'UTC'))))), 'style' => array('title' => __('Style', 'fl-builder'), 'sections' => array('general' => array('title' => '', 'fields' => array('layout' => array('type' => 'select', 'label' => __('Layout', 'fl-builder'), 'default' => 'default', 'options' => array('default' => __('Numbers', 'fl-builder'), 'circle' => __('Numbers + Circles', 'fl-builder')), 'toggle' => array('circle' => array('sections' => array('circle_bar_style'), 'fields' => array('after_number_text')), 'default' => array('sections' => array('numbers_style', 'separator_style'), 'fields' => array('horizontal_padding', 'vertical_padding')))))), 'text_style' => array('title' => __('Numbers and Text', 'fl-builder'), 'fields' => array('number_color' => array('type' => 'color', 'label' => __('Number Color', 'fl-builder'), 'show_reset' => true, 'preview' => array('type' => 'css', 'selector' => '.fl-countdown .fl-countdown-unit-number', 'property' => 'color')), 'label_color' => array('type' => 'color', 'label' => __('Text Color', 'fl-builder'), 'show_reset' => true, 'preview' => array('type' => 'css', 'selector' => '.fl-countdown .fl-countdown-unit-label', 'property' => 'color')), 'number_size' => array('type' => 'text', 'label' => __('Number Size', 'fl-builder'), 'default' => '24', 'maxlength' => '3', 'size' => '4', 'description' => 'px', 'preview' => array('type' => 'css', 'selector' => '.fl-countdown .fl-countdown-unit-number', 'property' => 'font-size', 'unit' => 'px')), 'label_size' => array('type' => 'text', 'label' => __('Text Size', 'fl-builder'), 'default' => '13', 'maxlength' => '3', 'size' => '4', 'description' => 'px', 'preview' => array('type' => 'css', 'selector' => '.fl-countdown .fl-countdown-unit-label', 'property' => 'font-size', 'unit' => 'px')), 'horizontal_padding' => array('type' => 'text', 'label' => __('Horizontal Padding', 'fl-builder'), 'default' => '10', 'maxlength' => '3', 'size' => '4', 'description' => 'px', 'preview' => array('type' => 'css', 'rules' => array(array('selector' => '.fl-countdown .fl-countdown-unit', 'property' => 'padding-left', 'unit' => 'px'), array('selector' => '.fl-countdown .fl-countdown-unit', 'property' => 'padding-right', 'unit' => 'px')))), 'vertical_padding' => array('type' => 'text', 'label' => __('Vertical Padding', 'fl-builder'), 'default' => '10', 'maxlength' => '3', 'size' => '4', 'description' => 'px', 'preview' => array('type' => 'css', 'rules' => array(array('selector' => '.fl-countdown .fl-countdown-unit', 'property' => 'padding-top', 'unit' => 'px'), array('selector' => '.fl-countdown .fl-countdown-unit', 'property' => 'padding-bottom', 'unit' => 'px')))), 'number_spacing' => array('type' => 'text', 'label' => __('Number Spacing', 'fl-builder'), 'default' => '10', 'maxlength' => '3', 'size' => '4', 'description' => 'px', 'preview' => array('type' => 'css', 'rules' => array(array('selector' => '.fl-countdown .fl-countdown-number', 'property' => 'margin-left', 'unit' => 'px'), array('selector' => '.fl-countdown .fl-countdown-number', 'property' => 'margin-right', 'unit' => 'px')))))), 'numbers_style' => array('title' => __('Backgrounds', 'fl-builder'), 'fields' => array('number_bg_color' => array('type' => 'color', 'label' => __('Number Background Color', 'fl-builder'), 'show_reset' => true, 'preview' => array('type' => 'css', 'selector' => '.fl-countdown .fl-countdown-unit', 'property' => 'background-color')), 'number_bg_opacity' => array('type' => 'text', 'label' => __('Number Background Opacity', 'fl-builder'), 'default' => '100', 'maxlength' => '3', 'size' => '4', 'description' => '%'), 'border_radius' => array('type' => 'text', 'label' => __('Number Border Radius', 'fl-builder'), 'default' => '0', 'maxlength' => '3', 'size' => '4', 'description' => 'px', 'preview' => array('type' => 'css', 'selector' => '.fl-countdown .fl-countdown-unit', 'property' => 'border-radius', 'unit' => 'px')))), 'separator_style' => array('title' => __('Separator', 'fl-builder'), 'fields' => array('show_separator' => array('type' => 'select', 'label' => __('Show Time Separators', 'fl-builder'), 'default' => 'no', 'options' => array('no' => __('No', 'fl-builder'), 'yes' => __('Yes', 'fl-builder')), 'toggle' => array('yes' => array('fields' => array('separator_type', 'separator_color')))), 'separator_type' => array('type' => 'select', 'label' => __('Separator Type', 'fl-builder'), 'default' => 'line', 'options' => array('colon' => __('Colon', 'fl-builder'), 'line' => __('Line', 'fl-builder')), 'toggle' => array('colon' => array('fields' => array('separator_size')))), 'separator_color' => array('type' => 'color', 'label' => __('Separator Color', 'fl-builder'), 'show_reset' => true), 'separator_size' => array('type' => 'text', 'label' => __('Separator Size', 'fl-builder'), 'default' => '15', 'maxlength' => '3', 'size' => '4', 'description' => 'px'))), 'circle_bar_style' => array('title' => __('Circle Styles', 'fl-builder'), 'fields' => array('circle_width' => array('type' => 'text', 'label' => __('Circle Size', 'fl-builder'), 'default' => '200', 'maxlength' => '4', 'size' => '4', 'description' => 'px', 'preview' => array('type' => 'css', 'rules' => array(array('selector' => '.fl-countdown-number', 'property' => 'max-width', 'unit' => 'px'), array('selector' => '.fl-countdown-number', 'property' => 'max-height', 'unit' => 'px'), array('selector' => '.fl-countdown-circle-container', 'property' => 'max-width', 'unit' => 'px'), array('selector' => '.fl-countdown-circle-container', 'property' => 'max-height', 'unit' => 'px')))), 'circle_dash_width' => array('type' => 'text', 'label' => __('Circle Stroke Size', 'fl-builder'), 'default' => '10', 'maxlength' => '2', 'size' => '4', 'description' => 'px', 'preview' => array('type' => 'css', 'selector' => '.svg circle', 'property' => 'stroke-width', 'unit' => 'px')), 'circle_color' => array('type' => 'color', 'label' => __('Circle Foreground Color', 'fl-builder'), 'default' => 'f7951e', 'show_reset' => true, 'preview' => array('type' => 'css', 'selector' => '.fl-countdown .svg .fl-number', 'property' => 'stroke')), 'circle_bg_color' => array('type' => 'color', 'label' => __('Circle Background Color', 'fl-builder'), 'default' => 'eaeaea', 'show_reset' => true, 'preview' => array('type' => 'css', 'selector' => '.fl-countdown .svg .fl-number-bg', 'property' => 'stroke'))))))));
コード例 #24
0
ファイル: cta.php プロジェクト: spokencode/bophillips
     * @method __construct
     */
    public function __construct()
    {
        parent::__construct(array('name' => __('Call to Action', 'fl-builder'), 'description' => __('Display a heading, subheading and a button.', 'fl-builder'), 'category' => __('Advanced Modules', 'fl-builder')));
    }
    /**
     * @method get_classname
     */
    public function get_classname()
    {
        $classname = 'fl-cta-wrap fl-cta-' . $this->settings->layout;
        if ($this->settings->layout == 'stacked') {
            $classname .= ' fl-cta-' . $this->settings->alignment;
        }
        return $classname;
    }
    /**
     * @method render_button
     */
    public function render_button()
    {
        $btn_settings = array('align' => '', 'bg_color' => $this->settings->btn_bg_color, 'bg_hover_color' => $this->settings->btn_bg_hover_color, 'bg_opacity' => $this->settings->btn_bg_opacity, 'border_radius' => $this->settings->btn_border_radius, 'border_size' => $this->settings->btn_border_size, 'font_size' => $this->settings->btn_font_size, 'icon' => $this->settings->btn_icon, 'icon_position' => $this->settings->btn_icon_position, 'link' => $this->settings->btn_link, 'link_target' => $this->settings->btn_link_target, 'padding' => $this->settings->btn_padding, 'style' => $this->settings->btn_style, 'text' => $this->settings->btn_text, 'text_color' => $this->settings->btn_text_color, 'text_hover_color' => $this->settings->btn_text_hover_color, 'width' => $this->settings->layout == 'stacked' ? 'auto' : 'full');
        FLBuilder::render_module_html('button', $btn_settings);
    }
}
/**
 * Register the module and its form settings.
 */
FLBuilder::register_module('FLCtaModule', array('general' => array('title' => __('General', 'fl-builder'), 'sections' => array('title' => array('title' => '', 'fields' => array('title' => array('type' => 'text', 'label' => __('Heading', 'fl-builder'), 'default' => __('Ready to find out more?', 'fl-builder'), 'preview' => array('type' => 'text', 'selector' => '.fl-cta-title')))), 'text' => array('title' => __('Text', 'fl-builder'), 'fields' => array('text' => array('type' => 'editor', 'label' => '', 'media_buttons' => false, 'default' => __('Drop us a line today for a free quote!', 'fl-builder'), 'preview' => array('type' => 'text', 'selector' => '.fl-cta-text-content')))))), 'style' => array('title' => __('Style', 'fl-builder'), 'sections' => array('structure' => array('title' => __('Structure', 'fl-builder'), 'fields' => array('layout' => array('type' => 'select', 'label' => __('Layout', 'fl-builder'), 'default' => 'inline', 'options' => array('inline' => __('Inline', 'fl-builder'), 'stacked' => __('Stacked', 'fl-builder')), 'toggle' => array('stacked' => array('fields' => array('alignment')))), 'alignment' => array('type' => 'select', 'label' => __('Alignment', 'fl-builder'), 'default' => 'center', 'options' => array('left' => __('Left', 'fl-builder'), 'center' => __('Center', 'fl-builder'), 'right' => __('Right', 'fl-builder'))), 'spacing' => array('type' => 'text', 'label' => __('Spacing', 'fl-builder'), 'default' => '0', 'maxlength' => '3', 'size' => '4', 'description' => 'px', 'preview' => array('type' => 'css', 'selector' => '.fl-module-content', 'property' => 'padding', 'unit' => 'px')))), 'title_structure' => array('title' => __('Heading Structure', 'fl-builder'), 'fields' => array('title_tag' => array('type' => 'select', 'label' => __('Heading Tag', 'fl-builder'), 'default' => 'h3', 'options' => array('h1' => 'h1', 'h2' => 'h2', 'h3' => 'h3', 'h4' => 'h4', 'h5' => 'h5', 'h6' => 'h6')), 'title_size' => array('type' => 'select', 'label' => __('Heading Size', 'fl-builder'), 'default' => 'default', 'options' => array('default' => __('Default', 'fl-builder'), 'custom' => __('Custom', 'fl-builder')), 'toggle' => array('custom' => array('fields' => array('title_custom_size')))), 'title_custom_size' => array('type' => 'text', 'label' => __('Heading Custom Size', 'fl-builder'), 'default' => '24', 'maxlength' => '3', 'size' => '4', 'description' => 'px'))), 'colors' => array('title' => __('Colors', 'fl-builder'), 'fields' => array('text_color' => array('type' => 'color', 'label' => __('Text Color', 'fl-builder'), 'default' => '', 'show_reset' => true), 'bg_color' => array('type' => 'color', 'label' => __('Background Color', 'fl-builder'), 'default' => '', 'show_reset' => true), 'bg_opacity' => array('type' => 'text', 'label' => __('Background Opacity', 'fl-builder'), 'default' => '100', 'description' => '%', 'maxlength' => '3', 'size' => '5'))))), 'button' => array('title' => __('Button', 'fl-builder'), 'sections' => array('btn_text' => array('title' => '', 'fields' => array('btn_text' => array('type' => 'text', 'label' => __('Text', 'fl-builder'), 'default' => __('Click Here', 'fl-builder'), 'preview' => array('type' => 'text', 'selector' => '.fl-button-text')), 'btn_icon' => array('type' => 'icon', 'label' => __('Icon', 'fl-builder'), 'show_remove' => true), 'btn_icon_position' => array('type' => 'select', 'label' => __('Icon Position', 'fl-builder'), 'default' => 'before', 'options' => array('before' => __('Before Text', 'fl-builder'), 'after' => __('After Text', 'fl-builder'))))), 'btn_link' => array('title' => __('Button Link', 'fl-builder'), 'fields' => array('btn_link' => array('type' => 'link', 'label' => __('Link', 'fl-builder'), 'preview' => array('type' => 'none')), 'btn_link_target' => array('type' => 'select', 'label' => __('Link Target', 'fl-builder'), 'default' => '_self', 'options' => array('_self' => __('Same Window', 'fl-builder'), '_blank' => __('New Window', 'fl-builder')), 'preview' => array('type' => 'none')))), 'btn_colors' => array('title' => __('Button Colors', 'fl-builder'), 'fields' => array('btn_bg_color' => array('type' => 'color', 'label' => __('Background Color', 'fl-builder'), 'default' => '', 'show_reset' => true), 'btn_bg_hover_color' => array('type' => 'color', 'label' => __('Background Hover Color', 'fl-builder'), 'default' => '', 'show_reset' => true, 'preview' => array('type' => 'none')), 'btn_text_color' => array('type' => 'color', 'label' => __('Text Color', 'fl-builder'), 'default' => '', 'show_reset' => true), 'btn_text_hover_color' => array('type' => 'color', 'label' => __('Text Hover Color', 'fl-builder'), 'default' => '', 'show_reset' => true, 'preview' => array('type' => 'none')))), 'btn_style' => array('title' => __('Button Style', 'fl-builder'), 'fields' => array('btn_style' => array('type' => 'select', 'label' => __('Style', 'fl-builder'), 'default' => 'flat', 'options' => array('flat' => __('Flat', 'fl-builder'), 'gradient' => __('Gradient', 'fl-builder'), 'transparent' => __('Transparent', 'fl-builder')), 'toggle' => array('transparent' => array('fields' => array('btn_bg_opacity', 'btn_border_size')))), 'btn_border_size' => array('type' => 'text', 'label' => __('Border Size', 'fl-builder'), 'default' => '2', 'description' => 'px', 'maxlength' => '3', 'size' => '5', 'placeholder' => '0'), 'btn_bg_opacity' => array('type' => 'text', 'label' => __('Background Opacity', 'fl-builder'), 'default' => '0', 'description' => '%', 'maxlength' => '3', 'size' => '5', 'placeholder' => '0'))), 'btn_structure' => array('title' => __('Button Structure', 'fl-builder'), 'fields' => array('btn_font_size' => array('type' => 'text', 'label' => __('Font Size', 'fl-builder'), 'default' => '16', 'maxlength' => '3', 'size' => '4', 'description' => 'px'), 'btn_padding' => array('type' => 'text', 'label' => __('Padding', 'fl-builder'), 'default' => '12', 'maxlength' => '3', 'size' => '4', 'description' => 'px'), 'btn_border_radius' => array('type' => 'text', 'label' => __('Round Corners', 'fl-builder'), 'default' => '4', 'maxlength' => '3', 'size' => '4', 'description' => 'px', 'preview' => array('type' => 'css', 'selector' => 'a.fl-button', 'property' => 'border-radius', 'unit' => 'px'))))))));
コード例 #25
0
$module_form_children = wma_bb_shortcode_def($module, 'form_children');
/**
 * 20) Registration
 */
/**
 * Module registration class
 */
class WM_BB_Module_Call_to_action extends FLBuilderModule
{
    public function __construct()
    {
        $module = wma_bb_get_custom_module_slug(__FILE__);
        parent::__construct(apply_filters('wmhook_wmamp_' . 'bb_module_construct_' . $module, wma_bb_shortcode_def($module, 'register')));
    }
}
// /WM_BB_Module_Call_to_action
/**
 * 30) Forms
 */
/**
 * Register the module and its form
 */
if (!empty($module_form) && is_array($module_form)) {
    FLBuilder::register_module('WM_BB_Module_Call_to_action', $module_form);
}
/**
 * Module children form
 */
if (!empty($module_form_children) && is_array($module_form_children)) {
    FLBuilder::register_settings_form('wm_children_form_' . $module, $module_form_children);
}
コード例 #26
0
ファイル: widget.php プロジェクト: meftasadat/DSL_SITE
        // Make sure we have a widget.
        if (!isset($settings->widget) || !isset($wp_widget_factory->widgets[$settings->widget])) {
            return $settings;
        }
        // Get the widget instance.
        $factory = $wp_widget_factory->widgets[$settings->widget];
        $class = get_class($factory);
        $instance = new $class($factory->id_base, $factory->name, $factory->widget_options);
        // Get the widget settings.
        $settings_key = 'widget-' . $instance->id_base;
        $widget_settings = array();
        if (isset($settings->{$settings_key})) {
            $widget_settings = (array) $settings->{$settings_key};
        }
        // Run the widget update method.
        $widget_settings = $instance->update($widget_settings, array());
        // Save the widget settings as an object.
        if (is_array($widget_settings)) {
            $settings->{$settings_key} = (object) $widget_settings;
        }
        // Delete the WordPress cache for this widget.
        wp_cache_delete($settings->widget, 'widget');
        // Return the settings.
        return $settings;
    }
}
/**
 * Register the module and its form settings.
 */
FLBuilder::register_module('FLWidgetModule', array('general' => array('title' => __('General', 'fl-builder'), 'file' => FL_BUILDER_DIR . 'modules/widget/includes/settings-general.php')));
コード例 #27
0
ファイル: audio.php プロジェクト: nullality/FEWD-SEA-7
                if (!$this->data && isset($this->settings->data)) {
                    $this->data = $this->settings->data;
                }
            }
        }
        return $this->data;
    }
    /**
     * @method update
     * @param $settings {object}
     */
    public function update($settings)
    {
        // Cache the attachment data.
        if ($settings->audio_type == 'media_library') {
            // Get audio data if user selected only one audio file
            if (is_array($settings->audios) && count($settings->audios) == 1) {
                $audios = FLBuilderPhoto::get_attachment_data($settings->audios[0]);
                if ($audios) {
                    $settings->data = $audios;
                }
            }
        }
        return $settings;
    }
}
/**
 * Register the module and its form settings.
 */
FLBuilder::register_module('FLAudioModule', array('general' => array('title' => __('General', 'fl-builder'), 'sections' => array('general' => array('title' => '', 'fields' => array('audio_type' => array('type' => 'select', 'label' => __('Audio Type', 'fl-builder'), 'default' => 'wordpress', 'options' => array('media_library' => __('Media Library', 'fl-builder'), 'link' => __('Link', 'fl-builder')), 'toggle' => array('link' => array('fields' => array('link')), 'media_library' => array('fields' => array('audios')))), 'audios' => array('type' => 'multiple-audios', 'label' => __('Audio', 'fl-builder'), 'toggle' => array('playlist' => array('fields' => array('style', 'tracklist', 'tracknumbers', 'images', 'artists')), 'single_audio' => array('fields' => array('autoplay', 'loop')))), 'link' => array('type' => 'text', 'label' => __('Link', 'fl-builder')), 'autoplay' => array('type' => 'select', 'label' => __('Auto Play', 'fl-builder'), 'default' => '0', 'options' => array('0' => __('No', 'fl-builder'), '1' => __('Yes', 'fl-builder')), 'preview' => array('type' => 'none')), 'loop' => array('type' => 'select', 'label' => __('Loop', 'fl-builder'), 'default' => '0', 'options' => array('0' => __('No', 'fl-builder'), '1' => __('Yes', 'fl-builder')), 'preview' => array('type' => 'none')), 'style' => array('type' => 'select', 'label' => __('Style', 'fl-builder'), 'default' => 'light', 'options' => array('light' => __('Light', 'fl-builder'), 'dark' => __('Dark', 'fl-builder'))), 'tracklist' => array('type' => 'select', 'label' => __('Show Playlist', 'fl-builder'), 'default' => '1', 'options' => array('0' => __('No', 'fl-builder'), '1' => __('Yes', 'fl-builder')), 'toggle' => array('1' => array('fields' => array('tracknumbers')))), 'tracknumbers' => array('type' => 'select', 'label' => __('Show Track Numbers', 'fl-builder'), 'default' => '1', 'options' => array('0' => __('No', 'fl-builder'), '1' => __('Yes', 'fl-builder')), 'preview' => array('type' => 'none')), 'images' => array('type' => 'select', 'label' => __('Show Thumbnail', 'fl-builder'), 'default' => '1', 'options' => array('0' => __('No', 'fl-builder'), '1' => __('Yes', 'fl-builder'))), 'artists' => array('type' => 'select', 'label' => __('Show Artist Name', 'fl-builder'), 'default' => '1', 'options' => array('0' => __('No', 'fl-builder'), '1' => __('Yes', 'fl-builder')))))))));
コード例 #28
0
ファイル: map-module.php プロジェクト: Nirajjcu/minime3d
<?php

class TesseractGoogleMapModule extends FLBuilderModule
{
    /**
     * Constructor function for the module. You must pass the
     * name, description, dir, url and enabled in an array to the parent class.
     *
     * @method __construct
     */
    public function __construct()
    {
        parent::__construct(array('name' => __('Map', 'fl-builder'), 'description' => __('Google Map', 'fl-builder'), 'category' => __('Advanced Modules', 'fl-builder'), 'dir' => TESSERACT_BB_MODULE_DIR . 'map/', 'url' => TESSERACT_BB_MODULE_URL . 'map/', 'enabled' => true));
        if (!defined('GOOGLE_MAPS_API_KEY')) {
            define('GOOGLE_MAPS_API_KEY', 'AIzaSyDdg6IMS4WeWJRORd0wU_gcE-kFOUKt4zE');
        }
        $this->add_js('google-maps-javascript-api', 'https://maps.googleapis.com/maps/api/js?key=' . GOOGLE_MAPS_API_KEY, array('jquery'), '3.0', true);
    }
}
FLBuilder::register_module('TesseractGoogleMapModule', array('tesseract-map-module' => array('title' => __('General', 'fl-builder'), 'sections' => array('display' => array('title' => __('Display', 'fl-builder'), 'fields' => array('fullwidth' => array('type' => 'select', 'label' => __('Full width map?', 'fl-builder'), 'default' => 'yes', 'options' => array('yes' => __('Yes', 'fl-builder'), 'no' => __('No', 'fl-builder')), 'toggle' => array('no' => array('fields' => array('width', 'height', 'float', 'query')), 'yes' => array('fields' => array('height', 'query')))), 'width' => array('type' => 'text', 'label' => __('Width', 'fl-builder'), 'description' => __('Width in pixels', 'fl-builder'), 'default' => '600'), 'height' => array('type' => 'text', 'label' => __('Height', 'fl-builder'), 'description' => __('Height in pixels', 'fl-builder'), 'default' => '400'), 'float' => array('type' => 'select', 'label' => __('Float', 'fl-builder'), 'default' => __('none', 'fl-builder'), 'options' => array('none' => 'None', 'left' => 'Left', 'right' => 'Right')), 'zoom' => array('type' => 'select', 'label' => __('Zoom Level', 'fl-builder'), 'default' => '8', 'options' => range(0, 20), 'preview' => array('type' => 'none')), 'lat' => array('type' => 'text', 'hidden' => true), 'lng' => array('type' => 'text', 'hidden' => true), 'query' => array('type' => 'text', 'label' => __('Search location', 'fl-builder'), 'description' => __('Enter an address. eg. 123 Main st, Los Angeles, CA', 'fl-builder'), 'default' => '', 'preview' => array('type' => 'none'))))))));
コード例 #29
0
ファイル: icon.php プロジェクト: onedaylabs/onedaylabs.com
<?php

/**
 * @class FLIconModule
 */
class FLIconModule extends FLBuilderModule
{
    /**
     * @method __construct
     */
    public function __construct()
    {
        parent::__construct(array('name' => __('Icon', 'fl-builder'), 'description' => __('Display an icon and optional title.', 'fl-builder'), 'category' => __('Advanced Modules', 'fl-builder'), 'editor_export' => false, 'partial_refresh' => true));
    }
}
/**
 * Register the module and its form settings.
 */
FLBuilder::register_module('FLIconModule', array('general' => array('title' => __('General', 'fl-builder'), 'sections' => array('general' => array('title' => '', 'fields' => array('icon' => array('type' => 'icon', 'label' => __('Icon', 'fl-builder')))), 'link' => array('title' => __('Link', 'fl-builder'), 'fields' => array('link' => array('type' => 'link', 'label' => __('Link', 'fl-builder'), 'preview' => array('type' => 'none')), 'link_target' => array('type' => 'select', 'label' => __('Link Target', 'fl-builder'), 'default' => '_self', 'options' => array('_self' => __('Same Window', 'fl-builder'), '_blank' => __('New Window', 'fl-builder')), 'preview' => array('type' => 'none')))), 'text' => array('title' => 'Text', 'fields' => array('text' => array('type' => 'editor', 'label' => '', 'media_buttons' => false))))), 'style' => array('title' => __('Style', 'fl-builder'), 'sections' => array('colors' => array('title' => __('Colors', 'fl-builder'), 'fields' => array('color' => array('type' => 'color', 'label' => __('Color', 'fl-builder'), 'show_reset' => true), 'hover_color' => array('type' => 'color', 'label' => __('Hover Color', 'fl-builder'), 'show_reset' => true, 'preview' => array('type' => 'none')), 'bg_color' => array('type' => 'color', 'label' => __('Background Color', 'fl-builder'), 'show_reset' => true), 'bg_hover_color' => array('type' => 'color', 'label' => __('Background Hover Color', 'fl-builder'), 'show_reset' => true, 'preview' => array('type' => 'none')), 'three_d' => array('type' => 'select', 'label' => __('Gradient', 'fl-builder'), 'default' => '0', 'options' => array('0' => __('No', 'fl-builder'), '1' => __('Yes', 'fl-builder'))))), 'structure' => array('title' => __('Structure', 'fl-builder'), 'fields' => array('size' => array('type' => 'text', 'label' => __('Size', 'fl-builder'), 'default' => '30', 'maxlength' => '3', 'size' => '4', 'description' => 'px'), 'align' => array('type' => 'select', 'label' => __('Alignment', 'fl-builder'), 'default' => 'left', 'options' => array('center' => __('Center', 'fl-builder'), 'left' => __('Left', 'fl-builder'), 'right' => __('Right', 'fl-builder')))))))));
コード例 #30
0
     */
    public function render_link($slide)
    {
        if ($slide->cta_type == 'link') {
            return '<a href="' . $slide->link . '" target="' . $slide->link_target . '" class="fl-slide-cta-link">' . $slide->cta_text . '</a>';
        }
    }
    /**
     * @method render_button
     */
    public function render_button($slide)
    {
        if ($slide->cta_type == 'button') {
            if (!isset($slide->btn_style)) {
                $slide->btn_style = 'flat';
            }
            $btn_settings = array('align' => '', 'bg_color' => $slide->btn_bg_color, 'bg_hover_color' => $slide->btn_bg_hover_color, 'bg_opacity' => isset($slide->btn_bg_opacity) ? $slide->btn_bg_opacity : 0, 'border_radius' => $slide->btn_border_radius, 'border_size' => isset($slide->btn_border_size) ? $slide->btn_border_size : 2, 'font_size' => $slide->btn_font_size, 'icon' => isset($slide->btn_icon) ? $slide->btn_icon : '', 'icon_position' => isset($slide->btn_icon_position) ? $slide->btn_icon_position : 'before', 'link' => $slide->link, 'link_target' => $slide->link_target, 'padding' => $slide->btn_padding, 'style' => isset($slide->btn_3d) && $slide->btn_3d ? 'gradient' : $slide->btn_style, 'text' => $slide->cta_text, 'text_color' => $slide->btn_text_color, 'text_hover_color' => $slide->btn_text_hover_color, 'width' => 'auto');
            echo '<div class="fl-slide-cta-button">';
            FLBuilder::render_module_html('button', $btn_settings);
            echo '</div>';
        }
    }
}
/**
 * Register the module and its form settings.
 */
FLBuilder::register_module('FLContentSliderModule', array('general' => array('title' => __('General', 'fl-builder'), 'sections' => array('general' => array('title' => '', 'fields' => array('height' => array('type' => 'text', 'label' => __('Height', 'fl-builder'), 'default' => '400', 'maxlength' => '4', 'size' => '5', 'description' => 'px', 'help' => __('This setting is the minimum height of the content slider. Content will expand the height automatically.', 'fl-builder')), 'auto_play' => array('type' => 'select', 'label' => __('Auto Play', 'fl-builder'), 'default' => '1', 'options' => array('0' => __('No', 'fl-builder'), '1' => __('Yes', 'fl-builder')), 'toggle' => array('1' => array('fields' => array('play_pause')))), 'play_pause' => array('type' => 'select', 'label' => __('Show Play/Pause', 'fl-builder'), 'default' => '0', 'options' => array('0' => __('No', 'fl-builder'), '1' => __('Yes', 'fl-builder'))), 'delay' => array('type' => 'text', 'label' => __('Delay', 'fl-builder'), 'default' => '5', 'maxlength' => '4', 'size' => '5', 'description' => _x('seconds', 'Value unit for form field of time in seconds. Such as: "5 seconds"', 'fl-builder')), 'transition' => array('type' => 'select', 'label' => __('Transition', 'fl-builder'), 'default' => 'slide', 'options' => array('horizontal' => _x('Slide', 'Transition type.', 'fl-builder'), 'fade' => __('Fade', 'fl-builder'))), 'speed' => array('type' => 'text', 'label' => __('Transition Speed', 'fl-builder'), 'default' => '0.5', 'maxlength' => '4', 'size' => '5', 'description' => _x('seconds', 'Value unit for form field of time in seconds. Such as: "5 seconds"', 'fl-builder')), 'arrows' => array('type' => 'select', 'label' => __('Show Arrows', 'fl-builder'), 'default' => '0', 'options' => array('0' => __('No', 'fl-builder'), '1' => __('Yes', 'fl-builder'))), 'dots' => array('type' => 'select', 'label' => __('Show Dots', 'fl-builder'), 'default' => '1', 'options' => array('0' => __('No', 'fl-builder'), '1' => __('Yes', 'fl-builder'))))), 'advanced' => array('title' => __('Advanced', 'fl-builder'), 'fields' => array('max_width' => array('type' => 'text', 'label' => __('Max Content Width', 'fl-builder'), 'default' => '1100', 'maxlength' => '4', 'size' => '5', 'description' => 'px', 'help' => __('The max width that the content area will be within your slides.', 'fl-builder')))))), 'slides' => array('title' => __('Slides', 'fl-builder'), 'sections' => array('general' => array('title' => '', 'fields' => array('slides' => array('type' => 'form', 'label' => __('Slide', 'fl-builder'), 'form' => 'content_slider_slide', 'preview_text' => 'label', 'multiple' => true)))))));
/**
 * Register the slide settings form.
 */
FLBuilder::register_settings_form('content_slider_slide', array('title' => __('Slide Settings', 'fl-builder'), 'tabs' => array('general' => array('title' => __('General', 'fl-builder'), 'sections' => array('general' => array('title' => '', 'fields' => array('label' => array('type' => 'text', 'label' => __('Slide Label', 'fl-builder'), 'help' => __('A label to identify this slide on the Slides tab of the Content Slider settings.', 'fl-builder')))), 'background' => array('title' => __('Background Layout', 'fl-builder'), 'fields' => array('bg_layout' => array('type' => 'select', 'label' => __('Type', 'fl-builder'), 'default' => 'photo', 'help' => __('This setting is for the entire background of your slide.', 'fl-builder'), 'options' => array('photo' => __('Photo', 'fl-builder'), 'video' => __('Video', 'fl-builder'), 'color' => __('Color', 'fl-builder'), 'none' => _x('None', 'Background type.', 'fl-builder')), 'toggle' => array('photo' => array('fields' => array('bg_photo'), 'sections' => array('content', 'text')), 'color' => array('fields' => array('bg_color'), 'sections' => array('content', 'text')), 'video' => array('fields' => array('bg_video')), 'none' => array('sections' => array('content', 'text')))), 'bg_photo' => array('type' => 'photo', 'label' => __('Background Photo', 'fl-builder')), 'bg_color' => array('type' => 'color', 'label' => __('Background Color', 'fl-builder'), 'show_reset' => true), 'bg_video' => array('type' => 'textarea', 'label' => __('Background Video Code', 'fl-builder'), 'rows' => '6'))), 'content' => array('title' => __('Content Layout', 'fl-builder'), 'fields' => array('content_layout' => array('type' => 'select', 'label' => __('Type', 'fl-builder'), 'default' => 'none', 'help' => __('This allows you to add content over or in addition to the background selection above. The location of the content layout can be selected in the style tab.', 'fl-builder'), 'options' => array('text' => __('Text', 'fl-builder'), 'photo' => __('Text &amp; Photo', 'fl-builder'), 'video' => __('Text &amp; Video', 'fl-builder'), 'none' => _x('None', 'Content type.', 'fl-builder')), 'toggle' => array('text' => array('fields' => array('title', 'text'), 'sections' => array('text')), 'photo' => array('fields' => array('title', 'text', 'fg_photo'), 'sections' => array('text')), 'video' => array('fields' => array('title', 'text', 'fg_video'), 'sections' => array('text')))), 'fg_photo' => array('type' => 'photo', 'label' => __('Photo', 'fl-builder')), 'fg_video' => array('type' => 'textarea', 'label' => __('Video Embed Code', 'fl-builder'), 'rows' => '6'), 'title' => array('type' => 'text', 'label' => __('Heading', 'fl-builder')), 'text' => array('type' => 'editor', 'media_buttons' => false, 'rows' => 16))))), 'style' => array('title' => __('Style', 'fl-builder'), 'sections' => array('title' => array('title' => __('Heading', 'fl-builder'), 'fields' => array('title_tag' => array('type' => 'select', 'label' => __('Heading Tag', 'fl-builder'), 'default' => 'h2', 'options' => array('h1' => 'h1', 'h2' => 'h2', 'h3' => 'h3', 'h4' => 'h4', 'h5' => 'h5', 'h6' => 'h6')), 'title_size' => array('type' => 'select', 'label' => __('Heading Size', 'fl-builder'), 'default' => 'default', 'options' => array('default' => __('Default', 'fl-builder'), 'custom' => __('Custom', 'fl-builder')), 'toggle' => array('custom' => array('fields' => array('title_custom_size')))), 'title_custom_size' => array('type' => 'text', 'label' => __('Heading Size', 'fl-builder'), 'default' => '24', 'maxlength' => '3', 'size' => '4', 'description' => 'px'))), 'text_position' => array('title' => __('Text Position', 'fl-builder'), 'fields' => array('text_position' => array('type' => 'select', 'label' => __('Position', 'fl-builder'), 'default' => 'top-left', 'help' => __('The position will move the content layout selections left, right or center over the background of the slide.', 'fl-builder'), 'options' => array('left' => __('Left', 'fl-builder'), 'center' => __('Center', 'fl-builder'), 'right' => __('Right', 'fl-builder'))), 'text_width' => array('type' => 'text', 'label' => __('Width', 'fl-builder'), 'default' => '50', 'description' => '%', 'maxlength' => '3', 'size' => '5'), 'text_margin_top' => array('type' => 'text', 'label' => __('Top Margin', 'fl-builder'), 'default' => '60', 'description' => 'px', 'maxlength' => '4', 'size' => '5'), 'text_margin_bottom' => array('type' => 'text', 'label' => __('Bottom Margin', 'fl-builder'), 'default' => '60', 'description' => 'px', 'maxlength' => '4', 'size' => '5'), 'text_margin_left' => array('type' => 'text', 'label' => __('Left Margin', 'fl-builder'), 'default' => '60', 'description' => 'px', 'maxlength' => '4', 'size' => '5'), 'text_margin_right' => array('type' => 'text', 'label' => __('Right Margin', 'fl-builder'), 'default' => '60', 'description' => 'px', 'maxlength' => '4', 'size' => '5'))), 'text_style' => array('title' => __('Text Colors', 'fl-builder'), 'fields' => array('text_color' => array('type' => 'color', 'label' => __('Text Color', 'fl-builder'), 'default' => 'ffffff', 'show_reset' => true), 'text_shadow' => array('type' => 'select', 'label' => __('Text Shadow', 'fl-builder'), 'default' => '0', 'options' => array('0' => __('No', 'fl-builder'), '1' => __('Yes', 'fl-builder'))), 'text_bg_color' => array('type' => 'color', 'label' => __('Text Background Color', 'fl-builder'), 'help' => __('The color applies to the overlay behind text over the background selections.', 'fl-builder'), 'show_reset' => true), 'text_bg_opacity' => array('type' => 'text', 'label' => __('Text Background Opacity', 'fl-builder'), 'default' => '70', 'maxlength' => '3', 'size' => '4', 'description' => '%'), 'text_bg_height' => array('type' => 'select', 'label' => __('Text Background Height', 'fl-builder'), 'default' => 'auto', 'help' => __('Auto will allow the overlay to fit however long the text content is. 100% will fit the overlay to the top and bottom of the slide.', 'fl-builder'), 'options' => array('auto' => _x('Auto', 'Background height.', 'fl-builder'), '100%' => '100%')))))), 'cta' => array('title' => __('Call To Action', 'fl-builder'), 'sections' => array('link' => array('title' => __('Link', 'fl-builder'), 'fields' => array('link' => array('type' => 'link', 'label' => __('Link', 'fl-builder'), 'help' => __('The link applies to the entire slide. If choosing a call to action type below, this link will also be used for the text or button.', 'fl-builder')), 'link_target' => array('type' => 'select', 'label' => __('Link Target', 'fl-builder'), 'default' => '_self', 'options' => array('_self' => __('Same Window', 'fl-builder'), '_blank' => __('New Window', 'fl-builder'))))), 'cta' => array('title' => __('Call to Action', 'fl-builder'), 'fields' => array('cta_type' => array('type' => 'select', 'label' => __('Type', 'fl-builder'), 'default' => 'none', 'options' => array('none' => _x('None', 'Call to action.', 'fl-builder'), 'link' => __('Link', 'fl-builder'), 'button' => __('Button', 'fl-builder')), 'toggle' => array('none' => array(), 'link' => array('fields' => array('cta_text')), 'button' => array('fields' => array('cta_text', 'btn_icon', 'btn_icon_position'), 'sections' => array('btn_style', 'btn_colors', 'btn_structure')))), 'cta_text' => array('type' => 'text', 'label' => __('Text', 'fl-builder')), 'btn_icon' => array('type' => 'icon', 'label' => __('Button Icon', 'fl-builder'), 'show_remove' => true), 'btn_icon_position' => array('type' => 'select', 'label' => __('Button Icon Position', 'fl-builder'), 'default' => 'before', 'options' => array('before' => __('Before Text', 'fl-builder'), 'after' => __('After Text', 'fl-builder'))))), 'btn_colors' => array('title' => __('Button Colors', 'fl-builder'), 'fields' => array('btn_bg_color' => array('type' => 'color', 'label' => __('Background Color', 'fl-builder'), 'default' => 'f7f7f7', 'show_reset' => true), 'btn_bg_hover_color' => array('type' => 'color', 'label' => __('Background Hover Color', 'fl-builder'), 'show_reset' => true), 'btn_text_color' => array('type' => 'color', 'label' => __('Text Color', 'fl-builder'), 'default' => '333333', 'show_reset' => true), 'btn_text_hover_color' => array('type' => 'color', 'label' => __('Text Hover Color', 'fl-builder'), 'show_reset' => true))), 'btn_style' => array('title' => __('Button Style', 'fl-builder'), 'fields' => array('btn_style' => array('type' => 'select', 'label' => __('Style', 'fl-builder'), 'default' => 'flat', 'options' => array('flat' => __('Flat', 'fl-builder'), 'gradient' => __('Gradient', 'fl-builder'), 'transparent' => __('Transparent', 'fl-builder')), 'toggle' => array('transparent' => array('fields' => array('btn_bg_opacity', 'btn_border_size')))), 'btn_border_size' => array('type' => 'text', 'label' => __('Border Size', 'fl-builder'), 'default' => '2', 'description' => 'px', 'maxlength' => '3', 'size' => '5', 'placeholder' => '0'), 'btn_bg_opacity' => array('type' => 'text', 'label' => __('Background Opacity', 'fl-builder'), 'default' => '0', 'description' => '%', 'maxlength' => '3', 'size' => '5', 'placeholder' => '0'))), 'btn_structure' => array('title' => __('Button Structure', 'fl-builder'), 'fields' => array('btn_font_size' => array('type' => 'text', 'label' => __('Font Size', 'fl-builder'), 'default' => '16', 'maxlength' => '3', 'size' => '4', 'description' => 'px'), 'btn_padding' => array('type' => 'text', 'label' => __('Padding', 'fl-builder'), 'default' => '14', 'maxlength' => '3', 'size' => '4', 'description' => 'px'), 'btn_border_radius' => array('type' => 'text', 'label' => __('Border Radius', 'fl-builder'), 'default' => '6', 'maxlength' => '3', 'size' => '4', 'description' => 'px'))))), 'mobile' => array('title' => _x('Mobile', 'Module settings form tab. Display on mobile devices.', 'fl-builder'), 'sections' => array('r_photo' => array('title' => __('Mobile Photo', 'fl-builder'), 'fields' => array('r_photo_type' => array('type' => 'select', 'label' => __('Type', 'fl-builder'), 'default' => 'main', 'help' => __('You can choose a different photo that the slide will change to on mobile devices or no photo if desired.', 'fl-builder'), 'options' => array('main' => __('Use Main Photo', 'fl-builder'), 'another' => __('Choose Another Photo', 'fl-builder'), 'none' => __('No Photo', 'fl-builder')), 'toggle' => array('another' => array('fields' => array('r_photo')))), 'r_photo' => array('type' => 'photo', 'label' => __('Photo', 'fl-builder')))), 'r_text_style' => array('title' => __('Mobile Text Colors', 'fl-builder'), 'fields' => array('r_text_color' => array('type' => 'color', 'label' => __('Text Color', 'fl-builder'), 'default' => 'ffffff', 'show_reset' => true), 'r_text_bg_color' => array('type' => 'color', 'label' => __('Text Background Color', 'fl-builder'), 'default' => '333333', 'show_reset' => true))))))));