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,210 @@
<?php
/**
* Style & Colors
*/
Flatsome_Option::add_section( 'colors', array(
'title' => __( 'Colors', 'flatsome-admin' ),
'panel' => 'style',
) );
Flatsome_Option::add_field( '', array(
'type' => 'custom',
'settings' => 'custom_title_colors_main',
'label' => __( '', 'flatsome-admin' ),
'section' => 'colors',
'default' => '<div class="options-title-divider">Main Colors</div>',
) );
Flatsome_Option::add_field( 'option', array(
'type' => 'color',
'settings' => 'color_primary',
'label' => __( 'Primary Color', 'flatsome-admin' ),
'description' => __( 'Change primary color.', 'flatsome-admin' ),
'section' => 'colors',
'default' => Flatsome_Default::COLOR_PRIMARY,
'transport' => $transport,
) );
Flatsome_Option::add_field( 'option', array(
'type' => 'color',
'settings' => 'color_secondary',
'transport' => $transport,
'label' => __( 'Secondary Color', 'flatsome-admin' ),
'description' => __( 'Change secondary color.', 'flatsome-admin' ),
'default' => Flatsome_Default::COLOR_SECONDARY,
'section' => 'colors',
) );
Flatsome_Option::add_field( 'option', array(
'type' => 'color',
'settings' => 'color_success',
'transport' => $transport,
'label' => __( 'Success Color', 'flatsome-admin' ),
'description' => __( 'Change the success color. Used for global success messages.', 'flatsome-admin' ),
'section' => 'colors',
'default' => Flatsome_Default::COLOR_SUCCESS,
) );
Flatsome_Option::add_field( 'option', array(
'type' => 'color',
'settings' => 'color_alert',
'transport' => $transport,
'label' => __( 'Alert Color', 'flatsome-admin' ),
'description' => __( 'Change the alert color. Used for global error messages etc.', 'flatsome-admin' ),
'section' => 'colors',
'default' => Flatsome_Default::COLOR_ALERT,
) );
Flatsome_Option::add_field( '', array(
'type' => 'custom',
'settings' => 'custom_title_color_type',
'label' => __( '', 'flatsome-admin' ),
'section' => 'colors',
'default' => '<div class="options-title-divider">Type</div>',
) );
Flatsome_Option::add_field( 'option', array(
'type' => 'color',
'settings' => 'color_texts',
'label' => __( 'Base Color', 'flatsome-admin' ),
'description' => __( 'Used for all normal texts.', 'flatsome-admin' ),
'section' => 'colors',
'default' => '#777',
'transport' => $transport,
) );
Flatsome_Option::add_field( 'option', array(
'type' => 'color',
'settings' => 'type_headings_color',
'label' => __( 'Headline Color', 'flatsome-admin' ),
'description' => __( 'Used for all headlines on white backgrounds. (H1, H2, H3 etc.)', 'flatsome-admin' ),
'section' => 'colors',
'default' => '#555',
'transport' => $transport,
) );
Flatsome_Option::add_field( 'option', array(
'type' => 'color-alpha',
'settings' => 'color_divider',
'label' => __( 'Divider Color', 'flatsome-admin' ),
'description' => __( 'Used for dividers.', 'flatsome-admin' ),
'section' => 'colors',
) );
Flatsome_Option::add_field( '', array(
'type' => 'custom',
'settings' => 'custom_title_type_links',
'label' => __( '', 'flatsome-admin' ),
'section' => 'colors',
'default' => '<div class="options-title-divider">Links</div>',
) );
Flatsome_Option::add_field( 'option', array(
'type' => 'color',
'settings' => 'color_links',
'label' => __( 'Link Colors', 'flatsome-admin' ),
'section' => 'colors',
'default' => '#4e657b',
'transport' => $transport,
) );
Flatsome_Option::add_field( 'option', array(
'type' => 'color',
'settings' => 'color_links_hover',
'label' => __( 'Link Colors :hover', 'flatsome-admin' ),
'section' => 'colors',
'default' => '#111',
'transport' => $transport,
) );
Flatsome_Option::add_field( 'option', array(
'type' => 'color',
'settings' => 'color_widget_links',
'label' => __( 'Widget Link Colors', 'flatsome-admin' ),
'section' => 'colors',
'default' => '',
'transport' => $transport,
) );
Flatsome_Option::add_field( 'option', array(
'type' => 'color',
'settings' => 'color_widget_links_hover',
'label' => __( 'Widget Link Colors :hover', 'flatsome-admin' ),
'section' => 'colors',
'default' => '',
'transport' => $transport,
) );
if ( is_woocommerce_activated() ) {
Flatsome_Option::add_field( '', array(
'type' => 'custom',
'settings' => 'custom_title_colors_shop',
'label' => __( '', 'flatsome-admin' ),
'section' => 'colors',
'default' => '<div class="options-title-divider">Shop Colors</div>',
) );
Flatsome_Option::add_field( 'option', array(
'type' => 'color',
'settings' => 'color_checkout',
'label' => __( 'Add to cart / Checkout buttons', 'flatsome-admin' ),
'description' => __( 'Change color for checkout buttons. Default is Secondary color', 'flatsome-admin' ),
'section' => 'colors',
'transport' => $transport,
) );
Flatsome_Option::add_field( 'option', array(
'type' => 'color',
'settings' => 'color_sale',
'label' => __( 'Sale bubble', 'flatsome-admin' ),
'description' => __( 'Change color of sale bubble. Default is Secondary color', 'flatsome-admin' ),
'section' => 'colors',
'transport' => $transport,
) );
Flatsome_Option::add_field( 'option', array(
'type' => 'color',
'settings' => 'color_new_bubble_auto',
'label' => __( 'New bubble (auto)', 'flatsome-admin' ),
'description' => __( 'Change color of the automatic "New" bubble.', 'flatsome-admin' ),
'section' => 'colors',
'transport' => $transport,
) );
Flatsome_Option::add_field( 'option', array(
'type' => 'color',
'settings' => 'color_new_bubble',
'label' => __( 'Custom bubble', 'flatsome-admin' ),
'description' => __( 'Change color of the custom bubble.', 'flatsome-admin' ),
'section' => 'colors',
'transport' => $transport,
) );
Flatsome_Option::add_field( 'option', array(
'type' => 'color',
'settings' => 'color_review',
'label' => __( 'Review Stars', 'flatsome-admin' ),
'description' => __( 'Change color of review stars', 'flatsome-admin' ),
'section' => 'colors',
'transport' => $transport,
) );
Flatsome_Option::add_field( 'option', array(
'type' => 'color',
'settings' => 'color_regular_price',
'label' => __( 'Regular Price', 'flatsome-admin' ),
'description' => __( 'Change color of the regular price of an on sale product.', 'flatsome-admin' ),
'section' => 'colors',
'transport' => $transport,
) );
Flatsome_Option::add_field( 'option', array(
'type' => 'color',
'settings' => 'color_sale_price',
'label' => __( 'Sale Price', 'flatsome-admin' ),
'description' => __( 'Change color of the sale price.', 'flatsome-admin' ),
'section' => 'colors',
'transport' => $transport,
) );
}

