コード例 #1
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);
}
コード例 #2
0
<?php

$global_settings = FLBuilderModel::get_global_settings();
FLBuilder::register_settings_form('module_advanced', array('title' => __('Advanced', 'fl-builder'), 'sections' => array('margins' => array('title' => __('Margins', 'fl-builder'), 'fields' => array('margin_top' => array('type' => 'text', 'label' => __('Top', 'fl-builder'), 'default' => '', 'description' => 'px', 'maxlength' => '4', 'size' => '5', 'placeholder' => $global_settings->module_margins, 'preview' => array('type' => 'none')), 'margin_bottom' => array('type' => 'text', 'label' => __('Bottom', 'fl-builder'), 'default' => '', 'description' => 'px', 'maxlength' => '4', 'size' => '5', 'placeholder' => $global_settings->module_margins, 'preview' => array('type' => 'none')), 'margin_left' => array('type' => 'text', 'label' => __('Left', 'fl-builder'), 'default' => '', 'description' => 'px', 'maxlength' => '4', 'size' => '5', 'placeholder' => $global_settings->module_margins, 'preview' => array('type' => 'none')), 'margin_right' => array('type' => 'text', 'label' => __('Right', 'fl-builder'), 'default' => '', 'description' => 'px', 'maxlength' => '4', 'size' => '5', 'placeholder' => $global_settings->module_margins, 'preview' => array('type' => 'none')))), 'responsive' => array('title' => __('Responsive Layout', 'fl-builder'), 'fields' => array('responsive_display' => array('type' => 'select', 'label' => __('Display', 'fl-builder'), 'options' => array('' => __('Always', 'fl-builder'), 'desktop' => __('Large Devices Only', 'fl-builder'), 'desktop-medium' => __('Large &amp; Medium Devices Only', 'fl-builder'), 'medium' => __('Medium Devices Only', 'fl-builder'), 'medium-mobile' => __('Medium &amp; Small Devices Only', 'fl-builder'), 'mobile' => __('Small Devices Only', 'fl-builder')), 'help' => __('Choose whether to show or hide this module at different device sizes.', 'fl-builder'), 'preview' => array('type' => 'none')))), 'animation' => array('title' => __('Animation', 'fl-builder'), 'fields' => array('animation' => array('type' => 'select', 'label' => __('Style', 'fl-builder'), 'options' => array('' => _x('None', 'Animation style.', 'fl-builder'), 'fade-in' => _x('Fade In', 'Animation style.', 'fl-builder'), 'slide-left' => _x('Slide Left', 'Animation style.', 'fl-builder'), 'slide-right' => _x('Slide Right', 'Animation style.', 'fl-builder'), 'slide-up' => _x('Slide Up', 'Animation style.', 'fl-builder'), 'slide-down' => _x('Slide Down', 'Animation style.', 'fl-builder')), 'preview' => array('type' => 'none')), 'animation_delay' => array('type' => 'text', 'label' => __('Delay', 'fl-builder'), 'default' => '0.0', 'maxlength' => '4', 'size' => '5', 'description' => _x('seconds', 'Value unit for form field of time in seconds. Such as: "5 seconds"', 'fl-builder'), 'help' => __('The amount of time in seconds before this animation starts.', 'fl-builder'), 'preview' => array('type' => 'none')))), 'css_selectors' => array('title' => __('CSS Selectors', 'fl-builder'), 'fields' => array('id' => array('type' => 'text', 'label' => __('ID', 'fl-builder'), 'help' => __("A unique ID that will be applied to this module's HTML. Must start with a letter and only contain dashes, underscores, letters or numbers. No spaces.", 'fl-builder'), 'preview' => array('type' => 'none')), 'class' => array('type' => 'text', 'label' => __('Class', 'fl-builder'), 'help' => __("A class that will be applied to this module's HTML. Must start with a letter and only contain dashes, underscores, letters or numbers. Separate multiple classes with spaces.", 'fl-builder'), 'preview' => array('type' => 'none')))))));
コード例 #3
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')))))))));
コード例 #4
0
<?php

