This commit is contained in:
nguyen dung
2022-02-18 16:43:41 +07:00
commit 39b8cb3612
4470 changed files with 1378320 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
<?php
return array(
'type' => 'group',
'heading' => 'Advanced',
'options' => array(
'class' => array(
'type' => 'textfield',
'heading' => 'Class',
'param_name' => 'class',
'default' => '',
),
'visibility' => require( __DIR__ . '/visibility.php' ),
),
);

View File

@@ -0,0 +1,80 @@
<?php
return array(
'type' => 'group',
'heading' => __( 'Background' ),
'options' => array(
'bg' => array(
'type' => 'image',
'heading' => __( 'Image' ),
'thumb_size' => 'bg_size',
'bg_position' => 'bg_pos',
),
'bg_size'=> array(
'type' => 'select',
'heading' => 'Size',
'default' => 'large',
'conditions' => 'bg',
'options' => array(
'original' => 'Original',
'large' => 'Large',
'medium' => 'Medium',
'thumbnail' => 'Thumbnail',
)
),
'bg_color' => array(
'type' => 'colorpicker',
'heading' => __('Color'),
'format' => 'rgb',
'position' => 'bottom right',
'helpers' => require( __DIR__ . '/../helpers/colors.php' ),
),
'bg_overlay' => array(
'type' => 'colorpicker',
'heading' => __('Overlay'),
'responsive' => true,
'alpha' => true,
'format' => 'rgb',
'position' => 'bottom right',
'helpers' => require( __DIR__ . '/../helpers/colors-overlay.php' ),
),
'bg_pos' => array(
'conditions' => 'bg',
'type' => 'textfield',
'heading' => __('Position'),
),
'hover' => array(
'conditions' => 'bg',
'type' => 'select',
'heading' => 'Hover',
'options' => require( __DIR__ . '/../values/image-hover.php' ),
),
'hover_alt' => array(
'conditions' => 'hover',
'type' => 'select',
'heading' => 'Hover Alt',
'options' => require( __DIR__ . '/../values/image-hover.php' ),
),
'parallax' => array(
'conditions' => 'bg',
'type' => 'slider',
'heading' => 'Parallax',
'unit' => '+',
'default' => 0,
'max' => 10,
'min' => 0,
),
'effect' => array(
'type' => 'select',
'heading' => 'Effects',
'options' => array(
'' => 'No effect',
'snow' => 'Snow',
'confetti' => 'Confetti',
'sliding-glass' => 'Sliding Glass',
'sparkle' => 'Sparkle',
'rain' => 'Rain',
),
),
),
);

View File

@@ -0,0 +1,62 @@
<?php
// Border Control
return array(
'type' => 'group',
'heading' => __( 'Border' ),
'options' => array(
'border' => array(
'type' => 'margins',
'heading' => 'Width',
'full_width' => true,
'min' => 0,
'max' => 100,
'step' => 1,
),
'border_margin' => array(
'type' => 'margins',
'heading' => 'Margin',
'conditions' => 'border',
'full_width' => true,
'min' => -100,
'max' => 100,
'step' => 1,
),
'border_style' => array(
'type' => 'radio-buttons',
'heading' => 'Style',
'full_width' => true,
'conditions' => 'border',
'default' => '',
'options' => array(
'' => array( 'title' => 'Solid'),
'dashed' => array( 'title' => 'Dashed'),
'dotted' => array( 'title' => 'Dotted'),
),
),
'border_radius' => array(
'type' => 'slider',
'heading' => 'Radius',
'conditions' => 'border',
'unit' => 'px',
'min' => 0,
'max' => 100,
'step' => 1,
),
'border_color' => array(
'type' => 'colorpicker',
'heading' => __('Color'),
'conditions' => 'border',
'responsive' => true,
'alpha' => true,
'format' => 'rgb',
'position' => 'bottom right',
),
'border_hover' => array(
'type' => 'select',
'heading' => __( 'Hover' ),
'default' => '',
'conditions' => 'border',
'options' => require( __DIR__ . '/../values/text-hover.php' ),
),
),
);

View File