View File

@@ -0,0 +1,48 @@
<?php
Flatsome_Option::add_panel( 'style', array(
'title' => __( 'Style', 'flatsome-admin' ),
) );
Flatsome_Option::add_section( 'custom-css', array(
'title' => __( 'Custom CSS', 'flatsome-admin' ),
'panel' => 'style',
) );
Flatsome_Option::add_field( 'option', array(
'type' => 'code',
'settings' => 'html_custom_css',
'label' => __( 'Custom CSS', 'flatsome-admin' ),
'section' => 'custom-css',
'transport' => $transport,
'placeholder' => '.add-css-here{}',
'choices' => array(
'language' => 'css',
),
));
Flatsome_Option::add_field( 'option', array(
'type' => 'code',
'settings' => 'html_custom_css_tablet',
'label' => __( 'Custom Tablet CSS', 'flatsome-admin' ),
'section' => 'custom-css',
'default' => '',
'placeholder' => '.add-css-here{}',
'transport' => $transport,
'choices' => array(
'language' => 'css',
),
));
Flatsome_Option::add_field( 'option', array(
'type' => 'code',
'settings' => 'html_custom_css_mobile',
'label' => __( 'Custom Mobile CSS', 'flatsome-admin' ),
'section' => 'custom-css',
'default' => '',
'placeholder' => '.add-css-here{}',
'transport' => $transport,
'choices' => array(
'language' => 'css',
),
));

View File

@@ -0,0 +1,17 @@
<?php
Flatsome_Option::add_section( 'global-styles', array(
'title' => __( 'Global Styles', 'flatsome-admin' ),
'panel' => 'style',
) );
Flatsome_Option::add_field( 'option', array(
'type' => 'text',
'settings' => 'button_radius',
'label' => __( 'Default Button Radius', 'flatsome-admin' ),
'section' => 'global-styles',
'transport' => $transport,
'default' => '',
));

View File