$global_settings = FLBuilderModel::get_global_settings();
FLBuilder::register_settings_form('row', array('title' => __('Row Settings', 'fl-builder'), 'tabs' => array('style' => array('title' => __('Style', 'fl-builder'), 'sections' => array('general' => array('title' => '', 'fields' => array('width' => array('type' => 'select', 'label' => __('Width', 'fl-builder'), 'default' => $global_settings->row_width_default, 'options' => array('fixed' => __('Fixed', 'fl-builder'), 'full' => __('Full Width', 'fl-builder')), 'toggle' => array('full' => array('fields' => array('content_width'))), 'help' => __('Full width rows span the width of the page from edge to edge. Fixed rows are no wider than the Row Max Width set in the Global Settings.', 'fl-builder'), 'preview' => array('type' => 'none')), 'content_width' => array('type' => 'select', 'label' => __('Content Width', 'fl-builder'), 'default' => $global_settings->row_content_width_default, 'options' => array('fixed' => __('Fixed', 'fl-builder'), 'full' => __('Full Width', 'fl-builder')), 'help' => __('Full width content spans the width of the page from edge to edge. Fixed content is no wider than the Row Max Width set in the Global Settings.', 'fl-builder'), 'preview' => array('type' => 'none')))), 'colors' => array('title' => __('Colors', 'fl-builder'), 'fields' => array('text_color' => array('type' => 'color', 'label' => __('Text Color', 'fl-builder'), 'show_reset' => true, 'preview' => array('type' => 'none')), 'link_color' => array('type' => 'color', 'label' => __('Link Color', 'fl-builder'), 'show_reset' => true, 'preview' => array('type' => 'none')), 'hover_color' => array('type' => 'color', 'label' => __('Link Hover Color', 'fl-builder'), 'show_reset' => true, 'preview' => array('type' => 'none')), 'heading_color' => array('type' => 'color', 'label' => __('Heading Color', 'fl-builder'), 'show_reset' => true, 'preview' => array('type' => 'none')))), 'background' => array('title' => __('Background', 'fl-builder'), 'fields' => array('bg_type' => array('type' => 'select', 'label' => __('Type', 'fl-builder'), 'default' => 'none', 'options' => array('none' => _x('None', 'Background type.', 'fl-builder'), 'color' => _x('Color', 'Background type.', 'fl-builder'), 'photo' => _x('Photo', 'Background type.', 'fl-builder'), 'video' => _x('Video', 'Background type.', 'fl-builder'), 'slideshow' => array('label' => _x('Slideshow', 'Background type.', 'fl-builder'), 'premium' => true), 'parallax' => array('label' => _x('Parallax', 'Background type.', 'fl-builder'), 'premium' => true)), 'toggle' => array('color' => array('sections' => array('bg_color')), 'photo' => array('sections' => array('bg_photo', 'bg_overlay')), 'video' => array('sections' => array('bg_video', 'bg_overlay')), 'slideshow' => array('sections' => array('bg_slideshow', 'bg_overlay')), 'parallax' => array('sections' => array('bg_parallax', 'bg_overlay'))), 'preview' => array('type' => 'none')))), 'bg_color' => array('title' => __('Background Color', 'fl-builder'), 'fields' => array('bg_color' => array('type' => 'color', 'label' => __('Color', 'fl-builder'), 'show_reset' => true, 'preview' => array('type' => 'none')), 'bg_opacity' => array('type' => 'text', 'label' => __('Opacity', 'fl-builder'), 'default' => '100', 'description' => '%', 'maxlength' => '3', 'size' => '5', 'preview' => array('type' => 'none')))), 'bg_photo' => array('title' => __('Background Photo', 'fl-builder'), 'fields' => array('bg_image' => array('type' => 'photo', 'label' => __('Photo', 'fl-builder'), 'preview' => array('type' => 'none')), 'bg_repeat' => array('type' => 'select', 'label' => __('Repeat', 'fl-builder'), 'default' => 'none', 'options' => array('no-repeat' => _x('None', 'Background repeat.', 'fl-builder'), 'repeat' => _x('Tile', 'Background repeat.', 'fl-builder'), 'repeat-x' => _x('Horizontal', 'Background repeat.', 'fl-builder'), 'repeat-y' => _x('Vertical', 'Background repeat.', 'fl-builder')), 'help' => __('Repeat applies to how the image should display in the background. Choosing none will display the image as uploaded. Tile will repeat the image as many times as needed to fill the background horizontally and vertically. You can also specify the image to only repeat horizontally or vertically.', 'fl-builder'), 'preview' => array('type' => 'none')), 'bg_position' => array('type' => 'select', 'label' => __('Position', 'fl-builder'), 'default' => 'center center', 'options' => array('left top' => __('Left Top', 'fl-builder'), 'left center' => __('Left Center', 'fl-builder'), 'left bottom' => __('Left Bottom', 'fl-builder'), 'right top' => __('Right Top', 'fl-builder'), 'right center' => __('Right Center', 'fl-builder'), 'right bottom' => __('Right Bottom', 'fl-builder'), 'center top' => __('Center Top', 'fl-builder'), 'center center' => __('Center', 'fl-builder'), 'center bottom' => __('Center Bottom', 'fl-builder')), 'help' => __('Position will tell the image where it should sit in the background.', 'fl-builder'), 'preview' => array('type' => 'none')), 'bg_attachment' => array('type' => 'select', 'label' => __('Attachment', 'fl-builder'), 'default' => 'scroll', 'options' => array('scroll' => __('Scroll', 'fl-builder'), 'fixed' => __('Fixed', 'fl-builder')), 'help' => __('Attachment will specify how the image reacts when scrolling a page. When scrolling is selected, the image will scroll with page scrolling. This is the default setting. Fixed will allow the image to scroll within the background if fill is selected in the scale setting.', 'fl-builder'), 'preview' => array('type' => 'none')), 'bg_size' => array('type' => 'select', 'label' => __('Scale', 'fl-builder'), 'default' => 'cover', 'options' => array('' => _x('None', 'Background scale.', 'fl-builder'), 'contain' => __('Fit', 'fl-builder'), 'cover' => __('Fill', 'fl-builder')), 'help' => __('Scale applies to how the image should display in the background. You can select either fill or fit to the background.', 'fl-builder'), 'preview' => array('type' => 'none')))), 'bg_video' => array('title' => __('Background Video', 'fl-builder'), 'fields' => array('bg_video' => array('type' => 'video', 'label' => __('Video', 'fl-builder'), 'help' => __('An HTML5 video to use as the background of this row. Supported types are MP4, WebM and Ogg.', 'fl-builder'), 'preview' => array('type' => 'refresh')), 'bg_video_fallback' => array('type' => 'photo', 'label' => __('Fallback Photo', 'fl-builder'), 'help' => __('A photo that will be displayed if the video fails to load.', 'fl-builder'), 'preview' => array('type' => 'refresh')))), 'bg_slideshow' => array('title' => __('Background Slideshow', 'fl-builder'), 'fields' => array('ss_source' => array('type' => 'select', 'label' => __('Source', 'fl-builder'), 'default' => 'wordpress', 'options' => array('wordpress' => __('Media Library', 'fl-builder'), 'smugmug' => 'SmugMug'), 'help' => __('Pull images from the WordPress media library or a gallery on your SmugMug site by inserting the RSS feed URL from SmugMug. The RSS feed URL can be accessed by using the get a link function in your SmugMug gallery.', 'fl-builder'), 'toggle' => array('wordpress' => array('fields' => array('ss_photos')), 'smugmug' => array('fields' => array('ss_feed_url'))), 'preview' => array('type' => 'none')), 'ss_photos' => array('type' => 'multiple-photos', 'label' => __('Photos', 'fl-builder'), 'preview' => array('type' => 'none')), 'ss_feed_url' => array('type' => 'text', 'label' => __('Feed URL', 'fl-builder'), 'preview' => array('type' => 'none')), 'ss_speed' => array('type' => 'text', 'label' => __('Speed', 'fl-builder'), 'default' => '3', 'size' => '5', 'description' => _x('seconds', 'Value unit for form field of time in seconds. Such as: "5 seconds"', 'fl-builder'), 'preview' => array('type' => 'none')), 'ss_transition' => array('type' => 'select', 'label' => __('Transition', 'fl-builder'), 'default' => 'fade', 'options' => array('none' => _x('None', 'Slideshow transition type.', 'fl-builder'), 'fade' => __('Fade', 'fl-builder'), 'kenBurns' => __('Ken Burns', 'fl-builder'), 'slideHorizontal' => __('Slide Horizontal', 'fl-builder'), 'slideVertical' => __('Slide Vertical', 'fl-builder'), 'blinds' => __('Blinds', 'fl-builder'), 'bars' => __('Bars', 'fl-builder'), 'barsRandom' => __('Random Bars', 'fl-builder'), 'boxes' => __('Boxes', 'fl-builder'), 'boxesRandom' => __('Random Boxes', 'fl-builder'), 'boxesGrow' => __('Boxes Grow', 'fl-builder')), 'preview' => array('type' => 'none')), 'ss_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'), 'preview' => array('type' => 'none')), 'ss_randomize' => array('type' => 'select', 'label' => __('Randomize Photos', 'fl-builder'), 'default' => 'false', 'options' => array('false' => __('No', 'fl-builder'), 'true' => __('Yes', 'fl-builder')), 'preview' => array('type' => 'none')))), 'bg_parallax' => array('title' => __('Background Parallax', 'fl-builder'), 'fields' => array('bg_parallax_image' => array('type' => 'photo', 'label' => __('Photo', 'fl-builder'), 'preview' => array('type' => 'none')), 'bg_parallax_speed' => array('type' => 'select', 'label' => __('Speed', 'fl-builder'), 'default' => 'fast', 'options' => array('2' => __('Fast', 'fl-builder'), '5' => _x('Medium', 'Speed.', 'fl-builder'), '8' => __('Slow', 'fl-builder')), 'preview' => array('type' => 'none')))), 'bg_overlay' => array('title' => __('Background Overlay', 'fl-builder'), 'fields' => array('bg_overlay_color' => array('type' => 'color', 'label' => __('Overlay Color', 'fl-builder'), 'show_reset' => true, 'preview' => array('type' => 'none')), 'bg_overlay_opacity' => array('type' => 'text', 'label' => __('Overlay Opacity', 'fl-builder'), 'default' => '50', 'description' => '%', 'maxlength' => '3', 'size' => '5', 'preview' => array('type' => 'none')))), 'border' => array('title' => __('Border', 'fl-builder'), 'fields' => array('border_type' => array('type' => 'select', 'label' => __('Type', 'fl-builder'), 'default' => '', 'help' => __('The type of border to use. Double borders must have a width of at least 3px to render properly.', 'fl-builder'), 'options' => array('' => _x('None', 'Border type.', 'fl-builder'), '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')), 'toggle' => array('' => array('fields' => array()), 'solid' => array('fields' => array('border_color', 'border_opacity', 'border_top', 'border_bottom', 'border_left', 'border_right')), 'dashed' => array('fields' => array('border_color', 'border_opacity', 'border_top', 'border_bottom', 'border_left', 'border_right')), 'dotted' => array('fields' => array('border_color', 'border_opacity', 'border_top', 'border_bottom', 'border_left', 'border_right')), 'double' => array('fields' => array('border_color', 'border_opacity', 'border_top', 'border_bottom', 'border_left', 'border_right'))), 'preview' => array('type' => 'none')), 'border_color' => array('type' => 'color', 'label' => __('Color', 'fl-builder'), 'show_reset' => true, 'preview' => array('type' => 'none')), 'border_opacity' => array('type' => 'text', 'label' => __('Opacity', 'fl-builder'), 'default' => '100', 'description' => '%', 'maxlength' => '3', 'size' => '5', 'preview' => array('type' => 'none')), 'border_top' => array('type' => 'text', 'label' => __('Top Width', 'fl-builder'), 'default' => '1', 'description' => 'px', 'maxlength' => '3', 'size' => '5', 'placeholder' => '0', 'preview' => array('type' => 'none')), 'border_bottom' => array('type' => 'text', 'label' => __('Bottom Width', 'fl-builder'), 'default' => '1', 'description' => 'px', 'maxlength' => '3', 'size' => '5', 'placeholder' => '0', 'preview' => array('type' => 'none')), 'border_left' => array('type' => 'text', 'label' => __('Left Width', 'fl-builder'), 'default' => '0', 'description' => 'px', 'maxlength' => '3', 'size' => '5', 'placeholder' => '0', 'preview' => array('type' => 'none')), 'border_right' => array('type' => 'text', 'label' => __('Right Width', 'fl-builder'), 'default' => '0', 'description' => 'px', 'maxlength' => '3', 'size' => '5', 'placeholder' => '0', 'preview' => array('type' => 'none')))))), 'advanced' => array('title' => __('Advanced', 'fl-builder'), 'sections' => array('margins' => array('title' => __('Margins', 'fl-builder'), 'fields' => array('margin_top' => array('type' => 'text', 'label' => __('Top', 'fl-builder'), 'default' => '', 'description' => 'px', 'maxlength' => '4', 'size' => '5', 'placeholder' => $global_settings->row_margins, 'preview' => array('type' => 'none')), 'margin_bottom' => array('type' => 'text', 'label' => __('Bottom', 'fl-builder'), 'default' => '', 'description' => 'px', 'maxlength' => '4', 'size' => '5', 'placeholder' => $global_settings->row_margins, 'preview' => array('type' => 'none')), 'margin_left' => array('type' => 'text', 'label' => __('Left', 'fl-builder'), 'default' => '', 'description' => 'px', 'maxlength' => '4', 'size' => '5', 'placeholder' => $global_settings->row_margins, 'preview' => array('type' => 'none')), 'margin_right' => array('type' => 'text', 'label' => __('Right', 'fl-builder'), 'default' => '', 'description' => 'px', 'maxlength' => '4', 'size' => '5', 'placeholder' => $global_settings->row_margins, 'preview' => array('type' => 'none')))), 'padding' => array('title' => __('Padding', 'fl-builder'), 'fields' => array('padding_top' => array('type' => 'text', 'label' => __('Top', 'fl-builder'), 'default' => '', 'description' => 'px', 'maxlength' => '4', 'size' => '5', 'placeholder' => $global_settings->row_padding, 'preview' => array('type' => 'none')), 'padding_bottom' => array('type' => 'text', 'label' => __('Bottom', 'fl-builder'), 'default' => '', 'description' => 'px', 'maxlength' => '4', 'size' => '5', 'placeholder' => $global_settings->row_padding, 'preview' => array('type' => 'none')), 'padding_left' => array('type' => 'text', 'label' => __('Left', 'fl-builder'), 'default' => '', 'description' => 'px', 'maxlength' => '4', 'size' => '5', 'placeholder' => $global_settings->row_padding, 'preview' => array('type' => 'none')), 'padding_right' => array('type' => 'text', 'label' => __('Right', 'fl-builder'), 'default' => '', 'description' => 'px', 'maxlength' => '4', 'size' => '5', 'placeholder' => $global_settings->row_padding, 'preview' => array('type' => 'none')))), 'responsive' => array('title' => __('Responsive Layout', 'fl-builder'), 'fields' => array('responsive_display' => array('type' => 'select', 'label' => __('Display', 'fl-builder'), 'options' => array('' => __('Always', 'fl-builder'), 'desktop' => __('Large Devices Only', 'fl-builder'), 'desktop-medium' => __('Large &amp; Medium Devices Only', 'fl-builder'), 'medium' => __('Medium Devices Only', 'fl-builder'), 'medium-mobile' => __('Medium &amp; Small Devices Only', 'fl-builder'), 'mobile' => __('Small Devices Only', 'fl-builder')), 'help' => __('Choose whether to show or hide this row at different device sizes.', 'fl-builder'), 'preview' => array('type' => 'none')))), 'css_selectors' => array('title' => __('CSS Selectors', 'fl-builder'), 'fields' => array('id' => array('type' => 'text', 'label' => __('ID', 'fl-builder'), 'help' => __("A unique ID that will be applied to this row's HTML. Must start with a letter and only contain dashes, underscores, letters or numbers. No spaces.", 'fl-builder'), 'preview' => array('type' => 'none')), 'class' => array('type' => 'text', 'label' => __('Class', 'fl-builder'), 'help' => __("A class that will be applied to this row's HTML. Must start with a letter and only contain dashes, underscores, letters or numbers. Separate multiple classes with spaces.", 'fl-builder'), 'preview' => array('type' => 'none')))))))));
コード例 #5
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))))))));
コード例 #6
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')))))))));
コード例 #7
0
<?php