@@ -0,0 +1,198 @@
<?php
if(!$default_text_align) $default_text_align = 'left';
return array(
//
// Image options
//
'image_options' => array(
'type' => 'group',
'heading' => __( 'Image' ),
'options' => array(
'image_height' => array(
'type' => 'scrubfield',
'heading' => __('Height'),
'conditions' => 'type !== "grid"',
'default' => '',
'placeholder' => __('Auto'),
'min' => 0,
'max' => 1000,
'step' => 1,
'helpers' => require( __DIR__ . '/../helpers/image-heights.php' ),
'on_change' => array(
'selector' => '.box-image-inner',
'style' => 'padding-top: {{ value }}'
)
),
'image_width' => array(
'type' => 'slider',
'heading' => __( 'Width' ),
'unit' => '%',
'default' => 100,
'max' => 100,
'min' => 0,
'on_change' => array(
'selector' => '.box-image',
'style' => 'width: {{ value }}%'
)
),
'image_radius' => array(
'type' => 'slider',
'heading' => __( 'Radius' ),
'unit' => '%',
'default' => 0,
'max' => 100,
'min' => 0,
'on_change' => array(
'selector' => '.box-image-inner',
'style' => 'border-radius: {{ value }}%'
)
),
'image_size' => array(
'type' => 'select',
'heading' => __( 'Size' ),
'default' => '',
'options' => array(
'' => 'Default',
'large' => 'Large',
'medium' => 'Medium',
'thumbnail' => 'Thumbnail',
'original' => 'Original',
)
),
'image_overlay' => array(
'type' => 'colorpicker',
'heading' => __( 'Overlay' ),
'default' => '',
'alpha' => true,
'format' => 'rgb',
'position' => 'bottom right',
'on_change' => array(
'selector' => '.overlay',
'style' => 'background-color: {{ value }}'
)
),
'image_hover' => array(
'type' => 'select',
'heading' => __( 'Hover' ),
'default' => '',
'options' => require( __DIR__ . '/../values/image-hover.php' ),
'on_change' => array(
'selector' => '.image-cover',
'class' => 'image-{{ value }}'
)
),
'image_hover_alt' => array(
'type' => 'select',
'heading' => __( 'Hover Alt' ),
'default' => '',
'conditions' => 'image_hover',
'options' => require( __DIR__ . '/../values/image-hover.php' ),
'on_change' => array(
'selector' => '.image-cover',
'class' => 'image-{{ value }}'
)
),
),
),
//
// Text options
//
'text_options' => array(
'type' => 'group',
'heading' => __( 'Text' ),
'options' => array(
'text_pos' => array(
'type' => 'select',
'heading' => __( 'Position' ),
'conditions' => 'style === "vertical" || style === "shade" || style === "overlay"',
'default' => 'bottom',
'options' => require( __DIR__ . '/../values/align-v.php' ),
'on_change' => array(
'selector' => '.box',
'class' => 'box-text-{{ value }}'
)
),
'text_align' => array(
'type' => 'radio-buttons',
'heading' => __( 'Align' ),
'default' => $default_text_align,
'options' => require( __DIR__ . '/../values/align-radios.php' ),
'on_change' => array(
'selector' => '.box-text',
'class' => 'text-{{ value }}'
)
),
'text_size' => array(
'type' => 'radio-buttons',
'heading' => __( 'Size' ),
'default' => 'medium',
'options' => require( __DIR__ . '/../values/text-sizes.php' ),
'on_change' => array(
'selector' => '.box-text',
'class' => 'is-{{ value }}'
)
),
'text_hover' => array(
'type' => 'select',
'heading' => __( 'Hover' ),
'default' => '',
'options' => require( __DIR__ . '/../values/text-hover.php' ),
),
'text_bg' => array(
'type' => 'colorpicker',
'heading' => __( 'Bg Color' ),
'default' => '',
'alpha' => true,
'format' => 'rgb',
'position' => 'bottom right',
'on_change' => array(
'selector' => '.box-text',
'style' => 'background-color:{{ value }}'
)
),
'text_color' => array(
'type' => 'radio-buttons',
'heading' => __( 'Color' ),
'conditions' => 'style !== "shade" && style !== "overlay"',
'default' => 'light',
'options' => array(
'light' => array( 'title' => 'Dark' ),
'dark' => array( 'title' => 'Light' ),
),
),
'text_padding' => array(
'type' => 'margins',
'heading' => __( 'Padding' ),
'value' => '',
'full_width' => true,
'min' => 0,
'max' => 100,
'step' => 1,
'on_change' => array(
'selector' => '.box-text',
'style' => 'padding: {{ value }}'
)
),
),
),
'advanced_options' => require( __DIR__ . '/../commons/advanced.php')
);

View File

@@ -0,0 +1,25 @@
<?php
return array(
'type' => 'group',
'heading' => __( 'Link' ),
'options' => array(
'link' => array(
'type' => 'textfield',
'heading' => __('Link'),
),
'target' => array(
'type' => 'select',
'heading' => __( 'Target' ),
'default' => '',
'options' => array(
'' => 'Same window',
'_blank' => 'New window',
)
),
'rel' => array(
'type' => 'textfield',
'heading' => __( 'Rel' ),
),
)
);

