first commit

This commit is contained in:
CHIEFSOFT\ameye
2023-11-30 13:20:54 -05:00
commit e9e5c0546c
5833 changed files with 1801865 additions and 0 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

@@ -0,0 +1,233 @@
<?php
if (!class_exists('Kirki')) {
return;
}
Kirki::add_section('back_to_top', array(
'title' => esc_attr__('Back to top', 'envo-extra'),
'panel' => 'envo_theme_panel',
'priority' => 80,
));
$devices = array(
'desktop' => array(
'media_query_key' => '',
'media_query' => '',
),
'tablet' => array(
'media_query_key' => 'media_query',
'media_query' => '@media (max-width: 991px)',
),
'mobile' => array(
'media_query_key' => 'media_query',
'media_query' => '@media (max-width: 787px)',
),
);
/**
* Header cart icon
*/
Kirki::add_field('envo_extra', array(
'type' => 'radio-buttonset',
'label' => esc_html__('Back to top button', 'envo-extra'),
'section' => 'back_to_top',
'settings' => 'back_to_top_on_off',
'default' => 'block',
'transport' => 'auto',
'choices' => array(
'block' => esc_html__('On', 'envo-extra'),
'none' => esc_html__('Off', 'envo-extra'),
)
));
Kirki::add_field('envo_extra', array(
'type' => 'multicolor',
'settings' => 'back_to_top_color',
'label' => esc_attr__('Colors', 'envo-extra'),
'section' => 'back_to_top',
'priority' => 10,
'transport' => 'auto',
'choices' => array(
'color' => esc_attr__('Color', 'envo-extra'),
'background' => esc_attr__('Background', 'envo-extra'),
'color-hover' => esc_attr__('Color hover', 'envo-extra'),
'background-hover' => esc_attr__('Background hover', 'envo-extra'),
),
'default' => array(
'color' => '',
'background' => '',
'color-hover' => '',
'background-hover' => '',
),
'output' => array(
array(
'choice' => 'color',
'element' => '#return-to-top i',
'property' => 'color',
),
array(
'choice' => 'background',
'element' => '#return-to-top',
'property' => 'background-color',
),
array(
'choice' => 'color-hover',
'element' => '#return-to-top:hover i',
'property' => 'color',
),
array(
'choice' => 'background-hover',
'element' => '#return-to-top:hover',
'property' => 'background-color',
),
),
'active_callback' => array(
array(
'setting' => 'back_to_top_on_off',
'operator' => '==',
'value' => 'block',
),
),
));
// Separator.
Kirki::add_field('envo_extra', array(
'type' => 'custom',
'settings' => 'back_to_top_pos_left_separator',
'section' => 'back_to_top',
'priority' => 10,
'default' => '<hr style="border-top: 1px solid #ccc; border-bottom: 1px solid #f8f8f8; margin: 0;">',
'active_callback' => array(
array(
'setting' => 'back_to_top_on_off',
'operator' => '==',
'value' => 'block',
),
),
));
// Title.
Kirki::add_field('envo_extra', array(
'type' => 'responsive_devices',
'label' => esc_attr__('Position from right', 'envo-extra'),
'section' => 'back_to_top',
'settings' => 'back_to_top_pos_left_devices',
'priority' => 11,
'active_callback' => array(
array(
'setting' => 'back_to_top_on_off',
'operator' => '==',
'value' => 'block',
),
),
));
// Responsive field.
foreach ($devices as $key => $value) {
Kirki::add_field('envo_extra', array(
'type' => 'slider',
'settings' => 'back_to_top_pos_left' . $key,
'section' => 'back_to_top',
'default' => 2,
'priority' => 12,
'transport' => 'auto',
'choices' => array(
'min' => 1,
'max' => 100,
'step' => 1,
),
'output' => array(
array(
'element' => '#return-to-top',
'property' => 'right',
'units' => '%',
$value['media_query_key'] => $value['media_query'],
),
array(
'element' => '.rtl #return-to-top',
'property' => 'left',
'units' => '%',
$value['media_query_key'] => $value['media_query'],
),
),
'active_callback' => array(
array(
'setting' => 'back_to_top_on_off',
'operator' => '==',
'value' => 'block',
),
),
));
}
// Separator.
Kirki::add_field('envo_extra', array(
'type' => 'custom',
'settings' => 'back_to_top_separator_top',
'section' => 'back_to_top',
'priority' => 15,
'default' => '<hr style="border-top: 1px solid #ccc; border-bottom: 1px solid #f8f8f8; margin: 0;">',
'active_callback' => array(
array(
'setting' => 'back_to_top_on_off',
'operator' => '==',
'value' => 'block',
),
),
));
Kirki::add_field('envo_extra', array(
'type' => 'responsive_devices',
'label' => esc_attr__('Position from bottom', 'envo-extra'),
'section' => 'back_to_top',
'settings' => 'back_to_top_pos_bottom_devices',
'priority' => 16,
'active_callback' => array(
array(
'setting' => 'back_to_top_on_off',
'operator' => '==',
'value' => 'block',
),
),
));
foreach ($devices as $key => $value) {
Kirki::add_field('envo_extra', array(
'type' => 'slider',
'settings' => 'back_to_top_pos_right' . $key,
'section' => 'back_to_top',
'default' => 4,
'priority' => 20,
'transport' => 'auto',
'choices' => array(
'min' => 1,
'max' => 100,
'step' => 1,
),
'output' => array(
array(
'element' => '#return-to-top',
'property' => 'bottom',
'units' => '%',
$value['media_query_key'] => $value['media_query'],
),
),
'active_callback' => array(
array(
'setting' => 'back_to_top_on_off',
'operator' => '==',
'value' => 'block',
),
),
));
}
// Separator.
Kirki::add_field('envo_extra', array(
'type' => 'custom',
'settings' => 'back_to_top_separator_bottom',
'section' => 'back_to_top',
'priority' => 25,
'default' => '<hr style="border-top: 1px solid #ccc; border-bottom: 1px solid #f8f8f8; margin: 0;">',
'active_callback' => array(
array(
'setting' => 'back_to_top_on_off',
'operator' => '==',
'value' => 'block',
),
),
));
@@ -0,0 +1,56 @@
<?php
if (!class_exists('Kirki')) {
return;
}
function envo_extra_do_not_filter_anything($value) {
return $value;
}
Kirki::add_section('custom_code_section', array(
'title' => esc_attr__('Custom Codes', 'envo-extra'),
'panel' => 'envo_theme_panel',
'priority' => 100,
));
Kirki::add_field('envo_extra', array(
'type' => 'textarea',
'settings' => 'header-code',
'label' => __('Code to be added to the HEAD', 'envo-extra'),
'description' => __('Suitable for Google Analytics code', 'envo-extra'),
'section' => 'custom_code_section',
'transport' => 'postMessage',
'sanitize_callback' => 'envo_extra_do_not_filter_anything',
'default' => '',
'priority' => 10,
));
add_action('wp_head', 'envo_extra_add_googleanalytics', 10);
function envo_extra_add_googleanalytics() {
$header_code = get_theme_mod('header-code', '');
if ($header_code) {
echo get_theme_mod('header-code', '');
}
}
Kirki::add_field('envo_extra', array(
'type' => 'textarea',
'settings' => 'footer-code',
'label' => __('Code to be added to the footer', 'envo-extra'),
'section' => 'custom_code_section',
'transport' => 'postMessage',
'sanitize_callback' => 'envo_extra_do_not_filter_anything',
'default' => '',
'priority' => 10,
));
add_action('wp_footer', 'envo_extra_add_footer_code');
function envo_extra_add_footer_code() {
$header_code = get_theme_mod('footer-code', '');
if ($header_code) {
echo get_theme_mod('footer-code', '');
}
}
@@ -0,0 +1,41 @@
<?php
/**
* Reset some theme mod from url in admin area - administrators only
*/
add_action( 'admin_init', 'envo_extra_reset_mod' );
function envo_extra_reset_mod() {
$current_user = wp_get_current_user();
// This will help you reset some theme mods from URL. Perfect if you put something wrong into custom code and it will break your page
// Code example:
// Reset code added to the HEAD: ?reset-theme-mods=1&option=header-code
// Reset code added to the footer: ?reset-theme-mods=1&option=footer-code
// You can use it if you are site administrator and your are in admin area.
if ( isset( $_GET['reset-theme-mods'] ) && '1' === $_GET['reset-theme-mods'] && $_GET['option'] != '' && is_admin() !== false && current_user_can('administrator') ) {
remove_theme_mod( $_GET['option'] );
}
}
function envo_extra_fonts() {
if (envo_extra_check_for_enwoo_pro()) {
$fonts = array();
} else {
$fonts = array(
'google' => array(
'Roboto',
'Open Sans',
'Lato',
'Roboto Condensed',
'Slabo 27px',
'Montserrat',
'Oswald',
'Source Sans Pro',
'Raleway',
'Merriweather',
),
);
}
return $fonts;
}
add_action( 'admin_init', 'envo_extra_fonts' );
@@ -0,0 +1,199 @@
<?php
if (!class_exists('Kirki')) {
return;
}
Kirki::add_section('footer_credits', array(
'title' => esc_attr__('Copyright (Footer Credits)', 'envo-extra'),
'panel' => 'envo_theme_panel',
'priority' => 50,
));
$devices = array(
'desktop' => array(
'media_query_key' => '',
'media_query' => '',
'description' => 'Desktop',
),
'tablet' => array(
'media_query_key' => 'media_query',
'media_query' => '@media (max-width: 991px)',
'description' => 'Tablet',
),
'mobile' => array(
'media_query_key' => 'media_query',
'media_query' => '@media (max-width: 787px)',
'description' => 'Mobile',
),
);
Kirki::add_field('envo_extra', array(
'type' => 'editor',
'settings' => 'footer-credits',
'label' => __('Footer credits', 'envo-extra'),
'description' => __('HTML is allowed.<br/> Use <code>%current_year%</code> to update year automatically.<br/> Use <code>%copy%</code> to include copyright symbol.', 'envo-extra'),
'section' => 'footer_credits',
'transport' => 'postMessage',
'js_vars' => array(
array(
'element' => '.enwoo-credits-text',
'function' => 'html',
),
),
'default' => '',
'priority' => 10,
));
// Separator.
Kirki::add_field('envo_extra', array(
'type' => 'custom',
'settings' => 'footer_credits_font_separator_top',
'section' => 'footer_credits',
'priority' => 10,
'default' => '<hr style="border-top: 1px solid #ccc; border-bottom: 1px solid #f8f8f8; margin: 0;">',
));
// Title.
Kirki::add_field('envo_extra', array(
'type' => 'responsive_devices',
'label' => esc_attr__('Font', 'envo-extra'),
'section' => 'footer_credits',
'settings' => 'footer_credits_font_devices',
'priority' => 10,
));
// Responsive field.
foreach ($devices as $key => $value) {
Kirki::add_field('envo_extra', array(
'type' => 'typography',
'settings' => 'footer_credits_font' . $key,
'description' => $value['description'],
'section' => 'footer_credits',
'transport' => 'auto',
'choices' => array(
'fonts' => envo_extra_fonts(),
),
'default' => array(
'font-family' => '',
'variant' => '400',
'letter-spacing' => '0px',
'font-size' => '',
'line-height' => '',
'text-transform' => 'none',
'word-spacing' => '0px',
'text-align' => 'none',
),
'priority' => 15,
'output' => array(
array(
'element' => '.footer-credits-text',
$value['media_query_key'] => $value['media_query'],
),
),
));
}
// Separator.
Kirki::add_field('envo_extra', array(
'type' => 'custom',
'settings' => 'footer_credits_font_separator_bottom',
'section' => 'footer_credits',
'priority' => 20,
'default' => '<hr style="border-top: 1px solid #ccc; border-bottom: 1px solid #f8f8f8; margin: 0;">',
));
Kirki::add_field('envo_extra', array(
'type' => 'color',
'settings' => 'copyright_bg_color',
'label' => esc_attr__('Copyright background', 'envo-extra'),
'section' => 'footer_credits',
'default' => '',
'transport' => 'auto',
'priority' => 20,
'output' => array(
array(
'element' => '.footer-credits',
'property' => 'background-color',
),
),
));
Kirki::add_field('envo_extra', array(
'type' => 'multicolor',
'settings' => 'copyright_links_color',
'label' => esc_attr__('Copyright text colors', 'envo-extra'),
'section' => 'footer_credits',
'priority' => 20,
'transport' => 'auto',
'choices' => array(
'color' => esc_attr__('Color', 'envo-extra'),
'link' => esc_attr__('Links', 'envo-extra'),
'hover' => esc_attr__('Hover', 'envo-extra'),
),
'default' => array(
'color' => '',
'link' => '',
'hover' => '',
),
'output' => array(
array(
'choice' => 'color',
'element' => '.footer-credits, .footer-credits-text',
'property' => 'color',
),
array(
'choice' => 'link',
'element' => '.footer-credits a',
'property' => 'color',
),
array(
'choice' => 'hover',
'element' => '.footer-credits a:hover',
'property' => 'color',
),
),
));
// Separator.
Kirki::add_field('envo_extra', array(
'type' => 'custom',
'settings' => 'footer_credits_spacing_separator_top',
'section' => 'footer_credits',
'priority' => 40,
'default' => '<hr style="border-top: 1px solid #ccc; border-bottom: 1px solid #f8f8f8; margin: 0;">',
));
// Title.
Kirki::add_field('envo_extra', array(
'type' => 'responsive_devices',
'label' => esc_attr__('Copyright spacing', 'envo-extra'),
'section' => 'footer_credits',
'settings' => 'footer_credits_spacing_devices',
'priority' => 40,
));
// Responsive field.
foreach ($devices as $key => $value) {
Kirki::add_field('envo_extra', array(
'type' => 'dimensions',
'settings' => 'footer_credits_spacing' . $key,
'description' => $value['description'],
'section' => 'footer_credits',
'priority' => 45,
'default' => array(
'top' => '20px',
'right' => '0px',
'bottom' => '20px',
'left' => '0px',
),
'transport' => 'auto',
'output' => array(
array(
'property' => 'padding',
'element' => '.footer-credits-text',
$value['media_query_key'] => $value['media_query'],
),
),
));
}
// Separator.
Kirki::add_field('envo_extra', array(
'type' => 'custom',
'settings' => 'footer_credits_spacing_separator_bottom',
'section' => 'footer_credits',
'priority' => 50,
'default' => '<hr style="border-top: 1px solid #ccc; border-bottom: 1px solid #f8f8f8; margin: 0;">',
));
@@ -0,0 +1,595 @@
<?php
if (!class_exists('Kirki')) {
return;
}
Kirki::add_section('footer_widgets', array(
'title' => esc_attr__('Footer Widgets', 'envo-extra'),
'panel' => 'envo_theme_panel',
'priority' => 45,
));
$devices = array(
'desktop' => array(
'media_query_key' => '',
'media_query' => '',
'description' => 'Desktop',
),
'tablet' => array(
'media_query_key' => 'media_query',
'media_query' => '@media (max-width: 991px)',
'description' => 'Tablet',
),
'mobile' => array(
'media_query_key' => 'media_query',
'media_query' => '@media (max-width: 787px)',
'description' => 'Mobile',
),
);
Kirki::add_field('envo_extra', array(
'type' => 'radio-buttonset',
'settings' => 'widgets-width',
'label' => esc_attr__('Footer widgets columns', 'envo-extra'),
'section' => 'footer_widgets',
'default' => '23',
'priority' => 10,
'transport' => 'auto',
'choices' => array(
'98' => '1',
'49' => '2',
'31.33333333' => '3',
'23' => '4',
),
'output' => array(
array(
'element' => '#content-footer-section .widget.col-md-3',
'property' => 'width',
'media_query' => '@media (min-width: 992px)',
'units' => '%',
),
),
));
// Separator.
Kirki::add_field('envo_extra', array(
'type' => 'custom',
'settings' => 'footer_font_color_separator_top',
'section' => 'footer_widgets',
'priority' => 10,
'default' => '<hr style="border-top: 1px solid #ccc; border-bottom: 1px solid #f8f8f8; margin: 0;">',
));
// Title.
Kirki::add_field('envo_extra', array(
'type' => 'responsive_devices',
'label' => esc_attr__('Font', 'envo-extra'),
'section' => 'footer_widgets',
'settings' => 'footer_font_color_devices',
'priority' => 10,
));
// Responsive field.
foreach ($devices as $key => $value) {
Kirki::add_field('envo_extra', array(
'type' => 'typography',
'settings' => 'footer_font_color' . $key,
'description' => $value['description'],
'section' => 'footer_widgets',
'transport' => 'auto',
'choices' => array(
'fonts' => envo_extra_fonts(),
),
'default' => array(
'font-family' => '',
'variant' => '400',
'letter-spacing' => '0px',
'font-size' => '15px',
'line-height' => '1.6',
'text-transform' => 'none',
'color' => '',
'word-spacing' => '0px',
'text-align' => 'none',
),
'priority' => 15,
'output' => array(
array(
'element' => '#content-footer-section .widget',
$value['media_query_key'] => $value['media_query'],
),
),
));
}
// Separator.
Kirki::add_field('envo_extra', array(
'type' => 'custom',
'settings' => 'footer_widget_title_color_separator_top',
'section' => 'footer_widgets',
'priority' => 20,
'default' => '<hr style="border-top: 1px solid #ccc; border-bottom: 1px solid #f8f8f8; margin: 0;">',
));
// Title.
Kirki::add_field('envo_extra', array(
'type' => 'responsive_devices',
'label' => esc_attr__('Widget Titles', 'envo-extra'),
'section' => 'footer_widgets',
'settings' => 'footer_widget_title_color_devices',
'priority' => 20,
));
// Responsive field.
foreach ($devices as $key => $value) {
Kirki::add_field('envo_extra', array(
'type' => 'typography',
'settings' => 'footer_widget_title_color' . $key,
'description' => $value['description'],
'section' => 'footer_widgets',
'transport' => 'auto',
'choices' => array(
'fonts' => envo_extra_fonts(),
),
'default' => array(
'font-family' => '',
'font-size' => '18px',
'variant' => '400',
'line-height' => '1.6',
'letter-spacing' => '0px',
'color' => '',
'text-transform' => 'none',
'word-spacing' => '0px',
'text-align' => 'none',
),
'priority' => 25,
'output' => array(
array(
'element' => '#content-footer-section .widget-title h3',
$value['media_query_key'] => $value['media_query'],
)
),
));
}
// Separator.
Kirki::add_field('envo_extra', array(
'type' => 'custom',
'settings' => 'footer_widget_title_color_separator_bottom',
'section' => 'footer_widgets',
'priority' => 30,
'default' => '<hr style="border-top: 1px solid #ccc; border-bottom: 1px solid #f8f8f8; margin: 0;">',
));
Kirki::add_field('envo_extra', array(
'type' => 'color',
'settings' => 'footer_bg_color',
'label' => esc_attr__('Background', 'envo-extra'),
'section' => 'footer_widgets',
'default' => '',
'transport' => 'auto',
'priority' => 30,
'output' => array(
array(
'element' => '#content-footer-section',
'property' => 'background-color',
),
),
));
Kirki::add_field('envo_extra', array(
'type' => 'multicolor',
'settings' => 'footer_links_color',
'label' => esc_attr__('Links', 'envo-extra'),
'section' => 'footer_widgets',
'priority' => 30,
'transport' => 'auto',
'choices' => array(
'link' => esc_attr__('Color', 'envo-extra'),
'hover' => esc_attr__('Hover', 'envo-extra'),
),
'default' => array(
'link' => '',
'hover' => '',
),
'output' => array(
array(
'choice' => 'link',
'element' => '#content-footer-section a',
'property' => 'color',
),
array(
'choice' => 'hover',
'element' => '#content-footer-section a:hover',
'property' => 'color',
),
),
));
// Separator.
Kirki::add_field('envo_extra', array(
'type' => 'custom',
'settings' => 'footer_sidebar_border_top',
'section' => 'footer_widgets',
'priority' => 30,
'default' => '<hr style="border-top: 1px solid #ccc; border-bottom: 1px solid #f8f8f8; margin: 0;">',
));
// Border start.
Kirki::add_field('envo_extra', array(
'type' => 'select',
'settings' => 'footer_sidebar_border_style',
'label' => esc_html__('Footer widgets area border', 'envo-extra'),
'section' => 'footer_widgets',
'default' => 'none',
'priority' => 30,
'placeholder' => esc_html__('Choose an option', 'envo-extra'),
'choices' => array(
'none' => esc_html__('None', 'envo-extra'),
'solid' => esc_html__('Solid', 'envo-extra'),
'double' => esc_html__('Double', 'envo-extra'),
'dotted' => esc_html__('Dotted', 'envo-extra'),
'dashed' => esc_html__('Dashed', 'envo-extra'),
'groove' => esc_html__('Groove', 'envo-extra'),
),
'transport' => 'auto',
'output' => array(
array(
'element' => '#content-footer-section',
'property' => 'border-style',
),
)
)
);
Kirki::add_field('envo_extra', array(
'type' => 'dimensions',
'settings' => 'footer_sidebar_border_width',
'label' => esc_attr__('Footer widgets area border width', 'envo-extra'),
'section' => 'footer_widgets',
'priority' => 30,
'default' => array(
'border-top-width' => '0px',
'border-right-width' => '0px',
'border-bottom-width' => '0px',
'border-left-width' => '0px',
),
'choices' => array(
'labels' => array(
'border-top-width' => esc_attr__('Top', 'textdomain'),
'border-right-width' => esc_attr__('Bottom', 'textdomain'),
'border-bottom-width' => esc_attr__('Left', 'textdomain'),
'border-left-width' => esc_attr__('Right', 'textdomain'),
),
),
'transport' => 'auto',
'output' => array(
array(
'element' => '#content-footer-section',
),
),
'active_callback' => array(
array(
'setting' => 'footer_sidebar_border_style',
'operator' => '!=',
'value' => 'none',
),
),
));
Kirki::add_field('envo_extra', array(
'type' => 'dimensions',
'settings' => 'footer_sidebar_border_radius',
'section' => 'footer_widgets',
'label' => esc_attr__('Footer widgets area border radius', 'envo-extra'),
'priority' => 30,
'default' => array(
'border-top-left-radius' => '0px',
'border-top-right-radius' => '0px',
'border-bottom-left-radius' => '0px',
'border-bottom-right-radius' => '0px',
),
'choices' => array(
'labels' => array(
'border-top-left-radius' => esc_attr__('Top Left', 'textdomain'),
'border-top-right-radius' => esc_attr__('Top Right', 'textdomain'),
'border-bottom-left-radius' => esc_attr__('Bottom Left', 'textdomain'),
'border-bottom-right-radius' => esc_attr__('Bottom Right', 'textdomain'),
),
),
'transport' => 'auto',
'output' => array(
array(
'element' => '#content-footer-section',
),
),
'active_callback' => array(
array(
'setting' => 'footer_sidebar_border_style',
'operator' => '!=',
'value' => 'none',
),
),
));
Kirki::add_field('envo_extra', array(
'type' => 'color',
'settings' => 'footer_sidebar_border_color',
'label' => esc_attr__('Footer widgets area border color', 'envo-extra'),
'section' => 'footer_widgets',
'default' => '',
'transport' => 'auto',
'priority' => 30,
'output' => array(
array(
'element' => '#content-footer-section',
'property' => 'border-color',
),
),
'active_callback' => array(
array(
'setting' => 'footer_sidebar_border_style',
'operator' => '!=',
'value' => 'none',
),
),
));
// Border end.
// Separator.
Kirki::add_field('envo_extra', array(
'type' => 'custom',
'settings' => 'footer_sidebar_box_shadow_top',
'section' => 'footer_widgets',
'priority' => 30,
'default' => '<hr style="border-top: 1px solid #ccc; border-bottom: 1px solid #f8f8f8; margin: 0;">',
));
Kirki::add_field('envo_extra', array(
'type' => 'text',
'settings' => 'footer_sidebar_box_shadow_code',
'label' => esc_html__('Footer widgets area box shadow', 'envo-extra'),
'description' => esc_attr__('e.g. 5px 5px 15px 5px #000000', 'envo-extra'),
'section' => 'footer_widgets',
'priority' => 30,
'output' => array(
array(
'element' => '#content-footer-section',
'property' => 'box-shadow',
),
),
));
// Separator.
Kirki::add_field('envo_extra', array(
'type' => 'custom',
'settings' => 'footer_sidebar_spacing_separator_top',
'section' => 'footer_widgets',
'priority' => 30,
'default' => '<hr style="border-top: 1px solid #ccc; border-bottom: 1px solid #f8f8f8; margin: 0;">',
));
// Title.
Kirki::add_field('envo_extra', array(
'type' => 'responsive_devices',
'label' => esc_attr__('Footer widgets area spacing', 'envo-extra'),
'section' => 'footer_widgets',
'settings' => 'footer_sidebar_spacing_devices',
'priority' => 30,
));
// Responsive field.
foreach ($devices as $key => $value) {
Kirki::add_field('envo_extra', array(
'description' => $value['description'],
'type' => 'dimensions',
'settings' => 'footer_sidebar_spacing' . $key,
'section' => 'footer_widgets',
'priority' => 35,
'default' => array(
'top' => '0px',
'right' => '0px',
'bottom' => '0px',
'left' => '0px',
),
'transport' => 'auto',
'output' => array(
array(
'property' => 'padding',
'element' => '#content-footer-section',
$value['media_query_key'] => $value['media_query'],
),
),
));
}
// Separator.
Kirki::add_field('envo_extra', array(
'type' => 'custom',
'settings' => 'footer_sidebar_spacing_separator_bottom',
'section' => 'footer_widgets',
'priority' => 40,
'default' => '<hr style="border-top: 1px solid #ccc; border-bottom: 1px solid #f8f8f8; margin: 0;">',
));
// Border start.
Kirki::add_field('envo_extra', array(
'type' => 'select',
'settings' => 'footer_widgets_border_style',
'label' => esc_html__('Footer widgets border', 'envo-extra'),
'section' => 'footer_widgets',
'default' => 'none',
'priority' => 40,
'placeholder' => esc_html__('Choose an option', 'envo-extra'),
'choices' => array(
'none' => esc_html__('None', 'envo-extra'),
'solid' => esc_html__('Solid', 'envo-extra'),
'double' => esc_html__('Double', 'envo-extra'),
'dotted' => esc_html__('Dotted', 'envo-extra'),
'dashed' => esc_html__('Dashed', 'envo-extra'),
'groove' => esc_html__('Groove', 'envo-extra'),
),
'transport' => 'auto',
'output' => array(
array(
'element' => '#content-footer-section .widget',
'property' => 'border-style',
),
)
)
);
Kirki::add_field('envo_extra', array(
'type' => 'dimensions',
'settings' => 'footer_widgets_border_width',
'label' => esc_attr__('Footer widgets border width', 'envo-extra'),
'section' => 'footer_widgets',
'priority' => 40,
'default' => array(
'border-top-width' => '0px',
'border-right-width' => '0px',
'border-bottom-width' => '0px',
'border-left-width' => '0px',
),
'choices' => array(
'labels' => array(
'border-top-width' => esc_attr__('Top', 'textdomain'),
'border-right-width' => esc_attr__('Bottom', 'textdomain'),
'border-bottom-width' => esc_attr__('Left', 'textdomain'),
'border-left-width' => esc_attr__('Right', 'textdomain'),
),
),
'transport' => 'auto',
'output' => array(
array(
'element' => '#content-footer-section .widget',
),
),
'active_callback' => array(
array(
'setting' => 'footer_widgets_border_style',
'operator' => '!=',
'value' => 'none',
),
),
));
Kirki::add_field('envo_extra', array(
'type' => 'dimensions',
'settings' => 'footer_widgets_border_radius',
'section' => 'footer_widgets',
'label' => esc_attr__('Footer widgets border radius', 'envo-extra'),
'priority' => 40,
'default' => array(
'border-top-left-radius' => '0px',
'border-top-right-radius' => '0px',
'border-bottom-left-radius' => '0px',
'border-bottom-right-radius' => '0px',
),
'choices' => array(
'labels' => array(
'border-top-left-radius' => esc_attr__('Top Left', 'textdomain'),
'border-top-right-radius' => esc_attr__('Top Right', 'textdomain'),
'border-bottom-left-radius' => esc_attr__('Bottom Left', 'textdomain'),
'border-bottom-right-radius' => esc_attr__('Bottom Right', 'textdomain'),
),
),
'transport' => 'auto',
'output' => array(
array(
'element' => '#content-footer-section .widget',
),
),
'active_callback' => array(
array(
'setting' => 'footer_widgets_border_style',
'operator' => '!=',
'value' => 'none',
),
),
));
Kirki::add_field('envo_extra', array(
'type' => 'color',
'settings' => 'footer_widgets_border_color',
'label' => esc_attr__('Footer widgets border color', 'envo-extra'),
'section' => 'footer_widgets',
'default' => '',
'transport' => 'auto',
'priority' => 40,
'output' => array(
array(
'element' => '#content-footer-section .widget',
'property' => 'border-color',
),
),
'active_callback' => array(
array(
'setting' => 'footer_widgets_border_style',
'operator' => '!=',
'value' => 'none',
),
),
));
// Border end.
// Separator.
Kirki::add_field('envo_extra', array(
'type' => 'custom',
'settings' => 'footer_widgets_box_shadow_top',
'section' => 'footer_widgets',
'priority' => 40,
'default' => '<hr style="border-top: 1px solid #ccc; border-bottom: 1px solid #f8f8f8; margin: 0;">',
));
Kirki::add_field('envo_extra', array(
'type' => 'text',
'settings' => 'footer_widgets_box_shadow_code',
'label' => esc_html__('Footer widgets box shadow', 'envo-extra'),
'description' => esc_attr__('e.g. 5px 5px 15px 5px #000000', 'envo-extra'),
'section' => 'footer_widgets',
'priority' => 40,
'output' => array(
array(
'element' => '#content-footer-section .widget',
'property' => 'box-shadow',
),
),
));
// Separator.
Kirki::add_field('envo_extra', array(
'type' => 'custom',
'settings' => 'footer_widgets_spacing_separator_top',
'section' => 'footer_widgets',
'priority' => 40,
'default' => '<hr style="border-top: 1px solid #ccc; border-bottom: 1px solid #f8f8f8; margin: 0;">',
));
// Title.
Kirki::add_field('envo_extra', array(
'type' => 'responsive_devices',
'label' => esc_attr__('Footer widgets spacing', 'envo-extra'),
'section' => 'footer_widgets',
'settings' => 'footer_widgets_spacing_devices',
'priority' => 40,
));
// Responsive field.
foreach ($devices as $key => $value) {
Kirki::add_field('envo_extra', array(
'description' => $value['description'],
'type' => 'dimensions',
'settings' => 'footer_widgets_spacing' . $key,
'section' => 'footer_widgets',
'priority' => 45,
'default' => array(
'top' => '0px',
'right' => '0px',
'bottom' => '0px',
'left' => '0px',
),
'transport' => 'auto',
'output' => array(
array(
'property' => 'padding',
'element' => '#content-footer-section .widget',
$value['media_query_key'] => $value['media_query'],
),
),
));
}
// Separator.
Kirki::add_field('envo_extra', array(
'type' => 'custom',
'settings' => 'footer_widgets_spacing_separator_bottom',
'section' => 'footer_widgets',
'priority' => 50,
'default' => '<hr style="border-top: 1px solid #ccc; border-bottom: 1px solid #f8f8f8; margin: 0;">',
));
@@ -0,0 +1,480 @@
<?php
if ( !class_exists( 'Kirki' ) ) {
return;
}
Kirki::add_panel( 'theme_header', array(
'title' => esc_attr__( 'Header', 'envo-extra' ),
'panel' => 'envo_theme_panel',
'priority' => 10,
) );
Kirki::add_section( 'header_title_tagline', array(
'title' => esc_attr__( 'Header', 'envo-extra' ),
'panel' => 'theme_header',
'priority' => 10,
) );
$devices = array(
'desktop' => array(
'media_query_key' => '',
'media_query' => '',
'description' => 'Desktop',
),
'tablet' => array(
'media_query_key' => 'media_query',
'media_query' => '@media (max-width: 991px)',
'description' => 'Tablet',
),
'mobile' => array(
'media_query_key' => 'media_query',
'media_query' => '@media (max-width: 787px)',
'description' => 'Mobile',
),
);
Kirki::add_field( 'envo_extra', array(
'type' => 'radio_image',
'settings' => 'header_layout',
'label' => esc_html__( 'Header layout', 'envo-extra' ),
'section' => 'header_title_tagline',
'priority' => 5,
'default' => (envo_extra_check_plugin_active( 'woocommerce/woocommerce.php' ) ? 'woonav' : 'busnav'),
'choices' => array(
'woonav' => plugin_dir_url( __FILE__ ) . (envo_extra_check_plugin_active( 'woocommerce/woocommerce.php' ) ? 'assets/img/woo-header-woo.jpg' : 'assets/img/woo-header.jpg'),
'busnav' => plugin_dir_url( __FILE__ ) . (envo_extra_check_plugin_active( 'woocommerce/woocommerce.php' ) ? 'assets/img/business-header-woo.jpg' : 'assets/img/business-header.jpg'),
),
) );
Kirki::add_field( 'envo_extra', array(
'type' => 'color',
'settings' => 'header_bg_color',
'label' => esc_attr__( 'Header background', 'envo-extra' ),
'section' => 'header_title_tagline',
'default' => '',
'transport' => 'auto',
'priority' => 10,
'output' => array(
array(
'element' => '.site-header',
'property' => 'background-color',
),
),
) );
// Separator.
Kirki::add_field( 'envo_extra', array(
'type' => 'custom',
'settings' => 'header_spacing_separator_top',
'section' => 'header_title_tagline',
'priority' => 10,
'default' => '<hr style="border-top: 1px solid #ccc; border-bottom: 1px solid #f8f8f8; margin: 0;">',
) );
// Title.
Kirki::add_field( 'envo_extra', array(
'type' => 'responsive_devices',
'label' => esc_attr__( 'Header spacing', 'envo-extra' ),
'section' => 'header_title_tagline',
'settings' => 'header_spacing_devices',
'priority' => 10,
) );
// Responsive field.
foreach ( $devices as $key => $value ) {
Kirki::add_field( 'envo_extra', array(
'description' => $value[ 'description' ],
'type' => 'dimensions',
'settings' => 'header_spacing' . $key,
'section' => 'header_title_tagline',
'priority' => 15,
'default' => array(
'top' => '15px',
'bottom' => '15px',
),
'transport' => 'auto',
'output' => array(
array(
'property' => 'padding',
'element' => '.site-header',
$value[ 'media_query_key' ] => $value[ 'media_query' ],
),
),
) );
}
// Separator.
Kirki::add_field( 'envo_extra', array(
'type' => 'custom',
'settings' => 'logo_spacing_separator_top',
'section' => 'header_title_tagline',
'priority' => 20,
'default' => '<hr style="border-top: 1px solid #ccc; border-bottom: 1px solid #f8f8f8; margin: 0;">',
) );
// Title.
Kirki::add_field( 'envo_extra', array(
'type' => 'responsive_devices',
'label' => esc_attr__( 'Logo spacing', 'envo-extra' ),
'section' => 'header_title_tagline',
'settings' => 'logo_spacing_devices',
'priority' => 20,
) );
// Responsive field.
foreach ( $devices as $key => $value ) {
Kirki::add_field( 'envo_extra', array(
'description' => $value[ 'description' ],
'type' => 'dimensions',
'settings' => 'logo_spacing' . $key,
'section' => 'header_title_tagline',
'priority' => 25,
'default' => array(
'top' => '0px',
'right' => '0px',
'bottom' => '0px',
'left' => '0px',
),
'transport' => 'auto',
'output' => array(
array(
'property' => 'padding',
'element' => '.site-branding-logo',
$value[ 'media_query_key' ] => $value[ 'media_query' ],
),
),
) );
}
// Separator.
Kirki::add_field( 'envo_extra', array(
'type' => 'custom',
'settings' => 'title_spacing_separator_top',
'section' => 'header_title_tagline',
'priority' => 30,
'default' => '<hr style="border-top: 1px solid #ccc; border-bottom: 1px solid #f8f8f8; margin: 0;">',
) );
// Title.
Kirki::add_field( 'envo_extra', array(
'type' => 'responsive_devices',
'label' => esc_attr__( 'Site Title and Tagline spacing', 'envo-extra' ),
'section' => 'header_title_tagline',
'settings' => 'title_spacing_devices',
'priority' => 30,
) );
// Responsive field.
foreach ( $devices as $key => $value ) {
Kirki::add_field( 'envo_extra', array(
'description' => $value[ 'description' ],
'type' => 'dimensions',
'settings' => 'title_spacing' . $key,
'section' => 'header_title_tagline',
'priority' => 35,
'default' => array(
'top' => '0px',
'right' => '0px',
'bottom' => '0px',
'left' => '0px',
),
'transport' => 'auto',
'output' => array(
array(
'property' => 'padding',
'element' => '.site-branding-text',
$value[ 'media_query_key' ] => $value[ 'media_query' ],
),
),
) );
}
// Separator.
Kirki::add_field( 'envo_extra', array(
'type' => 'custom',
'settings' => 'title_logo_width_sep',
'section' => 'header_title_tagline',
'priority' => 40,
'default' => '<hr style="border-top: 1px solid #ccc; border-bottom: 1px solid #f8f8f8; margin: 0;">',
) );
// Title.
Kirki::add_field( 'envo_extra', array(
'type' => 'responsive_devices',
'label' => esc_attr__( 'Title/Logo min. width', 'envo-extra' ),
'section' => 'header_title_tagline',
'settings' => 'title_logo_width_devices',
'priority' => 40,
) );
// Responsive field.
foreach ( $devices as $key => $value ) {
Kirki::add_field( 'envo_extra', array(
'type' => 'slider',
'settings' => 'title_logo_width' . $key,
'description' => $value[ 'description' ],
'section' => 'header_title_tagline',
'transport' => 'auto',
'default' => 10,
'priority' => 45,
'choices' => array(
'min' => '0',
'max' => '100',
'step' => '1',
),
'output' => array(
array(
'element' => '.site-heading',
$value[ 'media_query_key' ] => $value[ 'media_query' ],
'property' => 'min-width',
'units' => '%',
),
),
) );
}
// Separator.
Kirki::add_field( 'envo_extra', array(
'type' => 'custom',
'settings' => 'header_typography_site_title_separator_top',
'section' => 'header_title_tagline',
'priority' => 50,
'default' => '<hr style="border-top: 1px solid #ccc; border-bottom: 1px solid #f8f8f8; margin: 0;">',
) );
// Title.
Kirki::add_field( 'envo_extra', array(
'type' => 'responsive_devices',
'label' => esc_attr__( 'Site title font', 'envo-extra' ),
'section' => 'header_title_tagline',
'settings' => 'header_typography_site_title_devices',
'priority' => 50,
) );
// Responsive field.
foreach ( $devices as $key => $value ) {
Kirki::add_field( 'envo_extra', array(
'type' => 'typography',
'settings' => 'header_typography_site_title' . $key,
'description' => $value[ 'description' ],
'section' => 'header_title_tagline',
'transport' => 'auto',
'choices' => array(
'fonts' => envo_extra_fonts(),
),
'default' => array(
'font-family' => '',
'color' => '',
'variant' => '700',
'letter-spacing' => '0px',
'font-size' => '',
'line-height' => '',
'text-transform' => 'none',
'word-spacing' => '0px',
'text-decoration' => 'none',
'margin-top' => '5px',
'margin-bottom' => '5px',
),
'priority' => 55,
'output' => array(
array(
'element' => '.site-branding-text h1.site-title a:hover, .site-branding-text .site-title a:hover, .site-branding-text h1.site-title, .site-branding-text .site-title, .site-branding-text h1.site-title a, .site-branding-text .site-title a',
$value[ 'media_query_key' ] => $value[ 'media_query' ],
),
),
) );
}
// Separator.
Kirki::add_field( 'envo_extra', array(
'type' => 'custom',
'settings' => 'header_typography_site_desc_separator_top',
'section' => 'header_title_tagline',
'priority' => 60,
'default' => '<hr style="border-top: 1px solid #ccc; border-bottom: 1px solid #f8f8f8; margin: 0;">',
) );
// Title.
Kirki::add_field( 'envo_extra', array(
'type' => 'responsive_devices',
'label' => esc_attr__( 'Site description font', 'envo-extra' ),
'section' => 'header_title_tagline',
'settings' => 'header_typography_site_desc_devices',
'priority' => 60,
) );
// Responsive field.
foreach ( $devices as $key => $value ) {
Kirki::add_field( 'envo_extra', array(
'type' => 'typography',
'settings' => 'header_typography_site_desc' . $key,
'transport' => 'auto',
'description' => $value[ 'description' ],
'section' => 'header_title_tagline',
'choices' => array(
'fonts' => envo_extra_fonts(),
),
'default' => array(
'font-family' => '',
'color' => '',
'variant' => '400',
'letter-spacing' => '0px',
'font-size' => '',
'line-height' => '',
'text-transform' => 'none',
'word-spacing' => '0px',
'text-decoration' => 'none',
'margin-top' => '5px',
'margin-bottom' => '5px',
),
'priority' => 65,
'output' => array(
array(
'element' => 'p.site-description',
$value[ 'media_query_key' ] => $value[ 'media_query' ],
),
),
) );
}
// Separator.
Kirki::add_field( 'envo_extra', array(
'type' => 'custom',
'settings' => 'header_typography_widgets_separator_top',
'section' => 'header_title_tagline',
'priority' => 70,
'default' => '<hr style="border-top: 1px solid #ccc; border-bottom: 1px solid #f8f8f8; margin: 0;">',
'active_callback' => array(
array(
'setting' => 'header_layout',
'operator' => '==',
'value' => 'woonav',
),
),
) );
// Title.
Kirki::add_field( 'envo_extra', array(
'type' => 'responsive_devices',
'label' => esc_attr__( 'Header widget area font', 'envo-extra' ),
'section' => 'header_title_tagline',
'settings' => 'header_typography_widgets_devices',
'priority' => 70,
'active_callback' => array(
array(
'setting' => 'header_layout',
'operator' => '==',
'value' => 'woonav',
),
),
) );
// Responsive field.
foreach ( $devices as $key => $value ) {
Kirki::add_field( 'envo_extra', array(
'type' => 'typography',
'settings' => 'header_typography_widgets' . $key,
'transport' => 'auto',
'description' => $value[ 'description' ],
'section' => 'header_title_tagline',
'choices' => array(
'fonts' => envo_extra_fonts(),
),
'default' => array(
'font-family' => '',
'color' => '',
'variant' => '400',
'letter-spacing' => '0px',
'font-size' => '',
'line-height' => '',
'text-transform' => 'none',
'margin-top' => '5px',
'margin-bottom' => '5px',
'word-spacing' => '0px',
'text-decoration' => 'none'
),
'priority' => 75,
'output' => array(
array(
'element' => '.site-heading-sidebar',
$value[ 'media_query_key' ] => $value[ 'media_query' ],
),
),
'active_callback' => array(
array(
'setting' => 'header_layout',
'operator' => '==',
'value' => 'woonav',
),
),
) );
}
// Separator.
Kirki::add_field( 'envo_extra', array(
'type' => 'custom',
'settings' => 'header_typography_widgets_separator_bottom',
'section' => 'header_title_tagline',
'priority' => 80,
'default' => '<hr style="border-top: 1px solid #ccc; border-bottom: 1px solid #f8f8f8; margin: 0;">',
'active_callback' => array(
array(
'setting' => 'header_layout',
'operator' => '==',
'value' => 'woonav',
),
),
) );
// Title.
Kirki::add_field( 'envo_extra', array(
'type' => 'responsive_devices',
'label' => esc_attr__( 'Widget/Search area spacing', 'envo-extra' ),
'section' => 'header_title_tagline',
'settings' => 'header_search_widget_spacing_devices',
'priority' => 80,
'active_callback' => array(
array(
'setting' => 'header_layout',
'operator' => '==',
'value' => 'woonav',
),
),
) );
// Responsive field.
foreach ( $devices as $key => $value ) {
Kirki::add_field( 'envo_extra', array(
'description' => $value[ 'description' ],
'type' => 'dimensions',
'settings' => 'header_search_widget_spacing' . $key,
'section' => 'header_title_tagline',
'priority' => 85,
'default' => array(
'top' => '0px',
'right' => '0px',
'bottom' => '0px',
'left' => '0px',
),
'transport' => 'auto',
'output' => array(
array(
'property' => 'padding',
'element' => '.header-search-widget',
$value[ 'media_query_key' ] => $value[ 'media_query' ],
),
),
'active_callback' => array(
array(
'setting' => 'header_layout',
'operator' => '==',
'value' => 'woonav',
),
),
) );
}
// Separator.
Kirki::add_field( 'envo_extra', array(
'type' => 'custom',
'settings' => 'header_search_widget_spacing_separator_bottom',
'section' => 'header_title_tagline',
'priority' => 90,
'default' => '<hr style="border-top: 1px solid #ccc; border-bottom: 1px solid #f8f8f8; margin: 0;">',
'active_callback' => array(
array(
'setting' => 'header_layout',
'operator' => '==',
'value' => 'woonav',
),
),
) );
@@ -0,0 +1,185 @@
<?php
if (!class_exists('Kirki')) {
return;
}
Kirki::add_panel('envo_theme_panel', array(
'priority' => 1,
'title' => esc_attr__('Theme Options', 'envo-extra'),
));
Kirki::add_section('main_colors_section', array(
'title' => esc_attr__('Content colors and typography', 'envo-extra'),
'panel' => 'envo_theme_panel',
'priority' => 20,
));
$devices = array(
'desktop' => array(
'media_query_key' => '',
'media_query' => '',
'description' => 'Desktop',
),
'tablet' => array(
'media_query_key' => 'media_query',
'media_query' => '@media (max-width: 991px)',
'description' => 'Tablet',
),
'mobile' => array(
'media_query_key' => 'media_query',
'media_query' => '@media (max-width: 787px)',
'description' => 'Mobile',
),
);
/**
* Colors
*/
// Separator.
Kirki::add_field('envo_extra', array(
'type' => 'custom',
'settings' => 'main_typography_separator_top',
'section' => 'main_colors_section',
'priority' => 10,
'default' => '<hr style="border-top: 1px solid #ccc; border-bottom: 1px solid #f8f8f8; margin: 0;">',
));
// Title.
Kirki::add_field('envo_extra', array(
'type' => 'responsive_devices',
'label' => esc_attr__('Site font', 'envo-extra'),
'section' => 'main_colors_section',
'settings' => 'main_typography_devices',
'priority' => 10,
));
// Responsive field.
foreach ($devices as $key => $value) {
Kirki::add_field('envo_extra', array(
'type' => 'typography',
'settings' => 'main_typography' . $key,
'description' => $value['description'],
'section' => 'main_colors_section',
'transport' => 'auto',
'choices' => array(
'fonts' => envo_extra_fonts(),
),
'default' => array(
'font-family' => '',
'font-size' => '15px',
'variant' => '400',
'line-height' => '1.6',
'letter-spacing' => '0px',
'color' => '',
'word-spacing' => '0px',
),
'priority' => 15,
'output' => array(
array(
'element' => 'body, nav.navigation.post-navigation a, .nav-subtitle',
$value['media_query_key'] => $value['media_query'],
),
array(
'choice' => 'color',
'element' => '.comments-meta a, .the-product-share ul li a .product-share-text',
$value['media_query_key'] => $value['media_query'],
),
),
));
}
// Separator.
Kirki::add_field('envo_extra', array(
'type' => 'custom',
'settings' => 'main_typography_separator_bottom',
'section' => 'main_colors_section',
'priority' => 20,
'default' => '<hr style="border-top: 1px solid #ccc; border-bottom: 1px solid #f8f8f8; margin: 0;">',
));
Kirki::add_field('envo_extra', array(
'type' => 'color',
'settings' => 'main_color_content_bg',
'label' => esc_attr__('Background', 'envo-extra'),
'section' => 'main_colors_section',
'default' => '',
'transport' => 'auto',
'priority' => 20,
'output' => array(
array(
'element' => '.main-container, #sidebar .widget-title h3, .container-fluid.archive-page-header, #product-nav > a',
'property' => 'background-color',
),
),
));
Kirki::add_field('envo_extra', array(
'type' => 'multicolor',
'settings' => 'main_color_links',
'label' => esc_attr__('Links', 'envo-extra'),
'section' => 'main_colors_section',
'priority' => 20,
'transport' => 'auto',
'choices' => array(
'link' => esc_attr__('Color', 'envo-extra'),
'hover' => esc_attr__('Hover', 'envo-extra'),
),
'default' => array(
'link' => '',
'hover' => '',
),
'output' => array(
array(
'choice' => 'link',
'element' => 'a, .author-meta a, .tags-links a, .cat-links a, nav.navigation.pagination .nav-links a, .comments-meta a',
'property' => 'color',
),
array(
'choice' => 'link',
'element' => '.widget-title:before, nav.navigation.pagination .current:before',
'property' => 'background-color',
),
array(
'choice' => 'link',
'element' => 'nav.navigation.pagination .current:before',
'property' => 'border-color',
),
array(
'choice' => 'hover',
'element' => 'a:active, a:hover, a:focus, .tags-links a:hover, .cat-links a:hover, .comments-meta a:hover',
'property' => 'color',
),
),
));
Kirki::add_field('envo_extra', array(
'type' => 'multicolor',
'settings' => 'main_color_buttons',
'label' => esc_attr__('Buttons', 'envo-extra'),
'section' => 'main_colors_section',
'priority' => 20,
'transport' => 'auto',
'choices' => array(
'color' => esc_attr__('Color', 'envo-extra'),
'bg' => esc_attr__('Background', 'envo-extra'),
'border' => esc_attr__('Border', 'envo-extra'),
),
'default' => array(
'color' => '',
'bg' => '',
'border' => '',
),
'output' => array(
array(
'choice' => 'color',
'element' => '.read-more-button a, #searchsubmit, .btn-default, input[type="submit"], input#submit, input#submit:hover, button, a.comment-reply-link, .btn-default:hover, input[type="submit"]:hover, button:hover, a.comment-reply-link:hover',
'property' => 'color',
),
array(
'choice' => 'bg',
'element' => '.read-more-button a, #searchsubmit, .btn-default, input[type="submit"], input#submit, input#submit:hover, button, a.comment-reply-link, .btn-default:hover, input[type="submit"]:hover, button:hover, a.comment-reply-link:hover',
'property' => 'background-color',
),
array(
'choice' => 'border',
'element' => '.read-more-button a, #searchsubmit, .btn-default, input[type="submit"], input#submit, input#submit:hover, button, a.comment-reply-link, .btn-default:hover, input[type="submit"]:hover, button:hover, a.comment-reply-link:hover',
'property' => 'border-color',
),
),
));
@@ -0,0 +1,888 @@
<?php
if ( !class_exists( 'Kirki' ) ) {
return;
}
Kirki::add_panel( 'theme_menus', array(
'title' => esc_attr__( 'Menus', 'envo-extra' ),
'panel' => 'theme_header',
'priority' => 15,
) );
Kirki::add_section( 'main_menu', array(
'title' => esc_attr__( 'Main Menu', 'envo-extra' ),
'panel' => 'theme_menus',
'priority' => 10,
) );
if ( get_theme_mod( 'header_layout', (envo_extra_check_plugin_active( 'woocommerce/woocommerce.php' ) ? 'woonav' : 'busnav' ) ) == 'woonav' ) {
Kirki::add_section( 'secondary_menu', array(
'title' => esc_attr__( 'Secondary Menu', 'envo-extra' ),
'panel' => 'theme_menus',
'priority' => 20,
) );
Kirki::add_section( 'category_menu', array(
'title' => esc_attr__( 'Category Menu', 'envo-extra' ),
'panel' => 'theme_menus',
'priority' => 30,
) );
}
$devices = array(
'desktop' => array(
'media_query_key' => '',
'media_query' => '',
'description' => 'Desktop',
),
'tablet' => array(
'media_query_key' => 'media_query',
'media_query' => '@media (max-width: 991px)',
'description' => 'Tablet',
),
'mobile' => array(
'media_query_key' => 'media_query',
'media_query' => '@media (max-width: 787px)',
'description' => 'Mobile',
),
);
Kirki::add_field( 'envo_extra', array(
'type' => 'radio-buttonset',
'settings' => 'menu_position',
'label' => __( 'Menu Alignment', 'envo-extra' ),
'section' => 'main_menu',
'default' => 'left',
'priority' => 10,
'choices' => array(
'left' => '<i class="dashicons dashicons-editor-alignleft"></i>',
'center' => '<i class="dashicons dashicons-editor-aligncenter"></i>',
'right' => '<i class="dashicons dashicons-editor-alignright"></i>',
),
) );
// Separator.
Kirki::add_field( 'envo_extra', array(
'type' => 'custom',
'settings' => 'typography_mainmenu_separator_top',
'section' => 'main_menu',
'priority' => 10,
'default' => '<hr style="border-top: 1px solid #ccc; border-bottom: 1px solid #f8f8f8; margin: 0;">',
) );
// Title.
Kirki::add_field( 'envo_extra', array(
'type' => 'responsive_devices',
'label' => esc_attr__( 'Menu Font', 'envo-extra' ),
'section' => 'main_menu',
'settings' => 'typography_mainmenu_devices',
'priority' => 10,
) );
// Responsive field.
foreach ( $devices as $key => $value ) {
Kirki::add_field( 'envo_extra', array(
'type' => 'typography',
'settings' => 'typography_mainmenu' . $key,
'description' => $value[ 'description' ],
'section' => 'main_menu',
'transport' => 'auto',
'choices' => array(
'fonts' => envo_extra_fonts(),
),
'default' => array(
'font-family' => '',
'font-size' => '15px',
'variant' => '400',
'letter-spacing' => '0px',
'text-transform' => 'uppercase',
'color' => '',
'word-spacing' => '0px',
'text-decoration' => 'none'
),
'priority' => 15,
'output' => array(
array(
'element' => '#site-navigation, #site-navigation .navbar-nav > li > a, #site-navigation .dropdown-menu > li > a',
$value[ 'media_query_key' ] => $value[ 'media_query' ],
),
array(
'choice' => 'color',
'element' => '.open-panel span',
'property' => 'background-color',
$value[ 'media_query_key' ] => $value[ 'media_query' ],
),
array(
'choice' => 'color',
'element' => '.navbar-default .navbar-brand.brand-absolute',
'property' => 'color',
$value[ 'media_query_key' ] => $value[ 'media_query' ],
),
),
) );
}
// Separator.
Kirki::add_field( 'envo_extra', array(
'type' => 'custom',
'settings' => 'typography_mainmenu_separator_bottom',
'section' => 'main_menu',
'priority' => 20,
'default' => '<hr style="border-top: 1px solid #ccc; border-bottom: 1px solid #f8f8f8; margin: 0;">',
) );
Kirki::add_field( 'envo_extra', array(
'type' => 'multicolor',
'settings' => 'main_menu_colors',
'label' => esc_attr__( 'Main Menu Colors', 'envo-extra' ),
'section' => 'main_menu',
'priority' => 20,
'transport' => 'auto',
'choices' => array(
'bg_color_mainmenu' => esc_attr__( 'Menu Background', 'envo-extra' ),
'text_hover_mainmenu' => esc_attr__( 'Font hover', 'envo-extra' ),
'bg_text_hover_mainmenu' => esc_attr__( 'Item background hover', 'envo-extra' ),
'active_text_mainmenu' => esc_attr__( 'Active item font', 'envo-extra' ),
'active_text_bg_mainmenu' => esc_attr__( 'Active item background', 'envo-extra' ),
),
'default' => array(
'bg_color_mainmenu' => '',
'text_hover_mainmenu' => '',
'bg_text_hover_mainmenu' => '',
'active_text_mainmenu' => '',
'active_text_bg_mainmenu' => '',
),
'output' => array(
array(
'choice' => 'bg_color_mainmenu',
'element' => '#site-navigation, #site-navigation .dropdown-menu, #site-navigation.shrink, .header-cart-block .header-cart-inner ul.site-header-cart, .center-cart-middle, .main-menu, #second-site-navigation',
'property' => 'background-color',
),
array(
'choice' => 'bg_color_mainmenu',
'element' => '#site-navigation .navbar-nav a, .openNav .menu-container',
'property' => 'background-color',
'media_query' => '@media (max-width: 767px)',
),
array(
'choice' => 'text_hover_mainmenu',
'element' => '#site-navigation .navbar-nav > .open > a:hover, #site-navigation .navbar-nav > li > a:hover, #site-navigation .dropdown-menu > li > a:hover',
'property' => 'color',
),
array(
'choice' => 'text_hover_mainmenu',
'element' => '#site-navigation .navbar-nav a:hover',
'property' => 'color',
'media_query' => '@media (max-width: 767px)',
'suffix' => '!important',
),
array(
'choice' => 'bg_text_hover_mainmenu',
'element' => '#site-navigation .navbar-nav > li > a:hover, #site-navigation .dropdown-menu > li > a:hover, #site-navigation .nav .open > a, #site-navigation .nav .open > a:hover, #site-navigation .nav .open > a:focus',
'property' => 'background-color',
),
array(
'choice' => 'bg_text_hover_mainmenu',
'element' => '#site-navigation .navbar-nav a:hover',
'property' => 'background-color',
'media_query' => '@media (max-width: 767px)',
'suffix' => '!important',
),
array(
'choice' => 'active_text_mainmenu',
'element' => '#site-navigation .navbar-nav > li.active > a, #site-navigation .dropdown-menu > .active.current-menu-item > a, .dropdown-menu > .active > a, .home-icon.front_page_on i, .navbar-default .navbar-nav > .open > a',
'property' => 'color',
),
array(
'choice' => 'active_text_mainmenu',
'element' => '#site-navigation .navbar-nav .active a',
'property' => 'color',
'media_query' => '@media (max-width: 767px)',
'suffix' => '!important',
),
array(
'choice' => 'active_text_bg_mainmenu',
'element' => '#site-navigation .navbar-nav > li.active > a, #site-navigation .dropdown-menu > .active.current-menu-item > a, .dropdown-menu > .active > a, li.home-icon.front_page_on, li.home-icon.front_page_on:before',
'property' => 'background-color',
),
array(
'choice' => 'active_text_bg_mainmenu',
'element' => '#site-navigation .navbar-nav .active.current-menu-item a, .dropdown-menu > .active > a',
'property' => 'background-color',
'media_query' => '@media (max-width: 767px)',
'suffix' => '!important',
),
),
) );
// Separator.
Kirki::add_field( 'envo_extra', array(
'type' => 'custom',
'settings' => 'mainmenu_separator_top',
'section' => 'main_menu',
'priority' => 20,
'default' => '<hr style="border-top: 1px solid #ccc; border-bottom: 1px solid #f8f8f8; margin: 0;">',
'active_callback' => array(
array(
'setting' => 'header_layout',
'operator' => '==',
'value' => 'woonav',
),
),
) );
// Border start.
Kirki::add_field( 'envo_extra', array(
'type' => 'select',
'settings' => 'mainmenu_border_style',
'label' => esc_html__( 'Menu border', 'envo-extra' ),
'section' => 'main_menu',
'default' => 'none',
'priority' => 20,
'placeholder' => esc_html__( 'Choose an option', 'envo-extra' ),
'choices' => array(
'none' => esc_html__( 'None', 'envo-extra' ),
'solid' => esc_html__( 'Solid', 'envo-extra' ),
'double' => esc_html__( 'Double', 'envo-extra' ),
'dotted' => esc_html__( 'Dotted', 'envo-extra' ),
'dashed' => esc_html__( 'Dashed', 'envo-extra' ),
'groove' => esc_html__( 'Groove', 'envo-extra' ),
),
'transport' => 'auto',
'output' => array(
array(
'element' => '#second-site-navigation',
'property' => 'border-style',
),
),
'active_callback' => array(
array(
'setting' => 'header_layout',
'operator' => '==',
'value' => 'woonav',
),
),
)
);
Kirki::add_field( 'envo_extra', array(
'type' => 'dimensions',
'settings' => 'mainmenu_border_width',
'label' => esc_attr__( 'Menu Border Width', 'envo-extra' ),
'section' => 'main_menu',
'priority' => 20,
'default' => array(
'border-top-width' => '0px',
'border-right-width' => '0px',
'border-bottom-width' => '0px',
'border-left-width' => '0px',
),
'choices' => array(
'labels' => array(
'border-top-width' => esc_attr__( 'Top', 'textdomain' ),
'border-right-width' => esc_attr__( 'Right', 'textdomain' ),
'border-bottom-width' => esc_attr__( 'Bottom', 'textdomain' ),
'border-left-width' => esc_attr__( 'Left', 'textdomain' ),
),
),
'transport' => 'auto',
'output' => array(
array(
'element' => '#second-site-navigation',
),
),
'active_callback' => array(
array(
'setting' => 'mainmenu_border_style',
'operator' => '!=',
'value' => 'none',
),
array(
array(
'setting' => 'header_layout',
'operator' => '==',
'value' => 'woonav',
),
),
),
) );
Kirki::add_field( 'envo_extra', array(
'type' => 'dimensions',
'settings' => 'mainmenu_border_radius',
'section' => 'main_menu',
'label' => esc_attr__( 'Menu Border Radius', 'envo-extra' ),
'priority' => 20,
'default' => array(
'border-top-left-radius' => '0px',
'border-top-right-radius' => '0px',
'border-bottom-left-radius' => '0px',
'border-bottom-right-radius' => '0px',
),
'choices' => array(
'labels' => array(
'border-top-left-radius' => esc_attr__( 'Top Left', 'textdomain' ),
'border-top-right-radius' => esc_attr__( 'Top Right', 'textdomain' ),
'border-bottom-left-radius' => esc_attr__( 'Bottom Left', 'textdomain' ),
'border-bottom-right-radius' => esc_attr__( 'Bottom Right', 'textdomain' ),
),
),
'transport' => 'auto',
'output' => array(
array(
'element' => '#second-site-navigation',
),
),
'active_callback' => array(
array(
'setting' => 'mainmenu_border_style',
'operator' => '!=',
'value' => 'none',
),
array(
array(
'setting' => 'header_layout',
'operator' => '==',
'value' => 'woonav',
),
),
),
) );
Kirki::add_field( 'envo_extra', array(
'type' => 'color',
'settings' => 'mainmenu_border_color',
'label' => esc_attr__( 'Menu border color', 'envo-extra' ),
'section' => 'main_menu',
'default' => '',
'transport' => 'auto',
'priority' => 20,
'output' => array(
array(
'element' => '#second-site-navigation',
'property' => 'border-color',
),
),
'active_callback' => array(
array(
'setting' => 'mainmenu_border_style',
'operator' => '!=',
'value' => 'none',
),
array(
array(
'setting' => 'header_layout',
'operator' => '==',
'value' => 'woonav',
),
),
),
) );
// Border end.
// Separator.
Kirki::add_field( 'envo_extra', array(
'type' => 'custom',
'settings' => 'mainmenu_border_separator_bottom',
'section' => 'main_menu',
'priority' => 20,
'default' => '<hr style="border-top: 1px solid #ccc; border-bottom: 1px solid #f8f8f8; margin: 0;">',
'active_callback' => array(
array(
'setting' => 'header_layout',
'operator' => '==',
'value' => 'woonav',
),
),
) );
Kirki::add_field( 'envo_extra', array(
'type' => 'text',
'settings' => 'mainmenu_border_box_shadow_code',
'label' => esc_html__( 'Menu shadow', 'envo-extra' ),
'description' => esc_attr__( 'e.g. 5px 5px 15px 5px #000000', 'envo-extra' ),
'section' => 'main_menu',
'priority' => 20,
'output' => array(
array(
'element' => '#second-site-navigation',
'property' => 'box-shadow',
),
),
'active_callback' => array(
array(
'setting' => 'header_layout',
'operator' => '==',
'value' => 'woonav',
),
),
) );
// Box shadow end.
Kirki::add_field( 'envo_extra', array(
'type' => 'color',
'settings' => 'categories_search_bar_bg',
'label' => esc_attr__( 'Secondary bar background color', 'envo-extra' ),
'section' => 'main_menu',
'default' => '',
'transport' => 'auto',
'priority' => 20,
'output' => array(
array(
'element' => '#second-site-navigation',
'property' => 'background-color',
),
),
'active_callback' => array(
array(
'setting' => 'header_layout',
'operator' => '==',
'value' => 'woonav',
),
),
) );
// Separator.
Kirki::add_field( 'envo_extra', array(
'type' => 'custom',
'settings' => 'submenu_border_style_separator',
'section' => 'main_menu',
'priority' => 30,
'default' => '<hr style="border-top: 1px solid #ccc; border-bottom: 1px solid #f8f8f8; margin: 0;">',
) );
// Border start.
Kirki::add_field( 'envo_extra', array(
'type' => 'select',
'settings' => 'submenu_border_style',
'label' => esc_html__( 'Sub-menu border', 'envo-extra' ),
'section' => 'main_menu',
'default' => 'solid',
'priority' => 30,
'placeholder' => esc_html__( 'Choose an option', 'envo-extra' ),
'choices' => array(
'none' => esc_html__( 'None', 'envo-extra' ),
'solid' => esc_html__( 'Solid', 'envo-extra' ),
'double' => esc_html__( 'Double', 'envo-extra' ),
'dotted' => esc_html__( 'Dotted', 'envo-extra' ),
'dashed' => esc_html__( 'Dashed', 'envo-extra' ),
'groove' => esc_html__( 'Groove', 'envo-extra' ),
),
'transport' => 'auto',
'output' => array(
array(
'element' => '.navbar-nav li:hover .dropdown-menu',
'property' => 'border-style',
),
)
)
);
Kirki::add_field( 'envo_extra', array(
'type' => 'dimensions',
'settings' => 'submenu_border_width',
'label' => esc_attr__( 'Sub-menu border width', 'envo-extra' ),
'section' => 'main_menu',
'priority' => 30,
'default' => array(
'border-top-width' => '1px',
'border-bottom-width' => '1px',
),
'choices' => array(
'labels' => array(
'border-top-width' => esc_attr__( 'Top', 'textdomain' ),
'border-right-width' => esc_attr__( 'Bottom', 'textdomain' ),
),
),
'transport' => 'auto',
'output' => array(
array(
'element' => '.navbar-nav li:hover .dropdown-menu',
),
),
'active_callback' => array(
array(
'setting' => 'submenu_border_style',
'operator' => '!=',
'value' => 'none',
),
),
) );
Kirki::add_field( 'envo_extra', array(
'type' => 'dimensions',
'settings' => 'submenu_border_radius',
'section' => 'main_menu',
'label' => esc_attr__( 'Sub-menu border radius', 'envo-extra' ),
'priority' => 30,
'default' => array(
'border-top-left-radius' => '0px',
'border-top-right-radius' => '0px',
'border-bottom-left-radius' => '0px',
'border-bottom-right-radius' => '0px',
),
'choices' => array(
'labels' => array(
'border-top-left-radius' => esc_attr__( 'Top Left', 'textdomain' ),
'border-top-right-radius' => esc_attr__( 'Top Right', 'textdomain' ),
'border-bottom-left-radius' => esc_attr__( 'Bottom Left', 'textdomain' ),
'border-bottom-right-radius' => esc_attr__( 'Bottom Right', 'textdomain' ),
),
),
'transport' => 'auto',
'output' => array(
array(
'element' => '.navbar-nav li:hover .dropdown-menu',
),
),
'active_callback' => array(
array(
'setting' => 'submenu_border_style',
'operator' => '!=',
'value' => 'none',
),
),
) );
Kirki::add_field( 'envo_extra', array(
'type' => 'color',
'settings' => 'submenu_border_color',
'label' => esc_attr__( 'Sub-menu border color', 'envo-extra' ),
'section' => 'main_menu',
'default' => '#f6f6f6',
'transport' => 'auto',
'priority' => 30,
'output' => array(
array(
'element' => '.navbar-nav li:hover .dropdown-menu',
'property' => 'border-color',
),
),
'active_callback' => array(
array(
'setting' => 'submenu_border_style',
'operator' => '!=',
'value' => 'none',
),
),
) );
// Border end.
// Separator.
Kirki::add_field( 'envo_extra', array(
'type' => 'custom',
'settings' => 'submenu_box_shadow_top',
'section' => 'main_menu',
'priority' => 40,
'default' => '<hr style="border-top: 1px solid #ccc; border-bottom: 1px solid #f8f8f8; margin: 0;">',
) );
Kirki::add_field( 'envo_extra', array(
'type' => 'text',
'settings' => 'submenu_box_shadow_code',
'label' => esc_html__( 'Sub-menu box shadow', 'envo-extra' ),
'description' => esc_attr__( 'e.g. 5px 5px 15px 5px #000000', 'envo-extra' ),
'section' => 'main_menu',
'priority' => 40,
'output' => array(
array(
'element' => '.navbar-nav li:hover .dropdown-menu',
'property' => 'box-shadow',
),
),
) );
// Separator.
Kirki::add_field( 'envo_extra', array(
'type' => 'custom',
'settings' => 'mainmenu_desc_color_top',
'section' => 'main_menu',
'priority' => 40,
'default' => '<hr style="border-top: 1px solid #ccc; border-bottom: 1px solid #f8f8f8; margin: 0;">',
) );
Kirki::add_field( 'envo_extra', array(
'type' => 'multicolor',
'settings' => 'mainmenu_desc_color',
'label' => esc_attr__( 'Menu badge (description) colors', 'envo-extra' ),
'section' => 'main_menu',
'default' => '',
'transport' => 'auto',
'priority' => 40,
'choices' => array(
'font' => esc_attr__( 'Font', 'envo-extra' ),
'bg' => esc_attr__( 'Background', 'envo-extra' ),
),
'default' => array(
'font' => '',
'bg' => '',
),
'output' => array(
array(
'choice' => 'font',
'element' => '.menu-item .menu-description, .mobile-cart .amount-cart, .mobile-cart .cart-contents span.count',
'property' => 'color',
),
array(
'choice' => 'bg',
'element' => '.menu-item .menu-description, .mobile-cart .amount-cart, .mobile-cart .cart-contents span.count',
'property' => 'background-color',
),
array(
'choice' => 'bg',
'element' => '.menu-item .menu-description:after',
'property' => 'border-top-color',
),
array(
'choice' => 'bg',
'element' => '.mobile-cart .amount-cart:before',
'property' => 'border-right-color',
),
),
) );
Kirki::add_field( 'envo_extra', array(
'type' => 'color',
'settings' => 'hamburger_menu_color_bg',
'label' => esc_attr__( 'Mobile hamburger menu icon color', 'envo-extra' ),
'section' => 'main_menu',
'default' => '',
'transport' => 'auto',
'priority' => 40,
'output' => array(
array(
'element' => '.menu-button a.open-panel span',
'property' => 'background-color',
),
),
) );
// Separator.
Kirki::add_field( 'envo_extra', array(
'type' => 'custom',
'settings' => 'typography_category_menu_separator_top',
'section' => 'category_menu',
'priority' => 10,
'default' => '<hr style="border-top: 1px solid #ccc; border-bottom: 1px solid #f8f8f8; margin: 0;">',
) );
// Title.
Kirki::add_field( 'envo_extra', array(
'type' => 'responsive_devices',
'label' => esc_attr__( 'Menu Font', 'envo-extra' ),
'section' => 'category_menu',
'settings' => 'typography_category_menu_devices',
'priority' => 10,
) );
// Responsive field.
foreach ( $devices as $key => $value ) {
Kirki::add_field( 'envo_extra', array(
'type' => 'typography',
'settings' => 'typography_category_menu' . $key,
'description' => $value[ 'description' ],
'section' => 'category_menu',
'transport' => 'auto',
'choices' => array(
'fonts' => envo_extra_fonts(),
),
'default' => array(
'font-family' => '',
'font-size' => '15px',
'variant' => '400',
'letter-spacing' => '0px',
'text-transform' => 'uppercase',
'word-spacing' => '0px',
'text-decoration' => 'none',
'color' => ''
),
'priority' => 15,
'output' => array(
array(
'element' => '.envo-categories-menu, .envo-categories-menu > li > a, .envo-categories-menu .dropdown-menu > li > a',
$value[ 'media_query_key' ] => $value[ 'media_query' ],
),
),
) );
}
// Separator.
Kirki::add_field( 'envo_extra', array(
'type' => 'custom',
'settings' => 'categories_colors_separator',
'section' => 'category_menu',
'priority' => 20,
'default' => '<hr style="border-top: 1px solid #ccc; border-bottom: 1px solid #f8f8f8; margin: 0;">',
) );
Kirki::add_field( 'envo_extra', array(
'type' => 'multicolor',
'settings' => 'categories_colors',
'label' => esc_attr__( 'Category menu', 'envo-extra' ),
'section' => 'category_menu',
'priority' => 20,
'transport' => 'auto',
'choices' => array(
'bg' => esc_attr__( 'Background', 'envo-extra' ),
),
'default' => array(
'font' => '',
),
'output' => array(
array(
'choice' => 'bg',
'element' => '.navbar-nav.envo-categories-menu',
'property' => 'background-color',
'suffix' => '!important',
),
),
) );
// Separator.
Kirki::add_field( 'envo_extra', array(
'type' => 'custom',
'settings' => 'category_menu_colors_separator',
'section' => 'category_menu',
'priority' => 20,
'default' => '<hr style="border-top: 1px solid #ccc; border-bottom: 1px solid #f8f8f8; margin: 0;">',
) );
Kirki::add_field( 'envo_extra', array(
'type' => 'multicolor',
'settings' => 'category_menu_colors',
'label' => esc_attr__( 'Sub-level menu colors', 'envo-extra' ),
'section' => 'category_menu',
'priority' => 20,
'transport' => 'auto',
'choices' => array(
'bg_color_mainmenu' => esc_attr__( 'Menu Background', 'envo-extra' ),
'text_hover_mainmenu' => esc_attr__( 'Font hover', 'envo-extra' ),
'bg_text_hover_mainmenu' => esc_attr__( 'Item background hover', 'envo-extra' ),
'active_text_mainmenu' => esc_attr__( 'Active item font', 'envo-extra' ),
'active_text_bg_mainmenu' => esc_attr__( 'Active item background', 'envo-extra' ),
),
'default' => array(
'bg_color_mainmenu' => '',
'text_hover_mainmenu' => '',
'bg_text_hover_mainmenu' => '',
'active_text_mainmenu' => '',
'active_text_bg_mainmenu' => '',
),
'output' => array(
array(
'choice' => 'bg_color_mainmenu',
'element' => '.envo-categories-menu .dropdown-menu',
'property' => 'background-color',
),
array(
'choice' => 'text_hover_mainmenu',
'element' => '.envo-categories-menu > a:hover, .envo-categories-menu > li > a:hover, .envo-categories-menu.nav.navbar-nav .dropdown-menu > li > a:hover',
'property' => 'color',
),
array(
'choice' => 'bg_text_hover_mainmenu',
'element' => '.envo-categories-menu > li > a:hover, .envo-categories-menu .dropdown-menu > li > a:hover, .envo-categories-menu .dropdown-menu > a:hover',
'property' => 'background-color',
),
array(
'choice' => 'active_text_mainmenu',
'element' => '.envo-categories-menu > li.active > a, .envo-categories-menu .dropdown-menu > .active.current-menu-item > a, .envo-categories-menu .dropdown-menu > .active > a',
'property' => 'color',
),
array(
'choice' => 'active_text_bg_mainmenu',
'element' => '.envo-categories-menu > li.active > a, .envo-categories-menu .dropdown-menu > .active.current-menu-item > a, .envo-categories-menu .dropdown-menu > .active > a',
'property' => 'background-color',
),
),
) );
// Separator.
Kirki::add_field( 'envo_extra', array(
'type' => 'custom',
'settings' => 'typography_secondary_menu_separator_top',
'section' => 'secondary_menu',
'priority' => 10,
'default' => '<hr style="border-top: 1px solid #ccc; border-bottom: 1px solid #f8f8f8; margin: 0;">',
) );
// Title.
Kirki::add_field( 'envo_extra', array(
'type' => 'responsive_devices',
'label' => esc_attr__( 'Menu Font', 'envo-extra' ),
'section' => 'secondary_menu',
'settings' => 'typography_secondary_menu_devices',
'priority' => 10,
) );
// Responsive field.
foreach ( $devices as $key => $value ) {
Kirki::add_field( 'envo_extra', array(
'type' => 'typography',
'settings' => 'typography_secondary_menu' . $key,
'description' => $value[ 'description' ],
'section' => 'secondary_menu',
'transport' => 'auto',
'choices' => array(
'fonts' => envo_extra_fonts(),
),
'default' => array(
'font-family' => '',
'font-size' => '14px',
'variant' => '400',
'letter-spacing' => '0px',
'text-transform' => 'none',
'word-spacing' => '0px',
'text-decoration' => 'none',
'color' => ''
),
'priority' => 15,
'output' => array(
array(
'element' => '#theme-menu-second .navbar-nav > li > a',
$value[ 'media_query_key' ] => $value[ 'media_query' ],
)
),
) );
}
// Separator.
Kirki::add_field( 'envo_extra', array(
'type' => 'custom',
'settings' => 'typography_secondary_menu_separator_bottom',
'section' => 'secondary_menu',
'priority' => 20,
'default' => '<hr style="border-top: 1px solid #ccc; border-bottom: 1px solid #f8f8f8; margin: 0;">',
) );
Kirki::add_field( 'envo_extra', array(
'type' => 'multicolor',
'settings' => 'secondary_menu_colors',
'label' => esc_attr__( 'Secondary Menu', 'envo-extra' ),
'section' => 'secondary_menu',
'priority' => 20,
'transport' => 'auto',
'choices' => array(
'font-hover' => esc_attr__( 'Font hover', 'envo-extra' ),
'bg' => esc_attr__( 'Background', 'envo-extra' ),
'bg-hover' => esc_attr__( 'Background hover', 'envo-extra' ),
'font-active' => esc_attr__( 'Font active', 'envo-extra' ),
'bg-active' => esc_attr__( 'Background active', 'envo-extra' ),
),
'default' => array(
'bg' => '',
'font-hover' => '',
'bg-hover' => '',
'font-active' => '',
'bg-active' => '',
),
'output' => array(
array(
'choice' => 'bg',
'element' => '#theme-menu-second .navbar-nav > li > a',
'property' => 'background-color',
'suffix' => '!important',
),
array(
'choice' => 'font-hover',
'element' => '#theme-menu-second .navbar-nav > li > a:hover',
'property' => 'color',
'suffix' => '!important',
),
array(
'choice' => 'bg-hover',
'element' => '#theme-menu-second .navbar-nav > li > a:hover',
'property' => 'background-color',
'suffix' => '!important',
),
array(
'choice' => 'font-active',
'element' => '#theme-menu-second .navbar-nav > li.active > a',
'property' => 'color',
'suffix' => '!important',
),
array(
'choice' => 'bg-active',
'element' => '#theme-menu-second .navbar-nav > li.active > a',
'property' => 'background-color',
'suffix' => '!important',
),
),
) );
@@ -0,0 +1,883 @@
<?php
if (!class_exists('Kirki')) {
return;
}
Kirki::add_section('blog_posts', array(
'title' => esc_attr__('Blog posts archive', 'envo-extra'),
'panel' => 'envo_theme_panel',
'priority' => 25,
));
Kirki::add_section('posts_pages', array(
'title' => esc_attr__('Single post and page', 'envo-extra'),
'panel' => 'envo_theme_panel',
'priority' => 30,
));
$devices = array(
'desktop' => array(
'media_query_key' => '',
'media_query' => '',
'description' => 'Desktop',
),
'tablet' => array(
'media_query_key' => 'media_query',
'media_query' => '@media (max-width: 991px)',
'description' => 'Tablet',
),
'mobile' => array(
'media_query_key' => 'media_query',
'media_query' => '@media (max-width: 787px)',
'description' => 'Mobile',
),
);
/**
* Single post and page
*/
Kirki::add_field('envo_extra', array(
'type' => 'sortable',
'settings' => 'single_layout',
'label' => esc_html__('Layout', 'envo-extra'),
'section' => 'posts_pages',
'default' => array(
'image',
'title',
'meta',
'content',
'cats-tags',
'nav'
),
'choices' => array(
'image' => esc_html__('Image', 'envo-extra'),
'title' => esc_html__('Title', 'envo-extra'),
'meta' => esc_html__('Meta', 'envo-extra'),
'content' => esc_html__('Content', 'envo-extra'),
'cats_tags' => esc_html__('Categories & Tags', 'envo-extra'),
'nav' => esc_html__('Navigation', 'envo-extra'),
),
'priority' => 10,
));
Kirki::add_field('envo_extra', array(
'type' => 'radio-buttonset',
'settings' => 'posts_pages_date_single',
'label' => esc_attr__('Meta Date', 'envo-extra'),
'section' => 'posts_pages',
'default' => 'inline-block',
'priority' => 10,
'transport' => 'auto',
'choices' => array(
'inline-block' => esc_attr__('Visible', 'envo-extra'),
'none' => esc_attr__('Hidden', 'envo-extra'),
),
'output' => array(
array(
'element' => '.single-post .posted-date',
'property' => 'display',
),
),
'active_callback' => array(
array(
'setting' => 'single_layout',
'operator' => 'in',
'value' => 'meta',
),
),
));
Kirki::add_field('envo_extra', array(
'type' => 'radio-buttonset',
'settings' => 'posts_pages_comments_single',
'label' => esc_attr__('Meta comments', 'envo-extra'),
'section' => 'posts_pages',
'default' => 'inline-block',
'priority' => 10,
'transport' => 'auto',
'choices' => array(
'inline-block' => esc_attr__('Visible', 'envo-extra'),
'none' => esc_attr__('Hidden', 'envo-extra'),
),
'output' => array(
array(
'element' => '.single-post .comments-meta',
'property' => 'display',
),
),
'active_callback' => array(
array(
'setting' => 'single_layout',
'operator' => 'in',
'value' => 'meta',
),
),
));
Kirki::add_field('envo_extra', array(
'type' => 'radio-buttonset',
'settings' => 'posts_pages_author_single',
'label' => esc_attr__('Meta Author', 'envo-extra'),
'section' => 'posts_pages',
'default' => 'inline-block',
'priority' => 10,
'transport' => 'auto',
'choices' => array(
'inline-block' => esc_attr__('Visible', 'envo-extra'),
'none' => esc_attr__('Hidden', 'envo-extra'),
),
'output' => array(
array(
'element' => '.single-post .author-meta',
'property' => 'display',
),
),
'active_callback' => array(
array(
'setting' => 'single_layout',
'operator' => 'in',
'value' => 'meta',
),
),
));
// Separator.
Kirki::add_field('envo_extra', array(
'type' => 'custom',
'settings' => 'posts_pages_title_font_separator_top',
'section' => 'posts_pages',
'priority' => 10,
'default' => '<hr style="border-top: 1px solid #ccc; border-bottom: 1px solid #f8f8f8; margin: 0;">',
));
// Title.
Kirki::add_field('envo_extra', array(
'type' => 'responsive_devices',
'label' => esc_attr__('Article title', 'envo-extra'),
'section' => 'posts_pages',
'settings' => 'posts_pages_title_font_devices',
'priority' => 11,
));
// Responsive field.
foreach ($devices as $key => $value) {
Kirki::add_field('envo_extra', array(
'type' => 'typography',
'settings' => 'posts_pages_title_font' . $key,
'description' => $value['description'],
'section' => 'posts_pages',
'transport' => 'auto',
'choices' => array(
'fonts' => envo_extra_fonts(),
),
'default' => array(
'font-family' => '',
'variant' => '',
'letter-spacing' => '0px',
'font-size' => '',
'text-transform' => 'none',
'color' => '',
'text-align' => 'none',
),
'priority' => 15,
'output' => array(
array(
'element' => 'h1.single-title',
$value['media_query_key'] => $value['media_query'],
),
),
));
}
// Separator.
Kirki::add_field('envo_extra', array(
'type' => 'custom',
'settings' => 'posts_pages_content_font_separator_top',
'section' => 'posts_pages',
'priority' => 20,
'default' => '<hr style="border-top: 1px solid #ccc; border-bottom: 1px solid #f8f8f8; margin: 0;">',
));
// Title.
Kirki::add_field('envo_extra', array(
'type' => 'responsive_devices',
'label' => esc_attr__('Content font', 'envo-extra'),
'section' => 'posts_pages',
'settings' => 'posts_pages_content_font_devices',
'priority' => 20,
));
// Responsive field.
foreach ($devices as $key => $value) {
Kirki::add_field('envo_extra', array(
'type' => 'typography',
'settings' => 'posts_pages_content_font' . $key,
'description' => $value['description'],
'section' => 'posts_pages',
'transport' => 'auto',
'choices' => array(
'use_media_queries' => true,
'fonts' => envo_extra_fonts(),
),
'default' => array(
'font-family' => '',
'variant' => '',
'letter-spacing' => '0px',
'font-size' => '',
'text-transform' => 'none',
'color' => '',
'line-height' => '',
'word-spacing' => '0px',
'text-align' => 'none',
),
'priority' => 21,
'output' => array(
array(
'element' => '.single article .post, .page article .page, .single article .posted-date, .single .cat-links span, .single .tags-links span',
$value['media_query_key'] => $value['media_query'],
),
array(
'choice' => 'color',
'property' => 'color',
'element' => '.single span.comments-meta i',
$value['media_query_key'] => $value['media_query'],
),
),
));
}
// Separator.
Kirki::add_field('envo_extra', array(
'type' => 'custom',
'settings' => 'single_border_top',
'section' => 'posts_pages',
'priority' => 30,
'default' => '<hr style="border-top: 1px solid #ccc; border-bottom: 1px solid #f8f8f8; margin: 0;">',
));
// Border start.
Kirki::add_field('envo_extra', array(
'type' => 'select',
'settings' => 'single_border_style',
'label' => esc_html__('Article border', 'envo-extra'),
'section' => 'posts_pages',
'default' => 'none',
'priority' => 30,
'placeholder' => esc_html__('Choose an option', 'envo-extra'),
'choices' => array(
'none' => esc_html__('None', 'envo-extra'),
'solid' => esc_html__('Solid', 'envo-extra'),
'double' => esc_html__('Double', 'envo-extra'),
'dotted' => esc_html__('Dotted', 'envo-extra'),
'dashed' => esc_html__('Dashed', 'envo-extra'),
'groove' => esc_html__('Groove', 'envo-extra'),
),
'transport' => 'auto',
'output' => array(
array(
'element' => '.single-post-content',
'property' => 'border-style',
),
)
)
);
Kirki::add_field('envo_extra', array(
'type' => 'dimensions',
'settings' => 'single_border_width',
'label' => esc_attr__('Article Border Width', 'envo-extra'),
'section' => 'posts_pages',
'priority' => 30,
'default' => array(
'border-top-width' => '0px',
'border-right-width' => '0px',
'border-bottom-width' => '0px',
'border-left-width' => '0px',
),
'choices' => array(
'labels' => array(
'border-top-width' => esc_attr__('Top', 'textdomain'),
'border-right-width' => esc_attr__('Bottom', 'textdomain'),
'border-bottom-width' => esc_attr__('Left', 'textdomain'),
'border-left-width' => esc_attr__('Right', 'textdomain'),
),
),
'transport' => 'auto',
'output' => array(
array(
'element' => '.single-post-content',
),
),
'active_callback' => array(
array(
'setting' => 'single_border_style',
'operator' => '!=',
'value' => 'none',
),
),
));
Kirki::add_field('envo_extra', array(
'type' => 'dimensions',
'settings' => 'single_border_radius',
'section' => 'posts_pages',
'label' => esc_attr__('Article Border Radius', 'envo-extra'),
'priority' => 30,
'default' => array(
'border-top-left-radius' => '0px',
'border-top-right-radius' => '0px',
'border-bottom-left-radius' => '0px',
'border-bottom-right-radius' => '0px',
),
'choices' => array(
'labels' => array(
'border-top-left-radius' => esc_attr__('Top Left', 'textdomain'),
'border-top-right-radius' => esc_attr__('Top Right', 'textdomain'),
'border-bottom-left-radius' => esc_attr__('Bottom Left', 'textdomain'),
'border-bottom-right-radius' => esc_attr__('Bottom Right', 'textdomain'),
),
),
'transport' => 'auto',
'output' => array(
array(
'element' => '.single-post-content',
),
),
'active_callback' => array(
array(
'setting' => 'single_border_style',
'operator' => '!=',
'value' => 'none',
),
),
));
Kirki::add_field('envo_extra', array(
'type' => 'color',
'settings' => 'single_border_color',
'label' => esc_attr__('Article border color', 'envo-extra'),
'section' => 'posts_pages',
'default' => '',
'transport' => 'auto',
'priority' => 30,
'output' => array(
array(
'element' => '.single-post-content',
'property' => 'border-color',
),
),
'active_callback' => array(
array(
'setting' => 'single_border_style',
'operator' => '!=',
'value' => 'none',
),
),
));
// Border end.
// Separator.
Kirki::add_field('envo_extra', array(
'type' => 'custom',
'settings' => 'single_border_style_separator_bottom',
'section' => 'posts_pages',
'priority' => 30,
'default' => '<hr style="border-top: 1px solid #ccc; border-bottom: 1px solid #f8f8f8; margin: 0;">',
));
Kirki::add_field('envo_extra', array(
'type' => 'text',
'settings' => 'single_box_shadow_code',
'label' => esc_html__('Article box shadow', 'envo-extra'),
'description' => esc_attr__('e.g. 5px 5px 15px 5px #000000', 'envo-extra'),
'section' => 'posts_pages',
'priority' => 30,
'output' => array(
array(
'element' => '.single-post-content',
'property' => 'box-shadow',
),
),
));
// Box shadow end.
// Separator.
Kirki::add_field('envo_extra', array(
'type' => 'custom',
'settings' => 'single_spacing_separator_top',
'section' => 'posts_pages',
'priority' => 30,
'default' => '<hr style="border-top: 1px solid #ccc; border-bottom: 1px solid #f8f8f8; margin: 0;">',
));
// Title.
Kirki::add_field('envo_extra', array(
'type' => 'responsive_devices',
'label' => esc_attr__('Article spacing', 'envo-extra'),
'section' => 'posts_pages',
'settings' => 'Single_spacing_devices',
'priority' => 30,
));
// Responsive field.
foreach ($devices as $key => $value) {
Kirki::add_field('envo_extra', array(
'description' => $value['description'],
'type' => 'dimensions',
'settings' => 'single_spacing' . $key,
'section' => 'posts_pages',
'priority' => 35,
'default' => array(
'top' => '0px',
'right' => '0px',
'bottom' => '0px',
'left' => '0px',
),
'transport' => 'auto',
'output' => array(
array(
'property' => 'padding',
'element' => '.single-post-content',
$value['media_query_key'] => $value['media_query'],
),
),
));
}
// Separator.
Kirki::add_field('envo_extra', array(
'type' => 'custom',
'settings' => 'single_spacing_separator_bottom',
'section' => 'posts_pages',
'priority' => 40,
'default' => '<hr style="border-top: 1px solid #ccc; border-bottom: 1px solid #f8f8f8; margin: 0;">',
));
/**
* Blog posts archive
*/
Kirki::add_field('envo_extra', array(
'type' => 'sortable',
'settings' => 'blog_layout',
'label' => esc_html__('Layout', 'envo-extra'),
'section' => 'blog_posts',
'default' => array(
'image',
'title',
'meta',
'excerpt'
),
'choices' => array(
'image' => esc_html__('Image', 'envo-extra'),
'title' => esc_html__('Title', 'envo-extra'),
'meta' => esc_html__('Meta', 'envo-extra'),
'excerpt' => esc_html__('Excerpt', 'envo-extra'),
),
'priority' => 10,
));
Kirki::add_field('envo_extra', array(
'type' => 'radio-buttonset',
'settings' => 'posts_pages_date',
'label' => esc_attr__('Date', 'envo-extra'),
'section' => 'blog_posts',
'default' => 'inline-block',
'priority' => 10,
'transport' => 'auto',
'choices' => array(
'inline-block' => esc_attr__('Visible', 'envo-extra'),
'none' => esc_attr__('Hidden', 'envo-extra'),
),
'output' => array(
array(
'element' => '.news-item .posted-date',
'property' => 'display',
),
),
));
Kirki::add_field('envo_extra', array(
'type' => 'radio-buttonset',
'settings' => 'posts_pages_comments',
'label' => esc_attr__('Comments', 'envo-extra'),
'section' => 'blog_posts',
'default' => 'inline-block',
'priority' => 10,
'transport' => 'auto',
'choices' => array(
'inline-block' => esc_attr__('Visible', 'envo-extra'),
'none' => esc_attr__('Hidden', 'envo-extra'),
),
'output' => array(
array(
'element' => '.news-item .comments-meta',
'property' => 'display',
),
),
));
Kirki::add_field('envo_extra', array(
'type' => 'radio-buttonset',
'settings' => 'posts_pages_author',
'label' => esc_attr__('Author', 'envo-extra'),
'section' => 'blog_posts',
'default' => 'inline-block',
'priority' => 10,
'transport' => 'auto',
'choices' => array(
'inline-block' => esc_attr__('Visible', 'envo-extra'),
'none' => esc_attr__('Hidden', 'envo-extra'),
),
'output' => array(
array(
'element' => '.news-item .author-meta',
'property' => 'display',
),
),
));
Kirki::add_field('envo_extra', array(
'type' => 'slider',
'settings' => 'blog_posts_excerpt_number_words',
'label' => esc_attr__('Number of words in excerpt', 'envo-extra'),
'section' => 'blog_posts',
'default' => 10,
'priority' => 10,
'choices' => array(
'min' => '0',
'max' => '150',
'step' => '1',
),
));
// Separator.
Kirki::add_field('envo_extra', array(
'type' => 'custom',
'settings' => 'blog_posts_title_font_separator_top',
'section' => 'blog_posts',
'priority' => 10,
'default' => '<hr style="border-top: 1px solid #ccc; border-bottom: 1px solid #f8f8f8; margin: 0;">',
));
// Title.
Kirki::add_field('envo_extra', array(
'type' => 'responsive_devices',
'label' => esc_attr__('Title Font', 'envo-extra'),
'section' => 'blog_posts',
'settings' => 'blog_posts_title_font_devices',
'priority' => 10,
));
// Responsive field.
foreach ($devices as $key => $value) {
Kirki::add_field('envo_extra', array(
'type' => 'typography',
'settings' => 'blog_posts_title_font' . $key,
'description' => $value['description'],
'section' => 'blog_posts',
'transport' => 'auto',
'choices' => array(
'fonts' => envo_extra_fonts(),
),
'default' => array(
'font-family' => '',
'variant' => '',
'letter-spacing' => '0px',
'font-size' => '',
'text-transform' => 'none',
'color' => '',
'line-height' => '',
'word-spacing' => '0px',
'text-align' => '',
),
'priority' => 15,
'output' => array(
array(
'element' => '.archive-item h2.entry-title a, .archive-item h2.entry-title',
$value['media_query_key'] => $value['media_query'],
),
),
));
}
// Separator.
Kirki::add_field('envo_extra', array(
'type' => 'custom',
'settings' => 'blog_posts_meta_font_separator_top',
'section' => 'blog_posts',
'priority' => 20,
'default' => '<hr style="border-top: 1px solid #ccc; border-bottom: 1px solid #f8f8f8; margin: 0;">',
));
// Title.
Kirki::add_field('envo_extra', array(
'type' => 'responsive_devices',
'label' => esc_attr__('Meta font', 'envo-extra'),
'section' => 'blog_posts',
'settings' => 'blog_posts_meta_font_devices',
'priority' => 20,
));
// Responsive field.
foreach ($devices as $key => $value) {
Kirki::add_field('envo_extra', array(
'type' => 'typography',
'settings' => 'blog_posts_meta_font' . $key,
'description' => $value['description'],
'section' => 'blog_posts',
'transport' => 'auto',
'choices' => array(
'fonts' => envo_extra_fonts(),
),
'default' => array(
'font-family' => '',
'variant' => '',
'letter-spacing' => '0px',
'font-size' => '',
'text-transform' => 'none',
'color' => '',
'line-height' => '',
'word-spacing' => '0px',
'text-align' => 'none',
),
'priority' => 25,
'output' => array(
array(
'element' => '.archive-item .article-meta, .archive-item .posted-date, .archive-item .author-meta, .archive-item .comments-meta',
$value['media_query_key'] => $value['media_query'],
),
),
));
}
// Separator.
Kirki::add_field('envo_extra', array(
'type' => 'custom',
'settings' => 'blog_posts_content_font_separator_top',
'section' => 'blog_posts',
'priority' => 30,
'default' => '<hr style="border-top: 1px solid #ccc; border-bottom: 1px solid #f8f8f8; margin: 0;">',
));
// Title.
Kirki::add_field('envo_extra', array(
'type' => 'responsive_devices',
'label' => esc_attr__('Excerpt font', 'envo-extra'),
'section' => 'blog_posts',
'settings' => 'blog_posts_content_font_devices',
'priority' => 30,
));
// Responsive field.
foreach ($devices as $key => $value) {
Kirki::add_field('envo_extra', array(
'type' => 'typography',
'settings' => 'blog_posts_content_font' . $key,
'description' => $value['description'],
'section' => 'blog_posts',
'transport' => 'auto',
'choices' => array(
'fonts' => envo_extra_fonts(),
),
'default' => array(
'font-family' => '',
'variant' => '',
'letter-spacing' => '0px',
'font-size' => '',
'text-transform' => 'none',
'color' => '',
'line-height' => '',
'word-spacing' => '0px',
'text-align' => 'none',
),
'priority' => 35,
'output' => array(
array(
'element' => '.archive-item .post-excerpt',
$value['media_query_key'] => $value['media_query'],
),
),
));
}
// Separator.
Kirki::add_field('envo_extra', array(
'type' => 'custom',
'settings' => 'blog_border_style_separator_top',
'section' => 'blog_posts',
'priority' => 50,
'default' => '<hr style="border-top: 1px solid #ccc; border-bottom: 1px solid #f8f8f8; margin: 0;">',
));
// Border start.
Kirki::add_field('envo_extra', array(
'type' => 'select',
'settings' => 'blog_border_style',
'label' => esc_html__('Article border', 'envo-extra'),
'section' => 'blog_posts',
'default' => 'none',
'priority' => 50,
'placeholder' => esc_html__('Choose an option', 'envo-extra'),
'choices' => array(
'none' => esc_html__('None', 'envo-extra'),
'solid' => esc_html__('Solid', 'envo-extra'),
'double' => esc_html__('Double', 'envo-extra'),
'dotted' => esc_html__('Dotted', 'envo-extra'),
'dashed' => esc_html__('Dashed', 'envo-extra'),
'groove' => esc_html__('Groove', 'envo-extra'),
),
'transport' => 'auto',
'output' => array(
array(
'element' => '.archive-item',
'property' => 'border-style',
),
)
)
);
Kirki::add_field('envo_extra', array(
'type' => 'dimensions',
'settings' => 'blog_border_width',
'label' => esc_attr__('Article Border Width', 'envo-extra'),
'section' => 'blog_posts',
'priority' => 50,
'default' => array(
'border-top-width' => '0px',
'border-right-width' => '0px',
'border-bottom-width' => '0px',
'border-left-width' => '0px',
),
'choices' => array(
'labels' => array(
'border-top-width' => esc_attr__('Top', 'textdomain'),
'border-right-width' => esc_attr__('Bottom', 'textdomain'),
'border-bottom-width' => esc_attr__('Left', 'textdomain'),
'border-left-width' => esc_attr__('Right', 'textdomain'),
),
),
'transport' => 'auto',
'output' => array(
array(
'element' => '.archive-item',
),
),
'active_callback' => array(
array(
'setting' => 'blog_border_style',
'operator' => '!=',
'value' => 'none',
),
),
));
Kirki::add_field('envo_extra', array(
'type' => 'dimensions',
'settings' => 'blog_border_radius',
'section' => 'blog_posts',
'label' => esc_attr__('Article Border Radius', 'envo-extra'),
'priority' => 50,
'default' => array(
'border-top-left-radius' => '0px',
'border-top-right-radius' => '0px',
'border-bottom-left-radius' => '0px',
'border-bottom-right-radius' => '0px',
),
'choices' => array(
'labels' => array(
'border-top-left-radius' => esc_attr__('Top Left', 'textdomain'),
'border-top-right-radius' => esc_attr__('Top Right', 'textdomain'),
'border-bottom-left-radius' => esc_attr__('Bottom Left', 'textdomain'),
'border-bottom-right-radius' => esc_attr__('Bottom Right', 'textdomain'),
),
),
'transport' => 'auto',
'output' => array(
array(
'element' => '.archive-item',
),
),
'active_callback' => array(
array(
'setting' => 'blog_border_style',
'operator' => '!=',
'value' => 'none',
),
),
));
Kirki::add_field('envo_extra', array(
'type' => 'color',
'settings' => 'blog_border_color',
'label' => esc_attr__('Article border color', 'envo-extra'),
'section' => 'blog_posts',
'default' => '',
'transport' => 'auto',
'priority' => 50,
'output' => array(
array(
'element' => '.archive-item',
'property' => 'border-color',
),
),
'active_callback' => array(
array(
'setting' => 'blog_border_style',
'operator' => '!=',
'value' => 'none',
),
),
));
// Border end.
// Separator.
Kirki::add_field('envo_extra', array(
'type' => 'custom',
'settings' => 'blog_box_shadow_separator_top',
'section' => 'blog_posts',
'priority' => 50,
'default' => '<hr style="border-top: 1px solid #ccc; border-bottom: 1px solid #f8f8f8; margin: 0;">',
));
Kirki::add_field('envo_extra', array(
'type' => 'text',
'settings' => 'blog_box_shadow_code',
'label' => esc_html__('Article box shadow', 'envo-extra'),
'description' => esc_attr__('e.g. 5px 5px 15px 5px #000000', 'envo-extra'),
'section' => 'blog_posts',
'priority' => 50,
'output' => array(
array(
'element' => '.archive-item',
'property' => 'box-shadow',
),
),
));
// Separator.
Kirki::add_field('envo_extra', array(
'type' => 'custom',
'settings' => 'blog_spacing_separator_top',
'section' => 'blog_posts',
'priority' => 50,
'default' => '<hr style="border-top: 1px solid #ccc; border-bottom: 1px solid #f8f8f8; margin: 0;">',
));
// Title.
Kirki::add_field('envo_extra', array(
'type' => 'responsive_devices',
'label' => esc_attr__('Article spacing', 'envo-extra'),
'section' => 'blog_posts',
'settings' => 'blog_spacing_devices',
'priority' => 50,
));
// Responsive field.
foreach ($devices as $key => $value) {
Kirki::add_field('envo_extra', array(
'description' => $value['description'],
'type' => 'dimensions',
'settings' => 'blog_spacing' . $key,
'section' => 'blog_posts',
'priority' => 60,
'default' => array(
'top' => '0px',
'right' => '0px',
'bottom' => '0px',
'left' => '0px',
),
'transport' => 'auto',
'output' => array(
array(
'property' => 'padding',
'element' => '.archive-item',
$value['media_query_key'] => $value['media_query'],
),
),
));
}
// Separator.
Kirki::add_field('envo_extra', array(
'type' => 'custom',
'settings' => 'blog_spacing_separator_bottom',
'section' => 'blog_posts',
'priority' => 70,
'default' => '<hr style="border-top: 1px solid #ccc; border-bottom: 1px solid #f8f8f8; margin: 0;">',
));
@@ -0,0 +1,193 @@
<?php
Kirki::add_field( 'envo_extra', array(
'type' => 'custom',
'settings' => 'sticky_menu_pro',
'section' => 'main_menu',
'priority' => 10,
'default' => '<a href="https://enwoo-wp.com/enwoo-pro/#sticky-menu" target="_blank"><img src="' . plugin_dir_url( __FILE__ ) . 'assets/img/pro/sticky-menu.jpg"/></a>',
) );
Kirki::add_field( 'envo_extra', array(
'type' => 'custom',
'settings' => 'sticky_sidebar_pro',
'section' => 'main_sidebar',
'priority' => 9,
'default' => '<a href="https://enwoo-wp.com/enwoo-pro/#sticky-sidebar" target="_blank"><img src="' . plugin_dir_url( __FILE__ ) . 'assets/img/pro/sticky-sidebar.jpg"/></a>',
) );
Kirki::add_field( 'envo_extra', array(
'type' => 'custom',
'settings' => 'disable_credits_pro',
'section' => 'footer_credits',
'priority' => 9,
'default' => '<a href="https://enwoo-wp.com/enwoo-pro/#footer-credits" target="_blank"><img src="' . plugin_dir_url( __FILE__ ) . 'assets/img/pro/footer-credits.jpg"/></a>',
) );
if ( envo_extra_check_for_elementor() ) { // Enable only with Elementor
Kirki::add_field( 'envo_extra', array(
'type' => 'custom',
'settings' => 'custom_elementor_footer_pro',
'section' => 'footer_credits',
'priority' => 4,
'default' => '<a href="https://enwoo-wp.com/enwoo-pro/#elementor-section" target="_blank"><img src="' . plugin_dir_url( __FILE__ ) . 'assets/img/pro/custom-elementor-footer.jpg"/></a>',
) );
Kirki::add_field( 'envo_extra', array(
'type' => 'custom',
'settings' => 'custom_elementor_header_pro',
'section' => 'header_title_tagline',
'priority' => 4,
'default' => '<a href="https://enwoo-wp.com/enwoo-pro/#elementor-section" target="_blank"><img src="' . plugin_dir_url( __FILE__ ) . 'assets/img/pro/custom-elementor-header.jpg"/></a>',
) );
Kirki::add_section('404_page', array(
'title' => esc_attr__('404 page', 'envo-extra'),
'panel' => 'envo_theme_panel',
'priority' => 80,
));
Kirki::add_field( 'envo_extra', array(
'type' => 'custom',
'settings' => 'custom_elementor_404_pro',
'section' => '404_page',
'priority' => 4,
'default' => '<a href="https://enwoo-wp.com/enwoo-pro/#elementor-section" target="_blank"><img src="' . plugin_dir_url( __FILE__ ) . 'assets/img/pro/custom-elementor-404.jpg"/></a>',
) );
}
Kirki::add_field( 'envo_extra', array(
'type' => 'custom',
'settings' => 'woo_archive_global_pro',
'section' => 'woo_archive_global_section',
'priority' => 5,
'default' => '<a href="https://enwoo-wp.com/enwoo-pro/#image-flipper" target="_blank"><img src="' . plugin_dir_url( __FILE__ ) . 'assets/img/pro/woo-archive-global.jpg"/></a>',
) );
Kirki::add_section( 'woo_archive_excerpt_section', array(
'title' => esc_attr__( 'Excerpt', 'envo-extra' ),
'panel' => 'woo_archive_section',
'priority' => 11,
) );
Kirki::add_field( 'envo_extra', array(
'type' => 'custom',
'settings' => 'woo_archive_excerpt_pro',
'section' => 'woo_archive_excerpt_section',
'priority' => 10,
'default' => '<a href="https://enwoo-wp.com/enwoo-pro/#excerpt" target="_blank"><img src="' . plugin_dir_url( __FILE__ ) . 'assets/img/pro/woo-excerpt.jpg"/></a>',
) );
Kirki::add_section('woo_archive_gallery', array(
'title' => esc_attr__('Archive gallery images', 'envo-extra'),
'panel' => 'woo_section_main',
'priority' => 8,
));
Kirki::add_field( 'envo_extra', array(
'type' => 'custom',
'settings' => 'woo_archive_gallery_images_pro',
'section' => 'woo_archive_gallery',
'priority' => 5,
'default' => '<a href="https://enwoo-wp.com/enwoo-pro/#gallery-images" target="_blank"><img src="' . plugin_dir_url( __FILE__ ) . 'assets/img/pro/woo-gallery-images.jpg"/></a>',
) );
Kirki::add_field( 'envo_extra', array(
'type' => 'custom',
'settings' => 'woo_cart_pro',
'section' => 'woo_cart_section',
'priority' => 9,
'default' => '<a href="https://enwoo-wp.com/enwoo-pro/#popup-cart" target="_blank"><img src="' . plugin_dir_url( __FILE__ ) . 'assets/img/pro/woo-cart.jpg"/></a>',
) );
Kirki::add_field( 'envo_extra', array(
'type' => 'custom',
'settings' => 'woo_search_pro',
'section' => 'woo_search_section',
'priority' => 9,
'default' => '<a href="https://enwoo-wp.com/enwoo-pro/#search-in-sku" target="_blank"><img src="' . plugin_dir_url( __FILE__ ) . 'assets/img/pro/woo-search-in-sku.jpg"/></a>',
) );
Kirki::add_field( 'envo_extra', array(
'type' => 'custom',
'settings' => 'woo_my_acocunt_pro',
'section' => 'woo_account_section',
'priority' => 11,
'default' => '<a href="https://enwoo-wp.com/enwoo-pro/#popup-account" target="_blank"><img src="' . plugin_dir_url( __FILE__ ) . 'assets/img/pro/woo-popup-account.jpg"/></a>',
) );
Kirki::add_section( 'woo_archive_off_canvas', array(
'title' => esc_attr__( 'Off Canvas Filter', 'envo-extra' ),
'panel' => 'woo_section_main',
'priority' => 9,
) );
Kirki::add_field( 'envo_extra', array(
'type' => 'custom',
'settings' => 'woo_off_canvas_pro',
'section' => 'woo_archive_off_canvas',
'priority' => 9,
'default' => '<a href="https://enwoo-wp.com/enwoo-pro/#off-canvas" target="_blank"><img src="' . plugin_dir_url( __FILE__ ) . 'assets/img/pro/woo-off-canvas.jpg"/></a>',
) );
Kirki::add_field( 'envo_extra', array(
'type' => 'custom',
'settings' => 'woo_ajax_add_cart_pro',
'section' => 'woo_product_global_section',
'priority' => 10,
'default' => '<a href="https://enwoo-wp.com/enwoo-pro/#ajax-add-cart" target="_blank"><img src="' . plugin_dir_url( __FILE__ ) . 'assets/img/pro/woo-ajax-add-cart.jpg"/></a>',
) );
Kirki::add_section( 'woo_archive_quick_view', array(
'title' => esc_attr__( 'Quick View', 'envo-extra' ),
'panel' => 'woo_section_main',
'priority' => 8,
) );
Kirki::add_field( 'envo_extra', array(
'type' => 'custom',
'settings' => 'woo_quick_view_pro',
'section' => 'woo_archive_quick_view',
'priority' => 10,
'default' => '<a href="https://enwoo-wp.com/enwoo-pro/#quick-view" target="_blank"><img src="' . plugin_dir_url( __FILE__ ) . 'assets/img/pro/woo-quick-view.jpg"/></a>',
) );
Kirki::add_section( 'woo_sale_countdown', array(
'title' => esc_attr__( 'Sale Countdown', 'envo-extra' ),
'panel' => 'woo_section_main',
'priority' => 7,
) );
Kirki::add_field( 'envo_extra', array(
'type' => 'custom',
'settings' => 'woo_sale_countdown_pro',
'section' => 'woo_sale_countdown',
'priority' => 10,
'default' => '<a href="https://enwoo-wp.com/enwoo-pro/#sale-countdown" target="_blank"><img src="' . plugin_dir_url( __FILE__ ) . 'assets/img/pro/woo-sale-countdown.jpg"/></a>',
) );
Kirki::add_section('woo_social_sharing', array(
'title' => esc_attr__('Social sharing', 'envo-extra'),
'panel' => 'woo_section_main',
'priority' => 8,
));
Kirki::add_field( 'envo_extra', array(
'type' => 'custom',
'settings' => 'woo_social_sharing_pro',
'section' => 'woo_social_sharing',
'priority' => 10,
'default' => '<a href="https://enwoo-wp.com/enwoo-pro/#social-sharing" target="_blank"><img src="' . plugin_dir_url( __FILE__ ) . 'assets/img/pro/woo-social-sharing.jpg"/></a>',
) );
Kirki::add_section('woo_swatches_section', array(
'title' => esc_attr__('Variation Swatches', 'envo-extra'),
'panel' => 'woo_section_main',
'priority' => 7,
));
Kirki::add_field( 'envo_extra', array(
'type' => 'custom',
'settings' => 'woo_swatches_section_pro',
'section' => 'woo_swatches_section',
'priority' => 10,
'default' => '<a href="https://enwoo-wp.com/enwoo-pro/#variation-swatches" target="_blank"><img src="' . plugin_dir_url( __FILE__ ) . 'assets/img/pro/woo-variation-swatches.jpg"/></a>',
) );
@@ -0,0 +1,677 @@
<?php
if (!class_exists('Kirki')) {
return;
}
Kirki::add_section('main_sidebar', array(
'title' => esc_attr__('Sidebar', 'envo-extra'),
'panel' => 'envo_theme_panel',
'priority' => 40,
));
$devices = array(
'desktop' => array(
'media_query_key' => '',
'media_query' => '',
'description' => 'Desktop',
),
'tablet' => array(
'media_query_key' => 'media_query',
'media_query' => '@media (max-width: 991px)',
'description' => 'Tablet',
),
'mobile' => array(
'media_query_key' => 'media_query',
'media_query' => '@media (max-width: 787px)',
'description' => 'Mobile',
),
);
Kirki::add_field('envo_extra', array(
'type' => 'radio-buttonset',
'settings' => 'main_sidebar_position',
'label' => esc_attr__('Sidebar position', 'envo-extra'),
'section' => 'main_sidebar',
'default' => 'left',
'priority' => 5,
'transport' => 'auto',
'choices' => array(
'right' => esc_attr__('Left', 'envo-extra'),
'left' => esc_attr__('Right', 'envo-extra'),
),
'output' => array(
array(
'element' => '.blog .page-area .col-md-9, .archive .page-area .col-md-9, article.col-md-9',
'property' => 'float',
),
),
));
// Separator.
Kirki::add_field('envo_extra', array(
'type' => 'custom',
'settings' => 'widget_title_separator_top',
'section' => 'main_sidebar',
'priority' => 10,
'default' => '<hr style="border-top: 1px solid #ccc; border-bottom: 1px solid #f8f8f8; margin: 0;">',
));
// Title.
Kirki::add_field('envo_extra', array(
'type' => 'responsive_devices',
'label' => esc_attr__('Widget titles', 'envo-extra'),
'section' => 'main_sidebar',
'settings' => 'widget_title_devices',
'priority' => 11,
));
// Responsive field.
foreach ($devices as $key => $value) {
Kirki::add_field('envo_extra', array(
'description' => $value['description'],
'type' => 'typography',
'settings' => 'awidget_title_color' . $key,
'section' => 'main_sidebar',
'transport' => 'auto',
'choices' => array(
'fonts' => envo_extra_fonts(),
),
'default' => array(
'font-family' => '',
'font-size' => '15px',
'variant' => '700',
'line-height' => '1.6',
'letter-spacing' => '0px',
'color' => '',
'text-transform' => 'uppercase',
'word-spacing' => '0px',
'text-decoration' => '',
'text-align' => 'none',
),
'priority' => 12,
'output' => array(
array(
'element' => '#sidebar .widget-title h3',
$value['media_query_key'] => $value['media_query'],
),
),
));
}
// Separator.
Kirki::add_field('envo_extra', array(
'type' => 'custom',
'settings' => 'sidebar_widget_font_separator_top',
'section' => 'main_sidebar',
'priority' => 15,
'default' => '<hr style="border-top: 1px solid #ccc; border-bottom: 1px solid #f8f8f8; margin: 0;">',
));
// Title.
Kirki::add_field('envo_extra', array(
'type' => 'responsive_devices',
'label' => esc_attr__('Font', 'envo-extra'),
'section' => 'main_sidebar',
'settings' => 'sidebar_widget_font_devices',
'priority' => 15,
));
// Responsive field.
foreach ($devices as $key => $value) {
Kirki::add_field('envo_extra', array(
'description' => $value['description'],
'type' => 'typography',
'settings' => 'sidebar_widget_font' . $key,
'section' => 'main_sidebar',
'transport' => 'auto',
'choices' => array(
'fonts' => envo_extra_fonts(),
),
'default' => array(
'font-family' => '',
'font-size' => '15px',
'variant' => '400',
'line-height' => '1.6',
'letter-spacing' => '0px',
'color' => '',
'text-transform' => 'uppercase',
'word-spacing' => '0px',
'text-decoration' => '',
'text-align' => 'none',
),
'priority' => 20,
'output' => array(
array(
'element' => '#sidebar .widget',
$value['media_query_key'] => $value['media_query'],
),
),
));
}
// Separator.
Kirki::add_field('envo_extra', array(
'type' => 'custom',
'settings' => 'sidebar_widget_font_separator_bottom',
'section' => 'main_sidebar',
'priority' => 25,
'default' => '<hr style="border-top: 1px solid #ccc; border-bottom: 1px solid #f8f8f8; margin: 0;">',
));
Kirki::add_field('envo_extra', array(
'type' => 'multicolor',
'settings' => 'sidebar_links',
'label' => esc_attr__('Widget links', 'envo-extra'),
'section' => 'main_sidebar',
'priority' => 30,
'transport' => 'auto',
'choices' => array(
'link' => esc_attr__('Links', 'envo-extra'),
'link-hover' => esc_attr__('Links hover', 'envo-extra'),
),
'default' => array(
'link' => '',
'link-hover' => '',
),
'output' => array(
array(
'choice' => 'link',
'element' => '#sidebar .widget a',
'property' => 'color',
),
array(
'choice' => 'link-hover',
'element' => '#sidebar .widget a:hover',
'property' => 'color',
),
),
));
// Separator.
Kirki::add_field('envo_extra', array(
'type' => 'custom',
'settings' => 'sidebar_border_style_separator_top',
'section' => 'main_sidebar',
'priority' => 30,
'default' => '<hr style="border-top: 1px solid #ccc; border-bottom: 1px solid #f8f8f8; margin: 0;">',
));
// Border start.
Kirki::add_field('envo_extra', array(
'type' => 'select',
'settings' => 'sidebar_border_style',
'label' => esc_html__('Sidebar border', 'envo-extra'),
'section' => 'main_sidebar',
'default' => 'none',
'priority' => 30,
'placeholder' => esc_html__('Choose an option', 'envo-extra'),
'choices' => array(
'none' => esc_html__('None', 'envo-extra'),
'solid' => esc_html__('Solid', 'envo-extra'),
'double' => esc_html__('Double', 'envo-extra'),
'dotted' => esc_html__('Dotted', 'envo-extra'),
'dashed' => esc_html__('Dashed', 'envo-extra'),
'groove' => esc_html__('Groove', 'envo-extra'),
),
'transport' => 'auto',
'output' => array(
array(
'element' => '#sidebar',
'property' => 'border-style',
),
)
)
);
Kirki::add_field('envo_extra', array(
'type' => 'dimensions',
'settings' => 'sidebar_border_width',
'label' => esc_attr__('Sidebar Border Width', 'envo-extra'),
'section' => 'main_sidebar',
'priority' => 30,
'default' => array(
'border-top-width' => '0px',
'border-right-width' => '0px',
'border-bottom-width' => '0px',
'border-left-width' => '0px',
),
'choices' => array(
'labels' => array(
'border-top-width' => esc_attr__('Top', 'textdomain'),
'border-right-width' => esc_attr__('Bottom', 'textdomain'),
'border-bottom-width' => esc_attr__('Left', 'textdomain'),
'border-left-width' => esc_attr__('Right', 'textdomain'),
),
),
'transport' => 'auto',
'output' => array(
array(
'element' => '#sidebar',
),
),
'active_callback' => array(
array(
'setting' => 'sidebar_border_style',
'operator' => '!=',
'value' => 'none',
),
),
));
Kirki::add_field('envo_extra', array(
'type' => 'dimensions',
'settings' => 'sidebar_border_radius',
'section' => 'main_sidebar',
'label' => esc_attr__('Sidebar Border Radius', 'envo-extra'),
'priority' => 30,
'default' => array(
'border-top-left-radius' => '0px',
'border-top-right-radius' => '0px',
'border-bottom-left-radius' => '0px',
'border-bottom-right-radius' => '0px',
),
'choices' => array(
'labels' => array(
'border-top-left-radius' => esc_attr__('Top Left', 'textdomain'),
'border-top-right-radius' => esc_attr__('Top Right', 'textdomain'),
'border-bottom-left-radius' => esc_attr__('Bottom Left', 'textdomain'),
'border-bottom-right-radius' => esc_attr__('Bottom Right', 'textdomain'),
),
),
'transport' => 'auto',
'output' => array(
array(
'element' => '#sidebar',
),
),
'active_callback' => array(
array(
'setting' => 'sidebar_border_style',
'operator' => '!=',
'value' => 'none',
),
),
));
Kirki::add_field('envo_extra', array(
'type' => 'color',
'settings' => 'sidebar_border_color',
'label' => esc_attr__('Sidebar border color', 'envo-extra'),
'section' => 'main_sidebar',
'default' => '',
'transport' => 'auto',
'priority' => 30,
'output' => array(
array(
'element' => '#sidebar',
'property' => 'border-color',
),
),
'active_callback' => array(
array(
'setting' => 'sidebar_border_style',
'operator' => '!=',
'value' => 'none',
),
),
));
// Border end.
// Separator.
Kirki::add_field('envo_extra', array(
'type' => 'custom',
'settings' => 'sidebar_border_style_separator_bottom',
'section' => 'main_sidebar',
'priority' => 30,
'default' => '<hr style="border-top: 1px solid #ccc; border-bottom: 1px solid #f8f8f8; margin: 0;">',
));
// Box shadow start.
//Kirki::add_field( 'envo_extra', array(
// 'type' => 'dimensions',
// 'settings' => 'sidebar_box_shadow',
// 'section' => 'main_sidebar',
// 'label' => esc_attr__( 'Sidebar box shadow', 'envo-extra' ),
// 'transport' => 'auto',
// 'priority' => 30,
// 'default' => array(
// 'h-shadow' => '0px',
// 'v-shadow' => '0px',
// 'blur' => '0px',
// 'spread' => '0px',
// ),
// 'choices' => array(
// 'labels' => array(
// 'h-shadow' => esc_attr__( 'Horizontal', 'textdomain' ),
// 'v-shadow' => esc_attr__( 'Vertical', 'textdomain' ),
// 'blur' => esc_attr__( 'Blur', 'textdomain' ),
// 'spread' => esc_attr__( 'Spread ', 'textdomain' ),
// ),
// ),
//) );
//Kirki::add_field( 'envo_extra', array(
// 'type' => 'color',
// 'settings' => 'sidebar_box_shadow_color',
// 'label' => esc_attr__( 'Sidebar shadow color', 'envo-extra' ),
// 'section' => 'main_sidebar',
// 'default' => '',
// 'transport' => 'auto',
// 'priority' => 30,
// 'choices' => array(
// 'alpha' => true,
// ),
// 'output' => array(
// array(
// 'element' => '#sidebar',
// 'property' => 'box-shadow',
// 'value_pattern' => 'h-shadow v-shadow blur spread $',
// 'pattern_replace' => array(
// 'h-shadow' => 'sidebar_box_shadow[h-shadow]',
// 'v-shadow' => 'sidebar_box_shadow[v-shadow]',
// 'blur' => 'sidebar_box_shadow[blur]',
// 'spread' => 'sidebar_box_shadow[spread]',
// ),
// ),
// ),
//) );
Kirki::add_field('envo_extra', array(
'type' => 'text',
'settings' => 'sidebar_box_shadow_code',
'label' => esc_html__('Sidebar box shadow', 'envo-extra'),
'description' => esc_attr__('e.g. 5px 5px 15px 5px #000000', 'envo-extra'),
'section' => 'main_sidebar',
'priority' => 30,
'output' => array(
array(
'element' => '#sidebar',
'property' => 'box-shadow',
),
),
));
// Box shadow end.
// Separator.
Kirki::add_field('envo_extra', array(
'type' => 'custom',
'settings' => 'sidebar_spacing_separator_top',
'section' => 'main_sidebar',
'priority' => 30,
'default' => '<hr style="border-top: 1px solid #ccc; border-bottom: 1px solid #f8f8f8; margin: 0;">',
));
// Title.
Kirki::add_field('envo_extra', array(
'type' => 'responsive_devices',
'label' => esc_attr__('Sidebar spacing', 'envo-extra'),
'section' => 'main_sidebar',
'settings' => 'sidebar_spacing_devices',
'priority' => 30,
));
// Responsive field.
foreach ($devices as $key => $value) {
Kirki::add_field('envo_extra', array(
'description' => $value['description'],
'type' => 'dimensions',
'settings' => 'sidebar_spacing' . $key,
'section' => 'main_sidebar',
'priority' => 35,
'default' => array(
'top' => '0px',
'right' => '15px',
'bottom' => '0px',
'left' => '15px',
),
'transport' => 'auto',
'output' => array(
array(
'property' => 'padding',
'element' => '#sidebar',
$value['media_query_key'] => $value['media_query'],
),
),
));
}
// Separator.
Kirki::add_field('envo_extra', array(
'type' => 'custom',
'settings' => 'sidebar_spacing_separator_bottom',
'section' => 'main_sidebar',
'priority' => 40,
'default' => '<hr style="border-top: 1px solid #ccc; border-bottom: 1px solid #f8f8f8; margin: 0;">',
));
// Border start.
Kirki::add_field('envo_extra', array(
'type' => 'select',
'settings' => 'widgets_border_style',
'label' => esc_html__('Widgets border', 'envo-extra'),
'section' => 'main_sidebar',
'default' => 'none',
'priority' => 40,
'placeholder' => esc_html__('Choose an option', 'envo-extra'),
'choices' => array(
'none' => esc_html__('None', 'envo-extra'),
'solid' => esc_html__('Solid', 'envo-extra'),
'double' => esc_html__('Double', 'envo-extra'),
'dotted' => esc_html__('Dotted', 'envo-extra'),
'dashed' => esc_html__('Dashed', 'envo-extra'),
'groove' => esc_html__('Groove', 'envo-extra'),
),
'transport' => 'auto',
'output' => array(
array(
'element' => '#sidebar .widget',
'property' => 'border-style',
),
)
)
);
Kirki::add_field('envo_extra', array(
'type' => 'dimensions',
'settings' => 'widgets_border_width',
'label' => esc_attr__('Widgets Border Width', 'envo-extra'),
'section' => 'main_sidebar',
'priority' => 40,
'default' => array(
'border-top-width' => '0px',
'border-right-width' => '0px',
'border-bottom-width' => '0px',
'border-left-width' => '0px',
),
'choices' => array(
'labels' => array(
'border-top-width' => esc_attr__('Top', 'textdomain'),
'border-right-width' => esc_attr__('Right', 'textdomain'),
'border-bottom-width' => esc_attr__('Bottom', 'textdomain'),
'border-left-width' => esc_attr__('Left', 'textdomain'),
),
),
'transport' => 'auto',
'output' => array(
array(
'element' => '#sidebar .widget',
),
),
'active_callback' => array(
array(
'setting' => 'widgets_border_style',
'operator' => '!=',
'value' => 'none',
),
),
));
Kirki::add_field('envo_extra', array(
'type' => 'dimensions',
'settings' => 'widgets_border_radius',
'section' => 'main_sidebar',
'label' => esc_attr__('Widgets Border Radius', 'envo-extra'),
'priority' => 40,
'default' => array(
'border-top-left-radius' => '0px',
'border-top-right-radius' => '0px',
'border-bottom-left-radius' => '0px',
'border-bottom-right-radius' => '0px',
),
'choices' => array(
'labels' => array(
'border-top-left-radius' => esc_attr__('Top Left', 'textdomain'),
'border-top-right-radius' => esc_attr__('Top Right', 'textdomain'),
'border-bottom-left-radius' => esc_attr__('Bottom Left', 'textdomain'),
'border-bottom-right-radius' => esc_attr__('Bottom Right', 'textdomain'),
),
),
'transport' => 'auto',
'output' => array(
array(
'element' => '#sidebar .widget',
),
),
'active_callback' => array(
array(
'setting' => 'widgets_border_style',
'operator' => '!=',
'value' => 'none',
),
),
));
Kirki::add_field('envo_extra', array(
'type' => 'color',
'settings' => 'widgets_border_color',
'label' => esc_attr__('Widgets border color', 'envo-extra'),
'section' => 'main_sidebar',
'default' => '',
'transport' => 'auto',
'priority' => 40,
'output' => array(
array(
'element' => '#sidebar .widget',
'property' => 'border-color',
),
),
'active_callback' => array(
array(
'setting' => 'widgets_border_style',
'operator' => '!=',
'value' => 'none',
),
),
));
// Border end.
// Separator.
Kirki::add_field('envo_extra', array(
'type' => 'custom',
'settings' => 'widgets_border_bottom',
'section' => 'main_sidebar',
'priority' => 50,
'default' => '<hr style="border-top: 1px solid #ccc; border-bottom: 1px solid #f8f8f8; margin: 0;">',
));
// Box shadow start.
//Kirki::add_field( 'envo_extra', array(
// 'type' => 'color',
// 'settings' => 'widgets_box_shadow_color',
// 'label' => esc_attr__( 'Widgets shadow color', 'envo-extra' ),
// 'section' => 'main_sidebar',
// 'default' => '',
// 'transport' => 'auto',
// 'priority' => 50,
// 'choices' => array(
// 'alpha' => true,
// ),
// 'output' => array(
// array(
// 'element' => '#sidebar .widget',
// 'property' => 'box-shadow',
// 'value_pattern' => 'h-shadow v-shadow blur spread $',
// 'pattern_replace' => array(
// 'h-shadow' => 'widgets_box_shadow[h-shadow]',
// 'v-shadow' => 'widgets_box_shadow[v-shadow]',
// 'blur' => 'widgets_box_shadow[blur]',
// 'spread' => 'widgets_box_shadow[spread]',
// ),
// ),
// ),
//) );
//Kirki::add_field( 'envo_extra', array(
// 'type' => 'dimensions',
// 'settings' => 'widgets_box_shadow',
// 'section' => 'main_sidebar',
// 'label' => esc_attr__( 'Widgets box shadow', 'envo-extra' ),
// 'transport' => 'auto',
// 'priority' => 50,
// 'default' => array(
// 'h-shadow' => '0px',
// 'v-shadow' => '0px',
// 'blur' => '0px',
// 'spread' => '0px',
// ),
// 'choices' => array(
// 'labels' => array(
// 'h-shadow' => esc_attr__( 'Horizontal', 'envo-extra' ),
// 'v-shadow' => esc_attr__( 'Vertical', 'envo-extra' ),
// 'blur' => esc_attr__( 'Blur', 'envo-extra' ),
// 'spread' => esc_attr__( 'Spread ', 'envo-extra' ),
// ),
// ),
//) );
Kirki::add_field('envo_extra', array(
'type' => 'text',
'settings' => 'widgets_box_shadow_code',
'label' => esc_html__('Widgets box shadow', 'envo-extra'),
'description' => esc_attr__('e.g. 5px 5px 15px 5px #000000', 'envo-extra'),
'section' => 'main_sidebar',
'priority' => 50,
'output' => array(
array(
'element' => '#sidebar .widget',
'property' => 'box-shadow',
),
),
));
// Box shadow end.
// Separator.
Kirki::add_field('envo_extra', array(
'type' => 'custom',
'settings' => 'widgets_spacing_separator_top',
'section' => 'main_sidebar',
'priority' => 50,
'default' => '<hr style="border-top: 1px solid #ccc; border-bottom: 1px solid #f8f8f8; margin: 0;">',
));
// Title.
Kirki::add_field('envo_extra', array(
'type' => 'responsive_devices',
'label' => esc_attr__('Widgets spacing', 'envo-extra'),
'section' => 'main_sidebar',
'settings' => 'widgets_spacing_devices',
'priority' => 50,
));
// Responsive field.
foreach ($devices as $key => $value) {
Kirki::add_field('envo_extra', array(
'description' => $value['description'],
'type' => 'dimensions',
'settings' => 'widgets_spacing' . $key,
'section' => 'main_sidebar',
'priority' => 60,
'default' => array(
'top' => '0px',
'right' => '0px',
'bottom' => '0px',
'left' => '0px',
),
'transport' => 'auto',
'output' => array(
array(
'property' => 'padding',
'element' => '#sidebar .widget',
$value['media_query_key'] => $value['media_query'],
),
),
));
}
// Separator.
Kirki::add_field('envo_extra', array(
'type' => 'custom',
'settings' => 'widgets_spacing_separator_bottom',
'section' => 'main_sidebar',
'priority' => 70,
'default' => '<hr style="border-top: 1px solid #ccc; border-bottom: 1px solid #f8f8f8; margin: 0;">',
));
@@ -0,0 +1,326 @@
<?php
if (!class_exists('Kirki')) {
return;
}
Kirki::add_section('site_width_section', array(
'title' => esc_attr__('Site Width Options', 'envo-extra'),
'panel' => 'envo_theme_panel',
'priority' => 20,
));
// Top bar
Kirki::add_field('envo_extra', array(
'type' => 'radio-buttonset',
'settings' => 'top_bar_width_select',
'label' => esc_attr__('Top Bar Width', 'envo-extra'),
'section' => 'site_width_section',
'default' => 'custom',
'priority' => 10,
'transport' => 'auto',
'choices' => array(
'custom' => esc_attr__('Custom', 'envo-extra'),
'100' => esc_attr__('Full Width', 'envo-extra'),
),
'output' => array(
array(
'choice' => '100',
'element' => '.top-bar-section .container',
'property' => 'width',
'media_query' => '@media (min-width: 1430px)',
'units' => '%',
),
),
));
Kirki::add_field('envo_extra', array(
'type' => 'slider',
'settings' => 'top_bar_width',
'section' => 'site_width_section',
'default' => '1170',
'priority' => 10,
'choices' => array(
'min' => 960,
'max' => 1980,
'step' => 5,
),
'output' => array(
array(
'element' => '.top-bar-section .container',
'property' => 'width',
'media_query' => envo_extra_media_width_css('top_bar'),
'units' => 'px',
),
),
'active_callback' => array(
array(
'setting' => 'top_bar_width_select',
'operator' => '==',
'value' => 'custom',
),
),
));
// Header
Kirki::add_field('envo_extra', array(
'type' => 'radio-buttonset',
'settings' => 'header_width_select',
'label' => esc_attr__('Header Width', 'envo-extra'),
'section' => 'site_width_section',
'default' => 'custom',
'priority' => 10,
'transport' => 'auto',
'choices' => array(
'custom' => esc_attr__('Custom', 'envo-extra'),
'100' => esc_attr__('Full Width', 'envo-extra'),
),
'output' => array(
array(
'choice' => '100',
'element' => '.site-header .container',
'property' => 'width',
'media_query' => '@media (min-width: 1430px)',
'units' => '%',
),
),
));
Kirki::add_field('envo_extra', array(
'type' => 'slider',
'settings' => 'header_width',
'section' => 'site_width_section',
'default' => '1170',
'priority' => 10,
'choices' => array(
'min' => 960,
'max' => 1980,
'step' => 5,
),
'output' => array(
array(
'element' => '.site-header .container',
'property' => 'width',
'media_query' => envo_extra_media_width_css('header'),
'units' => 'px',
),
),
'active_callback' => array(
array(
'setting' => 'header_width_select',
'operator' => '==',
'value' => 'custom',
),
),
));
// Menu
Kirki::add_field('envo_extra', array(
'type' => 'radio-buttonset',
'settings' => 'menu_width_select',
'label' => esc_attr__('Search Bar Width', 'envo-extra'),
'section' => 'site_width_section',
'default' => 'custom',
'priority' => 10,
'transport' => 'auto',
'choices' => array(
'custom' => esc_attr__('Custom', 'envo-extra'),
'100' => esc_attr__('Full Width', 'envo-extra'),
),
'output' => array(
array(
'choice' => '100',
'element' => '.main-menu .container',
'property' => 'width',
'media_query' => '@media (min-width: 1430px)',
'units' => '%',
),
),
));
Kirki::add_field('envo_extra', array(
'type' => 'slider',
'settings' => 'menu_width',
'section' => 'site_width_section',
'default' => '1170',
'priority' => 10,
'choices' => array(
'min' => 960,
'max' => 1980,
'step' => 5,
),
'output' => array(
array(
'element' => '.main-menu .container',
'property' => 'width',
'media_query' => envo_extra_media_width_css('menu'),
'units' => 'px',
),
),
'active_callback' => array(
array(
'setting' => 'menu_width_select',
'operator' => '==',
'value' => 'custom',
),
),
));
// Content
Kirki::add_field('envo_extra', array(
'type' => 'radio-buttonset',
'settings' => 'content_width_select',
'label' => esc_attr__('Content Width', 'envo-extra'),
'section' => 'site_width_section',
'default' => 'custom',
'priority' => 10,
'transport' => 'auto',
'choices' => array(
'custom' => esc_attr__('Custom', 'envo-extra'),
'100' => esc_attr__('Full Width', 'envo-extra'),
),
'output' => array(
array(
'choice' => '100',
'element' => '#site-content.container',
'property' => 'width',
'media_query' => '@media (min-width: 1430px)',
'units' => '%',
),
),
));
Kirki::add_field('envo_extra', array(
'type' => 'slider',
'settings' => 'content_width',
'section' => 'site_width_section',
'default' => '1170',
'priority' => 10,
'choices' => array(
'min' => 960,
'max' => 1980,
'step' => 5,
),
'output' => array(
array(
'element' => '#site-content.container',
'property' => 'width',
'media_query' => envo_extra_media_width_css('content'),
'units' => 'px',
),
),
'active_callback' => array(
array(
'setting' => 'content_width_select',
'operator' => '==',
'value' => 'custom',
),
),
));
// Footer Widgets
Kirki::add_field('envo_extra', array(
'type' => 'radio-buttonset',
'settings' => 'footer_widgets_width_select',
'label' => esc_attr__('Footer Widgets Width', 'envo-extra'),
'section' => 'site_width_section',
'default' => 'custom',
'priority' => 10,
'transport' => 'auto',
'choices' => array(
'custom' => esc_attr__('Custom', 'envo-extra'),
'100' => esc_attr__('Full Width', 'envo-extra'),
),
'output' => array(
array(
'choice' => '100',
'element' => '#content-footer-section .container',
'property' => 'width',
'media_query' => '@media (min-width: 1430px)',
'units' => '%',
),
),
));
Kirki::add_field('envo_extra', array(
'type' => 'slider',
'settings' => 'footer_widgets_width',
'section' => 'site_width_section',
'default' => '1170',
'priority' => 10,
'choices' => array(
'min' => 960,
'max' => 1980,
'step' => 5,
),
'output' => array(
array(
'element' => '#content-footer-section .container',
'property' => 'width',
'media_query' => envo_extra_media_width_css('footer_widgets'),
'units' => 'px',
),
),
'active_callback' => array(
array(
'setting' => 'footer_widgets_width_select',
'operator' => '==',
'value' => 'custom',
),
),
));
// Footer Credits
Kirki::add_field('envo_extra', array(
'type' => 'radio-buttonset',
'settings' => 'footer_credits_width_select',
'label' => esc_attr__('Footer Credits Width', 'envo-extra'),
'section' => 'site_width_section',
'default' => 'custom',
'priority' => 10,
'transport' => 'auto',
'choices' => array(
'custom' => esc_attr__('Custom', 'envo-extra'),
'100' => esc_attr__('Full Width', 'envo-extra'),
),
'output' => array(
array(
'choice' => '100',
'element' => '.footer-credits .container',
'property' => 'width',
'media_query' => '@media (min-width: 1430px)',
'units' => '%',
),
),
));
Kirki::add_field('envo_extra', array(
'type' => 'slider',
'settings' => 'footer_credits_width',
'section' => 'site_width_section',
'default' => '1170',
'priority' => 10,
'choices' => array(
'min' => 960,
'max' => 1980,
'step' => 5,
),
'output' => array(
array(
'element' => '.footer-credits .container',
'property' => 'width',
'media_query' => envo_extra_media_width_css('footer_credits'),
'units' => 'px',
),
),
'active_callback' => array(
array(
'setting' => 'footer_credits_width_select',
'operator' => '==',
'value' => 'custom',
),
),
));
function envo_extra_media_width_css($section = '') {
$header_width = get_theme_mod($section . '_width', '1170');
$media_width = $header_width + 30;
return '@media (min-width: ' . $media_width . 'px)';
}
@@ -0,0 +1,173 @@
<?php
if ( !class_exists( 'Kirki' ) ) {
return;
}
Kirki::add_section( 'top_bar', array(
'title' => esc_attr__( 'Top Bar', 'envo-extra' ),
'panel' => 'theme_header',
'priority' => 5,
) );
$devices = array(
'desktop' => array(
'media_query_key' => '',
'media_query' => '',
'description' => 'Desktop',
),
'tablet' => array(
'media_query_key' => 'media_query',
'media_query' => '@media (max-width: 991px)',
'description' => 'Tablet',
),
'mobile' => array(
'media_query_key' => 'media_query',
'media_query' => '@media (max-width: 787px)',
'description' => 'Mobile',
),
);
// Title.
Kirki::add_field( 'envo_extra', array(
'type' => 'responsive_devices',
'label' => esc_attr__( 'Top bar font', 'envo-extra' ),
'section' => 'top_bar',
'settings' => 'topmenu_typography_devices',
'priority' => 10,
) );
// Responsive field.
foreach ( $devices as $key => $value ) {
Kirki::add_field( 'envo_extra', array(
'type' => 'typography',
'settings' => 'topmenu_typography' . $key,
'description' => $value[ 'description' ],
'section' => 'top_bar',
'transport' => 'auto',
'choices' => array(
'fonts' => envo_extra_fonts(),
),
'default' => array(
'font-family' => '',
'font-size' => '12px',
'variant' => '400',
'letter-spacing' => '0px',
'text-transform' => 'none',
'color' => '',
'line-height' => '1.5',
'word-spacing' => '0px',
'text-decoration' => 'none'
),
'priority' => 15,
'output' => array(
array(
'element' => '.top-bar-section',
$value[ 'media_query_key' ] => $value[ 'media_query' ],
),
),
) );
}
// Separator.
Kirki::add_field( 'envo_extra', array(
'type' => 'custom',
'settings' => 'top_bar_bg_color_sep_top',
'section' => 'top_bar',
'priority' => 20,
'default' => '<hr style="border-top: 1px solid #ccc; border-bottom: 1px solid #f8f8f8; margin: 0;">',
) );
Kirki::add_field( 'envo_extra', array(
'type' => 'color',
'settings' => 'top_bar_bg_color',
'label' => esc_attr__( 'Top bar background', 'envo-extra' ),
'section' => 'top_bar',
'default' => '',
'transport' => 'auto',
'priority' => 20,
'output' => array(
array(
'element' => '.top-bar-section',
'property' => 'background-color',
),
),
) );
Kirki::add_field( 'envo_extra', array(
'type' => 'multicolor',
'settings' => 'top_bar_links_color',
'label' => esc_attr__( 'Top bar links', 'envo-extra' ),
'section' => 'top_bar',
'priority' => 20,
'transport' => 'auto',
'choices' => array(
'link' => esc_attr__( 'Links', 'envo-extra' ),
'hover' => esc_attr__( 'Hover', 'envo-extra' ),
),
'default' => array(
'color' => '',
'link' => '',
'hover' => '',
),
'output' => array(
array(
'choice' => 'link',
'element' => '.top-bar-section a',
'property' => 'color',
),
array(
'choice' => 'hover',
'element' => '.top-bar-section a:hover',
'property' => 'color',
),
),
) );
// Separator.
Kirki::add_field( 'envo_extra', array(
'type' => 'custom',
'settings' => 'top_bar_spacing_sep_top',
'section' => 'top_bar',
'priority' => 20,
'default' => '<hr style="border-top: 1px solid #ccc; border-bottom: 1px solid #f8f8f8; margin: 0;">',
) );
// Title.
Kirki::add_field( 'envo_extra', array(
'type' => 'responsive_devices',
'label' => esc_attr__( 'Top bar spacing', 'envo-extra' ),
'section' => 'top_bar',
'settings' => 'top_bar_spacing_devices',
'priority' => 20,
) );
// Responsive field.
foreach ( $devices as $key => $value ) {
Kirki::add_field( 'envo_extra', array(
'description' => $value[ 'description' ],
'type' => 'dimensions',
'settings' => 'top_bar_spacing' . $key,
'section' => 'top_bar',
'priority' => 25,
'default' => array(
'top' => '5px',
'right' => '0px',
'bottom' => '5px',
'left' => '0px',
),
'transport' => 'auto',
'output' => array(
array(
'property' => 'padding',
'element' => '.top-bar-section',
$value[ 'media_query_key' ] => $value[ 'media_query' ],
),
),
) );
}
// Separator.
Kirki::add_field( 'envo_extra', array(
'type' => 'custom',
'settings' => 'top_bar_spacing_sep_bottom',
'section' => 'top_bar',
'priority' => 30,
'default' => '<hr style="border-top: 1px solid #ccc; border-bottom: 1px solid #f8f8f8; margin: 0;">',
) );
@@ -0,0 +1,167 @@
<?php
add_action('customize_register', 'envo_extra_theme_customize_register_woo', 15);
function envo_extra_theme_customize_register_woo($wp_customize) {
// relocating default WooCommerce sections
$wp_customize->get_section('woocommerce_store_notice')->panel = 'woo_section_main';
$wp_customize->get_section('woocommerce_product_catalog')->panel = 'woo_section_main';
$wp_customize->get_section('woocommerce_product_images')->panel = 'woo_section_main';
$wp_customize->get_section('woocommerce_checkout')->panel = 'woo_section_main';
}
add_action('after_setup_theme', 'envo_extra_images_action', 15);
function envo_extra_images_action() {
if (get_theme_mod('woo_gallery_zoom', 1) == 0) {
remove_theme_support('wc-product-gallery-zoom');
}
if (get_theme_mod('woo_gallery_lightbox', 1) == 0) {
remove_theme_support('wc-product-gallery-lightbox');
}
if (get_theme_mod('woo_gallery_slider', 1) == 0) {
remove_theme_support('wc-product-gallery-slider');
}
// Remove related products output
if (get_theme_mod('woo_remove_related', 1) == 0) {
remove_action('woocommerce_after_single_product_summary', 'woocommerce_output_related_products', 20);
}
}
add_filter('loop_shop_per_page', 'envo_extra_new_loop_shop_per_page', 20);
function envo_extra_new_loop_shop_per_page($cols) {
// $cols contains the current number of products per page based on the value stored on Options -> Reading
// Return the number of products you wanna show per page.
$cols = absint(get_theme_mod('archive_number_products', 24));
return $cols;
}
add_filter('loop_shop_columns', 'envo_extra_loop_columns');
if (!function_exists('envo_extra_loop_columns')) {
function envo_extra_loop_columns() {
return absint(get_theme_mod('archive_number_columns', 4));
}
}
Kirki::add_panel('woo_section_main', array(
'title' => esc_attr__('WooCommerce', 'envo-extra'),
'priority' => 5,
));
Kirki::add_section('woo_section', array(
'title' => esc_attr__('General Settings', 'envo-extra'),
'panel' => 'woo_section_main',
'priority' => 1,
));
require_once( plugin_dir_path(__FILE__) . 'woocommerce/archive-shop.php' );
require_once( plugin_dir_path(__FILE__) . 'woocommerce/product-page.php' );
require_once( plugin_dir_path(__FILE__) . 'woocommerce/buttons.php' );
Kirki::add_panel('woo_cart_account', array(
'title' => esc_attr__('Header (Cart, My Account & Search)', 'envo-extra'),
'panel' => 'woo_section_main',
'priority' => 5,
));
require_once( plugin_dir_path(__FILE__) . 'woocommerce/header-cart.php' );
require_once( plugin_dir_path(__FILE__) . 'woocommerce/my-account.php' );
require_once( plugin_dir_path(__FILE__) . 'woocommerce/wishlist.php' );
require_once( plugin_dir_path(__FILE__) . 'woocommerce/compare.php' );
require_once( plugin_dir_path(__FILE__) . 'woocommerce/header-search.php' );
/**
* Add custom CSS styles
*/
function envo_extra_woo_enqueue_header_css() {
$css = '';
$devices = array(
'desktop' => array(
'media_query_key' => '',
'media_query' => '@media only screen and (min-width: 992px)',
'image' => '48',
),
'tablet' => array(
'media_query_key' => 'media_query',
'media_query' => '@media only screen and (max-width: 991px)',
'image' => '48',
),
'mobile' => array(
'media_query_key' => 'media_query',
'media_query' => '@media only screen and (max-width: 787px)',
'image' => '100',
),
);
foreach ( $devices as $key => $value ) {
$img_width = get_theme_mod('woo_single_image_width' . $key, $value[ 'image' ]);
$summary_width = ( 100 - $img_width );
$summary_width = ( $summary_width == 0 ) ? 100 : $summary_width;
if (is_rtl()) {
$css .= $value[ 'media_query' ] .' {.woocommerce #content div.product div.summary, .woocommerce div.product div.summary, .woocommerce-page #content div.product div.summary, .woocommerce-page div.product div.summary{width: ' . $summary_width . '%; padding-right: 4%;}}';
} else {
$css .= $value[ 'media_query' ] .' {.woocommerce #content div.product div.summary, .woocommerce div.product div.summary, .woocommerce-page #content div.product div.summary, .woocommerce-page div.product div.summary{width: ' . $summary_width . '%; padding-left: 4%;}}';
}
}
$plus_minus = get_theme_mod('woo_hide_plus_minus', 'block');
$equal_height = get_theme_mod('woo_archive_product_equal_height', 0);
if ($plus_minus == 0) {
$css .= '.woocommerce div.product form.cart div.quantity {margin-right: 4px!important;}';
}
if ($equal_height == 1) {
$css .= '.woocommerce ul.products{display:flex;flex-wrap:wrap}.woocommerce li.product{display:flex;flex-direction:column}.woocommerce ul.products li.product a.button{margin-top:auto}@media (max-width:768px){.woocommerce ul.products[class*=columns-] li.product,.woocommerce-page ul.products[class*=columns-] li.product{margin-right:3.8%}.woocommerce ul.products[class*=columns-] li.product:nth-child(2n),.woocommerce-page ul.products[class*=columns-] li.product:nth-child(2n){margin-right:0}}';
}
wp_add_inline_style('woocommerce-inline', $css, 9999);
}
add_action('wp_enqueue_scripts', 'envo_extra_woo_enqueue_header_css', 9999);
// Add the opening div to the img
function envo_extra_add_img_wrapper_start() {
echo '<div class="archive-img-wrap">';
}
add_action( 'woocommerce_before_shop_loop_item_title', 'envo_extra_add_img_wrapper_start', 8, 2 );
// Close the div that we just added
function envo_extra_add_img_wrapper_close() {
echo '</div>';
}
add_action( 'woocommerce_before_shop_loop_item_title', 'envo_extra_add_img_wrapper_close', 12, 2 );
add_action('woocommerce_before_shop_loop_item_title','envo_extra_custom_before_shop_loop_item_title', 2 );
function envo_extra_custom_before_shop_loop_item_title(){
remove_action('woocommerce_before_shop_loop_item_title','woocommerce_show_product_loop_sale_flash', 10 );
add_action('woocommerce_before_shop_loop_item_title','woocommerce_show_product_loop_sale_flash', 4 );
}
if (!function_exists('envo_extra_breadcrumbs')) :
/**
* Breadcrumbs
*/
if (get_theme_mod('woo_archive_breadcrumbs', 1) == 1) {
add_action('woocommerce_archive_description', 'envo_extra_breadcrumbs', 5);
}
if (get_theme_mod('woo_product_breadcrumbs', 1) == 1) {
add_action('woocommerce_single_product_summary', 'envo_extra_breadcrumbs', 1);
}
function envo_extra_breadcrumbs() {
$args = array(
'wrap_before' => '<div class="woo-breadcrumbs" itemprop="breadcrumb">',
'wrap_after' => '</div>',
);
woocommerce_breadcrumb($args);
}
endif;
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,215 @@
<?php
if (!class_exists('Kirki')) {
return;
}
Kirki::add_section('woo_global_buttons_section', array(
'title' => esc_attr__('Buttons', 'envo-extra'),
'panel' => 'woo_section_main',
'priority' => 4,
));
$devices = array(
'desktop' => array(
'media_query_key' => '',
'media_query' => '',
'description' => 'Desktop',
),
'tablet' => array(
'media_query_key' => 'media_query',
'media_query' => '@media (max-width: 991px)',
'description' => 'Tablet',
),
'mobile' => array(
'media_query_key' => 'media_query',
'media_query' => '@media (max-width: 787px)',
'description' => 'Mobile',
),
);
/**
* Woo buttons styling
*/
// Title.
Kirki::add_field('envo_extra', array(
'type' => 'responsive_devices',
'label' => esc_attr__('Button font', 'envo-extra'),
'section' => 'woo_global_buttons_section',
'settings' => 'woo_global_product_buttons_devices',
'priority' => 10,
));
// Responsive field.
foreach ($devices as $key => $value) {
Kirki::add_field('envo_extra', array(
'type' => 'typography',
'settings' => 'woo_global_product_buttons_font' . $key,
'description' => $value['description'],
'section' => 'woo_global_buttons_section',
'transport' => 'auto',
'priority' => 15,
'choices' => array(
'fonts' => envo_extra_fonts(),
),
'default' => array(
'font-family' => '',
'font-size' => '14px',
'variant' => '300',
'line-height' => '1.6',
'letter-spacing' => '0px',
'text-transform' => 'none',
'text-decoration' => 'none',
'word-spacing' => '0px',
'text-align' => 'none',
'margin-top' => '0px',
'margin-bottom' => '0px',
),
'output' => array(
array(
'element' => '.woocommerce #respond input#submit, .woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .woocommerce #respond input#submit.alt, .woocommerce a.button.alt, .woocommerce button.button.alt, .woocommerce input.button.alt',
$value['media_query_key'] => $value['media_query'],
),
),
));
}
// Separator.
Kirki::add_field('envo_extra', array(
'type' => 'custom',
'settings' => 'woo_global_product_buttons_separator',
'section' => 'woo_global_buttons_section',
'priority' => 20,
'default' => '<hr style="border-top: 1px solid #ccc; border-bottom: 1px solid #f8f8f8; margin: 0;">',
));
Kirki::add_field('envo_extra', array(
'type' => 'dimensions',
'settings' => 'woo_global_product_buttons_spacing',
'label' => esc_attr__('Button padding', 'envo-extra'),
'section' => 'woo_global_buttons_section',
'priority' => 20,
'transport' => 'auto',
'default' => array(
'top' => '6px',
'right' => '20px',
'bottom' => '6px',
'left' => '20px',
),
'output' => array(
array(
'property' => 'padding',
'element' => '.woocommerce #respond input#submit, .woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .woocommerce #respond input#submit.alt, .woocommerce a.button.alt, .woocommerce button.button.alt, .woocommerce input.button.alt',
),
),
));
Kirki::add_field('envo_extra', array(
'type' => 'multicolor',
'settings' => 'woo_global_product_buttons',
'label' => esc_attr__('Buttons', 'envo-extra'),
'section' => 'woo_global_buttons_section',
'priority' => 20,
'transport' => 'auto',
'choices' => array(
'link' => esc_attr__('Color', 'envo-extra'),
'border' => esc_attr__('Border', 'envo-extra'),
'background' => esc_attr__('Background', 'envo-extra'),
),
'default' => array(
'link' => '',
'border' => '',
'background' => 'transparent',
),
'output' => array(
array(
'choice' => 'link',
'element' => '.woocommerce #respond input#submit, .woocommerce a.button, #sidebar .widget.widget_shopping_cart a.button, .woocommerce button.button, .woocommerce input.button, .woocommerce #respond input#submit.alt, .woocommerce a.button.alt, .woocommerce button.button.alt, .woocommerce input.button.alt',
'property' => 'color',
),
array(
'choice' => 'border',
'element' => '.woocommerce #respond input#submit, .woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .woocommerce #respond input#submit.alt, .woocommerce a.button.alt, .woocommerce button.button.alt, .woocommerce input.button.alt',
'property' => 'border-color',
),
array(
'choice' => 'background',
'element' => '.woocommerce #respond input#submit, .woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .woocommerce #respond input#submit.alt, .woocommerce a.button.alt, .woocommerce button.button.alt, .woocommerce input.button.alt',
'property' => 'background-color',
),
),
));
Kirki::add_field('envo_extra', array(
'type' => 'multicolor',
'settings' => 'woo_global_product_buttons_hover',
'label' => esc_attr__('Buttons hover', 'envo-extra'),
'section' => 'woo_global_buttons_section',
'priority' => 20,
'transport' => 'auto',
'choices' => array(
'link' => esc_attr__('Color', 'envo-extra'),
'border' => esc_attr__('Border', 'envo-extra'),
'background' => esc_attr__('Background', 'envo-extra'),
),
'default' => array(
'link' => '',
'border' => '',
'background' => '',
),
'output' => array(
array(
'choice' => 'link',
'element' => '.woocommerce #respond input#submit:hover, .woocommerce a.button:hover, #sidebar .widget.widget_shopping_cart a.button:hover, .woocommerce button.button:hover, .woocommerce input.button:hover, .woocommerce #respond input#submit.alt:hover, .woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover, .woocommerce input.button.alt:hover',
'property' => 'color',
),
array(
'choice' => 'border',
'element' => '.woocommerce #respond input#submit:hover, .woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce input.button:hover, .woocommerce #respond input#submit.alt:hover, .woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover, .woocommerce input.button.alt:hover',
'property' => 'border-color',
),
array(
'choice' => 'background',
'element' => '.woocommerce #respond input#submit:hover, .woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce input.button:hover, .woocommerce #respond input#submit.alt:hover, .woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover, .woocommerce input.button.alt:hover',
'property' => 'background-color',
),
),
));
Kirki::add_field('envo_extra', array(
'type' => 'slider',
'settings' => 'woo_global_product_buttons_radius',
'label' => esc_attr__('Button border radius', 'envo-extra'),
'section' => 'woo_global_buttons_section',
'default' => 0,
'transport' => 'auto',
'priority' => 20,
'choices' => array(
'min' => '0',
'max' => '20',
'step' => '1',
),
'output' => array(
array(
'element' => '.woocommerce #respond input#submit, .woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .woocommerce #respond input#submit.alt, .woocommerce a.button.alt, .woocommerce button.button.alt, .woocommerce input.button.alt',
'property' => 'border-radius',
'units' => 'px',
),
),
));
Kirki::add_field('envo_extra', array(
'type' => 'color',
'settings' => 'woo_filter_by_price',
'label' => esc_attr__('Filter by price sider', 'envo-extra'),
'section' => 'woo_global_buttons_section',
'default' => '',
'choices' => array(
'alpha' => true,
),
'transport' => 'auto',
'priority' => 20,
'output' => array(
array(
'element' => '.woocommerce .widget_price_filter .ui-slider .ui-slider-range, .woocommerce .widget_price_filter .ui-slider .ui-slider-handle',
'property' => 'background-color',
),
),
));
@@ -0,0 +1,54 @@
<?php
Kirki::add_section('woo_compare_section', array(
'title' => esc_attr__('Compare', 'envo-extra'),
'panel' => 'woo_cart_account',
'priority' => 6,
));
/**
* Header my account icon
*/
Kirki::add_field('envo_extra', array(
'type' => 'radio-buttonset',
'label' => esc_html__('Compare icon', 'envo-extra'),
'section' => 'woo_compare_section',
'settings' => 'header_compare_on_off',
'default' => 'block',
'transport' => 'auto',
'choices' => array(
'block' => esc_html__('On', 'envo-extra'),
'none' => esc_html__('Off', 'envo-extra'),
),
'output' => array(
array(
'element' => '.header-compare, .mobile-compare .header-compare',
'property' => 'display',
),
),
));
Kirki::add_field('envo_extra', array(
'type' => 'color',
'settings' => 'woo_compare_color',
'label' => esc_attr__('Header compare icon color', 'envo-extra'),
'section' => 'woo_compare_section',
'default' => '',
'choices' => array(
'alpha' => true,
),
'transport' => 'auto',
'priority' => 10,
'output' => array(
array(
'element' => '.header-compare a i',
'property' => 'color',
),
),
'active_callback' => array(
array(
'setting' => 'header_compare_on_off',
'operator' => '==',
'value' => 'block',
),
),
));
@@ -0,0 +1,240 @@
<?php
if (!class_exists('Kirki')) {
return;
}
Kirki::add_section('woo_cart_section', array(
'title' => esc_attr__('Cart', 'envo-extra'),
'panel' => 'woo_cart_account',
'priority' => 6,
));
/**
* Header cart icon
*/
Kirki::add_field('envo_extra', array(
'type' => 'radio-buttonset',
'label' => esc_html__('Cart', 'envo-extra'),
'section' => 'woo_cart_section',
'settings' => 'header_cart_on_off',
'default' => 'block',
'transport' => 'auto',
'priority' => 5,
'choices' => array(
'block' => esc_html__('On', 'envo-extra'),
'none' => esc_html__('Off', 'envo-extra'),
),
'output' => array(
array(
'element' => '.header-cart, .mobile-cart .header-cart',
'property' => 'display',
),
),
));
Kirki::add_field('envo_extra', array(
'type' => 'color',
'settings' => 'woo_cart_color',
'label' => esc_attr__('Header cart icon color', 'envo-extra'),
'section' => 'woo_cart_section',
'default' => '',
'choices' => array(
'alpha' => true,
),
'transport' => 'auto',
'priority' => 10,
'output' => array(
array(
'element' => '.header-cart a.cart-contents i',
'property' => 'color',
),
),
'active_callback' => array(
array(
'setting' => 'header_cart_on_off',
'operator' => '==',
'value' => 'block',
),
),
));
Kirki::add_field('envo_extra', array(
'type' => 'multicolor',
'settings' => 'woo_cart_counter_color',
'label' => esc_attr__('Header cart counter', 'envo-extra'),
'section' => 'woo_cart_section',
'priority' => 10,
'transport' => 'auto',
'choices' => array(
'color' => esc_attr__('Color', 'envo-extra'),
'background' => esc_attr__('Background', 'envo-extra'),
'border' => esc_attr__('Border', 'envo-extra'),
),
'default' => array(
'color' => '',
'background' => '',
'border' => '',
),
'output' => array(
array(
'choice' => 'color',
'element' => '.cart-contents span.count',
'property' => 'color',
),
array(
'choice' => 'background',
'element' => '.cart-contents span.count',
'property' => 'background-color',
),
array(
'choice' => 'border',
'element' => '.cart-contents span.count',
'property' => 'border-color',
),
),
'active_callback' => array(
array(
'setting' => 'header_cart_on_off',
'operator' => '==',
'value' => 'block',
),
),
));
Kirki::add_field('envo_extra', array(
'type' => 'multicolor',
'settings' => 'woo_cart_subtotal_color',
'label' => esc_attr__('Header cart subtotal', 'envo-extra'),
'section' => 'woo_cart_section',
'priority' => 10,
'transport' => 'auto',
'choices' => array(
'color' => esc_attr__('Color', 'envo-extra'),
'background' => esc_attr__('Background', 'envo-extra'),
),
'default' => array(
'color' => '',
'background' => '',
),
'output' => array(
array(
'choice' => 'color',
'element' => '.amount-cart',
'property' => 'color',
),
array(
'choice' => 'background',
'element' => '.amount-cart',
'property' => 'background-color',
),
array(
'choice' => 'background',
'element' => '.amount-cart:before',
'property' => 'border-right-color',
),
array(
'choice' => 'background',
'element' => '.rtl .amount-cart:before',
'property' => 'border-left-color',
),
),
'active_callback' => array(
array(
'setting' => 'header_cart_on_off',
'operator' => '==',
'value' => 'block',
),
),
));
Kirki::add_field('envo_extra', array(
'type' => 'multicolor',
'settings' => 'woo_cart_open_box',
'label' => esc_attr__('Header cart open box colors', 'envo-extra'),
'section' => 'woo_cart_section',
'priority' => 10,
'transport' => 'auto',
'choices' => array(
'color' => esc_attr__('Text color', 'envo-extra'),
'links' => esc_attr__('Links', 'envo-extra'),
'background' => esc_attr__('Background', 'envo-extra'),
'border' => esc_attr__('Border', 'envo-extra'),
),
'default' => array(
'color' => '',
'links' => '',
'background' => '',
'border' => '',
),
'output' => array(
array(
'choice' => 'color',
'element' => 'ul.site-header-cart, .product-added-to-cart ul.site-header-cart',
'property' => 'color',
),
array(
'choice' => 'links',
'element' => 'ul.site-header-cart a, .product-added-to-cart ul.site-header-cart a',
'property' => 'color',
),
array(
'choice' => 'background',
'element' => '.cart-open ul.site-header-cart, .product-added-to-cart .header-cart-block ul.site-header-cart',
'property' => 'background-color',
),
array(
'choice' => 'border',
'element' => '.cart-open ul.site-header-cart, .product-added-to-cart .header-cart-block ul.site-header-cart',
'property' => 'border-color',
),
),
'active_callback' => array(
array(
'setting' => 'header_cart_on_off',
'operator' => '==',
'value' => 'block',
),
),
));
Kirki::add_field('envo_extra', array(
'type' => 'multicolor',
'settings' => 'woo_cart_open_buttons',
'label' => esc_attr__('Open cart buttons', 'envo-extra'),
'section' => 'woo_cart_section',
'priority' => 10,
'transport' => 'auto',
'choices' => array(
'text' => esc_attr__('Text', 'envo-extra'),
'bg' => esc_attr__('Background', 'envo-extra'),
'border' => esc_attr__('Border', 'envo-extra'),
),
'default' => array(
'text' => '',
'bg' => '',
'border' => '',
),
'output' => array(
array(
'choice' => 'text',
'element' => 'ul.site-header-cart .buttons .button',
'property' => 'color',
),
array(
'choice' => 'bg',
'element' => '.cart-open ul.site-header-cart .buttons .button',
'property' => 'background-color',
),
array(
'choice' => 'border',
'element' => '.cart-open ul.site-header-cart .buttons .button',
'property' => 'border-color',
),
),
'active_callback' => array(
array(
'setting' => 'header_cart_on_off',
'operator' => '==',
'value' => 'block',
),
),
));
@@ -0,0 +1,236 @@
<?php
if (!class_exists('Kirki')) {
return;
}
Kirki::add_section('woo_search_section', array(
'title' => esc_attr__('Search', 'envo-extra'),
'panel' => 'woo_cart_account',
'priority' => 6,
));
/**
* Header search form
*/
Kirki::add_field('envo_extra', array(
'type' => 'radio-buttonset',
'label' => esc_html__('Search form', 'envo-extra'),
'section' => 'woo_search_section',
'settings' => 'header_search_on_off',
'default' => 'block',
'transport' => 'auto',
'priority' => 5,
'choices' => array(
'block' => esc_html__('On', 'envo-extra'),
'none' => esc_html__('Off', 'envo-extra'),
),
'output' => array(
array(
'element' => '.header-search-form',
'property' => 'display',
),
),
));
Kirki::add_field('envo_extra', array(
'type' => 'color',
'settings' => 'woo_header_search_border_color',
'label' => esc_attr__('Border color', 'envo-extra'),
'section' => 'woo_search_section',
'default' => '',
'choices' => array(
'alpha' => true,
),
'transport' => 'auto',
'priority' => 10,
'output' => array(
array(
'element' => 'button.header-search-button, input.header-search-input, select.header-search-select, .header-search-form',
'property' => 'border-color',
),
),
'active_callback' => array(
array(
'setting' => 'header_search_on_off',
'operator' => '==',
'value' => 'block',
),
),
));
Kirki::add_field('envo_extra', array(
'type' => 'multicolor',
'settings' => 'woo_header_search_button_color',
'label' => esc_attr__('Search button colors', 'envo-extra'),
'section' => 'woo_search_section',
'priority' => 10,
'transport' => 'auto',
'choices' => array(
'icon' => esc_attr__('Icon', 'envo-extra'),
'icon-hover' => esc_attr__('Icon hover', 'envo-extra'),
'background' => esc_attr__('Background', 'envo-extra'),
'background-hover' => esc_attr__('Background hover', 'envo-extra'),
),
'default' => array(
'icon' => '',
'icon-hover' => '',
'background' => '',
'background-hover' => '',
),
'output' => array(
array(
'choice' => 'icon',
'element' => 'button.header-search-button .la',
'property' => 'color',
),
array(
'choice' => 'icon-hover',
'element' => 'button.header-search-button .la:hover',
'property' => 'color',
),
array(
'choice' => 'background',
'element' => 'button.header-search-button',
'property' => 'background-color',
),
array(
'choice' => 'background-hover',
'element' => 'button.header-search-button:hover',
'property' => 'background-color',
),
),
'active_callback' => array(
array(
'setting' => 'header_search_on_off',
'operator' => '==',
'value' => 'block',
),
),
));
Kirki::add_field('envo_extra', array(
'type' => 'multicolor',
'settings' => 'woo_header_search_input_color',
'label' => esc_attr__('Search input colors', 'envo-extra'),
'section' => 'woo_search_section',
'priority' => 10,
'transport' => 'auto',
'choices' => array(
'input' => esc_attr__('Background', 'envo-extra'),
'input-text' => esc_attr__('Text', 'envo-extra'),
'input-placeholder' => esc_attr__('Placeholder', 'envo-extra'),
),
'default' => array(
'input' => '',
'input-text' => '',
'input-placeholder' => '',
),
'output' => array(
array(
'choice' => 'input',
'element' => 'input.header-search-input',
'property' => 'background-color',
),
array(
'choice' => 'input-text',
'element' => 'input.header-search-input',
'property' => 'color',
),
array(
'choice' => 'input-placeholder',
'element' => 'input.header-search-input::placeholder, input.header-search-input:-ms-input-placeholder, input.header-search-input::-webkit-input-placeholder, input.header-search-input::-moz-placeholder, input.header-search-input:-moz-placeholder',
'property' => 'color',
'suffix' => '!important',
),
),
'active_callback' => array(
array(
'setting' => 'header_search_on_off',
'operator' => '==',
'value' => 'block',
),
),
));
Kirki::add_field('envo_extra', array(
'type' => 'multicolor',
'settings' => 'woo_header_search_select_color',
'label' => esc_attr__('Search categories colors', 'envo-extra'),
'section' => 'woo_search_section',
'priority' => 10,
'transport' => 'auto',
'choices' => array(
'select' => esc_attr__('Background', 'envo-extra'),
'select-text' => esc_attr__('Text', 'envo-extra'),
),
'default' => array(
'select' => '',
'select-text' => '',
),
'output' => array(
array(
'choice' => 'select',
'element' => 'select.header-search-select',
'property' => 'background-color',
),
array(
'choice' => 'select-text',
'element' => 'select.header-search-select',
'property' => 'color',
),
),
'active_callback' => array(
array(
'setting' => 'header_search_on_off',
'operator' => '==',
'value' => 'block',
),
),
));
Kirki::add_field('envo_extra', array(
'type' => 'slider',
'settings' => 'woo_header_search_border_radius',
'label' => esc_attr__('Rounded corners', 'envo-extra'),
'section' => 'woo_search_section',
'default' => 0,
'priority' => 10,
'transport' => 'auto',
'choices' => array(
'min' => 0,
'max' => 25,
'step' => 1,
),
'output' => array(
array(
'element' => '.header-search-form',
'property' => 'border-radius',
'units' => 'px',
),
array(
'element' => 'input.header-search-input',
'property' => 'border-top-left-radius',
'units' => 'px',
),
array(
'element' => 'input.header-search-input',
'property' => 'border-bottom-left-radius',
'units' => 'px',
),
array(
'element' => 'button.header-search-button',
'property' => 'border-top-right-radius',
'units' => 'px',
),
array(
'element' => 'button.header-search-button',
'property' => 'border-bottom-right-radius',
'units' => 'px',
),
),
'active_callback' => array(
array(
'setting' => 'header_search_on_off',
'operator' => '==',
'value' => 'block',
),
),
));
@@ -0,0 +1,60 @@
<?php
if (!class_exists('Kirki')) {
return;
}
Kirki::add_section('woo_account_section', array(
'title' => esc_attr__('My Account', 'envo-extra'),
'panel' => 'woo_cart_account',
'priority' => 6,
));
/**
* Header my account icon
*/
Kirki::add_field('envo_extra', array(
'type' => 'radio-buttonset',
'label' => esc_html__('My Account icon', 'envo-extra'),
'section' => 'woo_account_section',
'settings' => 'header_account_on_off',
'default' => 'block',
'transport' => 'auto',
'choices' => array(
'block' => esc_html__('On', 'envo-extra'),
'none' => esc_html__('Off', 'envo-extra'),
),
'output' => array(
array(
'element' => '.header-my-account, .mobile-account .header-my-account',
'property' => 'display',
),
),
));
Kirki::add_field('envo_extra', array(
'type' => 'color',
'settings' => 'woo_account_color',
'label' => esc_attr__('Header My Account icon color', 'envo-extra'),
'section' => 'woo_account_section',
'default' => '',
'choices' => array(
'alpha' => true,
),
'transport' => 'auto',
'priority' => 15,
'output' => array(
array(
'element' => '.header-my-account a i',
'property' => 'color',
),
),
'active_callback' => array(
array(
'setting' => 'header_account_on_off',
'operator' => '==',
'value' => 'block',
),
),
));
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,59 @@
<?php
if (!class_exists('Kirki')) {
return;
}
Kirki::add_section('woo_wishlist_section', array(
'title' => esc_attr__('Wishlist', 'envo-extra'),
'panel' => 'woo_cart_account',
'priority' => 6,
));
/**
* Header my account icon
*/
Kirki::add_field('envo_extra', array(
'type' => 'radio-buttonset',
'label' => esc_html__('Wishlist icon', 'envo-extra'),
'section' => 'woo_wishlist_section',
'settings' => 'header_wishlist_on_off',
'default' => 'block',
'transport' => 'auto',
'choices' => array(
'block' => esc_html__('On', 'envo-extra'),
'none' => esc_html__('Off', 'envo-extra'),
),
'output' => array(
array(
'element' => '.header-wishlist, .mobile-wishlist .header-wishlist',
'property' => 'display',
),
),
));
Kirki::add_field('envo_extra', array(
'type' => 'color',
'settings' => 'woo_wishlist_color',
'label' => esc_attr__('Header wishlist icon color', 'envo-extra'),
'section' => 'woo_wishlist_section',
'default' => '',
'choices' => array(
'alpha' => true,
),
'transport' => 'auto',
'priority' => 10,
'output' => array(
array(
'element' => '.header-wishlist a i',
'property' => 'color',
),
),
'active_callback' => array(
array(
'setting' => 'header_wishlist_on_off',
'operator' => '==',
'value' => 'block',
),
),
));