FLBuilder::register_settings_form('user_template', array('title' => __('Save Template', 'fl-builder'), 'tabs' => array('general' => array('title' => __('General', 'fl-builder'), 'description' => __('Save the current layout as a template that can be reused under <strong>Templates &rarr; Your Templates</strong>.', 'fl-builder'), 'sections' => array('general' => array('title' => '', 'fields' => array('name' => array('type' => 'text', 'label' => _x('Name', 'Template name.', 'fl-builder')))))))));
コード例 #8
0
                    $bta_class .= ' accordion-full';
                }
                echo $bta_class;
            }
            public function render_block_class($i)
            {
                $block_class = 'block';
                if ($i == 0) {
                    $block_class .= ' first';
                }
                if ($i == count($this->settings->blocks) - 1) {
                    $block_class .= ' last';
                }
                if ($this->settings->desktop_item_width != '100') {
                    $desktop_counter = ceil($i * $this->settings->desktop_item_width);
                    $block_class .= $desktop_counter % 100 == 0 ? ' desktop-first' : '';
                }
                if ($this->settings->tablet_toggle_item_width && $this->settings->tablet_item_width != '100') {
                    $tablet_counter = ceil($i * $this->settings->tablet_item_width);
                    $block_class .= $tablet_counter % 100 == 0 ? ' tablet-first' : '';
                }
                echo $block_class;
            }
        }
        FLBuilder::register_module('ZestSMSBTAModule', array('content' => array('title' => __('Content', 'fl-builder'), 'sections' => array('general' => array('title' => __('Content', 'fl-builder'), 'fields' => array('blocks' => array('type' => 'form', 'label' => __('Block', 'fl-builder'), 'form' => 'bta_content', 'preview_text' => 'title', 'multiple' => true))))), 'desktop' => array('title' => __('Desktop', 'fl-builder'), 'sections' => array('desktop_title' => array('title' => __('Title', 'fl-builder'), 'fields' => array('desktop_title_tag' => array('type' => 'select', 'label' => __('Title Tag', 'fl-builder'), 'default' => 'h3', 'options' => array('h1' => __('H1', 'fl-builder'), 'h2' => __('H2', 'fl-builder'), 'h3' => __('H3', 'fl-builder'), 'h4' => __('H4', 'fl-builder'), 'h5' => __('H5', 'fl-builder'), 'h6' => __('H6', 'fl-builder'))), 'desktop_show_title' => array('type' => 'select', 'label' => __('Show Title'), 'default' => '1', 'options' => array('0' => __('No', 'fl-builder'), '1' => __('Yes', 'fl-builder'))), 'desktop_title_color' => array('type' => 'color', 'label' => __('Title Color', 'fl-builder'), 'default' => '000000'))), 'desktop_column_settings' => array('title' => __('Columns', 'fl-builder'), 'fields' => array('desktop_item_width' => array('type' => 'select', 'label' => __('Item Width', 'fl-builder'), 'default' => 'Full', 'options' => array('100' => __('Full', 'fl-builder'), '50' => __('1 / 2', 'fl-builder'), '33.33' => __('1 / 3', 'fl-builder'), '25' => __('1 / 4', 'fl-builder'), '20' => __('1 / 5', 'fl-builder')), 'toggle' => array('100' => array('fields' => array()), '50' => array('fields' => array('desktop_item_spacing')), '33.33' => array('fields' => array('desktop_item_spacing')), '25' => array('fields' => array('desktop_item_spacing')), '20' => array('fields' => array('desktop_item_spacing')))), 'desktop_item_spacing' => array('type' => 'text', 'label' => __('Item Spacing', 'fl-builder'), 'default' => '2', 'description' => '%', 'maxlength' => '3', 'size' => '5', 'preview' => array('type' => 'none')))), 'desktop_spacing' => array('title' => __('Padding', ' fl-builder'), 'fields' => array('desktop_padding_top' => array('type' => 'text', 'label' => __('Padding Top', 'fl-builder'), 'placeholder' => '0', 'description' => 'px', 'maxlength' => '3', 'size' => '5', 'preview' => array('type' => 'css', 'selector' => '.block', 'property' => 'padding-top', 'unit' => 'px')), 'desktop_padding_bottom' => array('type' => 'text', 'label' => __('Padding Bottom', 'fl-builder'), 'placeholder' => '0', 'description' => 'px', 'maxlength' => '3', 'size' => '5', 'preview' => array('type' => 'css', 'selector' => '.block', 'property' => 'padding-bottom', 'unit' => 'px')), 'desktop_padding_left' => array('type' => 'text', 'label' => __('Padding Left', 'fl-builder'), 'placeholder' => '0', 'description' => 'px', 'maxlength' => '3', 'size' => '5', 'preview' => array('type' => 'css', 'selector' => '.block', 'property' => 'padding-left', 'unit' => 'px')), 'desktop_padding_right' => array('type' => 'text', 'label' => __('Padding Right', 'fl-builder'), 'placeholder' => '0', 'description' => 'px', 'maxlength' => '3', 'size' => '5', 'preview' => array('type' => 'css', 'selector' => '.block', 'property' => 'padding-right', 'unit' => 'px')))), 'desktop_borders' => array('title' => __('Border', 'fl-builder'), 'fields' => array('desktop_border_type' => array('type' => 'select', 'label' => __('Border Type', 'fl-builder'), 'default' => '', 'help' => __('The type of border to use. Double borders must have a width of at least 3px to render properly.', 'fl-builder'), 'options' => array('' => _x('None', 'Border type.', 'fl-builder'), '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')), 'toggle' => array('' => array('fields' => array()), 'solid' => array('fields' => array('desktop_border_color', 'desktop_border_opacity', 'desktop_border_top', 'desktop_border_bottom', 'desktop_border_left', 'desktop_border_right')), 'dashed' => array('fields' => array('desktop_border_color', 'desktop_border_opacity', 'desktop_border_top', 'desktop_border_bottom', 'desktop_border_left', 'desktop_border_right')), 'dotted' => array('fields' => array('desktop_border_color', 'desktop_border_opacity', 'desktop_border_top', 'desktop_border_bottom', 'desktop_border_left', 'desktop_border_right')), 'double' => array('fields' => array('desktop_border_color', 'desktop_border_opacity', 'desktop_border_top', 'desktop_border_bottom', 'desktop_border_left', 'desktop_border_right'))), 'preview' => array('type' => 'none')), 'desktop_border_color' => array('type' => 'color', 'label' => __('Color', 'fl-builder'), 'show_reset' => true, 'preview' => array('type' => 'none')), 'desktop_border_opacity' => array('type' => 'text', 'label' => __('Opacity', 'fl-builder'), 'default' => '100', 'description' => '%', 'maxlength' => '3', 'size' => '5', 'preview' => array('type' => 'none')), 'desktop_border_top' => array('type' => 'text', 'label' => __('Top Width', 'fl-builder'), 'default' => '1', 'description' => 'px', 'maxlength' => '3', 'size' => '5', 'placeholder' => '0', 'preview' => array('type' => 'none')), 'desktop_border_bottom' => array('type' => 'text', 'label' => __('Bottom Width', 'fl-builder'), 'default' => '1', 'description' => 'px', 'maxlength' => '3', 'size' => '5', 'placeholder' => '0', 'preview' => array('type' => 'none')), 'desktop_border_left' => array('type' => 'text', 'label' => __('Left Width', 'fl-builder'), 'default' => '0', 'description' => 'px', 'maxlength' => '3', 'size' => '5', 'placeholder' => '0', 'preview' => array('type' => 'none')), 'desktop_border_right' => array('type' => 'text', 'label' => __('Right Width', 'fl-builder'), 'default' => '0', 'description' => 'px', 'maxlength' => '3', 'size' => '5', 'placeholder' => '0', 'preview' => array('type' => 'none')))))), 'tablet' => array('title' => __('Tablet', 'fl-builder'), 'sections' => array('tablet_title' => array('title' => __('Title', 'fl-builder'), 'fields' => array('tablet_show_title' => array('type' => 'select', 'label' => __('Show Title'), 'default' => '1', 'options' => array('0' => __('No', 'fl-builder'), '1' => __('Yes', 'fl-builder'))))), 'tablet_column_settings' => array('title' => __('Columns', 'fl-builder'), 'fields' => array('tablet_toggle_item_width' => array('type' => 'select', 'label' => __('Change Item Width', 'fl-builder'), 'default' => 0, 'options' => array('0' => 'No', '1' => 'Yes'), 'toggle' => array('1' => array('fields' => array('tablet_item_width')))), 'tablet_item_width' => array('type' => 'select', 'label' => __('Item Width', 'fl-builder'), 'default' => 'Full', 'options' => array('100' => __('Full', 'fl-builder'), '50' => __('1 / 2', 'fl-builder'), '33.33' => __('1 / 3', 'fl-builder'), '25' => __('1 / 4', 'fl-builder'), '20' => __('1 / 5', 'fl-builder'))), 'tablet_toggle_item_spacing' => array('type' => 'select', 'label' => __('Change Item Spacing', 'fl-builder'), 'default' => 0, 'options' => array('0' => 'No', '1' => 'Yes'), 'toggle' => array('1' => array('fields' => array('tablet_item_spacing')))), 'tablet_item_spacing' => array('type' => 'text', 'label' => __('Item Spacing', 'fl-builder'), 'default' => '2', 'description' => '%', 'maxlength' => '3', 'size' => '5', 'preview' => array('type' => 'none')))), 'tablet_padding' => array('title' => __('Padding', 'fl-builder'), 'fields' => array('tablet_toggle_padding' => array('type' => 'select', 'label' => __('Change Padding', 'fl-builder'), 'default' => 0, 'options' => array('0' => __('No', 'fl-builder'), '1' => __('Yes', 'fl-builder')), 'toggle' => array('1' => array('fields' => array('tablet_padding_top', 'tablet_padding_bottom', 'tablet_padding_left', 'tablet_padding_right')))), 'tablet_padding_top' => array('type' => 'text', 'label' => __('Padding Top', 'fl-builder'), 'default' => '', 'placeholder' => '0', 'description' => 'px', 'maxlength' => '3', 'size' => '5', 'preview' => array('type' => 'none')), 'tablet_padding_bottom' => array('type' => 'text', 'label' => __('Padding Bottom', 'fl-builder'), 'default' => '', 'placeholder' => '0', 'description' => 'px', 'maxlength' => '3', 'size' => '5', 'preview' => array('type' => 'none')), 'tablet_padding_left' => array('type' => 'text', 'label' => __('Padding Left', 'fl-builder'), 'default' => '', 'placeholder' => '0', 'description' => 'px', 'maxlength' => '3', 'size' => '5', 'preview' => array('type' => 'none')), 'tablet_padding_right' => array('type' => 'text', 'label' => __('Padding Right', 'fl-builder'), 'default' => '', 'placeholder' => '0', 'description' => 'px', 'maxlength' => '3', 'size' => '5', 'preview' => array('type' => 'none')))), 'tablet_borders' => array('title' => __('Border', 'fl-builder'), 'fields' => array('tablet_toggle_border' => array('type' => 'select', 'label' => __('Change Border', 'fl-builder'), 'default' => 0, 'options' => array('0' => __('No', 'fl-builder'), '1' => __('Yes', 'fl-builder')), 'toggle' => array('1' => array('fields' => array('tablet_border_type')))), 'tablet_border_type' => array('type' => 'select', 'label' => __('Border Type', 'fl-builder'), 'default' => '', 'help' => __('The type of border to use. Double borders must have a width of at least 3px to render properly.', 'fl-builder'), 'options' => array('' => _x('None', 'Border type.', 'fl-builder'), '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')), 'toggle' => array('' => array('fields' => array()), 'solid' => array('fields' => array('tablet_border_color', 'tablet_border_opacity', 'tablet_border_top', 'tablet_border_bottom', 'tablet_border_left', 'tablet_border_right')), 'dashed' => array('fields' => array('tablet_border_color', 'tablet_border_opacity', 'tablet_border_top', 'tablet_border_bottom', 'tablet_border_left', 'tablet_border_right')), 'dotted' => array('fields' => array('tablet_border_color', 'tablet_border_opacity', 'tablet_border_top', 'tablet_border_bottom', 'tablet_border_left', 'tablet_border_right')), 'double' => array('fields' => array('tablet_border_color', 'tablet_border_opacity', 'tablet_border_top', 'tablet_border_bottom', 'tablet_border_left', 'tablet_border_right'))), 'preview' => array('type' => 'none')), 'tablet_border_color' => array('type' => 'color', 'label' => __('Color', 'fl-builder'), 'show_reset' => true, 'preview' => array('type' => 'none')), 'tablet_border_opacity' => array('type' => 'text', 'label' => __('Opacity', 'fl-builder'), 'default' => '100', 'description' => '%', 'maxlength' => '3', 'size' => '5', 'preview' => array('type' => 'none')), 'tablet_border_top' => array('type' => 'text', 'label' => __('Top Width', 'fl-builder'), 'default' => '1', 'description' => 'px', 'maxlength' => '3', 'size' => '5', 'placeholder' => '0', 'preview' => array('type' => 'none')), 'tablet_border_bottom' => array('type' => 'text', 'label' => __('Bottom Width', 'fl-builder'), 'default' => '1', 'description' => 'px', 'maxlength' => '3', 'size' => '5', 'placeholder' => '0', 'preview' => array('type' => 'none')), 'tablet_border_left' => array('type' => 'text', 'label' => __('Left Width', 'fl-builder'), 'default' => '0', 'description' => 'px', 'maxlength' => '3', 'size' => '5', 'placeholder' => '0', 'preview' => array('type' => 'none')), 'tablet_border_right' => array('type' => 'text', 'label' => __('Right Width', 'fl-builder'), 'default' => '0', 'description' => 'px', 'maxlength' => '3', 'size' => '5', 'placeholder' => '0', 'preview' => array('type' => 'none')))))), 'accordion' => array('title' => __('Accordion', 'fl-builder'), 'sections' => array('defaults' => array('title' => '', 'fields' => array('accordion_width' => array('type' => 'select', 'label' => __('Full Width', 'fl-builder'), 'default' => 1, 'options' => array('0' => __('No', 'fl-builder'), '1' => __('Yes', 'fl-builder')), 'preview' => array('type' => 'none')), 'accordion_heading_font_size' => array('type' => 'text', 'label' => __('Heading Font Size', 'fl-builder'), 'default' => '16', 'maxlength' => '3', 'size' => '4', 'description' => 'px', 'preview' => array('type' => 'none')), 'accordion_heading_height' => array('type' => 'text', 'label' => __('Heading Height', 'fl-builder'), 'default' => '22', 'maxlength' => '3', 'size' => '4', 'description' => 'px', 'preview' => array('type' => 'none')), 'accordion_icon_location' => array('type' => 'select', 'label' => __('Icon Location', 'zestsms'), 'default' => 'right', 'options' => array('left' => __('Left', 'zestsms'), 'right' => __('Right', 'zestsms'))))), 'accordion_closed' => array('title' => __('Accordion Closed'), 'fields' => array('accordion_font_color' => array('type' => 'color', 'label' => __('Heading Text Color', 'fl-builder'), 'default' => '333333', 'preview' => array('type' => 'none')), 'accordion_icon' => array('type' => 'icon', 'label' => __('Icon', 'fl-builder'), 'default' => 'fa-angle-down', 'preview' => array('type' => 'none')), 'accordion_icon_color' => array('type' => 'color', 'label' => __('Icon Color'), 'default' => '333333', 'preview' => array('type' => 'none')), 'accordion_background' => array('type' => 'color', 'label' => __('Background Color', 'fl-builder'), 'show_reset' => true, 'preview' => array('type' => 'none')), 'accordion_border_type' => array('type' => 'select', 'label' => __('Border Type', 'fl-builder'), 'default' => '', 'help' => __('The type of border to use. Double borders must have a width of at least 3px to render properly.', 'fl-builder'), 'options' => array('' => _x('None', 'Border type.', 'fl-builder'), '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')), 'toggle' => array('' => array('fields' => array()), 'solid' => array('fields' => array('accordion_open_border', 'accordion_border_color', 'accordion_border_opacity', 'accordion_border_top', 'accordion_border_bottom', 'accordion_border_left', 'accordion_border_right')), 'dashed' => array('fields' => array('accordion_open_border', 'accordion_border_color', 'accordion_border_opacity', 'accordion_border_top', 'accordion_border_bottom', 'accordion_border_left', 'accordion_border_right')), 'dotted' => array('fields' => array('accordion_open_border', 'accordion_border_color', 'accordion_border_opacity', 'accordion_border_top', 'accordion_border_bottom', 'accordion_border_left', 'accordion_border_right')), 'double' => array('fields' => array('accordion_open_border', 'accordion_border_color', 'accordion_border_opacity', 'accordion_border_top', 'accordion_border_bottom', 'accordion_border_left', 'accordion_border_right'))), 'preview' => array('type' => 'none')), 'accordion_border_color' => array('type' => 'color', 'label' => __('Color', 'fl-builder'), 'show_reset' => true, 'preview' => array('type' => 'none')), 'accordion_border_opacity' => array('type' => 'text', 'label' => __('Opacity', 'fl-builder'), 'default' => '100', 'description' => '%', 'maxlength' => '3', 'size' => '5', 'preview' => array('type' => 'none')), 'accordion_border_top' => array('type' => 'text', 'label' => __('Top Width', 'fl-builder'), 'default' => '1', 'description' => 'px', 'maxlength' => '3', 'size' => '5', 'placeholder' => '0', 'preview' => array('type' => 'none')), 'accordion_border_bottom' => array('type' => 'text', 'label' => __('Bottom Width', 'fl-builder'), 'default' => '1', 'description' => 'px', 'maxlength' => '3', 'size' => '5', 'placeholder' => '0', 'preview' => array('type' => 'none')), 'accordion_border_left' => array('type' => 'text', 'label' => __('Left Width', 'fl-builder'), 'default' => '0', 'description' => 'px', 'maxlength' => '3', 'size' => '5', 'placeholder' => '0', 'preview' => array('type' => 'none')), 'accordion_border_right' => array('type' => 'text', 'label' => __('Right Width', 'fl-builder'), 'default' => '0', 'description' => 'px', 'maxlength' => '3', 'size' => '5', 'placeholder' => '0', 'preview' => array('type' => 'none')))), 'accordion_open' => array('title' => __('Accordion Open', 'fl-builder'), 'fields' => array('accordion_open_font_color' => array('type' => 'color', 'label' => __('Heading Text Color', 'fl-builder'), 'default' => '333333', 'preview' => array('type' => 'none')), 'accordion_open_icon' => array('type' => 'icon', 'label' => __('Icon Open'), 'default' => 'fa-angle-up', 'preview' => array('type' => 'none')), 'accordion_open_icon_color' => array('type' => 'color', 'label' => __('Icon Color', 'fl-builder'), 'default' => '333333', 'preview' => array('type' => 'none')), 'accordion_open_background' => array('type' => 'color', 'label' => __('Background Color', 'fl-builder'), 'default' => '', 'show_reset' => true, 'preview' => array('type' => 'none')), 'accordion_open_border' => array('type' => 'color', 'label' => __('Border Color', 'fl-builder'), 'default' => '', 'show_reset' => true, 'preview' => array('type' => 'none'))))))));
        /**
         * Register a settings form to use in the "form" field type above.
         */
        FLBuilder::register_settings_form('bta_content', array('title' => __('Content Settings', 'fl-builder'), 'tabs' => array('general' => array('title' => __('General', 'fl-builder'), 'sections' => array('general' => array('title' => '', 'fields' => array('title' => array('type' => 'text', 'label' => __('Title', 'fl-builder'), 'default' => 'Content Title'), 'content' => array('type' => 'editor', 'media_buttons' => true, 'rows' => 16))))))));
    }
}
コード例 #9
0
<?php