View File

@@ -0,0 +1,29 @@
<?php
return array(
'type' => 'group',
'heading' => __( 'Position' ),
'require' => array('ux_banner'),
'options' => array(
'position_x' => array(
'type' => 'slider',
'heading' => __( 'Horizontal' ),
'save_when_default' => true,
'responsive' => true,
'default' => 50,
'min' => 0,
'max' => 100,
'step' => 5
),
'position_y' => array(
'type' => 'slider',
'heading' => __( 'Vertical' ),
'save_when_default' => true,
'responsive' => true,
'default' => 50,
'min' => 0,
'max' => 100,
'step' => 5
),
),
);

View File

@@ -0,0 +1,78 @@
<?php
if(!$repeater_col_spacing) $repeater_col_spacing = 'normal';
if(!$repeater_columns) $repeater_columns = '4';
if(!$repeater_type) $repeater_type = 'slider';
return array(
'type' => 'group',
'heading' => __( 'Layout' ),
'options' => array(
'type' => array(
'type' => 'select',
'heading' => 'Type',
'default' => $repeater_type,
'options' => require( __DIR__ . '/../values/row-layouts.php' )
),
'grid' => array(
'type' => 'select',
'heading' => 'Grid Layout',
'conditions' => 'type === "grid"',
'default' => '1',
'options' => require( __DIR__ . '/../values/grids.php' )
),
'grid_height' => array(
'type' => 'textfield',
'heading' => __( 'Grid Height' ),
'conditions' => 'type === "grid"',
'default' => '600px',
'responsive' => true,
),
'width' => array(
'type' => 'select',
'heading' => 'Width',
'conditions' => 'type !== "slider-full"',
'default' => '',
'options' => array(
'' => 'Container',
'full-width' => 'Full Width',
)
),
'col_spacing' => array(
'type' => 'select',
'heading' => 'Column Spacing',
'conditions' => 'type !== "slider-full"',
'default' => $repeater_col_spacing,
'options' => require( __DIR__ . '/../values/col-spacing.php' )
),
'columns' => array(
'type' => 'slider',
'heading' => 'Columns',
'conditions' => 'type !== "grid" && type !== "slider-full"',
'default' => $repeater_columns,
'responsive' => true,
'max' => '8',
'min' => '1',
),
'depth' => array(
'type' => 'slider',
'heading' => __( 'Depth' ),
'default' => '0',
'max' => '5',
'min' => '0',
),
'depth_hover' => array(
'type' => 'slider',
'heading' => __( 'Depth Hover' ),
'default' => '0',
'max' => '5',
'min' => '0',
),
'animate' => array(
'type' => 'select',
'heading' => __( 'Animate' ),
'default' => 'none',
'options' => require( __DIR__ . '/../values/animate.php' ),
),
),
);

View File

@@ -0,0 +1,83 @@
<?php
if ( ! isset( $repeater_posts ) ) $repeater_posts = 'posts';
if ( ! isset( $repeater_post_type ) ) $repeater_post_type = 'post';
if ( ! isset( $repeater_post_cat ) ) $repeater_post_cat = 'category';
return array(
'type' => 'group',
'heading' => __( 'Posts' ),
'options' => array(
'ids' => array(
'type' => 'select',
'heading' => 'Custom Posts',
'param_name' => 'ids',
'config' => array(
'multiple' => true,
'placeholder' => 'Select..',
'postSelect' => array(
'post_type' => array($repeater_post_type)
),
)
),
'cat' => array(
'type' => 'select',
'heading' => 'Category',
'param_name' => 'cat',
'conditions' => 'ids == ""',
'default' => '',
'config' => array(
'multiple' => true,
'placeholder' => 'Select...',
'termSelect' => array(
'post_type' => $repeater_post_cat,
'taxonomies' => $repeater_post_cat
),
)
),
$repeater_posts => array(
'type' => 'textfield',
'heading' => 'Total Posts',
'conditions' => 'ids == ""',
'default' => '8',
),
'offset' => array(
'type' => 'textfield',
'heading' => 'Offset',
'conditions' => 'ids == ""',
'default' => '',
),
'orderby' => array(
'type' => 'select',
'heading' => 'Order by',
'conditions' => 'ids == ""',
'default' => 'date',
'options' => array(
'ID' => 'ID',
'title' => 'Title',
'name' => 'Name',
'date' => 'Published Date',
'modified' => 'Modified Date',
'rand' => 'Random',
'comment_count' => 'Comment Count',
'menu_order' => 'Menu Order',
),
),
'order' => array(
'type' => 'select',
'heading' => 'Order',
'conditions' => 'ids == ""',
'default' => 'DESC',
'options' => array(
'ASC' => 'ASC',
'DESC' => 'DESC',
),
),
)
);