@@ -0,0 +1,61 @@
<?php
Flatsome_Option::add_section( 'lightbox', array(
'title' => __( 'Image Lightbox', 'flatsome-admin' ),
'panel' => 'style',
) );
Flatsome_Option::add_field( 'option', array(
'type' => 'checkbox',
'settings' => 'flatsome_lightbox',
'label' => __( 'Enable Flatsome Lightbox', 'flatsome-admin' ),
'section' => 'lightbox',
'default' => 1,
) );
Flatsome_Option::add_field( 'option', array(
'type' => 'color',
'settings' => 'flatsome_lightbox_bg',
'label' => __( 'Lightbox background color', 'flatsome-admin' ),
'section' => 'lightbox',
'transport' => $transport,
'default' => '',
'active_callback' => array(
array(
'setting' => 'flatsome_lightbox',
'operator' => '==',
'value' => true,
),
),
) );
Flatsome_Option::add_field( '', array(
'type' => 'custom',
'settings' => 'custom_lightbox_gallery_layout',
'label' => '',
'section' => 'lightbox',
'default' => '<div class="options-title-divider">Gallery</div>',
'active_callback' => array(
array(
'setting' => 'flatsome_lightbox',
'operator' => '==',
'value' => true,
),
),
) );
Flatsome_Option::add_field( 'option', array(
'type' => 'checkbox',
'settings' => 'flatsome_lightbox_multi_gallery',
'label' => __( 'Use multiple galleries on a page', 'flatsome-admin' ),
'description' => __( 'When enabled, lightbox galleries on a page are treated separately, else combined in one gallery.', 'flatsome-admin' ),
'section' => 'lightbox',
'default' => 0,
'active_callback' => array(
array(
'setting' => 'flatsome_lightbox',
'operator' => '==',
'value' => true,
),
),
) );

View File