FLBuilder::register_settings_form('node_template', array('title' => _x('Save %s Template', '%s stands for the type of node template being saved.', 'fl-builder'), 'tabs' => array('general' => array('title' => __('General', 'fl-builder'), 'sections' => array('general' => array('title' => '', 'fields' => array('name' => array('type' => 'text', 'label' => _x('Name', 'Template name.', 'fl-builder')), 'global' => array('type' => 'select', 'label' => _x('Global', 'Whether this is a global template or not.', 'fl-builder'), 'help' => __('Global templates can be added to multiple pages and edited in one place.', 'fl-builder'), 'default' => '0', 'options' => array('0' => __('No', 'fl-builder'), '1' => __('Yes', 'fl-builder'))))))))));
コード例 #10
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'), 'partial_refresh' => true));
    }
    /**
     * @method render_button
     */
    public function render_button($column)
    {
        $btn_settings = array('align' => $this->settings->pricing_columns[$column]->btn_align, 'bg_color' => $this->settings->pricing_columns[$column]->btn_bg_color, 'bg_hover_color' => $this->settings->pricing_columns[$column]->btn_bg_hover_color, 'bg_opacity' => $this->settings->pricing_columns[$column]->btn_bg_opacity, 'border_radius' => $this->settings->pricing_columns[$column]->btn_border_radius, 'border_size' => $this->settings->pricing_columns[$column]->btn_border_size, 'font_size' => $this->settings->pricing_columns[$column]->btn_font_size, 'icon' => $this->settings->pricing_columns[$column]->btn_icon, 'icon_position' => $this->settings->pricing_columns[$column]->btn_icon_position, 'link' => $this->settings->pricing_columns[$column]->btn_url, 'link_target' => $this->settings->pricing_columns[$column]->btn_link_target, 'padding' => $this->settings->pricing_columns[$column]->btn_padding, 'style' => $this->settings->pricing_columns[$column]->btn_style, 'text' => $this->settings->pricing_columns[$column]->btn_text, 'text_color' => $this->settings->pricing_columns[$column]->btn_text_color, 'text_hover_color' => $this->settings->pricing_columns[$column]->btn_text_hover_color, 'width' => $this->settings->pricing_columns[$column]->btn_width);
        FLBuilder::render_module_html('button', $btn_settings);
    }
}
/**
 * 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('highlight' => array('type' => 'select', 'label' => __('Highlight', 'fl-builder'), 'default' => 'price', 'options' => array('price' => __('Price', 'fl-builder'), 'title' => __('Title', 'fl-builder'), 'none' => __('None', 'fl-builder'))), 'border_radius' => array('type' => 'select', 'label' => __('Border Style', 'fl-builder'), 'default' => 'rounded', 'options' => array('rounded' => __('Rounded', 'fl-builder'), 'straight' => __('Straight', 'fl-builder'))), 'border_size' => array('type' => 'select', 'label' => __('Border Size', 'fl-builder'), 'default' => 'wide', 'options' => array('large' => _x('Large', 'Border size.', 'fl-builder'), 'medium' => _x('Medium', 'Border size.', 'fl-builder'), 'small' => _x('Small', 'Border size.', 'fl-builder'))), 'spacing' => array('type' => 'select', 'label' => __('Spacing', 'fl-builder'), 'default' => 'wide', 'options' => array('large' => __('Large', 'fl-builder'), 'medium' => __('Medium', 'fl-builder'), 'none' => __('None', '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'))))))));
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'))), '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))))), 'button' => array('title' => __('Button', 'fl-builder'), 'sections' => array('default' => array('title' => '', 'fields' => array('btn_text' => array('type' => 'text', 'label' => __('Button Text', 'fl-builder'), 'default' => __('Get Started', 'fl-builder')), 'btn_url' => array('type' => 'link', 'label' => __('Button URL', 'fl-builder')), '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_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), '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))), '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' => __('Width', 'fl-builder'), 'default' => 'full', 'options' => array('auto' => _x('Auto', 'Width.', 'fl-builder'), 'full' => __('Full Width', 'fl-builder'))), 'btn_align' => array('type' => 'select', 'label' => __('Alignment', 'fl-builder'), 'default' => 'center', 'options' => array('left' => __('Left', 'fl-builder'), 'center' => __('Center', 'fl-builder'), 'right' => __('Right', 'fl-builder')), 'preview' => array('type' => 'none')), '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' => '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'))))), 'style' => array('title' => __('Style', 'fl-builder'), 'sections' => array('style' => array('title' => 'Style', 'fields' => array('background' => array('type' => 'color', 'label' => __('Box Border', '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'))))))));
コード例 #11
0
<?php

/**
 * @class FLTestimonialsModule
 */