View File

@@ -0,0 +1,65 @@
<?php
return array(
'type' => 'group',
'heading' => __( 'Slider' ),
'conditions' => 'type === "slider" || type === "slider-full"',
'options' => array(
'slider_nav_style' => array(
'type' => 'select',
'heading' => "Nav Style",
'default' => 'reveal',
'options' => require( __DIR__ . '/../values/slider-nav-styles.php' )
),
'slider_nav_color' => array(
'type' => 'select',
'heading' => "Nav Color",
'default' => '',
'options' => array(
'light' => 'Light',
'' => 'Dark',
)
),
'slider_nav_position' => array(
'type' => 'select',
'heading' => "Nav Position",
'conditions' => 'slider_nav_style !== "reveal"',
'default' => 'inside',
'options' => array(
'inside' => 'Inside',
'outside' => 'Outside',
)
),
'slider_bullets' => array(
'type' => 'select',
'heading' => "Bullets",
'default' => '',
'options' => array(
'' => 'Disable',
'true' => 'Enable',
)
),
'auto_slide' => array(
'type' => 'select',
'heading' => 'Auto Slide',
'default' => '',
'options' => array(
'' => 'Disabled',
'2000' => '2 sec.',
'3000' => '3 sec.',
'4000' => '4 sec.',
'5000' => '5 sec.',
'6000' => '6 sec.',
'7000' => '7 sec.',
)
),
'infinitive' => array(
'type' => 'select',
'heading' => "Infinitive",
'default' => '',
'options' => array(
'false' => 'Disable',
'' => 'Enable',
),
),
)
);

View File

@@ -0,0 +1,107 @@
<?php
/**
* Shape divider options.
*
* @package Flatsome
*/
return array(
'type' => 'group',
'heading' => 'Shape divider',
'options' => array(
'divider_top' => array(
'type' => 'select',
'heading' => 'Divider top',
'full_width' => true,
'default' => '',
'options' => require __DIR__ . '/../values/dividers.php',
),
'divider_top_height' => array(
'type' => 'scrubfield',
'heading' => 'Height',
'conditions' => 'divider_top != ""',
'responsive' => true,
'default' => '150px',
'min' => '0',
),
'divider_top_width' => array(
'type' => 'slider',
'heading' => 'Width',
'conditions' => 'divider_top != ""',
'responsive' => true,
'default' => '100',
'min' => '100',
'max' => '300',
'unit' => '%',
),
'divider_top_fill' => array(
'type' => 'colorpicker',
'heading' => 'Fill',
'conditions' => 'divider_top != ""',
'default' => '',
'format' => 'rgb',
'alpha' => true,
'position' => 'bottom right',
'helpers' => require __DIR__ . '/../helpers/colors.php',
),
'divider_top_flip' => array(
'type' => 'checkbox',
'heading' => 'Flip Y',
'conditions' => 'divider_top != ""',
'default' => 'false',
),
'divider_top_to_front' => array(
'type' => 'checkbox',
'heading' => 'To front',
'conditions' => 'divider_top != ""',
'default' => 'false',
),
'divider' => array(
'type' => 'select',
'heading' => 'Divider bottom',
'full_width' => true,
'default' => '',
'options' => require __DIR__ . '/../values/dividers.php',
),
'divider_height' => array(
'type' => 'scrubfield',
'heading' => 'Height',
'conditions' => 'divider != ""',
'responsive' => true,
'default' => '150px',
'min' => '0',
),
'divider_width' => array(
'type' => 'slider',
'heading' => 'Width',
'conditions' => 'divider != ""',
'responsive' => true,
'default' => '100',
'min' => '100',
'max' => '300',
'unit' => '%',
),
'divider_fill' => array(
'type' => 'colorpicker',
'heading' => 'Fill',
'conditions' => 'divider != ""',
'default' => '',
'format' => 'rgb',
'alpha' => true,
'position' => 'bottom right',
'helpers' => require __DIR__ . '/../helpers/colors.php',
),
'divider_flip' => array(
'type' => 'checkbox',
'heading' => 'Flip Y',
'conditions' => 'divider != ""',
'default' => 'false',
),
'divider_to_front' => array(
'type' => 'checkbox',
'heading' => 'To front',
'conditions' => 'divider != ""',
'default' => 'false',
),
),
);

