本文整理汇总了PHP中FLBuilder类的典型用法代码示例。如果您正苦于以下问题:PHP FLBuilder类的具体用法?PHP FLBuilder怎么用?PHP FLBuilder使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了FLBuilder类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: insert_layout
/**
* Renders a layout with the provided post ID and enqueues the
* necessary styles and scripts.
*
* @since 1.7
* @param array $attrs The shortcode attributes.
* @return string
*/
public static function insert_layout($attrs)
{
$builder_active = in_the_loop() && FLBuilderModel::is_builder_active();
$post_type = isset($attrs['type']) ? $attrs['type'] : get_post_types();
$args = array('post_type' => $post_type, 'posts_per_page' => -1);
// Build the args array.
if (isset($attrs['id'])) {
$args['orderby'] = 'post__in';
if (is_numeric($attrs['id'])) {
$args['post__in'] = array($attrs['id']);
} else {
$args['post__in'] = explode(',', $attrs['id']);
}
} else {
if (isset($attrs['slug'])) {
$args['orderby'] = 'name';
$args['name'] = $attrs['slug'];
} else {
return;
}
}
// Render and return the layout.
ob_start();
if ($builder_active) {
echo '<div class="fl-builder-shortcode-mask-wrap"><div class="fl-builder-shortcode-mask"></div>';
}
FLBuilder::render_query($args);
if ($builder_active) {
echo '</div>';
}
return ob_get_clean();
}
开发者ID:nullality,项目名称:FEWD-SEA-7,代码行数:40,代码来源:class-fl-builder-shortcodes.php
示例2: render_list_field
/**
* Render markup for the list field.
*
* @since 1.5.4
* @param array $lists List data from the API.
* @param object $settings Saved module settings.
* @return string The markup for the list field.
* @access private
*/
private function render_list_field($lists, $settings)
{
ob_start();
$options = array('' => __('Choose...', 'fl-builder'));
foreach ($lists as $list) {
$options[$list['list_id']] = $list['name'];
}
FLBuilder::render_settings_field('list_id', array('row_class' => 'fl-builder-service-field-row', 'class' => 'fl-builder-service-list-select', 'type' => 'select', 'label' => _x('List', 'An email list from a third party provider.', 'fl-builder'), 'options' => $options, 'preview' => array('type' => 'none')), $settings);
return ob_get_clean();
}
开发者ID:nullality,项目名称:FEWD-SEA-7,代码行数:19,代码来源:class-fl-builder-service-mailpoet.php
示例3: render_img
/**
* Render thumbnail image for mobile.
*
* Get's the post ID and renders the html markup for the featured image
* in the desired cropped size.
*
* @param int $id The post ID.
* @since 1.5.9
* @return void
*/
public function render_img($id = null)
{
// check if image_type is set
if (isset($this->settings->show_image) && $this->settings->show_image == 1) {
// get image source and data
$src = $this->_get_uncropped_url($id);
$photo_data = $this->_get_img_data($id);
// set params
$photo_settings = array('align' => 'center', 'link_type' => 'url', 'crop' => $this->settings->crop, 'photo' => $photo_data, 'photo_src' => $src, 'photo_source' => 'library', 'attributes' => array('data-no-lazy' => 1));
// if link id is provided, set link_url param
if ($id) {
$photo_settings['link_url'] = get_the_permalink($id);
}
// render image
FLBuilder::render_module_html('photo', $photo_settings);
}
}
开发者ID:onedaylabs,项目名称:onedaylabs.com,代码行数:27,代码来源:post-carousel.php
示例4: __construct
<?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'))))))));
开发者ID:spokencode,项目名称:bophillips,代码行数:23,代码来源:pricing-table.php
示例5: array
<?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 & Medium Devices Only', 'fl-builder'), 'medium' => __('Medium Devices Only', 'fl-builder'), 'medium-mobile' => __('Medium & 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')))))))));
开发者ID:karthikakamalanathan,项目名称:wp-cookieLawInfo,代码行数:3,代码来源:column-settings.php
示例6: array
<?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 & Medium Devices Only', 'fl-builder'), 'medium' => __('Medium Devices Only', 'fl-builder'), 'medium-mobile' => __('Medium & 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')))))));
开发者ID:nullality,项目名称:FEWD-SEA-7,代码行数:4,代码来源:module-settings.php
示例7: wma_bb_shortcode_def
$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);
}
开发者ID:KJaddoe,项目名称:CSCMRA-Project,代码行数:31,代码来源:wm_call_to_action.php
示例8: array
<?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 & Medium Devices Only', 'fl-builder'), 'medium' => __('Medium Devices Only', 'fl-builder'), 'medium-mobile' => __('Medium & 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')))))))));
开发者ID:karthikakamalanathan,项目名称:wp-cookieLawInfo,代码行数:4,代码来源:row-settings.php
示例9: render_assets
/**
* Renders the assets for the layout or a node.
*
* @since 1.7
* @access private
* @return array
*/
private static function render_assets()
{
$partial_refresh_data = self::get_partial_refresh_data();
$asset_info = FLBuilderModel::get_asset_info();
$asset_ver = FLBuilderModel::get_asset_version();
$assets = array('js' => '', 'css' => '');
// Render the JS.
if ($partial_refresh_data['is_partial_refresh']) {
if (!class_exists('FLJSMin')) {
include FL_BUILDER_DIR . 'classes/class-fl-jsmin.php';
}
switch ($partial_refresh_data['node']->type) {
case 'row':
$assets['js'] = FLBuilder::render_row_js($partial_refresh_data['node']);
$assets['js'] .= FLBuilder::render_row_modules_js($partial_refresh_data['node']);
break;
case 'column':
$assets['js'] = FLBuilder::render_column_modules_js($partial_refresh_data['node']);
break;
case 'module':
$assets['js'] = FLBuilder::render_module_js($partial_refresh_data['node']);
break;
}
$assets['js'] .= 'FLBuilder._renderLayoutComplete();';
$assets['js'] = FLJSMin::minify($assets['js']);
} else {
$assets['js'] = $asset_info['js_url'] . '?ver=' . $asset_ver;
}
// Render the CSS.
$assets['css'] = $asset_info['css_url'] . '?ver=' . $asset_ver;
// Return the assets.
return $assets;
}
开发者ID:onedaylabs,项目名称:onedaylabs.com,代码行数:40,代码来源:class-fl-builder-ajax-layout.php
示例10: __construct
<?php
class TesseractGoogleMapModule extends FLBuilderModule
{
/**
* Constructor function for the module. You must pass the
* name, description, dir, url and enabled in an array to the parent class.
*
* @method __construct
*/
public function __construct()
{
parent::__construct(array('name' => __('Map', 'fl-builder'), 'description' => __('Google Map', 'fl-builder'), 'category' => __('Advanced Modules', 'fl-builder'), 'dir' => TESSERACT_BB_MODULE_DIR . 'map/', 'url' => TESSERACT_BB_MODULE_URL . 'map/', 'enabled' => true));
if (!defined('GOOGLE_MAPS_API_KEY')) {
define('GOOGLE_MAPS_API_KEY', 'AIzaSyDdg6IMS4WeWJRORd0wU_gcE-kFOUKt4zE');
}
$this->add_js('google-maps-javascript-api', 'https://maps.googleapis.com/maps/api/js?key=' . GOOGLE_MAPS_API_KEY, array('jquery'), '3.0', true);
}
}
FLBuilder::register_module('TesseractGoogleMapModule', array('tesseract-map-module' => array('title' => __('General', 'fl-builder'), 'sections' => array('display' => array('title' => __('Display', 'fl-builder'), 'fields' => array('fullwidth' => array('type' => 'select', 'label' => __('Full width map?', 'fl-builder'), 'default' => 'yes', 'options' => array('yes' => __('Yes', 'fl-builder'), 'no' => __('No', 'fl-builder')), 'toggle' => array('no' => array('fields' => array('width', 'height', 'float', 'query')), 'yes' => array('fields' => array('height', 'query')))), 'width' => array('type' => 'text', 'label' => __('Width', 'fl-builder'), 'description' => __('Width in pixels', 'fl-builder'), 'default' => '600'), 'height' => array('type' => 'text', 'label' => __('Height', 'fl-builder'), 'description' => __('Height in pixels', 'fl-builder'), 'default' => '400'), 'float' => array('type' => 'select', 'label' => __('Float', 'fl-builder'), 'default' => __('none', 'fl-builder'), 'options' => array('none' => 'None', 'left' => 'Left', 'right' => 'Right')), 'zoom' => array('type' => 'select', 'label' => __('Zoom Level', 'fl-builder'), 'default' => '8', 'options' => range(0, 20), 'preview' => array('type' => 'none')), 'lat' => array('type' => 'text', 'hidden' => true), 'lng' => array('type' => 'text', 'hidden' => true), 'query' => array('type' => 'text', 'label' => __('Search location', 'fl-builder'), 'description' => __('Enter an address. eg. 123 Main st, Los Angeles, CA', 'fl-builder'), 'default' => '', 'preview' => array('type' => 'none'))))))));
开发者ID:Nirajjcu,项目名称:minime3d,代码行数:20,代码来源:map-module.php
示例11: get_class
// Make sure we have a widget.
if (!isset($settings->widget) || !isset($wp_widget_factory->widgets[$settings->widget])) {
return $settings;
}
// Get the widget instance.
$factory = $wp_widget_factory->widgets[$settings->widget];
$class = get_class($factory);
$instance = new $class($factory->id_base, $factory->name, $factory->widget_options);
// Get the widget settings.
$settings_key = 'widget-' . $instance->id_base;
$widget_settings = array();
if (isset($settings->{$settings_key})) {
$widget_settings = (array) $settings->{$settings_key};
}
// Run the widget update method.
$widget_settings = $instance->update($widget_settings, array());
// Save the widget settings as an object.
if (is_array($widget_settings)) {
$settings->{$settings_key} = (object) $widget_settings;
}
// Delete the WordPress cache for this widget.
w
|
请发表评论