class FLTestimonialsModule extends FLBuilderModule
{
    /**
     * @method __construct
     */
    public function __construct()
    {
        parent::__construct(array('name' => __('Testimonials', 'fl-builder'), 'description' => __('An animated tesimonials area.', 'fl-builder'), 'category' => __('Advanced Modules', 'fl-builder')));
        $this->add_css('jquery-bxslider');
        $this->add_css('font-awesome');
        $this->add_js('jquery-bxslider');
    }
}
/**
 * Register the module and its form settings.
 */
FLBuilder::register_module('FLTestimonialsModule', array('general' => array('title' => __('General', 'fl-builder'), 'sections' => array('general' => array('title' => '', 'fields' => array('layout' => array('type' => 'select', 'label' => __('Layout', 'fl-builder'), 'default' => 'compact', 'options' => array('wide' => __('Wide', 'fl-builder'), 'compact' => __('Compact', 'fl-builder')), 'toggle' => array('compact' => array('sections' => array('heading', 'arrow_nav')), 'wide' => array('sections' => array('dot_nav'))), 'help' => __('Wide is for 1 column rows, compact is for multi-column rows.', 'fl-builder')))), 'heading' => array('title' => __('Heading', 'fl-builder'), 'fields' => array('heading' => array('type' => 'text', 'default' => __('Testimonials', 'fl-builder'), 'label' => __('Heading', 'fl-builder'), 'preview' => array('type' => 'text', 'selector' => '.fl-testimonials-heading')), 'heading_size' => array('type' => 'text', 'label' => __('Heading Size', 'fl-builder'), 'default' => '24', 'maxlength' => '3', 'size' => '4', 'description' => 'px'))), 'slider' => array('title' => __('Slider Settings', 'fl-builder'), 'fields' => array('auto_play' => array('type' => 'select', 'label' => __('Auto Play', 'fl-builder'), 'default' => '1', 'options' => array('0' => __('No', 'fl-builder'), '1' => __('Yes', 'fl-builder'))), 'pause' => array('type' => 'text', 'label' => __('Delay', 'fl-builder'), 'default' => '4', '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')))), 'arrow_nav' => array('title' => '', 'fields' => array('arrows' => array('type' => 'select', 'label' => __('Show Arrows', 'fl-builder'), 'default' => '1', 'options' => array('0' => __('No', 'fl-builder'), '1' => __('Yes', 'fl-builder')), 'toggle' => array('1' => array('fields' => array('arrow_color')))), 'arrow_color' => array('type' => 'color', 'label' => __('Arrow Color', 'fl-builder'), 'default' => '999999', 'show_reset' => true, 'preview' => array('type' => 'css', 'selector' => '.fl-testimonials-wrap .fa', 'property' => 'color')))), 'dot_nav' => array('title' => '', 'fields' => array('dots' => array('type' => 'select', 'label' => __('Show Dots', 'fl-builder'), 'default' => '1', 'options' => array('0' => __('No', 'fl-builder'), '1' => __('Yes', 'fl-builder')), 'toggle' => array('1' => array('fields' => array('dot_color')))), 'dot_color' => array('type' => 'color', 'label' => __('Dot Color', 'fl-builder'), 'default' => '999999', 'show_reset' => true))))), 'testimonials' => array('title' => __('Testimonials', 'fl-builder'), 'sections' => array('general' => array('title' => '', 'fields' => array('testimonials' => array('type' => 'form', 'label' => __('Testimonial', 'fl-builder'), 'form' => 'testimonials_form', 'preview_text' => 'testimonial', 'multiple' => true)))))));
/**
 * Register a settings form to use in the "form" field type above.
 */