@@ -0,0 +1,329 @@
<?php
Flatsome_Option::add_section( 'type',
array(
'title' => __( 'Typography', 'flatsome-admin' ),
'panel' => 'style',
)
);
Flatsome_Option::add_field( 'option',
array(
'type' => 'checkbox',
'settings' => 'disable_fonts',
'label' => __( 'Disable Google Fonts. No fonts will be loaded from Google.', 'flatsome-admin' ),
'section' => 'type',
'default' => 0,
)
);
Flatsome_Option::add_field( 'option',
array(
'type' => 'select',
'settings' => 'googlefonts_font_display',
'label' => __( 'Google Fonts font-display type', 'flatsome-admin' ),
'description' => 'Choose how Google Fonts will be loaded.',
'tooltip' => '<ul>
<li><span style="font-weight: bold">auto</span> font display strategy is defined by the user agent</li>
<li><span style="font-weight: bold">block</span> flash of invisible text until the font loads</li>
<li><span style="font-weight: bold">swap</span> fallback font until custom font loads (flash of unstyled text)</li>
<li><span style="font-weight: bold">fallback</span> between block and swap, invisible text for a short time</li>
<li><span style="font-weight: bold">optional</span> like fallback, but the browser can decide to not use the custom font</li>
</ul>',
'section' => 'type',
'active_callback' => array(
array(
'setting' => 'disable_fonts',
'operator' => '==',
'value' => false,
),
),
'default' => 'swap',
'choices' => array(
'auto' => __( 'Auto', 'flatsome-admin' ),
'block' => __( 'Block', 'flatsome-admin' ),
'swap' => __( 'Swap', 'flatsome-admin' ),
'fallback' => __( 'Fallback', 'flatsome-admin' ),
'optional' => __( 'Optional', 'flatsome-admin' ),
),
)
);
Flatsome_Option::add_field( '',
array(
'type' => 'custom',
'settings' => 'custom_title_type_headings',
'label' => __( '', 'flatsome-admin' ),
'section' => 'type',
'default' => '<div class="options-title-divider">Headlines</div>',
'active_callback' => array(
array(
'setting' => 'disable_fonts',
'operator' => '==',
'value' => false,
),
),
)
);
Flatsome_Option::add_field( 'option',
array(
'type' => 'typography',
'settings' => 'type_headings',
'description' => 'This is the font for all H1, H2, H3, H5, H6 titles.',
'label' => esc_attr__( 'Font', 'flatsome-admin' ),
'section' => 'type',
'default' => array(
'font-family' => 'Lato',
'variant' => '700',
),
'active_callback' => array(
array(
'setting' => 'disable_fonts',
'operator' => '==',
'value' => false,
),
),
)
);
Flatsome_Option::add_field( '',
array(
'type' => 'custom',
'settings' => 'custom_title_type_base',
'label' => __( '', 'flatsome-admin' ),
'section' => 'type',
'default' => '<div class="options-title-divider">Base</div>',
'active_callback' => array(
array(
'setting' => 'disable_fonts',
'operator' => '==',
'value' => false,
),
),
)
);
Flatsome_Option::add_field( 'option',
array(
'type' => 'typography',
'settings' => 'type_texts',
'label' => esc_attr__( 'Base Text Font', 'flatsome-admin' ),
'section' => 'type',
'default' => array(
'font-family' => 'Lato',
'variant' => '400',
),
'active_callback' => array(
array(
'setting' => 'disable_fonts',
'operator' => '==',
'value' => false,
),
),
)
);
Flatsome_Option::add_field( 'option',
array(
'type' => 'slider',
'settings' => 'type_size',
'label' => __( 'Base Font Size', 'flatsome-admin' ),
'section' => 'type',
'description' => 'Set base font size in %.',
'default' => 100,
'choices' => array(
'min' => 50,
'max' => 200,
'step' => 1,
),
'transport' => 'postMessage',
'active_callback' => array(
array(
'setting' => 'disable_fonts',
'operator' => '==',
'value' => false,
),
),
)
);
Flatsome_Option::add_field( 'option',
array(
'type' => 'slider',
'settings' => 'type_size_mobile',
'label' => __( 'Mobile Base Font Size', 'flatsome-admin' ),
'section' => 'type',
'description' => 'Set mobile base font size in %.',
'default' => 100,
'choices' => array(
'min' => 50,
'max' => 200,
'step' => 1,
),
'transport' => 'postMessage',
'active_callback' => array(
array(
'setting' => 'disable_fonts',
'operator' => '==',
'value' => false,
),
),
)
);
Flatsome_Option::add_field( '',
array(
'type' => 'custom',
'settings' => 'custom_title_type_nav',
'label' => __( '', 'flatsome-admin' ),
'section' => 'type',
'default' => '<div class="options-title-divider">Navigation</div>',
'active_callback' => array(
array(
'setting' => 'disable_fonts',
'operator' => '==',
'value' => false,
),
),
)
);
Flatsome_Option::add_field( 'option',
array(
'type' => 'typography',
'settings' => 'type_nav',
'label' => esc_attr__( 'Font', 'flatsome-admin' ),
'section' => 'type',
'default' => array(
'font-family' => 'Lato',
'variant' => '700',
),
'active_callback' => array(
array(
'setting' => 'disable_fonts',
'operator' => '==',
'value' => false,
),
),
)
);
Flatsome_Option::add_field( '',
array(
'type' => 'custom',
'settings' => 'custom_title_type_alt',
'label' => __( '', 'flatsome-admin' ),
'section' => 'type',
'default' => '<div class="options-title-divider">Alt Fonts</div>',
'active_callback' => array(
array(
'setting' => 'disable_fonts',
'operator' => '==',
'value' => false,
),
),
)
);
Flatsome_Option::add_field( 'option',
array(
'type' => 'typography',
'settings' => 'type_alt',
'description' => 'Alt font can be selected in the Format dropdown in Text Editor.',
'label' => esc_attr__( 'Alt font (.alt-font)', 'flatsome-admin' ),
'section' => 'type',
'default' => array(
'font-family' => 'Dancing Script',
'variant' => '400',
),
'active_callback' => array(
array(
'setting' => 'disable_fonts',
'operator' => '==',
'value' => false,
),
),
)
);
Flatsome_Option::add_field( '',
array(
'type' => 'custom',
'settings' => 'custom_title_type_transform',
'label' => __( '', 'flatsome-admin' ),
'section' => 'type',
'default' => '<div class="options-title-divider">Text Transforms</div>',
)
);
Flatsome_Option::add_field( 'option',
array(
'type' => 'radio-buttonset',
'settings' => 'text_transform_breadcrumbs',
'label' => esc_attr__( 'Breadcrumbs', 'flatsome-admin' ),
'section' => 'type',
'default' => '',
'choices' => array(
'' => 'UPPERCASE',
'none' => 'Normal',
),
)
);
Flatsome_Option::add_field( 'option',
array(
'type' => 'radio-buttonset',
'settings' => 'text_transform_buttons',
'label' => esc_attr__( 'Buttons', 'flatsome-admin' ),
'section' => 'type',
'default' => '',
'choices' => array(
'' => 'UPPERCASE',
'none' => 'Normal',
),
)
);
Flatsome_Option::add_field( 'option',
array(
'type' => 'radio-buttonset',
'settings' => 'text_transform_navigation',
'label' => esc_attr__( 'Navigation / Tabs', 'flatsome-admin' ),
'section' => 'type',
'default' => '',
'choices' => array(
'' => 'UPPERCASE',
'none' => 'Normal',
),
)
);
Flatsome_Option::add_field( 'option',
array(
'type' => 'radio-buttonset',
'settings' => 'text_transform_section_titles',
'label' => esc_attr__( 'Section Titles', 'flatsome-admin' ),
'section' => 'type',
'default' => '',
'choices' => array(
'' => 'UPPERCASE',
'none' => 'Normal',
),
)
);
Flatsome_Option::add_field( 'option',
array(
'type' => 'radio-buttonset',
'settings' => 'text_transform_widget_titles',
'label' => esc_attr__( 'Widget Titles', 'flatsome-admin' ),
'section' => 'type',
'default' => '',
'choices' => array(
'' => 'UPPERCASE',
'none' => 'Normal',
),
)
);