View File

@@ -0,0 +1,21 @@
<?php
return array(
'type' => 'group',
'heading' => __( 'Slide' ),
'require' => 'ux_slider',
'options' => array(
'slide_effect' => array(
'type' => 'select',
'heading' => 'Slide Effect',
'options' => array(
'' => 'None',
'fade-in' => 'Fade In',
'zoom-in' => 'Zoom In',
'zoom-out' => 'Zoom Out',
'fade-in-fast' => 'Fade In Fast',
'zoom-in-fast' => 'Zoom In Fast',
'zoom-out-fast' => 'Zoom Out Fast',
),
),
),
);

View File

@@ -0,0 +1,7 @@
<?php
return array(
'type' => 'textfield',
'heading' => 'Video MP4',
'description' => 'Nice tool to convert videos: https://cloudconvert.org/',
);

View File

@@ -0,0 +1,56 @@
<?php
return array(
'type' => 'group',
'heading' => 'Typography',
'options' => array(
'font_size' => array(
'type' => 'slider',
'heading' => __( 'Font size', 'flatsome' ),
'responsive' => true,
'unit' => 'rem',
'max' => 4,
'min' => 0.75,
'step' => 0.05,
),
'line_height' => array(
'type' => 'slider',
'heading' => __( 'Line height', 'flatsome' ),
'responsive' => true,
'max' => 3,
'min' => 0.75,
'step' => 0.05,
),
'text_align' => array(
'type' => 'radio-buttons',
'heading' => __( 'Text align', 'flatsome' ),
'responsive' => true,
'default' => '',
'options' => array(
'' => array(
'title' => 'None',
'icon' => 'dashicons-no-alt',
),
'left' => array(
'title' => 'Left',
'icon' => 'dashicons-editor-alignleft',
),
'center' => array(
'title' => 'Center',
'icon' => 'dashicons-editor-aligncenter',
),
'right' => array(
'title' => 'Right',
'icon' => 'dashicons-editor-alignright',
),
),
),
'text_color' => array(
'type' => 'colorpicker',
'heading' => __( 'Text color', 'flatsome' ),
'format' => 'rgb',
'position' => 'bottom right',
'helpers' => require( __DIR__ . '/../helpers/colors.php' ),
),
),
);

View File

@@ -0,0 +1,60 @@
<?php
return array(
'type' => 'group',
'heading' => __( 'Video', 'ux-builder' ),
'collapsed' => true,
'options' => array(
'youtube' => array(
'type' => 'textfield',
'heading' => 'YouTube',
'description' => 'Add a youtube ID here. F.ex 9d8wWcJLnFI',
),
'video_mp4' => array(
'type' => 'textfield',
'heading' => 'Video MP4',
'description' => 'Nice tool to convert videos: https://cloudconvert.org/',
),
'video_ogg' => array(
'type' => 'textfield',
'heading' => 'Video OGG ',
),
'video_webm' => array(
'type' => 'textfield',
'heading' => 'Video WEBM',
),
'video_sound' => array(
'type' => 'select',
'heading' => 'Sound',
'default' => 'false',
'options' => array(
'true' => 'Enable',
'false' => 'Disable',
),
),
'video_loop' => array(
'type' => 'select',
'heading' => 'Loop',
'default' => 'true',
'options' => array(
'true' => 'Loop',
'false' => 'No loop',
),
),
'video_visibility' => array(
'type' => 'select',
'heading' => 'Visibility',
'default' => 'hide-for-medium',
'options' => array(
'visible' => 'Visible',
'hidden' => 'Hidden',
'hide-for-medium' => 'Only for Desktop',
'show-for-small' => 'Only for Mobile',
'show-for-medium hide-for-small' => 'Only for Tablet',
'show-for-medium' => 'Hide for Desktop',
'hide-for-small' => 'Hide for Mobile',
),
),
),
);

View File

@@ -0,0 +1,16 @@
<?php
return array(
'type' => 'select',
'heading' => 'Visibility',
'default' => '',
'options' => array(
'' => 'Visible',
'hidden' => 'Hidden',
'hide-for-medium' => 'Only for Desktop',
'show-for-small' => 'Only for Mobile',
'show-for-medium hide-for-small' => 'Only for Tablet',
'show-for-medium' => 'Hide for Desktop',
'hide-for-small' => 'Hide for Mobile',
),
);