FLBuilder::register_settings_form('testimonials_form', array('title' => __('Add Testimonial', 'fl-builder'), 'tabs' => array('general' => array('title' => __('General', 'fl-builder'), 'sections' => array('general' => array('title' => '', 'fields' => array('testimonial' => array('type' => 'editor', 'label' => ''))))))));
コード例 #12
0
 *
 * @class CBCustomScoutModule
 */
class CBCustomScoutModule 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' => __('Scout', 'fl-builder'), 'description' => __('Sticky Navbar.', 'fl-builder'), 'category' => __('CB Custom Modules', 'fl-builder'), 'dir' => CB_CUSTOM_MODULE_DIR . 'cb-scout/', 'url' => CB_CUSTOM_MODULE_URL . 'cb-scout/', 'editor_export' => true, 'enabled' => true, 'partial_refresh' => true));
        $this->add_css('font-awesome');
    }
    public function responsive_breakpoint()
    {
        $settings = FLBuilderModel::get_global_settings();
        return $settings->responsive_breakpoint;
    }
}
/**
 * Register the module and its form settings.
 */
FLBuilder::register_module('CBCustomScoutModule', array('links' => array('title' => __('Menu Items', 'fl-builder'), 'sections' => array('links' => array('title' => __('Menu Items', 'fl-builder'), 'fields' => array('cb_scout_form_field_repeater' => array('type' => 'form', 'label' => __('Link', 'fl-builder'), 'form' => 'cb_scout_form_field', 'preview_text' => 'cb_scout_link_text', 'multiple' => true))))), 'general' => array('title' => __('Design', 'fl-builder'), 'sections' => array('general' => array('title' => __('Design', 'fl-builder'), 'fields' => array('cb_scout_elem_bg_color' => array('type' => 'color', 'default' => 'FFFFFF', 'label' => __('Menu Background Color', 'fl-builder'), 'show_reset' => true), 'cb_scout_text_align' => array('type' => 'select', 'label' => __('Menu Items Alignment', 'fl-builder'), 'default' => 'center', 'options' => array('center' => __('Center', 'fl-builder'), 'flex-start' => __('Left Side', 'fl-builder'), 'flex-end' => __('Right Side', 'fl-builder'), 'space-between' => __('Spread Evently', 'fl-builder'))), 'cb_scout_first_active' => array('type' => 'select', 'label' => __('First Element Active', 'fl-builder'), 'default' => 'false', 'help' => __('Apply active styles to first menu item by default.', 'fl-builder'), 'options' => array('false' => __('No', 'fl-builder'), 'true' => __('Yes', 'fl-builder'))), 'cb_scout_responsive' => array('type' => 'select', 'label' => __('Responsive Behavior', 'fl-builder'), 'default' => 'stay', 'help' => __('How to adapt for mobile screens.', 'fl-builder'), 'options' => array('stay' => __('Don\'t Fix To Top', 'fl-builder'), 'icon' => __('Fix To Top, Use Icon to Toggle', 'fl-builder'), 'stack' => __('Fix To Top, Wrap Items', 'fl-builder'))), 'cb_scout_offset' => array('type' => 'text', 'label' => __('Offset from top', 'fl-builder'), 'default' => '0', 'maxlength' => '3', 'size' => '3', 'placeholder' => __('0', 'fl-builder'), 'description' => __('px', 'fl-builder'), 'help' => __('Leave some space from the top of the window when element gets sticky to account for a menu or navigation bar. If Beaver Builder Bar or WP Admin Bar is showing, Scout rests directly below.', 'fl-builder')))), 'colors' => array('title' => __('Colors', 'fl-builder'), 'fields' => array('cb_scout_text_color_main' => array('type' => 'color', 'label' => __('Text Color', 'fl-builder'), 'show_reset' => true), 'cb_scout_text_color_hover' => array('type' => 'color', 'label' => __('Hover Text Color', 'fl-builder'), 'show_reset' => true), 'cb_scout_text_color_active' => array('type' => 'color', 'label' => __('Active Text Color', 'fl-builder'), 'show_reset' => true), 'cb_scout_bg_color_main' => array('type' => 'color', 'label' => __('Background Color', 'fl-builder'), 'show_reset' => true), 'cb_scout_bg_color_hover' => array('type' => 'color', 'label' => __('Hover Background Color', 'fl-builder'), 'show_reset' => true), 'cb_scout_bg_color_active' => array('type' => 'color', 'label' => __('Active Background Color', 'fl-builder'), 'show_reset' => true)))))));
/**
 * Register form
 */
FLBuilder::register_settings_form('cb_scout_form_field', array('title' => __('New Link', 'fl-builder'), 'tabs' => array('image' => array('title' => __('Link', 'fl-builder'), 'sections' => array('general' => array('title' => '', 'fields' => array('cb_scout_link_url' => array('type' => 'link', 'label' => __('Link Field', 'fl-builder')), 'cb_scout_link_text' => array('type' => 'text', 'label' => __('Link Text', 'fl-builder'), 'default' => '', 'maxlength' => '50', 'size' => '45', 'placeholder' => __('Link Text Here', 'fl-builder'), 'class' => 'my-css-class', 'description' => __('', 'fl-builder')))))))));
コード例 #13
0
<?php

FLBuilder::register_settings_form('layout', array('title' => __('Layout Settings', 'fl-builder'), 'tabs' => array('css' => array('title' => __('CSS', 'fl-builder'), 'sections' => array('css' => array('title' => '', 'fields' => array('css' => array('type' => 'code', 'label' => '', 'editor' => 'css', 'rows' => '19', 'preview' => array('type' => 'none')))))), 'js' => array('title' => __('JavaScript', 'fl-builder'), 'sections' => array('js' => array('title' => '', 'fields' => array('js' => array('type' => 'code', 'label' => '', 'editor' => 'javascript', 'rows' => '19', 'preview' => array('type' => 'none')))))))));
コード例 #14
0
<?php

FLBuilder::register_settings_form('col', array('title' => __('Column Settings', 'fl-builder'), 'tabs' => array('style' => array('title' => __('Style', 'fl-builder'), 'sections' => array('general' => array('title' => '', 'fields' => array('size' => array('type' => 'text', 'label' => __('Column Width', 'fl-builder'), 'default' => '', 'description' => '%', 'maxlength' => '5', 'size' => '6', 'preview' => array('type' => 'none')))), 'text' => array('title' => __('Text', 'fl-builder'), 'fields' => array('text_color' => array('type' => 'color', 'label' => __('Color', 'fl-builder'), 'show_reset' => true, 'preview' => array('type' => 'none')), 'link_color' => array('type' => 'color', 'label' => __('Link Color', 'fl-builder'), 'show_reset' => true, 'preview' => array('type' => 'none')), 'hover_color' => array('type' => 'color', 'label' => __('Link Hover Color', 'fl-builder'), 'show_reset' => true, 'preview' => array('type' => 'none')), 'heading_color' => array('type' => 'color', 'label' => __('Heading Color', 'fl-builder'), 'show_reset' => true, 'preview' => array('type' => 'none')))), 'background' => array('title' => __('Background', 'fl-builder'), 'fields' => array('bg_type' => array('type' => 'select', 'label' => __('Type', 'fl-builder'), 'default' => 'color', 'options' => array('none' => _x('None', 'Background type.', 'fl-builder'), 'color' => _x('Color', 'Background type.', 'fl-builder'), 'photo' => _x('Photo', 'Background type.', 'fl-builder')), 'toggle' => array('color' => array('sections' => array('bg_color')), 'photo' => array('sections' => array('bg_photo', 'bg_overlay'))), 'preview' => array('type' => 'none')))), 'bg_color' => array('title' => __('Background Color', 'fl-builder'), 'fields' => array('bg_color' => array('type' => 'color', 'label' => __('Color', 'fl-builder'), 'show_reset' => true, 'preview' => array('type' => 'none')), 'bg_opacity' => array('type' => 'text', 'label' => __('Opacity', 'fl-builder'), 'default' => '100', 'description' => '%', 'maxlength' => '3', 'size' => '5', 'preview' => array('type' => 'none')))), 'bg_photo' => array('title' => __('Background Photo', 'fl-builder'), 'fields' => array('bg_image' => array('type' => 'photo', 'label' => __('Photo', 'fl-builder'), 'preview' => array('type' => 'none')), 'bg_repeat' => array('type' => 'select', 'label' => __('Repeat', 'fl-builder'), 'default' => 'none', 'options' => array('no-repeat' => _x('None', 'Background repeat.', 'fl-builder'), 'repeat' => _x('Tile', 'Background repeat.', 'fl-builder'), 'repeat-x' => _x('Horizontal', 'Background repeat.', 'fl-builder'), 'repeat-y' => _x('Vertical', 'Background repeat.', 'fl-builder')), 'help' => __('Repeat applies to how the image should display in the background. Choosing none will display the image as uploaded. Tile will repeat the image as many times as needed to fill the background horizontally and vertically. You can also specify the image to only repeat horizontally or vertically.', 'fl-builder'), 'preview' => array('type' => 'none')), 'bg_position' => array('type' => 'select', 'label' => __('Position', 'fl-builder'), 'default' => 'center center', 'options' => array('left top' => __('Left Top', 'fl-builder'), 'left center' => __('Left Center', 'fl-builder'), 'left bottom' => __('Left Bottom', 'fl-builder'), 'right top' => __('Right Top', 'fl-builder'), 'right center' => __('Right Center', 'fl-builder'), 'right bottom' => __('Right Bottom', 'fl-builder'), 'center top' => __('Center Top', 'fl-builder'), 'center center' => __('Center', 'fl-builder'), 'center bottom' => __('Center Bottom', 'fl-builder')), 'help' => __('Position will tell the image where it should sit in the background.', 'fl-builder'), 'preview' => array('type' => 'none')), 'bg_attachment' => array('type' => 'select', 'label' => __('Attachment', 'fl-builder'), 'default' => 'scroll', 'options' => array('scroll' => __('Scroll', 'fl-builder'), 'fixed' => __('Fixed', 'fl-builder')), 'help' => __('Attachment will specify how the image reacts when scrolling a page. When scrolling is selected, the image will scroll with page scrolling. This is the default setting. Fixed will allow the image to scroll within the background if fill is selected in the scale setting.', 'fl-builder'), 'preview' => array('type' => 'none')), 'bg_size' => array('type' => 'select', 'label' => __('Scale', 'fl-builder'), 'default' => 'cover', 'options' => array('' => _x('None', 'Background scale.', 'fl-builder'), 'contain' => __('Fit', 'fl-builder'), 'cover' => __('Fill', 'fl-builder')), 'help' => __('Scale applies to how the image should display in the background. You can select either fill or fit to the background.', 'fl-builder'), 'preview' => array('type' => 'none')))), 'bg_overlay' => array('title' => __('Background Overlay', 'fl-builder'), 'fields' => array('bg_overlay_color' => array('type' => 'color', 'label' => __('Overlay Color', 'fl-builder'), 'show_reset' => true, 'preview' => array('type' => 'none')), 'bg_overlay_opacity' => array('type' => 'text', 'label' => __('Overlay Opacity', 'fl-builder'), 'default' => '50', 'description' => '%', 'maxlength' => '3', 'size' => '5', 'preview' => array('type' => 'none')))), 'border' => array('title' => __('Border', 'fl-builder'), 'fields' => array('border_type' => array('type' => 'select', 'label' => __('Type', 'fl-builder'), 'default' => '', 'help' => __('The type of border to use. Double borders must have a width of at least 3px to render properly.', 'fl-builder'), 'options' => array('' => _x('None', 'Border type.', 'fl-builder'), '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')), 'toggle' => array('' => array('fields' => array()), 'solid' => array('fields' => array('border_color', 'border_opacity', 'border_top', 'border_bottom', 'border_left', 'border_right')), 'dashed' => array('fields' => array('border_color', 'border_opacity', 'border_top', 'border_bottom', 'border_left', 'border_right')), 'dotted' => array('fields' => array('border_color', 'border_opacity', 'border_top', 'border_bottom', 'border_left', 'border_right')), 'double' => array('fields' => array('border_color', 'border_opacity', 'border_top', 'border_bottom', 'border_left', 'border_right'))), 'preview' => array('type' => 'none')), 'border_color' => array('type' => 'color', 'label' => __('Color', 'fl-builder'), 'show_reset' => true, 'preview' => array('type' => 'none')), 'border_opacity' => array('type' => 'text', 'label' => __('Opacity', 'fl-builder'), 'default' => '100', 'description' => '%', 'maxlength' => '3', 'size' => '5', 'preview' => array('type' => 'none')), 'border_top' => array('type' => 'text', 'label' => __('Top Width', 'fl-builder'), 'default' => '1', 'description' => 'px', 'maxlength' => '3', 'size' => '5', 'placeholder' => '0', 'preview' => array('type' => 'none')), 'border_bottom' => array('type' => 'text', 'label' => __('Bottom Width', 'fl-builder'), 'default' => '1', 'description' => 'px', 'maxlength' => '3', 'size' => '5', 'placeholder' => '0', 'preview' => array('type' => 'none')), 'border_left' => array('type' => 'text', 'label' => __('Left Width', 'fl-builder'), 'default' => '1', 'description' => 'px', 'maxlength' => '3', 'size' => '5', 'placeholder' => '0', 'preview' => array('type' => 'none')), 'border_right' => array('type' => 'text', 'label' => __('Right Width', 'fl-builder'), 'default' => '1', 'description' => 'px', 'maxlength' => '3', 'size' => '5', 'placeholder' => '0', 'preview' => array('type' => 'none')))))), 'advanced' => array('title' => __('Advanced', 'fl-builder'), 'sections' => array('margins' => array('title' => __('Margins', 'fl-builder'), 'fields' => array('margin_top' => array('type' => 'text', 'label' => __('Top', 'fl-builder'), 'default' => '', 'description' => 'px', 'maxlength' => '4', 'size' => '5', 'placeholder' => '0', 'preview' => array('type' => 'none')), 'margin_bottom' => array('type' => 'text', 'label' => __('Bottom', 'fl-builder'), 'default' => '', 'description' => 'px', 'maxlength' => '4', 'size' => '5', 'placeholder' => '0', 'preview' => array('type' => 'none')), 'margin_left' => array('type' => 'text', 'label' => __('Left', 'fl-builder'), 'default' => '', 'description' => 'px', 'maxlength' => '4', 'size' => '5', 'placeholder' => '0', 'preview' => array('type' => 'none')), 'margin_right' => array('type' => 'text', 'label' => __('Right', 'fl-builder'), 'default' => '', 'description' => 'px', 'maxlength' => '4', 'size' => '5', 'placeholder' => '0', 'preview' => array('type' => 'none')))), 'padding' => array('title' => __('Padding', 'fl-builder'), 'fields' => array('padding_top' => array('type' => 'text', 'label' => __('Top', 'fl-builder'), 'default' => '', 'description' => 'px', 'maxlength' => '4', 'size' => '5', 'placeholder' => '0', 'preview' => array('type' => 'none')), 'padding_bottom' => array('type' => 'text', 'label' => __('Bottom', 'fl-builder'), 'default' => '', 'description' => 'px', 'maxlength' => '4', 'size' => '5', 'placeholder' => '0', 'preview' => array('type' => 'none')), 'padding_left' => array('type' => 'text', 'label' => __('Left', 'fl-builder'), 'default' => '', 'description' => 'px', 'maxlength' => '4', 'size' => '5', 'placeholder' => '0', 'preview' => array('type' => 'none')), 'padding_right' => array('type' => 'text', 'label' => __('Right', 'fl-builder'), 'default' => '', 'description' => 'px', 'maxlength' => '4', 'size' => '5', 'placeholder' => '0', 'preview' => array('type' => 'none')))), 'responsive' => array('title' => __('Responsive Layout', 'fl-builder'), 'fields' => array('responsive_display' => array('type' => 'select', 'label' => __('Display', 'fl-builder'), 'options' => array('' => __('Always', 'fl-builder'), 'desktop' => __('Large Devices Only', 'fl-builder'), 'desktop-medium' => __('Large &amp; Medium Devices Only', 'fl-builder'), 'medium' => __('Medium Devices Only', 'fl-builder'), 'medium-mobile' => __('Medium &amp; Small Devices Only', 'fl-builder'), 'mobile' => __('Small Devices Only', 'fl-builder')), 'help' => __('Choose whether to show or hide this column at different device sizes.', 'fl-builder'), 'preview' => array('type' => 'none')), 'medium_size' => array('type' => 'select', 'label' => __('Medium Device Width', 'fl-builder'), 'help' => __('The width of this column on medium devices such as tablets.', 'fl-builder'), 'options' => array('default' => __('Default', 'fl-builder'), 'custom' => __('Custom', 'fl-builder')), 'toggle' => array('custom' => array('fields' => array('custom_medium_size'))), 'preview' => array('type' => 'none')), 'custom_medium_size' => array('type' => 'text', 'label' => __('Custom Medium Device Width', 'fl-builder'), 'default' => '100', 'description' => '%', 'maxlength' => '5', 'size' => '6', 'preview' => array('type' => 'none')), 'responsive_size' => array('type' => 'select', 'label' => __('Small Device Width', 'fl-builder'), 'help' => __('The width of this column on small devices such as phones.', 'fl-builder'), 'options' => array('default' => __('Default', 'fl-builder'), 'custom' => __('Custom', 'fl-builder')), 'toggle' => array('custom' => array('fields' => array('custom_responsive_size'))), 'preview' => array('type' => 'none')), 'custom_responsive_size' => array('type' => 'text', 'label' => __('Custom Small Device Width', 'fl-builder'), 'default' => '100', 'description' => '%', 'maxlength' => '5', 'size' => '6', 'preview' => array('type' => 'none')))), 'css_selectors' => array('title' => __('CSS Selectors', 'fl-builder'), 'fields' => array('id' => array('type' => 'text', 'label' => __('ID', 'fl-builder'), 'help' => __("A unique ID that will be applied to this column's HTML. Must start with a letter and only contain dashes, underscores, letters or numbers. No spaces.", 'fl-builder'), 'preview' => array('type' => 'none')), 'class' => array('type' => 'text', 'label' => __('CSS Class', 'fl-builder'), 'help' => __("A class that will be applied to this column's HTML. Must start with a letter and only contain dashes, underscores, letters or numbers. Separate multiple classes with spaces.", 'fl-builder'), 'preview' => array('type' => 'none')))))))));
コード例 #15
0
ファイル: tabs.php プロジェクト: onedaylabs/onedaylabs.com
<?php

/**
 * @class FLTabsModule
 */
class FLTabsModule extends FLBuilderModule
{
    /** 
     * @method __construct
     */
    public function __construct()
    {
        parent::__construct(array('name' => __('Tabs', 'fl-builder'), 'description' => __('Display a collection of tabbed content.', 'fl-builder'), 'category' => __('Advanced Modules', 'fl-builder'), 'partial_refresh' => true));
        $this->add_css('font-awesome');
    }
}
/**
 * Register the module and its form settings.
 */
FLBuilder::register_module('FLTabsModule', array('items' => array('title' => __('Items', 'fl-builder'), 'sections' => array('general' => array('title' => '', 'fields' => array('items' => array('type' => 'form', 'label' => __('Item', 'fl-builder'), 'form' => 'items_form', 'preview_text' => 'label', 'multiple' => true))))), 'style' => array('title' => __('Style', 'fl-builder'), 'sections' => array('general' => array('title' => '', 'fields' => array('layout' => array('type' => 'select', 'label' => __('Layout', 'fl-builder'), 'default' => 'horizontal', 'options' => array('horizontal' => __('Horizontal', 'fl-builder'), 'vertical' => __('Vertical', 'fl-builder'))), 'border_color' => array('type' => 'color', 'label' => __('Border Color', 'fl-builder'), 'default' => 'e5e5e5')))))));
/**
 * Register a settings form to use in the "form" field type above.
 */
FLBuilder::register_settings_form('items_form', array('title' => __('Add Item', 'fl-builder'), 'tabs' => array('general' => array('title' => __('General', 'fl-builder'), 'sections' => array('general' => array('title' => '', 'fields' => array('label' => array('type' => 'text', 'label' => __('Label', 'fl-builder')))), 'content' => array('title' => __('Content', 'fl-builder'), 'fields' => array('content' => array('type' => 'editor', 'label' => ''))))))));
コード例 #16
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'))))))));
コード例 #17
0
<?php

FLBuilder::register_settings_form('global', array('title' => __('Global Settings', 'fl-builder'), 'tabs' => array('general' => array('title' => __('General', 'fl-builder'), 'description' => __('<strong>Note</strong>: These settings apply to all posts and pages.', 'fl-builder'), 'sections' => array('page_heading' => array('title' => __('Default Page Heading', 'fl-builder'), 'fields' => array('show_default_heading' => array('type' => 'select', 'label' => _x('Show', 'General settings form field label. Intended meaning: "Show page heading?"', 'fl-builder'), 'default' => '0', 'options' => array('0' => __('No', 'fl-builder'), '1' => __('Yes', 'fl-builder')), 'toggle' => array('0' => array('fields' => array('default_heading_selector'))), 'help' => __('Choosing no will hide the default theme heading for the "Page" post type. You will also be required to enter some basic CSS for this to work if you choose no.', 'fl-builder')), 'default_heading_selector' => array('type' => 'text', 'label' => __('CSS Selector', 'fl-builder'), 'default' => '.fl-post-header', 'help' => __('Enter a CSS selector for the default page heading to hide it.', 'fl-builder')))), 'rows' => array('title' => __('Rows', 'fl-builder'), 'fields' => array('row_margins' => array('type' => 'text', 'label' => __('Margins', 'fl-builder'), 'default' => '0', 'maxlength' => '3', 'size' => '5', 'description' => 'px'), 'row_padding' => array('type' => 'text', 'label' => __('Padding', 'fl-builder'), 'default' => '20', 'maxlength' => '3', 'size' => '5', 'description' => 'px'), 'row_width' => array('type' => 'text', 'label' => __('Max Width', 'fl-builder'), 'default' => '1100', 'maxlength' => '4', 'size' => '5', 'description' => 'px', 'help' => __('All rows will default to this width. You can override this and make a row full width in the settings for each row.', 'fl-builder')), 'row_width_default' => array('type' => 'select', 'label' => __('Default Row Width', 'fl-builder'), 'default' => 'fixed', 'options' => array('fixed' => __('Fixed', 'fl-builder'), 'full' => __('Full Width', 'fl-builder')), 'toggle' => array('full' => array('fields' => array('row_content_width_default')))), 'row_content_width_default' => array('type' => 'select', 'label' => __('Default Row Content Width', 'fl-builder'), 'default' => 'fixed', 'options' => array('fixed' => __('Fixed', 'fl-builder'), 'full' => __('Full Width', 'fl-builder'))))), 'modules' => array('title' => __('Modules', 'fl-builder'), 'fields' => array('module_margins' => array('type' => 'text', 'label' => __('Margins', 'fl-builder'), 'default' => '20', 'maxlength' => '3', 'size' => '5', 'description' => 'px'))), 'responsive' => array('title' => __('Responsive Layout', 'fl-builder'), 'fields' => array('responsive_enabled' => array('type' => 'select', 'label' => _x('Enabled', 'General settings form field label. Intended meaning: "Responsive layout enabled?"', 'fl-builder'), 'default' => '1', 'options' => array('0' => __('No', 'fl-builder'), '1' => __('Yes', 'fl-builder')), 'toggle' => array('1' => array('fields' => array('auto_spacing', 'responsive_breakpoint', 'medium_breakpoint')))), 'auto_spacing' => array('type' => 'select', 'label' => _x('Enable Auto Spacing', 'General settings form field label. Intended meaning: "Enable auto spacing for responsive layouts?"', 'fl-builder'), 'default' => '1', 'options' => array('0' => __('No', 'fl-builder'), '1' => __('Yes', 'fl-builder')), 'help' => __('When auto spacing is enabled, the builder will automatically adjust the margins and padding in your layout once the small device breakpoint is reached. Most users will want to leave this enabled.', 'fl-builder')), 'medium_breakpoint' => array('type' => 'text', 'label' => __('Medium Device Breakpoint', 'fl-builder'), 'default' => '992', 'maxlength' => '4', 'size' => '5', 'description' => 'px', 'help' => __('The browser width at which the layout will adjust for medium devices such as tablets.', 'fl-builder')), 'responsive_breakpoint' => array('type' => 'text', 'label' => __('Small Device Breakpoint', 'fl-builder'), 'default' => '768', 'maxlength' => '4', 'size' => '5', 'description' => 'px', 'help' => __('The browser width at which the layout will adjust for small devices such as phones.', 'fl-builder')))))), 'css' => array('title' => __('CSS', 'fl-builder'), 'sections' => array('css' => array('title' => '', 'fields' => array('css' => array('type' => 'code', 'label' => '', 'editor' => 'css', 'rows' => '19', 'preview' => array('type' => 'none')))))), 'js' => array('title' => __('JavaScript', 'fl-builder'), 'sections' => array('js' => array('title' => '', 'fields' => array('js' => array('type' => 'code', 'label' => '', 'editor' => 'javascript', 'rows' => '19', 'preview' => array('type' => 'none')))))))));