feat: initial ACRIB WordPress deployment

- WordPress 6.9.4 (es_ES) with Kadence theme
- Homepage: Hero, La Asociación, Pilares, Beneficios, Eventos, Miembros, Hazte Miembro, Contacto
- Brand identity: #13294b navy, #a12932 burgundy, #c69c48 gold
- Fonts: Raleway (headings) + Source Sans 3 (body) + Lato (UI)
- Plugins: Kadence Blocks, Polylang, Contact Form 7
- Custom CSS with full brand styling and responsive layout
- HTTPS enforced via wp-config.php proxy detection
This commit is contained in:
Malin
2026-05-19 19:25:59 +02:00
commit f3ff7b7186
6119 changed files with 1984255 additions and 0 deletions

View File

@@ -0,0 +1,132 @@
<?php
/**
* Class for the Customizer
*
* @package Kadence
*/
namespace Kadence;
use WP_Customize_Control;
use function sanitize_text_field;
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* Class for Customizer Sanitize
*
* @category class
*/
class Customizer_Sanitize {
/**
* Sanitize string, remove spaces and special characters.
*
* @param string $value the string to be sanitized.
*
* @return string
*/
public static function kadence_sanitize_key_string( $value ) {
// To allow for strings with capitals, dashes, underscores, remove other special characters and spaces.
return preg_replace( '/[^A-Za-z0-9_\-]/', '', $value );
}
/**
* Sanitize customizer setting. If a string use sanitize_key, for an array, loop through each item.
* For the key use sanitize_key and the value strip out most special characters.
*
* @param mixed $start_value the value before sanitized.
*
* @return mixed
*/
public static function kadence_sanitize_option( $start_value ) {
if ( empty( $start_value ) ) {
return '';
}
if ( ! is_array( $start_value ) ) {
return self::kadence_sanitize_key_string( $start_value );
}
$new_value = array();
foreach ( $start_value as $key => $value ) {
// Sanitize key, remove spaces and special characters.
$key = self::kadence_sanitize_key_string( $key );
if ( is_array( $value ) ) {
$new_value[ $key ] = self::kadence_sanitize_option( $value );
} else {
switch ( $key ) {
case 'family':
case 'label':
// Font family names can have special characters and can be custom so treat like an text field, label is a text field.
$new_value[ $key ] = sanitize_text_field( $value );
break;
case 'color':
case 'hover':
case 'active':
case 'link':
case 'background':
case 'backgroundHover':
case 'border':
case 'borderHover':
// To allow hex, rgba(), and var() values or custom values like transparent run through custom preg_replace to remove most special characters and spaces.
if ( strpos( $value, '#' ) === 0 ) {
$new_value[ $key ] = sanitize_hex_color( $value );
} else {
$new_value[ $key ] = preg_replace( '/[^A-Za-z0-9_)(\-,.]/', '', $value );
}
break;
case 'gradient':
// gradient has some extra symbols that need to be allowed.
$new_value[ $key ] = sanitize_text_field( $value );
break;
case 'enabled':
case 'locked':
// return a boolean.
$new_value[ $key ] = ( ( isset( $value ) && true == $value ) ? true : false );
break;
case 'url':
// URL is used for custom social images and background images so save as a url.
$new_value[ $key ] = esc_url_raw( $value );
break;
default:
// To allow for strings with capitals, negative numbers and decimals. Remove other special characters and spaces.
$new_value[ $key ] = preg_replace( '/[^A-Za-z0-9_\-.]/', '', $value );
break;
}
}
}
return $new_value;
}
/**
* Sanitize customizer toggle setting.
*
* @param mixed $value the value before sanitized.
*
* @return bool
*/
public static function kadence_sanitize_toggle( $value ) {
return ( ( isset( $value ) && true == $value ) ? true : false );
}
/**
* Sanitize customizer google subset setting.
*
* @param mixed $start_value the value before sanitized.
*
* @return mixed
*/
public static function kadence_sanitize_google_subsets( $start_value ) {
if ( empty( $start_value ) ) {
return '';
}
if ( ! is_array( $start_value ) ) {
return '';
}
$new_value = array();
foreach ( $start_value as $key => $value ) {
// Sanitize key, remove spaces and special characters.
$key = self::kadence_sanitize_key_string( $key );
$new_value[ $key ] = ( ( isset( $value ) && true == $value ) ? true : false );
}
return $new_value;
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,100 @@
.primary-menu-container .customize-partial-edit-shortcut {
display: none;
}
.secondary-menu-container .customize-partial-edit-shortcut {
display: none;
}
.footer-menu-container .customize-partial-edit-shortcut {
display: none;
}
span.customize-partial-edit-shortcut.customize-partial-edit-shortcut-header_desktop_items {
display: none;
}
.site-branding .site-title .customize-partial-edit-shortcut, .site-branding .site-description .customize-partial-edit-shortcut {
display: none !important;
}
.menu-toggle-open .customize-partial-edit-shortcut {
display: none;
}
.mobile-menu-container .customize-partial-edit-shortcut {
display: none;
}
.site-header-focus-item {
outline: 2px solid transparent;
position: relative;
transition: all 0.3s;
box-shadow: 0 2px 1px rgba(46, 68, 83, 0);
}
.site-header-focus-item .customize-partial-edit-shortcut {
opacity: 0;
left: 0;
transition: all 0.3s;
}
.site-header-focus-item .customize-partial-edit-shortcut button {
border-radius: 0;
border: 0;
box-shadow: none;
}
.site-header-focus-item:hover {
outline: 2px solid #0085ba !important;
box-shadow: 0 2px 1px rgba(46, 68, 83, 0.15);
}
.site-header-focus-item:hover > * > .customize-partial-edit-shortcut {
opacity: 1;
}
.site-footer-focus-item {
outline: 2px solid transparent;
position: relative;
transition: all 0.3s;
box-shadow: 0 2px 1px rgba(46, 68, 83, 0);
}
.site-footer-focus-item .customize-partial-edit-shortcut {
opacity: 0;
left: 0;
transition: all 0.3s;
}
.site-footer-focus-item .customize-partial-edit-shortcut button {
border-radius: 0;
border: 0;
box-shadow: none;
}
.site-footer-focus-item:hover {
outline: 2px solid #0085ba !important;
box-shadow: 0 2px 1px rgba(46, 68, 83, 0.15);
}
.site-footer-focus-item:hover > * > .customize-partial-edit-shortcut {
opacity: 1;
}
.site-footer-focus-item:hover > * > *:first-child > .customize-partial-edit-shortcut {
opacity: 1;
}
.site-header-row-container-inner > .customize-partial-edit-shortcut button {
left: 0;
}
.site-footer-row-container-inner > .customize-partial-edit-shortcut button {
left: 0;
}
.site-header-row-layout-contained .site-header-row-container-inner > .customize-partial-edit-shortcut button {
left: calc(-30px - 1.5rem);
}
.site-footer-row-layout-contained .site-footer-row-container-inner > .customize-partial-edit-shortcut button {
left: calc(-30px - 1.5rem);
}
#kt-scroll-up .customize-partial-edit-shortcut {
display: none;
}

View File

@@ -0,0 +1,87 @@
.primary-menu-container .customize-partial-edit-shortcut {
display:none;
}
.secondary-menu-container .customize-partial-edit-shortcut {
display:none;
}
.footer-menu-container .customize-partial-edit-shortcut {
display:none;
}
span.customize-partial-edit-shortcut.customize-partial-edit-shortcut-header_desktop_items {
display: none;
}
.site-branding .site-title, .site-branding .site-description {
.customize-partial-edit-shortcut {
display: none !important;
}
}
.menu-toggle-open .customize-partial-edit-shortcut {
display: none;
}
.mobile-menu-container .customize-partial-edit-shortcut {
display:none;
}
.site-header-focus-item {
outline: 2px solid transparent;
position: relative;
transition: all 0.3s;
box-shadow: 0 2px 1px rgba(46,68,83,0);
.customize-partial-edit-shortcut{
opacity: 0;
left:0;
transition: all 0.3s;
button {
border-radius: 0;
border: 0;
box-shadow: none;
}
}
}
.site-header-focus-item:hover {
outline: 2px solid #0085ba!important;
box-shadow: 0 2px 1px rgba(46,68,83,.15);
> * > .customize-partial-edit-shortcut{
opacity: 1;
}
}
.site-footer-focus-item {
outline: 2px solid transparent;
position: relative;
transition: all 0.3s;
box-shadow: 0 2px 1px rgba(46,68,83,0);
.customize-partial-edit-shortcut{
opacity: 0;
left:0;
transition: all 0.3s;
button {
border-radius: 0;
border: 0;
box-shadow: none;
}
}
}
.site-footer-focus-item:hover {
outline: 2px solid #0085ba!important;
box-shadow: 0 2px 1px rgba(46,68,83,.15);
> * > .customize-partial-edit-shortcut{
opacity: 1;
}
> * > *:first-child > .customize-partial-edit-shortcut{
opacity: 1;
}
}
.site-header-row-container-inner > .customize-partial-edit-shortcut button {
left: 0;
}
.site-footer-row-container-inner > .customize-partial-edit-shortcut button {
left: 0;
}
.site-header-row-layout-contained .site-header-row-container-inner > .customize-partial-edit-shortcut button {
left: calc(-30px + -1.5rem);
}
.site-footer-row-layout-contained .site-footer-row-container-inner > .customize-partial-edit-shortcut button {
left: calc(-30px + -1.5rem);
}
#kt-scroll-up .customize-partial-edit-shortcut {
display: none;
}

View File

@@ -0,0 +1,102 @@
.customize-control:not(.customize-control-kadence_blank_control):not(.customize-control-kadence_tab_control) + .customize-control {
border-top: 1px solid #ddd;
padding-top: 10px;
}
.kadence-builder-hide .customize-control-kadence_blank_control .kadence-builder-show-button.kadence-builder-tab-toggle {
visibility: visible;
opacity: 1;
}
.kadence-builder-is-active .preview-desktop #customize-preview, .kadence-builder-is-active .preview-tablet #customize-preview {
height: auto;
}
.customize-control-kadence_blank_control .customize-control-description {
position: relative;
}
.customize-control-kadence_blank_control .kadence-builder-tab-toggle {
position: absolute;
right: 10px;
top: 5px;
z-index: 1000;
display: flex;
align-items: center;
}
.customize-control-kadence_blank_control .kadence-builder-tab-toggle span.dashicons {
font-size: 12px;
vertical-align: middle;
line-height: 20px;
}
.customize-control-kadence_blank_control .kadence-builder-show-button.kadence-builder-tab-toggle {
visibility: hidden;
margin-bottom: 20px;
opacity: 0;
bottom: 100%;
top: auto;
}
#customize-theme-controls #sub-accordion-section-kadence_customizer_header_builder .customize-control {
margin: 0;
padding: 0;
}
#customize-theme-controls #sub-accordion-section-kadence_customizer_header_builder .customize-control .description {
padding: 0 20px;
}
.kadence-compontent-tabs {
display: flex;
width: auto;
margin-top: -15px;
margin-left: -24px;
margin-right: -24px;
padding: 0;
margin-bottom: 0;
border-bottom: 1px solid #ccc;
}
.kadence-compontent-tabs .kadence-compontent-tabs-button {
flex: 1 1 0;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
font-size: 11px;
font-weight: 600;
font-style: normal;
text-transform: uppercase;
height: 40px;
margin: 0;
margin-bottom: -1px;
box-sizing: content-box;
padding: 0 10px;
cursor: pointer;
border: 0;
background: transparent;
border-bottom: 4px solid transparent;
border-radius: 0;
border-top-left-radius: 2px;
border-top-right-radius: 2px;
}
.kadence-compontent-tabs .kadence-compontent-tabs-button:not(:first-child) {
margin-left: 0px;
}
.kadence-compontent-tabs .kadence-compontent-tabs-button:hover {
box-shadow: none !important;
}
.kadence-compontent-tabs .kadence-compontent-tabs-button:not(.nav-tab-active):hover {
background: #e5e5e5 !important;
color: #444 !important;
border-bottom-color: #f9f9f9;
}
.kadence-compontent-tabs .kadence-compontent-tabs-button.nav-tab-active {
border-bottom-color: #007cba;
background: #f9f9f9;
color: #000;
}
.kadence-compontent-tabs .kadence-compontent-tabs-button.nav-tab-active:focus {
outline: 0;
box-shadow: none;
}

View File

@@ -0,0 +1,101 @@
.customize-control:not(.customize-control-kadence_blank_control):not(.customize-control-kadence_tab_control) + .customize-control {
border-top: 1px solid #ddd;
padding-top: 10px;
}
.kadence-builder-hide .customize-control-kadence_blank_control .kadence-builder-show-button.kadence-builder-tab-toggle {
visibility: visible;
opacity: 1;
}
.kadence-builder-is-active .preview-desktop #customize-preview, .kadence-builder-is-active .preview-tablet #customize-preview {
height: auto;
}
// Top Tabs
.customize-control-kadence_blank_control {
.customize-control-description {
position:relative;
}
.kadence-builder-tab-toggle {
position: absolute;
right: 10px;
top: 5px;
z-index: 1000;
display: flex;
align-items: center;
span.dashicons {
font-size: 12px;
vertical-align: middle;
line-height: 20px;
}
}
.kadence-builder-show-button.kadence-builder-tab-toggle {
visibility: hidden;
margin-bottom: 20px;
opacity: 0;
bottom: 100%;
top: auto;
}
}
#customize-theme-controls #sub-accordion-section-kadence_customizer_header_builder .customize-control {
margin: 0;
padding: 0;
.description {
padding: 0 20px;
}
}
.kadence-compontent-tabs {
display: flex;
width:auto;
margin-top: -15px;
margin-left: -24px;
margin-right: -24px;
padding: 0;
margin-bottom: 0;
border-bottom: 1px solid #ccc;
.kadence-compontent-tabs-button {
flex: 1 1 0;;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
font-size: 11px;
font-weight: 600;
font-style: normal;
text-transform: uppercase;
height: 40px;
margin: 0;
margin-bottom: -1px;
box-sizing: content-box;
padding: 0 10px;
cursor: pointer;
border: 0;
background: transparent;
border-bottom: 4px solid transparent;
border-radius: 0;
border-top-left-radius: 2px;
border-top-right-radius: 2px;
&:not(:first-child) {
margin-left: 0px;
}
&:hover {
box-shadow: none !important;
}
&:not(.nav-tab-active):hover {
background: #e5e5e5 !important;
color: #444 !important;
border-bottom-color: #f9f9f9;
}
&.nav-tab-active {
border-bottom-color: #007cba;
background: #f9f9f9;
color:#000;
&:focus {
outline: 0;
box-shadow: none;
}
}
}
}

View File

@@ -0,0 +1,41 @@
@media (min-width: 1660px) {
.rtl #customize-theme-controls #sub-accordion-section-kadence_customizer_header_builder, .rtl #customize-theme-controls #sub-accordion-section-kadence_customizer_footer_builder {
right: 18%;
left: 0;
}
}
.rtl .customize-control-kadence_blank_control .kadence-builder-tab-toggle {
left: 10px;
right: auto;
}
.rtl .kadence-builder-item > .kadence-builder-item-icon {
margin-right: 0;
margin-left: -10px;
}
.rtl .kadence-builder-item > .kadence-builder-item-icon.kadence-move-icon {
margin-right: -10px;
margin-left: 0;
}
.rtl .kadence-builder-item > .kadence-builder-item-icon svg.dashicons-arrow-right-alt2 {
transform: rotate(180deg);
}
.rtl .kadence-builder-areas.popup-vertical-group {
padding-left: 20px;
padding-right: 0;
}
.rtl #customize-theme-controls .add-new-menu-item, #customize-theme-controls .add-new-widget {
float: right;
}
.rtl .footer-column-row .kadence-builder-area:last-child {
border-right: 1px dashed #A0AEC0;
}
.rtl .footer-column-row .kadence-builder-area:first-child {
border-right: 0;
}

View File

@@ -0,0 +1,35 @@
// Builder.
@media (min-width: 1660px) {
.rtl #customize-theme-controls #sub-accordion-section-kadence_customizer_header_builder, .rtl #customize-theme-controls #sub-accordion-section-kadence_customizer_footer_builder {
right: 18%;
left: 0;
}
}
.rtl .customize-control-kadence_blank_control .kadence-builder-tab-toggle {
left:10px;
right:auto;
}
.rtl .kadence-builder-item>.kadence-builder-item-icon {
margin-right: 0;
margin-left: -10px;
}
.rtl .kadence-builder-item>.kadence-builder-item-icon.kadence-move-icon {
margin-right: -10px;
margin-left: 0;
}
.rtl .kadence-builder-item>.kadence-builder-item-icon svg.dashicons-arrow-right-alt2 {
transform: rotate(180deg);
}
.rtl .kadence-builder-areas.popup-vertical-group {
padding-left: 20px;
padding-right: 0;
}
.rtl #customize-theme-controls .add-new-menu-item, #customize-theme-controls .add-new-widget {
float: right;
}
.rtl .footer-column-row .kadence-builder-area:last-child {
border-right: 1px dashed #A0AEC0;
}
.rtl .footer-column-row .kadence-builder-area:first-child {
border-right: 0;
}

View File

@@ -0,0 +1,43 @@
<?php
/**
* The blank customize control extends the WP_Customize_Control class.
*
* @package customizer-controls
*/
if ( ! class_exists( 'WP_Customize_Control' ) ) {
return;
}
/**
* Class Kadence_Control_Blank
*
* @access public
*/
class Kadence_Control_Blank extends WP_Customize_Control {
/**
* Control type
*
* @var string
*/
public $type = 'kadence_blank_control';
/**
* Render the control in the customizer
*/
public function render_content() {
if ( ! empty( $this->label ) ) :
?>
<span class="customize-control-title"><?php echo $this->label; // phpcs:ignore ?></span>
<?php
endif;
if ( ! empty( $this->description ) ) :
?>
<span class="customize-control-description"><?php echo $this->description; // phpcs:ignore ?></span>
<?php
endif;
?>
<?php
}
}

View File

@@ -0,0 +1,63 @@
<?php
/**
* The Radio Icon customize control extends the WP_Customize_Control class.
*
* @package customizer-controls
*/
if ( ! class_exists( 'WP_Customize_Control' ) ) {
return;
}
/**
* Class Kadence_Control_Import_Export
*
* @access public
*/
class Kadence_Control_Import_Export extends WP_Customize_Control {
/**
* Control type
*
* @var string
*/
public $type = 'kadence_import_export_control';
/**
* Empty Render Function to prevent errors.
*/
public function render_content() {
?>
<span class="customize-control-title">
<?php esc_html_e( 'Export', 'kadence' ); ?>
</span>
<span class="description customize-control-description">
<?php esc_html_e( 'Click the button below to export the customization settings for this theme.', 'kadence' ); ?>
</span>
<input type="button" class="button kadence-theme-export kadence-theme-button" name="kadence-theme-export-button" value="<?php esc_attr_e( 'Export', 'kadence' ); ?>" />
<hr class="kt-theme-hr" />
<span class="customize-control-title">
<?php esc_html_e( 'Import', 'kadence' ); ?>
</span>
<span class="description customize-control-description">
<?php esc_html_e( 'Upload a file to import customization settings for this theme.', 'kadence' ); ?>
</span>
<div class="kadence-theme-import-controls">
<input type="file" name="kadence-theme-import-file" class="kadence-theme-import-file" />
<?php wp_nonce_field( 'kadence-theme-importing', 'kadence-theme-import' ); ?>
</div>
<div class="kadence-theme-uploading"><?php esc_html_e( 'Uploading...', 'kadence' ); ?></div>
<input type="button" class="button kadence-theme-import kadence-theme-button" name="kadence-theme-import-button" value="<?php esc_attr_e( 'Import', 'kadence' ); ?>" />
<hr class="kt-theme-hr" />
<span class="customize-control-title">
<?php esc_html_e( 'Reset', 'kadence' ); ?>
</span>
<span class="description customize-control-description">
<?php esc_html_e( 'Click the button to reset all theme settings.', 'kadence' ); ?>
</span>
<input type="button" class="components-button is-destructive kadence-theme-reset kadence-theme-button" name="kadence-theme-reset-button" value="<?php esc_attr_e( 'Reset', 'kadence' ); ?>" />
<?php
}
}

View File

@@ -0,0 +1,66 @@
<?php
/**
* The pro customize section extends the WP_Customize_Control class.
*
* @package kadence
*/
if ( ! class_exists( 'WP_Customize_Section' ) ) {
return;
}
/**
* Class Kadence_Section_Pro
*
* @access public
*/
class Kadence_Section_Pro extends WP_Customize_Section {
/**
* Control type
*
* @var string
*/
public $type = 'kadence_section_pro';
/**
* Link for pro version.
*
* @since 1.0.10
* @access public
* @var string
*/
public $pro_link = '';
/**
* Gather the parameters passed to client JavaScript via JSON.
*
* @since 4.1.0
*
* @return array The array to be exported to the client as JSON.
*/
public function json() {
$json = parent::json();
$json['pro_link'] = esc_url_raw( $this->pro_link );
return $json;
}
/**
* An Underscore (JS) template for rendering this section.
*
* Class variables for this section class are available in the `data` JS object;
* export custom variables by overriding WP_Customize_Section::json().
*
* @since 4.3.0
*
* @see WP_Customize_Section::print_template()
*/
protected function render_template() {
?>
<li id="accordion-section-{{ data.id }}" class="accordion-section control-section cannon-expand control-section-{{ data.type }}">
<h3 class="wp-ui-highlight">
<a href="{{ data.pro_link }}" class="wp-ui-text-highlight" target="_blank" rel="noopener">{{ data.title }}</a>
</h3>
</li>
<?php
}
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,39 @@
/**
* manually run this file to generate array for google fonts inc/customizer/google-font-variants.php file)
* run the script on a page with a div with class .google-fonts class.
* you'll also need to put in a google webfonts api key.
*/
$.getJSON('https://www.googleapis.com/webfonts/v1/webfonts?key={{API_KEY}}', function(data) {
$.each( data.items, function( index, font ) {
var category = [];
category.push( font.category );
var variants = font.variants;
var weights = font.variants.slice();
var styles = ['normal'];
for( var i = 0; i < weights.length; i++){
if ( weights[i].includes('italic') ) {
weights.splice(i, 1);
}
};
if ( variants.includes('italic') ) {
styles.push('italic');
}
$('.google-fonts').append("'" + font.family + "' => array( 'v' => array(");
for(var i = 0; i < variants.length; i++) {
if( 0 === i ) {
$('.google-fonts').append("'" + variants[i] + "'");
} else {
$('.google-fonts').append(",'" + variants[i] + "'");
}
}
$('.google-fonts').append(")" + ",'c' => array(");
for(var i = 0; i < category.length; i++) {
if( 0 === i ) {
$('.google-fonts').append("'" + category[i] + "'");
} else {
$('.google-fonts').append(",'" + category[i] + "'");
}
}
$('.google-fonts').append(")" + "),");
});
});

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,212 @@
<?php
/**
* 404 Layout options.
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
$layout_404_settings = array(
'404_tabs' => array(
'control_type' => 'kadence_tab_control',
'section' => 'general_404',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'general_404',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'general_404_design',
),
'active' => 'general',
),
),
'404_tabs_design' => array(
'control_type' => 'kadence_tab_control',
'section' => 'general_404_design',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'general_404',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'general_404_design',
),
'active' => 'design',
),
),
'info_404_layout' => array(
'control_type' => 'kadence_title_control',
'section' => 'general_404',
'priority' => 10,
'label' => esc_html__( '404 Layout', 'kadence' ),
'settings' => false,
),
'info_404_layout_design' => array(
'control_type' => 'kadence_title_control',
'section' => 'general_404_design',
'priority' => 10,
'label' => esc_html__( '404 Layout', 'kadence' ),
'settings' => false,
),
'404_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'general_404',
'label' => esc_html__( '404 Layout', 'kadence' ),
'transport' => 'refresh',
'priority' => 10,
'default' => kadence()->default( '404_layout' ),
'input_attrs' => array(
'layout' => array(
'normal' => array(
'name' => __( 'Normal', 'kadence' ),
'icon' => 'normal',
),
'narrow' => array(
'name' => __( 'Narrow', 'kadence' ),
'icon' => 'narrow',
),
'fullwidth' => array(
'name' => __( 'Fullwidth', 'kadence' ),
'icon' => 'fullwidth',
),
'left' => array(
'name' => __( 'Left Sidebar', 'kadence' ),
'icon' => 'leftsidebar',
),
'right' => array(
'name' => __( 'Right Sidebar', 'kadence' ),
'icon' => 'rightsidebar',
),
),
'class' => 'kadence-three-col',
'responsive' => false,
),
),
'404_sidebar_id' => array(
'control_type' => 'kadence_select_control',
'section' => 'general_404',
'label' => esc_html__( '404 Default Sidebar', 'kadence' ),
'transport' => 'refresh',
'priority' => 10,
'default' => kadence()->default( '404_sidebar_id' ),
'input_attrs' => array(
'options' => kadence()->sidebar_options(),
),
),
'404_content_style' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'general_404',
'label' => esc_html__( 'Content Style', 'kadence' ),
'priority' => 10,
'default' => kadence()->default( '404_content_style' ),
'live_method' => array(
array(
'type' => 'class',
'selector' => 'body.error404',
'pattern' => 'content-style-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'boxed' => array(
'name' => __( 'Boxed', 'kadence' ),
'icon' => 'boxed',
),
'unboxed' => array(
'name' => __( 'Unboxed', 'kadence' ),
'icon' => 'narrow',
),
),
'responsive' => false,
'class' => 'kadence-two-col',
),
),
'404_vertical_padding' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'general_404',
'label' => esc_html__( 'Content Vertical Padding', 'kadence' ),
'priority' => 10,
'default' => kadence()->default( '404_vertical_padding' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => 'body.error404',
'pattern' => 'content-vertical-padding-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'show' => array(
'name' => __( 'Enable', 'kadence' ),
),
'hide' => array(
'name' => __( 'Disable', 'kadence' ),
),
'top' => array(
'name' => __( 'Top Only', 'kadence' ),
),
'bottom' => array(
'name' => __( 'Bottom Only', 'kadence' ),
),
),
'responsive' => false,
'class' => 'kadence-two-grid',
),
),
'404_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'general_404_design',
'label' => esc_html__( 'Site Background', 'kadence' ),
'default' => kadence()->default( '404_background' ),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => 'body.error404',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( '404 Background', 'kadence' ),
),
),
'404_content_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'general_404_design',
'label' => esc_html__( 'Content Background', 'kadence' ),
'default' => kadence()->default( '404_content_background' ),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => 'body.error404 .content-bg, body.error404.content-style-unboxed .site',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( '404 Content Background', 'kadence' ),
),
),
);
Theme_Customizer::add_settings( $layout_404_settings );

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,634 @@
<?php
/**
* Header Main Row Options
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
ob_start(); ?>
<div class="kadence-compontent-tabs nav-tab-wrapper wp-clearfix">
<a href="#" class="nav-tab kadence-general-tab kadence-compontent-tabs-button nav-tab-active" data-tab="general">
<span><?php esc_html_e( 'General', 'kadence' ); ?></span>
</a>
<a href="#" class="nav-tab kadence-design-tab kadence-compontent-tabs-button" data-tab="design">
<span><?php esc_html_e( 'Design', 'kadence' ); ?></span>
</a>
</div>
<?php
$compontent_tabs = ob_get_clean();
ob_start(); ?>
<div class="kadence-compontent-description">
<p style="margin:0"><?php echo esc_html__( 'Title and Content settings affect legacy widgets. For block editor widgets use settings in the editor.', 'kadence' ); ?></p>
</div>
<?php
$component_description = ob_get_clean();
Theme_Customizer::add_settings(
array(
'footer_bottom_tabs' => array(
'control_type' => 'kadence_tab_control',
'section' => 'footer_bottom',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'footer_bottom',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'footer_bottom_design',
),
'active' => 'general',
),
),
'footer_bottom_tabs_design' => array(
'control_type' => 'kadence_tab_control',
'section' => 'footer_bottom_design',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'footer_bottom',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'footer_bottom_design',
),
'active' => 'design',
),
),
'footer_bottom_contain' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'footer_bottom',
'priority' => 4,
'default' => kadence()->default( 'footer_bottom_contain' ),
'label' => esc_html__( 'Container Width', 'kadence' ),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.site-bottom-footer-wrap',
'pattern' => array(
'desktop' => 'site-footer-row-layout-$',
'tablet' => 'site-footer-row-tablet-layout-$',
'mobile' => 'site-footer-row-mobile-layout-$',
),
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'standard' => array(
'tooltip' => __( 'Background Fullwidth, Content Contained', 'kadence' ),
'name' => __( 'Standard', 'kadence' ),
'icon' => '',
),
'fullwidth' => array(
'tooltip' => __( 'Background & Content Fullwidth', 'kadence' ),
'name' => __( 'Fullwidth', 'kadence' ),
'icon' => '',
),
'contained' => array(
'tooltip' => __( 'Background & Content Contained', 'kadence' ),
'name' => __( 'Contained', 'kadence' ),
'icon' => '',
),
),
),
),
'footer_bottom_columns' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'footer_bottom',
'label' => esc_html__( 'Columns', 'kadence' ),
'priority' => 5,
//'transport' => 'refresh',
'default' => kadence()->default( 'footer_bottom_columns' ),
'partial' => array(
'selector' => '#colophon',
'container_inclusive' => true,
'render_callback' => 'Kadence\footer_markup',
),
'input_attrs' => array(
'layout' => array(
'1' => array(
'name' => __( '1', 'kadence' ),
),
'2' => array(
'name' => __( '2', 'kadence' ),
),
'3' => array(
'name' => __( '3', 'kadence' ),
),
'4' => array(
'name' => __( '4', 'kadence' ),
),
'5' => array(
'name' => __( '5', 'kadence' ),
),
),
'responsive' => false,
'footer' => 'bottom',
),
),
'footer_bottom_layout' => array(
'control_type' => 'kadence_row_control',
'section' => 'footer_bottom',
'label' => esc_html__( 'Layout', 'kadence' ),
'priority' => 5,
//'transport' => 'refresh',
'default' => kadence()->default( 'footer_bottom_layout' ),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.site-top-footer-inner-wrap',
'pattern' => array(
'desktop' => 'site-footer-row-column-layout-$',
'tablet' => 'site-footer-row-tablet-column-layout-$',
'mobile' => 'site-footer-row-mobile-column-layout-$',
),
'key' => '',
),
),
'input_attrs' => array(
'responsive' => true,
'footer' => 'bottom',
),
),
'footer_bottom_collapse' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'footer_bottom',
'priority' => 5,
'default' => kadence()->default( 'footer_bottom_collapse' ),
'label' => esc_html__( 'Row Collapse', 'kadence' ),
'context' => array(
array(
'setting' => '__device',
'operator' => 'in',
'value' => array( 'tablet', 'mobile' ),
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.site-bottom-footer-inner-wrap',
'pattern' => 'ft-ro-collapse-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'normal' => array(
'name' => __( 'Left to Right', 'kadence' ),
'icon' => '',
),
'rtl' => array(
'name' => __( 'Right to Left', 'kadence' ),
'icon' => '',
),
),
'responsive' => false,
'footer' => 'bottom',
),
),
'footer_bottom_direction' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'footer_bottom',
'priority' => 5,
'default' => kadence()->default( 'footer_bottom_direction' ),
'label' => esc_html__( 'Column Direction', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.site-bottom-footer-inner-wrap',
'pattern' => array(
'desktop' => 'ft-ro-dir-$',
'tablet' => 'ft-ro-t-dir-$',
'mobile' => 'ft-ro-m-dir-$',
),
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'row' => array(
'tooltip' => __( 'Left to Right', 'kadence' ),
'name' => __( 'Row', 'kadence' ),
'icon' => '',
),
'column' => array(
'tooltip' => __( 'Top to Bottom', 'kadence' ),
'name' => __( 'Column', 'kadence' ),
'icon' => '',
),
),
'responsive' => true,
'footer' => 'bottom',
),
),
'footer_bottom_column_spacing' => array(
'control_type' => 'kadence_range_control',
'section' => 'footer_bottom',
'priority' => 5,
'label' => esc_html__( 'Column Spacing', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
),
'live_method' => array(
array(
'type' => 'css',
'property' => 'grid-column-gap',
'selector' => '#colophon .site-bottom-footer-inner-wrap',
'pattern' => '$',
'key' => 'size',
),
array(
'type' => 'css',
'property' => 'grid-row-gap',
'selector' => '#colophon .site-bottom-footer-inner-wrap',
'pattern' => '$',
'key' => 'size',
),
),
'default' => kadence()->default( 'footer_bottom_column_spacing' ),
'input_attrs' => array(
'min' => array(
'px' => 0,
'em' => 0,
'rem' => 0,
),
'max' => array(
'px' => 200,
'em' => 8,
'rem' => 8,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
),
'units' => array( 'px', 'em', 'rem' ),
),
),
'footer_bottom_widget_spacing' => array(
'control_type' => 'kadence_range_control',
'section' => 'footer_bottom',
'priority' => 5,
'label' => esc_html__( 'Widget Spacing', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
),
'live_method' => array(
array(
'type' => 'css',
'property' => 'margin-bottom',
'selector' => '.site-bottom-footer-inner-wrap .widget',
'pattern' => '$',
'key' => 'size',
),
),
'default' => kadence()->default( 'footer_bottom_widget_spacing' ),
'input_attrs' => array(
'min' => array(
'px' => 0,
'em' => 0,
'rem' => 0,
),
'max' => array(
'px' => 200,
'em' => 8,
'rem' => 8,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
),
'units' => array( 'px', 'em', 'rem' ),
),
),
'footer_bottom_top_spacing' => array(
'control_type' => 'kadence_range_control',
'section' => 'footer_bottom',
'priority' => 5,
'label' => esc_html__( 'Top Spacing', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#colophon .site-bottom-footer-inner-wrap',
'pattern' => '$',
'property' => 'padding-top',
'key' => 'size',
),
),
'default' => kadence()->default( 'footer_bottom_top_spacing' ),
'input_attrs' => array(
'min' => array(
'px' => 0,
'em' => 0,
'rem' => 0,
),
'max' => array(
'px' => 200,
'em' => 8,
'rem' => 8,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
),
'units' => array( 'px', 'em', 'rem' ),
),
),
'footer_bottom_bottom_spacing' => array(
'control_type' => 'kadence_range_control',
'section' => 'footer_bottom',
'priority' => 5,
'label' => esc_html__( 'Bottom Spacing', 'kadence' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#colophon .site-bottom-footer-inner-wrap',
'pattern' => '$',
'property' => 'padding-bottom',
'key' => 'size',
),
),
'default' => kadence()->default( 'footer_bottom_bottom_spacing' ),
'input_attrs' => array(
'min' => array(
'px' => 0,
'em' => 0,
'rem' => 0,
),
'max' => array(
'px' => 200,
'em' => 8,
'rem' => 8,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
),
'units' => array( 'px', 'em', 'rem' ),
),
),
'footer_bottom_height' => array(
'control_type' => 'kadence_range_control',
'section' => 'footer_bottom',
'priority' => 5,
'label' => esc_html__( 'Min Height', 'kadence' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#colophon .site-bottom-footer-inner-wrap',
'pattern' => '$',
'property' => 'min-height',
'key' => 'size',
),
),
'default' => kadence()->default( 'footer_bottom_height' ),
'input_attrs' => array(
'min' => array(
'px' => 10,
'em' => 1,
'rem' => 1,
'vh' => 2,
),
'max' => array(
'px' => 400,
'em' => 12,
'rem' => 12,
'vh' => 40,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
'vh' => 1,
),
'units' => array( 'px', 'em', 'rem', 'vh' ),
),
),
'footer_bottom_widget_settings' => array(
'control_type' => 'kadence_blank_control',
'section' => 'footer_bottom_design',
'settings' => false,
'priority' => 1,
'description' => $component_description,
),
'footer_bottom_widget_title' => array(
'control_type' => 'kadence_typography_control',
'section' => 'footer_bottom_design',
'label' => esc_html__( 'Widget Titles', 'kadence' ),
'default' => kadence()->default( 'footer_bottom_widget_title' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => '.site-bottom-footer-wrap .site-footer-row-container-inner .widget-title',
'pattern' => array(
'desktop' => '$',
'tablet' => '$',
'mobile' => '$',
),
'property' => 'font',
'key' => 'typography',
),
),
'input_attrs' => array(
'id' => 'footer_bottom_widget_title',
),
),
'footer_bottom_widget_content' => array(
'control_type' => 'kadence_typography_control',
'section' => 'footer_bottom_design',
'label' => esc_html__( 'Widget Content', 'kadence' ),
'default' => kadence()->default( 'footer_bottom_widget_content' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => '.site-bottom-footer-wrap .site-footer-row-container-inner',
'pattern' => array(
'desktop' => '$',
'tablet' => '$',
'mobile' => '$',
),
'property' => 'font',
'key' => 'typography',
),
),
'input_attrs' => array(
'id' => 'footer_bottom_widget_content',
),
),
'footer_bottom_link_colors' => array(
'control_type' => 'kadence_color_control',
'section' => 'footer_bottom_design',
'label' => esc_html__( 'Link Colors', 'kadence' ),
'default' => kadence()->default( 'footer_bottom_link_colors' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.site-footer .site-bottom-footer-wrap .site-footer-row-container-inner a:where(:not(.button):not(.wp-block-button__link):not(.wp-element-button))',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.site-footer .site-bottom-footer-wrap .site-footer-row-container-inner a:where(:not(.button):not(.wp-block-button__link):not(.wp-element-button)):hover',
'property' => 'color',
'pattern' => '$',
'key' => 'hover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Hover Color', 'kadence' ),
'palette' => true,
),
),
),
),
'footer_bottom_link_style' => array(
'control_type' => 'kadence_select_control',
'section' => 'footer_bottom_design',
'default' => kadence()->default( 'footer_bottom_link_style' ),
'label' => esc_html__( 'Link Style', 'kadence' ),
'input_attrs' => array(
'options' => array(
'plain' => array(
'name' => __( 'Underline on Hover', 'kadence' ),
),
'normal' => array(
'name' => __( 'Underline', 'kadence' ),
),
'noline' => array(
'name' => __( 'No Underline', 'kadence' ),
),
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.site-bottom-footer-inner-wrap',
'pattern' => 'ft-ro-lstyle-$',
'key' => '',
),
),
),
'footer_bottom_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'footer_bottom_design',
'label' => esc_html__( 'Bottom Row Background', 'kadence' ),
'default' => kadence()->default( 'footer_bottom_background' ),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => '.site-bottom-footer-wrap .site-footer-row-container-inner',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Bottom Row Background', 'kadence' ),
),
),
'footer_bottom_column_border' => array(
'control_type' => 'kadence_border_control',
'section' => 'footer_bottom_design',
'label' => esc_html__( 'Column Border', 'kadence' ),
'default' => kadence()->default( 'footer_bottom_column_border' ),
'live_method' => array(
array(
'type' => 'css_border',
'selector' => '.site-bottom-footer-inner-wrap .site-footer-section:not(:last-child):after',
'pattern' => '$',
'property' => 'border-right',
'pattern' => '$',
'key' => 'border',
),
),
),
'footer_bottom_border' => array(
'control_type' => 'kadence_borders_control',
'section' => 'footer_bottom_design',
'label' => esc_html__( 'Border', 'kadence' ),
'default' => kadence()->default( 'footer_bottom_border' ),
'settings' => array(
'border_top' => 'footer_bottom_top_border',
'border_bottom' => 'footer_bottom_bottom_border',
),
'live_method' => array(
'footer_bottom_top_border' => array(
array(
'type' => 'css_border',
'selector' => array(
'desktop' => '.site-bottom-footer-wrap .site-footer-row-container-inner',
'tablet' => '.site-bottom-footer-wrap .site-footer-row-container-inner',
'mobile' => '.site-bottom-footer-wrap .site-footer-row-container-inner',
),
'pattern' => array(
'desktop' => '$',
'tablet' => '$',
'mobile' => '$',
),
'property' => 'border-top',
'pattern' => '$',
'key' => 'border',
),
),
'footer_bottom_bottom_border' => array(
array(
'type' => 'css_border',
'selector' => array(
'desktop' => '.site-bottom-footer-wrap .site-footer-row-container-inner',
'tablet' => '.site-bottom-footer-wrap .site-footer-row-container-inner',
'mobile' => '.site-bottom-footer-wrap .site-footer-row-container-inner',
),
'pattern' => array(
'desktop' => '$',
'tablet' => '$',
'mobile' => '$',
),
'property' => 'border-bottom',
'pattern' => '$',
'key' => 'border',
),
),
),
),
)
);

View File

@@ -0,0 +1,184 @@
<?php
/**
* Header Builder Options
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
ob_start(); ?>
<!-- <div class="kadence-build-tabs nav-tab-wrapper wp-clearfix">
<a href="#" class="nav-tab preview-desktop kadence-build-tabs-button" data-device="desktop">
<span class="dashicons dashicons-desktop"></span>
<span><?php esc_html_e( 'Desktop', 'kadence' ); ?></span>
</a>
<a href="#" class="nav-tab preview-tablet preview-mobile kadence-build-tabs-button" data-device="tablet">
<span class="dashicons dashicons-smartphone"></span>
<span><?php esc_html_e( 'Tablet / Mobile', 'kadence' ); ?></span>
</a>
</div> -->
<span class="button button-secondary kadence-builder-hide-button kadence-builder-tab-toggle"><span class="dashicons dashicons-no"></span><?php esc_html_e( 'Hide', 'kadence' ); ?></span>
<span class="button button-secondary kadence-builder-show-button kadence-builder-tab-toggle"><span class="dashicons dashicons-edit"></span><?php esc_html_e( 'Footer Builder', 'kadence' ); ?></span>
<?php
$builder_tabs = ob_get_clean();
ob_start(); ?>
<div class="kadence-compontent-tabs nav-tab-wrapper wp-clearfix">
<a href="#" class="nav-tab kadence-general-tab kadence-compontent-tabs-button nav-tab-active" data-tab="general">
<span><?php esc_html_e( 'General', 'kadence' ); ?></span>
</a>
<a href="#" class="nav-tab kadence-design-tab kadence-compontent-tabs-button" data-tab="design">
<span><?php esc_html_e( 'Design', 'kadence' ); ?></span>
</a>
</div>
<?php
$compontent_tabs = ob_get_clean();
$settings = array(
'footer_builder' => array(
'control_type' => 'kadence_blank_control',
'section' => 'footer_builder',
'settings' => false,
'description' => $builder_tabs,
),
'footer_items' => array(
'control_type' => 'kadence_builder_control',
'section' => 'footer_builder',
'default' => kadence()->default( 'footer_items' ),
'partial' => array(
'selector' => '#colophon',
'container_inclusive' => true,
'render_callback' => 'Kadence\footer_markup',
),
'choices' => array(
'footer-navigation' => array(
'name' => esc_html__( 'Footer Navigation', 'kadence' ),
'section' => 'kadence_customizer_footer_navigation',
),
'footer-social' => array(
'name' => esc_html__( 'Social', 'kadence' ),
'section' => 'kadence_customizer_footer_social',
),
'footer-html' => array(
'name' => esc_html__( 'Copyright', 'kadence' ),
'section' => 'kadence_customizer_footer_html',
),
'footer-widget1' => array(
'name' => esc_html__( 'Widget 1', 'kadence' ),
'section' => 'sidebar-widgets-footer1',
),
'footer-widget2' => array(
'name' => esc_html__( 'Widget 2', 'kadence' ),
'section' => 'sidebar-widgets-footer2',
),
'footer-widget3' => array(
'name' => esc_html__( 'Widget 3', 'kadence' ),
'section' => 'sidebar-widgets-footer3',
),
'footer-widget4' => array(
'name' => esc_html__( 'Widget 4', 'kadence' ),
'section' => 'sidebar-widgets-footer4',
),
'footer-widget5' => array(
'name' => esc_html__( 'Widget 5', 'kadence' ),
'section' => 'sidebar-widgets-footer5',
),
'footer-widget6' => array(
'name' => esc_html__( 'Widget 6', 'kadence' ),
'section' => 'sidebar-widgets-footer6',
),
),
'input_attrs' => array(
'group' => 'footer_items',
'rows' => array( 'top', 'middle', 'bottom' ),
'zones' => array(
'top' => array(
'top_1' => esc_html__( 'Top - 1', 'kadence' ),
'top_2' => esc_html__( 'Top - 2', 'kadence' ),
'top_3' => esc_html__( 'Top - 3', 'kadence' ),
'top_4' => esc_html__( 'Top - 4', 'kadence' ),
'top_5' => esc_html__( 'Top - 5', 'kadence' ),
),
'middle' => array(
'middle_1' => esc_html__( 'Middle - 1', 'kadence' ),
'middle_2' => esc_html__( 'Middle - 2', 'kadence' ),
'middle_3' => esc_html__( 'Middle - 3', 'kadence' ),
'middle_4' => esc_html__( 'Middle - 4', 'kadence' ),
'middle_5' => esc_html__( 'Middle - 5', 'kadence' ),
),
'bottom' => array(
'bottom_1' => esc_html__( 'Bottom - 1', 'kadence' ),
'bottom_2' => esc_html__( 'Bottom - 2', 'kadence' ),
'bottom_3' => esc_html__( 'Bottom - 3', 'kadence' ),
'bottom_4' => esc_html__( 'Bottom - 4', 'kadence' ),
'bottom_5' => esc_html__( 'Bottom - 5', 'kadence' ),
),
),
),
),
'footer_tab_settings' => array(
'control_type' => 'kadence_blank_control',
'section' => 'footer_layout',
'settings' => false,
'priority' => 1,
'description' => $compontent_tabs,
),
'footer_available_items' => array(
'control_type' => 'kadence_available_control',
'section' => 'footer_layout',
'settings' => false,
'input_attrs' => array(
'group' => 'footer_items',
'zones' => array( 'top', 'middle', 'bottom' ),
),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
),
),
'footer_wrap_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'footer_layout',
'label' => esc_html__( 'Footer Background', 'kadence' ),
'default' => kadence()->default( 'footer_wrap_background' ),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => '#colophon',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
),
'input_attrs' => array(
'tooltip' => __( 'Footer Background', 'kadence' ),
),
),
'enable_footer_on_bottom' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'footer_layout',
'default' => kadence()->default( 'enable_footer_on_bottom' ),
'label' => esc_html__( 'Keep footer on bottom of screen', 'kadence' ),
'transport' => 'refresh',
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
),
),
);
Theme_Customizer::add_settings( $settings );

View File

@@ -0,0 +1,264 @@
<?php
/**
* Header Main Row Options
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
ob_start(); ?>
<div class="kadence-compontent-tabs nav-tab-wrapper wp-clearfix">
<a href="#" class="nav-tab kadence-general-tab kadence-compontent-tabs-button nav-tab-active" data-tab="general">
<span><?php esc_html_e( 'General', 'kadence' ); ?></span>
</a>
<a href="#" class="nav-tab kadence-design-tab kadence-compontent-tabs-button" data-tab="design">
<span><?php esc_html_e( 'Design', 'kadence' ); ?></span>
</a>
</div>
<?php
$compontent_tabs = ob_get_clean();
$settings = array(
'footer_html_tabs' => array(
'control_type' => 'kadence_blank_control',
'section' => 'footer_html',
'settings' => false,
'priority' => 1,
'description' => $compontent_tabs,
),
'footer_html_content' => array(
'control_type' => 'kadence_editor_control',
'sanitize' => 'wp_kses_post',
'section' => 'footer_html',
'description' => esc_html__( 'Available Placeholders: {copyright} {year} {site-title} {theme-credit}', 'kadence' ),
'priority' => 4,
'default' => kadence()->default( 'footer_html_content' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
),
'input_attrs' => array(
'id' => 'footer_html',
),
'partial' => array(
'selector' => '.footer-html',
'container_inclusive' => true,
'render_callback' => 'Kadence\footer_html',
),
),
'footer_html_align' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'footer_html',
'label' => esc_html__( 'Content Align', 'kadence' ),
'priority' => 5,
'default' => kadence()->default( 'footer_html_align' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.site-info',
'pattern' => array(
'desktop' => 'content-align-$',
'tablet' => 'content-tablet-align-$',
'mobile' => 'content-mobile-align-$',
),
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'left' => array(
'tooltip' => __( 'Left Align', 'kadence' ),
'dashicon' => 'editor-alignleft',
),
'center' => array(
'tooltip' => __( 'Center Align', 'kadence' ),
'dashicon' => 'editor-aligncenter',
),
'right' => array(
'tooltip' => __( 'Right Align', 'kadence' ),
'dashicon' => 'editor-alignright',
),
),
'responsive' => true,
),
),
'footer_html_vertical_align' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'footer_html',
'label' => esc_html__( 'Content Vertical Align', 'kadence' ),
'priority' => 5,
'default' => kadence()->default( 'footer_html_vertical_align' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.site-info',
'pattern' => array(
'desktop' => 'content-valign-$',
'tablet' => 'content-tablet-valign-$',
'mobile' => 'content-mobile-valign-$',
),
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'top' => array(
'tooltip' => __( 'Top Align', 'kadence' ),
'icon' => 'aligntop',
),
'middle' => array(
'tooltip' => __( 'Middle Align', 'kadence' ),
'icon' => 'alignmiddle',
),
'bottom' => array(
'tooltip' => __( 'Bottom Align', 'kadence' ),
'icon' => 'alignbottom',
),
),
'responsive' => true,
),
),
'footer_html_typography' => array(
'control_type' => 'kadence_typography_control',
'section' => 'footer_html',
'label' => esc_html__( 'Font', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
),
'default' => kadence()->default( 'footer_html_typography' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => '#colophon .footer-html',
'pattern' => array(
'desktop' => '$',
'tablet' => '$',
'mobile' => '$',
),
'property' => 'font',
'key' => 'typography',
),
),
'input_attrs' => array(
'id' => 'footer_html_typography',
),
),
'footer_html_link_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'footer_html',
'label' => esc_html__( 'Link Colors', 'kadence' ),
'default' => kadence()->default( 'footer_html_link_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#colophon .site-footer-row-container .site-footer-row .footer-html a',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '#colophon .site-footer-row-container .site-footer-row .footer-html a:hover',
'property' => 'color',
'pattern' => '$',
'key' => 'hover',
),
),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Hover Color', 'kadence' ),
'palette' => true,
),
),
),
),
'footer_html_link_style' => array(
'control_type' => 'kadence_select_control',
'section' => 'footer_html',
'default' => kadence()->default( 'footer_html_link_style' ),
'label' => esc_html__( 'Link Style', 'kadence' ),
'input_attrs' => array(
'options' => array(
'normal' => array(
'name' => __( 'Underline', 'kadence' ),
),
'plain' => array(
'name' => __( 'No Underline', 'kadence' ),
),
),
),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '#colophon .footer-html',
'pattern' => 'inner-link-style-$',
'key' => '',
),
),
),
'footer_html_margin' => array(
'control_type' => 'kadence_measure_control',
'section' => 'footer_html',
'priority' => 10,
'default' => kadence()->default( 'footer_html_margin' ),
'label' => esc_html__( 'Margin', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#colophon .footer-html',
'property' => 'margin',
'pattern' => '$',
'key' => 'measure',
),
),
'input_attrs' => array(
'responsive' => false,
),
),
);
Theme_Customizer::add_settings( $settings );

View File

@@ -0,0 +1,744 @@
<?php
/**
* Header Main Row Options
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
ob_start(); ?>
<div class="kadence-compontent-tabs nav-tab-wrapper wp-clearfix">
<a href="#" class="nav-tab kadence-general-tab kadence-compontent-tabs-button nav-tab-active" data-tab="general">
<span><?php esc_html_e( 'General', 'kadence' ); ?></span>
</a>
<a href="#" class="nav-tab kadence-design-tab kadence-compontent-tabs-button" data-tab="design">
<span><?php esc_html_e( 'Design', 'kadence' ); ?></span>
</a>
</div>
<?php
$compontent_tabs = ob_get_clean();
ob_start(); ?>
<div class="kadence-compontent-description">
<p style="margin:0"><?php echo esc_html__( 'Title and Content settings affect legacy widgets. For block editor widgets use settings in the editor.', 'kadence' ); ?></p>
</div>
<?php
$component_description = ob_get_clean();
$settings = array(
'footer_middle_tabs' => array(
'control_type' => 'kadence_blank_control',
'section' => 'footer_middle',
'settings' => false,
'priority' => 1,
'description' => $compontent_tabs,
),
'footer_middle_contain' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'footer_middle',
'priority' => 4,
'default' => kadence()->default( 'footer_middle_contain' ),
'label' => esc_html__( 'Container Width', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.site-middle-footer-wrap',
'pattern' => array(
'desktop' => 'site-footer-row-layout-$',
'tablet' => 'site-footer-row-tablet-layout-$',
'mobile' => 'site-footer-row-mobile-layout-$',
),
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'standard' => array(
'tooltip' => __( 'Background Fullwidth, Content Contained', 'kadence' ),
'name' => __( 'Standard', 'kadence' ),
'icon' => '',
),
'fullwidth' => array(
'tooltip' => __( 'Background & Content Fullwidth', 'kadence' ),
'name' => __( 'Fullwidth', 'kadence' ),
'icon' => '',
),
'contained' => array(
'tooltip' => __( 'Background & Content Contained', 'kadence' ),
'name' => __( 'Contained', 'kadence' ),
'icon' => '',
),
),
),
),
'footer_middle_columns' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'footer_middle',
'label' => esc_html__( 'Columns', 'kadence' ),
'priority' => 5,
//'transport' => 'refresh',
'default' => kadence()->default( 'footer_middle_columns' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
),
'partial' => array(
'selector' => '#colophon',
'container_inclusive' => true,
'render_callback' => 'Kadence\footer_markup',
),
'input_attrs' => array(
'layout' => array(
'1' => array(
'name' => __( '1', 'kadence' ),
),
'2' => array(
'name' => __( '2', 'kadence' ),
),
'3' => array(
'name' => __( '3', 'kadence' ),
),
'4' => array(
'name' => __( '4', 'kadence' ),
),
'5' => array(
'name' => __( '5', 'kadence' ),
),
),
'responsive' => false,
'footer' => 'middle',
),
),
'footer_middle_layout' => array(
'control_type' => 'kadence_row_control',
'section' => 'footer_middle',
'label' => esc_html__( 'Layout', 'kadence' ),
'priority' => 5,
//'transport' => 'refresh',
'default' => kadence()->default( 'footer_middle_layout' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.site-middle-footer-inner-wrap',
'pattern' => array(
'desktop' => 'site-footer-row-column-layout-$',
'tablet' => 'site-footer-row-tablet-column-layout-$',
'mobile' => 'site-footer-row-mobile-column-layout-$',
),
'key' => '',
),
),
'input_attrs' => array(
'responsive' => true,
'footer' => 'middle',
),
),
'footer_middle_collapse' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'footer_middle',
'priority' => 5,
'default' => kadence()->default( 'footer_middle_collapse' ),
'label' => esc_html__( 'Row Collapse', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
array(
'setting' => '__device',
'operator' => 'in',
'value' => array( 'tablet', 'mobile' ),
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.site-middle-footer-inner-wrap',
'pattern' => 'ft-ro-collapse-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'normal' => array(
'name' => __( 'Left to Right', 'kadence' ),
'icon' => '',
),
'rtl' => array(
'name' => __( 'Right to Left', 'kadence' ),
'icon' => '',
),
),
'responsive' => false,
'footer' => 'middle',
),
),
'footer_middle_direction' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'footer_middle',
'priority' => 5,
'default' => kadence()->default( 'footer_middle_direction' ),
'label' => esc_html__( 'Column Direction', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.site-middle-footer-inner-wrap',
'pattern' => array(
'desktop' => 'ft-ro-dir-$',
'tablet' => 'ft-ro-t-dir-$',
'mobile' => 'ft-ro-m-dir-$',
),
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'row' => array(
'tooltip' => __( 'Left to Right', 'kadence' ),
'name' => __( 'Row', 'kadence' ),
'icon' => '',
),
'column' => array(
'tooltip' => __( 'Top to Bottom', 'kadence' ),
'name' => __( 'Column', 'kadence' ),
'icon' => '',
),
),
'responsive' => true,
'footer' => 'middle',
),
),
'footer_middle_column_spacing' => array(
'control_type' => 'kadence_range_control',
'section' => 'footer_middle',
'priority' => 5,
'label' => esc_html__( 'Column Spacing', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
),
'live_method' => array(
array(
'type' => 'css',
'property' => 'grid-column-gap',
'selector' => '#colophon .site-middle-footer-inner-wrap',
'pattern' => '$',
'key' => 'size',
),
array(
'type' => 'css',
'property' => 'grid-row-gap',
'selector' => '#colophon .site-middle-footer-inner-wrap',
'pattern' => '$',
'key' => 'size',
),
),
'default' => kadence()->default( 'footer_middle_column_spacing' ),
'input_attrs' => array(
'min' => array(
'px' => 0,
'em' => 0,
'rem' => 0,
),
'max' => array(
'px' => 200,
'em' => 8,
'rem' => 8,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
),
'units' => array( 'px', 'em', 'rem' ),
),
),
'footer_middle_widget_spacing' => array(
'control_type' => 'kadence_range_control',
'section' => 'footer_middle',
'priority' => 5,
'label' => esc_html__( 'Widget Spacing', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
),
'live_method' => array(
array(
'type' => 'css',
'property' => 'margin-bottom',
'selector' => '.site-middle-footer-inner-wrap .widget',
'pattern' => '$',
'key' => 'size',
),
),
'default' => kadence()->default( 'footer_middle_widget_spacing' ),
'input_attrs' => array(
'min' => array(
'px' => 0,
'em' => 0,
'rem' => 0,
),
'max' => array(
'px' => 200,
'em' => 8,
'rem' => 8,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
),
'units' => array( 'px', 'em', 'rem' ),
),
),
'footer_middle_top_spacing' => array(
'control_type' => 'kadence_range_control',
'section' => 'footer_middle',
'priority' => 5,
'label' => esc_html__( 'Top Spacing', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#colophon .site-middle-footer-inner-wrap',
'pattern' => '$',
'property' => 'padding-top',
'key' => 'size',
),
),
'default' => kadence()->default( 'footer_middle_top_spacing' ),
'input_attrs' => array(
'min' => array(
'px' => 0,
'em' => 0,
'rem' => 0,
),
'max' => array(
'px' => 200,
'em' => 8,
'rem' => 8,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
),
'units' => array( 'px', 'em', 'rem' ),
),
),
'footer_middle_bottom_spacing' => array(
'control_type' => 'kadence_range_control',
'section' => 'footer_middle',
'priority' => 5,
'label' => esc_html__( 'Bottom Spacing', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#colophon .site-middle-footer-inner-wrap',
'pattern' => '$',
'property' => 'padding-bottom',
'key' => 'size',
),
),
'default' => kadence()->default( 'footer_middle_bottom_spacing' ),
'input_attrs' => array(
'min' => array(
'px' => 0,
'em' => 0,
'rem' => 0,
),
'max' => array(
'px' => 200,
'em' => 8,
'rem' => 8,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
),
'units' => array( 'px', 'em', 'rem' ),
),
),
'footer_middle_height' => array(
'control_type' => 'kadence_range_control',
'section' => 'footer_middle',
'priority' => 5,
'label' => esc_html__( 'Min Height', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#colophon .site-middle-footer-inner-wrap',
'pattern' => '$',
'property' => 'min-height',
'key' => 'size',
),
),
'default' => kadence()->default( 'footer_middle_height' ),
'input_attrs' => array(
'min' => array(
'px' => 10,
'em' => 1,
'rem' => 1,
'vh' => 2,
),
'max' => array(
'px' => 400,
'em' => 12,
'rem' => 12,
'vh' => 40,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
'vh' => 1,
),
'units' => array( 'px', 'em', 'rem', 'vh' ),
),
),
'footer_middle_widget_settings' => array(
'control_type' => 'kadence_blank_control',
'section' => 'footer_middle',
'settings' => false,
'priority' => 1,
'description' => $component_description,
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
),
),
'footer_middle_widget_title' => array(
'control_type' => 'kadence_typography_control',
'section' => 'footer_middle',
'label' => esc_html__( 'Widget Titles', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
),
'default' => kadence()->default( 'footer_middle_widget_title' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => '.site-middle-footer-wrap .site-footer-row-container-inner .widget-title',
'pattern' => array(
'desktop' => '$',
'tablet' => '$',
'mobile' => '$',
),
'property' => 'font',
'key' => 'typography',
),
),
'input_attrs' => array(
'id' => 'footer_middle_widget_title',
),
),
'footer_middle_widget_content' => array(
'control_type' => 'kadence_typography_control',
'section' => 'footer_middle',
'label' => esc_html__( 'Widget Content', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
),
'default' => kadence()->default( 'footer_middle_widget_content' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => '.site-middle-footer-wrap .site-footer-row-container-inner',
'pattern' => array(
'desktop' => '$',
'tablet' => '$',
'mobile' => '$',
),
'property' => 'font',
'key' => 'typography',
),
),
'input_attrs' => array(
'id' => 'footer_middle_widget_content',
),
),
'footer_middle_link_colors' => array(
'control_type' => 'kadence_color_control',
'section' => 'footer_middle',
'label' => esc_html__( 'Link Colors', 'kadence' ),
'default' => kadence()->default( 'footer_middle_link_colors' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.site-footer .site-middle-footer-wrap a:where(:not(.button):not(.wp-block-button__link):not(.wp-element-button))',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.site-footer .site-middle-footer-wrap a:where(:not(.button):not(.wp-block-button__link):not(.wp-element-button)):hover',
'property' => 'color',
'pattern' => '$',
'key' => 'hover',
),
),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Hover Color', 'kadence' ),
'palette' => true,
),
),
),
),
'footer_middle_link_style' => array(
'control_type' => 'kadence_select_control',
'section' => 'footer_middle',
'default' => kadence()->default( 'footer_middle_link_style' ),
'label' => esc_html__( 'Link Style', 'kadence' ),
'input_attrs' => array(
'options' => array(
'plain' => array(
'name' => __( 'Underline on Hover', 'kadence' ),
),
'normal' => array(
'name' => __( 'Underline', 'kadence' ),
),
'noline' => array(
'name' => __( 'No Underline', 'kadence' ),
),
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.site-middle-footer-inner-wrap',
'pattern' => 'ft-ro-lstyle-$',
'key' => '',
),
),
),
'footer_middle_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'footer_middle',
'label' => esc_html__( 'Middle Row Background', 'kadence' ),
'default' => kadence()->default( 'footer_middle_background' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => '.site-middle-footer-wrap .site-footer-row-container-inner',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Middle Row Background', 'kadence' ),
),
),
'footer_middle_column_border' => array(
'control_type' => 'kadence_border_control',
'section' => 'footer_middle',
'label' => esc_html__( 'Column Border', 'kadence' ),
'default' => kadence()->default( 'footer_middle_column_border' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
),
'live_method' => array(
array(
'type' => 'css_border',
'selector' => '.site-middle-footer-inner-wrap .site-footer-section:not(:last-child):after',
'pattern' => '$',
'property' => 'border-right',
'pattern' => '$',
'key' => 'border',
),
),
),
'footer_middle_border' => array(
'control_type' => 'kadence_borders_control',
'section' => 'footer_middle',
'label' => esc_html__( 'Border', 'kadence' ),
'default' => kadence()->default( 'footer_middle_border' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
),
'settings' => array(
'border_top' => 'footer_middle_top_border',
'border_bottom' => 'footer_middle_bottom_border',
),
'live_method' => array(
'footer_middle_top_border' => array(
array(
'type' => 'css_border',
'selector' => array(
'desktop' => '.site-middle-footer-wrap .site-footer-row-container-inner',
'tablet' => '.site-middle-footer-wrap .site-footer-row-container-inner',
'mobile' => '.site-middle-footer-wrap .site-footer-row-container-inner',
),
'pattern' => array(
'desktop' => '$',
'tablet' => '$',
'mobile' => '$',
),
'property' => 'border-top',
'pattern' => '$',
'key' => 'border',
),
),
'footer_middle_bottom_border' => array(
array(
'type' => 'css_border',
'selector' => array(
'desktop' => '.site-middle-footer-wrap .site-footer-row-container-inner',
'tablet' => '.site-middle-footer-wrap .site-footer-row-container-inner',
'mobile' => '.site-middle-footer-wrap .site-footer-row-container-inner',
),
'pattern' => array(
'desktop' => '$',
'tablet' => '$',
'mobile' => '$',
),
'property' => 'border-bottom',
'pattern' => '$',
'key' => 'border',
),
),
),
),
// 'footer_middle_top_border' => array(
// 'control_type' => 'kadence_border_control',
// 'section' => 'footer_middle',
// 'label' => esc_html__( 'Top Border', 'kadence' ),
// 'default' => kadence()->default( 'footer_middle_top_border' ),
// 'context' => array(
// array(
// 'setting' => '__current_tab',
// 'value' => 'design',
// ),
// ),
// 'live_method' => array(
// array(
// 'type' => 'css_border',
// 'selector' => array(
// 'desktop' => '.site-middle-footer-wrap .site-footer-row-container-inner',
// 'tablet' => '.site-middle-footer-wrap .site-footer-row-container-inner',
// 'mobile' => '.site-middle-footer-wrap .site-footer-row-container-inner',
// ),
// 'pattern' => array(
// 'desktop' => '$',
// 'tablet' => '$',
// 'mobile' => '$',
// ),
// 'property' => 'border-top',
// 'pattern' => '$',
// 'key' => 'border',
// ),
// ),
// ),
// 'footer_middle_bottom_border' => array(
// 'control_type' => 'kadence_border_control',
// 'section' => 'footer_middle',
// 'label' => esc_html__( 'Bottom Border', 'kadence' ),
// 'default' => kadence()->default( 'footer_middle_bottom_border' ),
// 'context' => array(
// array(
// 'setting' => '__current_tab',
// 'value' => 'design',
// ),
// ),
// 'live_method' => array(
// array(
// 'type' => 'css_border',
// 'selector' => array(
// 'desktop' => '.site-middle-footer-wrap .site-footer-row-container-inner',
// 'tablet' => '.site-middle-footer-wrap .site-footer-row-container-inner',
// 'mobile' => '.site-middle-footer-wrap .site-footer-row-container-inner',
// ),
// 'pattern' => array(
// 'desktop' => '$',
// 'tablet' => '$',
// 'mobile' => '$',
// ),
// 'property' => 'border-bottom',
// 'pattern' => '$',
// 'key' => 'border',
// ),
// ),
// ),
);
Theme_Customizer::add_settings( $settings );

View File

@@ -0,0 +1,389 @@
<?php
/**
* Header Builder Options
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
ob_start(); ?>
<div class="kadence-compontent-tabs nav-tab-wrapper wp-clearfix">
<a href="#" class="nav-tab kadence-general-tab kadence-compontent-tabs-button nav-tab-active" data-tab="general">
<span><?php esc_html_e( 'General', 'kadence' ); ?></span>
</a>
<a href="#" class="nav-tab kadence-design-tab kadence-compontent-tabs-button" data-tab="design">
<span><?php esc_html_e( 'Design', 'kadence' ); ?></span>
</a>
</div>
<?php
$compontent_tabs = ob_get_clean();
$settings = array(
'footer_navigation_tabs' => array(
'control_type' => 'kadence_blank_control',
'section' => 'footer_navigation',
'settings' => false,
'priority' => 1,
'description' => $compontent_tabs,
),
'footer_navigation_link' => array(
'control_type' => 'kadence_focus_button_control',
'section' => 'footer_navigation',
'settings' => false,
'priority' => 5,
'label' => esc_html__( 'Select Menu', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
),
'input_attrs' => array(
'section' => 'menu_locations',
),
),
'footer_navigation_spacing' => array(
'control_type' => 'kadence_range_control',
'section' => 'footer_navigation',
'priority' => 5,
'label' => esc_html__( 'Items Spacing', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#colophon .footer-navigation .footer-menu-container > ul > li > a',
'property' => 'padding-left',
'pattern' => 'calc($ / 2)',
'key' => 'size',
),
array(
'type' => 'css',
'selector' => '#colophon .footer-navigation .footer-menu-container > ul > li > a',
'property' => 'padding-right',
'pattern' => 'calc($ / 2)',
'key' => 'size',
),
),
'default' => kadence()->default( 'footer_navigation_spacing' ),
'input_attrs' => array(
'min' => array(
'px' => 0,
'em' => 0,
'rem' => 0,
'vw' => 0,
),
'max' => array(
'px' => 100,
'em' => 12,
'rem' => 12,
'vw' => 12,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
'vw' => 0.01,
),
'units' => array( 'px', 'em', 'rem', 'vw' ),
'responsive' => false,
),
),
'footer_navigation_stretch' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'footer_navigation',
'priority' => 5,
'default' => kadence()->default( 'footer_navigation_stretch' ),
'label' => esc_html__( 'Stretch Menu?', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.footer-navigation-wrap',
'pattern' => 'footer-navigation-layout-stretch-$',
'key' => 'switch',
),
),
),
'footer_navigation_vertical_spacing' => array(
'control_type' => 'kadence_range_control',
'section' => 'footer_navigation',
'label' => esc_html__( 'Items Top and Bottom Padding', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#colophon .footer-navigation .footer-menu-container > ul > li > a',
'property' => 'padding-top',
'pattern' => '$',
'key' => 'size',
),
array(
'type' => 'css',
'selector' => '#colophon .footer-navigation .footer-menu-container > ul > li > a',
'property' => 'padding-bottom',
'pattern' => '$',
'key' => 'size',
),
),
'default' => kadence()->default( 'footer_navigation_vertical_spacing' ),
'input_attrs' => array(
'min' => array(
'px' => 0,
'em' => 0,
'rem' => 0,
'vh' => 0,
),
'max' => array(
'px' => 100,
'em' => 12,
'rem' => 12,
'vh' => 12,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
'vh' => 0.01,
),
'units' => array( 'px', 'em', 'rem', 'vh' ),
'responsive' => false,
),
),
'footer_navigation_align' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'footer_navigation',
'label' => esc_html__( 'Content Align', 'kadence' ),
'priority' => 5,
'default' => kadence()->default( 'footer_navigation_align' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.footer-navigation-wrap',
'pattern' => array(
'desktop' => 'content-align-$',
'tablet' => 'content-tablet-align-$',
'mobile' => 'content-mobile-align-$',
),
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'left' => array(
'tooltip' => __( 'Left Align', 'kadence' ),
'dashicon' => 'editor-alignleft',
),
'center' => array(
'tooltip' => __( 'Center Align', 'kadence' ),
'dashicon' => 'editor-aligncenter',
),
'right' => array(
'tooltip' => __( 'Right Align', 'kadence' ),
'dashicon' => 'editor-alignright',
),
),
'responsive' => true,
),
),
'footer_navigation_vertical_align' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'footer_navigation',
'label' => esc_html__( 'Content Vertical Align', 'kadence' ),
'priority' => 5,
'default' => kadence()->default( 'footer_navigation_vertical_align' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.footer-navigation-wrap',
'pattern' => array(
'desktop' => 'content-valign-$',
'tablet' => 'content-tablet-valign-$',
'mobile' => 'content-mobile-valign-$',
),
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'top' => array(
'tooltip' => __( 'Top Align', 'kadence' ),
'icon' => 'aligntop',
),
'middle' => array(
'tooltip' => __( 'Middle Align', 'kadence' ),
'icon' => 'alignmiddle',
),
'bottom' => array(
'tooltip' => __( 'Bottom Align', 'kadence' ),
'icon' => 'alignbottom',
),
),
'responsive' => true,
),
),
'footer_navigation_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'footer_navigation',
'label' => esc_html__( 'Navigation Colors', 'kadence' ),
'default' => kadence()->default( 'footer_navigation_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#colophon .footer-navigation .footer-menu-container > ul li a',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '#colophon .footer-navigation .footer-menu-container > ul li a:hover',
'property' => 'color',
'pattern' => '$',
'key' => 'hover',
),
array(
'type' => 'css',
'selector' => '#colophon .footer-navigation .footer-menu-container > ul li.current-menu-item > a, #colophon .footer-navigation .footer-menu-container > ul li.current_page_item > a',
'property' => 'color',
'pattern' => '$',
'key' => 'active',
),
),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Hover Color', 'kadence' ),
'palette' => true,
),
'active' => array(
'tooltip' => __( 'Active Color', 'kadence' ),
'palette' => true,
),
),
),
),
'footer_navigation_background' => array(
'control_type' => 'kadence_color_control',
'section' => 'footer_navigation',
'label' => esc_html__( 'Navigation Background', 'kadence' ),
'default' => kadence()->default( 'footer_navigation_background' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#colophon .footer-navigation .footer-menu-container > ul li a',
'property' => 'background',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '#colophon .footer-navigation .footer-menu-container > ul li a:hover',
'property' => 'background',
'pattern' => '$',
'key' => 'hover',
),
array(
'type' => 'css',
'selector' => '#colophon .footer-navigation .footer-menu-container > ul li.current-menu-item > a, #colophon .footer-navigation .footer-menu-container > ul > li.current_page_item > a',
'property' => 'background',
'pattern' => '$',
'key' => 'active',
),
),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Background', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Hover Background', 'kadence' ),
'palette' => true,
),
'active' => array(
'tooltip' => __( 'Active Background', 'kadence' ),
'palette' => true,
),
),
),
),
'footer_navigation_typography' => array(
'control_type' => 'kadence_typography_control',
'section' => 'footer_navigation',
'label' => esc_html__( 'Navigation Font', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
),
'default' => kadence()->default( 'footer_navigation_typography' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => '#colophon .footer-navigation .footer-menu-container > ul li a',
'pattern' => array(
'desktop' => '$',
'tablet' => '$',
'mobile' => '$',
),
'property' => 'font',
'key' => 'typography',
),
),
'input_attrs' => array(
'id' => 'footer_navigation_typography',
'options' => 'no-color',
),
),
);
Theme_Customizer::add_settings( $settings );

View File

@@ -0,0 +1,502 @@
<?php
/**
* Header Builder Options
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
$settings = array(
'footer_social_tabs' => array(
'control_type' => 'kadence_tab_control',
'section' => 'footer_social',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'footer_social',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'footer_social_design',
),
'active' => 'general',
),
),
'footer_social_tabs_design' => array(
'control_type' => 'kadence_tab_control',
'section' => 'footer_social_design',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'footer_social',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'footer_social_design',
),
'active' => 'design',
),
),
'footer_social_title' => array(
'control_type' => 'kadence_text_control',
'section' => 'footer_social',
'sanitize' => 'sanitize_text_field',
'priority' => 4,
'label' => esc_html__( 'Title', 'kadence' ),
'default' => kadence()->default( 'footer_social_title' ),
'partial' => array(
'selector' => '.footer-social-wrap',
'container_inclusive' => true,
'render_callback' => 'Kadence\footer_social',
),
),
'footer_social_items' => array(
'control_type' => 'kadence_social_control',
'section' => 'footer_social',
'priority' => 6,
'default' => kadence()->default( 'footer_social_items' ),
'label' => esc_html__( 'Social Items', 'kadence' ),
'partial' => array(
'selector' => '.footer-social-wrap',
'container_inclusive' => true,
'render_callback' => 'Kadence\footer_social',
),
),
'footer_social_show_label' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'footer_social',
'priority' => 8,
'default' => kadence()->default( 'footer_social_show_label' ),
'label' => esc_html__( 'Show Icon Label?', 'kadence' ),
'partial' => array(
'selector' => '.footer-social-wrap',
'container_inclusive' => true,
'render_callback' => 'Kadence\footer_social',
),
),
'footer_social_item_spacing' => array(
'control_type' => 'kadence_range_control',
'section' => 'footer_social',
'label' => esc_html__( 'Item Spacing', 'kadence' ),
'default' => kadence()->default( 'footer_social_item_spacing' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#colophon .site-footer-wrap .footer-social-wrap .footer-social-inner-wrap',
'property' => 'gap',
'pattern' => '$',
'key' => 'size',
),
),
'input_attrs' => array(
'min' => array(
'px' => 0,
'em' => 0,
'rem' => 0,
),
'max' => array(
'px' => 50,
'em' => 3,
'rem' => 3,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
),
'units' => array( 'px', 'em', 'rem' ),
'responsive' => false,
),
),
'footer_social_align' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'footer_social',
'label' => esc_html__( 'Content Align', 'kadence' ),
'priority' => 10,
'default' => kadence()->default( 'footer_social_align' ),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.footer-social',
'pattern' => array(
'desktop' => 'content-align-$',
'tablet' => 'content-tablet-align-$',
'mobile' => 'content-mobile-align-$',
),
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'left' => array(
'tooltip' => __( 'Left Align', 'kadence' ),
'dashicon' => 'editor-alignleft',
),
'center' => array(
'tooltip' => __( 'Center Align', 'kadence' ),
'dashicon' => 'editor-aligncenter',
),
'right' => array(
'tooltip' => __( 'Right Align', 'kadence' ),
'dashicon' => 'editor-alignright',
),
),
'responsive' => true,
),
),
'footer_social_vertical_align' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'footer_social',
'label' => esc_html__( 'Content Vertical Align', 'kadence' ),
'priority' => 10,
'default' => kadence()->default( 'footer_social_vertical_align' ),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.footer-social',
'pattern' => array(
'desktop' => 'content-valign-$',
'tablet' => 'content-tablet-valign-$',
'mobile' => 'content-mobile-valign-$',
),
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'top' => array(
'tooltip' => __( 'Top Align', 'kadence' ),
'icon' => 'aligntop',
),
'middle' => array(
'tooltip' => __( 'Middle Align', 'kadence' ),
'icon' => 'alignmiddle',
),
'bottom' => array(
'tooltip' => __( 'Bottom Align', 'kadence' ),
'icon' => 'alignbottom',
),
),
'responsive' => true,
),
),
'footer_social_style' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'footer_social_design',
'priority' => 10,
'default' => kadence()->default( 'footer_social_style' ),
'label' => esc_html__( 'Social Style', 'kadence' ),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.footer-social-inner-wrap',
'pattern' => 'social-style-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'filled' => array(
'name' => __( 'Filled', 'kadence' ),
),
'outline' => array(
'name' => __( 'Outline', 'kadence' ),
),
),
'responsive' => false,
),
),
'footer_social_icon_size' => array(
'control_type' => 'kadence_range_control',
'section' => 'footer_social_design',
'label' => esc_html__( 'Icon Size', 'kadence' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.footer-social-wrap .footer-social-inner-wrap',
'property' => 'font-size',
'pattern' => '$',
'key' => 'size',
),
),
'default' => kadence()->default( 'footer_social_icon_size' ),
'input_attrs' => array(
'min' => array(
'px' => 0,
'em' => 0,
'rem' => 0,
),
'max' => array(
'px' => 100,
'em' => 12,
'rem' => 12,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
),
'units' => array( 'px', 'em', 'rem' ),
'responsive' => false,
),
),
'footer_social_brand' => array(
'control_type' => 'kadence_select_control',
'section' => 'footer_social_design',
'transport' => 'refresh',
'default' => kadence()->default( 'footer_social_brand' ),
'label' => esc_html__( 'Use Brand Colors?', 'kadence' ),
'input_attrs' => array(
'options' => array(
'' => array(
'name' => __( 'No', 'kadence' ),
),
'always' => array(
'name' => __( 'Yes', 'kadence' ),
),
'onhover' => array(
'name' => __( 'On Hover', 'kadence' ),
),
'untilhover' => array(
'name' => __( 'Until Hover', 'kadence' ),
),
),
),
),
'footer_social_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'footer_social_design',
'label' => esc_html__( 'Colors', 'kadence' ),
'default' => kadence()->default( 'footer_social_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.site-footer .site-footer-wrap .site-footer-section .footer-social-wrap .footer-social-inner-wrap .social-button',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.site-footer .site-footer-wrap .site-footer-section .footer-social-wrap .footer-social-inner-wrap .social-button:hover',
'property' => 'color',
'pattern' => '$',
'key' => 'hover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Hover Color', 'kadence' ),
'palette' => true,
),
),
),
),
'footer_social_background' => array(
'control_type' => 'kadence_color_control',
'section' => 'footer_social_design',
'label' => esc_html__( 'Background Colors', 'kadence' ),
'default' => kadence()->default( 'footer_social_background' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.site-footer .site-footer-wrap .site-footer-section .footer-social-wrap .footer-social-inner-wrap .social-button',
'property' => 'background',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.site-footer .site-footer-wrap .site-footer-section .footer-social-wrap .footer-social-inner-wrap .social-button:hover',
'property' => 'background',
'pattern' => '$',
'key' => 'hover',
),
),
'context' => array(
array(
'setting' => 'footer_social_style',
'operator' => '=',
'value' => 'filled',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Hover Color', 'kadence' ),
'palette' => true,
),
),
),
),
'footer_social_border_colors' => array(
'control_type' => 'kadence_color_control',
'section' => 'footer_social_design',
'label' => esc_html__( 'Border Colors', 'kadence' ),
'default' => kadence()->default( 'footer_social_border' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.site-footer .site-footer-wrap .site-footer-section .footer-social-wrap .footer-social-inner-wrap .social-button',
'property' => 'border-color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.site-footer .site-footer-wrap .site-footer-section .footer-social-wrap .footer-social-inner-wrap .social-button:hover',
'property' => 'border-color',
'pattern' => '$',
'key' => 'hover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Hover Color', 'kadence' ),
'palette' => true,
),
),
),
),
'footer_social_border' => array(
'control_type' => 'kadence_border_control',
'section' => 'footer_social_design',
'label' => esc_html__( 'Border', 'kadence' ),
'default' => kadence()->default( 'footer_social_border' ),
'live_method' => array(
array(
'type' => 'css_border',
'selector' => '.site-footer .site-footer-wrap .site-footer-section .footer-social-wrap .footer-social-inner-wrap .social-button',
'property' => 'border',
'pattern' => '$',
'key' => 'border',
),
),
'input_attrs' => array(
'responsive' => false,
'color' => false,
),
),
'footer_social_border_radius' => array(
'control_type' => 'kadence_range_control',
'section' => 'footer_social_design',
'label' => esc_html__( 'Border Radius', 'kadence' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.site-footer .site-footer-wrap .site-footer-section .footer-social-wrap .footer-social-inner-wrap .social-button',
'property' => 'border-radius',
'pattern' => '$',
'key' => 'size',
),
),
'default' => kadence()->default( 'footer_social_border_radius' ),
'input_attrs' => array(
'min' => array(
'px' => 0,
'em' => 0,
'rem' => 0,
'%' => 0,
),
'max' => array(
'px' => 100,
'em' => 12,
'rem' => 12,
'%' => 100,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
'%' => 1,
),
'units' => array( 'px', 'em', 'rem', '%' ),
'responsive' => false,
),
),
'footer_social_typography' => array(
'control_type' => 'kadence_typography_control',
'section' => 'footer_social_design',
'label' => esc_html__( 'Font', 'kadence' ),
'context' => array(
array(
'setting' => 'footer_social_show_label',
'operator' => '=',
'value' => true,
),
),
'default' => kadence()->default( 'footer_social_typography' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => '.footer-social-wrap a.social-button .social-label',
'pattern' => array(
'desktop' => '$',
'tablet' => '$',
'mobile' => '$',
),
'property' => 'font',
'key' => 'typography',
),
),
'input_attrs' => array(
'id' => 'footer_social_typography',
'options' => 'no-color',
),
),
'footer_social_margin' => array(
'control_type' => 'kadence_measure_control',
'section' => 'footer_social_design',
'priority' => 10,
'default' => kadence()->default( 'footer_social_margin' ),
'label' => esc_html__( 'Margin', 'kadence' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#colophon .footer-social-wrap',
'property' => 'margin',
'pattern' => '$',
'key' => 'measure',
),
),
'input_attrs' => array(
'responsive' => false,
),
),
'footer_social_link_to_social_links' => array(
'control_type' => 'kadence_focus_button_control',
'section' => 'footer_social',
'settings' => false,
'priority' => 25,
'label' => esc_html__( 'Set Social Links', 'kadence' ),
'input_attrs' => array(
'section' => 'kadence_customizer_general_social',
),
),
);
Theme_Customizer::add_settings( $settings );

View File

@@ -0,0 +1,744 @@
<?php
/**
* Header Main Row Options
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
ob_start(); ?>
<div class="kadence-compontent-tabs nav-tab-wrapper wp-clearfix">
<a href="#" class="nav-tab kadence-general-tab kadence-compontent-tabs-button nav-tab-active" data-tab="general">
<span><?php esc_html_e( 'General', 'kadence' ); ?></span>
</a>
<a href="#" class="nav-tab kadence-design-tab kadence-compontent-tabs-button" data-tab="design">
<span><?php esc_html_e( 'Design', 'kadence' ); ?></span>
</a>
</div>
<?php
$compontent_tabs = ob_get_clean();
ob_start(); ?>
<div class="kadence-compontent-description">
<p style="margin:0"><?php echo esc_html__( 'Title and Content settings affect legacy widgets. For block editor widgets use settings in the editor.', 'kadence' ); ?></p>
</div>
<?php
$component_description = ob_get_clean();
$settings = array(
'footer_top_tabs' => array(
'control_type' => 'kadence_blank_control',
'section' => 'footer_top',
'settings' => false,
'priority' => 1,
'description' => $compontent_tabs,
),
'footer_top_contain' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'footer_top',
'priority' => 4,
'default' => kadence()->default( 'footer_top_contain' ),
'label' => esc_html__( 'Container Width', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.site-top-footer-wrap',
'pattern' => array(
'desktop' => 'site-footer-row-layout-$',
'tablet' => 'site-footer-row-tablet-layout-$',
'mobile' => 'site-footer-row-mobile-layout-$',
),
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'standard' => array(
'tooltip' => __( 'Background Fullwidth, Content Contained', 'kadence' ),
'name' => __( 'Standard', 'kadence' ),
'icon' => '',
),
'fullwidth' => array(
'tooltip' => __( 'Background & Content Fullwidth', 'kadence' ),
'name' => __( 'Fullwidth', 'kadence' ),
'icon' => '',
),
'contained' => array(
'tooltip' => __( 'Background & Content Contained', 'kadence' ),
'name' => __( 'Contained', 'kadence' ),
'icon' => '',
),
),
),
),
'footer_top_columns' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'footer_top',
'label' => esc_html__( 'Columns', 'kadence' ),
'priority' => 5,
//'transport' => 'refresh',
'default' => kadence()->default( 'footer_top_columns' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
),
'partial' => array(
'selector' => '#colophon',
'container_inclusive' => true,
'render_callback' => 'Kadence\footer_markup',
),
'input_attrs' => array(
'layout' => array(
'1' => array(
'name' => __( '1', 'kadence' ),
),
'2' => array(
'name' => __( '2', 'kadence' ),
),
'3' => array(
'name' => __( '3', 'kadence' ),
),
'4' => array(
'name' => __( '4', 'kadence' ),
),
'5' => array(
'name' => __( '5', 'kadence' ),
),
),
'responsive' => false,
'footer' => 'top',
),
),
'footer_top_layout' => array(
'control_type' => 'kadence_row_control',
'section' => 'footer_top',
'label' => esc_html__( 'Layout', 'kadence' ),
'priority' => 5,
//'transport' => 'refresh',
'default' => kadence()->default( 'footer_top_layout' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.site-top-footer-inner-wrap',
'pattern' => array(
'desktop' => 'site-footer-row-column-layout-$',
'tablet' => 'site-footer-row-tablet-column-layout-$',
'mobile' => 'site-footer-row-mobile-column-layout-$',
),
'key' => '',
),
),
'input_attrs' => array(
'responsive' => true,
'footer' => 'top',
),
),
'footer_top_collapse' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'footer_top',
'priority' => 5,
'default' => kadence()->default( 'footer_top_collapse' ),
'label' => esc_html__( 'Row Collapse', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
array(
'setting' => '__device',
'operator' => 'in',
'value' => array( 'tablet', 'mobile' ),
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.site-top-footer-inner-wrap',
'pattern' => 'ft-ro-collapse-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'normal' => array(
'name' => __( 'Left to Right', 'kadence' ),
'icon' => '',
),
'rtl' => array(
'name' => __( 'Right to Left', 'kadence' ),
'icon' => '',
),
),
'responsive' => false,
'footer' => 'top',
),
),
'footer_top_direction' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'footer_top',
'priority' => 5,
'default' => kadence()->default( 'footer_top_direction' ),
'label' => esc_html__( 'Column Direction', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.site-top-footer-inner-wrap',
'pattern' => array(
'desktop' => 'ft-ro-dir-$',
'tablet' => 'ft-ro-t-dir-$',
'mobile' => 'ft-ro-m-dir-$',
),
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'row' => array(
'tooltip' => __( 'Left to Right', 'kadence' ),
'name' => __( 'Row', 'kadence' ),
'icon' => '',
),
'column' => array(
'tooltip' => __( 'Top to Bottom', 'kadence' ),
'name' => __( 'Column', 'kadence' ),
'icon' => '',
),
),
'responsive' => true,
'footer' => 'top',
),
),
'footer_top_column_spacing' => array(
'control_type' => 'kadence_range_control',
'section' => 'footer_top',
'priority' => 5,
'label' => esc_html__( 'Column Spacing', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
),
'live_method' => array(
array(
'type' => 'css',
'property' => 'grid-column-gap',
'selector' => '#colophon .site-top-footer-inner-wrap',
'pattern' => '$',
'key' => 'size',
),
array(
'type' => 'css',
'property' => 'grid-row-gap',
'selector' => '#colophon .site-top-footer-inner-wrap',
'pattern' => '$',
'key' => 'size',
),
),
'default' => kadence()->default( 'footer_top_column_spacing' ),
'input_attrs' => array(
'min' => array(
'px' => 0,
'em' => 0,
'rem' => 0,
),
'max' => array(
'px' => 200,
'em' => 8,
'rem' => 8,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
),
'units' => array( 'px', 'em', 'rem' ),
),
),
'footer_top_widget_spacing' => array(
'control_type' => 'kadence_range_control',
'section' => 'footer_top',
'priority' => 5,
'label' => esc_html__( 'Widget Spacing', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
),
'live_method' => array(
array(
'type' => 'css',
'property' => 'margin-bottom',
'selector' => '.site-top-footer-inner-wrap .widget',
'pattern' => '$',
'key' => 'size',
),
),
'default' => kadence()->default( 'footer_top_widget_spacing' ),
'input_attrs' => array(
'min' => array(
'px' => 0,
'em' => 0,
'rem' => 0,
),
'max' => array(
'px' => 200,
'em' => 8,
'rem' => 8,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
),
'units' => array( 'px', 'em', 'rem' ),
),
),
'footer_top_top_spacing' => array(
'control_type' => 'kadence_range_control',
'section' => 'footer_top',
'priority' => 5,
'label' => esc_html__( 'Top Spacing', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#colophon .site-top-footer-inner-wrap',
'pattern' => '$',
'property' => 'padding-top',
'key' => 'size',
),
),
'default' => kadence()->default( 'footer_top_top_spacing' ),
'input_attrs' => array(
'min' => array(
'px' => 0,
'em' => 0,
'rem' => 0,
),
'max' => array(
'px' => 200,
'em' => 8,
'rem' => 8,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
),
'units' => array( 'px', 'em', 'rem' ),
),
),
'footer_top_bottom_spacing' => array(
'control_type' => 'kadence_range_control',
'section' => 'footer_top',
'priority' => 5,
'label' => esc_html__( 'Bottom Spacing', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#colophon .site-top-footer-inner-wrap',
'pattern' => '$',
'property' => 'padding-bottom',
'key' => 'size',
),
),
'default' => kadence()->default( 'footer_top_bottom_spacing' ),
'input_attrs' => array(
'min' => array(
'px' => 0,
'em' => 0,
'rem' => 0,
),
'max' => array(
'px' => 200,
'em' => 8,
'rem' => 8,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
),
'units' => array( 'px', 'em', 'rem' ),
),
),
'footer_top_height' => array(
'control_type' => 'kadence_range_control',
'section' => 'footer_top',
'priority' => 5,
'label' => esc_html__( 'Min Height', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#colophon .site-top-footer-inner-wrap',
'pattern' => '$',
'property' => 'min-height',
'key' => 'size',
),
),
'default' => kadence()->default( 'footer_top_height' ),
'input_attrs' => array(
'min' => array(
'px' => 10,
'em' => 1,
'rem' => 1,
'vh' => 2,
),
'max' => array(
'px' => 400,
'em' => 12,
'rem' => 12,
'vh' => 40,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
'vh' => 1,
),
'units' => array( 'px', 'em', 'rem', 'vh' ),
),
),
'footer_top_widget_settings' => array(
'control_type' => 'kadence_blank_control',
'section' => 'footer_top',
'settings' => false,
'priority' => 1,
'description' => $component_description,
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
),
),
'footer_top_widget_title' => array(
'control_type' => 'kadence_typography_control',
'section' => 'footer_top',
'label' => esc_html__( 'Widget Titles', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
),
'default' => kadence()->default( 'footer_top_widget_title' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => '.site-top-footer-wrap .site-footer-row-container-inner .widget-title',
'pattern' => array(
'desktop' => '$',
'tablet' => '$',
'mobile' => '$',
),
'property' => 'font',
'key' => 'typography',
),
),
'input_attrs' => array(
'id' => 'footer_top_widget_title',
),
),
'footer_top_widget_content' => array(
'control_type' => 'kadence_typography_control',
'section' => 'footer_top',
'label' => esc_html__( 'Widget Content', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
),
'default' => kadence()->default( 'footer_top_widget_content' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => '.site-top-footer-wrap .site-footer-row-container-inner',
'pattern' => array(
'desktop' => '$',
'tablet' => '$',
'mobile' => '$',
),
'property' => 'font',
'key' => 'typography',
),
),
'input_attrs' => array(
'id' => 'footer_top_widget_content',
),
),
'footer_top_link_colors' => array(
'control_type' => 'kadence_color_control',
'section' => 'footer_top',
'label' => esc_html__( 'Link Colors', 'kadence' ),
'default' => kadence()->default( 'footer_top_link_colors' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.site-footer .site-top-footer-wrap a:where(:not(.button):not(.wp-block-button__link):not(.wp-element-button))',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.site-footer .site-top-footer-wrap a:where(:not(.button):not(.wp-block-button__link):not(.wp-element-button)):hover',
'property' => 'color',
'pattern' => '$',
'key' => 'hover',
),
),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Hover Color', 'kadence' ),
'palette' => true,
),
),
),
),
'footer_top_link_style' => array(
'control_type' => 'kadence_select_control',
'section' => 'footer_top',
'default' => kadence()->default( 'footer_top_link_style' ),
'label' => esc_html__( 'Link Style', 'kadence' ),
'input_attrs' => array(
'options' => array(
'plain' => array(
'name' => __( 'Underline on Hover', 'kadence' ),
),
'normal' => array(
'name' => __( 'Underline', 'kadence' ),
),
'noline' => array(
'name' => __( 'No Underline', 'kadence' ),
),
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.site-top-footer-inner-wrap',
'pattern' => 'ft-ro-lstyle-$',
'key' => '',
),
),
),
'footer_top_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'footer_top',
'label' => esc_html__( 'Top Row Background', 'kadence' ),
'default' => kadence()->default( 'footer_top_background' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => '.site-top-footer-wrap .site-footer-row-container-inner',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Top Row Background', 'kadence' ),
),
),
'footer_top_column_border' => array(
'control_type' => 'kadence_border_control',
'section' => 'footer_top',
'label' => esc_html__( 'Column Border', 'kadence' ),
'default' => kadence()->default( 'footer_top_column_border' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
),
'live_method' => array(
array(
'type' => 'css_border',
'selector' => '.site-top-footer-inner-wrap .site-footer-section:not(:last-child):after',
'pattern' => '$',
'property' => 'border-right',
'pattern' => '$',
'key' => 'border',
),
),
),
'footer_top_border' => array(
'control_type' => 'kadence_borders_control',
'section' => 'footer_top',
'label' => esc_html__( 'Border', 'kadence' ),
'default' => kadence()->default( 'footer_top_border' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
),
'settings' => array(
'border_top' => 'footer_top_top_border',
'border_bottom' => 'footer_top_bottom_border',
),
'live_method' => array(
'footer_top_top_border' => array(
array(
'type' => 'css_border',
'selector' => array(
'desktop' => '.site-top-footer-wrap .site-footer-row-container-inner',
'tablet' => '.site-top-footer-wrap .site-footer-row-container-inner',
'mobile' => '.site-top-footer-wrap .site-footer-row-container-inner',
),
'pattern' => array(
'desktop' => '$',
'tablet' => '$',
'mobile' => '$',
),
'property' => 'border-top',
'pattern' => '$',
'key' => 'border',
),
),
'footer_top_bottom_border' => array(
array(
'type' => 'css_border',
'selector' => array(
'desktop' => '.site-top-footer-wrap .site-footer-row-container-inner',
'tablet' => '.site-top-footer-wrap .site-footer-row-container-inner',
'mobile' => '.site-top-footer-wrap .site-footer-row-container-inner',
),
'pattern' => array(
'desktop' => '$',
'tablet' => '$',
'mobile' => '$',
),
'property' => 'border-bottom',
'pattern' => '$',
'key' => 'border',
),
),
),
),
// 'footer_top_top_border' => array(
// 'control_type' => 'kadence_border_control',
// 'section' => 'footer_top',
// 'label' => esc_html__( 'Top Border', 'kadence' ),
// 'default' => kadence()->default( 'footer_top_top_border' ),
// 'context' => array(
// array(
// 'setting' => '__current_tab',
// 'value' => 'design',
// ),
// ),
// 'live_method' => array(
// array(
// 'type' => 'css_border',
// 'selector' => array(
// 'desktop' => '.site-top-footer-wrap .site-footer-row-container-inner',
// 'tablet' => '.site-top-footer-wrap .site-footer-row-container-inner',
// 'mobile' => '.site-top-footer-wrap .site-footer-row-container-inner',
// ),
// 'pattern' => array(
// 'desktop' => '$',
// 'tablet' => '$',
// 'mobile' => '$',
// ),
// 'property' => 'border-top',
// 'pattern' => '$',
// 'key' => 'border',
// ),
// ),
// ),
// 'footer_top_bottom_border' => array(
// 'control_type' => 'kadence_border_control',
// 'section' => 'footer_top',
// 'label' => esc_html__( 'Bottom Border', 'kadence' ),
// 'default' => kadence()->default( 'footer_top_bottom_border' ),
// 'context' => array(
// array(
// 'setting' => '__current_tab',
// 'value' => 'design',
// ),
// ),
// 'live_method' => array(
// array(
// 'type' => 'css_border',
// 'selector' => array(
// 'desktop' => '.site-top-footer-wrap .site-footer-row-container-inner',
// 'tablet' => '.site-top-footer-wrap .site-footer-row-container-inner',
// 'mobile' => '.site-top-footer-wrap .site-footer-row-container-inner',
// ),
// 'pattern' => array(
// 'desktop' => '$',
// 'tablet' => '$',
// 'mobile' => '$',
// ),
// 'property' => 'border-bottom',
// 'pattern' => '$',
// 'key' => 'border',
// ),
// ),
// ),
);
Theme_Customizer::add_settings( $settings );

View File

@@ -0,0 +1,116 @@
<?php
/**
* Header Main Row Options
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
ob_start(); ?>
<div class="kadence-compontent-tabs nav-tab-wrapper wp-clearfix">
<a href="#" class="nav-tab kadence-general-tab kadence-compontent-tabs-button nav-tab-active" data-tab="general">
<span><?php esc_html_e( 'General', 'kadence' ); ?></span>
</a>
</div>
<?php
$compontent_tabs = ob_get_clean();
$settings = array(
'footer_widget1_breaker' => array(
'control_type' => 'kadence_blank_control',
'section' => 'sidebar-widgets-footer1',
'settings' => false,
'priority' => 5,
'description' => $compontent_tabs,
),
'footer_widget1_align' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'sidebar-widgets-footer1',
'label' => esc_html__( 'Content Align', 'kadence' ),
'priority' => 5,
'default' => kadence()->default( 'footer_widget1_align' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.footer-widget1',
'pattern' => array(
'desktop' => 'content-align-$',
'tablet' => 'content-tablet-align-$',
'mobile' => 'content-mobile-align-$',
),
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'left' => array(
'tooltip' => __( 'Left Align', 'kadence' ),
'dashicon' => 'editor-alignleft',
),
'center' => array(
'tooltip' => __( 'Center Align', 'kadence' ),
'dashicon' => 'editor-aligncenter',
),
'right' => array(
'tooltip' => __( 'Right Align', 'kadence' ),
'dashicon' => 'editor-alignright',
),
),
'responsive' => true,
),
),
'footer_widget1_vertical_align' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'sidebar-widgets-footer1',
'label' => esc_html__( 'Content Vertical Align', 'kadence' ),
'priority' => 5,
'default' => kadence()->default( 'footer_widget1_vertical_align' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.footer-widget1',
'pattern' => array(
'desktop' => 'content-valign-$',
'tablet' => 'content-tablet-valign-$',
'mobile' => 'content-mobile-valign-$',
),
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'top' => array(
'tooltip' => __( 'Top Align', 'kadence' ),
'icon' => 'aligntop',
),
'middle' => array(
'tooltip' => __( 'Middle Align', 'kadence' ),
'icon' => 'alignmiddle',
),
'bottom' => array(
'tooltip' => __( 'Bottom Align', 'kadence' ),
'icon' => 'alignbottom',
),
),
'responsive' => true,
),
),
);
Theme_Customizer::add_settings( $settings );

View File

@@ -0,0 +1,116 @@
<?php
/**
* Header Main Row Options
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
ob_start(); ?>
<div class="kadence-compontent-tabs nav-tab-wrapper wp-clearfix">
<a href="#" class="nav-tab kadence-general-tab kadence-compontent-tabs-button nav-tab-active" data-tab="general">
<span><?php esc_html_e( 'General', 'kadence' ); ?></span>
</a>
</div>
<?php
$compontent_tabs = ob_get_clean();
$settings = array(
'footer_widget2_breaker' => array(
'control_type' => 'kadence_blank_control',
'section' => 'sidebar-widgets-footer2',
'settings' => false,
'priority' => 5,
'description' => $compontent_tabs,
),
'footer_widget2_align' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'sidebar-widgets-footer2',
'label' => esc_html__( 'Content Align', 'kadence' ),
'priority' => 5,
'default' => kadence()->default( 'footer_widget2_align' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.footer-widget2',
'pattern' => array(
'desktop' => 'content-align-$',
'tablet' => 'content-tablet-align-$',
'mobile' => 'content-mobile-align-$',
),
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'left' => array(
'tooltip' => __( 'Left Align', 'kadence' ),
'dashicon' => 'editor-alignleft',
),
'center' => array(
'tooltip' => __( 'Center Align', 'kadence' ),
'dashicon' => 'editor-aligncenter',
),
'right' => array(
'tooltip' => __( 'Right Align', 'kadence' ),
'dashicon' => 'editor-alignright',
),
),
'responsive' => true,
),
),
'footer_widget2_vertical_align' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'sidebar-widgets-footer2',
'label' => esc_html__( 'Content Vertical Align', 'kadence' ),
'priority' => 5,
'default' => kadence()->default( 'footer_widget2_vertical_align' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.footer-widget2',
'pattern' => array(
'desktop' => 'content-valign-$',
'tablet' => 'content-tablet-valign-$',
'mobile' => 'content-mobile-valign-$',
),
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'top' => array(
'tooltip' => __( 'Top Align', 'kadence' ),
'icon' => 'aligntop',
),
'middle' => array(
'tooltip' => __( 'Middle Align', 'kadence' ),
'icon' => 'alignmiddle',
),
'bottom' => array(
'tooltip' => __( 'Bottom Align', 'kadence' ),
'icon' => 'alignbottom',
),
),
'responsive' => true,
),
),
);
Theme_Customizer::add_settings( $settings );

View File

@@ -0,0 +1,116 @@
<?php
/**
* Header Main Row Options
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
ob_start(); ?>
<div class="kadence-compontent-tabs nav-tab-wrapper wp-clearfix">
<a href="#" class="nav-tab kadence-general-tab kadence-compontent-tabs-button nav-tab-active" data-tab="general">
<span><?php esc_html_e( 'General', 'kadence' ); ?></span>
</a>
</div>
<?php
$compontent_tabs = ob_get_clean();
$settings = array(
'footer_widget3_breaker' => array(
'control_type' => 'kadence_blank_control',
'section' => 'sidebar-widgets-footer3',
'settings' => false,
'priority' => 5,
'description' => $compontent_tabs,
),
'footer_widget3_align' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'sidebar-widgets-footer3',
'label' => esc_html__( 'Content Align', 'kadence' ),
'priority' => 5,
'default' => kadence()->default( 'footer_widget3_align' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.footer-widget3',
'pattern' => array(
'desktop' => 'content-align-$',
'tablet' => 'content-tablet-align-$',
'mobile' => 'content-mobile-align-$',
),
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'left' => array(
'tooltip' => __( 'Left Align', 'kadence' ),
'dashicon' => 'editor-alignleft',
),
'center' => array(
'tooltip' => __( 'Center Align', 'kadence' ),
'dashicon' => 'editor-aligncenter',
),
'right' => array(
'tooltip' => __( 'Right Align', 'kadence' ),
'dashicon' => 'editor-alignright',
),
),
'responsive' => true,
),
),
'footer_widget3_vertical_align' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'sidebar-widgets-footer3',
'label' => esc_html__( 'Content Vertical Align', 'kadence' ),
'priority' => 5,
'default' => kadence()->default( 'footer_widget3_vertical_align' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.footer-widget3',
'pattern' => array(
'desktop' => 'content-valign-$',
'tablet' => 'content-tablet-valign-$',
'mobile' => 'content-mobile-valign-$',
),
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'top' => array(
'tooltip' => __( 'Top Align', 'kadence' ),
'icon' => 'aligntop',
),
'middle' => array(
'tooltip' => __( 'Middle Align', 'kadence' ),
'icon' => 'alignmiddle',
),
'bottom' => array(
'tooltip' => __( 'Bottom Align', 'kadence' ),
'icon' => 'alignbottom',
),
),
'responsive' => true,
),
),
);
Theme_Customizer::add_settings( $settings );

View File

@@ -0,0 +1,116 @@
<?php
/**
* Header Main Row Options
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
ob_start(); ?>
<div class="kadence-compontent-tabs nav-tab-wrapper wp-clearfix">
<a href="#" class="nav-tab kadence-general-tab kadence-compontent-tabs-button nav-tab-active" data-tab="general">
<span><?php esc_html_e( 'General', 'kadence' ); ?></span>
</a>
</div>
<?php
$compontent_tabs = ob_get_clean();
$settings = array(
'footer_widget4_breaker' => array(
'control_type' => 'kadence_blank_control',
'section' => 'sidebar-widgets-footer4',
'settings' => false,
'priority' => 5,
'description' => $compontent_tabs,
),
'footer_widget4_align' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'sidebar-widgets-footer4',
'label' => esc_html__( 'Content Align', 'kadence' ),
'priority' => 5,
'default' => kadence()->default( 'footer_widget4_align' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.footer-widget4',
'pattern' => array(
'desktop' => 'content-align-$',
'tablet' => 'content-tablet-align-$',
'mobile' => 'content-mobile-align-$',
),
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'left' => array(
'tooltip' => __( 'Left Align', 'kadence' ),
'dashicon' => 'editor-alignleft',
),
'center' => array(
'tooltip' => __( 'Center Align', 'kadence' ),
'dashicon' => 'editor-aligncenter',
),
'right' => array(
'tooltip' => __( 'Right Align', 'kadence' ),
'dashicon' => 'editor-alignright',
),
),
'responsive' => true,
),
),
'footer_widget4_vertical_align' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'sidebar-widgets-footer4',
'label' => esc_html__( 'Content Vertical Align', 'kadence' ),
'priority' => 5,
'default' => kadence()->default( 'footer_widget4_vertical_align' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.footer-widget4',
'pattern' => array(
'desktop' => 'content-valign-$',
'tablet' => 'content-tablet-valign-$',
'mobile' => 'content-mobile-valign-$',
),
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'top' => array(
'tooltip' => __( 'Top Align', 'kadence' ),
'icon' => 'aligntop',
),
'middle' => array(
'tooltip' => __( 'Middle Align', 'kadence' ),
'icon' => 'alignmiddle',
),
'bottom' => array(
'tooltip' => __( 'Bottom Align', 'kadence' ),
'icon' => 'alignbottom',
),
),
'responsive' => true,
),
),
);
Theme_Customizer::add_settings( $settings );

View File

@@ -0,0 +1,116 @@
<?php
/**
* Header Main Row Options
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
ob_start(); ?>
<div class="kadence-compontent-tabs nav-tab-wrapper wp-clearfix">
<a href="#" class="nav-tab kadence-general-tab kadence-compontent-tabs-button nav-tab-active" data-tab="general">
<span><?php esc_html_e( 'General', 'kadence' ); ?></span>
</a>
</div>
<?php
$compontent_tabs = ob_get_clean();
$settings = array(
'footer_widget5_breaker' => array(
'control_type' => 'kadence_blank_control',
'section' => 'sidebar-widgets-footer5',
'settings' => false,
'priority' => 5,
'description' => $compontent_tabs,
),
'footer_widget5_align' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'sidebar-widgets-footer5',
'label' => esc_html__( 'Content Align', 'kadence' ),
'priority' => 5,
'default' => kadence()->default( 'footer_widget5_align' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.footer-widget5',
'pattern' => array(
'desktop' => 'content-align-$',
'tablet' => 'content-tablet-align-$',
'mobile' => 'content-mobile-align-$',
),
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'left' => array(
'tooltip' => __( 'Left Align', 'kadence' ),
'dashicon' => 'editor-alignleft',
),
'center' => array(
'tooltip' => __( 'Center Align', 'kadence' ),
'dashicon' => 'editor-aligncenter',
),
'right' => array(
'tooltip' => __( 'Right Align', 'kadence' ),
'dashicon' => 'editor-alignright',
),
),
'responsive' => true,
),
),
'footer_widget5_vertical_align' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'sidebar-widgets-footer5',
'label' => esc_html__( 'Content Vertical Align', 'kadence' ),
'priority' => 5,
'default' => kadence()->default( 'footer_widget5_vertical_align' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.footer-widget5',
'pattern' => array(
'desktop' => 'content-valign-$',
'tablet' => 'content-tablet-valign-$',
'mobile' => 'content-mobile-valign-$',
),
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'top' => array(
'tooltip' => __( 'Top Align', 'kadence' ),
'icon' => 'aligntop',
),
'middle' => array(
'tooltip' => __( 'Middle Align', 'kadence' ),
'icon' => 'alignmiddle',
),
'bottom' => array(
'tooltip' => __( 'Bottom Align', 'kadence' ),
'icon' => 'alignbottom',
),
),
'responsive' => true,
),
),
);
Theme_Customizer::add_settings( $settings );

View File

@@ -0,0 +1,116 @@
<?php
/**
* Header Main Row Options
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
ob_start(); ?>
<div class="kadence-compontent-tabs nav-tab-wrapper wp-clearfix">
<a href="#" class="nav-tab kadence-general-tab kadence-compontent-tabs-button nav-tab-active" data-tab="general">
<span><?php esc_html_e( 'General', 'kadence' ); ?></span>
</a>
</div>
<?php
$compontent_tabs = ob_get_clean();
$settings = array(
'footer_widget6_breaker' => array(
'control_type' => 'kadence_blank_control',
'section' => 'sidebar-widgets-footer6',
'settings' => false,
'priority' => 5,
'description' => $compontent_tabs,
),
'footer_widget6_align' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'sidebar-widgets-footer6',
'label' => esc_html__( 'Content Align', 'kadence' ),
'priority' => 5,
'default' => kadence()->default( 'footer_widget6_align' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.footer-widget6',
'pattern' => array(
'desktop' => 'content-align-$',
'tablet' => 'content-tablet-align-$',
'mobile' => 'content-mobile-align-$',
),
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'left' => array(
'tooltip' => __( 'Left Align', 'kadence' ),
'dashicon' => 'editor-alignleft',
),
'center' => array(
'tooltip' => __( 'Center Align', 'kadence' ),
'dashicon' => 'editor-aligncenter',
),
'right' => array(
'tooltip' => __( 'Right Align', 'kadence' ),
'dashicon' => 'editor-alignright',
),
),
'responsive' => true,
),
),
'footer_widget6_vertical_align' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'sidebar-widgets-footer6',
'label' => esc_html__( 'Content Vertical Align', 'kadence' ),
'priority' => 5,
'default' => kadence()->default( 'footer_widget6_vertical_align' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.footer-widget6',
'pattern' => array(
'desktop' => 'content-valign-$',
'tablet' => 'content-tablet-valign-$',
'mobile' => 'content-mobile-valign-$',
),
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'top' => array(
'tooltip' => __( 'Top Align', 'kadence' ),
'icon' => 'aligntop',
),
'middle' => array(
'tooltip' => __( 'Middle Align', 'kadence' ),
'icon' => 'alignmiddle',
),
'bottom' => array(
'tooltip' => __( 'Bottom Align', 'kadence' ),
'icon' => 'alignbottom',
),
),
'responsive' => true,
),
),
);
Theme_Customizer::add_settings( $settings );

View File

@@ -0,0 +1,769 @@
<?php
/**
* Header Main Row Options
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
Theme_Customizer::add_settings(
array(
'forum_archive_tabs' => array(
'control_type' => 'kadence_tab_control',
'section' => 'forum_archive',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'forum_archive',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'forum_archive_design',
),
'active' => 'general',
),
),
'forum_archive_tabs_design' => array(
'control_type' => 'kadence_tab_control',
'section' => 'forum_archive_design',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'forum_archive',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'forum_archive_design',
),
'active' => 'design',
),
),
'info_forum_archive_title' => array(
'control_type' => 'kadence_title_control',
'section' => 'forum_archive',
'priority' => 2,
'label' => esc_html__( 'Archive Title', 'kadence' ),
'settings' => false,
),
'info_forum_archive_title_design' => array(
'control_type' => 'kadence_title_control',
'section' => 'forum_archive_design',
'priority' => 2,
'label' => esc_html__( 'Archive Title', 'kadence' ),
'settings' => false,
),
'forum_archive_title' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'forum_archive',
'priority' => 3,
'default' => kadence()->default( 'forum_archive_title' ),
'label' => esc_html__( 'Show Archive Title?', 'kadence' ),
'transport' => 'refresh',
),
'forum_archive_title_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'forum_archive',
'label' => esc_html__( 'Archive Title Layout', 'kadence' ),
'transport' => 'refresh',
'priority' => 4,
'default' => kadence()->default( 'forum_archive_title_layout' ),
'context' => array(
array(
'setting' => 'forum_archive_title',
'operator' => '=',
'value' => true,
),
),
'input_attrs' => array(
'layout' => array(
'normal' => array(
'tooltip' => __( 'In Content', 'kadence' ),
'icon' => 'incontent',
),
'above' => array(
'tooltip' => __( 'Above Content', 'kadence' ),
'icon' => 'abovecontent',
),
),
'responsive' => false,
'class' => 'kadence-two-col',
),
),
'forum_archive_title_inner_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'forum_archive',
'priority' => 4,
'default' => kadence()->default( 'forum_archive_title_inner_layout' ),
'label' => esc_html__( 'Container Width', 'kadence' ),
'context' => array(
array(
'setting' => 'forum_archive_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'forum_archive_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.forum-archive-hero-section',
'pattern' => 'entry-hero-layout-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'standard' => array(
'tooltip' => __( 'Background Fullwidth, Content Contained', 'kadence' ),
'name' => __( 'Standard', 'kadence' ),
'icon' => '',
),
'fullwidth' => array(
'tooltip' => __( 'Background & Content Fullwidth', 'kadence' ),
'name' => __( 'Fullwidth', 'kadence' ),
'icon' => '',
),
'contained' => array(
'tooltip' => __( 'Background & Content Contained', 'kadence' ),
'name' => __( 'Contained', 'kadence' ),
'icon' => '',
),
),
'responsive' => false,
),
),
'forum_archive_title_align' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'forum_archive',
'label' => esc_html__( 'Course Title Align', 'kadence' ),
'priority' => 4,
'default' => kadence()->default( 'forum_archive_title_align' ),
'context' => array(
array(
'setting' => 'forum_archive_title',
'operator' => '=',
'value' => true,
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.forum-archive-title',
'pattern' => array(
'desktop' => 'title-align-$',
'tablet' => 'title-tablet-align-$',
'mobile' => 'title-mobile-align-$',
),
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'left' => array(
'tooltip' => __( 'Left Align Title', 'kadence' ),
'dashicon' => 'editor-alignleft',
),
'center' => array(
'tooltip' => __( 'Center Align Title', 'kadence' ),
'dashicon' => 'editor-aligncenter',
),
'right' => array(
'tooltip' => __( 'Right Align Title', 'kadence' ),
'dashicon' => 'editor-alignright',
),
),
'responsive' => true,
),
),
'forum_archive_title_height' => array(
'control_type' => 'kadence_range_control',
'section' => 'forum_archive',
'priority' => 5,
'label' => esc_html__( 'Container Min Height', 'kadence' ),
'context' => array(
array(
'setting' => 'forum_archive_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'forum_archive_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#inner-wrap .forum-archive-hero-section .entry-header',
'property' => 'min-height',
'pattern' => '$',
'key' => 'size',
),
),
'default' => kadence()->default( 'forum_archive_title_height' ),
'input_attrs' => array(
'min' => array(
'px' => 10,
'em' => 1,
'rem' => 1,
'vh' => 2,
),
'max' => array(
'px' => 800,
'em' => 12,
'rem' => 12,
'vh' => 100,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
'vh' => 1,
),
'units' => array( 'px', 'em', 'rem', 'vh' ),
),
),
'forum_archive_title_elements' => array(
'control_type' => 'kadence_sorter_control',
'section' => 'forum_archive',
'priority' => 6,
'default' => kadence()->default( 'forum_archive_title_elements' ),
'label' => esc_html__( 'Title Elements', 'kadence' ),
'transport' => 'refresh',
'settings' => array(
'elements' => 'forum_archive_title_elements',
'title' => 'forum_archive_title_element_title',
'breadcrumb' => 'forum_archive_title_element_breadcrumb',
'search' => 'forum_archive_title_element_search',
),
),
'forum_archive_title_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'forum_archive_design',
'label' => esc_html__( 'Title Color', 'kadence' ),
'default' => kadence()->default( 'forum_archive_title_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.forum-archive-title h1',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Color', 'kadence' ),
'palette' => true,
),
),
),
),
'forum_archive_title_search_width' => array(
'control_type' => 'kadence_range_control',
'section' => 'forum_archive_design',
'label' => esc_html__( 'Search Bar Width', 'kadence' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.forum-archive-title .bbp-search-form',
'property' => 'width',
'pattern' => '$',
'key' => 'size',
),
),
'default' => kadence()->default( 'forum_archive_title_search_width' ),
'input_attrs' => array(
'min' => array(
'px' => 100,
'em' => 4,
'rem' => 4,
),
'max' => array(
'px' => 600,
'em' => 12,
'rem' => 12,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
),
'units' => array( 'px', 'em', 'rem' ),
'responsive' => false,
),
),
'forum_archive_title_search_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'forum_archive_design',
'label' => esc_html__( 'Input Text Colors', 'kadence' ),
'default' => kadence()->default( 'forum_archive_title_search_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.forum-archive-title .bbp-search-form input.search-field, .forum-archive-title .bbp-search-form .kadence-search-icon-wrap',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.forum-archive-title .bbp-search-form input.search-field:focus, .forum-archive-title .bbp-search-form input.search-submit:hover ~ .kadence-search-icon-wrap',
'property' => 'color',
'pattern' => '$',
'key' => 'hover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Focus Color', 'kadence' ),
'palette' => true,
),
),
),
),
'forum_archive_title_search_background' => array(
'control_type' => 'kadence_color_control',
'section' => 'forum_archive_design',
'label' => esc_html__( 'Input Background', 'kadence' ),
'default' => kadence()->default( 'forum_archive_title_search_background' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.forum-archive-title .bbp-search-form input.search-field',
'property' => 'background',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.forum-archive-title .bbp-search-form input.search-field:focus',
'property' => 'background',
'pattern' => '$',
'key' => 'hover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Focus Color', 'kadence' ),
'palette' => true,
),
),
),
),
'forum_archive_title_search_border' => array(
'control_type' => 'kadence_border_control',
'section' => 'forum_archive_design',
'label' => esc_html__( 'Border', 'kadence' ),
'default' => kadence()->default( 'forum_archive_title_search_border' ),
'live_method' => array(
array(
'type' => 'css_border',
'selector' => '.forum-archive-title .bbp-search-form input.search-field',
'pattern' => '$',
'property' => 'border',
'pattern' => '$',
'key' => 'border',
),
),
'input_attrs' => array(
'responsive' => false,
'color' => false,
),
),
'forum_archive_title_search_border_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'forum_archive_design',
'label' => esc_html__( 'Input Border Color', 'kadence' ),
'default' => kadence()->default( 'forum_archive_title_search_border_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.forum-archive-title .bbp-search-form input.search-field',
'property' => 'border-color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.forum-archive-title .bbp-search-form input.search-field:focus',
'property' => 'border-color',
'pattern' => '$',
'key' => 'hover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Focus Color', 'kadence' ),
'palette' => true,
),
),
),
),
'forum_archive_title_search_typography' => array(
'control_type' => 'kadence_typography_control',
'section' => 'forum_archive_design',
'label' => esc_html__( 'Font', 'kadence' ),
'default' => kadence()->default( 'forum_archive_title_search_typography' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => '.forum-archive-title .bbp-search-form input.search-field',
'pattern' => array(
'desktop' => '$',
'tablet' => '$',
'mobile' => '$',
),
'property' => 'font',
'key' => 'typography',
),
),
'input_attrs' => array(
'id' => 'forum_archive_title_search_typography',
'options' => 'no-color',
),
),
'forum_archive_title_search_margin' => array(
'control_type' => 'kadence_measure_control',
'section' => 'forum_archive_design',
'default' => kadence()->default( 'forum_archive_title_search_margin' ),
'label' => esc_html__( 'Margin', 'kadence' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.forum-archive-title .bbp-search-form form',
'property' => 'margin',
'pattern' => '$',
'key' => 'measure',
),
),
'input_attrs' => array(
'responsive' => false,
),
),
'forum_archive_title_breadcrumb_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'forum_archive_design',
'label' => esc_html__( 'Breadcrumb Colors', 'kadence' ),
'default' => kadence()->default( 'forum_archive_title_breadcrumb_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.forum-archive-title .kadence-breadcrumbs',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.forum-archive-title .kadence-breadcrumbs a:hover',
'property' => 'color',
'pattern' => '$',
'key' => 'hover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Link Hover Color', 'kadence' ),
'palette' => true,
),
),
),
),
'forum_archive_title_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'forum_archive_design',
'label' => esc_html__( 'Archive Title Background', 'kadence' ),
'default' => kadence()->default( 'forum_archive_title_background' ),
'context' => array(
array(
'setting' => 'forum_archive_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'forum_archive_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => '#inner-wrap .forum-archive-hero-section .entry-hero-container-inner',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Course Archive Title Background', 'kadence' ),
),
),
'forum_archive_title_overlay_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'forum_archive_design',
'label' => esc_html__( 'Background Overlay Color', 'kadence' ),
'default' => kadence()->default( 'forum_archive_title_overlay_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.forum-archive-hero-section .hero-section-overlay',
'property' => 'background',
'pattern' => '$',
'key' => 'color',
),
),
'context' => array(
array(
'setting' => 'forum_archive_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'forum_archive_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Overlay Color', 'kadence' ),
'palette' => true,
),
),
'allowGradient' => true,
),
),
'forum_archive_title_border' => array(
'control_type' => 'kadence_borders_control',
'section' => 'forum_archive_design',
'label' => esc_html__( 'Border', 'kadence' ),
'default' => kadence()->default( 'forum_archive_title_border' ),
'context' => array(
array(
'setting' => 'forum_archive_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'forum_archive_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'settings' => array(
'border_top' => 'forum_archive_title_top_border',
'border_bottom' => 'forum_archive_title_bottom_border',
),
'live_method' => array(
'forum_archive_title_top_border' => array(
array(
'type' => 'css_border',
'selector' => '.forum-archive-hero-section .entry-hero-container-inner',
'pattern' => '$',
'property' => 'border-top',
'key' => 'border',
),
),
'forum_archive_title_bottom_border' => array(
array(
'type' => 'css_border',
'selector' => '.forum-archive-hero-section .entry-hero-container-inner',
'property' => 'border-bottom',
'pattern' => '$',
'key' => 'border',
),
),
),
),
'info_forum_archive_layout' => array(
'control_type' => 'kadence_title_control',
'section' => 'forum_archive',
'priority' => 10,
'label' => esc_html__( 'Forum Archive Layout', 'kadence' ),
'settings' => false,
),
'info_forum_archive_layout_design' => array(
'control_type' => 'kadence_title_control',
'section' => 'forum_archive_design',
'priority' => 10,
'label' => esc_html__( 'Forum Archive Layout', 'kadence' ),
'settings' => false,
),
'forum_archive_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'forum_archive',
'label' => esc_html__( 'Archive Layout', 'kadence' ),
'transport' => 'refresh',
'priority' => 10,
'default' => kadence()->default( 'forum_archive_layout' ),
'input_attrs' => array(
'layout' => array(
'normal' => array(
'tooltip' => __( 'Normal', 'kadence' ),
'icon' => 'normal',
),
'narrow' => array(
'tooltip' => __( 'Narrow', 'kadence' ),
'icon' => 'narrow',
),
'fullwidth' => array(
'tooltip' => __( 'Fullwidth', 'kadence' ),
'icon' => 'fullwidth',
),
'left' => array(
'tooltip' => __( 'Left Sidebar', 'kadence' ),
'icon' => 'leftsidebar',
),
'right' => array(
'tooltip' => __( 'Right Sidebar', 'kadence' ),
'icon' => 'rightsidebar',
),
),
'class' => 'kadence-three-col',
'responsive' => false,
),
),
'forum_archive_content_style' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'forum_archive',
'label' => esc_html__( 'Content Style', 'kadence' ),
'priority' => 10,
'default' => kadence()->default( 'forum_archive_content_style' ),
'live_method' => array(
array(
'type' => 'class',
'selector' => 'body.post-type-archive-forum',
'pattern' => 'content-style-$',
'key' => '',
),
array(
'type' => 'class',
'selector' => 'body.forum-archive',
'pattern' => 'content-style-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'boxed' => array(
'tooltip' => __( 'Boxed', 'kadence' ),
'icon' => 'boxed',
),
'unboxed' => array(
'tooltip' => __( 'Unboxed', 'kadence' ),
'icon' => 'narrow',
),
),
'responsive' => false,
'class' => 'kadence-two-col',
),
),
'forum_archive_vertical_padding' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'forum_archive',
'label' => esc_html__( 'Content Vertical Padding', 'kadence' ),
'priority' => 10,
'default' => kadence()->default( 'forum_archive_vertical_padding' ),
'live_method' => array(
array(
'type' => 'class',
'selector' => 'body.post-type-archive-forum, body.forum-archive',
'pattern' => 'content-vertical-padding-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'show' => array(
'name' => __( 'Enable', 'kadence' ),
),
'hide' => array(
'name' => __( 'Disable', 'kadence' ),
),
'top' => array(
'name' => __( 'Top Only', 'kadence' ),
),
'bottom' => array(
'name' => __( 'Bottom Only', 'kadence' ),
),
),
'responsive' => false,
'class' => 'kadence-two-grid',
),
),
'forum_archive_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'forum_archive_design',
'label' => esc_html__( 'Site Background', 'kadence' ),
'default' => kadence()->default( 'forum_archive_background' ),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => 'body.post-type-archive-forum, body.forum-archive',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Course Archive Background', 'kadence' ),
),
),
'forum_archive_content_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'forum_archive_design',
'label' => esc_html__( 'Content Background', 'kadence' ),
'default' => kadence()->default( 'forum_archive_content_background' ),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => 'body.post-type-archive-forum .content-bg, body.forum-archive .content-bg, body.forum-archive.content-style-unboxed .site, body.post-type-archive-forum.content-style-unboxed .site',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Archive Content Background', 'kadence' ),
),
),
)
);

View File

@@ -0,0 +1,880 @@
<?php
/**
* Product Layout Options
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
Theme_Customizer::add_settings(
array(
'forum_layout_tabs' => array(
'control_type' => 'kadence_tab_control',
'section' => 'forum_layout',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'forum_layout',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'forum_layout_design',
),
'active' => 'general',
),
),
'forum_layout_tabs_design' => array(
'control_type' => 'kadence_tab_control',
'section' => 'forum_layout_design',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'forum_layout',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'forum_layout_design',
),
'active' => 'design',
),
),
'info_forum_title' => array(
'control_type' => 'kadence_title_control',
'section' => 'forum_layout',
'priority' => 2,
'label' => esc_html__( 'Forum Title', 'kadence' ),
'settings' => false,
),
'info_forum_title_design' => array(
'control_type' => 'kadence_title_control',
'section' => 'forum_layout_design',
'priority' => 2,
'label' => esc_html__( 'Forum Title', 'kadence' ),
'settings' => false,
),
'forum_title' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'forum_layout',
'priority' => 3,
'default' => kadence()->default( 'forum_title' ),
'label' => esc_html__( 'Show Forum Title?', 'kadence' ),
'transport' => 'refresh',
),
'forum_title_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'forum_layout',
'label' => esc_html__( 'Forum Title Layout', 'kadence' ),
'transport' => 'refresh',
'priority' => 4,
'default' => kadence()->default( 'forum_title_layout' ),
'context' => array(
array(
'setting' => 'forum_title',
'operator' => '=',
'value' => true,
),
),
'input_attrs' => array(
'layout' => array(
'normal' => array(
'tooltip' => __( 'In Content', 'kadence' ),
'icon' => 'incontent',
),
'above' => array(
'tooltip' => __( 'Above Content', 'kadence' ),
'icon' => 'abovecontent',
),
),
'responsive' => false,
'class' => 'kadence-two-col',
),
),
'forum_title_inner_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'forum_layout',
'priority' => 4,
'default' => kadence()->default( 'forum_title_inner_layout' ),
'label' => esc_html__( 'Title Container Width', 'kadence' ),
'context' => array(
array(
'setting' => 'forum_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'forum_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.forum-hero-section',
'pattern' => 'entry-hero-layout-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'standard' => array(
'tooltip' => __( 'Background Fullwidth, Content Contained', 'kadence' ),
'name' => __( 'Standard', 'kadence' ),
'icon' => '',
),
'fullwidth' => array(
'tooltip' => __( 'Background & Content Fullwidth', 'kadence' ),
'name' => __( 'Fullwidth', 'kadence' ),
'icon' => '',
),
'contained' => array(
'tooltip' => __( 'Background & Content Contained', 'kadence' ),
'name' => __( 'Contained', 'kadence' ),
'icon' => '',
),
),
'responsive' => false,
),
),
'forum_title_align' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'forum_layout',
'label' => esc_html__( 'Forum Title Align', 'kadence' ),
'priority' => 4,
'default' => kadence()->default( 'forum_title_align' ),
'context' => array(
array(
'setting' => 'forum_title',
'operator' => '=',
'value' => true,
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.forum-title',
'pattern' => array(
'desktop' => 'title-align-$',
'tablet' => 'title-tablet-align-$',
'mobile' => 'title-mobile-align-$',
),
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'left' => array(
'tooltip' => __( 'Left Align Title', 'kadence' ),
'dashicon' => 'editor-alignleft',
),
'center' => array(
'tooltip' => __( 'Center Align Title', 'kadence' ),
'dashicon' => 'editor-aligncenter',
),
'right' => array(
'tooltip' => __( 'Right Align Title', 'kadence' ),
'dashicon' => 'editor-alignright',
),
),
'responsive' => true,
),
),
'forum_title_height' => array(
'control_type' => 'kadence_range_control',
'section' => 'forum_layout',
'priority' => 5,
'label' => esc_html__( 'Title Container Min Height', 'kadence' ),
'context' => array(
array(
'setting' => 'forum_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'forum_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#inner-wrap .forum-hero-section .entry-header',
'property' => 'min-height',
'pattern' => '$',
'key' => 'size',
),
),
'default' => kadence()->default( 'forum_title_height' ),
'input_attrs' => array(
'min' => array(
'px' => 10,
'em' => 1,
'rem' => 1,
'vh' => 2,
),
'max' => array(
'px' => 800,
'em' => 12,
'rem' => 12,
'vh' => 100,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
'vh' => 1,
),
'units' => array( 'px', 'em', 'rem', 'vh' ),
),
),
'forum_title_elements' => array(
'control_type' => 'kadence_sorter_control',
'section' => 'forum_layout',
'priority' => 6,
'default' => kadence()->default( 'forum_title_elements' ),
'label' => esc_html__( 'Title Elements', 'kadence' ),
'transport' => 'refresh',
'settings' => array(
'elements' => 'forum_title_elements',
'title' => 'forum_title_element_title',
'breadcrumb' => 'forum_title_element_breadcrumb',
'search' => 'forum_title_element_search',
'description' => 'forum_title_element_description',
),
'context' => array(
array(
'setting' => 'forum_title',
'operator' => '=',
'value' => true,
),
),
'input_attrs' => array(
'group' => 'forum_title_element',
),
),
'forum_title_font' => array(
'control_type' => 'kadence_typography_control',
'section' => 'forum_layout_design',
'label' => esc_html__( 'Forum Title Font', 'kadence' ),
'default' => kadence()->default( 'forum_title_font' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => '.forum-title h1',
'property' => 'font',
'key' => 'typography',
),
),
'context' => array(
array(
'setting' => 'forum_title',
'operator' => '=',
'value' => true,
),
),
'input_attrs' => array(
'id' => 'forum_title_font',
'headingInherit' => true,
),
),
'forum_title_search_width' => array(
'control_type' => 'kadence_range_control',
'section' => 'forum_layout_design',
'label' => esc_html__( 'Search Bar Width', 'kadence' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.forum-title .bbp-search-form',
'property' => 'width',
'pattern' => '$',
'key' => 'size',
),
),
'default' => kadence()->default( 'forum_title_search_width' ),
'input_attrs' => array(
'min' => array(
'px' => 100,
'em' => 4,
'rem' => 4,
),
'max' => array(
'px' => 600,
'em' => 12,
'rem' => 12,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
),
'units' => array( 'px', 'em', 'rem' ),
'responsive' => false,
),
),
'forum_title_search_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'forum_layout_design',
'label' => esc_html__( 'Input Text Colors', 'kadence' ),
'default' => kadence()->default( 'forum_title_search_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.forum-title .bbp-search-form input.search-field, .forum-title .bbp-search-form .kadence-search-icon-wrap',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.forum-title .bbp-search-form input.search-field:focus, .forum-title .bbp-search-form input.search-submit:hover ~ .kadence-search-icon-wrap',
'property' => 'color',
'pattern' => '$',
'key' => 'hover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Focus Color', 'kadence' ),
'palette' => true,
),
),
),
),
'forum_title_search_background' => array(
'control_type' => 'kadence_color_control',
'section' => 'forum_layout_design',
'label' => esc_html__( 'Input Background', 'kadence' ),
'default' => kadence()->default( 'forum_title_search_background' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.forum-title .bbp-search-form input.search-field',
'property' => 'background',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.forum-title .bbp-search-form input.search-field:focus',
'property' => 'background',
'pattern' => '$',
'key' => 'hover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Focus Color', 'kadence' ),
'palette' => true,
),
),
),
),
'forum_title_search_border' => array(
'control_type' => 'kadence_border_control',
'section' => 'forum_layout_design',
'label' => esc_html__( 'Border', 'kadence' ),
'default' => kadence()->default( 'forum_title_search_border' ),
'live_method' => array(
array(
'type' => 'css_border',
'selector' => '.forum-title .bbp-search-form input.search-field',
'pattern' => '$',
'property' => 'border',
'pattern' => '$',
'key' => 'border',
),
),
'input_attrs' => array(
'responsive' => false,
'color' => false,
),
),
'forum_title_search_border_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'forum_layout_design',
'label' => esc_html__( 'Input Border Color', 'kadence' ),
'default' => kadence()->default( 'forum_title_search_border_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.forum-title .bbp-search-form input.search-field',
'property' => 'border-color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.forum-title .bbp-search-form input.search-field:focus',
'property' => 'border-color',
'pattern' => '$',
'key' => 'hover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Focus Color', 'kadence' ),
'palette' => true,
),
),
),
),
'forum_title_search_typography' => array(
'control_type' => 'kadence_typography_control',
'section' => 'forum_layout_design',
'label' => esc_html__( 'Font', 'kadence' ),
'default' => kadence()->default( 'forum_title_search_typography' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => '.forum-title .bbp-search-form input.search-field',
'pattern' => array(
'desktop' => '$',
'tablet' => '$',
'mobile' => '$',
),
'property' => 'font',
'key' => 'typography',
),
),
'input_attrs' => array(
'id' => 'forum_title_search_typography',
'options' => 'no-color',
),
),
'forum_title_search_margin' => array(
'control_type' => 'kadence_measure_control',
'section' => 'forum_layout_design',
'default' => kadence()->default( 'forum_title_search_margin' ),
'label' => esc_html__( 'Margin', 'kadence' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.forum-title .bbp-search-form form',
'property' => 'margin',
'pattern' => '$',
'key' => 'measure',
),
),
'input_attrs' => array(
'responsive' => false,
),
),
'forum_title_breadcrumb_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'forum_layout_design',
'label' => esc_html__( 'Breadcrumb Colors', 'kadence' ),
'default' => kadence()->default( 'forum_title_breadcrumb_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.forum-title .kadence-breadcrumbs',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.forum-title .kadence-breadcrumbs a:hover',
'property' => 'color',
'pattern' => '$',
'key' => 'hover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Link Hover Color', 'kadence' ),
'palette' => true,
),
),
),
),
'forum_title_breadcrumb_font' => array(
'control_type' => 'kadence_typography_control',
'section' => 'forum_layout_design',
'label' => esc_html__( 'Breadcrumb Font', 'kadence' ),
'default' => kadence()->default( 'forum_title_breadcrumb_font' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => '.forum-title .kadence-breadcrumbs',
'property' => 'font',
'key' => 'typography',
),
),
'input_attrs' => array(
'id' => 'forum_title_breadcrumb_font',
'options' => 'no-color',
),
),
'forum_title_description_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'forum_layout_design',
'label' => esc_html__( 'Description Colors', 'kadence' ),
'default' => kadence()->default( 'forum_title_description_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.forum-title .title-entry-description',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.forum-title .title-entry-description a:hover',
'property' => 'color',
'pattern' => '$',
'key' => 'hover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Link Hover Color', 'kadence' ),
'palette' => true,
),
),
),
),
'forum_title_description_font' => array(
'control_type' => 'kadence_typography_control',
'section' => 'forum_layout_design',
'label' => esc_html__( 'Description Font', 'kadence' ),
'default' => kadence()->default( 'forum_title_description_font' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => '.forum-title .title-entry-description',
'property' => 'font',
'key' => 'typography',
),
),
'input_attrs' => array(
'id' => 'forum_title_description_font',
'options' => 'no-color',
),
),
'forum_title_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'forum_layout_design',
'label' => esc_html__( 'Forum Above Area Background', 'kadence' ),
'default' => kadence()->default( 'forum_title_background' ),
'context' => array(
array(
'setting' => 'forum_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'forum_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => '#inner-wrap .forum-hero-section .entry-hero-container-inner',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Forum Title Background', 'kadence' ),
),
),
'forum_title_featured_image' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'forum_layout_design',
'default' => kadence()->default( 'forum_title_featured_image' ),
'label' => esc_html__( 'Use Featured Image for Background?', 'kadence' ),
'transport' => 'refresh',
'context' => array(
array(
'setting' => 'forum_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'forum_title_layout',
'operator' => '=',
'value' => 'above',
),
),
),
'forum_title_overlay_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'forum_layout_design',
'label' => esc_html__( 'Background Overlay Color', 'kadence' ),
'default' => kadence()->default( 'forum_title_overlay_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.forum-hero-section .hero-section-overlay',
'property' => 'background',
'pattern' => '$',
'key' => 'color',
),
),
'context' => array(
array(
'setting' => 'forum_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'forum_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Overlay Color', 'kadence' ),
'palette' => true,
),
),
'allowGradient' => true,
),
),
'forum_title_border' => array(
'control_type' => 'kadence_borders_control',
'section' => 'forum_layout_design',
'label' => esc_html__( 'Border', 'kadence' ),
'default' => kadence()->default( 'forum_title_border' ),
'context' => array(
array(
'setting' => 'forum_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'forum_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'settings' => array(
'border_top' => 'forum_title_top_border',
'border_bottom' => 'forum_title_bottom_border',
),
'live_method' => array(
'forum_title_top_border' => array(
array(
'type' => 'css_border',
'selector' => '.forum-hero-section .entry-hero-container-inner',
'pattern' => '$',
'property' => 'border-top',
'key' => 'border',
),
),
'forum_title_bottom_border' => array(
array(
'type' => 'css_border',
'selector' => '.forum-hero-section .entry-hero-container-inner',
'property' => 'border-bottom',
'pattern' => '$',
'key' => 'border',
),
),
),
),
'info_forum_layout' => array(
'control_type' => 'kadence_title_control',
'section' => 'forum_layout',
'priority' => 10,
'label' => esc_html__( 'Forum Layout', 'kadence' ),
'settings' => false,
),
'info_forum_layout_design' => array(
'control_type' => 'kadence_title_control',
'section' => 'forum_layout_design',
'priority' => 10,
'label' => esc_html__( 'Forum Layout', 'kadence' ),
'settings' => false,
),
'forum_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'forum_layout',
'label' => esc_html__( 'Forum Layout', 'kadence' ),
'transport' => 'refresh',
'priority' => 10,
'default' => kadence()->default( 'forum_layout' ),
'input_attrs' => array(
'layout' => array(
'normal' => array(
'tooltip' => __( 'Normal', 'kadence' ),
'icon' => 'normal',
),
'narrow' => array(
'tooltip' => __( 'Narrow', 'kadence' ),
'icon' => 'narrow',
),
'fullwidth' => array(
'tooltip' => __( 'Fullwidth', 'kadence' ),
'icon' => 'fullwidth',
),
'left' => array(
'tooltip' => __( 'Left Sidebar', 'kadence' ),
'icon' => 'leftsidebar',
),
'right' => array(
'tooltip' => __( 'Right Sidebar', 'kadence' ),
'icon' => 'rightsidebar',
),
),
'responsive' => false,
'class' => 'kadence-three-col',
),
),
'forum_sidebar_id' => array(
'control_type' => 'kadence_select_control',
'section' => 'forum_layout',
'label' => esc_html__( 'Forum Default Sidebar', 'kadence' ),
'transport' => 'refresh',
'priority' => 10,
'default' => kadence()->default( 'forum_sidebar_id' ),
'input_attrs' => array(
'options' => kadence()->sidebar_options(),
),
),
'forum_content_style' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'forum_layout',
'label' => esc_html__( 'Content Style', 'kadence' ),
'priority' => 10,
'default' => kadence()->default( 'forum_content_style' ),
'live_method' => array(
array(
'type' => 'class',
'selector' => 'body.single-forum',
'pattern' => 'content-style-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'boxed' => array(
'tooltip' => __( 'Boxed', 'kadence' ),
'icon' => 'boxed',
),
'unboxed' => array(
'tooltip' => __( 'Unboxed', 'kadence' ),
'icon' => 'narrow',
),
),
'responsive' => false,
'class' => 'kadence-two-col',
),
),
'forum_vertical_padding' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'forum_layout',
'label' => esc_html__( 'Content Vertical Padding', 'kadence' ),
'priority' => 10,
'default' => kadence()->default( 'forum_vertical_padding' ),
'live_method' => array(
array(
'type' => 'class',
'selector' => 'body.single-forum',
'pattern' => 'content-vertical-padding-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'show' => array(
'name' => __( 'Enable', 'kadence' ),
),
'hide' => array(
'name' => __( 'Disable', 'kadence' ),
),
'top' => array(
'name' => __( 'Top Only', 'kadence' ),
),
'bottom' => array(
'name' => __( 'Bottom Only', 'kadence' ),
),
),
'responsive' => false,
'class' => 'kadence-two-grid',
),
),
'forum_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'forum_layout_design',
'priority' => 20,
'label' => esc_html__( 'Site Background', 'kadence' ),
'default' => kadence()->default( 'forum_background' ),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => 'body.single-forum',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Forum Background', 'kadence' ),
),
),
'forum_content_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'forum_layout_design',
'priority' => 20,
'label' => esc_html__( 'Content Background', 'kadence' ),
'default' => kadence()->default( 'forum_content_background' ),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => 'body.single-forum .content-bg, body.single-forum.content-style-unboxed .site',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Forum Content Background', 'kadence' ),
),
),
)
);

View File

@@ -0,0 +1,54 @@
<?php
/**
* Breadcrumb Options
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
Theme_Customizer::add_settings(
array(
'breadcrumb_engine' => array(
'control_type' => 'kadence_select_control',
'section' => 'breadcrumbs',
'transport' => 'refresh',
'default' => kadence()->default( 'breadcrumb_engine' ),
'label' => esc_html__( 'Breadcrumb Engine', 'kadence' ),
'input_attrs' => array(
'options' => array(
'' => array(
'name' => __( 'Default', 'kadence' ),
),
'rankmath' => array(
'name' => __( 'RankMath (must have activated in plugin)', 'kadence' ),
),
'yoast' => array(
'name' => __( 'Yoast (must have activated in plugin)', 'kadence' ),
),
'seopress' => array(
'name' => __( 'SEOPress (must have activated in plugin)', 'kadence' ),
),
),
),
),
'breadcrumb_home_icon' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'breadcrumbs',
'default' => kadence()->default( 'breadcrumb_home_icon' ),
'label' => esc_html__( 'Use icon for home?', 'kadence' ),
'transport' => 'refresh',
'context' => array(
array(
'setting' => 'breadcrumb_engine',
'operator' => '=',
'value' => '',
),
),
),
)
);

View File

@@ -0,0 +1,249 @@
<?php
/**
* Primary Button Options
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
Theme_Customizer::add_settings(
array(
'buttons_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'general_buttons',
'label' => esc_html__( 'Text Colors', 'kadence' ),
'default' => kadence()->default( 'buttons_color' ),
'live_method' => array(
array(
'type' => 'global',
'selector' => '--global-palette-btn',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'global',
'selector' => '--global-palette-btn-hover',
'property' => 'color',
'pattern' => '$',
'key' => 'hover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Hover Color', 'kadence' ),
'palette' => true,
),
),
),
),
'buttons_background' => array(
'control_type' => 'kadence_color_control',
'section' => 'general_buttons',
'label' => esc_html__( 'Background Colors', 'kadence' ),
'default' => kadence()->default( 'buttons_background' ),
'live_method' => array(
array(
'type' => 'global',
'selector' => '--global-palette-btn-bg',
'property' => 'background',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'global',
'selector' => '--global-palette-btn-bg-hover',
'property' => 'background',
'pattern' => '$',
'key' => 'hover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Hover Color', 'kadence' ),
'palette' => true,
),
),
'allowGradient' => true,
),
),
'buttons_border_colors' => array(
'control_type' => 'kadence_color_control',
'section' => 'general_buttons',
'label' => esc_html__( 'Border Colors', 'kadence' ),
'default' => kadence()->default( 'buttons_border' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => 'button, .button, .wp-block-button__link, input[type="button"], input[type="reset"], input[type="submit"]',
'property' => 'border-color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => 'button:hover, .button:hover, .wp-block-button__link:hover, input[type="button"]:hover, input[type="reset"]:hover, input[type="submit"]:hover',
'property' => 'border-color',
'pattern' => '$',
'key' => 'hover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Hover Color', 'kadence' ),
'palette' => true,
),
),
),
),
'buttons_border' => array(
'control_type' => 'kadence_border_control',
'section' => 'general_buttons',
'label' => esc_html__( 'Border', 'kadence' ),
'default' => kadence()->default( 'buttons_border' ),
'live_method' => array(
array(
'type' => 'css_border',
'selector' => 'button, .button, .wp-block-button__link, input[type="button"], input[type="reset"], input[type="submit"]',
'property' => 'border',
'pattern' => '$',
'key' => 'border',
),
),
'input_attrs' => array(
'responsive' => true,
'color' => false,
),
),
'buttons_border_radius' => array(
'control_type' => 'kadence_range_control',
'section' => 'general_buttons',
'label' => esc_html__( 'Border Radius', 'kadence' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => 'button, .button, .wp-block-button__link, input[type="button"], input[type="reset"], input[type="submit"]',
'property' => 'border-radius',
'pattern' => '$',
'key' => 'size',
),
),
'default' => kadence()->default( 'buttons_border_radius' ),
'input_attrs' => array(
'min' => array(
'px' => 0,
'em' => 0,
'rem' => 0,
'%' => 0,
),
'max' => array(
'px' => 100,
'em' => 12,
'rem' => 12,
'%' => 100,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
'%' => 1,
),
'units' => array( 'px', 'em', 'rem', '%' ),
'responsive' => true,
),
),
'buttons_typography' => array(
'control_type' => 'kadence_typography_control',
'section' => 'general_buttons',
'label' => esc_html__( 'Font', 'kadence' ),
'default' => kadence()->default( 'buttons_typography' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => 'button, .button, .wp-block-button__link, input[type="button"], input[type="reset"], input[type="submit"]',
'pattern' => array(
'desktop' => '$',
'tablet' => '$',
'mobile' => '$',
),
'property' => 'font',
'key' => 'typography',
),
),
'input_attrs' => array(
'id' => 'buttons_typography',
'options' => 'no-color',
),
),
'buttons_padding' => array(
'control_type' => 'kadence_measure_control',
'section' => 'general_buttons',
'priority' => 10,
'default' => kadence()->default( 'buttons_padding' ),
'label' => esc_html__( 'Padding', 'kadence' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => 'button, .button, .wp-block-button__link, input[type="button"], input[type="reset"], input[type="submit"]',
'property' => 'padding',
'pattern' => '$',
'key' => 'measure',
),
),
'input_attrs' => array(
'responsive' => true,
),
),
'buttons_shadow' => array(
'control_type' => 'kadence_shadow_control',
'section' => 'general_buttons',
'priority' => 20,
'label' => esc_html__( 'Button Shadow', 'kadence' ),
'live_method' => array(
array(
'type' => 'css_boxshadow',
'selector' => 'button, .button, .wp-block-button__link, input[type="button"], input[type="reset"], input[type="submit"]',
'property' => 'box-shadow',
'pattern' => '$',
'key' => '',
),
),
'default' => kadence()->default( 'buttons_shadow' ),
),
'buttons_shadow_hover' => array(
'control_type' => 'kadence_shadow_control',
'section' => 'general_buttons',
'priority' => 20,
'label' => esc_html__( 'Button Hover State Shadow', 'kadence' ),
'live_method' => array(
array(
'type' => 'css_boxshadow',
'selector' => 'button:hover, .button:hover, .wp-block-button__link:hover, input[type="button"]:hover, input[type="reset"]:hover, input[type="submit"]:hover',
'property' => 'box-shadow',
'pattern' => '$',
'key' => '',
),
),
'default' => kadence()->default( 'buttons_shadow_hover' ),
),
)
);

View File

@@ -0,0 +1,123 @@
<?php
/**
* Header Builder Options
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
Theme_Customizer::add_settings(
array(
'info_background' => array(
'control_type' => 'kadence_title_control',
'section' => 'general_colors',
'label' => esc_html__( 'Backgrounds', 'kadence' ),
'settings' => false,
),
'site_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'general_colors',
'label' => esc_html__( 'Site Background', 'kadence' ),
'default' => kadence()->default( 'site_background' ),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => 'body',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Site Background', 'kadence' ),
),
),
'content_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'general_colors',
'label' => esc_html__( 'Content Background', 'kadence' ),
'default' => kadence()->default( 'content_background' ),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => '.content-bg, body.content-style-unboxed .site',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Content Background', 'kadence' ),
),
),
'above_title_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'general_colors',
'label' => esc_html__( 'Title Above Content Background', 'kadence' ),
'default' => kadence()->default( 'above_title_background' ),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => '.wp-site-blocks .entry-hero-container-inner',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Title Above Content Background', 'kadence' ),
),
),
'above_title_overlay_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'general_colors',
'label' => esc_html__( 'Title Above Content Overlay Color', 'kadence' ),
'default' => kadence()->default( 'above_title_overlay_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.entry-hero-container-inner .hero-section-overlay',
'property' => 'background',
'pattern' => '$',
'key' => 'color',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Overlay Color', 'kadence' ),
'palette' => true,
),
),
'allowGradient' => true,
),
),
'info_links' => array(
'control_type' => 'kadence_title_control',
'section' => 'general_colors',
'label' => esc_html__( 'Content Links', 'kadence' ),
'settings' => false,
),
'link_color' => array(
'control_type' => 'kadence_color_link_control',
'section' => 'general_colors',
'transport' => 'refresh',
'label' => esc_html__( 'Links Color', 'kadence' ),
'default' => kadence()->default( 'link_color' ),
'live_method' => array(
array(
'type' => 'css_link',
'selector' => 'a',
'property' => 'color',
'pattern' => 'link-style-$',
'key' => 'base',
),
),
),
)
);

View File

@@ -0,0 +1,32 @@
<?php
/**
* Header Builder Options
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
Theme_Customizer::add_settings(
array(
'comment_form_before_list' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'general_comments',
'default' => kadence()->default( 'comment_form_before_list' ),
'label' => esc_html__( 'Move Comments input above comment list.', 'kadence' ),
'transport' => 'refresh',
),
'comment_form_remove_web' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'general_comments',
'default' => kadence()->default( 'comment_form_remove_web' ),
'label' => esc_html__( 'Remove Comments Website field.', 'kadence' ),
'transport' => 'refresh',
),
)
);

View File

@@ -0,0 +1,54 @@
<?php
/**
* Header Builder Options
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
Theme_Customizer::add_settings(
array(
'image_border_radius' => array(
'control_type' => 'kadence_range_control',
'section' => 'general_image',
'label' => esc_html__( 'Border Radius', 'kadence' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.entry-content :where(.wp-block-image) img, .entry-content :where(.wp-block-kadence-image) img',
'property' => 'border-radius',
'pattern' => '$',
'key' => 'size',
),
),
'default' => kadence()->default( 'image_border_radius' ),
'input_attrs' => array(
'min' => array(
'px' => 0,
'em' => 0,
'rem' => 0,
'%' => 0,
),
'max' => array(
'px' => 100,
'em' => 12,
'rem' => 12,
'%' => 100,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
'%' => 1,
),
'units' => array( 'px', 'em', 'rem', '%' ),
'responsive' => true,
),
),
)
);

View File

@@ -0,0 +1,341 @@
<?php
/**
* Header Builder Options
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
$settings = array(
'content_width' => array(
'control_type' => 'kadence_range_control',
'section' => 'general_layout',
'priority' => 20,
'label' => esc_html__( 'Content Max Width', 'kadence' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.site-container, .site-header-row-layout-contained',
'property' => 'max-width',
'pattern' => '$',
'key' => 'size',
),
),
'default' => kadence()->default( 'content_width' ),
'input_attrs' => array(
'min' => array(
'px' => 400,
'em' => 30,
'rem' => 30,
),
'max' => array(
'px' => 2000,
'em' => 140,
'rem' => 140,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
),
'units' => array( 'px', 'em', 'rem' ),
'responsive' => false,
),
),
'content_edge_spacing' => array(
'control_type' => 'kadence_range_control',
'section' => 'general_layout',
'priority' => 20,
'label' => esc_html__( 'Content Left/Right Edge Spacing', 'kadence' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.site-container, .site-header-row-layout-contained, .site-footer-row-layout-contained, .entry-hero-layout-contained, .alignfull>.wp-block-cover__inner-container, .alignwide>.wp-block-cover__inner-container',
'property' => 'padding-left',
'pattern' => '$',
'key' => 'size',
),
array(
'type' => 'css',
'selector' => '.site-container, .site-header-row-layout-contained, .site-footer-row-layout-contained, .entry-hero-layout-contained, .alignfull>.wp-block-cover__inner-container, .alignwide>.wp-block-cover__inner-container',
'property' => 'padding-right',
'pattern' => '$',
'key' => 'size',
),
),
'default' => kadence()->default( 'content_edge_spacing' ),
'input_attrs' => array(
'min' => array(
'px' => 0,
'em' => 0,
'rem' => 0,
'vw' => 0,
),
'max' => array(
'px' => 200,
'em' => 12,
'rem' => 12,
'vw' => 40,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
'vw' => 1,
),
'units' => array( 'px', 'em', 'rem', 'vh' ),
'responsive' => true,
),
),
'content_spacing' => array(
'control_type' => 'kadence_range_control',
'section' => 'general_layout',
'priority' => 20,
'label' => esc_html__( 'Content Top and Bottom Spacing', 'kadence' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.content-area',
'property' => 'margin-top',
'pattern' => '$',
'key' => 'size',
),
array(
'type' => 'css',
'selector' => '.content-area',
'property' => 'margin-bottom',
'pattern' => '$',
'key' => 'size',
),
),
'default' => kadence()->default( 'content_spacing' ),
'input_attrs' => array(
'min' => array(
'px' => 0,
'em' => 0,
'rem' => 0,
'vw' => 0,
),
'max' => array(
'px' => 200,
'em' => 12,
'rem' => 12,
'vw' => 40,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
'vw' => 1,
),
'units' => array( 'px', 'em', 'rem', 'vh' ),
'responsive' => true,
),
),
'content_narrow_width' => array(
'control_type' => 'kadence_range_control',
'section' => 'general_layout',
'priority' => 20,
'label' => esc_html__( 'Narrow Layout Content Max Width', 'kadence' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.content-width-narrow .content-container.site-container',
'property' => 'max-width',
'pattern' => '$',
'key' => 'size',
),
),
'default' => kadence()->default( 'content_narrow_width' ),
'input_attrs' => array(
'min' => array(
'px' => 300,
'em' => 20,
'rem' => 20,
'vw' => 20,
),
'max' => array(
'px' => 2000,
'em' => 140,
'rem' => 140,
'vw' => 100,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
'vw' => 1,
),
'units' => array( 'px', 'em', 'rem', 'vw' ),
'responsive' => false,
),
),
'info_general_single_boxed' => array(
'control_type' => 'kadence_title_control',
'section' => 'general_layout',
'priority' => 21,
'label' => esc_html__( 'Single Post Boxed', 'kadence' ),
'settings' => false,
),
'boxed_spacing' => array(
'control_type' => 'kadence_range_control',
'section' => 'general_layout',
'priority' => 22,
'label' => esc_html__( 'Single Post Boxed Spacing', 'kadence' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.entry-content-wrap',
'property' => 'padding',
'pattern' => '$',
'key' => 'size',
),
),
'default' => kadence()->default( 'boxed_spacing' ),
'input_attrs' => array(
'min' => array(
'px' => 0,
'em' => 0,
'rem' => 0,
),
'max' => array(
'px' => 200,
'em' => 12,
'rem' => 12,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
),
'units' => array( 'px', 'em', 'rem' ),
'responsive' => true,
),
),
'boxed_shadow' => array(
'control_type' => 'kadence_shadow_control',
'section' => 'general_layout',
'priority' => 22,
'label' => esc_html__( 'Single Post Boxed Shadow', 'kadence' ),
'live_method' => array(
array(
'type' => 'css_boxshadow',
'selector' => '.entry.single-entry',
'property' => 'box-shadow',
'pattern' => '$',
'key' => '',
),
),
'default' => kadence()->default( 'boxed_shadow' ),
),
'boxed_border_radius' => array(
'control_type' => 'kadence_measure_control',
'section' => 'general_layout',
'priority' => 22,
'label' => esc_html__( 'Single Post Boxed Border Radius', 'kadence' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.entry.single-entry',
'property' => 'border-radius',
'pattern' => '$',
'key' => 'measure',
),
),
'default' => kadence()->default( 'boxed_border_radius' ),
'input_attrs' => array(
'responsive' => false,
),
),
'info_general_archive_boxed' => array(
'control_type' => 'kadence_title_control',
'section' => 'general_layout',
'priority' => 22,
'label' => esc_html__( 'Archive Grid Boxed', 'kadence' ),
'settings' => false,
),
'boxed_grid_spacing' => array(
'control_type' => 'kadence_range_control',
'section' => 'general_layout',
'priority' => 22,
'label' => esc_html__( 'Archive Grid Boxed Spacing', 'kadence' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.loop-entry .entry-content-wrap',
'property' => 'padding',
'pattern' => '$',
'key' => 'size',
),
),
'default' => kadence()->default( 'boxed_grid_spacing' ),
'input_attrs' => array(
'min' => array(
'px' => 0,
'em' => 0,
'rem' => 0,
),
'max' => array(
'px' => 200,
'em' => 12,
'rem' => 12,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
),
'units' => array( 'px', 'em', 'rem' ),
'responsive' => true,
),
),
'boxed_grid_shadow' => array(
'control_type' => 'kadence_shadow_control',
'section' => 'general_layout',
'priority' => 22,
'label' => esc_html__( 'Archive Grid Boxed Shadow', 'kadence' ),
'live_method' => array(
array(
'type' => 'css_boxshadow',
'selector' => '.entry.loop-entry',
'property' => 'box-shadow',
'pattern' => '$',
'key' => '',
),
),
'default' => kadence()->default( 'boxed_grid_shadow' ),
),
'boxed_grid_border_radius' => array(
'control_type' => 'kadence_measure_control',
'section' => 'general_layout',
'priority' => 22,
'label' => esc_html__( 'Archive Grid Boxed Border Radius', 'kadence' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.entry.loop-entry',
'property' => 'border-radius',
'pattern' => '$',
'key' => 'measure',
),
array(
'type' => 'css',
'selector' => '.entry.loop-entry:after',
'property' => 'border-radius',
'pattern' => '$',
'key' => 'measure',
),
),
'default' => kadence()->default( 'boxed_grid_border_radius' ),
'input_attrs' => array(
'responsive' => false,
),
),
);
Theme_Customizer::add_settings( $settings );

View File

@@ -0,0 +1,105 @@
<?php
/**
* Header Builder Options
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
ob_start(); ?>
<div class="kadence-compontent-custom fonts-flush-button wp-clearfix">
<span class="customize-control-title">
<?php esc_html_e( 'Flush Local Fonts Cache', 'kadence' ); ?>
</span>
<span class="description customize-control-description">
<?php esc_html_e( 'Click the button to reset the local fonts cache', 'kadence' ); ?>
</span>
<input type="button" class="button kadence-flush-local-fonts-button" name="kadence-flush-local-fonts-button" value="<?php esc_attr_e( 'Flush Local Font Files', 'kadence' ); ?>" />
</div>
<?php
$kadence_flush_button = ob_get_clean();
Theme_Customizer::add_settings(
array(
'microdata' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'general_performance',
'default' => kadence()->default( 'microdata' ),
'label' => esc_html__( 'Enable Microdata Schema', 'kadence' ),
),
'theme_json_mode' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'general_performance',
'default' => kadence()->default( 'theme_json_mode' ),
'label' => esc_html__( 'Enable Optimized Group Block', 'kadence' ),
),
'enable_scroll_to_id' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'general_performance',
'default' => kadence()->default( 'enable_scroll_to_id' ),
'label' => esc_html__( 'Enable Scroll To ID', 'kadence' ),
),
'lightbox' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'general_performance',
'default' => kadence()->default( 'lightbox' ),
'label' => esc_html__( 'Enable Lightbox', 'kadence' ),
),
'load_fonts_local' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'general_performance',
'default' => kadence()->default( 'load_fonts_local' ),
'label' => esc_html__( 'Load Google Fonts Locally', 'kadence' ),
),
'preload_fonts_local' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'general_performance',
'default' => kadence()->default( 'preload_fonts_local' ),
'label' => esc_html__( 'Preload Local Fonts', 'kadence' ),
'context' => array(
array(
'setting' => 'load_fonts_local',
'operator' => '==',
'value' => true,
),
),
),
'load_fonts_local_flush' => array(
'control_type' => 'kadence_blank_control',
'section' => 'general_performance',
'settings' => false,
'description' => $kadence_flush_button,
'context' => array(
array(
'setting' => 'load_fonts_local',
'operator' => '==',
'value' => true,
),
),
),
'enable_preload' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'general_performance',
'default' => kadence()->default( 'enable_preload' ),
'label' => esc_html__( 'Enable CSS Preload', 'kadence' ),
),
'disable_sitemap' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'general_performance',
'default' => kadence()->default( 'disable_sitemap' ),
'label' => esc_html__( 'Disable Default Sitemap', 'kadence' ),
),
)
);

View File

@@ -0,0 +1,532 @@
<?php
/**
* Header Builder Options
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
Theme_Customizer::add_settings(
array(
'scroll_up_tabs' => array(
'control_type' => 'kadence_tab_control',
'section' => 'scroll_up',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'scroll_up',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'scroll_up_design',
),
'active' => 'general',
),
),
'scroll_up_tabs_design' => array(
'control_type' => 'kadence_tab_control',
'section' => 'scroll_up_design',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'scroll_up',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'scroll_up_design',
),
'active' => 'design',
),
),
'scroll_up' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'scroll_up',
'default' => kadence()->default( 'scroll_up' ),
'label' => esc_html__( 'Enable Scroll To Top', 'kadence' ),
'transport' => 'refresh',
),
'scroll_up_icon' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'scroll_up',
'priority' => 10,
'default' => kadence()->default( 'scroll_up_icon' ),
'label' => esc_html__( 'Scroll Up Icon', 'kadence' ),
'partial' => array(
'selector' => '.scroll-up-wrap',
'container_inclusive' => true,
'render_callback' => 'Kadence\scroll_up',
),
'context' => array(
array(
'setting' => 'scroll_up',
'operator' => '==',
'value' => true,
),
),
'input_attrs' => array(
'layout' => array(
'arrow-up' => array(
'icon' => 'arrowUp',
),
'arrow-up2' => array(
'icon' => 'arrowUp2',
),
'chevron-up' => array(
'icon' => 'chevronUp',
),
'chevron-up2' => array(
'icon' => 'chevronUp2',
),
),
'responsive' => false,
),
),
'scroll_up_icon_size' => array(
'control_type' => 'kadence_range_control',
'section' => 'scroll_up',
'label' => esc_html__( 'Icon Size', 'kadence' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#kt-scroll-up-reader, #kt-scroll-up',
'property' => 'font-size',
'pattern' => '$',
'key' => 'size',
),
),
'default' => kadence()->default( 'scroll_up_icon_size' ),
'input_attrs' => array(
'min' => array(
'px' => 0,
'em' => 0,
'rem' => 0,
),
'max' => array(
'px' => 100,
'em' => 12,
'rem' => 12,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
),
'units' => array( 'px', 'em', 'rem' ),
'responsive' => true,
),
),
'scroll_up_side' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'scroll_up',
'default' => kadence()->default( 'scroll_up_side' ),
'label' => esc_html__( 'Align', 'kadence' ),
'context' => array(
array(
'setting' => 'scroll_up',
'operator' => '==',
'value' => true,
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.scroll-up-wrap',
'pattern' => 'scroll-up-side-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'left' => array(
'name' => __( 'Left', 'kadence' ),
'icon' => '',
),
'right' => array(
'name' => __( 'Right', 'kadence' ),
'icon' => '',
),
),
'responsive' => false,
),
),
'scroll_up_side_offset' => array(
'control_type' => 'kadence_range_control',
'section' => 'scroll_up',
'label' => esc_html__( 'Side Offset', 'kadence' ),
'default' => kadence()->default( 'scroll_up_side_offset' ),
'context' => array(
array(
'setting' => 'scroll_up',
'operator' => '==',
'value' => true,
),
),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#kt-scroll-up-reader.scroll-up-side-right, #kt-scroll-up.scroll-up-side-right',
'pattern' => '$',
'property' => 'right',
'key' => 'size',
),
array(
'type' => 'css',
'selector' => '#kt-scroll-up-reader.scroll-up-side-left, #kt-scroll-up.scroll-up-side-left',
'pattern' => '$',
'property' => 'left',
'key' => 'size',
),
),
'input_attrs' => array(
'min' => array(
'px' => 0,
'em' => 0,
'rem' => 0,
'vw' => 0,
),
'max' => array(
'px' => 600,
'em' => 20,
'rem' => 20,
'vw' => 100,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
'vw' => 1,
),
'units' => array( 'px', 'em', 'rem', 'vw' ),
'responsive' => true,
),
),
'scroll_up_bottom_offset' => array(
'control_type' => 'kadence_range_control',
'section' => 'scroll_up',
'label' => esc_html__( 'Bottom Offset', 'kadence' ),
'default' => kadence()->default( 'scroll_up_bottom_offset' ),
'context' => array(
array(
'setting' => 'scroll_up',
'operator' => '==',
'value' => true,
),
),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#kt-scroll-up-reader, #kt-scroll-up',
'pattern' => '$',
'property' => 'bottom',
'key' => 'size',
),
),
'input_attrs' => array(
'min' => array(
'px' => 0,
'em' => 0,
'rem' => 0,
'vh' => 0,
),
'max' => array(
'px' => 600,
'em' => 20,
'rem' => 20,
'vh' => 100,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
'vh' => 1,
),
'units' => array( 'px', 'em', 'rem', 'vh' ),
'responsive' => true,
),
),
'scroll_up_visiblity' => array(
'control_type' => 'kadence_check_icon_control',
'section' => 'scroll_up',
'default' => kadence()->default( 'scroll_up_visiblity' ),
'label' => esc_html__( 'Visibility', 'kadence' ),
'context' => array(
array(
'setting' => 'scroll_up',
'operator' => '==',
'value' => true,
),
),
'partial' => array(
'selector' => '.scroll-up-wrap',
'container_inclusive' => true,
'render_callback' => 'Kadence\scroll_up',
),
'input_attrs' => array(
'options' => array(
'desktop' => array(
'name' => __( 'Desktop', 'kadence' ),
'icon' => 'desktop',
),
'tablet' => array(
'name' => __( 'Tablet', 'kadence' ),
'icon' => 'tablet',
),
'mobile' => array(
'name' => __( 'Mobile', 'kadence' ),
'icon' => 'smartphone',
),
),
),
),
'scroll_up_style' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'scroll_up_design',
'default' => kadence()->default( 'scroll_up_style' ),
'label' => esc_html__( 'Scroll Button Style', 'kadence' ),
'live_method' => array(
array(
'type' => 'class',
'selector' => '#kt-scroll-up-reader, #kt-scroll-up',
'pattern' => 'scroll-up-style-$',
'key' => '',
),
),
'context' => array(
array(
'setting' => 'scroll_up',
'operator' => '==',
'value' => true,
),
),
'input_attrs' => array(
'layout' => array(
'filled' => array(
'name' => __( 'Filled', 'kadence' ),
),
'outline' => array(
'name' => __( 'Outline', 'kadence' ),
),
'secondary' => array(
'name' => __( 'Secondary', 'kadence' ),
),
),
'responsive' => false,
),
),
'scroll_up_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'scroll_up_design',
'label' => esc_html__( 'Colors', 'kadence' ),
'default' => kadence()->default( 'scroll_up_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#kt-scroll-up-reader, #kt-scroll-up',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '#kt-scroll-up-reader:hover, #kt-scroll-up:hover',
'property' => 'color',
'pattern' => '$',
'key' => 'hover',
),
),
'context' => array(
array(
'setting' => 'scroll_up',
'operator' => '==',
'value' => true,
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Hover Color', 'kadence' ),
'palette' => true,
),
),
),
),
'scroll_up_background' => array(
'control_type' => 'kadence_color_control',
'section' => 'scroll_up_design',
'label' => esc_html__( 'Background Colors', 'kadence' ),
'default' => kadence()->default( 'scroll_up_background' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#kt-scroll-up-reader, #kt-scroll-up',
'property' => 'background',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '#kt-scroll-up-reader:hover, #kt-scroll-up:hover',
'property' => 'background',
'pattern' => '$',
'key' => 'hover',
),
),
'context' => array(
array(
'setting' => 'scroll_up',
'operator' => '==',
'value' => true,
),
array(
'setting' => 'scroll_up_style',
'operator' => '=',
'value' => 'filled',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Hover Color', 'kadence' ),
'palette' => true,
),
),
),
),
'scroll_up_border_colors' => array(
'control_type' => 'kadence_color_control',
'section' => 'scroll_up_design',
'label' => esc_html__( 'Border Colors', 'kadence' ),
'default' => kadence()->default( 'scroll_up_border' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#kt-scroll-up-reader, #kt-scroll-up',
'property' => 'border-color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '#kt-scroll-up-reader:hover, #kt-scroll-up:hover',
'property' => 'border-color',
'pattern' => '$',
'key' => 'hover',
),
),
'context' => array(
array(
'setting' => 'scroll_up',
'operator' => '==',
'value' => true,
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Hover Color', 'kadence' ),
'palette' => true,
),
),
),
),
'scroll_up_border' => array(
'control_type' => 'kadence_border_control',
'section' => 'scroll_up_design',
'label' => esc_html__( 'Border', 'kadence' ),
'default' => kadence()->default( 'scroll_up_border' ),
'live_method' => array(
array(
'type' => 'css_border',
'selector' => '#kt-scroll-up-reader, #kt-scroll-up',
'property' => 'border',
'pattern' => '$',
'key' => 'border',
),
),
'context' => array(
array(
'setting' => 'scroll_up',
'operator' => '==',
'value' => true,
),
),
'input_attrs' => array(
'responsive' => false,
'color' => false,
),
),
'scroll_up_radius' => array(
'control_type' => 'kadence_measure_control',
'section' => 'scroll_up_design',
'priority' => 10,
'default' => kadence()->default( 'scroll_up_radius' ),
'label' => esc_html__( 'Border Radius', 'kadence' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#kt-scroll-up-reader, #kt-scroll-up',
'property' => 'border-radius',
'pattern' => '$',
'key' => 'measure',
),
),
'context' => array(
array(
'setting' => 'scroll_up',
'operator' => '==',
'value' => true,
),
),
'input_attrs' => array(
'responsive' => false,
),
),
'scroll_up_padding' => array(
'control_type' => 'kadence_measure_control',
'section' => 'scroll_up_design',
'priority' => 10,
'default' => kadence()->default( 'scroll_up_padding' ),
'label' => esc_html__( 'Scroll Button Padding', 'kadence' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#kt-scroll-up-reader, #kt-scroll-up',
'property' => 'padding',
'pattern' => '$',
'key' => 'measure',
),
),
'context' => array(
array(
'setting' => 'scroll_up',
'operator' => '==',
'value' => true,
),
),
'input_attrs' => array(
'responsive' => true,
),
),
)
);

View File

@@ -0,0 +1,379 @@
<?php
/**
* Sidebar Options
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
ob_start(); ?>
<div class="kadence-compontent-description">
<p style="margin:0"><?php echo esc_html__( 'Title and Content settings affect legacy widgets. For block editor widgets use settings in the editor.', 'kadence' ); ?></p>
</div>
<?php
$component_description = ob_get_clean();
Theme_Customizer::add_settings(
array(
'sidebar_tabs' => array(
'control_type' => 'kadence_tab_control',
'section' => 'sidebar',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'sidebar',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'sidebar_design',
),
'active' => 'general',
),
),
'sidebar_tabs_design' => array(
'control_type' => 'kadence_tab_control',
'section' => 'sidebar_design',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'sidebar',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'sidebar_design',
),
'active' => 'design',
),
),
'sidebar_width' => array(
'control_type' => 'kadence_range_control',
'section' => 'sidebar',
'priority' => 10,
'label' => esc_html__( 'Sidebar Width', 'kadence' ),
// 'context' => array(
// array(
// 'setting' => '__current_tab',
// 'value' => 'general',
// ),
// ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.has-sidebar:not(.has-left-sidebar) .content-container',
'property' => 'grid-template-columns',
'pattern' => '1fr $',
'key' => 'size',
),
array(
'type' => 'css',
'selector' => '.has-sidebar.has-left-sidebar .content-container',
'property' => 'grid-template-columns',
'pattern' => '$ 1fr',
'key' => 'size',
),
),
'default' => kadence()->default( 'sidebar_width' ),
'input_attrs' => array(
'min' => array(
'px' => 100,
'em' => 8,
'rem' => 8,
'%' => 5,
),
'max' => array(
'px' => 600,
'em' => 30,
'rem' => 30,
'%' => 60,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
'%' => 1,
),
'units' => array( 'px', 'em', 'rem', '%' ),
'responsive' => false,
),
),
'sidebar_widget_spacing' => array(
'control_type' => 'kadence_range_control',
'section' => 'sidebar',
'priority' => 10,
'label' => esc_html__( 'Widget Spacing', 'kadence' ),
// 'context' => array(
// array(
// 'setting' => '__current_tab',
// 'value' => 'general',
// ),
// ),
'live_method' => array(
array(
'type' => 'css',
'property' => 'margin-bottom',
'selector' => '.primary-sidebar.widget-area .widget',
'pattern' => '$',
'key' => 'size',
),
),
'default' => kadence()->default( 'sidebar_widget_spacing' ),
'input_attrs' => array(
'min' => array(
'px' => 0,
'em' => 0,
'rem' => 0,
),
'max' => array(
'px' => 200,
'em' => 8,
'rem' => 8,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
),
'units' => array( 'px', 'em', 'rem' ),
),
),
'sidebar_widget_settings' => array(
'control_type' => 'kadence_blank_control',
'section' => 'sidebar_design',
'settings' => false,
'priority' => 1,
'description' => $component_description,
),
'sidebar_widget_title' => array(
'control_type' => 'kadence_typography_control',
'section' => 'sidebar_design',
'label' => esc_html__( 'Widget Titles', 'kadence' ),
// 'context' => array(
// array(
// 'setting' => '__current_tab',
// 'value' => 'design',
// ),
// ),
'default' => kadence()->default( 'sidebar_widget_title' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => '.primary-sidebar.widget-area .widget-title',
'pattern' => array(
'desktop' => '$',
'tablet' => '$',
'mobile' => '$',
),
'property' => 'font',
'key' => 'typography',
),
),
'input_attrs' => array(
'id' => 'sidebar_widget_title',
),
),
'sidebar_widget_content' => array(
'control_type' => 'kadence_typography_control',
'section' => 'sidebar_design',
'label' => esc_html__( 'Widget Content', 'kadence' ),
// 'context' => array(
// array(
// 'setting' => '__current_tab',
// 'value' => 'design',
// ),
// ),
'default' => kadence()->default( 'sidebar_widget_content' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => '.primary-sidebar.widget-area .widget',
'pattern' => array(
'desktop' => '$',
'tablet' => '$',
'mobile' => '$',
),
'property' => 'font',
'key' => 'typography',
),
),
'input_attrs' => array(
'id' => 'sidebar_widget_content',
),
),
'sidebar_link_style' => array(
'control_type' => 'kadence_select_control',
'section' => 'sidebar_design',
'default' => kadence()->default( 'sidebar_link_style' ),
'label' => esc_html__( 'Link Style', 'kadence' ),
'input_attrs' => array(
'options' => array(
'normal' => array(
'name' => __( 'Underline on Hover', 'kadence' ),
),
'underline' => array(
'name' => __( 'Underline', 'kadence' ),
),
'plain' => array(
'name' => __( 'No Underline', 'kadence' ),
),
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.primary-sidebar',
'pattern' => 'sidebar-link-style-$',
'key' => '',
),
),
),
'sidebar_link_colors' => array(
'control_type' => 'kadence_color_control',
'section' => 'sidebar_design',
'label' => esc_html__( 'Link Colors', 'kadence' ),
'default' => kadence()->default( 'sidebar_link_colors' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.primary-sidebar.widget-area .sidebar-inner-wrap a',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.primary-sidebar.widget-area .sidebar-inner-wrap a:hover',
'property' => 'color',
'pattern' => '$',
'key' => 'hover',
),
),
// 'context' => array(
// array(
// 'setting' => '__current_tab',
// 'value' => 'design',
// ),
// ),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Hover Color', 'kadence' ),
'palette' => true,
),
),
),
),
'sidebar_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'sidebar_design',
'label' => esc_html__( 'Sidebar Background', 'kadence' ),
'default' => kadence()->default( 'sidebar_background' ),
// 'context' => array(
// array(
// 'setting' => '__current_tab',
// 'value' => 'design',
// ),
// ),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => '.primary-sidebar.widget-area',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Sidebar Background', 'kadence' ),
),
),
'sidebar_divider_border' => array(
'control_type' => 'kadence_border_control',
'section' => 'sidebar_design',
'label' => esc_html__( 'Sidebar Divider Border', 'kadence' ),
'default' => kadence()->default( 'sidebar_divider_border' ),
// 'context' => array(
// array(
// 'setting' => '__current_tab',
// 'value' => 'design',
// ),
// ),
'live_method' => array(
array(
'type' => 'css_border',
'selector' => '.has-sidebar.has-left-sidebar .primary-sidebar.widget-area',
'pattern' => '$',
'property' => 'border-right',
'pattern' => '$',
'key' => 'border',
),
array(
'type' => 'css_border',
'selector' => '.has-sidebar:not(.has-left-sidebar) .primary-sidebar.widget-area',
'pattern' => '$',
'property' => 'border-left',
'pattern' => '$',
'key' => 'border',
),
),
),
'sidebar_padding' => array(
'control_type' => 'kadence_measure_control',
'section' => 'sidebar_design',
'priority' => 10,
'default' => kadence()->default( 'sidebar_padding' ),
'label' => esc_html__( 'Sidebar Padding', 'kadence' ),
// 'context' => array(
// array(
// 'setting' => '__current_tab',
// 'value' => 'design',
// ),
// ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.primary-sidebar.widget-area',
'property' => 'padding',
'pattern' => '$',
'key' => 'measure',
),
),
'input_attrs' => array(
'responsive' => true,
),
),
'sidebar_sticky' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'sidebar',
'default' => kadence()->default( 'sidebar_sticky' ),
'label' => esc_html__( 'Enable Sticky Sidebar', 'kadence' ),
'transport' => 'refresh',
),
'sidebar_sticky_last_widget' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'sidebar',
'default' => kadence()->default( 'sidebar_sticky_last_widget' ),
'label' => esc_html__( 'Only Stick Last Widget', 'kadence' ),
'transport' => 'refresh',
'context' => array(
array(
'setting' => 'sidebar_sticky',
'value' => true,
),
),
),
)
);

View File

@@ -0,0 +1,448 @@
<?php
/**
* Header Builder Options
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
ob_start(); ?>
<div class="kadence-compontent-description">
<h2><?php echo esc_html__( 'Social Network Links', 'kadence' ); ?></h2>
</div>
<?php
$compontent_description = ob_get_clean();
$settings = [
'social_settings' => [
'control_type' => 'kadence_blank_control',
'section' => 'general_social',
'settings' => false,
'priority' => 1,
'description' => $compontent_description,
],
'social_links_open_new_tab' => [
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'general_social',
'default' => kadence()->default( 'social_links_open_new_tab' ),
'label' => esc_html__( 'Open Social Links in New Tab', 'kadence' ),
],
'facebook_link' => [
'control_type' => 'kadence_text_control',
'sanitize' => 'esc_url_raw',
'section' => 'general_social',
'default' => kadence()->default( 'facebook_link' ),
'label' => esc_html__( 'Facebook', 'kadence' ),
],
'twitter_link' => [
'control_type' => 'kadence_text_control',
'sanitize' => 'esc_url_raw',
'section' => 'general_social',
'default' => kadence()->default( 'twitter_link' ),
'label' => esc_html__( 'X formerly Twitter', 'kadence' ),
],
'youtube_link' => [
'control_type' => 'kadence_text_control',
'sanitize' => 'esc_url_raw',
'section' => 'general_social',
'default' => kadence()->default( 'youtube_link' ),
'label' => esc_html__( 'YouTube', 'kadence' ),
],
'instagram_link' => [
'control_type' => 'kadence_text_control',
'sanitize' => 'esc_url_raw',
'section' => 'general_social',
'default' => kadence()->default( 'instagram_link' ),
'label' => esc_html__( 'Instagram', 'kadence' ),
],
'pinterest_link' => [
'control_type' => 'kadence_text_control',
'sanitize' => 'esc_url_raw',
'section' => 'general_social',
'default' => kadence()->default( 'pinterest_link' ),
'label' => esc_html__( 'Pinterest', 'kadence' ),
],
'500px_link' => [
'control_type' => 'kadence_text_control',
'section' => 'general_social',
'sanitize' => 'esc_url_raw',
'default' => kadence()->default( '500px_link' ),
'label' => esc_html__( '500PX', 'kadence' ),
],
'amazon_link' => [
'control_type' => 'kadence_text_control',
'section' => 'general_social',
'sanitize' => 'esc_url_raw',
'default' => kadence()->default( 'amazon_link' ),
'label' => esc_html__( 'Amazon', 'kadence' ),
],
'anchor_link' => [
'control_type' => 'kadence_text_control',
'section' => 'general_social',
'sanitize' => 'esc_url_raw',
'default' => kadence()->default( 'anchor_link' ),
'label' => esc_html__( 'Anchor', 'kadence' ),
],
'apple_podcasts_link' => [
'control_type' => 'kadence_text_control',
'section' => 'general_social',
'sanitize' => 'esc_url_raw',
'default' => kadence()->default( 'apple_podcasts_link' ),
'label' => esc_html__( 'Apple Podcast', 'kadence' ),
],
'bandcamp_link' => [
'control_type' => 'kadence_text_control',
'section' => 'general_social',
'sanitize' => 'esc_url_raw',
'default' => kadence()->default( 'bandcamp_link' ),
'label' => esc_html__( 'Bandcamp', 'kadence' ),
],
'behance_link' => [
'control_type' => 'kadence_text_control',
'section' => 'general_social',
'sanitize' => 'esc_url_raw',
'default' => kadence()->default( 'behance_link' ),
'label' => esc_html__( 'Behance', 'kadence' ),
],
'bluesky_link' => [
'control_type' => 'kadence_text_control',
'section' => 'general_social',
'sanitize' => 'esc_url_raw',
'default' => kadence()->default( 'bluesky_link' ),
'label' => esc_html__( 'Bluesky', 'kadence' ),
],
'bookbub_link' => [
'control_type' => 'kadence_text_control',
'section' => 'general_social',
'sanitize' => 'esc_url_raw',
'default' => kadence()->default( 'bookbub_link' ),
'label' => esc_html__( 'Bookbub', 'kadence' ),
],
'discord_link' => [
'control_type' => 'kadence_text_control',
'section' => 'general_social',
'sanitize' => 'esc_url_raw',
'default' => kadence()->default( 'discord_link' ),
'label' => esc_html__( 'Discord', 'kadence' ),
],
'dribbble_link' => [
'control_type' => 'kadence_text_control',
'section' => 'general_social',
'sanitize' => 'esc_url_raw',
'default' => kadence()->default( 'dribbble_link' ),
'label' => esc_html__( 'Dribbble', 'kadence' ),
],
'email_link' => [
'control_type' => 'kadence_text_control',
'section' => 'general_social',
'sanitize' => 'sanitize_text_field',
'default' => kadence()->default( 'email_link' ),
'label' => esc_html__( 'Email', 'kadence' ),
],
'facebook_group_link' => [
'control_type' => 'kadence_text_control',
'sanitize' => 'esc_url_raw',
'section' => 'general_social',
'default' => kadence()->default( 'facebook_group_link' ),
'label' => esc_html__( 'Facebook Group', 'kadence' ),
],
'flickr_link' => [
'control_type' => 'kadence_text_control',
'section' => 'general_social',
'sanitize' => 'esc_url_raw',
'default' => kadence()->default( 'flickr_link' ),
'label' => esc_html__( 'Flickr', 'kadence' ),
],
'flipboard_link' => [
'control_type' => 'kadence_text_control',
'section' => 'general_social',
'sanitize' => 'esc_url_raw',
'default' => kadence()->default( 'flipboard_link' ),
'label' => esc_html__( 'Flipboard', 'kadence' ),
],
'fstoppers_link' => [
'control_type' => 'kadence_text_control',
'section' => 'general_social',
'sanitize' => 'esc_url_raw',
'default' => kadence()->default( 'fstoppers_link' ),
'label' => esc_html__( 'Fstoppers', 'kadence' ),
],
'github_link' => [
'control_type' => 'kadence_text_control',
'section' => 'general_social',
'sanitize' => 'esc_url_raw',
'default' => kadence()->default( 'github_link' ),
'label' => esc_html__( 'GitHub', 'kadence' ),
],
'goodreads_link' => [
'control_type' => 'kadence_text_control',
'section' => 'general_social',
'sanitize' => 'esc_url_raw',
'default' => kadence()->default( 'goodreads_link' ),
'label' => esc_html__( 'Goodreads', 'kadence' ),
],
'google_reviews_link' => [
'control_type' => 'kadence_text_control',
'section' => 'general_social',
'sanitize' => 'esc_url_raw',
'default' => kadence()->default( 'google_reviews_link' ),
'label' => esc_html__( 'Google Reviews', 'kadence' ),
],
'imdb_link' => [
'control_type' => 'kadence_text_control',
'section' => 'general_social',
'sanitize' => 'esc_url_raw',
'default' => kadence()->default( 'imdb_link' ),
'label' => esc_html__( 'IMDB', 'kadence' ),
],
'imgur_link' => [
'control_type' => 'kadence_text_control',
'section' => 'general_social',
'sanitize' => 'esc_url_raw',
'default' => kadence()->default( 'imgur_link' ),
'label' => esc_html__( 'Imgur', 'kadence' ),
],
'line_link' => [
'control_type' => 'kadence_text_control',
'section' => 'general_social',
'sanitize' => 'esc_url_raw',
'default' => kadence()->default( 'line_link' ),
'label' => esc_html__( 'Line', 'kadence' ),
],
'linkedin_link' => [
'control_type' => 'kadence_text_control',
'section' => 'general_social',
'sanitize' => 'esc_url_raw',
'default' => kadence()->default( 'linkedin_link' ),
'label' => esc_html__( 'Linkedin', 'kadence' ),
],
'mastodon_link' => [
'control_type' => 'kadence_text_control',
'section' => 'general_social',
'sanitize' => 'esc_url_raw',
'default' => kadence()->default( 'mastodon_link' ),
'label' => esc_html__( 'Mastodon', 'kadence' ),
],
'medium_link' => [
'control_type' => 'kadence_text_control',
'section' => 'general_social',
'sanitize' => 'esc_url_raw',
'default' => kadence()->default( 'medium_link' ),
'label' => esc_html__( 'medium', 'kadence' ),
],
'mewe_link' => [
'control_type' => 'kadence_text_control',
'section' => 'general_social',
'sanitize' => 'esc_url_raw',
'default' => kadence()->default( 'mewe_link' ),
'label' => esc_html__( 'MeWe', 'kadence' ),
],
'parler_link' => [
'control_type' => 'kadence_text_control',
'section' => 'general_social',
'sanitize' => 'esc_url_raw',
'default' => kadence()->default( 'parler_link' ),
'label' => esc_html__( 'Parler', 'kadence' ),
],
'patreon_link' => [
'control_type' => 'kadence_text_control',
'section' => 'general_social',
'sanitize' => 'esc_url_raw',
'default' => kadence()->default( 'patreon_link' ),
'label' => esc_html__( 'Patreon', 'kadence' ),
],
'phone_link' => [
'control_type' => 'kadence_text_control',
'section' => 'general_social',
'sanitize' => 'sanitize_text_field',
'default' => kadence()->default( 'phone_link' ),
'label' => esc_html__( 'Phone', 'kadence' ),
],
'quora_link' => [
'control_type' => 'kadence_text_control',
'section' => 'general_social',
'sanitize' => 'esc_url_raw',
'default' => kadence()->default( 'quora_link' ),
'label' => esc_html__( 'Quora', 'kadence' ),
],
'ravelry_link' => [
'control_type' => 'kadence_text_control',
'section' => 'general_social',
'sanitize' => 'esc_url_raw',
'default' => kadence()->default( 'ravelry_link' ),
'label' => esc_html__( 'Ravelry', 'kadence' ),
],
'reddit_link' => [
'control_type' => 'kadence_text_control',
'section' => 'general_social',
'sanitize' => 'esc_url_raw',
'default' => kadence()->default( 'reddit_link' ),
'label' => esc_html__( 'Reddit', 'kadence' ),
],
'rss_link' => [
'control_type' => 'kadence_text_control',
'section' => 'general_social',
'sanitize' => 'esc_url_raw',
'default' => kadence()->default( 'rss_link' ),
'label' => esc_html__( 'RSS', 'kadence' ),
],
'rumble_link' => [
'control_type' => 'kadence_text_control',
'section' => 'general_social',
'sanitize' => 'esc_url_raw',
'default' => kadence()->default( 'rumble_link' ),
'label' => esc_html__( 'Rumble', 'kadence' ),
],
'snapchat_link' => [
'control_type' => 'kadence_text_control',
'section' => 'general_social',
'sanitize' => 'esc_url_raw',
'default' => kadence()->default( 'snapchat_link' ),
'label' => esc_html__( 'Snapchat', 'kadence' ),
],
'soundcloud_link' => [
'control_type' => 'kadence_text_control',
'section' => 'general_social',
'sanitize' => 'esc_url_raw',
'default' => kadence()->default( 'soundcloud_link' ),
'label' => esc_html__( 'SoundCloud', 'kadence' ),
],
'spotify_link' => [
'control_type' => 'kadence_text_control',
'section' => 'general_social',
'sanitize' => 'esc_url_raw',
'default' => kadence()->default( 'spotify_link' ),
'label' => esc_html__( 'Spotify', 'kadence' ),
],
'steam_link' => [
'control_type' => 'kadence_text_control',
'section' => 'general_social',
'sanitize' => 'esc_url_raw',
'default' => kadence()->default( 'steam_link' ),
'label' => esc_html__( 'Steam', 'kadence' ),
],
'strava_link' => [
'control_type' => 'kadence_text_control',
'section' => 'general_social',
'sanitize' => 'esc_url_raw',
'default' => kadence()->default( 'strava_link' ),
'label' => esc_html__( 'Strava', 'kadence' ),
],
'telegram_link' => [
'control_type' => 'kadence_text_control',
'section' => 'general_social',
'sanitize' => 'esc_url_raw',
'default' => kadence()->default( 'telegram_link' ),
'label' => esc_html__( 'Telegram', 'kadence' ),
],
'threads_link' => [
'control_type' => 'kadence_text_control',
'section' => 'general_social',
'sanitize' => 'esc_url_raw',
'default' => kadence()->default( 'threads_link' ),
'label' => esc_html__( 'Threads', 'kadence' ),
],
'tiktok_link' => [
'control_type' => 'kadence_text_control',
'section' => 'general_social',
'sanitize' => 'esc_url_raw',
'default' => kadence()->default( 'tiktok_link' ),
'label' => esc_html__( 'Tiktok', 'kadence' ),
],
'trip_advisor_link' => [
'control_type' => 'kadence_text_control',
'section' => 'general_social',
'sanitize' => 'esc_url_raw',
'default' => kadence()->default( 'trip_advisor_link' ),
'label' => esc_html__( 'Trip Advisor', 'kadence' ),
],
'tumblr_link' => [
'control_type' => 'kadence_text_control',
'section' => 'general_social',
'sanitize' => 'esc_url_raw',
'default' => kadence()->default( 'tumblr_link' ),
'label' => esc_html__( 'Tumblr', 'kadence' ),
],
'twitch_link' => [
'control_type' => 'kadence_text_control',
'section' => 'general_social',
'sanitize' => 'esc_url_raw',
'default' => kadence()->default( 'twitch_link' ),
'label' => esc_html__( 'Twitch', 'kadence' ),
],
'vero_link' => [
'control_type' => 'kadence_text_control',
'section' => 'general_social',
'sanitize' => 'esc_url_raw',
'default' => kadence()->default( 'vero_link' ),
'label' => esc_html__( 'Vero', 'kadence' ),
],
'vimeo_link' => [
'control_type' => 'kadence_text_control',
'section' => 'general_social',
'sanitize' => 'esc_url_raw',
'default' => kadence()->default( 'vimeo_link' ),
'label' => esc_html__( 'Vimeo', 'kadence' ),
],
'vk_link' => [
'control_type' => 'kadence_text_control',
'section' => 'general_social',
'sanitize' => 'esc_url_raw',
'default' => kadence()->default( 'vk_link' ),
'label' => esc_html__( 'VK', 'kadence' ),
],
'whatsapp_link' => [
'control_type' => 'kadence_text_control',
'section' => 'general_social',
'sanitize' => 'esc_url_raw',
'default' => kadence()->default( 'whatsapp_link' ),
'label' => esc_html__( 'WhatsApp', 'kadence' ),
],
'wordpress_link' => [
'control_type' => 'kadence_text_control',
'section' => 'general_social',
'sanitize' => 'esc_url_raw',
'default' => kadence()->default( 'wordpress_link' ),
'label' => esc_html__( 'WordPress', 'kadence' ),
],
'xing_link' => [
'control_type' => 'kadence_text_control',
'section' => 'general_social',
'sanitize' => 'esc_url_raw',
'default' => kadence()->default( 'xing_link' ),
'label' => esc_html__( 'Xing', 'kadence' ),
],
'yelp_link' => [
'control_type' => 'kadence_text_control',
'section' => 'general_social',
'sanitize' => 'esc_url_raw',
'default' => kadence()->default( 'yelp_link' ),
'label' => esc_html__( 'Yelp', 'kadence' ),
],
'custom1_link' => [
'control_type' => 'kadence_text_control',
'section' => 'general_social',
'sanitize' => 'esc_url_raw',
'default' => kadence()->default( 'custom1_link' ),
'label' => esc_html__( 'Custom 1', 'kadence' ),
],
'custom2_link' => [
'control_type' => 'kadence_text_control',
'section' => 'general_social',
'sanitize' => 'esc_url_raw',
'default' => kadence()->default( 'custom2_link' ),
'label' => esc_html__( 'Custom 2', 'kadence' ),
],
'custom3_link' => [
'control_type' => 'kadence_text_control',
'section' => 'general_social',
'sanitize' => 'esc_url_raw',
'default' => kadence()->default( 'custom3_link' ),
'label' => esc_html__( 'Custom 3', 'kadence' ),
],
];
Theme_Customizer::add_settings( $settings );

View File

@@ -0,0 +1,313 @@
<?php
/**
* Header Builder Options
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
Theme_Customizer::add_settings(
array(
// 'load_font_pairing' => array(
// 'control_type' => 'kadence_font_pairing',
// 'section' => 'general_typography',
// 'label' => esc_html__( 'Font Pairings', 'kadence' ),
// 'settings' => false,
// ),
'base_font' => array(
'control_type' => 'kadence_typography_control',
'section' => 'general_typography',
'label' => esc_html__( 'Base Font', 'kadence' ),
'default' => kadence()->default( 'base_font' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => 'body',
'property' => 'font',
'key' => 'typography',
),
array(
'id' => 'base_font_family',
'type' => 'css',
'property' => '--global-body-font-family',
'selector' => 'body',
'pattern' => '$',
'key' => 'family',
),
),
'input_attrs' => array(
'id' => 'base_font',
'canInherit' => false,
),
),
'load_base_italic' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'general_typography',
'default' => kadence()->default( 'load_base_italic' ),
'label' => esc_html__( 'Load Italics Font Styles', 'kadence' ),
'context' => array(
array(
'setting' => 'base_font',
'operator' => 'load_italic',
'value' => 'true',
),
),
),
'info_heading' => array(
'control_type' => 'kadence_title_control',
'section' => 'general_typography',
'label' => esc_html__( 'Headings', 'kadence' ),
'settings' => false,
),
'heading_font' => array(
'control_type' => 'kadence_typography_control',
'section' => 'general_typography',
'label' => esc_html__( 'Heading Font Family', 'kadence' ),
'default' => kadence()->default( 'heading_font' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => 'h1,h2,h3,h4,h5,h6',
'property' => 'font',
'key' => 'family',
),
array(
'type' => 'css',
'property' => '--global-heading-font-family',
'selector' => 'body',
'pattern' => '$',
'key' => 'family',
),
),
'input_attrs' => array(
'id' => 'heading_font',
'options' => 'family',
),
),
'h1_font' => array(
'control_type' => 'kadence_typography_control',
'section' => 'general_typography',
'label' => esc_html__( 'H1 Font', 'kadence' ),
'default' => kadence()->default( 'h1_font' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => 'h1',
'property' => 'font',
'key' => 'typography',
),
),
'input_attrs' => array(
'id' => 'h1_font',
'headingInherit' => true,
),
),
'h2_font' => array(
'control_type' => 'kadence_typography_control',
'section' => 'general_typography',
'label' => esc_html__( 'H2 Font', 'kadence' ),
'default' => kadence()->default( 'h2_font' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => 'h2',
'property' => 'font',
'key' => 'typography',
),
),
'input_attrs' => array(
'id' => 'h2_font',
'headingInherit' => true,
),
),
'h3_font' => array(
'control_type' => 'kadence_typography_control',
'section' => 'general_typography',
'label' => esc_html__( 'H3 Font', 'kadence' ),
'default' => kadence()->default( 'h3_font' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => 'h3',
'property' => 'font',
'key' => 'typography',
),
),
'input_attrs' => array(
'id' => 'h3_font',
'headingInherit' => true,
),
),
'h4_font' => array(
'control_type' => 'kadence_typography_control',
'section' => 'general_typography',
'label' => esc_html__( 'H4 Font', 'kadence' ),
'default' => kadence()->default( 'h4_font' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => 'h4',
'property' => 'font',
'key' => 'typography',
),
),
'input_attrs' => array(
'id' => 'h4_font',
'headingInherit' => true,
),
),
'h5_font' => array(
'control_type' => 'kadence_typography_control',
'section' => 'general_typography',
'label' => esc_html__( 'H5 Font', 'kadence' ),
'default' => kadence()->default( 'h5_font' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => 'h5',
'property' => 'font',
'key' => 'typography',
),
),
'input_attrs' => array(
'id' => 'h5_font',
'headingInherit' => true,
),
),
'h6_font' => array(
'control_type' => 'kadence_typography_control',
'section' => 'general_typography',
'label' => esc_html__( 'H6 Font', 'kadence' ),
'default' => kadence()->default( 'h6_font' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => 'h6',
'property' => 'font',
'key' => 'typography',
),
),
'input_attrs' => array(
'id' => 'h6_font',
'headingInherit' => true,
),
),
'info_above_title_heading' => array(
'control_type' => 'kadence_title_control',
'section' => 'general_typography',
'label' => esc_html__( 'Title Above Content', 'kadence' ),
'settings' => false,
),
'title_above_font' => array(
'control_type' => 'kadence_typography_control',
'section' => 'general_typography',
'label' => esc_html__( 'H1 Title', 'kadence' ),
'default' => kadence()->default( 'title_above_font' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => '.entry-hero h1',
'property' => 'font',
'key' => 'typography',
),
),
'input_attrs' => array(
'id' => 'title_above_font',
'headingInherit' => true,
),
),
'title_above_breadcrumb_font' => array(
'control_type' => 'kadence_typography_control',
'section' => 'general_typography',
'label' => esc_html__( 'Breadcrumbs', 'kadence' ),
'default' => kadence()->default( 'title_above_breadcrumb_font' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => '.entry-hero .kadence-breadcrumbs',
'property' => 'font',
'key' => 'typography',
),
),
'input_attrs' => array(
'id' => 'title_above_breadcrumb_font',
),
),
'font_rendering' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'general_typography',
'transport' => 'refresh',
'default' => kadence()->default( 'font_rendering' ),
'label' => esc_html__( 'Enable Font Smoothing', 'kadence' ),
),
'google_subsets' => array(
'control_type' => 'kadence_check_icon_control',
'section' => 'general_typography',
'sanitize' => 'kadence_sanitize_google_subsets',
'priority' => 20,
'default' => array(),
'label' => esc_html__( 'Google Font Subsets', 'kadence' ),
'input_attrs' => array(
'options' => array(
'latin-ext' => array(
'name' => __( 'Latin Extended', 'kadence' ),
),
'cyrillic' => array(
'name' => __( 'Cyrillic', 'kadence' ),
),
'cyrillic-ext' => array(
'name' => __( 'Cyrillic Extended', 'kadence' ),
),
'greek' => array(
'name' => __( 'Greek', 'kadence' ),
),
'greek-ext' => array(
'name' => __( 'Greek Extended', 'kadence' ),
),
'vietnamese' => array(
'name' => __( 'Vietnamese', 'kadence' ),
),
'arabic' => array(
'name' => __( 'Arabic', 'kadence' ),
),
'khmer' => array(
'name' => __( 'Khmer', 'kadence' ),
),
'chinese' => array(
'name' => __( 'Chinese', 'kadence' ),
),
'chinese-simplified' => array(
'name' => __( 'Chinese Simplified', 'kadence' ),
),
'tamil' => array(
'name' => __( 'Tamil', 'kadence' ),
),
'bengali' => array(
'name' => __( 'Bengali', 'kadence' ),
),
'devanagari' => array(
'name' => __( 'Devanagari', 'kadence' ),
),
'hebrew' => array(
'name' => __( 'Hebrew', 'kadence' ),
),
'korean' => array(
'name' => __( 'Korean', 'kadence' ),
),
'thai' => array(
'name' => __( 'Thai', 'kadence' ),
),
'telugu' => array(
'name' => __( 'Telugu', 'kadence' ),
),
),
),
),
)
);

View File

@@ -0,0 +1,273 @@
<?php
/**
* Header Top Row Options
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
ob_start(); ?>
<div class="kadence-compontent-tabs nav-tab-wrapper wp-clearfix">
<a href="#" class="nav-tab kadence-general-tab kadence-compontent-tabs-button nav-tab-active" data-tab="general">
<span><?php esc_html_e( 'General', 'kadence' ); ?></span>
</a>
<a href="#" class="nav-tab kadence-design-tab kadence-compontent-tabs-button" data-tab="design">
<span><?php esc_html_e( 'Design', 'kadence' ); ?></span>
</a>
</div>
<?php
$compontent_tabs = ob_get_clean();
$settings = array(
'header_bottom_tabs' => array(
'control_type' => 'kadence_blank_control',
'section' => 'header_bottom',
'settings' => false,
'priority' => 1,
'description' => $compontent_tabs,
),
'header_bottom_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'header_bottom',
'priority' => 4,
'default' => kadence()->default( 'header_bottom_layout' ),
'label' => esc_html__( 'Layout', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => array(
'desktop' => '.site-bottom-header-wrap',
'tablet' => '#mobile-header .site-bottom-header-wrap',
'mobile' => '#mobile-header .site-bottom-header-wrap',
),
'pattern' => array(
'desktop' => 'site-header-row-layout-$',
'tablet' => 'site-header-row-tablet-layout-$',
'mobile' => 'site-header-row-mobile-layout-$',
),
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'standard' => array(
'tooltip' => __( 'Background Fullwidth, Content Contained', 'kadence' ),
'name' => __( 'Standard', 'kadence' ),
'icon' => '',
),
'fullwidth' => array(
'tooltip' => __( 'Background & Content Fullwidth', 'kadence' ),
'name' => __( 'Fullwidth', 'kadence' ),
'icon' => '',
),
'contained' => array(
'tooltip' => __( 'Background & Content Contained', 'kadence' ),
'name' => __( 'Contained', 'kadence' ),
'icon' => '',
),
),
),
),
'header_bottom_height' => array(
'control_type' => 'kadence_range_control',
'section' => 'header_bottom',
'priority' => 5,
'label' => esc_html__( 'Min Height', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#masthead .site-bottom-header-inner-wrap',
'property' => 'min-height',
'pattern' => '$',
'key' => 'size',
),
),
'default' => kadence()->default( 'header_bottom_height' ),
'input_attrs' => array(
'min' => array(
'px' => 0,
'em' => 0,
'rem' => 0,
'vh' => 0,
),
'max' => array(
'px' => 400,
'em' => 12,
'rem' => 12,
'vh' => 40,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
'vh' => 1,
),
'units' => array( 'px', 'em', 'rem', 'vh' ),
),
),
'header_bottom_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'header_bottom',
'label' => esc_html__( 'Bottom Row Background', 'kadence' ),
'default' => kadence()->default( 'header_bottom_background' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => '.site-bottom-header-wrap .site-header-row-container-inner',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Main Row Background', 'kadence' ),
),
),
'header_bottom_border' => array(
'control_type' => 'kadence_borders_control',
'section' => 'header_bottom',
'label' => esc_html__( 'Border', 'kadence' ),
'default' => kadence()->default( 'header_bottom_border' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
),
'settings' => array(
'border_top' => 'header_bottom_top_border',
'border_bottom' => 'header_bottom_bottom_border',
),
'live_method' => array(
'header_bottom_top_border' => array(
array(
'type' => 'css_border',
'selector' => array(
'desktop' => '.site-bottom-header-wrap .site-header-row-container-inner',
'tablet' => '#mobile-header .site-bottom-header-wrap .site-header-row-container-inner',
'mobile' => '#mobile-header .site-bottom-header-wrap .site-header-row-container-inner',
),
'pattern' => array(
'desktop' => '$',
'tablet' => '$',
'mobile' => '$',
),
'property' => 'border-top',
'pattern' => '$',
'key' => 'border',
),
),
'header_bottom_bottom_border' => array(
array(
'type' => 'css_border',
'selector' => array(
'desktop' => '.site-bottom-header-wrap .site-header-row-container-inner',
'tablet' => '#mobile-header .site-bottom-header-wrap .site-header-row-container-inner',
'mobile' => '#mobile-header .site-bottom-header-wrap .site-header-row-container-inner',
),
'pattern' => array(
'desktop' => '$',
'tablet' => '$',
'mobile' => '$',
),
'property' => 'border-bottom',
'pattern' => '$',
'key' => 'border',
),
),
),
),
'header_bottom_trans_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'header_bottom',
'label' => esc_html__( '(When Transparent Header) Bottom Row Background', 'kadence' ),
'default' => kadence()->default( 'header_bottom_trans_background' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
array(
'setting' => 'transparent_header_enable',
'operator' => '=',
'value' => true,
),
),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => '.transparent-header #masthead .site-bottom-header-wrap .site-header-row-container-inner',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Transparent Header Bottom Row Background', 'kadence' ),
),
),
'header_bottom_padding' => array(
'control_type' => 'kadence_measure_control',
'section' => 'header_bottom',
'default' => kadence()->default( 'header_bottom_padding' ),
'label' => esc_html__( 'Padding', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.site-bottom-header-wrap .site-header-row-container-inner>.site-container',
'property' => 'padding',
'pattern' => '$',
'key' => 'measure',
),
),
'input_attrs' => array(
'min' => array(
'px' => 0,
'em' => 0,
'rem' => 0,
),
'max' => array(
'px' => 100,
'em' => 6,
'rem' => 6,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
),
'units' => array( 'px', 'em', 'rem' ),
'responsive' => true,
),
),
);
Theme_Customizer::add_settings( $settings );

View File

@@ -0,0 +1,394 @@
<?php
/**
* Header Builder Options
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
ob_start(); ?>
<div class="kadence-build-tabs nav-tab-wrapper wp-clearfix">
<a href="#" class="nav-tab preview-desktop kadence-build-tabs-button" data-device="desktop">
<span class="dashicons dashicons-desktop"></span>
<span><?php esc_html_e( 'Desktop', 'kadence' ); ?></span>
</a>
<a href="#" class="nav-tab preview-tablet preview-mobile kadence-build-tabs-button" data-device="tablet">
<span class="dashicons dashicons-smartphone"></span>
<span><?php esc_html_e( 'Tablet / Mobile', 'kadence' ); ?></span>
</a>
</div>
<span class="button button-secondary kadence-builder-hide-button kadence-builder-tab-toggle"><span class="dashicons dashicons-no"></span><?php esc_html_e( 'Hide', 'kadence' ); ?></span>
<span class="button button-secondary kadence-builder-show-button kadence-builder-tab-toggle"><span class="dashicons dashicons-edit"></span><?php esc_html_e( 'Header Builder', 'kadence' ); ?></span>
<?php
$builder_tabs = ob_get_clean();
ob_start();
?>
<div class="kadence-compontent-tabs nav-tab-wrapper wp-clearfix">
<a href="#" class="nav-tab kadence-general-tab kadence-compontent-tabs-button nav-tab-active" data-tab="general">
<span><?php esc_html_e( 'General', 'kadence' ); ?></span>
</a>
<a href="#" class="nav-tab kadence-design-tab kadence-compontent-tabs-button" data-tab="design">
<span><?php esc_html_e( 'Design', 'kadence' ); ?></span>
</a>
</div>
<?php
$compontent_tabs = ob_get_clean();
$settings = array(
'header_builder' => array(
'control_type' => 'kadence_blank_control',
'section' => 'header_builder',
'settings' => false,
'description' => $builder_tabs,
'context' => array(
array(
'setting' => 'blocks_header',
'operator' => '!=',
'value' => true,
),
),
),
'header_desktop_items' => array(
'control_type' => 'kadence_builder_control',
'section' => 'header_builder',
'default' => kadence()->default( 'header_desktop_items' ),
'context' => array(
array(
'setting' => '__device',
'value' => 'desktop',
),
array(
'setting' => 'blocks_header',
'operator' => '!=',
'value' => true,
),
),
'partial' => array(
'selector' => '#masthead',
'container_inclusive' => true,
'render_callback' => 'Kadence\header_markup',
),
'choices' => array(
'logo' => array(
'name' => esc_html__( 'Logo', 'kadence' ),
'section' => 'title_tagline',
),
'navigation' => array(
'name' => esc_html__( 'Primary Navigation', 'kadence' ),
'section' => 'kadence_customizer_primary_navigation',
),
'navigation-2' => array(
'name' => esc_html__( 'Secondary Navigation', 'kadence' ),
'section' => 'kadence_customizer_secondary_navigation',
),
'search' => array(
'name' => esc_html__( 'Search', 'kadence' ),
'section' => 'kadence_customizer_header_search',
),
'button' => array(
'name' => esc_html__( 'Button', 'kadence' ),
'section' => 'kadence_customizer_header_button',
),
'social' => array(
'name' => esc_html__( 'Social', 'kadence' ),
'section' => 'kadence_customizer_header_social',
),
'html' => array(
'name' => esc_html__( 'HTML', 'kadence' ),
'section' => 'kadence_customizer_header_html',
),
),
'input_attrs' => array(
'group' => 'header_desktop_items',
'rows' => array( 'top', 'main', 'bottom' ),
'zones' => array(
'top' => array(
'top_left' => is_rtl() ? esc_html__( 'Top - Right', 'kadence' ) : esc_html__( 'Top - Left', 'kadence' ),
'top_left_center' => is_rtl() ? esc_html__( 'Top - Right Center', 'kadence' ) : esc_html__( 'Top - Left Center', 'kadence' ),
'top_center' => esc_html__( 'Top - Center', 'kadence' ),
'top_right_center' => is_rtl() ? esc_html__( 'Top - Left Center', 'kadence' ) : esc_html__( 'Top - Right Center', 'kadence' ),
'top_right' => is_rtl() ? esc_html__( 'Top - Left', 'kadence' ) : esc_html__( 'Top - Right', 'kadence' ),
),
'main' => array(
'main_left' => is_rtl() ? esc_html__( 'Main - Right', 'kadence' ) : esc_html__( 'Main - Left', 'kadence' ),
'main_left_center' => is_rtl() ? esc_html__( 'Main - Right Center', 'kadence' ) : esc_html__( 'Main - Left Center', 'kadence' ),
'main_center' => esc_html__( 'Main - Center', 'kadence' ),
'main_right_center' => is_rtl() ? esc_html__( 'Main - Left Center', 'kadence' ) : esc_html__( 'Main - Right Center', 'kadence' ),
'main_right' => is_rtl() ? esc_html__( 'Main - Left', 'kadence' ) : esc_html__( 'Main - Right', 'kadence' ),
),
'bottom' => array(
'bottom_left' => is_rtl() ? esc_html__( 'Bottom - Right', 'kadence' ) : esc_html__( 'Bottom - Left', 'kadence' ),
'bottom_left_center' => is_rtl() ? esc_html__( 'Bottom - Right Center', 'kadence' ) : esc_html__( 'Bottom - Left Center', 'kadence' ),
'bottom_center' => esc_html__( 'Bottom - Center', 'kadence' ),
'bottom_right_center' => is_rtl() ? esc_html__( 'Bottom - Left Center', 'kadence' ) : esc_html__( 'Bottom - Right Center', 'kadence' ),
'bottom_right' => is_rtl() ? esc_html__( 'Bottom - Left', 'kadence' ) : esc_html__( 'Bottom - Right', 'kadence' ),
),
),
),
),
'header_tab_settings' => array(
'control_type' => 'kadence_blank_control',
'section' => 'header_layout',
'settings' => false,
'priority' => 1,
'description' => $compontent_tabs,
'context' => array(
array(
'setting' => 'blocks_header',
'operator' => '!=',
'value' => true,
),
),
),
'header_desktop_available_items' => array(
'control_type' => 'kadence_available_control',
'section' => 'header_layout',
'settings' => false,
'input_attrs' => array(
'group' => 'header_desktop_items',
'zones' => array( 'top', 'main', 'bottom' ),
),
'context' => array(
array(
'setting' => '__device',
'value' => 'desktop',
),
array(
'setting' => '__current_tab',
'value' => 'general',
),
array(
'setting' => 'blocks_header',
'operator' => '!=',
'value' => true,
),
),
),
'header_mobile_items' => array(
'control_type' => 'kadence_builder_control',
'section' => 'header_builder',
'transport' => 'refresh',
'default' => kadence()->default( 'header_mobile_items' ),
'context' => array(
array(
'setting' => '__device',
'operator' => 'in',
'value' => array( 'tablet', 'mobile' ),
),
array(
'setting' => 'blocks_header',
'operator' => '!=',
'value' => true,
),
),
'partial' => array(
'selector' => '#mobile-header',
'container_inclusive' => true,
'render_callback' => 'Kadence\mobile_header',
),
'choices' => array(
'mobile-logo' => array(
'name' => esc_html__( 'Logo', 'kadence' ),
'section' => 'title_tagline',
),
'mobile-navigation' => array(
'name' => esc_html__( 'Mobile Navigation', 'kadence' ),
'section' => 'kadence_customizer_mobile_navigation',
),
// 'mobile-navigation2' => array(
// 'name' => esc_html__( 'Horizontal Navigation', 'kadence' ),
// 'section' => 'mobile_horizontal_navigation',
// ),
'search' => array(
'name' => esc_html__( 'Search Toggle', 'kadence' ),
'section' => 'kadence_customizer_header_search',
),
'mobile-button' => array(
'name' => esc_html__( 'Button', 'kadence' ),
'section' => 'kadence_customizer_mobile_button',
),
'mobile-social' => array(
'name' => esc_html__( 'Social', 'kadence' ),
'section' => 'kadence_customizer_mobile_social',
),
'mobile-html' => array(
'name' => esc_html__( 'HTML', 'kadence' ),
'section' => 'kadence_customizer_mobile_html',
),
'popup-toggle' => array(
'name' => esc_html__( 'Trigger', 'kadence' ),
'section' => 'kadence_customizer_mobile_trigger',
),
),
'input_attrs' => array(
'group' => 'header_mobile_items',
'rows' => array( 'popup', 'top', 'main', 'bottom' ),
'zones' => array(
'popup' => array(
'popup_content' => esc_html__( 'Popup Content', 'kadence' ),
),
'top' => array(
'top_left' => is_rtl() ? esc_html__( 'Top - Right', 'kadence' ) : esc_html__( 'Top - Left', 'kadence' ),
'top_center' => esc_html__( 'Top - Center', 'kadence' ),
'top_right' => is_rtl() ? esc_html__( 'Top - Left', 'kadence' ) : esc_html__( 'Top - Right', 'kadence' ),
),
'main' => array(
'main_left' => is_rtl() ? esc_html__( 'Main - Right', 'kadence' ) : esc_html__( 'Main - Left', 'kadence' ),
'main_center' => esc_html__( 'Main - Center', 'kadence' ),
'main_right' => is_rtl() ? esc_html__( 'Main - Left', 'kadence' ) : esc_html__( 'Main - Right', 'kadence' ),
),
'bottom' => array(
'bottom_left' => is_rtl() ? esc_html__( 'Bottom - Right', 'kadence' ) : esc_html__( 'Bottom - Left', 'kadence' ),
'bottom_center' => esc_html__( 'Bottom - Center', 'kadence' ),
'bottom_right' => is_rtl() ? esc_html__( 'Bottom - Left', 'kadence' ) : esc_html__( 'Bottom - Right', 'kadence' ),
),
),
),
),
'header_mobile_available_items' => array(
'control_type' => 'kadence_available_control',
'section' => 'header_layout',
'settings' => false,
'input_attrs' => array(
'group' => 'header_mobile_items',
'zones' => array( 'popup', 'top', 'main', 'bottom' ),
),
'context' => array(
array(
'setting' => '__device',
'operator' => 'in',
'value' => array( 'tablet', 'mobile' ),
),
array(
'setting' => '__current_tab',
'value' => 'general',
),
array(
'setting' => 'blocks_header',
'operator' => '!=',
'value' => true,
),
),
),
'header_transparent_link' => array(
'control_type' => 'kadence_focus_button_control',
'section' => 'header_layout',
'settings' => false,
'priority' => 20,
'label' => esc_html__( 'Transparent Header', 'kadence' ),
'input_attrs' => array(
'section' => 'kadence_customizer_transparent_header',
),
'context' => array(
array(
'setting' => 'blocks_header',
'operator' => '!=',
'value' => true,
),
),
),
'header_sticky_link' => array(
'control_type' => 'kadence_focus_button_control',
'section' => 'header_layout',
'settings' => false,
'priority' => 20,
'label' => esc_html__( 'Sticky Header', 'kadence' ),
'input_attrs' => array(
'section' => 'kadence_customizer_header_sticky',
),
'context' => array(
array(
'setting' => 'blocks_header',
'operator' => '!=',
'value' => true,
),
),
),
'header_wrap_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'header_layout',
'label' => esc_html__( 'Header Background', 'kadence' ),
'default' => kadence()->default( 'header_wrap_background' ),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => '#masthead',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
),
'input_attrs' => array(
'tooltip' => __( 'Header Background', 'kadence' ),
),
),
'header_mobile_switch' => array(
'control_type' => 'kadence_range_control',
'section' => 'header_layout',
'transport' => 'refresh',
'label' => esc_html__( 'Screen size to switch to mobile header', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
),
'default' => kadence()->default( 'header_mobile_switch' ),
'input_attrs' => array(
'min' => array(
'px' => 0,
),
'max' => array(
'px' => 4000,
),
'step' => array(
'px' => 1,
),
'units' => array( 'px' ),
'responsive' => false,
),
),
);
if ( defined( 'KADENCE_BLOCKS_VERSION' ) && version_compare( KADENCE_BLOCKS_VERSION, '3.3.0', '>=' ) ) {
$settings['blocks_header'] = array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'header_layout',
'priority' => 30,
'description' => esc_html__( 'Enable Block Header', 'kadence' ),
'default' => kadence()->default( 'blocks_header' ),
'label' => esc_html__( 'Enable Block Header', 'kadence' ),
'transport' => 'refresh',
);
$settings['blocks_header_id'] = array(
'control_type' => 'kadence_select_control',
'section' => 'header_layout',
'label' => esc_html__( 'Header Block', 'kadence' ),
'transport' => 'refresh',
'priority' => 30,
'default' => kadence()->default( 'blocks_header_id' ),
'input_attrs' => array(
'options' => kadence()->block_header_options(),
),
'context' => array(
array(
'setting' => 'blocks_header',
'operator' => '=',
'value' => true,
),
),
);
} else {
$settings['blocks_header'] = array();
}
Theme_Customizer::add_settings( $settings );

View File

@@ -0,0 +1,446 @@
<?php
/**
* Header Main Row Options
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
Theme_Customizer::add_settings(
array(
'header_button_tabs' => array(
'control_type' => 'kadence_tab_control',
'section' => 'header_button',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'header_button',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'header_button_design',
),
'active' => 'general',
),
),
'header_button_tabs_design' => array(
'control_type' => 'kadence_tab_control',
'section' => 'header_button_design',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'header_button',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'header_button_design',
),
'active' => 'design',
),
),
'header_button_label' => array(
'control_type' => 'kadence_text_control',
'section' => 'header_button',
'sanitize' => 'sanitize_text_field',
'priority' => 4,
'label' => esc_html__( 'Label', 'kadence' ),
'default' => kadence()->default( 'header_button_label' ),
'live_method' => array(
array(
'type' => 'html',
'selector' => '#main-header .header-button',
'pattern' => '$',
'key' => '',
),
),
),
'header_button_link' => array(
'control_type' => 'kadence_text_control',
'section' => 'header_button',
'sanitize' => 'esc_url_raw',
'label' => esc_html__( 'URL', 'kadence' ),
'priority' => 4,
'default' => kadence()->default( 'header_button_link' ),
'partial' => array(
'selector' => '.header-button-wrap',
'container_inclusive' => true,
'render_callback' => 'Kadence\header_button',
),
),
'header_button_target' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'header_button',
'priority' => 6,
'default' => kadence()->default( 'header_button_target' ),
'label' => esc_html__( 'Open in New Tab?', 'kadence' ),
),
'header_button_nofollow' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'header_button',
'priority' => 6,
'default' => kadence()->default( 'header_button_nofollow' ),
'label' => esc_html__( 'Set link to nofollow?', 'kadence' ),
),
'header_button_sponsored' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'header_button',
'priority' => 6,
'default' => kadence()->default( 'header_button_sponsored' ),
'label' => esc_html__( 'Set link attribute Sponsored?', 'kadence' ),
),
'header_button_download' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'header_button',
'priority' => 6,
'default' => kadence()->default( 'header_button_download' ),
'label' => esc_html__( 'Set link to Download?', 'kadence' ),
),
'header_button_style' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'header_button',
'priority' => 6,
'default' => kadence()->default( 'header_button_style' ),
'label' => esc_html__( 'Button Style', 'kadence' ),
'live_method' => array(
array(
'type' => 'class',
'selector' => '#main-header .header-button',
'pattern' => 'button-style-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'filled' => array(
'name' => __( 'Filled', 'kadence' ),
),
'outline' => array(
'name' => __( 'Outline', 'kadence' ),
),
'secondary' => array(
'name' => __( 'Secondary', 'kadence' ),
),
),
'responsive' => false,
),
),
'header_button_visibility' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'header_button',
'priority' => 6,
'default' => kadence()->default( 'header_button_visibility' ),
'label' => esc_html__( 'Button Visibility', 'kadence' ),
'partial' => array(
'selector' => '.header-button-wrap',
'container_inclusive' => true,
'render_callback' => 'Kadence\header_button',
),
'input_attrs' => array(
'layout' => array(
'all' => array(
'name' => __( 'Everyone', 'kadence' ),
),
'loggedout' => array(
'name' => __( 'Logged Out Only', 'kadence' ),
),
'loggedin' => array(
'name' => __( 'Logged In Only', 'kadence' ),
),
),
'responsive' => false,
),
),
'header_button_size' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'header_button_design',
'priority' => 4,
'default' => kadence()->default( 'header_button_size' ),
'label' => esc_html__( 'Button Size', 'kadence' ),
'live_method' => array(
array(
'type' => 'class',
'selector' => '#main-header .header-button',
'pattern' => 'button-size-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'small' => array(
'name' => __( 'Sm', 'kadence' ),
),
'medium' => array(
'name' => __( 'Md', 'kadence' ),
'icon' => '',
),
'large' => array(
'name' => __( 'Lg', 'kadence' ),
'icon' => '',
),
'custom' => array(
'name' => __( 'Custom', 'kadence' ),
'icon' => '',
),
),
'responsive' => false,
),
),
'header_button_padding' => array(
'control_type' => 'kadence_measure_control',
'section' => 'header_button_design',
'priority' => 10,
'default' => kadence()->default( 'header_button_padding' ),
'label' => esc_html__( 'Padding', 'kadence' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#main-header .button-size-custom.header-button',
'property' => 'padding',
'pattern' => '$',
'key' => 'measure',
),
),
'context' => array(
array(
'setting' => 'header_button_size',
'operator' => '=',
'value' => 'custom',
),
),
'input_attrs' => array(
'responsive' => false,
),
),
'header_button_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'header_button_design',
'label' => esc_html__( 'Colors', 'kadence' ),
'default' => kadence()->default( 'header_button_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#main-header .header-button',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '#main-header .header-button:hover',
'property' => 'color',
'pattern' => '$',
'key' => 'hover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Hover Color', 'kadence' ),
'palette' => true,
),
),
),
),
'header_button_background' => array(
'control_type' => 'kadence_color_control',
'section' => 'header_button_design',
'label' => esc_html__( 'Background Colors', 'kadence' ),
'default' => kadence()->default( 'header_button_background' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#main-header .header-button',
'property' => 'background',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '#main-header .header-button:hover',
'property' => 'background',
'pattern' => '$',
'key' => 'hover',
),
),
'context' => array(
array(
'setting' => 'header_button_style',
'operator' => '=',
'value' => 'filled',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Hover Color', 'kadence' ),
'palette' => true,
),
),
),
),
'header_button_border_colors' => array(
'control_type' => 'kadence_color_control',
'section' => 'header_button_design',
'label' => esc_html__( 'Border Colors', 'kadence' ),
'default' => kadence()->default( 'header_button_border' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#main-header .header-button-wrap .header-button',
'property' => 'border-color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '#main-header .header-button-wrap .header-button:hover',
'property' => 'border-color',
'pattern' => '$',
'key' => 'hover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Hover Color', 'kadence' ),
'palette' => true,
),
),
),
),
'header_button_border' => array(
'control_type' => 'kadence_border_control',
'section' => 'header_button_design',
'label' => esc_html__( 'Border', 'kadence' ),
'default' => kadence()->default( 'header_button_border' ),
'live_method' => array(
array(
'type' => 'css_border',
'selector' => '#main-header .header-button',
'property' => 'border',
'pattern' => '$',
'key' => 'border',
),
),
'input_attrs' => array(
'responsive' => false,
'color' => false,
),
),
'header_button_radius' => array(
'control_type' => 'kadence_measure_control',
'section' => 'header_button_design',
'priority' => 10,
'default' => kadence()->default( 'header_button_radius' ),
'label' => esc_html__( 'Border Radius', 'kadence' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#main-header .header-button',
'property' => 'border-radius',
'pattern' => '$',
'key' => 'measure',
),
),
'input_attrs' => array(
'responsive' => false,
),
),
'header_button_typography' => array(
'control_type' => 'kadence_typography_control',
'section' => 'header_button_design',
'label' => esc_html__( 'Font', 'kadence' ),
'default' => kadence()->default( 'header_button_typography' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => '#main-header .header-button',
'pattern' => array(
'desktop' => '$',
'tablet' => '$',
'mobile' => '$',
),
'property' => 'font',
'key' => 'typography',
),
),
'input_attrs' => array(
'id' => 'header_button_typography',
'options' => 'no-color',
),
),
'header_button_shadow' => array(
'control_type' => 'kadence_shadow_control',
'section' => 'header_button_design',
'label' => esc_html__( 'Button Shadow', 'kadence' ),
'live_method' => array(
array(
'type' => 'css_boxshadow',
'selector' => '#main-header .header-button',
'property' => 'box-shadow',
'pattern' => '$',
'key' => '',
),
),
'default' => kadence()->default( 'header_button_shadow' ),
),
'header_button_shadow_hover' => array(
'control_type' => 'kadence_shadow_control',
'section' => 'header_button_design',
'label' => esc_html__( 'Button Hover State Shadow', 'kadence' ),
'live_method' => array(
array(
'type' => 'css_boxshadow',
'selector' => '#main-header .header-button',
'property' => 'box-shadow',
'pattern' => '$',
'key' => '',
),
),
'default' => kadence()->default( 'header_button_shadow_hover' ),
),
'header_button_margin' => array(
'control_type' => 'kadence_measure_control',
'section' => 'header_button_design',
'priority' => 10,
'default' => kadence()->default( 'header_button_margin' ),
'label' => esc_html__( 'Margin', 'kadence' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#main-header .header-button',
'property' => 'margin',
'pattern' => '$',
'key' => 'measure',
),
),
'input_attrs' => array(
'responsive' => false,
),
),
)
);

View File

@@ -0,0 +1,394 @@
<?php
/**
* Header Builder Options
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
Theme_Customizer::add_settings(
array(
'header_cart_tabs' => array(
'control_type' => 'kadence_tab_control',
'section' => 'cart',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'cart',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'cart_design',
),
'active' => 'general',
),
),
'header_cart_tabs_design' => array(
'control_type' => 'kadence_tab_control',
'section' => 'cart_design',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'cart',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'cart_design',
),
'active' => 'design',
),
),
'header_cart_label' => array(
'control_type' => 'kadence_text_control',
'section' => 'cart',
'sanitize' => 'sanitize_text_field',
'priority' => 6,
'default' => kadence()->default( 'header_cart_label' ),
'label' => esc_html__( 'Cart Label', 'kadence' ),
'live_method' => array(
array(
'type' => 'html',
'selector' => '.header-mobile-cart-wrap .header-cart-label',
'pattern' => '$',
'key' => '',
),
),
),
'header_cart_icon' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'cart',
'priority' => 10,
'default' => kadence()->default( 'header_cart_icon' ),
'label' => esc_html__( 'Cart Icon', 'kadence' ),
'partial' => array(
'selector' => '.header-cart-wrap',
'container_inclusive' => true,
'render_callback' => 'Kadence\header_cart',
),
'input_attrs' => array(
'layout' => array(
'shopping-bag' => array(
'icon' => 'shoppingBag',
),
'shopping-cart' => array(
'icon' => 'shoppingCart',
),
),
'responsive' => false,
),
),
'header_cart_style' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'cart',
'priority' => 10,
'default' => kadence()->default( 'header_cart_style' ),
'label' => esc_html__( 'Cart Click Action', 'kadence' ),
'transport' => 'refresh',
'input_attrs' => array(
'layout' => array(
'link' => array(
'name' => __( 'Link', 'kadence' ),
),
'slide' => array(
'name' => __( 'Popout Cart', 'kadence' ),
),
'dropdown' => array(
'name' => __( 'Dropdown Cart', 'kadence' ),
),
),
'responsive' => false,
),
),
'header_cart_show_total' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'cart',
'priority' => 6,
'partial' => array(
'selector' => '.header-cart-wrap',
'container_inclusive' => true,
'render_callback' => 'Kadence\header_cart',
),
'default' => kadence()->default( 'header_cart_show_total' ),
'label' => esc_html__( 'Show Item Total Indicator', 'kadence' ),
),
'header_cart_icon_size' => array(
'control_type' => 'kadence_range_control',
'section' => 'cart_design',
'label' => esc_html__( 'Icon Size', 'kadence' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.header-cart-wrap .header-cart-button .kadence-svg-iconset',
'property' => 'font-size',
'pattern' => '$',
'key' => 'size',
),
),
'default' => kadence()->default( 'header_cart_icon_size' ),
'input_attrs' => array(
'min' => array(
'px' => 0,
'em' => 0,
'rem' => 0,
),
'max' => array(
'px' => 100,
'em' => 12,
'rem' => 12,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
),
'units' => array( 'px', 'em', 'rem' ),
'responsive' => false,
),
),
'header_cart_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'cart_design',
'label' => esc_html__( 'Cart Colors', 'kadence' ),
'default' => kadence()->default( 'header_cart_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.site-header-item .header-cart-wrap .header-cart-inner-wrap .header-cart-button',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.site-header-item .header-cart-wrap .header-cart-inner-wrap .header-cart-button:hover',
'property' => 'color',
'pattern' => '$',
'key' => 'hover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Hover Color', 'kadence' ),
'palette' => true,
),
),
),
),
'header_cart_background' => array(
'control_type' => 'kadence_color_control',
'section' => 'cart_design',
'label' => esc_html__( 'Cart Background', 'kadence' ),
'default' => kadence()->default( 'header_cart_background' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.site-header-item .header-cart-wrap .header-cart-inner-wrap .header-cart-button',
'property' => 'background',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.site-header-item .header-cart-wrap .header-cart-inner-wrap .header-cart-button:hover',
'property' => 'background',
'pattern' => '$',
'key' => 'hover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Background', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Hover Background', 'kadence' ),
'palette' => true,
),
),
),
),
'header_cart_total_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'cart_design',
'label' => esc_html__( 'Cart Total Colors', 'kadence' ),
'default' => kadence()->default( 'header_cart_total_color' ),
'context' => array(
array(
'setting' => 'header_cart_show_total',
'operator' => '=',
'value' => true,
),
),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.header-cart-wrap .header-cart-button .header-cart-total',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.header-cart-wrap .header-cart-button:hover .header-cart-total',
'property' => 'color',
'pattern' => '$',
'key' => 'hover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Hover Color', 'kadence' ),
'palette' => true,
),
),
),
),
'header_cart_total_background' => array(
'control_type' => 'kadence_color_control',
'section' => 'cart_design',
'label' => esc_html__( 'Cart Total Background', 'kadence' ),
'default' => kadence()->default( 'header_cart_total_background' ),
'context' => array(
array(
'setting' => 'header_cart_show_total',
'operator' => '=',
'value' => true,
),
),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.header-cart-wrap .header-cart-button .header-cart-total',
'property' => 'background',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.header-cart-wrap .header-cart-button:hover .header-cart-total',
'property' => 'background',
'pattern' => '$',
'key' => 'hover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Background', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Hover Background', 'kadence' ),
'palette' => true,
),
),
),
),
'header_cart_typography' => array(
'control_type' => 'kadence_typography_control',
'section' => 'cart_design',
'label' => esc_html__( 'Cart Label Font', 'kadence' ),
'context' => array(
array(
'setting' => 'header_cart_label',
'operator' => '!empty',
'value' => '',
),
),
'default' => kadence()->default( 'header_cart_typography' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => '.header-cart-wrap .header-cart-button .header-cart-label',
'pattern' => array(
'desktop' => '$',
'tablet' => '$',
'mobile' => '$',
),
'property' => 'font',
'key' => 'typography',
),
),
'input_attrs' => array(
'id' => 'header_cart_typography',
'options' => 'no-color',
),
),
'header_cart_padding' => array(
'control_type' => 'kadence_measure_control',
'section' => 'cart_design',
'priority' => 10,
'default' => kadence()->default( 'header_cart_padding' ),
'label' => esc_html__( 'Cart Padding', 'kadence' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.site-header-item .header-cart-wrap .header-cart-inner-wrap .header-cart-button',
'property' => 'padding',
'pattern' => '$',
'key' => 'measure',
),
),
'input_attrs' => array(
'responsive' => false,
),
),
'header_cart_popup_side' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'cart',
'priority' => 20,
'default' => kadence()->default( 'header_cart_popup_side' ),
'label' => esc_html__( 'Slide-Out Side', 'kadence' ),
'context' => array(
array(
'setting' => 'header_cart_style',
'operator' => '=',
'value' => 'slide',
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '#cart-drawer',
'pattern' => 'popup-drawer-side-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'left' => array(
'tooltip' => __( 'Reveal from Left', 'kadence' ),
'name' => __( 'Left', 'kadence' ),
'icon' => '',
),
'right' => array(
'tooltip' => __( 'Reveal from Right', 'kadence' ),
'name' => __( 'Right', 'kadence' ),
'icon' => '',
),
),
'responsive' => false,
),
),
)
);

View File

@@ -0,0 +1,349 @@
<?php
/**
* Header Builder Options
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
Theme_Customizer::add_settings(
array(
'dropdown_navigation_tabs' => array(
'control_type' => 'kadence_tab_control',
'section' => 'dropdown_navigation',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'dropdown_navigation',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'dropdown_navigation_design',
),
'active' => 'general',
),
),
'dropdown_navigation_tabs_design' => array(
'control_type' => 'kadence_tab_control',
'section' => 'dropdown_navigation_design',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'dropdown_navigation',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'dropdown_navigation_design',
),
'active' => 'design',
),
),
'dropdown_navigation_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'dropdown_navigation_design',
'label' => esc_html__( 'Dropdown Colors', 'kadence' ),
'default' => kadence()->default( 'dropdown_navigation_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.header-navigation .header-menu-container ul ul li.menu-item > a',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.header-navigation .header-menu-container ul ul li.menu-item > a:hover',
'property' => 'color',
'pattern' => '$',
'key' => 'hover',
),
array(
'type' => 'css',
'selector' => '.header-navigation .header-menu-container ul ul > li.menu-item.current-menu-item > a, .header-navigation .header-menu-container ul ul > li.menu-item.current_page_item > a',
'property' => 'color',
'pattern' => '$',
'key' => 'active',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Hover Color', 'kadence' ),
'palette' => true,
),
'active' => array(
'tooltip' => __( 'Active Color', 'kadence' ),
'palette' => true,
),
),
),
),
'dropdown_navigation_background' => array(
'control_type' => 'kadence_color_control',
'section' => 'dropdown_navigation_design',
'priority' => 20,
'label' => esc_html__( 'Dropdown Background', 'kadence' ),
'default' => kadence()->default( 'dropdown_navigation_background' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.header-navigation .header-menu-container ul ul li.menu-item > a',
'property' => 'background',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.header-navigation .header-menu-container ul ul li.menu-item > a:hover',
'property' => 'background',
'pattern' => '$',
'key' => 'hover',
),
array(
'type' => 'css',
'selector' => '.header-navigation .header-menu-container ul ul li.menu-item.current-menu-item > a, .header-navigation .header-menu-container ul ul li.menu-item.current_page_item > a',
'property' => 'background',
'pattern' => '$',
'key' => 'active',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Background', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Hover Background', 'kadence' ),
'palette' => true,
),
'active' => array(
'tooltip' => __( 'Active Background', 'kadence' ),
'palette' => true,
),
),
),
),
'dropdown_navigation_divider' => array(
'control_type' => 'kadence_border_control',
'section' => 'dropdown_navigation_design',
'priority' => 20,
'label' => esc_html__( 'Item Divider', 'kadence' ),
'default' => kadence()->default( 'dropdown_navigation_divider' ),
'live_method' => array(
array(
'type' => 'css_border',
'selector' => '.header-navigation ul ul li.menu-item',
'pattern' => '$',
'property' => 'border-bottom',
'pattern' => '$',
'key' => 'border',
),
),
'input_attrs' => array(
'responsive' => false,
),
),
'dropdown_navigation_border_radius' => array(
'control_type' => 'kadence_measure_control',
'section' => 'dropdown_navigation_design',
'priority' => 20,
'default' => kadence()->default( 'dropdown_navigation_border_radius' ),
'label' => esc_html__( 'Border Radius', 'kadence' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.header-navigation .header-menu-container ul ul li.menu-item, .header-menu-container ul.menu > li.kadence-menu-mega-enabled > ul > li.menu-item > a',
'property' => 'border-radius',
'pattern' => '$',
'key' => 'measure',
),
array(
'type' => 'css',
'selector' => '.header-navigation .header-menu-container ul ul li.menu-item > a:hover',
'property' => 'border-radius',
'pattern' => '$',
'key' => 'measure',
),
array(
'type' => 'css',
'selector' => '.header-navigation .header-menu-container ul ul li.menu-item.current-menu-item > a',
'property' => 'border-radius',
'pattern' => '$',
'key' => 'measure',
),
),
'input_attrs' => array(
'responsive' => false,
),
),
'dropdown_navigation_typography' => array(
'control_type' => 'kadence_typography_control',
'section' => 'dropdown_navigation_design',
'priority' => 20,
'label' => esc_html__( 'Dropdown Font', 'kadence' ),
'default' => kadence()->default( 'dropdown_navigation_typography' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => '.header-navigation .header-menu-container ul ul li.menu-item > a',
'pattern' => array(
'desktop' => '$',
'tablet' => '$',
'mobile' => '$',
),
'property' => 'font',
'key' => 'typography',
),
),
'input_attrs' => array(
'id' => 'dropdown_navigation_typography',
'options' => 'no-color',
),
),
'dropdown_navigation_shadow' => array(
'control_type' => 'kadence_shadow_control',
'section' => 'dropdown_navigation_design',
'priority' => 20,
'label' => esc_html__( 'Dropdown Shadow', 'kadence' ),
'live_method' => array(
array(
'type' => 'css_boxshadow',
'selector' => '.header-navigation .header-menu-container ul ul.submenu',
'property' => 'box-shadow',
'pattern' => '$',
'key' => '',
),
),
'default' => kadence()->default( 'dropdown_navigation_shadow' ),
),
'dropdown_navigation_reveal' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'dropdown_navigation',
'priority' => 20,
'default' => kadence()->default( 'dropdown_navigation_reveal' ),
'label' => esc_html__( 'Dropdown Reveal', 'kadence' ),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.header-navigation',
'pattern' => 'header-navigation-dropdown-animation-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'none' => array(
'name' => __( 'None', 'kadence' ),
),
'fade' => array(
'name' => __( 'Fade', 'kadence' ),
),
'fade-up' => array(
'name' => __( 'Fade Up', 'kadence' ),
),
'fade-down' => array(
'name' => __( 'Fade Down', 'kadence' ),
),
),
'responsive' => false,
),
),
'dropdown_navigation_width' => array(
'control_type' => 'kadence_range_control',
'section' => 'dropdown_navigation',
'priority' => 20,
'label' => esc_html__( 'Dropdown Width', 'kadence' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.wp-site-blocks .header-navigation .header-menu-container ul ul li.menu-item > a',
'property' => 'width',
'pattern' => '$',
'key' => 'size',
),
),
'default' => kadence()->default( 'dropdown_navigation_width' ),
'input_attrs' => array(
'min' => array(
'px' => 0,
'em' => 0,
'rem' => 0,
'vw' => 0,
),
'max' => array(
'px' => 600,
'em' => 50,
'rem' => 50,
'vw' => 50,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
'vw' => 1,
),
'units' => array( 'px', 'em', 'rem', 'vw' ),
'responsive' => false,
),
),
'dropdown_navigation_vertical_spacing' => array(
'control_type' => 'kadence_range_control',
'section' => 'dropdown_navigation',
'priority' => 20,
'label' => esc_html__( 'Dropdown Items Vertical Spacing', 'kadence' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.header-navigation .header-menu-container ul ul li.menu-item > a',
'property' => 'padding-top',
'pattern' => '$',
'key' => 'size',
),
array(
'type' => 'css',
'selector' => '.header-navigation .header-menu-container ul ul li.menu-item > a',
'property' => 'padding-bottom',
'pattern' => '$',
'key' => 'size',
),
),
'default' => kadence()->default( 'dropdown_navigation_vertical_spacing' ),
'input_attrs' => array(
'min' => array(
'px' => 0,
'em' => 0,
'rem' => 0,
'vh' => 0,
),
'max' => array(
'px' => 100,
'em' => 12,
'rem' => 12,
'vh' => 12,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
'vh' => 0.01,
),
'units' => array( 'px', 'em', 'rem', 'vh' ),
'responsive' => false,
),
),
)
);

View File

@@ -0,0 +1,177 @@
<?php
/**
* Header Main Row Options
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
$settings = array(
'header_html_tabs' => array(
'control_type' => 'kadence_tab_control',
'section' => 'header_html',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'header_html',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'header_html_design',
),
'active' => 'general',
),
),
'header_html_tabs_design' => array(
'control_type' => 'kadence_tab_control',
'section' => 'header_html_design',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'header_html',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'header_html_design',
),
'active' => 'design',
),
),
'header_html_content' => array(
'control_type' => 'kadence_editor_control',
'section' => 'header_html',
'sanitize' => 'wp_kses_post',
'priority' => 4,
'default' => kadence()->default( 'header_html_content' ),
'partial' => array(
'selector' => '.header-html',
'container_inclusive' => true,
'render_callback' => 'Kadence\header_html',
),
'input_attrs' => array(
'id' => 'header_html',
),
),
'header_html_wpautop' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'header_html',
'default' => kadence()->default( 'header_html_wpautop' ),
'label' => esc_html__( 'Automatically Add Paragraphs', 'kadence' ),
'partial' => array(
'selector' => '.header-html',
'container_inclusive' => true,
'render_callback' => 'Kadence\header_html',
),
),
'header_html_typography' => array(
'control_type' => 'kadence_typography_control',
'section' => 'header_html_design',
'label' => esc_html__( 'Font', 'kadence' ),
'default' => kadence()->default( 'header_html_typography' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => '#main-header .header-html',
'pattern' => array(
'desktop' => '$',
'tablet' => '$',
'mobile' => '$',
),
'property' => 'font',
'key' => 'typography',
),
),
'input_attrs' => array(
'id' => 'header_html_typography',
),
),
'header_html_link_style' => array(
'control_type' => 'kadence_select_control',
'section' => 'header_html_design',
'default' => kadence()->default( 'header_html_link_style' ),
'label' => esc_html__( 'Link Style', 'kadence' ),
'input_attrs' => array(
'options' => array(
'normal' => array(
'name' => __( 'Underline', 'kadence' ),
),
'plain' => array(
'name' => __( 'No Underline', 'kadence' ),
),
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '#main-header .header-html',
'pattern' => 'inner-link-style-$',
'key' => '',
),
),
),
'header_html_link_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'header_html_design',
'label' => esc_html__( 'Link Colors', 'kadence' ),
'default' => kadence()->default( 'header_html_link_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#main-header .header-html a',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '#main-header .header-html a:hover',
'property' => 'color',
'pattern' => '$',
'key' => 'hover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Hover Color', 'kadence' ),
'palette' => true,
),
),
),
),
'header_html_margin' => array(
'control_type' => 'kadence_measure_control',
'section' => 'header_html_design',
'priority' => 10,
'default' => kadence()->default( 'header_html_margin' ),
'label' => esc_html__( 'Margin', 'kadence' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#main-header .header-html',
'property' => 'margin',
'pattern' => '$',
'key' => 'measure',
),
),
'input_attrs' => array(
'responsive' => false,
),
),
);
Theme_Customizer::add_settings( $settings );

View File

@@ -0,0 +1,598 @@
<?php
/**
* Header Builder Options
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
ob_start(); ?>
<div class="kadence-compontent-tabs nav-tab-wrapper wp-clearfix">
<a href="#" class="nav-tab kadence-general-tab kadence-compontent-tabs-button nav-tab-active" data-tab="general">
<span><?php esc_html_e( 'General', 'kadence' ); ?></span>
</a>
<a href="#" class="nav-tab kadence-design-tab kadence-compontent-tabs-button" data-tab="design">
<span><?php esc_html_e( 'Design', 'kadence' ); ?></span>
</a>
</div>
<?php
$compontent_tabs = ob_get_clean();
$settings = array(
'logo_settings' => array(
'control_type' => 'kadence_blank_control',
'section' => 'title_tagline',
'settings' => false,
'priority' => 1,
'description' => $compontent_tabs,
),
'logo_width' => array(
'control_type' => 'kadence_range_control',
'section' => 'title_tagline',
'priority' => 5,
'label' => esc_html__( 'Logo Max Width', 'kadence' ),
'description' => esc_html__( 'Define the maxium width for the logo', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
array(
'setting' => 'custom_logo',
'operator' => '!empty',
'value' => '',
),
),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#masthead .custom-logo',
'property' => 'max-width',
'pattern' => '$',
'key' => 'size',
),
array(
'type' => 'css',
'selector' => '#masthead .site-branding a.brand img.svg-logo-image',
'property' => 'width',
'pattern' => '$',
'key' => 'size',
),
),
'default' => kadence()->default( 'logo_width' ),
'input_attrs' => array(
'min' => array(
'px' => 10,
'em' => 1,
'rem' => 1,
'vw' => 2,
'%' => 2,
),
'max' => array(
'px' => 800,
'em' => 50,
'rem' => 50,
'vw' => 80,
'%' => 80,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
'vw' => 1,
'%' => 1,
),
'units' => array( 'px', 'em', 'rem', 'vw' ),
),
),
'info_transparent_logo_in_use' => array(
'control_type' => 'kadence_title_control',
'section' => 'title_tagline',
'priority' => 5,
'description' => esc_html__( '*NOTICE Custom transparent logo will show on pages that have the transparent header enabled. Change that in your transparent header settings.', 'kadence' ),
'settings' => false,
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
array(
'setting' => 'logo_layout',
'operator' => 'sub_object_contains',
'sub_key' => 'include',
'responsive' => true,
'value' => 'logo',
),
array(
'setting' => 'transparent_header_enable',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'transparent_header_custom_logo',
'operator' => '=',
'value' => true,
),
),
),
'use_mobile_logo' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'title_tagline',
'transport' => 'refresh',
'priority' => 6,
'default' => kadence()->default( 'use_mobile_logo' ),
'label' => esc_html__( 'Different Logo for Mobile?', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
array(
'setting' => '__device',
'operator' => 'in',
'value' => array( 'tablet', 'mobile' ),
),
),
),
'mobile_logo' => array(
'control_type' => 'media',
'section' => 'title_tagline',
'transport' => 'refresh',
'priority' => 6,
'mime_type' => 'image',
'default' => '',
'label' => esc_html__( 'Mobile Logo', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
array(
'setting' => 'use_mobile_logo',
'operator' => '=',
'value' => true,
),
array(
'setting' => '__device',
'operator' => 'in',
'value' => array( 'tablet', 'mobile' ),
),
),
),
'use_logo_icon' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'title_tagline',
'transport' => 'refresh',
'priority' => 6,
'default' => kadence()->default( 'use_logo_icon' ),
'label' => esc_html__( 'Use Logo Icon?', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
array(
'setting' => 'custom_logo',
'operator' => 'empty',
'value' => '',
),
),
'partial' => array(
'selector' => '#masthead',
'container_inclusive' => true,
'render_callback' => 'Kadence\header_markup',
),
),
'logo_icon' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'title_tagline',
'priority' => 6,
'default' => kadence()->default( 'logo_icon' ),
'label' => esc_html__( 'Logo Icon', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
array(
'setting' => 'custom_logo',
'operator' => 'empty',
'value' => '',
),
array(
'setting' => 'use_logo_icon',
'operator' => '=',
'value' => true,
),
),
'partial' => array(
'selector' => '.logo-icon',
'container_inclusive' => false,
'render_callback' => 'Kadence\logo_icon',
),
'input_attrs' => array(
'layout' => array(
'logoArrow' => array(
'icon' => 'logoArrow',
),
'logoCircle' => array(
'icon' => 'logoCircle',
),
'logoLine' => array(
'icon' => 'logoLine',
),
'custom' => array(
'name' => __( 'Custom', 'kadence' ),
),
),
'responsive' => false,
'class' => 'radio-icon-padding',
),
),
'logo_icon_custom' => array(
'control_type' => 'kadence_textarea_control',
'section' => 'title_tagline',
'priority' => 6,
'default' => kadence()->default( 'logo_icon_custom' ),
'partial' => array(
'selector' => '.logo-icon',
'container_inclusive' => true,
'render_callback' => 'Kadence\logo_icon',
),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
array(
'setting' => 'custom_logo',
'operator' => 'empty',
'value' => '',
),
array(
'setting' => 'use_logo_icon',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'logo_icon',
'operator' => '=',
'value' => 'custom',
),
),
'input_attrs' => array(
'id' => 'logo_icon_custom',
),
),
'logo_icon_width' => array(
'control_type' => 'kadence_range_control',
'section' => 'title_tagline',
'priority' => 6,
'label' => esc_html__( 'Logo Icon Width', 'kadence' ),
'description' => esc_html__( 'Define the width for the logo icon', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
array(
'setting' => 'custom_logo',
'operator' => 'empty',
'value' => '',
),
array(
'setting' => 'use_logo_icon',
'operator' => '=',
'value' => true,
),
),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#masthead .logo-icon',
'property' => 'max-width',
'pattern' => '$',
'key' => 'size',
),
),
'default' => kadence()->default( 'logo_icon_width' ),
'input_attrs' => array(
'min' => array(
'px' => 10,
'em' => 1,
'rem' => 1,
'vw' => 2,
'%' => 2,
),
'max' => array(
'px' => 800,
'em' => 50,
'rem' => 50,
'vw' => 80,
'%' => 80,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
'vw' => 1,
'%' => 1,
),
'units' => array( 'px', 'em', 'rem', 'vw' ),
),
),
'logo_icon_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'title_tagline',
'label' => esc_html__( 'Logo Icon Color', 'kadence' ),
'default' => kadence()->default( 'logo_icon_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#masthead .logo-icon',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
array(
'setting' => 'custom_logo',
'operator' => 'empty',
'value' => '',
),
array(
'setting' => 'use_logo_icon',
'operator' => '=',
'value' => true,
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Color', 'kadence' ),
'palette' => true,
),
),
),
),
'logo_layout' => array(
'control_type' => 'kadence_multi_radio_icon_control',
'section' => 'title_tagline',
'priority' => 6,
'default' => kadence()->default( 'logo_layout' ),
'label' => esc_html__( 'Logo Layout', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
),
'partial' => array(
'selector' => '#masthead',
'container_inclusive' => true,
'render_callback' => 'Kadence\header_markup',
),
),
'brand_typography' => array(
'control_type' => 'kadence_typography_control',
'section' => 'title_tagline',
'label' => esc_html__( 'Site Title Font', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
array(
'setting' => 'logo_layout',
'operator' => 'sub_object_contains',
'sub_key' => 'include',
'responsive' => true,
'value' => 'title',
),
),
'default' => kadence()->default( 'brand_typography' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => array(
'desktop' => '#main-header .site-branding .site-title',
'tablet' => '#mobile-header .site-branding .site-title',
'mobile' => '#mobile-header .site-branding .site-title',
),
'pattern' => array(
'desktop' => '$',
'tablet' => '$',
'mobile' => '$',
),
'property' => 'font',
'key' => 'typography',
),
),
'input_attrs' => array(
'id' => 'brand_typography',
),
),
'brand_typography_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'title_tagline',
'label' => esc_html__( 'Site Title Hover and Active Colors', 'kadence' ),
'default' => kadence()->default( 'brand_typography_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#masthead .site-branding .site-title:hover',
'pattern' => '$',
'property' => 'color',
'key' => 'hover',
),
array(
'type' => 'css',
'selector' => '#main-header .header-html a:hover',
'property' => 'color',
'pattern' => '$',
'key' => 'hover',
),
array(
'type' => 'css',
'selector' => 'body.home #masthead .site-branding .site-title',
'pattern' => '$',
'property' => 'color',
'key' => 'active',
),
),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
array(
'setting' => 'logo_layout',
'operator' => 'sub_object_contains',
'sub_key' => 'include',
'responsive' => true,
'value' => 'title',
),
),
'input_attrs' => array(
'colors' => array(
'hover' => array(
'tooltip' => __( 'Hover Color', 'kadence' ),
'palette' => true,
),
'active' => array(
'tooltip' => __( 'Active Color', 'kadence' ),
'palette' => true,
),
),
),
),
// Logo Tagline Typography.
'brand_tag_typography' => array(
'control_type' => 'kadence_typography_control',
'section' => 'title_tagline',
'label' => esc_html__( 'Site Tagline Font', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
array(
'setting' => 'logo_layout',
'operator' => 'sub_object_contains',
'sub_key' => 'include',
'responsive' => true,
'value' => 'tagline',
),
),
'default' => kadence()->default( 'brand_tag_typography' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => array(
'desktop' => '#masthead .site-branding .site-description',
'tablet' => '#masthead .site-branding .site-description',
'mobile' => '#masthead .site-branding .site-description',
),
'pattern' => array(
'desktop' => '$',
'tablet' => '$',
'mobile' => '$',
),
'property' => 'font',
'key' => 'typography',
),
),
'input_attrs' => array(
'id' => 'brand_tag_typography',
),
),
'header_logo_padding' => array(
'control_type' => 'kadence_measure_control',
'section' => 'title_tagline',
'priority' => 15,
'default' => kadence()->default( 'header_logo_padding' ),
'label' => esc_html__( 'Padding', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.site-branding',
'property' => 'padding',
'pattern' => '$',
'key' => 'measure',
),
),
'input_attrs' => array(
'min' => array(
'px' => 0,
'em' => 0,
'rem' => 0,
),
'max' => array(
'px' => 100,
'em' => 6,
'rem' => 6,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
),
'units' => array( 'px', 'em', 'rem' ),
'responsive' => true,
),
),
'logo_link_to_site_icon' => array(
'control_type' => 'kadence_focus_button_control',
'section' => 'title_tagline',
'settings' => false,
'priority' => 25,
'label' => esc_html__( 'Site Icon', 'kadence' ),
'input_attrs' => array(
'section' => 'kadence_customizer_site_identity',
),
),
'site_logo_link' => array(
'control_type' => 'kadence_focus_button_control',
'section' => 'site_identity',
'settings' => false,
'priority' => 5,
'label' => esc_html__( 'Site Title and Logo Control', 'kadence' ),
'input_attrs' => array(
'section' => 'title_tagline',
),
),
'post_archive_home_title' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'static_front_page',
'transport' => 'refresh',
'default' => kadence()->default( 'post_archive_home_title' ),
'label' => esc_html__( 'Show site name for page title', 'kadence' ),
'context' => array(
array(
'setting' => 'show_on_front',
'operator' => '==',
'value' => 'posts',
),
),
),
);
Theme_Customizer::add_settings( $settings );

View File

@@ -0,0 +1,274 @@
<?php
/**
* Header Main Row Options
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
ob_start(); ?>
<div class="kadence-compontent-tabs nav-tab-wrapper wp-clearfix">
<a href="#" class="nav-tab kadence-general-tab kadence-compontent-tabs-button nav-tab-active" data-tab="general">
<span><?php esc_html_e( 'General', 'kadence' ); ?></span>
</a>
<a href="#" class="nav-tab kadence-design-tab kadence-compontent-tabs-button" data-tab="design">
<span><?php esc_html_e( 'Design', 'kadence' ); ?></span>
</a>
</div>
<?php
$compontent_tabs = ob_get_clean();
$settings = array(
'header_main_tabs' => array(
'control_type' => 'kadence_blank_control',
'section' => 'header_main',
'settings' => false,
'priority' => 1,
'description' => $compontent_tabs,
),
'header_main_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'header_main',
'priority' => 4,
'default' => kadence()->default( 'header_main_layout' ),
'label' => esc_html__( 'Layout', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => array(
'desktop' => '.site-main-header-wrap',
'tablet' => '#mobile-header .site-main-header-wrap',
'mobile' => '#mobile-header .site-main-header-wrap',
),
'pattern' => array(
'desktop' => 'site-header-row-layout-$',
'tablet' => 'site-header-row-tablet-layout-$',
'mobile' => 'site-header-row-mobile-layout-$',
),
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'standard' => array(
'tooltip' => __( 'Background Fullwidth, Content Contained', 'kadence' ),
'name' => __( 'Standard', 'kadence' ),
'icon' => '',
),
'fullwidth' => array(
'tooltip' => __( 'Background & Content Fullwidth', 'kadence' ),
'name' => __( 'Fullwidth', 'kadence' ),
'icon' => '',
),
'contained' => array(
'tooltip' => __( 'Background & Content Contained', 'kadence' ),
'name' => __( 'Contained', 'kadence' ),
'icon' => '',
),
),
),
),
'header_main_height' => array(
'control_type' => 'kadence_range_control',
'section' => 'header_main',
'priority' => 5,
'label' => esc_html__( 'Min Height', 'kadence' ),
'transport' => ( 'no' !== kadence()->option( 'header_sticky' ) ? 'refresh' : 'postMessage' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#masthead .site-main-header-inner-wrap',
'property' => 'min-height',
'pattern' => '$',
'key' => 'size',
),
),
'default' => kadence()->default( 'header_main_height' ),
'input_attrs' => array(
'min' => array(
'px' => 10,
'em' => 1,
'rem' => 1,
'vh' => 2,
),
'max' => array(
'px' => 400,
'em' => 12,
'rem' => 12,
'vh' => 40,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
'vh' => 1,
),
'units' => array( 'px', 'em', 'rem', 'vh' ),
),
),
'header_main_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'header_main',
'label' => esc_html__( 'Main Row Background', 'kadence' ),
'default' => kadence()->default( 'header_main_background' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => '.site-main-header-wrap .site-header-row-container-inner',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Main Row Background', 'kadence' ),
),
),
'header_main_border' => array(
'control_type' => 'kadence_borders_control',
'section' => 'header_main',
'label' => esc_html__( 'Border', 'kadence' ),
'default' => kadence()->default( 'header_main_border' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
),
'settings' => array(
'border_top' => 'header_main_top_border',
'border_bottom' => 'header_main_bottom_border',
),
'live_method' => array(
'header_main_top_border' => array(
array(
'type' => 'css_border',
'selector' => array(
'desktop' => '.site-main-header-wrap .site-header-row-container-inner',
'tablet' => '#mobile-header .site-main-header-wrap .site-header-row-container-inner',
'mobile' => '#mobile-header .site-main-header-wrap .site-header-row-container-inner',
),
'pattern' => array(
'desktop' => '$',
'tablet' => '$',
'mobile' => '$',
),
'property' => 'border-top',
'pattern' => '$',
'key' => 'border',
),
),
'header_main_bottom_border' => array(
array(
'type' => 'css_border',
'selector' => array(
'desktop' => '.site-main-header-wrap .site-header-row-container-inner',
'tablet' => '#mobile-header .site-main-header-wrap .site-header-row-container-inner',
'mobile' => '#mobile-header .site-main-header-wrap .site-header-row-container-inner',
),
'pattern' => array(
'desktop' => '$',
'tablet' => '$',
'mobile' => '$',
),
'property' => 'border-bottom',
'pattern' => '$',
'key' => 'border',
),
),
),
),
'header_main_padding' => array(
'control_type' => 'kadence_measure_control',
'section' => 'header_main',
'default' => kadence()->default( 'header_main_padding' ),
'label' => esc_html__( 'Padding', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.site-main-header-wrap .site-header-row-container-inner>.site-container',
'property' => 'padding',
'pattern' => '$',
'key' => 'measure',
),
),
'input_attrs' => array(
'min' => array(
'px' => 0,
'em' => 0,
'rem' => 0,
),
'max' => array(
'px' => 100,
'em' => 6,
'rem' => 6,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
),
'units' => array( 'px', 'em', 'rem' ),
'responsive' => true,
),
),
'header_main_trans_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'header_main',
'label' => esc_html__( '(When Transparent Header) Main Row Background', 'kadence' ),
'default' => kadence()->default( 'header_main_trans_background' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
array(
'setting' => 'transparent_header_enable',
'operator' => '=',
'value' => true,
),
),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => '.transparent-header #masthead .site-main-header-wrap .site-header-row-container-inner',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Transparent Header Main Row Background', 'kadence' ),
),
),
);
Theme_Customizer::add_settings( $settings );

View File

@@ -0,0 +1,408 @@
<?php
/**
* Header Main Row Options
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
Theme_Customizer::add_settings(
array(
'mobile_button_tabs' => array(
'control_type' => 'kadence_tab_control',
'section' => 'mobile_button',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'mobile_button',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'mobile_button_design',
),
'active' => 'general',
),
),
'mobile_button_tabs_design' => array(
'control_type' => 'kadence_tab_control',
'section' => 'mobile_button_design',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'mobile_button',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'mobile_button_design',
),
'active' => 'design',
),
),
'mobile_button_style' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'mobile_button',
'priority' => 4,
'default' => kadence()->default( 'mobile_button_style' ),
'label' => esc_html__( 'Button Style', 'kadence' ),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.mobile-header-button-wrap .mobile-header-button',
'pattern' => 'button-style-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'filled' => array(
'name' => __( 'Filled', 'kadence' ),
),
'outline' => array(
'name' => __( 'Outline', 'kadence' ),
),
'secondary' => array(
'name' => __( 'Secondary', 'kadence' ),
),
),
'responsive' => false,
),
),
'mobile_button_size' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'mobile_button',
'priority' => 4,
'default' => kadence()->default( 'mobile_button_size' ),
'label' => esc_html__( 'Button Size', 'kadence' ),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.mobile-header-button-wrap .mobile-header-button',
'pattern' => 'button-size-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'small' => array(
'name' => __( 'Small', 'kadence' ),
),
'medium' => array(
'name' => __( 'Medium', 'kadence' ),
'icon' => '',
),
'large' => array(
'name' => __( 'Large', 'kadence' ),
'icon' => '',
),
),
'responsive' => false,
),
),
'mobile_button_label' => array(
'control_type' => 'kadence_text_control',
'section' => 'mobile_button',
'priority' => 4,
'sanitize' => 'sanitize_text_field',
'label' => esc_html__( 'Label', 'kadence' ),
'default' => kadence()->default( 'mobile_button_label' ),
'live_method' => array(
array(
'type' => 'html',
'selector' => '.mobile-header-button-wrap .mobile-header-button',
'pattern' => '$',
'key' => '',
),
),
),
'mobile_button_link' => array(
'control_type' => 'kadence_text_control',
'section' => 'mobile_button',
'sanitize' => 'esc_url_raw',
'label' => esc_html__( 'URL', 'kadence' ),
'priority' => 4,
'default' => kadence()->default( 'mobile_button_link' ),
'partial' => array(
'selector' => '.mobile-header-button-wrap',
'container_inclusive' => true,
'render_callback' => 'Kadence\mobile_button',
),
),
'mobile_button_target' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'mobile_button',
'priority' => 6,
'default' => kadence()->default( 'mobile_button_target' ),
'label' => esc_html__( 'Open in New Tab?', 'kadence' ),
),
'mobile_button_nofollow' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'mobile_button',
'priority' => 6,
'default' => kadence()->default( 'mobile_button_nofollow' ),
'label' => esc_html__( 'Set link to nofollow?', 'kadence' ),
),
'mobile_button_sponsored' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'mobile_button',
'priority' => 6,
'default' => kadence()->default( 'mobile_button_sponsored' ),
'label' => esc_html__( 'Set link attribute Sponsored?', 'kadence' ),
),
'mobile_button_visibility' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'mobile_button',
'priority' => 4,
'default' => kadence()->default( 'mobile_button_visibility' ),
'label' => esc_html__( 'Button Visibility', 'kadence' ),
'partial' => array(
'selector' => '.mobile-header-button-wrap',
'container_inclusive' => true,
'render_callback' => 'Kadence\mobile_button',
),
'input_attrs' => array(
'layout' => array(
'all' => array(
'name' => __( 'Everyone', 'kadence' ),
),
'loggedout' => array(
'name' => __( 'Logged Out Only', 'kadence' ),
),
'loggedin' => array(
'name' => __( 'Logged In Only', 'kadence' ),
),
),
'responsive' => false,
),
),
'mobile_button_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'mobile_button_design',
'label' => esc_html__( 'Text Colors', 'kadence' ),
'default' => kadence()->default( 'mobile_button_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.mobile-header-button-wrap .mobile-header-button-inner-wrap .mobile-header-button',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.mobile-header-button-wrap .mobile-header-button-inner-wrap .mobile-header-button:hover',
'property' => 'color',
'pattern' => '$',
'key' => 'hover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Hover Color', 'kadence' ),
'palette' => true,
),
),
),
),
'mobile_button_background' => array(
'control_type' => 'kadence_color_control',
'section' => 'mobile_button_design',
'label' => esc_html__( 'Background Colors', 'kadence' ),
'default' => kadence()->default( 'mobile_button_background' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.mobile-header-button-wrap .mobile-header-button-inner-wrap .mobile-header-button',
'property' => 'background',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.mobile-header-button-wrap .mobile-header-button-inner-wrap .mobile-header-button:hover',
'property' => 'background',
'pattern' => '$',
'key' => 'hover',
),
),
'context' => array(
array(
'setting' => 'mobile_button_style',
'operator' => '=',
'value' => 'filled',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Hover Color', 'kadence' ),
'palette' => true,
),
),
),
),
'mobile_button_border_colors' => array(
'control_type' => 'kadence_color_control',
'section' => 'mobile_button_design',
'label' => esc_html__( 'Border Colors', 'kadence' ),
'default' => kadence()->default( 'mobile_button_border' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.mobile-header-button-wrap .mobile-header-button-inner-wrap .mobile-header-button',
'property' => 'border-color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.mobile-header-button-wrap .mobile-header-button-inner-wrap .mobile-header-button:hover',
'property' => 'border-color',
'pattern' => '$',
'key' => 'hover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Hover Color', 'kadence' ),
'palette' => true,
),
),
),
),
'mobile_button_border' => array(
'control_type' => 'kadence_border_control',
'section' => 'mobile_button_design',
'label' => esc_html__( 'Border', 'kadence' ),
'default' => kadence()->default( 'mobile_button_border' ),
'live_method' => array(
array(
'type' => 'css_border',
'selector' => '.mobile-header-button-wrap .mobile-header-button-inner-wrap .mobile-header-button',
'property' => 'border',
'pattern' => '$',
'key' => 'border',
),
),
'input_attrs' => array(
'responsive' => false,
'color' => false,
),
),
'mobile_button_radius' => array(
'control_type' => 'kadence_measure_control',
'section' => 'mobile_button_design',
'priority' => 10,
'default' => kadence()->default( 'mobile_button_radius' ),
'label' => esc_html__( 'Border Radius', 'kadence' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.mobile-header-button-wrap .mobile-header-button-inner-wrap .mobile-header-button',
'property' => 'border-radius',
'pattern' => '$',
'key' => 'measure',
),
),
'input_attrs' => array(
'responsive' => false,
),
),
'mobile_button_typography' => array(
'control_type' => 'kadence_typography_control',
'section' => 'mobile_button_design',
'label' => esc_html__( 'Font', 'kadence' ),
'default' => kadence()->default( 'mobile_button_typography' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => '.mobile-header-button-wrap .mobile-header-button-inner-wrap .mobile-header-button',
'pattern' => array(
'desktop' => '$',
'tablet' => '$',
'mobile' => '$',
),
'property' => 'font',
'key' => 'typography',
),
),
'input_attrs' => array(
'id' => 'mobile_button_typography',
'options' => 'no-color',
),
),
'mobile_button_shadow' => array(
'control_type' => 'kadence_shadow_control',
'section' => 'mobile_button_design',
'label' => esc_html__( 'Button Shadow', 'kadence' ),
'live_method' => array(
array(
'type' => 'css_boxshadow',
'selector' => '.mobile-header-button-wrap .mobile-header-button-inner-wrap .mobile-header-button',
'property' => 'box-shadow',
'pattern' => '$',
'key' => '',
),
),
'default' => kadence()->default( 'mobile_button_shadow' ),
),
'mobile_button_shadow_hover' => array(
'control_type' => 'kadence_shadow_control',
'section' => 'mobile_button_design',
'label' => esc_html__( 'Button Hover State Shadow', 'kadence' ),
'live_method' => array(
array(
'type' => 'css_boxshadow',
'selector' => '.mobile-header-button-wrap .mobile-header-button-inner-wrap .mobile-header-button',
'property' => 'box-shadow',
'pattern' => '$',
'key' => '',
),
),
'default' => kadence()->default( 'mobile_button_shadow_hover' ),
),
'mobile_button_margin' => array(
'control_type' => 'kadence_measure_control',
'section' => 'mobile_button_design',
'priority' => 10,
'default' => kadence()->default( 'mobile_button_margin' ),
'label' => esc_html__( 'Margin', 'kadence' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.mobile-header-button-wrap .mobile-header-button',
'property' => 'margin',
'pattern' => '$',
'key' => 'measure',
),
),
'input_attrs' => array(
'responsive' => false,
),
),
)
);

View File

@@ -0,0 +1,392 @@
<?php
/**
* Header Builder Options
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
$settings = array(
'header_mobile_cart_tabs' => array(
'control_type' => 'kadence_tab_control',
'section' => 'mobile_cart',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'mobile_cart',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'mobile_cart_design',
),
'active' => 'general',
),
),
'header_mobile_cart_tabs_design' => array(
'control_type' => 'kadence_tab_control',
'section' => 'mobile_cart_design',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'mobile_cart',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'mobile_cart_design',
),
'active' => 'design',
),
),
'header_mobile_cart_label' => array(
'control_type' => 'kadence_text_control',
'section' => 'mobile_cart',
'sanitize' => 'sanitize_text_field',
'priority' => 6,
'default' => kadence()->default( 'header_mobile_cart_label' ),
'label' => esc_html__( 'Cart Label', 'kadence' ),
'live_method' => array(
array(
'type' => 'html',
'selector' => '.header-mobile-cart-wrap .header-cart-label',
'pattern' => '$',
'key' => '',
),
),
),
'header_mobile_cart_icon' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'mobile_cart',
'priority' => 10,
'default' => kadence()->default( 'header_mobile_cart_icon' ),
'label' => esc_html__( 'Cart Icon', 'kadence' ),
'partial' => array(
'selector' => '.header-mobile-cart-wrap',
'container_inclusive' => true,
'render_callback' => 'Kadence\mobile_cart',
),
'input_attrs' => array(
'layout' => array(
'shopping-bag' => array(
'icon' => 'shoppingBag',
),
'shopping-cart' => array(
'icon' => 'shoppingCart',
),
),
'responsive' => false,
),
),
'header_mobile_cart_style' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'mobile_cart',
'priority' => 10,
'default' => kadence()->default( 'header_mobile_cart_style' ),
'label' => esc_html__( 'Cart Click Action', 'kadence' ),
'transport' => 'refresh',
'input_attrs' => array(
'layout' => array(
'link' => array(
'name' => __( 'Link', 'kadence' ),
),
'slide' => array(
'name' => __( 'Popout Cart', 'kadence' ),
),
),
'responsive' => false,
),
),
'header_mobile_cart_show_total' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'mobile_cart',
'priority' => 6,
'partial' => array(
'selector' => '.header-mobile-cart-wrap',
'container_inclusive' => true,
'render_callback' => 'Kadence\mobile_cart',
),
'default' => kadence()->default( 'header_mobile_cart_show_total' ),
'label' => esc_html__( 'Show Item Total Indicator', 'kadence' ),
),
'header_mobile_cart_icon_size' => array(
'control_type' => 'kadence_range_control',
'section' => 'mobile_cart_design',
'label' => esc_html__( 'Icon Size', 'kadence' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.header-mobile-cart-wrap .header-cart-button .kadence-svg-iconset',
'property' => 'font-size',
'pattern' => '$',
'key' => 'size',
),
),
'default' => kadence()->default( 'header_mobile_cart_icon_size' ),
'input_attrs' => array(
'min' => array(
'px' => 0,
'em' => 0,
'rem' => 0,
),
'max' => array(
'px' => 100,
'em' => 12,
'rem' => 12,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
),
'units' => array( 'px', 'em', 'rem' ),
'responsive' => false,
),
),
'header_mobile_cart_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'mobile_cart_design',
'label' => esc_html__( 'Cart Colors', 'kadence' ),
'default' => kadence()->default( 'header_mobile_cart_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.header-mobile-cart-wrap .header-cart-inner-wrap .header-cart-button',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.header-mobile-cart-wrap .header-cart-inner-wrap .header-cart-button:hover',
'property' => 'color',
'pattern' => '$',
'key' => 'hover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Hover Color', 'kadence' ),
'palette' => true,
),
),
),
),
'header_mobile_cart_background' => array(
'control_type' => 'kadence_color_control',
'section' => 'mobile_cart_design',
'label' => esc_html__( 'Cart Background', 'kadence' ),
'default' => kadence()->default( 'header_mobile_cart_background' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.header-mobile-cart-wrap .header-cart-inner-wrap .header-cart-button',
'property' => 'background',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.header-mobile-cart-wrap .header-cart-inner-wrap .header-cart-button:hover',
'property' => 'background',
'pattern' => '$',
'key' => 'hover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Background', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Hover Background', 'kadence' ),
'palette' => true,
),
),
),
),
'header_mobile_cart_total_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'mobile_cart_design',
'label' => esc_html__( 'Cart Total Colors', 'kadence' ),
'default' => kadence()->default( 'header_mobile_cart_total_color' ),
'context' => array(
array(
'setting' => 'header_mobile_cart_show_total',
'operator' => '=',
'value' => true,
),
),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.header-mobile-cart-wrap .header-cart-button .header-cart-total',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.header-mobile-cart-wrap .header-cart-button:hover .header-cart-total',
'property' => 'color',
'pattern' => '$',
'key' => 'hover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Hover Color', 'kadence' ),
'palette' => true,
),
),
),
),
'header_mobile_cart_total_background' => array(
'control_type' => 'kadence_color_control',
'section' => 'mobile_cart_design',
'label' => esc_html__( 'Cart Total Background', 'kadence' ),
'default' => kadence()->default( 'header_mobile_cart_total_background' ),
'context' => array(
array(
'setting' => 'header_mobile_cart_show_total',
'operator' => '=',
'value' => true,
),
),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.header-mobile-cart-wrap .header-cart-button .header-cart-total',
'property' => 'background',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.header-mobile-cart-wrap .header-cart-button:hover .header-cart-total',
'property' => 'background',
'pattern' => '$',
'key' => 'hover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Background', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Hover Background', 'kadence' ),
'palette' => true,
),
),
),
),
'header_mobile_cart_typography' => array(
'control_type' => 'kadence_typography_control',
'section' => 'mobile_cart_design',
'label' => esc_html__( 'Cart Label Font', 'kadence' ),
'context' => array(
array(
'setting' => 'header_mobile_cart_label',
'operator' => '!empty',
'value' => '',
),
),
'default' => kadence()->default( 'header_mobile_cart_typography' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => '.header-mobile-cart-wrap .header-cart-button .header-cart-label',
'pattern' => array(
'desktop' => '$',
'tablet' => '$',
'mobile' => '$',
),
'property' => 'font',
'key' => 'typography',
),
),
'input_attrs' => array(
'id' => 'header_mobile_cart_typography',
'options' => 'no-color',
),
),
'header_mobile_cart_padding' => array(
'control_type' => 'kadence_measure_control',
'section' => 'mobile_cart_design',
'priority' => 10,
'default' => kadence()->default( 'header_mobile_cart_padding' ),
'label' => esc_html__( 'Cart Padding', 'kadence' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.header-mobile-cart-wrap .header-cart-inner-wrap .header-cart-button',
'property' => 'padding',
'pattern' => '$',
'key' => 'measure',
),
),
'input_attrs' => array(
'responsive' => false,
),
),
'header_mobile_cart_popup_side' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'mobile_cart',
'priority' => 20,
'default' => kadence()->default( 'header_mobile_cart_popup_side' ),
'label' => esc_html__( 'Slide-Out Side', 'kadence' ),
'context' => array(
array(
'setting' => 'header_mobile_cart_style',
'operator' => '=',
'value' => 'slide',
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '#cart-drawer',
'pattern' => 'popup-mobile-drawer-side-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'left' => array(
'tooltip' => __( 'Reveal from Left', 'kadence' ),
'name' => __( 'Left', 'kadence' ),
'icon' => '',
),
'right' => array(
'tooltip' => __( 'Reveal from Right', 'kadence' ),
'name' => __( 'Right', 'kadence' ),
'icon' => '',
),
),
'responsive' => false,
),
),
);
Theme_Customizer::add_settings( $settings );

View File

@@ -0,0 +1,197 @@
<?php
/**
* Header Main Row Options
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
ob_start(); ?>
<div class="kadence-compontent-tabs nav-tab-wrapper wp-clearfix">
<a href="#" class="nav-tab kadence-general-tab kadence-compontent-tabs-button nav-tab-active" data-tab="general">
<span><?php esc_html_e( 'General', 'kadence' ); ?></span>
</a>
<a href="#" class="nav-tab kadence-design-tab kadence-compontent-tabs-button" data-tab="design">
<span><?php esc_html_e( 'Design', 'kadence' ); ?></span>
</a>
</div>
<?php
$compontent_tabs = ob_get_clean();
$settings = array(
'mobile_html_tabs' => array(
'control_type' => 'kadence_blank_control',
'section' => 'mobile_html',
'settings' => false,
'priority' => 1,
'description' => $compontent_tabs,
),
'mobile_html_content' => array(
'control_type' => 'kadence_editor_control',
'section' => 'mobile_html',
'sanitize' => 'wp_kses_post',
'priority' => 4,
'default' => kadence()->default( 'mobile_html_content' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
),
'input_attrs' => array(
'id' => 'mobile_html',
),
'partial' => array(
'selector' => '.mobile-html',
'container_inclusive' => true,
'render_callback' => 'Kadence\mobile_html',
),
),
'mobile_html_wpautop' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'mobile_html',
'default' => kadence()->default( 'mobile_html_wpautop' ),
'label' => esc_html__( 'Automatically Add Paragraphs', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
),
'partial' => array(
'selector' => '.mobile-html',
'container_inclusive' => true,
'render_callback' => 'Kadence\mobile_html',
),
),
'mobile_html_typography' => array(
'control_type' => 'kadence_typography_control',
'section' => 'mobile_html',
'label' => esc_html__( 'Font', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
),
'default' => kadence()->default( 'mobile_html_typography' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => '.mobile-html',
'pattern' => array(
'desktop' => '$',
'tablet' => '$',
'mobile' => '$',
),
'property' => 'font',
'key' => 'typography',
),
),
'input_attrs' => array(
'id' => 'mobile_html_typography',
),
),
'mobile_html_link_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'mobile_html',
'label' => esc_html__( 'Link Colors', 'kadence' ),
'default' => kadence()->default( 'mobile_html_link_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.mobile-html a',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.mobile-html a:hover',
'property' => 'color',
'pattern' => '$',
'key' => 'hover',
),
),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Hover Color', 'kadence' ),
'palette' => true,
),
),
),
),
'mobile_html_link_style' => array(
'control_type' => 'kadence_select_control',
'section' => 'mobile_html',
'default' => kadence()->default( 'mobile_html_link_style' ),
'label' => esc_html__( 'Link Style', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
),
'input_attrs' => array(
'options' => array(
'normal' => array(
'name' => __( 'Underline', 'kadence' ),
),
'plain' => array(
'name' => __( 'No Underline', 'kadence' ),
),
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '#mobile-header .mobile-html',
'pattern' => 'inner-link-style-$',
'key' => '',
),
),
),
'mobile_html_margin' => array(
'control_type' => 'kadence_measure_control',
'section' => 'mobile_html',
'priority' => 10,
'default' => kadence()->default( 'mobile_html_margin' ),
'label' => esc_html__( 'Margin', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.mobile-html',
'property' => 'margin',
'pattern' => '$',
'key' => 'measure',
),
),
'input_attrs' => array(
'responsive' => false,
),
),
);
Theme_Customizer::add_settings( $settings );

View File

@@ -0,0 +1,314 @@
<?php
/**
* Header Builder Options
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
ob_start(); ?>
<div class="kadence-compontent-tabs nav-tab-wrapper wp-clearfix">
<a href="#" class="nav-tab kadence-general-tab kadence-compontent-tabs-button nav-tab-active" data-tab="general">
<span><?php esc_html_e( 'General', 'kadence' ); ?></span>
</a>
<a href="#" class="nav-tab kadence-design-tab kadence-compontent-tabs-button" data-tab="design">
<span><?php esc_html_e( 'Design', 'kadence' ); ?></span>
</a>
</div>
<?php
$compontent_tabs = ob_get_clean();
$settings = array(
'mobile_navigation_tabs' => array(
'control_type' => 'kadence_blank_control',
'section' => 'mobile_navigation',
'settings' => false,
'priority' => 1,
'description' => $compontent_tabs,
),
'mobile_navigation_link' => array(
'control_type' => 'kadence_focus_button_control',
'section' => 'mobile_navigation',
'settings' => false,
'priority' => 5,
'label' => esc_html__( 'Select Menu', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
),
'input_attrs' => array(
'section' => 'menu_locations',
),
),
'mobile_navigation_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'mobile_navigation',
'label' => esc_html__( 'Colors', 'kadence' ),
'default' => kadence()->default( 'mobile_navigation_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.mobile-navigation ul li:not(.menu-item-has-children) > a, .mobile-navigation ul li.menu-item-has-children > .drawer-nav-drop-wrap',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.mobile-navigation ul li:not(.menu-item-has-children) > a:hover, .mobile-navigation ul li.menu-item-has-children > .drawer-nav-drop-wrap:hover',
'property' => 'color',
'pattern' => '$',
'key' => 'hover',
),
array(
'type' => 'css',
'selector' => '.mobile-navigation ul li.current-menu-item:not(.menu-item-has-children) > a, .mobile-navigation ul li.current-menu-item.menu-item-has-children > .drawer-nav-drop-wrap',
'property' => 'color',
'pattern' => '$',
'key' => 'active',
),
),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Hover Color', 'kadence' ),
'palette' => true,
),
'active' => array(
'tooltip' => __( 'Active Color', 'kadence' ),
'palette' => true,
),
),
),
),
'mobile_navigation_background' => array(
'control_type' => 'kadence_color_control',
'section' => 'mobile_navigation',
'priority' => 20,
'label' => esc_html__( 'Background', 'kadence' ),
'default' => kadence()->default( 'mobile_navigation_background' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.mobile-navigation ul li:not(.menu-item-has-children) > a, .mobile-navigation ul li.menu-item-has-children > .drawer-nav-drop-wrap',
'property' => 'background',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.mobile-navigation ul li:not(.menu-item-has-children) > a:hover, .mobile-navigation ul li.menu-item-has-children > .drawer-nav-drop-wrap:hover',
'property' => 'background',
'pattern' => '$',
'key' => 'hover',
),
array(
'type' => 'css',
'selector' => '.mobile-navigation ul li.current-menu-item:not(.menu-item-has-children) > a, .mobile-navigation ul li.current-menu-item.menu-item-has-children > .drawer-nav-drop-wrap',
'property' => 'background',
'pattern' => '$',
'key' => 'active',
),
),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Background', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Hover Background', 'kadence' ),
'palette' => true,
),
'active' => array(
'tooltip' => __( 'Active Background', 'kadence' ),
'palette' => true,
),
),
),
),
'mobile_navigation_divider' => array(
'control_type' => 'kadence_border_control',
'section' => 'mobile_navigation',
'priority' => 20,
'label' => esc_html__( 'Item Divider', 'kadence' ),
'default' => kadence()->default( 'mobile_navigation_divider' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
),
'live_method' => array(
array(
'type' => 'css_border',
'selector' => '.mobile-navigation ul li.menu-item-has-children .drawer-nav-drop-wrap, .mobile-navigation ul li:not(.menu-item-has-children) a ',
'pattern' => '$',
'property' => 'border-bottom',
'pattern' => '$',
'key' => 'border',
),
array(
'type' => 'css_border',
'selector' => '.mobile-navigation ul li.menu-item-has-children .drawer-nav-drop-wrap button',
'pattern' => '$',
'property' => 'border-left',
'pattern' => '$',
'key' => 'border',
),
),
'input_attrs' => array(
'responsive' => false,
),
),
'mobile_navigation_typography' => array(
'control_type' => 'kadence_typography_control',
'section' => 'mobile_navigation',
'priority' => 20,
'label' => esc_html__( 'Font', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
),
'default' => kadence()->default( 'mobile_navigation_typography' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => '.mobile-navigation ul li',
'pattern' => array(
'desktop' => '$',
'tablet' => '$',
'mobile' => '$',
),
'property' => 'font',
'key' => 'typography',
),
),
'input_attrs' => array(
'id' => 'mobile_navigation_typography',
'options' => 'no-color',
),
),
'mobile_navigation_vertical_spacing' => array(
'control_type' => 'kadence_range_control',
'section' => 'mobile_navigation',
'priority' => 20,
'label' => esc_html__( 'Items Vertical Spacing', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.mobile-navigation ul li a',
'property' => 'padding-top',
'pattern' => '$',
'key' => 'size',
),
array(
'type' => 'css',
'selector' => '.mobile-navigation ul li a',
'property' => 'padding-bottom',
'pattern' => '$',
'key' => 'size',
),
),
'default' => kadence()->default( 'mobile_navigation_vertical_spacing' ),
'input_attrs' => array(
'min' => array(
'px' => 0,
'em' => 0,
'rem' => 0,
'vh' => 0,
),
'max' => array(
'px' => 100,
'em' => 12,
'rem' => 12,
'vh' => 12,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
'vh' => 0.01,
),
'units' => array( 'px', 'em', 'rem', 'vh' ),
'responsive' => false,
),
),
'mobile_navigation_collapse' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'mobile_navigation',
'priority' => 20,
'default' => kadence()->default( 'mobile_navigation_collapse' ),
'label' => esc_html__( 'Collapse sub menu items?', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
),
'partial' => array(
'selector' => '#mobile-site-navigation',
'container_inclusive' => true,
'render_callback' => 'Kadence\mobile_navigation',
),
),
'mobile_navigation_parent_toggle' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'mobile_navigation',
'priority' => 20,
'default' => kadence()->default( 'mobile_navigation_parent_toggle' ),
'label' => esc_html__( 'Entire parent menu item expands sub menu', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
array(
'setting' => 'mobile_navigation_collapse',
'value' => true,
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.mobile-navigation',
'pattern' => 'drawer-navigation-parent-toggle-$',
'key' => '',
),
),
),
);
Theme_Customizer::add_settings( $settings );

View File

@@ -0,0 +1,407 @@
<?php
/**
* Header Builder Options
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
$settings = array(
'mobile_social_tabs' => array(
'control_type' => 'kadence_tab_control',
'section' => 'mobile_social',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'mobile_social',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'mobile_social_design',
),
'active' => 'general',
),
),
'mobile_social_tabs_design' => array(
'control_type' => 'kadence_tab_control',
'section' => 'mobile_social_design',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'mobile_social',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'mobile_social_design',
),
'active' => 'design',
),
),
'header_mobile_social_items' => array(
'control_type' => 'kadence_social_control',
'section' => 'mobile_social',
'priority' => 6,
'default' => kadence()->default( 'header_mobile_social_items' ),
'label' => esc_html__( 'Social Items', 'kadence' ),
'partial' => array(
'selector' => '.header-mobile-social-wrap',
'container_inclusive' => true,
'render_callback' => 'Kadence\mobile_social',
),
),
'header_mobile_social_show_label' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'mobile_social',
'priority' => 8,
'default' => kadence()->default( 'header_mobile_social_show_label' ),
'label' => esc_html__( 'Show Icon Label?', 'kadence' ),
'partial' => array(
'selector' => '.header-mobile-social-wrap',
'container_inclusive' => true,
'render_callback' => 'Kadence\mobile_social',
),
),
'header_mobile_social_item_spacing' => array(
'control_type' => 'kadence_range_control',
'section' => 'mobile_social',
'label' => esc_html__( 'Item Spacing', 'kadence' ),
'default' => kadence()->default( 'header_mobile_social_item_spacing' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.header-mobile-social-wrap .header-mobile-social-inner-wrap',
'property' => 'gap',
'pattern' => '$',
'key' => 'size',
),
),
'input_attrs' => array(
'min' => array(
'px' => 0,
'em' => 0,
'rem' => 0,
),
'max' => array(
'px' => 50,
'em' => 3,
'rem' => 3,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
),
'units' => array( 'px', 'em', 'rem' ),
'responsive' => false,
),
),
'header_mobile_social_style' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'mobile_social',
'priority' => 10,
'default' => kadence()->default( 'header_mobile_social_style' ),
'label' => esc_html__( 'Social Style', 'kadence' ),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.header-mobile-social-inner-wrap',
'pattern' => 'social-style-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'filled' => array(
'name' => __( 'Filled', 'kadence' ),
),
'outline' => array(
'name' => __( 'Outline', 'kadence' ),
),
),
'responsive' => false,
),
),
'header_mobile_social_icon_size' => array(
'control_type' => 'kadence_range_control',
'section' => 'mobile_social_design',
'label' => esc_html__( 'Icon Size', 'kadence' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.header-mobile-social-wrap .header-mobile-social-inner-wrap',
'property' => 'font-size',
'pattern' => '$',
'key' => 'size',
),
),
'default' => kadence()->default( 'header_mobile_social_icon_size' ),
'input_attrs' => array(
'min' => array(
'px' => 0,
'em' => 0,
'rem' => 0,
),
'max' => array(
'px' => 100,
'em' => 12,
'rem' => 12,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
),
'units' => array( 'px', 'em', 'rem' ),
'responsive' => false,
),
),
'header_mobile_social_brand' => array(
'control_type' => 'kadence_select_control',
'section' => 'mobile_social_design',
'transport' => 'refresh',
'default' => kadence()->default( 'header_mobile_social_brand' ),
'label' => esc_html__( 'Use Brand Colors?', 'kadence' ),
'input_attrs' => array(
'options' => array(
'' => array(
'name' => __( 'No', 'kadence' ),
),
'always' => array(
'name' => __( 'Yes', 'kadence' ),
),
'onhover' => array(
'name' => __( 'On Hover', 'kadence' ),
),
'untilhover' => array(
'name' => __( 'Until Hover', 'kadence' ),
),
),
),
),
'header_mobile_social_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'mobile_social_design',
'label' => esc_html__( 'Colors', 'kadence' ),
'default' => kadence()->default( 'header_mobile_social_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.header-mobile-social-wrap a.social-button',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.header-mobile-social-wrap a.social-button:hover',
'property' => 'color',
'pattern' => '$',
'key' => 'hover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Hover Color', 'kadence' ),
'palette' => true,
),
),
),
),
'header_mobile_social_background' => array(
'control_type' => 'kadence_color_control',
'section' => 'mobile_social_design',
'label' => esc_html__( 'Background Colors', 'kadence' ),
'default' => kadence()->default( 'header_mobile_social_background' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.header-mobile-social-wrap a.social-button',
'property' => 'background',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.header-mobile-social-wrap a.social-button:hover',
'property' => 'background',
'pattern' => '$',
'key' => 'hover',
),
),
'context' => array(
array(
'setting' => 'header_mobile_social_style',
'operator' => '=',
'value' => 'filled',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Hover Color', 'kadence' ),
'palette' => true,
),
),
),
),
'header_mobile_social_border_colors' => array(
'control_type' => 'kadence_color_control',
'section' => 'mobile_social_design',
'label' => esc_html__( 'Border Colors', 'kadence' ),
'default' => kadence()->default( 'header_mobile_social_border' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#mobile-header .header-mobile-social-wrap a.social-button, #mobile-drawer .header-mobile-social-wrap a.social-button',
'property' => 'border-color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '#mobile-header .header-mobile-social-wrap a.social-button:hover, #mobile-drawer .header-mobile-social-wrap a.social-button:hover',
'property' => 'border-color',
'pattern' => '$',
'key' => 'hover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( ' Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Hover Color', 'kadence' ),
'palette' => true,
),
),
),
),
'header_mobile_social_border' => array(
'control_type' => 'kadence_border_control',
'section' => 'mobile_social_design',
'label' => esc_html__( 'Border', 'kadence' ),
'default' => kadence()->default( 'header_mobile_social_border' ),
'live_method' => array(
array(
'type' => 'css_border',
'selector' => '.header-mobile-social-wrap a.social-button',
'property' => 'border',
'pattern' => '$',
'key' => 'border',
),
),
'input_attrs' => array(
'responsive' => false,
'color' => false,
),
),
'header_mobile_social_border_radius' => array(
'control_type' => 'kadence_range_control',
'section' => 'mobile_social_design',
'label' => esc_html__( 'Border Radius', 'kadence' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.header-mobile-social-wrap a.social-button',
'property' => 'border-radius',
'pattern' => '$',
'key' => 'size',
),
),
'default' => kadence()->default( 'header_mobile_social_border_radius' ),
'input_attrs' => array(
'min' => array(
'px' => 0,
'em' => 0,
'rem' => 0,
'%' => 0,
),
'max' => array(
'px' => 100,
'em' => 12,
'rem' => 12,
'%' => 100,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
'%' => 1,
),
'units' => array( 'px', 'em', 'rem', '%' ),
'responsive' => false,
),
),
'header_mobile_social_typography' => array(
'control_type' => 'kadence_typography_control',
'section' => 'mobile_social_design',
'label' => esc_html__( 'Font', 'kadence' ),
'context' => array(
array(
'setting' => 'header_mobile_social_show_label',
'operator' => '=',
'value' => true,
),
),
'default' => kadence()->default( 'header_mobile_social_typography' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => '.header-mobile-social-wrap a.social-button .social-label',
'pattern' => array(
'desktop' => '$',
'tablet' => '$',
'mobile' => '$',
),
'property' => 'font',
'key' => 'typography',
),
),
'input_attrs' => array(
'id' => 'header_mobile_social_typography',
'options' => 'no-color',
),
),
'header_mobile_social_margin' => array(
'control_type' => 'kadence_measure_control',
'section' => 'mobile_social_design',
'priority' => 10,
'default' => kadence()->default( 'header_mobile_social_margin' ),
'label' => esc_html__( 'Margin', 'kadence' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#mobile-header .header-mobile-social-wrap, #mobile-drawer .header-mobile-social-wrap',
'property' => 'margin',
'pattern' => '$',
'key' => 'measure',
),
),
'input_attrs' => array(
'responsive' => false,
),
),
);
Theme_Customizer::add_settings( $settings );

View File

@@ -0,0 +1,445 @@
<?php
/**
* Header Builder Options
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
ob_start(); ?>
<div class="kadence-compontent-tabs nav-tab-wrapper wp-clearfix">
<a href="#" class="nav-tab kadence-general-tab kadence-compontent-tabs-button nav-tab-active" data-tab="general">
<span><?php esc_html_e( 'General', 'kadence' ); ?></span>
</a>
<a href="#" class="nav-tab kadence-design-tab kadence-compontent-tabs-button" data-tab="design">
<span><?php esc_html_e( 'Design', 'kadence' ); ?></span>
</a>
</div>
<?php
$compontent_tabs = ob_get_clean();
$settings = array(
'primary_navigation_tabs' => array(
'control_type' => 'kadence_blank_control',
'section' => 'primary_navigation',
'settings' => false,
'priority' => 1,
'description' => $compontent_tabs,
),
'primary_navigation_link' => array(
'control_type' => 'kadence_focus_button_control',
'section' => 'primary_navigation',
'settings' => false,
'priority' => 5,
'label' => esc_html__( 'Select Menu', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
),
'input_attrs' => array(
'section' => 'menu_locations',
),
),
'primary_navigation_spacing' => array(
'control_type' => 'kadence_range_control',
'section' => 'primary_navigation',
'priority' => 5,
'label' => esc_html__( 'Items Spacing', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.main-navigation .primary-menu-container > ul > li.menu-item > a',
'property' => 'padding-left',
'pattern' => 'calc($ / 2)',
'key' => 'size',
),
array(
'type' => 'css',
'selector' => '.main-navigation .primary-menu-container > ul > li.menu-item > a',
'property' => 'padding-right',
'pattern' => 'calc($ / 2)',
'key' => 'size',
),
),
'default' => kadence()->default( 'primary_navigation_spacing' ),
'input_attrs' => array(
'min' => array(
'px' => 0,
'em' => 0,
'rem' => 0,
'vw' => 0,
),
'max' => array(
'px' => 100,
'em' => 12,
'rem' => 12,
'vw' => 12,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
'vw' => 0.01,
),
'units' => array( 'px', 'em', 'rem', 'vw' ),
'responsive' => false,
),
),
'primary_navigation_open_type' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'primary_navigation',
'priority' => 10,
'default' => kadence()->default( 'primary_navigation_open_type' ),
'label' => esc_html__( 'Open on: ', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
),
'input_attrs' => array(
'layout' => array(
'hover' => array(
'tooltip' => __( 'Hover', 'kadence' ),
'name' => __( 'Hover', 'kadence' ),
'icon' => '',
),
'click' => array(
'tooltip' => __( 'Click', 'kadence' ),
'name' => __( 'Click', 'kadence' ),
'icon' => '',
),
),
'responsive' => false,
'class' => 'radio-btn-width-50',
),
),
'primary_navigation_stretch' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'primary_navigation',
'priority' => 6,
'default' => kadence()->default( 'primary_navigation_stretch' ),
'label' => esc_html__( 'Stretch Menu?', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.site-header-item-main-navigation',
'pattern' => 'header-navigation-layout-stretch-$',
'key' => 'switch',
),
),
),
'primary_navigation_fill_stretch' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'primary_navigation',
'priority' => 6,
'default' => kadence()->default( 'primary_navigation_fill_stretch' ),
'label' => esc_html__( 'Fill and Center Menu Items?', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
array(
'setting' => 'primary_navigation_stretch',
'operator' => '==',
'value' => true,
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.site-header-item-main-navigation',
'pattern' => 'header-navigation-layout-fill-stretch-$',
'key' => 'switch',
),
),
),
'primary_navigation_style' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'primary_navigation',
'priority' => 10,
'default' => kadence()->default( 'primary_navigation_style' ),
'label' => esc_html__( 'Navigation Style', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.main-navigation',
'pattern' => 'header-navigation-style-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'standard' => array(
'tooltip' => __( 'Standard', 'kadence' ),
'name' => __( 'Standard', 'kadence' ),
'icon' => '',
),
'fullheight' => array(
'tooltip' => __( 'Menu items are full height', 'kadence' ),
'name' => __( 'Full Height', 'kadence' ),
'icon' => '',
),
'underline' => array(
'tooltip' => __( 'Underline Hover/Active', 'kadence' ),
'name' => __( 'Underline', 'kadence' ),
'icon' => '',
),
'underline-fullheight' => array(
'tooltip' => __( 'Full Height Underline Hover/Active', 'kadence' ),
'name' => __( 'Full Height Underline', 'kadence' ),
'icon' => '',
),
),
'responsive' => false,
'class' => 'radio-btn-width-50',
),
),
'primary_navigation_vertical_spacing' => array(
'control_type' => 'kadence_range_control',
'section' => 'primary_navigation',
'label' => esc_html__( 'Items Top and Bottom Padding', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
array(
'setting' => 'primary_navigation_style',
'operator' => 'sub_object_does_not_contain',
'sub_key' => 'layout',
'responsive' => false,
'value' => 'fullheight',
),
),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.main-navigation .primary-menu-container > ul > li.menu-item > a',
'property' => 'padding-top',
'pattern' => '$',
'key' => 'size',
),
array(
'type' => 'css',
'selector' => '.main-navigation .primary-menu-container > ul > li.menu-item > a',
'property' => 'padding-bottom',
'pattern' => '$',
'key' => 'size',
),
),
'default' => kadence()->default( 'primary_navigation_vertical_spacing' ),
'input_attrs' => array(
'min' => array(
'px' => 0,
'em' => 0,
'rem' => 0,
'vh' => 0,
),
'max' => array(
'px' => 100,
'em' => 12,
'rem' => 12,
'vh' => 12,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
'vh' => 0.01,
),
'units' => array( 'px', 'em', 'rem', 'vh' ),
'responsive' => false,
),
),
'primary_navigation_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'primary_navigation',
'label' => esc_html__( 'Navigation Colors', 'kadence' ),
'default' => kadence()->default( 'primary_navigation_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.main-navigation .primary-menu-container > ul > li.menu-item > a',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.main-navigation .primary-menu-container > ul > li.menu-item > a:hover',
'property' => 'color',
'pattern' => '$',
'key' => 'hover',
),
array(
'type' => 'css',
'selector' => '.main-navigation .primary-menu-container > ul > li.menu-item.current-menu-item > a, .main-navigation .primary-menu-container > ul > li.current_page_item > a',
'property' => 'color',
'pattern' => '$',
'key' => 'active',
),
),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Hover Color', 'kadence' ),
'palette' => true,
),
'active' => array(
'tooltip' => __( 'Active Color', 'kadence' ),
'palette' => true,
),
),
),
),
'primary_navigation_background' => array(
'control_type' => 'kadence_color_control',
'section' => 'primary_navigation',
'label' => esc_html__( 'Navigation Background', 'kadence' ),
'default' => kadence()->default( 'primary_navigation_background' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.main-navigation .primary-menu-container > ul > li.menu-item > a',
'property' => 'background',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.main-navigation .primary-menu-container > ul > li.menu-item > a:hover',
'property' => 'background',
'pattern' => '$',
'key' => 'hover',
),
array(
'type' => 'css',
'selector' => '.main-navigation .primary-menu-container > ul > li.menu-item.current-menu-item > a, .main-navigation .primary-menu-container > ul > li.current_page_item > a',
'property' => 'background',
'pattern' => '$',
'key' => 'active',
),
),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Background', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Hover Background', 'kadence' ),
'palette' => true,
),
'active' => array(
'tooltip' => __( 'Active Background', 'kadence' ),
'palette' => true,
),
),
),
),
'primary_navigation_parent_active' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'primary_navigation',
'default' => kadence()->default( 'primary_navigation_parent_active' ),
'label' => esc_html__( 'Make Parent of Current Menu Item Active?', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
),
),
'primary_navigation_typography' => array(
'control_type' => 'kadence_typography_control',
'section' => 'primary_navigation',
'label' => esc_html__( 'Navigation Font', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
),
'default' => kadence()->default( 'primary_navigation_typography' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => '.main-navigation .primary-menu-container > ul > li.menu-item a',
'pattern' => array(
'desktop' => '$',
'tablet' => '$',
'mobile' => '$',
),
'property' => 'font',
'key' => 'typography',
),
),
'input_attrs' => array(
'id' => 'primary_navigation_typography',
'options' => 'no-color',
),
),
'info_primary_submenu' => array(
'control_type' => 'kadence_title_control',
'section' => 'primary_navigation',
'priority' => 20,
'label' => esc_html__( 'Dropdown Options', 'kadence' ),
'settings' => false,
),
'primary_dropdown_link' => array(
'control_type' => 'kadence_focus_button_control',
'section' => 'primary_navigation',
'settings' => false,
'priority' => 20,
'label' => esc_html__( 'Dropdown Options', 'kadence' ),
'input_attrs' => array(
'section' => 'kadence_customizer_dropdown_navigation',
),
),
);
Theme_Customizer::add_settings( $settings );

View File

@@ -0,0 +1,476 @@
<?php
/**
* Header Popup Options
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
$settings = array(
'header_popup_tabs' => array(
'control_type' => 'kadence_tab_control',
'section' => 'header_popup',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'header_popup',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'header_popup_design',
),
'active' => 'general',
),
),
'header_popup_tabs_design' => array(
'control_type' => 'kadence_tab_control',
'section' => 'header_popup_design',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'header_popup',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'header_popup_design',
),
'active' => 'design',
),
),
'header_popup_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'header_popup',
'priority' => 4,
'default' => kadence()->default( 'header_popup_layout' ),
'label' => esc_html__( 'Layout', 'kadence' ),
'live_method' => array(
array(
'type' => 'class',
'selector' => '#mobile-drawer',
'pattern' => 'popup-drawer-layout-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'fullwidth' => array(
'tooltip' => __( 'Reveal as Fullwidth', 'kadence' ),
'name' => __( 'Fullwidth', 'kadence' ),
'icon' => '',
),
'sidepanel' => array(
'tooltip' => __( 'Reveal as Side Panel', 'kadence' ),
'name' => __( 'Side Panel', 'kadence' ),
'icon' => '',
),
),
'responsive' => false,
),
),
'header_popup_side' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'header_popup',
'priority' => 4,
'default' => kadence()->default( 'header_popup_side' ),
'label' => esc_html__( 'Slide-Out Side', 'kadence' ),
'context' => array(
array(
'setting' => 'header_popup_layout',
'operator' => 'sub_object_contains',
'sub_key' => 'layout',
'responsive' => false,
'value' => 'sidepanel',
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '#mobile-drawer',
'pattern' => 'popup-drawer-side-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'left' => array(
'tooltip' => __( 'Reveal from Left', 'kadence' ),
'name' => __( 'Left', 'kadence' ),
'icon' => '',
),
'right' => array(
'tooltip' => __( 'Reveal from Right', 'kadence' ),
'name' => __( 'Right', 'kadence' ),
'icon' => '',
),
),
'responsive' => false,
),
),
'header_popup_width' => array(
'control_type' => 'kadence_range_control',
'section' => 'header_popup',
'priority' => 5,
'label' => esc_html__( 'Panel Width', 'kadence' ),
'description' => esc_html__( 'Define the width for the off canvas panel', 'kadence' ),
'context' => array(
array(
'setting' => 'header_popup_layout',
'operator' => 'sub_object_contains',
'sub_key' => 'layout',
'responsive' => false,
'value' => 'sidepanel',
),
),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#mobile-drawer .drawer-inner',
'property' => 'width',
'pattern' => '$',
'key' => 'size',
),
),
'default' => kadence()->default( 'header_popup_width' ),
'input_attrs' => array(
'min' => array(
'px' => 100,
'em' => 1,
'rem' => 1,
'vw' => 0,
'%' => 0,
),
'max' => array(
'px' => 2000,
'em' => 50,
'rem' => 50,
'vw' => 100,
'%' => 100,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
'vw' => 1,
'%' => 1,
),
'units' => array( 'px', 'em', 'vw', '%' ),
),
),
'header_popup_content_max_width' => array(
'control_type' => 'kadence_range_control',
'section' => 'header_popup',
'priority' => 5,
'label' => esc_html__( 'Content Max Width', 'kadence' ),
'description' => esc_html__( "Define the max width for the off canvas panel's content", 'kadence' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#mobile-drawer .drawer-content',
'property' => 'width',
'pattern' => '$',
'key' => 'size',
),
),
'default' => kadence()->default( 'header_popup_content_max_width' ),
'input_attrs' => array(
'min' => array(
'px' => 100,
'em' => 1,
'rem' => 1,
'vw' => 0,
'%' => 0,
),
'max' => array(
'px' => 2000,
'em' => 50,
'rem' => 50,
'vw' => 100,
'%' => 100,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
'vw' => 1,
'%' => 1,
),
'units' => array( 'px', 'em', 'vw', '%' ),
),
),
'enable_popup_body_animate' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'header_popup',
'priority' => 4,
'transport' => 'refresh',
'default' => kadence()->default( 'enable_popup_body_animate' ),
'label' => esc_html__( 'Move Body with toggle?', 'kadence' ),
'input_attrs' => array(
'help' => esc_html__( 'This can require a lot of memory to render the animation in mobile browsers, use with caution if you have graphically heavy pages.', 'kadence' ),
),
'context' => array(
array(
'setting' => 'header_popup_layout',
'operator' => 'sub_object_contains',
'sub_key' => 'layout',
'responsive' => false,
'value' => 'sidepanel',
),
),
),
'header_popup_animation' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'header_popup',
'priority' => 4,
'default' => kadence()->default( 'header_popup_animation' ),
'label' => esc_html__( 'Animation', 'kadence' ),
'context' => array(
array(
'setting' => 'header_popup_layout',
'operator' => 'sub_object_contains',
'sub_key' => 'layout',
'responsive' => false,
'value' => 'fullwidth',
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '#mobile-drawer',
'pattern' => 'popup-drawer-animation-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'fade' => array(
'tooltip' => __( 'Fade In', 'kadence' ),
'name' => __( 'Fade', 'kadence' ),
'icon' => '',
),
'scale' => array(
'tooltip' => __( 'Scale into view', 'kadence' ),
'name' => __( 'Scale', 'kadence' ),
'icon' => '',
),
'slice' => array(
'tooltip' => __( 'Slice into view', 'kadence' ),
'name' => __( 'Slice', 'kadence' ),
'icon' => '',
),
),
'responsive' => false,
),
),
'header_popup_content_align' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'header_popup',
'label' => esc_html__( 'Content Align', 'kadence' ),
'default' => kadence()->default( 'header_popup_content_align' ),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.mobile-drawer-content',
'pattern' => 'content-align-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'left' => array(
'tooltip' => __( 'Left Align', 'kadence' ),
'dashicon' => 'editor-alignleft',
),
'center' => array(
'tooltip' => __( 'Center Align', 'kadence' ),
'dashicon' => 'editor-aligncenter',
),
'right' => array(
'tooltip' => __( 'Right Align', 'kadence' ),
'dashicon' => 'editor-alignright',
),
),
'responsive' => false,
),
),
'header_popup_vertical_align' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'header_popup',
'label' => esc_html__( 'Content Vertical Align', 'kadence' ),
'default' => kadence()->default( 'header_popup_vertical_align' ),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.mobile-drawer-content',
'pattern' => 'content-valign-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'top' => array(
'tooltip' => __( 'Top Align', 'kadence' ),
'icon' => 'aligntop',
),
'middle' => array(
'tooltip' => __( 'Middle Align', 'kadence' ),
'icon' => 'alignmiddle',
),
'bottom' => array(
'tooltip' => __( 'Bottom Align', 'kadence' ),
'icon' => 'alignbottom',
),
),
'responsive' => false,
),
),
'header_popup_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'header_popup_design',
'label' => esc_html__( 'Popup Background', 'kadence' ),
'default' => kadence()->default( 'header_popup_background' ),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => '#mobile-drawer .drawer-inner, #mobile-drawer.popup-drawer-layout-fullwidth.popup-drawer-animation-slice .pop-portion-bg',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Popup Background', 'kadence' ),
),
),
'header_popup_close_icon_size' => array(
'control_type' => 'kadence_range_control',
'section' => 'header_popup_design',
'label' => esc_html__( 'Close Icon Size', 'kadence' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#mobile-drawer .drawer-header .drawer-toggle',
'property' => 'font-size',
'pattern' => '$',
'key' => 'size',
),
),
'default' => kadence()->default( 'header_popup_close_icon_size' ),
'input_attrs' => array(
'min' => array(
'px' => 0,
'em' => 0,
'rem' => 0,
),
'max' => array(
'px' => 100,
'em' => 12,
'rem' => 12,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
),
'units' => array( 'px', 'em', 'rem' ),
'responsive' => false,
),
),
'header_popup_close_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'header_popup_design',
'label' => esc_html__( 'Close Toggle Colors', 'kadence' ),
'default' => kadence()->default( 'header_popup_close_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#mobile-drawer .drawer-header .drawer-toggle',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '#mobile-drawer .drawer-header .drawer-toggle:hover',
'property' => 'color',
'pattern' => '$',
'key' => 'hover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Hover Color', 'kadence' ),
'palette' => true,
),
),
),
),
'header_popup_close_background' => array(
'control_type' => 'kadence_color_control',
'section' => 'header_popup_design',
'label' => esc_html__( 'Close Toggle Background Colors', 'kadence' ),
'default' => kadence()->default( 'header_popup_close_background' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#mobile-drawer .drawer-header .drawer-toggle',
'property' => 'background',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '#mobile-drawer .drawer-header .drawer-toggle:hover',
'property' => 'background',
'pattern' => '$',
'key' => 'hover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Hover Color', 'kadence' ),
'palette' => true,
),
),
),
),
'header_popup_close_padding' => array(
'control_type' => 'kadence_measure_control',
'section' => 'header_popup_design',
'default' => kadence()->default( 'header_popup_close_padding' ),
'label' => esc_html__( 'Close Icon Padding', 'kadence' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#mobile-drawer .drawer-header .drawer-toggle',
'property' => 'padding',
'pattern' => '$',
'key' => 'measure',
),
),
'input_attrs' => array(
'responsive' => false,
),
),
);
Theme_Customizer::add_settings( $settings );

View File

@@ -0,0 +1,495 @@
<?php
/**
* Header Builder Options
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
ob_start(); ?>
<div class="kadence-compontent-tabs nav-tab-wrapper wp-clearfix">
<a href="#" class="nav-tab kadence-general-tab kadence-compontent-tabs-button nav-tab-active" data-tab="general">
<span><?php esc_html_e( 'General', 'kadence' ); ?></span>
</a>
<a href="#" class="nav-tab kadence-design-tab kadence-compontent-tabs-button" data-tab="design">
<span><?php esc_html_e( 'Design', 'kadence' ); ?></span>
</a>
</div>
<?php
$compontent_tabs = ob_get_clean();
$settings = array(
'header_search_tabs' => array(
'control_type' => 'kadence_blank_control',
'section' => 'header_search',
'settings' => false,
'priority' => 1,
'description' => $compontent_tabs,
),
'header_search_label' => array(
'control_type' => 'kadence_text_control',
'section' => 'header_search',
'sanitize' => 'sanitize_text_field',
'priority' => 6,
'default' => kadence()->default( 'header_search_label' ),
'label' => esc_html__( 'Search Label', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
),
'live_method' => array(
array(
'type' => 'html',
'selector' => '.search-toggle-label',
'pattern' => '$',
'key' => '',
),
),
),
'header_search_label_visiblity' => array(
'control_type' => 'kadence_check_icon_control',
'section' => 'header_search',
'priority' => 10,
'default' => kadence()->default( 'header_search_label_visiblity' ),
'label' => esc_html__( 'Search Label Visibility', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
array(
'setting' => 'header_search_label',
'operator' => '!empty',
'value' => '',
),
),
'partial' => array(
'selector' => '.search-toggle-open-container',
'container_inclusive' => true,
'render_callback' => 'Kadence\header_search',
),
'input_attrs' => array(
'options' => array(
'desktop' => array(
'name' => __( 'Desktop', 'kadence' ),
'icon' => 'desktop',
),
'tablet' => array(
'name' => __( 'Tablet', 'kadence' ),
'icon' => 'tablet',
),
'mobile' => array(
'name' => __( 'Mobile', 'kadence' ),
'icon' => 'smartphone',
),
),
),
),
'header_search_icon' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'header_search',
'priority' => 10,
'default' => kadence()->default( 'header_search_icon' ),
'label' => esc_html__( 'Search Icon', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
),
'partial' => array(
'selector' => '.search-toggle-icon',
'container_inclusive' => false,
'render_callback' => 'Kadence\search_toggle',
),
'input_attrs' => array(
'layout' => array(
'search' => array(
'icon' => 'search',
),
'search2' => array(
'icon' => 'search2',
),
),
'responsive' => false,
'class' => 'radio-icon-padding',
),
),
'header_search_style' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'header_search',
'priority' => 10,
'default' => kadence()->default( 'header_search_style' ),
'label' => esc_html__( 'Search Style', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.search-toggle-open',
'pattern' => 'search-toggle-style-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'default' => array(
'name' => __( 'Default', 'kadence' ),
),
'bordered' => array(
'name' => __( 'Bordered', 'kadence' ),
),
),
'responsive' => false,
),
),
'header_search_border' => array(
'control_type' => 'kadence_border_control',
'section' => 'header_search',
'label' => esc_html__( 'Search Border', 'kadence' ),
'default' => kadence()->default( 'header_search_border' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
array(
'setting' => 'header_search_style',
'operator' => 'sub_object_contains',
'sub_key' => 'layout',
'responsive' => false,
'value' => 'bordered',
),
),
'live_method' => array(
array(
'type' => 'css_border',
'selector' => '.search-toggle-open-container .search-toggle-open.search-toggle-style-bordered',
'pattern' => '$',
'property' => 'border',
'key' => 'border',
),
),
'input_attrs' => array(
'color' => false,
'responsive' => false,
),
),
'header_search_icon_size' => array(
'control_type' => 'kadence_range_control',
'section' => 'header_search',
'label' => esc_html__( 'Icon Size', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.search-toggle-open-container .search-toggle-open .search-toggle-icon',
'property' => 'font-size',
'pattern' => '$',
'key' => 'size',
),
),
'default' => kadence()->default( 'header_search_icon_size' ),
'input_attrs' => array(
'min' => array(
'px' => 0,
'em' => 0,
'rem' => 0,
),
'max' => array(
'px' => 100,
'em' => 12,
'rem' => 12,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
),
'units' => array( 'px', 'em', 'rem' ),
'responsive' => true,
),
),
'header_search_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'header_search',
'label' => esc_html__( 'Search Colors', 'kadence' ),
'default' => kadence()->default( 'header_search_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.search-toggle-open-container .search-toggle-open',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.search-toggle-open-container .search-toggle-open:hover',
'property' => 'color',
'pattern' => '$',
'key' => 'hover',
),
),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Hover Color', 'kadence' ),
'palette' => true,
),
),
),
),
'header_search_background' => array(
'control_type' => 'kadence_color_control',
'section' => 'header_search',
'label' => esc_html__( 'Search Background', 'kadence' ),
'default' => kadence()->default( 'header_search_background' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.search-toggle-open-container .search-toggle-open',
'property' => 'background',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.search-toggle-open-container .search-toggle-open:hover',
'property' => 'background',
'pattern' => '$',
'key' => 'hover',
),
),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Background', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Hover Background', 'kadence' ),
'palette' => true,
),
),
),
),
'header_search_typography' => array(
'control_type' => 'kadence_typography_control',
'section' => 'header_search',
'label' => esc_html__( 'Label Font', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
array(
'setting' => 'header_search_label',
'operator' => '!empty',
'value' => '',
),
),
'default' => kadence()->default( 'header_search_typography' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => '.search-toggle-open-container .search-toggle-open',
'pattern' => array(
'desktop' => '$',
'tablet' => '$',
'mobile' => '$',
),
'property' => 'font',
'key' => 'typography',
),
),
'input_attrs' => array(
'id' => 'header_search_typography',
'options' => 'no-color',
),
),
'header_search_padding' => array(
'control_type' => 'kadence_measure_control',
'section' => 'header_search',
'priority' => 10,
'default' => kadence()->default( 'header_search_padding' ),
'label' => esc_html__( 'Search Padding', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.search-toggle-open-container .search-toggle-open',
'property' => 'padding',
'pattern' => '$',
'key' => 'measure',
),
),
'input_attrs' => array(
'responsive' => false,
),
),
'header_search_margin' => array(
'control_type' => 'kadence_measure_control',
'section' => 'header_search',
'priority' => 10,
'default' => kadence()->default( 'header_search_margin' ),
'label' => esc_html__( 'Margin', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.search-toggle-open-container .search-toggle-open',
'property' => 'margin',
'pattern' => '$',
'key' => 'measure',
),
),
'input_attrs' => array(
'responsive' => false,
),
),
'info_search_modal' => array(
'control_type' => 'kadence_title_control',
'section' => 'header_search',
'priority' => 20,
'label' => esc_html__( 'Modal Options', 'kadence' ),
'settings' => false,
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
),
),
'header_search_modal_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'header_search',
'priority' => 20,
'label' => esc_html__( 'Text Colors', 'kadence' ),
'default' => kadence()->default( 'header_search_modal_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#search-drawer .drawer-inner .drawer-content form input.search-field, #search-drawer .drawer-inner .drawer-content form .kadence-search-icon-wrap, #search-drawer .drawer-header',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '#search-drawer .drawer-inner .drawer-content form input.search-field:focus, #search-drawer .drawer-inner .drawer-content form input.search-submit:hover ~ .kadence-search-icon-wrap, #search-drawer .drawer-inner .drawer-content form button[type="submit"]:hover ~ .kadence-search-icon-wrap',
'property' => 'color',
'pattern' => '$',
'key' => 'hover',
),
),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Focus/Hover Color', 'kadence' ),
'palette' => true,
),
),
),
),
'header_search_modal_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'header_search',
'priority' => 20,
'label' => esc_html__( 'Modal Background', 'kadence' ),
'default' => kadence()->default( 'header_search_modal_background' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => '#search-drawer .drawer-inner',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Modal Background', 'kadence' ),
),
),
);
if ( class_exists( 'woocommerce' ) ) {
$settings = array_merge(
$settings,
array(
'header_search_woo' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'header_search',
'priority' => 10,
'default' => kadence()->default( 'header_search_woo' ),
'label' => esc_html__( 'Search only Products?', 'kadence' ),
'transport' => 'refresh',
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
),
),
)
);
}
Theme_Customizer::add_settings( $settings );

View File

@@ -0,0 +1,445 @@
<?php
/**
* Header Builder Options
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
ob_start(); ?>
<div class="kadence-compontent-tabs nav-tab-wrapper wp-clearfix">
<a href="#" class="nav-tab kadence-general-tab kadence-compontent-tabs-button nav-tab-active" data-tab="general">
<span><?php esc_html_e( 'General', 'kadence' ); ?></span>
</a>
<a href="#" class="nav-tab kadence-design-tab kadence-compontent-tabs-button" data-tab="design">
<span><?php esc_html_e( 'Design', 'kadence' ); ?></span>
</a>
</div>
<?php
$compontent_tabs = ob_get_clean();
$settings = array(
'secondary_navigation_tabs' => array(
'control_type' => 'kadence_blank_control',
'section' => 'secondary_navigation',
'settings' => false,
'priority' => 1,
'description' => $compontent_tabs,
),
'secondary_navigation_link' => array(
'control_type' => 'kadence_focus_button_control',
'section' => 'secondary_navigation',
'settings' => false,
'priority' => 5,
'label' => esc_html__( 'Select Menu', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
),
'input_attrs' => array(
'section' => 'menu_locations',
),
),
'secondary_navigation_spacing' => array(
'control_type' => 'kadence_range_control',
'section' => 'secondary_navigation',
'priority' => 5,
'label' => esc_html__( 'Items Spacing', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.secondary-navigation .secondary-menu-container > ul > li.menu-item > a',
'property' => 'padding-left',
'pattern' => 'calc($ / 2)',
'key' => 'size',
),
array(
'type' => 'css',
'selector' => '.secondary-navigation .secondary-menu-container > ul > li.menu-item > a',
'property' => 'padding-right',
'pattern' => 'calc($ / 2)',
'key' => 'size',
),
),
'default' => kadence()->default( 'secondary_navigation_spacing' ),
'input_attrs' => array(
'min' => array(
'px' => 0,
'em' => 0,
'rem' => 0,
'vw' => 0,
),
'max' => array(
'px' => 100,
'em' => 12,
'rem' => 12,
'vw' => 12,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
'vw' => 0.01,
),
'units' => array( 'px', 'em', 'rem', 'vw' ),
'responsive' => false,
),
),
'secondary_navigation_open_type' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'secondary_navigation',
'priority' => 10,
'default' => kadence()->default( 'secondary_navigation_open_type' ),
'label' => esc_html__( 'Open on: ', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
),
'input_attrs' => array(
'layout' => array(
'hover' => array(
'tooltip' => __( 'Hover', 'kadence' ),
'name' => __( 'Hover', 'kadence' ),
'icon' => '',
),
'click' => array(
'tooltip' => __( 'Click', 'kadence' ),
'name' => __( 'Click', 'kadence' ),
'icon' => '',
),
),
'responsive' => false,
'class' => 'radio-btn-width-50',
),
),
'secondary_navigation_stretch' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'secondary_navigation',
'priority' => 6,
'default' => kadence()->default( 'secondary_navigation_stretch' ),
'label' => esc_html__( 'Stretch Menu?', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.site-header-item-secondary-navigation',
'pattern' => 'header-navigation-layout-stretch-$',
'key' => 'switch',
),
),
),
'secondary_navigation_fill_stretch' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'secondary_navigation',
'priority' => 6,
'default' => kadence()->default( 'secondary_navigation_fill_stretch' ),
'label' => esc_html__( 'Fill and Center Menu Items?', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
array(
'setting' => 'secondary_navigation_stretch',
'operator' => '==',
'value' => true,
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.site-header-item-secondary-navigation',
'pattern' => 'header-navigation-layout-fill-stretch-$',
'key' => 'switch',
),
),
),
'secondary_navigation_style' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'secondary_navigation',
'priority' => 10,
'default' => kadence()->default( 'secondary_navigation_style' ),
'label' => esc_html__( 'Navigation Style', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.secondary-navigation',
'pattern' => 'header-navigation-style-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'standard' => array(
'tooltip' => __( 'Standard', 'kadence' ),
'name' => __( 'Standard', 'kadence' ),
'icon' => '',
),
'fullheight' => array(
'tooltip' => __( 'Menu items are full height', 'kadence' ),
'name' => __( 'Full Height', 'kadence' ),
'icon' => '',
),
'underline' => array(
'tooltip' => __( 'Underline Hover/Active', 'kadence' ),
'name' => __( 'Underline', 'kadence' ),
'icon' => '',
),
'underline-fullheight' => array(
'tooltip' => __( 'Full Height Underline Hover/Active', 'kadence' ),
'name' => __( 'Full Height Underline', 'kadence' ),
'icon' => '',
),
),
'responsive' => false,
'class' => 'radio-btn-width-50',
),
),
'secondary_navigation_vertical_spacing' => array(
'control_type' => 'kadence_range_control',
'section' => 'secondary_navigation',
'label' => esc_html__( 'Items Top and Bottom Padding', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
array(
'setting' => 'secondary_navigation_style',
'operator' => 'sub_object_does_not_contain',
'sub_key' => 'layout',
'responsive' => false,
'value' => 'fullheight',
),
),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.secondary-navigation .secondary-menu-container > ul > li.menu-item > a',
'property' => 'padding-top',
'pattern' => '$',
'key' => 'size',
),
array(
'type' => 'css',
'selector' => '.secondary-navigation .secondary-menu-container > ul > li.menu-item > a',
'property' => 'padding-bottom',
'pattern' => '$',
'key' => 'size',
),
),
'default' => kadence()->default( 'secondary_navigation_vertical_spacing' ),
'input_attrs' => array(
'min' => array(
'px' => 0,
'em' => 0,
'rem' => 0,
'vh' => 0,
),
'max' => array(
'px' => 100,
'em' => 12,
'rem' => 12,
'vh' => 12,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
'vh' => 0.01,
),
'units' => array( 'px', 'em', 'rem', 'vh' ),
'responsive' => false,
),
),
'secondary_navigation_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'secondary_navigation',
'label' => esc_html__( 'Navigation Colors', 'kadence' ),
'default' => kadence()->default( 'secondary_navigation_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.secondary-navigation .secondary-menu-container > ul > li.menu-item > a',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.secondary-navigation .secondary-menu-container > ul > li.menu-item > a:hover',
'property' => 'color',
'pattern' => '$',
'key' => 'hover',
),
array(
'type' => 'css',
'selector' => '.secondary-navigation .secondary-menu-container > ul > li.menu-item.current-menu-item > a, .secondary-navigation .secondary-menu-container > ul > li.current_page_item > a',
'property' => 'color',
'pattern' => '$',
'key' => 'active',
),
),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Hover Color', 'kadence' ),
'palette' => true,
),
'active' => array(
'tooltip' => __( 'Active Color', 'kadence' ),
'palette' => true,
),
),
),
),
'secondary_navigation_background' => array(
'control_type' => 'kadence_color_control',
'section' => 'secondary_navigation',
'label' => esc_html__( 'Navigation Background', 'kadence' ),
'default' => kadence()->default( 'secondary_navigation_background' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.secondary-navigation .secondary-menu-container > ul > li.menu-item > a',
'property' => 'background',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.secondary-navigation .secondary-menu-container > ul > li.menu-item > a:hover',
'property' => 'background',
'pattern' => '$',
'key' => 'hover',
),
array(
'type' => 'css',
'selector' => '.secondary-navigation .secondary-menu-container > ul > li.menu-item.current-menu-item > a, .secondary-navigation .secondary-menu-container > ul > li.current_page_item > a',
'property' => 'background',
'pattern' => '$',
'key' => 'active',
),
),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Background', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Hover Background', 'kadence' ),
'palette' => true,
),
'active' => array(
'tooltip' => __( 'Active Background', 'kadence' ),
'palette' => true,
),
),
),
),
'secondary_navigation_parent_active' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'secondary_navigation',
'default' => kadence()->default( 'secondary_navigation_parent_active' ),
'label' => esc_html__( 'Make Parent of Current Menu Item Active?', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
),
),
'secondary_navigation_typography' => array(
'control_type' => 'kadence_typography_control',
'section' => 'secondary_navigation',
'label' => esc_html__( 'Navigation Font', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
),
'default' => kadence()->default( 'secondary_navigation_typography' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => '.secondary-navigation .secondary-menu-container > ul > li.menu-item a',
'pattern' => array(
'desktop' => '$',
'tablet' => '$',
'mobile' => '$',
),
'property' => 'font',
'key' => 'typography',
),
),
'input_attrs' => array(
'id' => 'secondary_navigation_typography',
'options' => 'no-color',
),
),
'info_secondary_submenu' => array(
'control_type' => 'kadence_title_control',
'section' => 'secondary_navigation',
'priority' => 20,
'label' => esc_html__( 'Dropdown Options', 'kadence' ),
'settings' => false,
),
'secondary_dropdown_link' => array(
'control_type' => 'kadence_focus_button_control',
'section' => 'secondary_navigation',
'settings' => false,
'priority' => 20,
'label' => esc_html__( 'Dropdown Options', 'kadence' ),
'input_attrs' => array(
'section' => 'kadence_customizer_dropdown_navigation',
),
),
);
Theme_Customizer::add_settings( $settings );

View File

@@ -0,0 +1,416 @@
<?php
/**
* Header Builder Options
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
$settings = array(
'header_social_tabs' => array(
'control_type' => 'kadence_tab_control',
'section' => 'header_social',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'header_social',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'header_social_design',
),
'active' => 'general',
),
),
'header_social_tabs_design' => array(
'control_type' => 'kadence_tab_control',
'section' => 'header_social_design',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'header_social',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'header_social_design',
),
'active' => 'design',
),
),
'header_social_items' => array(
'control_type' => 'kadence_social_control',
'section' => 'header_social',
'priority' => 6,
'default' => kadence()->default( 'header_social_items' ),
'label' => esc_html__( 'Social Items', 'kadence' ),
'partial' => array(
'selector' => '.header-social-wrap',
'container_inclusive' => true,
'render_callback' => 'Kadence\header_social',
),
),
'header_social_show_label' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'header_social',
'priority' => 8,
'default' => kadence()->default( 'header_social_show_label' ),
'label' => esc_html__( 'Show Icon Label?', 'kadence' ),
'partial' => array(
'selector' => '.header-social-wrap',
'container_inclusive' => true,
'render_callback' => 'Kadence\header_social',
),
),
'header_social_item_spacing' => array(
'control_type' => 'kadence_range_control',
'section' => 'header_social',
'label' => esc_html__( 'Item Spacing', 'kadence' ),
'default' => kadence()->default( 'header_social_item_spacing' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.header-social-wrap .header-social-inner-wrap',
'property' => 'gap',
'pattern' => '$',
'key' => 'size',
),
),
'input_attrs' => array(
'min' => array(
'px' => 0,
'em' => 0,
'rem' => 0,
),
'max' => array(
'px' => 50,
'em' => 3,
'rem' => 3,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
),
'units' => array( 'px', 'em', 'rem' ),
'responsive' => false,
),
),
'header_social_style' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'header_social_design',
'priority' => 10,
'default' => kadence()->default( 'header_social_style' ),
'label' => esc_html__( 'Social Style', 'kadence' ),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.header-social-inner-wrap',
'pattern' => 'social-style-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'filled' => array(
'name' => __( 'Filled', 'kadence' ),
),
'outline' => array(
'name' => __( 'Outline', 'kadence' ),
),
),
'responsive' => false,
),
),
'header_social_icon_size' => array(
'control_type' => 'kadence_range_control',
'section' => 'header_social_design',
'label' => esc_html__( 'Icon Size', 'kadence' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.header-social-wrap .header-social-inner-wrap',
'property' => 'font-size',
'pattern' => '$',
'key' => 'size',
),
),
'default' => kadence()->default( 'header_social_icon_size' ),
'input_attrs' => array(
'min' => array(
'px' => 0,
'em' => 0,
'rem' => 0,
),
'max' => array(
'px' => 100,
'em' => 12,
'rem' => 12,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
),
'units' => array( 'px', 'em', 'rem' ),
'responsive' => false,
),
),
'header_social_brand' => array(
'control_type' => 'kadence_select_control',
'section' => 'header_social_design',
'transport' => 'refresh',
'default' => kadence()->default( 'header_social_brand' ),
'label' => esc_html__( 'Use Brand Colors?', 'kadence' ),
'input_attrs' => array(
'options' => array(
'' => array(
'name' => __( 'No', 'kadence' ),
),
'always' => array(
'name' => __( 'Yes', 'kadence' ),
),
'onhover' => array(
'name' => __( 'On Hover', 'kadence' ),
),
'untilhover' => array(
'name' => __( 'Until Hover', 'kadence' ),
),
),
),
),
'header_social_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'header_social_design',
'label' => esc_html__( 'Colors', 'kadence' ),
'default' => kadence()->default( 'header_social_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#main-header .header-social-wrap a.social-button',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '#main-header .header-social-wrap a.social-button:hover',
'property' => 'color',
'pattern' => '$',
'key' => 'hover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Hover Color', 'kadence' ),
'palette' => true,
),
),
),
),
'header_social_background' => array(
'control_type' => 'kadence_color_control',
'section' => 'header_social_design',
'label' => esc_html__( 'Background Colors', 'kadence' ),
'default' => kadence()->default( 'header_social_background' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#main-header .header-social-wrap a.social-button',
'property' => 'background',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '#main-header .header-social-wrap a.social-button:hover',
'property' => 'background',
'pattern' => '$',
'key' => 'hover',
),
),
'context' => array(
array(
'setting' => 'header_social_style',
'operator' => '=',
'value' => 'filled',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Hover Color', 'kadence' ),
'palette' => true,
),
),
),
),
'header_social_border_colors' => array(
'control_type' => 'kadence_color_control',
'section' => 'header_social_design',
'label' => esc_html__( 'Border Colors', 'kadence' ),
'default' => kadence()->default( 'header_social_border' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#main-header .header-social-wrap a.social-button',
'property' => 'border-color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '#main-header .header-social-wrap a.social-button:hover',
'property' => 'border-color',
'pattern' => '$',
'key' => 'hover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Hover Color', 'kadence' ),
'palette' => true,
),
),
),
),
'header_social_border' => array(
'control_type' => 'kadence_border_control',
'section' => 'header_social_design',
'label' => esc_html__( 'Border', 'kadence' ),
'default' => kadence()->default( 'header_social_border' ),
'live_method' => array(
array(
'type' => 'css_border',
'selector' => '.header-social-wrap a.social-button',
'property' => 'border',
'pattern' => '$',
'key' => 'border',
),
),
'input_attrs' => array(
'responsive' => false,
'color' => false,
),
),
'header_social_border_radius' => array(
'control_type' => 'kadence_range_control',
'section' => 'header_social_design',
'label' => esc_html__( 'Border Radius', 'kadence' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.header-social-wrap a.social-button',
'property' => 'border-radius',
'pattern' => '$',
'key' => 'size',
),
),
'default' => kadence()->default( 'header_social_border_radius' ),
'input_attrs' => array(
'min' => array(
'px' => 0,
'em' => 0,
'rem' => 0,
'%' => 0,
),
'max' => array(
'px' => 100,
'em' => 12,
'rem' => 12,
'%' => 100,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
'%' => 1,
),
'units' => array( 'px', 'em', 'rem', '%' ),
'responsive' => false,
),
),
'header_social_typography' => array(
'control_type' => 'kadence_typography_control',
'section' => 'header_social_design',
'label' => esc_html__( 'Font', 'kadence' ),
'context' => array(
array(
'setting' => 'header_social_show_label',
'operator' => '=',
'value' => true,
),
),
'default' => kadence()->default( 'header_social_typography' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => '.header-social-wrap a.social-button .social-label',
'pattern' => array(
'desktop' => '$',
'tablet' => '$',
'mobile' => '$',
),
'property' => 'font',
'key' => 'typography',
),
),
'input_attrs' => array(
'id' => 'header_social_typography',
'options' => 'no-color',
),
),
'header_social_margin' => array(
'control_type' => 'kadence_measure_control',
'section' => 'header_social_design',
'priority' => 10,
'default' => kadence()->default( 'header_social_margin' ),
'label' => esc_html__( 'Margin', 'kadence' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#main-header .header-social-wrap',
'property' => 'margin',
'pattern' => '$',
'key' => 'measure',
),
),
'input_attrs' => array(
'responsive' => false,
),
),
'header_social_link_to_social_links' => array(
'control_type' => 'kadence_focus_button_control',
'section' => 'header_social',
'settings' => false,
'priority' => 25,
'label' => esc_html__( 'Set Social Links', 'kadence' ),
'input_attrs' => array(
'section' => 'kadence_customizer_general_social',
),
),
);
Theme_Customizer::add_settings( $settings );

View File

@@ -0,0 +1,930 @@
<?php
/**
* Header Sticky Options
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
$settings = array(
'header_sticky_tabs' => array(
'control_type' => 'kadence_tab_control',
'section' => 'header_sticky',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'header_sticky',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'header_sticky_design',
),
'active' => 'general',
),
),
'header_sticky_tabs_design' => array(
'control_type' => 'kadence_tab_control',
'section' => 'header_sticky_design',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'header_sticky',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'header_sticky_design',
),
'active' => 'design',
),
),
'header_sticky' => array(
'control_type' => 'kadence_select_control',
'section' => 'header_sticky',
'priority' => 10,
'transport' => 'refresh',
'default' => kadence()->default( 'header_sticky' ),
'label' => esc_html__( 'Enable Sticky Header?', 'kadence' ),
'input_attrs' => array(
'options' => array(
'no' => array(
'name' => __( 'No', 'kadence' ),
),
'main' => array(
'name' => __( 'Yes - Only Main Row', 'kadence' ),
),
'top_main' => array(
'name' => __( 'Yes - Top Row & Main Row', 'kadence' ),
),
'top_main_bottom' => array(
'name' => __( 'Yes - Whole Header', 'kadence' ),
),
'top' => array(
'name' => __( 'Yes - Only Top Row', 'kadence' ),
),
'bottom' => array(
'name' => __( 'Yes - Only Bottom Row', 'kadence' ),
),
),
),
),
'header_reveal_scroll_up' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'header_sticky',
'default' => kadence()->default( 'header_reveal_scroll_up' ),
'label' => esc_html__( 'Enable Reveal Sticky on Scroll up', 'kadence' ),
'transport' => 'refresh',
'context' => array(
array(
'setting' => 'header_sticky',
'operator' => '!=',
'value' => 'no',
),
),
),
'header_sticky_shrink' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'header_sticky',
'default' => kadence()->default( 'header_sticky_shrink' ),
'label' => esc_html__( 'Enable Main Row Shrinking', 'kadence' ),
'transport' => 'refresh',
'context' => array(
array(
'setting' => 'header_sticky',
'operator' => '!=',
'value' => 'no',
),
),
),
'header_sticky_main_shrink' => array(
'control_type' => 'kadence_range_control',
'section' => 'header_sticky',
'label' => esc_html__( 'Main Row Shrink Height', 'kadence' ),
'context' => array(
array(
'setting' => 'header_sticky_shrink',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'header_sticky',
'operator' => 'contain',
'value' => 'main',
),
),
'default' => kadence()->default( 'header_sticky_main_shrink' ),
'input_attrs' => array(
'min' => array(
'px' => 5,
'em' => 0,
'rem' => 0,
),
'max' => array(
'px' => 400,
'em' => 12,
'rem' => 12,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
),
'units' => array( 'px' ),
'responsive' => false,
),
),
'header_sticky_custom_logo' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'header_sticky',
'transport' => 'refresh',
'default' => kadence()->default( 'header_sticky_custom_logo' ),
'label' => esc_html__( 'Different Logo for Stuck Header?', 'kadence' ),
'context' => array(
array(
'setting' => 'logo_layout',
'operator' => 'sub_object_contains',
'sub_key' => 'include',
'responsive' => true,
'value' => 'logo',
),
array(
'setting' => 'header_sticky',
'operator' => '!=',
'value' => 'no',
),
),
),
'header_sticky_logo' => array(
'control_type' => 'media',
'section' => 'header_sticky',
'transport' => 'refresh',
'mime_type' => 'image',
'default' => '',
'label' => esc_html__( 'Stuck Header Logo', 'kadence' ),
'context' => array(
array(
'setting' => 'logo_layout',
'operator' => 'sub_object_contains',
'sub_key' => 'include',
'responsive' => true,
'value' => 'logo',
),
array(
'setting' => 'header_sticky',
'operator' => '!=',
'value' => 'no',
),
array(
'setting' => 'header_sticky_custom_logo',
'operator' => '=',
'value' => true,
),
),
),
'header_sticky_logo_width' => array(
'control_type' => 'kadence_range_control',
'section' => 'header_sticky',
'label' => esc_html__( 'Logo Max Width', 'kadence' ),
'description' => esc_html__( 'Define the maxium width for the logo', 'kadence' ),
'context' => array(
array(
'setting' => 'header_sticky',
'operator' => '!=',
'value' => 'no',
),
array(
'setting' => 'logo_layout',
'operator' => 'sub_object_contains',
'sub_key' => 'include',
'responsive' => true,
'value' => 'logo',
),
array(
'setting' => 'header_sticky_custom_logo',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'header_sticky_logo',
'operator' => '!empty',
'value' => '',
),
),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start) .site-branding img',
'property' => 'max-width',
'pattern' => '$',
'key' => 'size',
),
),
'default' => kadence()->default( 'header_sticky_logo_width' ),
'input_attrs' => array(
'min' => array(
'px' => 10,
'em' => 1,
'rem' => 1,
'vw' => 2,
'%' => 2,
),
'max' => array(
'px' => 800,
'em' => 12,
'rem' => 12,
'vw' => 80,
'%' => 80,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
'vw' => 1,
'%' => 1,
),
'units' => array( 'px', 'em', 'rem', 'vw', '%' ),
),
),
'info_mobile_header_sticky' => array(
'control_type' => 'kadence_title_control',
'section' => 'header_sticky',
'priority' => 20,
'label' => esc_html__( 'Mobile Sticky', 'kadence' ),
'settings' => false,
),
'mobile_header_sticky' => array(
'control_type' => 'kadence_select_control',
'section' => 'header_sticky',
'priority' => 20,
'transport' => 'refresh',
'default' => kadence()->default( 'mobile_header_sticky' ),
'label' => esc_html__( 'Enable Sticky for Mobile?', 'kadence' ),
'input_attrs' => array(
'options' => array(
'no' => array(
'name' => __( 'No', 'kadence' ),
),
'main' => array(
'name' => __( 'Yes - Only Main Row', 'kadence' ),
),
'top_main' => array(
'name' => __( 'Yes - Top Row & Main Row', 'kadence' ),
),
'top_main_bottom' => array(
'name' => __( 'Yes - Whole Header', 'kadence' ),
),
'top' => array(
'name' => __( 'Yes - Only Top Row', 'kadence' ),
),
'bottom' => array(
'name' => __( 'Yes - Only Bottom Row', 'kadence' ),
),
),
),
),
'mobile_header_reveal_scroll_up' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'header_sticky',
'priority' => 20,
'default' => kadence()->default( 'header_reveal_scroll_up' ),
'label' => esc_html__( 'Enable Reveal Sticky on Scroll up', 'kadence' ),
'transport' => 'refresh',
'context' => array(
array(
'setting' => 'mobile_header_sticky',
'operator' => '!=',
'value' => 'no',
),
),
),
'mobile_header_sticky_shrink' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'header_sticky',
'priority' => 20,
'default' => kadence()->default( 'mobile_header_sticky_shrink' ),
'label' => esc_html__( 'Enabled Main Row Shrinking', 'kadence' ),
'transport' => 'refresh',
'context' => array(
array(
'setting' => 'mobile_header_sticky',
'operator' => '!=',
'value' => 'no',
),
),
),
'mobile_header_sticky_main_shrink' => array(
'control_type' => 'kadence_range_control',
'section' => 'header_sticky',
'priority' => 20,
'label' => esc_html__( 'Main Row Shrink Height', 'kadence' ),
'context' => array(
array(
'setting' => 'mobile_header_sticky_shrink',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'mobile_header_sticky',
'operator' => 'contain',
'value' => 'main',
),
),
'default' => kadence()->default( 'mobile_header_sticky_main_shrink' ),
'input_attrs' => array(
'min' => array(
'px' => 5,
'em' => 0,
'rem' => 0,
),
'max' => array(
'px' => 400,
'em' => 12,
'rem' => 12,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
),
'units' => array( 'px' ),
'responsive' => false,
),
),
'header_sticky_custom_mobile_logo' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'header_sticky',
'transport' => 'refresh',
'priority' => 20,
'default' => kadence()->default( 'use_mobile_logo' ),
'label' => esc_html__( 'Different Logo for Mobile?', 'kadence' ),
'context' => array(
array(
'setting' => 'logo_layout',
'operator' => 'sub_object_contains',
'sub_key' => 'include',
'responsive' => true,
'value' => 'logo',
),
array(
'setting' => 'mobile_header_sticky',
'operator' => '!=',
'value' => 'no',
),
),
),
'header_sticky_mobile_logo' => array(
'control_type' => 'media',
'section' => 'header_sticky',
'transport' => 'refresh',
'priority' => 20,
'mime_type' => 'image',
'default' => '',
'label' => esc_html__( 'Mobile Logo', 'kadence' ),
'context' => array(
array(
'setting' => 'logo_layout',
'operator' => 'sub_object_contains',
'sub_key' => 'include',
'responsive' => true,
'value' => 'logo',
),
array(
'setting' => 'mobile_header_sticky',
'operator' => '!=',
'value' => 'no',
),
array(
'setting' => 'header_sticky_custom_mobile_logo',
'operator' => '=',
'value' => true,
),
),
),
'header_sticky_site_title_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'header_sticky_design',
'label' => esc_html__( 'Site Title Color', 'kadence' ),
'default' => kadence()->default( 'header_sticky_site_title_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start) .site-branding .site-title, #masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start) .site-branding .site-description',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
),
),
),
'header_sticky_logo_icon_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'header_sticky_design',
'label' => esc_html__( 'Logo Icon Color', 'kadence' ),
'default' => kadence()->default( 'header_sticky_logo_icon_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start) .site-branding .logo-icon',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
),
),
),
'header_sticky_navigation_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'header_sticky_design',
'label' => esc_html__( 'Navigation Colors', 'kadence' ),
'default' => kadence()->default( 'header_sticky_navigation_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start) .header-menu-container > ul > li > a, #masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start) .mobile-toggle-open-container .menu-toggle-open, #masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start) .search-toggle-open-container .search-toggle-open',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '#masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start) .header-menu-container > ul > li > a:hover, #masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start) .mobile-toggle-open-container .menu-toggle-open:hover, #masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start) .search-toggle-open-container .search-toggle-open:hover',
'property' => 'color',
'pattern' => '$',
'key' => 'hover',
),
array(
'type' => 'css',
'selector' => '#masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start) .header-menu-container > ul > li.current-menu-item > a, #masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start) .header-menu-container > ul > li.current_page_item > a',
'property' => 'color',
'pattern' => '$',
'key' => 'active',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Hover Color', 'kadence' ),
'palette' => true,
),
'active' => array(
'tooltip' => __( 'Active Color', 'kadence' ),
'palette' => true,
),
),
),
),
'header_sticky_navigation_background' => array(
'control_type' => 'kadence_color_control',
'section' => 'header_sticky_design',
'label' => esc_html__( 'Navigation Items Background', 'kadence' ),
'default' => kadence()->default( 'header_sticky_navigation_background' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start) .header-menu-container > ul > li > a',
'property' => 'background',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '#masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start) .header-menu-container > ul > li > a:hover',
'property' => 'background',
'pattern' => '$',
'key' => 'hover',
),
array(
'type' => 'css',
'selector' => '#masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start) .header-menu-container > ul > li.current-menu-item > a, #masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start) .header-menu-container > ul > li.current_page_item > a',
'property' => 'background',
'pattern' => '$',
'key' => 'active',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Background', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Hover Background', 'kadence' ),
'palette' => true,
),
'active' => array(
'tooltip' => __( 'Active Background', 'kadence' ),
'palette' => true,
),
),
),
),
'header_sticky_button_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'header_sticky_design',
'label' => esc_html__( 'Button Colors', 'kadence' ),
'default' => kadence()->default( 'header_sticky_button_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start) .header-button, #masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start) .mobile-header-button-wrap .mobile-header-button',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '#masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start) .header-button:hover, #masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start) .mobile-header-button-wrap .mobile-header-button:hover',
'property' => 'color',
'pattern' => '$',
'key' => 'hover',
),
array(
'type' => 'css',
'selector' => '#masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start) .header-button, #masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start) .mobile-header-button-wrap .mobile-header-button',
'property' => 'background',
'pattern' => '$',
'key' => 'background',
),
array(
'type' => 'css',
'selector' => '#masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start) .header-button:hover, #masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start) .mobile-header-button-wrap .mobile-header-button:hover',
'property' => 'background',
'pattern' => '$',
'key' => 'backgroundHover',
),
array(
'type' => 'css',
'selector' => '#masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start) .header-button, #masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start) .mobile-header-button-wrap .mobile-header-button',
'property' => 'border-color',
'pattern' => '$',
'key' => 'border',
),
array(
'type' => 'css',
'selector' => '#masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start) .header-button:hover, #masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start) .mobile-header-button-wrap .mobile-header-button:hover',
'property' => 'border-color',
'pattern' => '$',
'key' => 'borderHover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Hover Color', 'kadence' ),
'palette' => true,
),
'background' => array(
'tooltip' => __( 'Background', 'kadence' ),
'palette' => true,
),
'backgroundHover' => array(
'tooltip' => __( 'Background Hover', 'kadence' ),
'palette' => true,
),
'border' => array(
'tooltip' => __( 'Border', 'kadence' ),
'palette' => true,
),
'borderHover' => array(
'tooltip' => __( 'Border Hover', 'kadence' ),
'palette' => true,
),
),
),
),
'header_sticky_social_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'header_sticky_design',
'label' => esc_html__( 'Social Colors', 'kadence' ),
'default' => kadence()->default( 'header_sticky_social_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start) .header-social-wrap a.social-button, #masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start) .header-mobile-social-wrap a.social-button',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '#masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start) .header-social-wrap a.social-button:hover, #masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start) .header-mobile-social-wrap a.social-button:hover',
'property' => 'color',
'pattern' => '$',
'key' => 'hover',
),
array(
'type' => 'css',
'selector' => '#masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start) .header-social-wrap a.social-button, #masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start) .header-mobile-social-wrap a.social-button',
'property' => 'background',
'pattern' => '$',
'key' => 'background',
),
array(
'type' => 'css',
'selector' => '#masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start) .header-social-wrap a.social-button:hover, #masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start) .header-mobile-social-wrap a.social-button:hover',
'property' => 'background',
'pattern' => '$',
'key' => 'backgroundHover',
),
array(
'type' => 'css',
'selector' => '#masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start) .header-social-wrap a.social-button, #masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start) .header-mobile-social-wrap a.social-button',
'property' => 'border-color',
'pattern' => '$',
'key' => 'border',
),
array(
'type' => 'css',
'selector' => '#masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start) .header-social-wrap a.social-button:hover, #masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start) .header-mobile-social-wrap a.social-button:hover',
'property' => 'border-color',
'pattern' => '$',
'key' => 'borderHover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Hover Color', 'kadence' ),
'palette' => true,
),
'background' => array(
'tooltip' => __( 'Background', 'kadence' ),
'palette' => true,
),
'backgroundHover' => array(
'tooltip' => __( 'Background Hover', 'kadence' ),
'palette' => true,
),
'border' => array(
'tooltip' => __( 'Border', 'kadence' ),
'palette' => true,
),
'borderHover' => array(
'tooltip' => __( 'Border Hover', 'kadence' ),
'palette' => true,
),
),
),
),
'header_sticky_html_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'header_sticky_design',
'label' => esc_html__( 'HTML Colors', 'kadence' ),
'default' => kadence()->default( 'header_sticky_html_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start) .header-html,#masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start) .mobile-html',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '#masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start) .header-html a, #masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start) .mobile-html a',
'property' => 'color',
'pattern' => '$',
'key' => 'link',
),
array(
'type' => 'css',
'selector' => '#masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start) .header-html a:hover, #masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start) .mobile-html a:hover',
'property' => 'color',
'pattern' => '$',
'key' => 'hover',
),
),
'context' => array(
array(
'setting' => '__device',
'operator' => '==',
'value' => 'desktop',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Color', 'kadence' ),
'palette' => true,
),
'link' => array(
'tooltip' => __( 'Link Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Link Hover', 'kadence' ),
'palette' => true,
),
),
),
),
'header_sticky_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'header_sticky_design',
'label' => esc_html__( 'Sticky Header Background', 'kadence' ),
'default' => kadence()->default( 'header_sticky_background' ),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => '.wp-site-blocks #masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start):not(.site-header-row-container), .wp-site-blocks #masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start) > .site-header-row-container-inner',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Sticky Header Background', 'kadence' ),
),
),
'header_sticky_bottom_border' => array(
'control_type' => 'kadence_border_control',
'section' => 'header_sticky_design',
'label' => esc_html__( 'Sticky Bottom Border', 'kadence' ),
'default' => kadence()->default( 'header_sticky_bottom_border' ),
'live_method' => array(
array(
'type' => 'css_border',
'selector' => '#masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start)',
'property' => 'border-bottom',
'pattern' => '$',
'key' => 'border',
),
),
),
'header_sticky_box_shadow' => array(
'control_type' => 'kadence_shadow_control',
'section' => 'header_sticky_design',
'label' => esc_html__( 'Sticky Header Box Shadow', 'kadence' ),
'default' => kadence()->default( 'header_sticky_box_shadow' ),
'live_method' => array(
array(
'type' => 'css_boxshadow',
'selector' => '.site-main-header-wrap.site-header-row-container.site-header-focus-item.site-header-row-layout-standard.kadence-sticky-header.item-is-fixed.item-is-stuck, .site-header-upper-inner-wrap.kadence-sticky-header.item-is-fixed.item-is-stuck, .site-header-inner-wrap.kadence-sticky-header.item-is-fixed.item-is-stuck, .site-top-header-wrap.site-header-row-container.site-header-focus-item.site-header-row-layout-standard.kadence-sticky-header.item-is-fixed.item-is-stuck, .site-bottom-header-wrap.site-header-row-container.site-header-focus-item.site-header-row-layout-standard.kadence-sticky-header.item-is-fixed.item-is-stuck',
'property' => 'box-shadow',
'pattern' => '$',
'key' => 'box-shadow',
),
),
),
);
if ( class_exists( 'woocommerce' ) ) {
$settings = array_merge(
$settings,
array(
'header_sticky_cart_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'header_sticky_design',
'label' => esc_html__( 'Cart Colors', 'kadence' ),
'default' => kadence()->default( 'header_sticky_cart_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start) .header-cart-wrap .header-cart-button, #masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start) .header-mobile-cart-wrap .header-cart-button',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '#masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start) .header-cart-wrap .header-cart-button:hover, , #masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start) .header-mobile-cart-wrap .header-cart-button:hover',
'property' => 'color',
'pattern' => '$',
'key' => 'hover',
),
array(
'type' => 'css',
'selector' => '#masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start) .header-cart-wrap .header-cart-button, #masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start) .header-mobile-cart-wrap .header-cart-button',
'property' => 'background',
'pattern' => '$',
'key' => 'background',
),
array(
'type' => 'css',
'selector' => '#masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start) .header-cart-wrap .header-cart-button:hover, #masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start) .header-mobile-cart-wrap .header-cart-button:hover',
'property' => 'background',
'pattern' => '$',
'key' => 'backgroundHover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Hover Color', 'kadence' ),
'palette' => true,
),
'background' => array(
'tooltip' => __( 'Background', 'kadence' ),
'palette' => true,
),
'backgroundHover' => array(
'tooltip' => __( 'Background Hover', 'kadence' ),
'palette' => true,
),
),
),
),
'header_sticky_cart_total_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'header_sticky_design',
'label' => esc_html__( 'Cart Total Colors', 'kadence' ),
'default' => kadence()->default( 'header_sticky_cart_total_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start) .header-cart-wrap .header-cart-button .header-cart-total, #masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start) .header-mobile-cart-wrap .header-cart-button .header-cart-total',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '#masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start) .header-cart-wrap .header-cart-button:hover .header-cart-total, #masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start) .header-mobile-cart-wrap .header-cart-button:hover .header-cart-total',
'property' => 'color',
'pattern' => '$',
'key' => 'hover',
),
array(
'type' => 'css',
'selector' => '#masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start) .header-cart-wrap .header-cart-button .header-cart-total, #masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start) .header-mobile-cart-wrap .header-cart-button .header-cart-total',
'property' => 'background',
'pattern' => '$',
'key' => 'background',
),
array(
'type' => 'css',
'selector' => '#masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start) .header-cart-wrap .header-cart-button:hover .header-cart-total, #masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start) .header-mobile-cart-wrap .header-cart-button:hover .header-cart-total',
'property' => 'background',
'pattern' => '$',
'key' => 'backgroundHover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Hover Color', 'kadence' ),
'palette' => true,
),
'background' => array(
'tooltip' => __( 'Background', 'kadence' ),
'palette' => true,
),
'backgroundHover' => array(
'tooltip' => __( 'Background Hover', 'kadence' ),
'palette' => true,
),
),
),
),
)
);
}
Theme_Customizer::add_settings( $settings );

View File

@@ -0,0 +1,273 @@
<?php
/**
* Header Top Row Options
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
ob_start(); ?>
<div class="kadence-compontent-tabs nav-tab-wrapper wp-clearfix">
<a href="#" class="nav-tab kadence-general-tab kadence-compontent-tabs-button nav-tab-active" data-tab="general">
<span><?php esc_html_e( 'General', 'kadence' ); ?></span>
</a>
<a href="#" class="nav-tab kadence-design-tab kadence-compontent-tabs-button" data-tab="design">
<span><?php esc_html_e( 'Design', 'kadence' ); ?></span>
</a>
</div>
<?php
$compontent_tabs = ob_get_clean();
$settings = array(
'header_top_tabs' => array(
'control_type' => 'kadence_blank_control',
'section' => 'header_top',
'settings' => false,
'priority' => 1,
'description' => $compontent_tabs,
),
'header_top_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'header_top',
'priority' => 4,
'default' => kadence()->default( 'header_top_layout' ),
'label' => esc_html__( 'Layout', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => array(
'desktop' => '.site-top-header-wrap',
'tablet' => '#mobile-header .site-top-header-wrap',
'mobile' => '#mobile-header .site-top-header-wrap',
),
'pattern' => array(
'desktop' => 'site-header-row-layout-$',
'tablet' => 'site-header-row-tablet-layout-$',
'mobile' => 'site-header-row-mobile-layout-$',
),
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'standard' => array(
'tooltip' => __( 'Background Fullwidth, Content Contained', 'kadence' ),
'name' => __( 'Standard', 'kadence' ),
'icon' => '',
),
'fullwidth' => array(
'tooltip' => __( 'Background & Content Fullwidth', 'kadence' ),
'name' => __( 'Fullwidth', 'kadence' ),
'icon' => '',
),
'contained' => array(
'tooltip' => __( 'Background & Content Contained', 'kadence' ),
'name' => __( 'Contained', 'kadence' ),
'icon' => '',
),
),
),
),
'header_top_height' => array(
'control_type' => 'kadence_range_control',
'section' => 'header_top',
'priority' => 5,
'label' => esc_html__( 'Min Height', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#masthead .site-top-header-inner-wrap',
'property' => 'min-height',
'pattern' => '$',
'key' => 'size',
),
),
'default' => kadence()->default( 'header_top_height' ),
'input_attrs' => array(
'min' => array(
'px' => 10,
'em' => 1,
'rem' => 1,
'vh' => 2,
),
'max' => array(
'px' => 400,
'em' => 12,
'rem' => 12,
'vh' => 40,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
'vh' => 1,
),
'units' => array( 'px', 'em', 'rem', 'vh' ),
),
),
'header_top_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'header_top',
'label' => esc_html__( 'Top Row Background', 'kadence' ),
'default' => kadence()->default( 'header_top_background' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => '.site-top-header-wrap .site-header-row-container-inner',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Top Row Background', 'kadence' ),
),
),
'header_top_border' => array(
'control_type' => 'kadence_borders_control',
'section' => 'header_top',
'label' => esc_html__( 'Border', 'kadence' ),
'default' => kadence()->default( 'header_top_border' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
),
'settings' => array(
'border_top' => 'header_top_top_border',
'border_bottom' => 'header_top_bottom_border',
),
'live_method' => array(
'header_top_top_border' => array(
array(
'type' => 'css_border',
'selector' => array(
'desktop' => '.site-top-header-wrap .site-header-row-container-inner',
'tablet' => '#mobile-header .site-top-header-wrap .site-header-row-container-inner',
'mobile' => '#mobile-header .site-top-header-wrap .site-header-row-container-inner',
),
'pattern' => array(
'desktop' => '$',
'tablet' => '$',
'mobile' => '$',
),
'property' => 'border-top',
'pattern' => '$',
'key' => 'border',
),
),
'header_top_bottom_border' => array(
array(
'type' => 'css_border',
'selector' => array(
'desktop' => '.site-top-header-wrap .site-header-row-container-inner',
'tablet' => '#mobile-header .site-top-header-wrap .site-header-row-container-inner',
'mobile' => '#mobile-header .site-top-header-wrap .site-header-row-container-inner',
),
'pattern' => array(
'desktop' => '$',
'tablet' => '$',
'mobile' => '$',
),
'property' => 'border-bottom',
'pattern' => '$',
'key' => 'border',
),
),
),
),
'header_top_trans_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'header_top',
'label' => esc_html__( '(When Transparent Header) Top Row Background', 'kadence' ),
'default' => kadence()->default( 'header_top_trans_background' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
array(
'setting' => 'transparent_header_enable',
'operator' => '=',
'value' => true,
),
),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => '.transparent-header #masthead .site-top-header-wrap .site-header-row-container-inner',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Transparent Header Top Row Background', 'kadence' ),
),
),
'header_top_padding' => array(
'control_type' => 'kadence_measure_control',
'section' => 'header_top',
'default' => kadence()->default( 'header_top_padding' ),
'label' => esc_html__( 'Padding', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.site-top-header-wrap .site-header-row-container-inner>.site-container',
'property' => 'padding',
'pattern' => '$',
'key' => 'measure',
),
),
'input_attrs' => array(
'min' => array(
'px' => 0,
'em' => 0,
'rem' => 0,
),
'max' => array(
'px' => 100,
'em' => 6,
'rem' => 6,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
),
'units' => array( 'px', 'em', 'rem' ),
'responsive' => true,
),
),
);
Theme_Customizer::add_settings( $settings );

View File

@@ -0,0 +1,315 @@
<?php
/**
* Header Builder Options
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
$settings = array(
'mobile_trigger_tabs' => array(
'control_type' => 'kadence_tab_control',
'section' => 'mobile_trigger',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'mobile_trigger',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'mobile_trigger_design',
),
'active' => 'general',
),
),
'mobile_trigger_tabs_design' => array(
'control_type' => 'kadence_tab_control',
'section' => 'mobile_trigger_design',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'mobile_trigger',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'mobile_trigger_design',
),
'active' => 'design',
),
),
'mobile_trigger_label' => array(
'control_type' => 'kadence_text_control',
'section' => 'mobile_trigger',
'sanitize' => 'sanitize_text_field',
'priority' => 6,
'default' => kadence()->default( 'mobile_trigger_label' ),
'label' => esc_html__( 'Menu Label', 'kadence' ),
'live_method' => array(
array(
'type' => 'html',
'selector' => '.menu-toggle-label',
'pattern' => '$',
'key' => '',
),
),
),
'mobile_trigger_icon' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'mobile_trigger',
'priority' => 10,
'default' => kadence()->default( 'mobile_trigger_icon' ),
'label' => esc_html__( 'Trigger Icon', 'kadence' ),
'partial' => array(
'selector' => '.menu-toggle-icon',
'container_inclusive' => false,
'render_callback' => 'Kadence\popup_toggle',
),
'input_attrs' => array(
'layout' => array(
'menu' => array(
'icon' => 'menu',
),
'menu2' => array(
'icon' => 'menu2',
),
'menu3' => array(
'icon' => 'menu3',
),
),
'responsive' => false,
),
),
'mobile_trigger_style' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'mobile_trigger_design',
'priority' => 10,
'default' => kadence()->default( 'mobile_trigger_style' ),
'label' => esc_html__( 'Trigger Style', 'kadence' ),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.menu-toggle-open',
'pattern' => 'menu-toggle-style-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'default' => array(
'name' => __( 'Default', 'kadence' ),
),
'bordered' => array(
'name' => __( 'Bordered', 'kadence' ),
),
),
'responsive' => false,
),
),
'mobile_trigger_border' => array(
'control_type' => 'kadence_border_control',
'section' => 'mobile_trigger_design',
'label' => esc_html__( 'Trigger Border', 'kadence' ),
'default' => kadence()->default( 'mobile_trigger_border' ),
'context' => array(
array(
'setting' => 'mobile_trigger_style',
'operator' => 'sub_object_contains',
'sub_key' => 'layout',
'responsive' => false,
'value' => 'bordered',
),
),
'live_method' => array(
array(
'type' => 'css_border',
'selector' => '.mobile-toggle-open-container .menu-toggle-style-bordered',
'pattern' => '$',
'property' => 'border',
'key' => 'border',
),
),
'input_attrs' => array(
'color' => false,
'responsive' => false,
),
),
'mobile_trigger_icon_size' => array(
'control_type' => 'kadence_range_control',
'section' => 'mobile_trigger_design',
'label' => esc_html__( 'Icon Size', 'kadence' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.mobile-toggle-open-container .menu-toggle-open .menu-toggle-icon',
'property' => 'font-size',
'pattern' => '$',
'key' => 'size',
),
),
'default' => kadence()->default( 'mobile_trigger_icon_size' ),
'input_attrs' => array(
'min' => array(
'px' => 0,
'em' => 0,
'rem' => 0,
),
'max' => array(
'px' => 100,
'em' => 12,
'rem' => 12,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
),
'units' => array( 'px', 'em', 'rem' ),
'responsive' => false,
),
),
'mobile_trigger_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'mobile_trigger_design',
'label' => esc_html__( 'Trigger Colors', 'kadence' ),
'default' => kadence()->default( 'mobile_trigger_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.mobile-toggle-open-container .menu-toggle-open',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.mobile-toggle-open-container .menu-toggle-open:hover',
'property' => 'color',
'pattern' => '$',
'key' => 'hover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Hover Color', 'kadence' ),
'palette' => true,
),
),
),
),
'mobile_trigger_background' => array(
'control_type' => 'kadence_color_control',
'section' => 'mobile_trigger_design',
'label' => esc_html__( 'Trigger Background', 'kadence' ),
'default' => kadence()->default( 'mobile_trigger_background' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.mobile-toggle-open-container .menu-toggle-open',
'property' => 'background',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.mobile-toggle-open-container .menu-toggle-open:hover',
'property' => 'background',
'pattern' => '$',
'key' => 'hover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Background', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Hover Background', 'kadence' ),
'palette' => true,
),
),
),
),
'mobile_trigger_typography' => array(
'control_type' => 'kadence_typography_control',
'section' => 'mobile_trigger_design',
'label' => esc_html__( 'Trigger Font', 'kadence' ),
'context' => array(
array(
'setting' => 'mobile_trigger_label',
'operator' => '!empty',
'value' => '',
),
),
'default' => kadence()->default( 'mobile_trigger_typography' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => '.mobile-toggle-open-container .menu-toggle-open',
'pattern' => array(
'desktop' => '$',
'tablet' => '$',
'mobile' => '$',
),
'property' => 'font',
'key' => 'typography',
),
),
'input_attrs' => array(
'id' => 'mobile_trigger_typography',
'options' => 'no-color',
),
),
'mobile_trigger_padding' => array(
'control_type' => 'kadence_measure_control',
'section' => 'mobile_trigger_design',
'priority' => 10,
'default' => kadence()->default( 'mobile_trigger_padding' ),
'label' => esc_html__( 'Trigger Padding', 'kadence' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.mobile-toggle-open-container .menu-toggle-open',
'property' => 'padding',
'pattern' => '$',
'key' => 'measure',
),
),
'input_attrs' => array(
'responsive' => false,
),
),
'info_link_drawer_container' => array(
'control_type' => 'kadence_title_control',
'section' => 'mobile_trigger',
'priority' => 20,
'label' => esc_html__( 'Drawer Container Options', 'kadence' ),
'settings' => false,
),
'mobile_trigger_drawer_link' => array(
'control_type' => 'kadence_focus_button_control',
'section' => 'mobile_trigger',
'settings' => false,
'priority' => 20,
'label' => esc_html__( 'Drawer Container Options', 'kadence' ),
'input_attrs' => array(
'section' => 'kadence_customizer_header_popup',
),
),
);
Theme_Customizer::add_settings( $settings );

View File

@@ -0,0 +1,597 @@
<?php
/**
* Header Main Row Options
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
$settings = array(
'sfwd-courses_archive_tabs' => array(
'control_type' => 'kadence_tab_control',
'section' => 'sfwd_courses_archive_layout',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'sfwd_courses_archive_layout',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'sfwd_courses_archive_layout_design',
),
'active' => 'general',
),
),
'sfwd-courses_archive_tabs_design' => array(
'control_type' => 'kadence_tab_control',
'section' => 'sfwd_courses_archive_layout_design',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'sfwd_courses_archive_layout',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'sfwd_courses_archive_layout_design',
),
'active' => 'design',
),
),
'info_sfwd-courses_archive_title' => array(
'control_type' => 'kadence_title_control',
'section' => 'sfwd_courses_archive_layout',
'priority' => 2,
'label' => esc_html__( 'Archive Title', 'kadence' ),
'settings' => false,
),
'info_sfwd-courses_archive_title_design' => array(
'control_type' => 'kadence_title_control',
'section' => 'sfwd_courses_archive_layout_design',
'priority' => 2,
'label' => esc_html__( 'Archive Title', 'kadence' ),
'settings' => false,
),
'sfwd-courses_archive_title' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'sfwd_courses_archive_layout',
'priority' => 3,
'default' => kadence()->default( 'sfwd-courses_archive_title' ),
'label' => esc_html__( 'Show Archive Title?', 'kadence' ),
'transport' => 'refresh',
),
'sfwd-courses_archive_title_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'sfwd_courses_archive_layout',
'label' => esc_html__( 'Archive Title Layout', 'kadence' ),
'transport' => 'refresh',
'priority' => 4,
'default' => kadence()->default( 'sfwd-courses_archive_title_layout' ),
'context' => array(
array(
'setting' => 'sfwd-courses_archive_title',
'operator' => '=',
'value' => true,
),
),
'input_attrs' => array(
'layout' => array(
'normal' => array(
'tooltip' => __( 'In Content', 'kadence' ),
'icon' => 'incontent',
),
'above' => array(
'tooltip' => __( 'Above Content', 'kadence' ),
'icon' => 'abovecontent',
),
),
'responsive' => false,
'class' => 'kadence-two-col',
),
),
'sfwd-courses_archive_title_inner_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'sfwd_courses_archive_layout',
'priority' => 4,
'default' => kadence()->default( 'sfwd-courses_archive_title_inner_layout' ),
'label' => esc_html__( 'Container Width', 'kadence' ),
'context' => array(
array(
'setting' => 'sfwd-courses_archive_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'sfwd-courses_archive_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.sfwd-courses-archive-hero-section',
'pattern' => 'entry-hero-layout-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'standard' => array(
'tooltip' => __( 'Background Fullwidth, Content Contained', 'kadence' ),
'name' => __( 'Standard', 'kadence' ),
'icon' => '',
),
'fullwidth' => array(
'tooltip' => __( 'Background & Content Fullwidth', 'kadence' ),
'name' => __( 'Fullwidth', 'kadence' ),
'icon' => '',
),
'contained' => array(
'tooltip' => __( 'Background & Content Contained', 'kadence' ),
'name' => __( 'Contained', 'kadence' ),
'icon' => '',
),
),
'responsive' => false,
),
),
'sfwd-courses_archive_title_align' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'sfwd_courses_archive_layout',
'label' => esc_html__( 'Course Title Align', 'kadence' ),
'priority' => 4,
'default' => kadence()->default( 'sfwd-courses_archive_title_align' ),
'context' => array(
array(
'setting' => 'sfwd-courses_archive_title',
'operator' => '=',
'value' => true,
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.sfwd-courses-archive-title',
'pattern' => array(
'desktop' => 'title-align-$',
'tablet' => 'title-tablet-align-$',
'mobile' => 'title-mobile-align-$',
),
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'left' => array(
'tooltip' => __( 'Left Align Title', 'kadence' ),
'dashicon' => 'editor-alignleft',
),
'center' => array(
'tooltip' => __( 'Center Align Title', 'kadence' ),
'dashicon' => 'editor-aligncenter',
),
'right' => array(
'tooltip' => __( 'Right Align Title', 'kadence' ),
'dashicon' => 'editor-alignright',
),
),
'responsive' => true,
),
),
'sfwd-courses_archive_title_height' => array(
'control_type' => 'kadence_range_control',
'section' => 'sfwd_courses_archive_layout',
'priority' => 5,
'label' => esc_html__( 'Container Min Height', 'kadence' ),
'context' => array(
array(
'setting' => 'sfwd-courses_archive_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'sfwd-courses_archive_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#inner-wrap .sfwd-courses-archive-hero-section .entry-header',
'property' => 'min-height',
'pattern' => '$',
'key' => 'size',
),
),
'default' => kadence()->default( 'sfwd-courses_archive_title_height' ),
'input_attrs' => array(
'min' => array(
'px' => 10,
'em' => 1,
'rem' => 1,
'vh' => 2,
),
'max' => array(
'px' => 800,
'em' => 12,
'rem' => 12,
'vh' => 100,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
'vh' => 1,
),
'units' => array( 'px', 'em', 'rem', 'vh' ),
),
),
'sfwd-courses_archive_title_elements' => array(
'control_type' => 'kadence_sorter_control',
'section' => 'sfwd_courses_archive_layout',
'priority' => 6,
'default' => kadence()->default( 'sfwd-courses_archive_title_elements' ),
'label' => esc_html__( 'Title Elements', 'kadence' ),
'transport' => 'refresh',
'context' => array(
array(
'setting' => 'sfwd-courses_archive_title',
'operator' => '=',
'value' => true,
),
),
'settings' => array(
'elements' => 'sfwd-courses_archive_title_elements',
'title' => 'sfwd-courses_archive_title_element_title',
'breadcrumb' => 'sfwd-courses_archive_title_element_breadcrumb',
'description' => 'sfwd-courses_archive_title_element_description',
),
),
'sfwd-courses_archive_title_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'sfwd_courses_archive_layout_design',
'label' => esc_html__( 'Title Color', 'kadence' ),
'default' => kadence()->default( 'sfwd-courses_archive_title_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.sfwd-courses-archive-title h1',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Color', 'kadence' ),
'palette' => true,
),
),
),
),
'sfwd-courses_archive_title_description_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'sfwd_courses_archive_layout_design',
'label' => esc_html__( 'Description Colors', 'kadence' ),
'default' => kadence()->default( 'sfwd-courses_archive_title_description_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.sfwd-courses-archive-title .archive-description',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.sfwd-courses-archive-title .archive-description a:hover',
'property' => 'color',
'pattern' => '$',
'key' => 'hover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Link Hover Color', 'kadence' ),
'palette' => true,
),
),
),
),
'sfwd-courses_archive_title_breadcrumb_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'sfwd_courses_archive_layout_design',
'label' => esc_html__( 'Breadcrumb Colors', 'kadence' ),
'default' => kadence()->default( 'sfwd-courses_archive_title_breadcrumb_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.sfwd-courses-archive-title .kadence-breadcrumbs',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.sfwd-courses-archive-title .kadence-breadcrumbs a:hover',
'property' => 'color',
'pattern' => '$',
'key' => 'hover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Link Hover Color', 'kadence' ),
'palette' => true,
),
),
),
),
'sfwd-courses_archive_title_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'sfwd_courses_archive_layout_design',
'label' => esc_html__( 'Archive Title Background', 'kadence' ),
'default' => kadence()->default( 'sfwd-courses_archive_title_background' ),
'context' => array(
array(
'setting' => 'sfwd-courses_archive_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'sfwd-courses_archive_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => '#inner-wrap .sfwd-courses-archive-hero-section .entry-hero-container-inner',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Course Archive Title Background', 'kadence' ),
),
),
'sfwd-courses_archive_title_overlay_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'sfwd_courses_archive_layout_design',
'label' => esc_html__( 'Background Overlay Color', 'kadence' ),
'default' => kadence()->default( 'sfwd-courses_archive_title_overlay_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.sfwd-courses-archive-hero-section .hero-section-overlay',
'property' => 'background',
'pattern' => '$',
'key' => 'color',
),
),
'context' => array(
array(
'setting' => 'sfwd-courses_archive_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'sfwd-courses_archive_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Overlay Color', 'kadence' ),
'palette' => true,
),
),
'allowGradient' => true,
),
),
'sfwd-courses_archive_title_border' => array(
'control_type' => 'kadence_borders_control',
'section' => 'sfwd_courses_archive_layout_design',
'label' => esc_html__( 'Border', 'kadence' ),
'default' => kadence()->default( 'sfwd-courses_archive_title_border' ),
'context' => array(
array(
'setting' => 'sfwd-courses_archive_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'sfwd-courses_archive_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'settings' => array(
'border_top' => 'sfwd-courses_archive_title_top_border',
'border_bottom' => 'sfwd-courses_archive_title_bottom_border',
),
'live_method' => array(
'sfwd-courses_archive_title_top_border' => array(
array(
'type' => 'css_border',
'selector' => '.sfwd-courses-archive-hero-section .entry-hero-container-inner',
'pattern' => '$',
'property' => 'border-top',
'key' => 'border',
),
),
'sfwd-courses_archive_title_bottom_border' => array(
array(
'type' => 'css_border',
'selector' => '.sfwd-courses-archive-hero-section .entry-hero-container-inner',
'property' => 'border-bottom',
'pattern' => '$',
'key' => 'border',
),
),
),
),
'info_sfwd-courses_archive_layout' => array(
'control_type' => 'kadence_title_control',
'section' => 'sfwd_courses_archive_layout',
'priority' => 10,
'label' => esc_html__( 'Archive Layout', 'kadence' ),
'settings' => false,
),
'info_sfwd-courses_archive_layout_design' => array(
'control_type' => 'kadence_title_control',
'section' => 'sfwd_courses_archive_layout_design',
'priority' => 10,
'label' => esc_html__( 'Archive Layout', 'kadence' ),
'settings' => false,
),
'sfwd-courses_archive_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'sfwd_courses_archive_layout',
'label' => esc_html__( 'Archive Layout', 'kadence' ),
'transport' => 'refresh',
'priority' => 10,
'default' => kadence()->default( 'sfwd-courses_archive_layout' ),
'input_attrs' => array(
'layout' => array(
'normal' => array(
'tooltip' => __( 'Normal', 'kadence' ),
'icon' => 'normal',
),
'narrow' => array(
'tooltip' => __( 'Narrow', 'kadence' ),
'icon' => 'narrow',
),
'fullwidth' => array(
'tooltip' => __( 'Fullwidth', 'kadence' ),
'icon' => 'fullwidth',
),
'left' => array(
'tooltip' => __( 'Left Sidebar', 'kadence' ),
'icon' => 'leftsidebar',
),
'right' => array(
'tooltip' => __( 'Right Sidebar', 'kadence' ),
'icon' => 'rightsidebar',
),
),
'class' => 'kadence-three-col',
'responsive' => false,
),
),
'sfwd-courses_archive_content_style' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'sfwd_courses_archive_layout',
'label' => esc_html__( 'Content Style', 'kadence' ),
'priority' => 10,
'default' => kadence()->default( 'sfwd-courses_archive_content_style' ),
'live_method' => array(
array(
'type' => 'class',
'selector' => 'body.post-type-archive-sfwd-courses',
'pattern' => 'content-style-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'boxed' => array(
'tooltip' => __( 'Boxed', 'kadence' ),
'icon' => 'gridBoxed',
),
'unboxed' => array(
'tooltip' => __( 'Unboxed', 'kadence' ),
'icon' => 'gridUnboxed',
),
),
'responsive' => false,
'class' => 'kadence-two-col',
),
),
'sfwd-courses_archive_columns' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'sfwd_courses_archive_layout',
'priority' => 20,
'label' => esc_html__( 'Course Archive Columns', 'kadence' ),
'transport' => 'refresh',
'default' => kadence()->default( 'sfwd-courses_archive_columns' ),
'input_attrs' => array(
'layout' => array(
'2' => array(
'name' => __( '2', 'kadence' ),
),
'3' => array(
'name' => __( '3', 'kadence' ),
),
'4' => array(
'name' => __( '4', 'kadence' ),
),
),
'responsive' => false,
),
),
'sfwd-courses_archive_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'sfwd_courses_archive_layout_design',
'label' => esc_html__( 'Site Background', 'kadence' ),
'default' => kadence()->default( 'sfwd-courses_archive_background' ),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => 'body.post-type-archive-sfwd-courses',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Course Archive Background', 'kadence' ),
),
),
'sfwd-courses_archive_content_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'sfwd_courses_archive_layout_design',
'label' => esc_html__( 'Content Background', 'kadence' ),
'default' => kadence()->default( 'sfwd-courses_archive_content_background' ),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => 'body.post-type-archive-sfwd-courses .content-bg, body.post-type-archive-sfwd-courses.content-style-unboxed .site',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Archive Content Background', 'kadence' ),
),
),
);
Theme_Customizer::add_settings( $settings );

View File

@@ -0,0 +1,713 @@
<?php
/**
* Course Layout Options
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
$settings = array(
'sfwd_courses_layout_tabs' => array(
'control_type' => 'kadence_tab_control',
'section' => 'sfwd_courses_layout',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'sfwd_courses_layout',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'sfwd_courses_layout_design',
),
'active' => 'general',
),
),
'sfwd_courses_layout_tabs_design' => array(
'control_type' => 'kadence_tab_control',
'section' => 'sfwd_courses_layout_design',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'sfwd_courses_layout',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'sfwd_courses_layout_design',
),
'active' => 'design',
),
),
'info_sfwd-courses_title' => array(
'control_type' => 'kadence_title_control',
'section' => 'sfwd_courses_layout',
'priority' => 2,
'label' => esc_html__( 'Course Title', 'kadence' ),
'settings' => false,
),
'info_sfwd-courses_title_design' => array(
'control_type' => 'kadence_title_control',
'section' => 'sfwd_courses_layout_design',
'priority' => 2,
'label' => esc_html__( 'Course Title', 'kadence' ),
'settings' => false,
),
'sfwd-courses_title' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'sfwd_courses_layout',
'priority' => 3,
'default' => kadence()->default( 'sfwd-courses_title' ),
'label' => esc_html__( 'Show Course Title?', 'kadence' ),
'transport' => 'refresh',
),
'sfwd-courses_title_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'sfwd_courses_layout',
'label' => esc_html__( 'Course Title Layout', 'kadence' ),
'transport' => 'refresh',
'priority' => 4,
'default' => kadence()->default( 'sfwd-courses_title_layout' ),
'context' => array(
array(
'setting' => 'sfwd-courses_title',
'operator' => '=',
'value' => true,
),
),
'input_attrs' => array(
'layout' => array(
'normal' => array(
'tooltip' => __( 'In Content', 'kadence' ),
'icon' => 'incontent',
),
'above' => array(
'tooltip' => __( 'Above Content', 'kadence' ),
'icon' => 'abovecontent',
),
),
'responsive' => false,
'class' => 'kadence-two-col',
),
),
'sfwd-courses_title_inner_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'sfwd_courses_layout',
'priority' => 4,
'default' => kadence()->default( 'sfwd-courses_title_inner_layout' ),
'label' => esc_html__( 'Title Container Width', 'kadence' ),
'context' => array(
array(
'setting' => 'sfwd-courses_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'sfwd-courses_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.sfwd-courses-hero-section',
'pattern' => 'entry-hero-layout-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'standard' => array(
'tooltip' => __( 'Background Fullwidth, Content Contained', 'kadence' ),
'name' => __( 'Standard', 'kadence' ),
'icon' => '',
),
'fullwidth' => array(
'tooltip' => __( 'Background & Content Fullwidth', 'kadence' ),
'name' => __( 'Fullwidth', 'kadence' ),
'icon' => '',
),
'contained' => array(
'tooltip' => __( 'Background & Content Contained', 'kadence' ),
'name' => __( 'Contained', 'kadence' ),
'icon' => '',
),
),
'responsive' => false,
),
),
'sfwd-courses_title_align' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'sfwd_courses_layout',
'label' => esc_html__( 'Course Title Align', 'kadence' ),
'priority' => 4,
'default' => kadence()->default( 'sfwd-courses_title_align' ),
'context' => array(
array(
'setting' => 'sfwd-courses_title',
'operator' => '=',
'value' => true,
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.sfwd-courses-title',
'pattern' => array(
'desktop' => 'title-align-$',
'tablet' => 'title-tablet-align-$',
'mobile' => 'title-mobile-align-$',
),
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'left' => array(
'tooltip' => __( 'Left Align Title', 'kadence' ),
'dashicon' => 'editor-alignleft',
),
'center' => array(
'tooltip' => __( 'Center Align Title', 'kadence' ),
'dashicon' => 'editor-aligncenter',
),
'right' => array(
'tooltip' => __( 'Right Align Title', 'kadence' ),
'dashicon' => 'editor-alignright',
),
),
'responsive' => true,
),
),
'sfwd-courses_title_height' => array(
'control_type' => 'kadence_range_control',
'section' => 'sfwd_courses_layout',
'priority' => 5,
'label' => esc_html__( 'Title Container Min Height', 'kadence' ),
'context' => array(
array(
'setting' => 'sfwd-courses_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'sfwd-courses_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#inner-wrap .sfwd-courses-hero-section .entry-header',
'property' => 'min-height',
'pattern' => '$',
'key' => 'size',
),
),
'default' => kadence()->default( 'sfwd-courses_title_height' ),
'input_attrs' => array(
'min' => array(
'px' => 10,
'em' => 1,
'rem' => 1,
'vh' => 2,
),
'max' => array(
'px' => 800,
'em' => 12,
'rem' => 12,
'vh' => 100,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
'vh' => 1,
),
'units' => array( 'px', 'em', 'rem', 'vh' ),
),
),
'sfwd-courses_title_elements' => array(
'control_type' => 'kadence_sorter_control',
'section' => 'sfwd_courses_layout',
'priority' => 6,
'default' => kadence()->default( 'sfwd-courses_title_elements' ),
'label' => esc_html__( 'Title Elements', 'kadence' ),
'transport' => 'refresh',
'settings' => array(
'elements' => 'sfwd-courses_title_elements',
'title' => 'sfwd-courses_title_element_title',
'breadcrumb' => 'sfwd-courses_title_element_breadcrumb',
),
'context' => array(
array(
'setting' => 'sfwd-courses_title',
'operator' => '=',
'value' => true,
),
),
'input_attrs' => array(
'group' => 'sfwd-courses_title_element',
),
),
'sfwd-courses_title_font' => array(
'control_type' => 'kadence_typography_control',
'section' => 'sfwd_courses_layout_design',
'label' => esc_html__( 'Course Title Font', 'kadence' ),
'default' => kadence()->default( 'sfwd-courses_title_font' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => '.sfwd-courses-title h1',
'property' => 'font',
'key' => 'typography',
),
),
'context' => array(
array(
'setting' => 'sfwd-courses_title',
'operator' => '=',
'value' => true,
),
),
'input_attrs' => array(
'id' => 'sfwd-courses_title_font',
'headingInherit' => true,
),
),
'sfwd-courses_title_breadcrumb_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'sfwd_courses_layout_design',
'label' => esc_html__( 'Breadcrumb Colors', 'kadence' ),
'default' => kadence()->default( 'sfwd-courses_title_breadcrumb_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.sfwd-courses-title .kadence-breadcrumbs',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.sfwd-courses-title .kadence-breadcrumbs a:hover',
'property' => 'color',
'pattern' => '$',
'key' => 'hover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Link Hover Color', 'kadence' ),
'palette' => true,
),
),
),
),
'sfwd-courses_title_breadcrumb_font' => array(
'control_type' => 'kadence_typography_control',
'section' => 'sfwd_courses_layout_design',
'label' => esc_html__( 'Breadcrumb Font', 'kadence' ),
'default' => kadence()->default( 'sfwd-courses_title_breadcrumb_font' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => '.sfwd-courses-title .kadence-breadcrumbs',
'property' => 'font',
'key' => 'typography',
),
),
'input_attrs' => array(
'id' => 'sfwd-courses_title_breadcrumb_font',
'options' => 'no-color',
),
),
'sfwd-courses_title_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'sfwd_courses_layout_design',
'label' => esc_html__( 'Course Above Area Background', 'kadence' ),
'default' => kadence()->default( 'sfwd-courses_title_background' ),
'context' => array(
array(
'setting' => 'sfwd-courses_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'sfwd-courses_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => '#inner-wrap .sfwd-courses-hero-section .entry-hero-container-inner',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Course Title Background', 'kadence' ),
),
),
'sfwd-courses_title_featured_image' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'sfwd_courses_layout_design',
'default' => kadence()->default( 'sfwd-courses_title_featured_image' ),
'label' => esc_html__( 'Use Featured Image for Background?', 'kadence' ),
'transport' => 'refresh',
'context' => array(
array(
'setting' => 'sfwd-courses_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'sfwd-courses_title_layout',
'operator' => '=',
'value' => 'above',
),
),
),
'sfwd-courses_title_overlay_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'sfwd_courses_layout_design',
'label' => esc_html__( 'Background Overlay Color', 'kadence' ),
'default' => kadence()->default( 'sfwd-courses_title_overlay_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.sfwd-courses-hero-section .hero-section-overlay',
'property' => 'background',
'pattern' => '$',
'key' => 'color',
),
),
'context' => array(
array(
'setting' => 'sfwd-courses_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'sfwd-courses_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Overlay Color', 'kadence' ),
'palette' => true,
),
),
'allowGradient' => true,
),
),
'sfwd-courses_title_border' => array(
'control_type' => 'kadence_borders_control',
'section' => 'sfwd_courses_layout_design',
'label' => esc_html__( 'Border', 'kadence' ),
'default' => kadence()->default( 'sfwd-courses_title_border' ),
'context' => array(
array(
'setting' => 'sfwd-courses_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'sfwd-courses_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'settings' => array(
'border_top' => 'sfwd-courses_title_top_border',
'border_bottom' => 'sfwd-courses_title_bottom_border',
),
'live_method' => array(
'sfwd-courses_title_top_border' => array(
array(
'type' => 'css_border',
'selector' => '.sfwd-courses-hero-section .entry-hero-container-inner',
'pattern' => '$',
'property' => 'border-top',
'key' => 'border',
),
),
'sfwd-courses_title_bottom_border' => array(
array(
'type' => 'css_border',
'selector' => '.sfwd-courses-hero-section .entry-hero-container-inner',
'property' => 'border-bottom',
'pattern' => '$',
'key' => 'border',
),
),
),
),
'info_sfwd_courses_layout' => array(
'control_type' => 'kadence_title_control',
'section' => 'sfwd_courses_layout',
'priority' => 10,
'label' => esc_html__( 'Course Layout', 'kadence' ),
'settings' => false,
),
'info_sfwd_courses_layout_design' => array(
'control_type' => 'kadence_title_control',
'section' => 'sfwd_courses_layout_design',
'priority' => 10,
'label' => esc_html__( 'Course Layout', 'kadence' ),
'settings' => false,
),
'sfwd-courses_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'sfwd_courses_layout',
'label' => esc_html__( 'Course Layout', 'kadence' ),
'transport' => 'refresh',
'priority' => 10,
'default' => kadence()->default( 'sfwd-courses_layout' ),
'input_attrs' => array(
'layout' => array(
'normal' => array(
'tooltip' => __( 'Normal', 'kadence' ),
'icon' => 'normal',
),
'narrow' => array(
'tooltip' => __( 'Narrow', 'kadence' ),
'icon' => 'narrow',
),
'fullwidth' => array(
'tooltip' => __( 'Fullwidth', 'kadence' ),
'icon' => 'fullwidth',
),
'left' => array(
'tooltip' => __( 'Left Sidebar', 'kadence' ),
'icon' => 'leftsidebar',
),
'right' => array(
'tooltip' => __( 'Right Sidebar', 'kadence' ),
'icon' => 'rightsidebar',
),
),
'responsive' => false,
'class' => 'kadence-three-col',
),
),
'sfwd-courses_sidebar_id' => array(
'control_type' => 'kadence_select_control',
'section' => 'sfwd_courses_layout',
'label' => esc_html__( 'Course Default Sidebar', 'kadence' ),
'transport' => 'refresh',
'priority' => 10,
'default' => kadence()->default( 'sfwd-courses_sidebar_id' ),
'input_attrs' => array(
'options' => kadence()->sidebar_options(),
),
),
'sfwd-courses_content_style' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'sfwd_courses_layout',
'label' => esc_html__( 'Content Style', 'kadence' ),
'priority' => 10,
'default' => kadence()->default( 'sfwd-courses_content_style' ),
'live_method' => array(
array(
'type' => 'class',
'selector' => 'body.single-sfwd-courses',
'pattern' => 'content-style-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'boxed' => array(
'tooltip' => __( 'Boxed', 'kadence' ),
'icon' => 'boxed',
),
'unboxed' => array(
'tooltip' => __( 'Unboxed', 'kadence' ),
'icon' => 'narrow',
),
),
'responsive' => false,
'class' => 'kadence-two-col',
),
),
'sfwd-courses_vertical_padding' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'sfwd_courses_layout',
'label' => esc_html__( 'Content Vertical Padding', 'kadence' ),
'priority' => 10,
'default' => kadence()->default( 'sfwd-courses_vertical_padding' ),
'live_method' => array(
array(
'type' => 'class',
'selector' => 'body.single-sfwd-courses',
'pattern' => 'content-vertical-padding-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'show' => array(
'name' => __( 'Enable', 'kadence' ),
),
'hide' => array(
'name' => __( 'Disable', 'kadence' ),
),
'top' => array(
'name' => __( 'Top Only', 'kadence' ),
),
'bottom' => array(
'name' => __( 'Bottom Only', 'kadence' ),
),
),
'responsive' => false,
'class' => 'kadence-two-grid',
),
),
'sfwd-courses_feature' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'sfwd_courses_layout',
'priority' => 20,
'default' => kadence()->default( 'sfwd-courses_feature' ),
'label' => esc_html__( 'Show Featured Image?', 'kadence' ),
'transport' => 'refresh',
),
'sfwd-courses_feature_position' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'sfwd_courses_layout',
'label' => esc_html__( 'Featured Image Position', 'kadence' ),
'priority' => 20,
'transport' => 'refresh',
'default' => kadence()->default( 'sfwd-courses_feature_position' ),
'context' => array(
array(
'setting' => 'sfwd-courses_feature',
'operator' => '=',
'value' => true,
),
),
'input_attrs' => array(
'layout' => array(
'above' => array(
'name' => __( 'Above', 'kadence' ),
),
'behind' => array(
'name' => __( 'Behind', 'kadence' ),
),
'below' => array(
'name' => __( 'Below', 'kadence' ),
),
),
'responsive' => false,
),
),
'sfwd-courses_feature_ratio' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'sfwd_courses_layout',
'label' => esc_html__( 'Featured Image Ratio', 'kadence' ),
'priority' => 20,
'default' => kadence()->default( 'sfwd-courses_feature_ratio' ),
'context' => array(
array(
'setting' => 'sfwd-courses_feature',
'operator' => '=',
'value' => true,
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => 'body.single-sfwd-courses .article-post-thumbnail',
'pattern' => 'kadence-thumbnail-ratio-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'inherit' => array(
'name' => __( 'Inherit', 'kadence' ),
),
'1-1' => array(
'name' => __( '1:1', 'kadence' ),
),
'3-4' => array(
'name' => __( '4:3', 'kadence' ),
),
'2-3' => array(
'name' => __( '3:2', 'kadence' ),
),
'9-16' => array(
'name' => __( '16:9', 'kadence' ),
),
'1-2' => array(
'name' => __( '2:1', 'kadence' ),
),
),
'responsive' => false,
'class' => 'kadence-three-col-short',
),
),
'sfwd-courses_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'sfwd_courses_layout_design',
'priority' => 20,
'label' => esc_html__( 'Site Background', 'kadence' ),
'default' => kadence()->default( 'sfwd-courses_background' ),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => 'body.single-sfwd-courses',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Course Background', 'kadence' ),
),
),
'sfwd-courses_content_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'sfwd_courses_layout_design',
'priority' => 20,
'label' => esc_html__( 'Content Background', 'kadence' ),
'default' => kadence()->default( 'sfwd-courses_content_background' ),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => 'body.single-sfwd-courses .content-bg, body.single-sfwd-courses.content-style-unboxed .site',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Course Content Background', 'kadence' ),
),
),
);
Theme_Customizer::add_settings( $settings );

View File

@@ -0,0 +1,722 @@
<?php
/**
* Essay Layout Options
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
$settings = array(
'sfwd_essays_layout_tabs' => array(
'control_type' => 'kadence_tab_control',
'section' => 'sfwd_essays_layout',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'sfwd_essays_layout',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'sfwd_essays_layout_design',
),
'active' => 'general',
),
),
'sfwd_essays_layout_tabs_design' => array(
'control_type' => 'kadence_tab_control',
'section' => 'sfwd_essays_layout_design',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'sfwd_essays_layout',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'sfwd_essays_layout_design',
),
'active' => 'design',
),
),
'info_essays_title' => array(
'control_type' => 'kadence_title_control',
'section' => 'sfwd_essays_layout',
'priority' => 2,
'label' => esc_html__( 'Essay Title', 'kadence' ),
'settings' => false,
),
'info_essays_title_design' => array(
'control_type' => 'kadence_title_control',
'section' => 'sfwd_essays_layout_design',
'priority' => 2,
'label' => esc_html__( 'Essay Title', 'kadence' ),
'settings' => false,
),
'sfwd-essays_title' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'sfwd_essays_layout',
'priority' => 3,
'default' => kadence()->default( 'sfwd-essays_title' ),
'label' => esc_html__( 'Show Essay Title?', 'kadence' ),
'transport' => 'refresh',
),
'sfwd-essays_title_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'sfwd_essays_layout',
'label' => esc_html__( 'Essay Title Layout', 'kadence' ),
'transport' => 'refresh',
'priority' => 4,
'default' => kadence()->default( 'sfwd-essays_title_layout' ),
'context' => array(
array(
'setting' => 'sfwd-essays_title',
'operator' => '=',
'value' => true,
),
),
'input_attrs' => array(
'layout' => array(
'normal' => array(
'tooltip' => __( 'In Content', 'kadence' ),
'icon' => 'incontent',
),
'above' => array(
'tooltip' => __( 'Above Content', 'kadence' ),
'icon' => 'abovecontent',
),
),
'responsive' => false,
'class' => 'kadence-two-col',
),
),
'sfwd-essays_title_inner_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'sfwd_essays_layout',
'priority' => 4,
'default' => kadence()->default( 'sfwd-essays_title_inner_layout' ),
'label' => esc_html__( 'Title Container Width', 'kadence' ),
'context' => array(
array(
'setting' => 'sfwd-essays_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'sfwd-essays_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.sfwd-essays-hero-section',
'pattern' => 'entry-hero-layout-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'standard' => array(
'tooltip' => __( 'Background Fullwidth, Content Contained', 'kadence' ),
'name' => __( 'Standard', 'kadence' ),
'icon' => '',
),
'fullwidth' => array(
'tooltip' => __( 'Background & Content Fullwidth', 'kadence' ),
'name' => __( 'Fullwidth', 'kadence' ),
'icon' => '',
),
'contained' => array(
'tooltip' => __( 'Background & Content Contained', 'kadence' ),
'name' => __( 'Contained', 'kadence' ),
'icon' => '',
),
),
'responsive' => false,
),
),
'sfwd-essays_title_align' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'sfwd_essays_layout',
'label' => esc_html__( 'Essay Title Align', 'kadence' ),
'priority' => 4,
'default' => kadence()->default( 'sfwd-essays_title_align' ),
'context' => array(
array(
'setting' => 'sfwd-essays_title',
'operator' => '=',
'value' => true,
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.sfwd-essays-title',
'pattern' => array(
'desktop' => 'title-align-$',
'tablet' => 'title-tablet-align-$',
'mobile' => 'title-mobile-align-$',
),
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'left' => array(
'tooltip' => __( 'Left Align Title', 'kadence' ),
'dashicon' => 'editor-alignleft',
),
'center' => array(
'tooltip' => __( 'Center Align Title', 'kadence' ),
'dashicon' => 'editor-aligncenter',
),
'right' => array(
'tooltip' => __( 'Right Align Title', 'kadence' ),
'dashicon' => 'editor-alignright',
),
),
'responsive' => true,
),
),
'sfwd-essays_title_height' => array(
'control_type' => 'kadence_range_control',
'section' => 'sfwd_essays_layout',
'priority' => 5,
'label' => esc_html__( 'Title Container Min Height', 'kadence' ),
'context' => array(
array(
'setting' => 'sfwd-essays_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'sfwd-essays_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#inner-wrap .sfwd-essays-hero-section .entry-header',
'property' => 'min-height',
'pattern' => '$',
'key' => 'size',
),
),
'default' => kadence()->default( 'sfwd-essays_title_height' ),
'input_attrs' => array(
'min' => array(
'px' => 10,
'em' => 1,
'rem' => 1,
'vh' => 2,
),
'max' => array(
'px' => 800,
'em' => 12,
'rem' => 12,
'vh' => 100,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
'vh' => 1,
),
'units' => array( 'px', 'em', 'rem', 'vh' ),
),
),
'sfwd-essays_title_elements' => array(
'control_type' => 'kadence_sorter_control',
'section' => 'sfwd_essays_layout',
'priority' => 6,
'default' => kadence()->default( 'sfwd-essays_title_elements' ),
'label' => esc_html__( 'Title Elements', 'kadence' ),
'transport' => 'refresh',
'settings' => array(
'elements' => 'sfwd-essays_title_elements',
'title' => 'sfwd-essays_title_element_title',
'breadcrumb' => 'sfwd-essays_title_element_breadcrumb',
),
'context' => array(
array(
'setting' => 'sfwd-essays_title',
'operator' => '=',
'value' => true,
),
),
'input_attrs' => array(
'group' => 'sfwd-essays_title_element',
),
),
'sfwd-essays_title_font' => array(
'control_type' => 'kadence_typography_control',
'section' => 'sfwd_essays_layout_design',
'label' => esc_html__( 'Essay Title Font', 'kadence' ),
'default' => kadence()->default( 'sfwd-essays_title_font' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => '.sfwd-essays-title h1',
'property' => 'font',
'key' => 'typography',
),
),
'context' => array(
array(
'setting' => 'sfwd-essays_title',
'operator' => '=',
'value' => true,
),
),
'input_attrs' => array(
'id' => 'sfwd-essays_title_font',
'headingInherit' => true,
),
),
'sfwd-essays_title_breadcrumb_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'sfwd_essays_layout_design',
'label' => esc_html__( 'Breadcrumb Colors', 'kadence' ),
'default' => kadence()->default( 'sfwd-essays_title_breadcrumb_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.sfwd-essays-title .kadence-breadcrumbs',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.sfwd-essays-title .kadence-breadcrumbs a:hover',
'property' => 'color',
'pattern' => '$',
'key' => 'hover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Link Hover Color', 'kadence' ),
'palette' => true,
),
),
),
),
'sfwd-essays_title_breadcrumb_font' => array(
'control_type' => 'kadence_typography_control',
'section' => 'sfwd_essays_layout_design',
'label' => esc_html__( 'Breadcrumb Font', 'kadence' ),
'default' => kadence()->default( 'sfwd-essays_title_breadcrumb_font' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => '.sfwd-essays-title .kadence-breadcrumbs',
'property' => 'font',
'key' => 'typography',
),
),
'input_attrs' => array(
'id' => 'sfwd-essays_title_breadcrumb_font',
'options' => 'no-color',
),
),
'sfwd-essays_title_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'sfwd_essays_layout_design',
'label' => esc_html__( 'Essay Above Area Background', 'kadence' ),
'default' => kadence()->default( 'sfwd-essays_title_background' ),
'context' => array(
array(
'setting' => 'sfwd-essays_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'sfwd-essays_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => '#inner-wrap .sfwd-essays-hero-section .entry-hero-container-inner',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Essay Title Background', 'kadence' ),
),
),
'sfwd-essays_title_featured_image' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'sfwd_essays_layout_design',
'default' => kadence()->default( 'sfwd-essays_title_featured_image' ),
'label' => esc_html__( 'Use Featured Image for Background?', 'kadence' ),
'transport' => 'refresh',
'context' => array(
array(
'setting' => 'sfwd-essays_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'sfwd-essays_title_layout',
'operator' => '=',
'value' => 'above',
),
),
),
'sfwd-essays_title_overlay_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'sfwd_essays_layout_design',
'label' => esc_html__( 'Background Overlay Color', 'kadence' ),
'default' => kadence()->default( 'sfwd-essays_title_overlay_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.sfwd-essays-hero-section .hero-section-overlay',
'property' => 'background',
'pattern' => '$',
'key' => 'color',
),
),
'context' => array(
array(
'setting' => 'sfwd-essays_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'sfwd-essays_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Overlay Color', 'kadence' ),
'palette' => true,
),
),
'allowGradient' => true,
),
),
'sfwd-essays_title_border' => array(
'control_type' => 'kadence_borders_control',
'section' => 'sfwd_essays_layout_design',
'label' => esc_html__( 'Border', 'kadence' ),
'default' => kadence()->default( 'sfwd-essays_title_border' ),
'context' => array(
array(
'setting' => 'sfwd-essays_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'sfwd-essays_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'settings' => array(
'border_top' => 'sfwd-essays_title_top_border',
'border_bottom' => 'sfwd-essays_title_bottom_border',
),
'live_method' => array(
'sfwd-essays_title_top_border' => array(
array(
'type' => 'css_border',
'selector' => '.sfwd-essays-hero-section .entry-hero-container-inner',
'pattern' => '$',
'property' => 'border-top',
'key' => 'border',
),
),
'sfwd-essays_title_bottom_border' => array(
array(
'type' => 'css_border',
'selector' => '.sfwd-essays-hero-section .entry-hero-container-inner',
'property' => 'border-bottom',
'pattern' => '$',
'key' => 'border',
),
),
),
),
'info_sfwd_essays_layout' => array(
'control_type' => 'kadence_title_control',
'section' => 'sfwd_essays_layout',
'priority' => 10,
'label' => esc_html__( 'Essay Layout', 'kadence' ),
'settings' => false,
),
'info_sfwd_essays_layout_design' => array(
'control_type' => 'kadence_title_control',
'section' => 'sfwd_essays_layout_design',
'priority' => 10,
'label' => esc_html__( 'Essay Layout', 'kadence' ),
'settings' => false,
),
'sfwd-essays_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'sfwd_essays_layout',
'label' => esc_html__( 'Essay Layout', 'kadence' ),
'transport' => 'refresh',
'priority' => 10,
'default' => kadence()->default( 'sfwd-essays_layout' ),
'input_attrs' => array(
'layout' => array(
'normal' => array(
'tooltip' => __( 'Normal', 'kadence' ),
'icon' => 'normal',
),
'narrow' => array(
'tooltip' => __( 'Narrow', 'kadence' ),
'icon' => 'narrow',
),
'fullwidth' => array(
'tooltip' => __( 'Fullwidth', 'kadence' ),
'icon' => 'fullwidth',
),
'left' => array(
'tooltip' => __( 'Left Sidebar', 'kadence' ),
'icon' => 'leftsidebar',
),
'right' => array(
'tooltip' => __( 'Right Sidebar', 'kadence' ),
'icon' => 'rightsidebar',
),
),
'responsive' => false,
'class' => 'kadence-three-col',
),
),
'sfwd-essays_sidebar_id' => array(
'control_type' => 'kadence_select_control',
'section' => 'sfwd_essays_layout',
'label' => esc_html__( 'Essay Default Sidebar', 'kadence' ),
'transport' => 'refresh',
'priority' => 10,
'default' => kadence()->default( 'sfwd-essays_sidebar_id' ),
'input_attrs' => array(
'options' => kadence()->sidebar_options(),
),
),
'sfwd-essays_content_style' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'sfwd_essays_layout',
'label' => esc_html__( 'Content Style', 'kadence' ),
'priority' => 10,
'default' => kadence()->default( 'sfwd-essays_content_style' ),
'live_method' => array(
array(
'type' => 'class',
'selector' => 'body.single-sfwd-essays',
'pattern' => 'content-style-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'boxed' => array(
'tooltip' => __( 'Boxed', 'kadence' ),
'icon' => 'boxed',
),
'unboxed' => array(
'tooltip' => __( 'Unboxed', 'kadence' ),
'icon' => 'narrow',
),
),
'responsive' => false,
'class' => 'kadence-two-col',
),
),
'sfwd-essays_vertical_padding' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'sfwd_essays_layout',
'label' => esc_html__( 'Content Vertical Padding', 'kadence' ),
'priority' => 10,
'default' => kadence()->default( 'sfwd-essays_vertical_padding' ),
'live_method' => array(
array(
'type' => 'class',
'selector' => 'body.single-sfwd-essays',
'pattern' => 'content-vertical-padding-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'show' => array(
'name' => __( 'Enable', 'kadence' ),
),
'hide' => array(
'name' => __( 'Disable', 'kadence' ),
),
'top' => array(
'name' => __( 'Top Only', 'kadence' ),
),
'bottom' => array(
'name' => __( 'Bottom Only', 'kadence' ),
),
),
'responsive' => false,
'class' => 'kadence-two-grid',
),
),
'sfwd-essays_feature' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'sfwd_essays_layout',
'priority' => 20,
'default' => kadence()->default( 'sfwd-essays_feature' ),
'label' => esc_html__( 'Show Featured Image?', 'kadence' ),
'transport' => 'refresh',
),
'sfwd-essays_feature_position' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'sfwd_essays_layout',
'label' => esc_html__( 'Featured Image Position', 'kadence' ),
'priority' => 20,
'transport' => 'refresh',
'default' => kadence()->default( 'sfwd-essays_feature_position' ),
'context' => array(
array(
'setting' => 'sfwd-essays_feature',
'operator' => '=',
'value' => true,
),
),
'input_attrs' => array(
'layout' => array(
'above' => array(
'name' => __( 'Above', 'kadence' ),
),
'behind' => array(
'name' => __( 'Behind', 'kadence' ),
),
'below' => array(
'name' => __( 'Below', 'kadence' ),
),
),
'responsive' => false,
),
),
'sfwd-essays_feature_ratio' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'sfwd_essays_layout',
'label' => esc_html__( 'Featured Image Ratio', 'kadence' ),
'priority' => 20,
'default' => kadence()->default( 'sfwd-essays_feature_ratio' ),
'context' => array(
array(
'setting' => 'sfwd-essays_feature',
'operator' => '=',
'value' => true,
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => 'body.single-sfwd-essays .article-post-thumbnail',
'pattern' => 'kadence-thumbnail-ratio-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'inherit' => array(
'name' => __( 'Inherit', 'kadence' ),
),
'1-1' => array(
'name' => __( '1:1', 'kadence' ),
),
'3-4' => array(
'name' => __( '4:3', 'kadence' ),
),
'2-3' => array(
'name' => __( '3:2', 'kadence' ),
),
'9-16' => array(
'name' => __( '16:9', 'kadence' ),
),
'1-2' => array(
'name' => __( '2:1', 'kadence' ),
),
),
'responsive' => false,
'class' => 'kadence-three-col-short',
),
),
'sfwd-essays_comments' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'sfwd_essays_layout',
'priority' => 20,
'default' => kadence()->default( 'sfwd-essays_comments' ),
'label' => esc_html__( 'Show Comments?', 'kadence' ),
'transport' => 'refresh',
),
'sfwd-essays_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'sfwd_essays_layout_design',
'priority' => 20,
'label' => esc_html__( 'Site Background', 'kadence' ),
'default' => kadence()->default( 'sfwd-essays_background' ),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => 'body.single-sfwd-essays',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Essay Background', 'kadence' ),
),
),
'sfwd-essays_content_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'sfwd_essays_layout_design',
'priority' => 20,
'label' => esc_html__( 'Content Background', 'kadence' ),
'default' => kadence()->default( 'sfwd-essays_content_background' ),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => 'body.single-sfwd-essays .content-bg, body.single-sfwd-essays.content-style-unboxed .site',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Essay Content Background', 'kadence' ),
),
),
);
Theme_Customizer::add_settings( $settings );

View File

@@ -0,0 +1,99 @@
<?php
/**
* Focus Layout Options
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
$settings = array(
'sfwd-focus_layout_tabs' => array(
'control_type' => 'kadence_tab_control',
'section' => 'sfwd_topic_layout',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'sfwd_topic_layout',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'sfwd_topic_layout_design',
),
'active' => 'general',
),
),
'sfwd-focus_layout_tabs_design' => array(
'control_type' => 'kadence_tab_control',
'section' => 'sfwd_topic_layout_design',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'sfwd_topic_layout',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'sfwd_topic_layout_design',
),
'active' => 'design',
),
),
'info_sfwd-focus_title' => array(
'control_type' => 'kadence_title_control',
'section' => 'sfwd_topic_layout',
'priority' => 2,
'label' => esc_html__( 'Focus Title', 'kadence' ),
'settings' => false,
),
'info_sfwd-focus_title_design' => array(
'control_type' => 'kadence_title_control',
'section' => 'sfwd_topic_layout_design',
'priority' => 2,
'label' => esc_html__( 'Focus Title', 'kadence' ),
'settings' => false,
),
'sfwd-focus_title' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'sfwd_topic_layout',
'priority' => 3,
'default' => kadence()->default( 'sfwd-focus_title' ),
'label' => esc_html__( 'Show Title in Focus Mode?', 'kadence' ),
'transport' => 'refresh',
),
'sfwd-focus_title_font' => array(
'control_type' => 'kadence_typography_control',
'section' => 'sfwd_topic_layout_design',
'label' => esc_html__( 'Topic Title Font', 'kadence' ),
'default' => kadence()->default( 'sfwd-focus_title_font' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => '.sfwd-focus-title h1',
'property' => 'font',
'key' => 'typography',
),
),
'context' => array(
array(
'setting' => 'sfwd-focus_title',
'operator' => '=',
'value' => true,
),
),
'input_attrs' => array(
'id' => 'sfwd-focus_title_font',
'headingInherit' => true,
),
),
);
Theme_Customizer::add_settings( $settings );

View File

@@ -0,0 +1,114 @@
<?php
/**
* Grid Layout Options
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
$settings = array(
'sfwd-grid_layout_tabs' => array(
'control_type' => 'kadence_tab_control',
'section' => 'sfwd_grid_layout',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'sfwd_grid_layout',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'sfwd_grid_layout_design',
),
'active' => 'general',
),
),
'sfwd-grid_layout_tabs_design' => array(
'control_type' => 'kadence_tab_control',
'section' => 'sfwd_grid_layout_design',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'sfwd_grid_layout',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'sfwd_grid_layout_design',
),
'active' => 'design',
),
),
'learndash_course_grid' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'sfwd_grid_layout',
'priority' => 3,
'default' => kadence()->default( 'learndash_course_grid' ),
'label' => esc_html__( 'Override Course Grid Styles', 'kadence' ),
'transport' => 'refresh',
),
'learndash_course_grid_style' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'sfwd_grid_layout',
'priority' => 7,
'label' => esc_html__( 'Content Style', 'kadence' ),
'default' => kadence()->default( 'learndash_course_grid_style' ),
'transport' => 'refresh',
'context' => array(
array(
'setting' => 'learndash_course_grid',
'operator' => '=',
'value' => true,
),
),
'input_attrs' => array(
'layout' => array(
'boxed' => array(
'tooltip' => __( 'Boxed', 'kadence' ),
'icon' => 'gridBoxed',
),
'unboxed' => array(
'tooltip' => __( 'Unboxed', 'kadence' ),
'icon' => 'gridUnboxed',
),
),
'responsive' => false,
'class' => 'kadence-two-col',
),
),
'sfwd-grid_title_font' => array(
'control_type' => 'kadence_typography_control',
'section' => 'sfwd_grid_layout_design',
'label' => esc_html__( 'Course Grid Entry Title Font', 'kadence' ),
'default' => kadence()->default( 'sfwd-grid_title_font' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => '.ld-course-list-items .ld_course_grid.entry .entry-title',
'property' => 'font',
'key' => 'typography',
),
),
'context' => array(
array(
'setting' => 'learndash_course_grid',
'operator' => '=',
'value' => true,
),
),
'input_attrs' => array(
'id' => 'sfwd-grid_title_font',
'headingInherit' => true,
),
),
);
Theme_Customizer::add_settings( $settings );

View File

@@ -0,0 +1,713 @@
<?php
/**
* Group Layout Options
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
$settings = array(
'sfwd_groups_layout_tabs' => array(
'control_type' => 'kadence_tab_control',
'section' => 'sfwd_groups_layout',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'sfwd_groups_layout',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'sfwd_groups_layout_design',
),
'active' => 'general',
),
),
'sfwd_groups_layout_tabs_design' => array(
'control_type' => 'kadence_tab_control',
'section' => 'sfwd_groups_layout_design',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'sfwd_groups_layout',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'sfwd_groups_layout_design',
),
'active' => 'design',
),
),
'info_groups_title' => array(
'control_type' => 'kadence_title_control',
'section' => 'sfwd_groups_layout',
'priority' => 2,
'label' => esc_html__( 'Group Title', 'kadence' ),
'settings' => false,
),
'info_groups_title_design' => array(
'control_type' => 'kadence_title_control',
'section' => 'sfwd_groups_layout_design',
'priority' => 2,
'label' => esc_html__( 'Group Title', 'kadence' ),
'settings' => false,
),
'groups_title' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'sfwd_groups_layout',
'priority' => 3,
'default' => kadence()->default( 'groups_title' ),
'label' => esc_html__( 'Show Group Title?', 'kadence' ),
'transport' => 'refresh',
),
'groups_title_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'sfwd_groups_layout',
'label' => esc_html__( 'Group Title Layout', 'kadence' ),
'transport' => 'refresh',
'priority' => 4,
'default' => kadence()->default( 'groups_title_layout' ),
'context' => array(
array(
'setting' => 'groups_title',
'operator' => '=',
'value' => true,
),
),
'input_attrs' => array(
'layout' => array(
'normal' => array(
'tooltip' => __( 'In Content', 'kadence' ),
'icon' => 'incontent',
),
'above' => array(
'tooltip' => __( 'Above Content', 'kadence' ),
'icon' => 'abovecontent',
),
),
'responsive' => false,
'class' => 'kadence-two-col',
),
),
'groups_title_inner_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'sfwd_groups_layout',
'priority' => 4,
'default' => kadence()->default( 'groups_title_inner_layout' ),
'label' => esc_html__( 'Title Container Width', 'kadence' ),
'context' => array(
array(
'setting' => 'groups_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'groups_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.groups-hero-section',
'pattern' => 'entry-hero-layout-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'standard' => array(
'tooltip' => __( 'Background Fullwidth, Content Contained', 'kadence' ),
'name' => __( 'Standard', 'kadence' ),
'icon' => '',
),
'fullwidth' => array(
'tooltip' => __( 'Background & Content Fullwidth', 'kadence' ),
'name' => __( 'Fullwidth', 'kadence' ),
'icon' => '',
),
'contained' => array(
'tooltip' => __( 'Background & Content Contained', 'kadence' ),
'name' => __( 'Contained', 'kadence' ),
'icon' => '',
),
),
'responsive' => false,
),
),
'groups_title_align' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'sfwd_groups_layout',
'label' => esc_html__( 'Group Title Align', 'kadence' ),
'priority' => 4,
'default' => kadence()->default( 'groups_title_align' ),
'context' => array(
array(
'setting' => 'groups_title',
'operator' => '=',
'value' => true,
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.groups-title',
'pattern' => array(
'desktop' => 'title-align-$',
'tablet' => 'title-tablet-align-$',
'mobile' => 'title-mobile-align-$',
),
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'left' => array(
'tooltip' => __( 'Left Align Title', 'kadence' ),
'dashicon' => 'editor-alignleft',
),
'center' => array(
'tooltip' => __( 'Center Align Title', 'kadence' ),
'dashicon' => 'editor-aligncenter',
),
'right' => array(
'tooltip' => __( 'Right Align Title', 'kadence' ),
'dashicon' => 'editor-alignright',
),
),
'responsive' => true,
),
),
'groups_title_height' => array(
'control_type' => 'kadence_range_control',
'section' => 'sfwd_groups_layout',
'priority' => 5,
'label' => esc_html__( 'Title Container Min Height', 'kadence' ),
'context' => array(
array(
'setting' => 'groups_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'groups_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#inner-wrap .groups-hero-section .entry-header',
'property' => 'min-height',
'pattern' => '$',
'key' => 'size',
),
),
'default' => kadence()->default( 'groups_title_height' ),
'input_attrs' => array(
'min' => array(
'px' => 10,
'em' => 1,
'rem' => 1,
'vh' => 2,
),
'max' => array(
'px' => 800,
'em' => 12,
'rem' => 12,
'vh' => 100,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
'vh' => 1,
),
'units' => array( 'px', 'em', 'rem', 'vh' ),
),
),
'groups_title_elements' => array(
'control_type' => 'kadence_sorter_control',
'section' => 'sfwd_groups_layout',
'priority' => 6,
'default' => kadence()->default( 'groups_title_elements' ),
'label' => esc_html__( 'Title Elements', 'kadence' ),
'transport' => 'refresh',
'settings' => array(
'elements' => 'groups_title_elements',
'title' => 'groups_title_element_title',
'breadcrumb' => 'groups_title_element_breadcrumb',
),
'context' => array(
array(
'setting' => 'groups_title',
'operator' => '=',
'value' => true,
),
),
'input_attrs' => array(
'group' => 'groups_title_element',
),
),
'groups_title_font' => array(
'control_type' => 'kadence_typography_control',
'section' => 'sfwd_groups_layout_design',
'label' => esc_html__( 'Group Title Font', 'kadence' ),
'default' => kadence()->default( 'groups_title_font' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => '.groups-title h1',
'property' => 'font',
'key' => 'typography',
),
),
'context' => array(
array(
'setting' => 'groups_title',
'operator' => '=',
'value' => true,
),
),
'input_attrs' => array(
'id' => 'groups_title_font',
'headingInherit' => true,
),
),
'groups_title_breadcrumb_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'sfwd_groups_layout_design',
'label' => esc_html__( 'Breadcrumb Colors', 'kadence' ),
'default' => kadence()->default( 'groups_title_breadcrumb_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.groups-title .kadence-breadcrumbs',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.groups-title .kadence-breadcrumbs a:hover',
'property' => 'color',
'pattern' => '$',
'key' => 'hover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Link Hover Color', 'kadence' ),
'palette' => true,
),
),
),
),
'groups_title_breadcrumb_font' => array(
'control_type' => 'kadence_typography_control',
'section' => 'sfwd_groups_layout_design',
'label' => esc_html__( 'Breadcrumb Font', 'kadence' ),
'default' => kadence()->default( 'groups_title_breadcrumb_font' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => '.groups-title .kadence-breadcrumbs',
'property' => 'font',
'key' => 'typography',
),
),
'input_attrs' => array(
'id' => 'groups_title_breadcrumb_font',
'options' => 'no-color',
),
),
'groups_title_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'sfwd_groups_layout_design',
'label' => esc_html__( 'Group Above Area Background', 'kadence' ),
'default' => kadence()->default( 'groups_title_background' ),
'context' => array(
array(
'setting' => 'groups_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'groups_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => '#inner-wrap .groups-hero-section .entry-hero-container-inner',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Group Title Background', 'kadence' ),
),
),
'groups_title_featured_image' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'sfwd_groups_layout_design',
'default' => kadence()->default( 'groups_title_featured_image' ),
'label' => esc_html__( 'Use Featured Image for Background?', 'kadence' ),
'transport' => 'refresh',
'context' => array(
array(
'setting' => 'groups_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'groups_title_layout',
'operator' => '=',
'value' => 'above',
),
),
),
'groups_title_overlay_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'sfwd_groups_layout_design',
'label' => esc_html__( 'Background Overlay Color', 'kadence' ),
'default' => kadence()->default( 'groups_title_overlay_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.groups-hero-section .hero-section-overlay',
'property' => 'background',
'pattern' => '$',
'key' => 'color',
),
),
'context' => array(
array(
'setting' => 'groups_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'groups_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Overlay Color', 'kadence' ),
'palette' => true,
),
),
'allowGradient' => true,
),
),
'groups_title_border' => array(
'control_type' => 'kadence_borders_control',
'section' => 'sfwd_groups_layout_design',
'label' => esc_html__( 'Border', 'kadence' ),
'default' => kadence()->default( 'groups_title_border' ),
'context' => array(
array(
'setting' => 'groups_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'groups_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'settings' => array(
'border_top' => 'groups_title_top_border',
'border_bottom' => 'groups_title_bottom_border',
),
'live_method' => array(
'groups_title_top_border' => array(
array(
'type' => 'css_border',
'selector' => '.groups-hero-section .entry-hero-container-inner',
'pattern' => '$',
'property' => 'border-top',
'key' => 'border',
),
),
'groups_title_bottom_border' => array(
array(
'type' => 'css_border',
'selector' => '.groups-hero-section .entry-hero-container-inner',
'property' => 'border-bottom',
'pattern' => '$',
'key' => 'border',
),
),
),
),
'info_sfwd_groups_layout' => array(
'control_type' => 'kadence_title_control',
'section' => 'sfwd_groups_layout',
'priority' => 10,
'label' => esc_html__( 'Group Layout', 'kadence' ),
'settings' => false,
),
'info_sfwd_groups_layout_design' => array(
'control_type' => 'kadence_title_control',
'section' => 'sfwd_groups_layout_design',
'priority' => 10,
'label' => esc_html__( 'Group Layout', 'kadence' ),
'settings' => false,
),
'groups_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'sfwd_groups_layout',
'label' => esc_html__( 'Group Layout', 'kadence' ),
'transport' => 'refresh',
'priority' => 10,
'default' => kadence()->default( 'groups_layout' ),
'input_attrs' => array(
'layout' => array(
'normal' => array(
'tooltip' => __( 'Normal', 'kadence' ),
'icon' => 'normal',
),
'narrow' => array(
'tooltip' => __( 'Narrow', 'kadence' ),
'icon' => 'narrow',
),
'fullwidth' => array(
'tooltip' => __( 'Fullwidth', 'kadence' ),
'icon' => 'fullwidth',
),
'left' => array(
'tooltip' => __( 'Left Sidebar', 'kadence' ),
'icon' => 'leftsidebar',
),
'right' => array(
'tooltip' => __( 'Right Sidebar', 'kadence' ),
'icon' => 'rightsidebar',
),
),
'responsive' => false,
'class' => 'kadence-three-col',
),
),
'groups_sidebar_id' => array(
'control_type' => 'kadence_select_control',
'section' => 'sfwd_groups_layout',
'label' => esc_html__( 'Group Default Sidebar', 'kadence' ),
'transport' => 'refresh',
'priority' => 10,
'default' => kadence()->default( 'groups_sidebar_id' ),
'input_attrs' => array(
'options' => kadence()->sidebar_options(),
),
),
'groups_content_style' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'sfwd_groups_layout',
'label' => esc_html__( 'Content Style', 'kadence' ),
'priority' => 10,
'default' => kadence()->default( 'groups_content_style' ),
'live_method' => array(
array(
'type' => 'class',
'selector' => 'body.single-groups',
'pattern' => 'content-style-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'boxed' => array(
'tooltip' => __( 'Boxed', 'kadence' ),
'icon' => 'boxed',
),
'unboxed' => array(
'tooltip' => __( 'Unboxed', 'kadence' ),
'icon' => 'narrow',
),
),
'responsive' => false,
'class' => 'kadence-two-col',
),
),
'groups_vertical_padding' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'sfwd_groups_layout',
'label' => esc_html__( 'Content Vertical Padding', 'kadence' ),
'priority' => 10,
'default' => kadence()->default( 'groups_vertical_padding' ),
'live_method' => array(
array(
'type' => 'class',
'selector' => 'body.single-groups',
'pattern' => 'content-vertical-padding-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'show' => array(
'name' => __( 'Enable', 'kadence' ),
),
'hide' => array(
'name' => __( 'Disable', 'kadence' ),
),
'top' => array(
'name' => __( 'Top Only', 'kadence' ),
),
'bottom' => array(
'name' => __( 'Bottom Only', 'kadence' ),
),
),
'responsive' => false,
'class' => 'kadence-two-grid',
),
),
'groups_feature' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'sfwd_groups_layout',
'priority' => 20,
'default' => kadence()->default( 'groups_feature' ),
'label' => esc_html__( 'Show Featured Image?', 'kadence' ),
'transport' => 'refresh',
),
'groups_feature_position' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'sfwd_groups_layout',
'label' => esc_html__( 'Featured Image Position', 'kadence' ),
'priority' => 20,
'transport' => 'refresh',
'default' => kadence()->default( 'groups_feature_position' ),
'context' => array(
array(
'setting' => 'groups_feature',
'operator' => '=',
'value' => true,
),
),
'input_attrs' => array(
'layout' => array(
'above' => array(
'name' => __( 'Above', 'kadence' ),
),
'behind' => array(
'name' => __( 'Behind', 'kadence' ),
),
'below' => array(
'name' => __( 'Below', 'kadence' ),
),
),
'responsive' => false,
),
),
'groups_feature_ratio' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'sfwd_groups_layout',
'label' => esc_html__( 'Featured Image Ratio', 'kadence' ),
'priority' => 20,
'default' => kadence()->default( 'groups_feature_ratio' ),
'context' => array(
array(
'setting' => 'groups_feature',
'operator' => '=',
'value' => true,
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => 'body.single-groups .article-post-thumbnail',
'pattern' => 'kadence-thumbnail-ratio-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'inherit' => array(
'name' => __( 'Inherit', 'kadence' ),
),
'1-1' => array(
'name' => __( '1:1', 'kadence' ),
),
'3-4' => array(
'name' => __( '4:3', 'kadence' ),
),
'2-3' => array(
'name' => __( '3:2', 'kadence' ),
),
'9-16' => array(
'name' => __( '16:9', 'kadence' ),
),
'1-2' => array(
'name' => __( '2:1', 'kadence' ),
),
),
'responsive' => false,
'class' => 'kadence-three-col-short',
),
),
'groups_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'sfwd_groups_layout_design',
'priority' => 20,
'label' => esc_html__( 'Site Background', 'kadence' ),
'default' => kadence()->default( 'groups_background' ),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => 'body.single-groups',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Group Background', 'kadence' ),
),
),
'groups_content_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'sfwd_groups_layout_design',
'priority' => 20,
'label' => esc_html__( 'Content Background', 'kadence' ),
'default' => kadence()->default( 'groups_content_background' ),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => 'body.single-groups .content-bg, body.single-groups.content-style-unboxed .site',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Group Content Background', 'kadence' ),
),
),
);
Theme_Customizer::add_settings( $settings );

View File

@@ -0,0 +1,711 @@
<?php
/**
* Lesson Layout Options
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
$settings = array(
'sfwd-lessons_layout_tabs' => array(
'control_type' => 'kadence_tab_control',
'section' => 'sfwd_lesson_layout',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'sfwd_lesson_layout',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'sfwd_lesson_layout_design',
),
'active' => 'general',
),
),
'sfwd-lessons_layout_tabs_design' => array(
'control_type' => 'kadence_tab_control',
'section' => 'sfwd_lesson_layout_design',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'sfwd_lesson_layout',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'sfwd_lesson_layout_design',
),
'active' => 'design',
),
),
'info_sfwd-lessons_title' => array(
'control_type' => 'kadence_title_control',
'section' => 'sfwd_lesson_layout',
'priority' => 2,
'label' => esc_html__( 'Lesson Title', 'kadence' ),
'settings' => false,
),
'info_sfwd-lessons_title_design' => array(
'control_type' => 'kadence_title_control',
'section' => 'sfwd_lesson_layout_design',
'priority' => 2,
'label' => esc_html__( 'Lesson Title', 'kadence' ),
'settings' => false,
),
'sfwd-lessons_title' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'sfwd_lesson_layout',
'priority' => 3,
'default' => kadence()->default( 'sfwd-lessons_title' ),
'label' => esc_html__( 'Show Lesson Title?', 'kadence' ),
'transport' => 'refresh',
),
'sfwd-lessons_title_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'sfwd_lesson_layout',
'label' => esc_html__( 'Lesson Title Layout', 'kadence' ),
'transport' => 'refresh',
'priority' => 4,
'default' => kadence()->default( 'sfwd-lessons_title_layout' ),
'context' => array(
array(
'setting' => 'sfwd-lessons_title',
'operator' => '=',
'value' => true,
),
),
'input_attrs' => array(
'layout' => array(
'normal' => array(
'tooltip' => __( 'In Content', 'kadence' ),
'icon' => 'incontent',
),
'above' => array(
'tooltip' => __( 'Above Content', 'kadence' ),
'icon' => 'abovecontent',
),
),
'responsive' => false,
'class' => 'kadence-two-col',
),
),
'sfwd-lessons_title_inner_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'sfwd_lesson_layout',
'priority' => 4,
'default' => kadence()->default( 'sfwd-lessons_title_inner_layout' ),
'label' => esc_html__( 'Title Container Width', 'kadence' ),
'context' => array(
array(
'setting' => 'sfwd-lessons_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'sfwd-lessons_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.sfwd-lessons-hero-section',
'pattern' => 'entry-hero-layout-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'standard' => array(
'tooltip' => __( 'Background Fullwidth, Content Contained', 'kadence' ),
'name' => __( 'Standard', 'kadence' ),
'icon' => '',
),
'fullwidth' => array(
'tooltip' => __( 'Background & Content Fullwidth', 'kadence' ),
'name' => __( 'Fullwidth', 'kadence' ),
'icon' => '',
),
'contained' => array(
'tooltip' => __( 'Background & Content Contained', 'kadence' ),
'name' => __( 'Contained', 'kadence' ),
'icon' => '',
),
),
'responsive' => false,
),
),
'sfwd-lessons_title_align' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'sfwd_lesson_layout',
'label' => esc_html__( 'Lesson Title Align', 'kadence' ),
'priority' => 4,
'default' => kadence()->default( 'sfwd-lessons_title_align' ),
'context' => array(
array(
'setting' => 'sfwd-lessons_title',
'operator' => '=',
'value' => true,
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.sfwd-lessons-title',
'pattern' => array(
'desktop' => 'title-align-$',
'tablet' => 'title-tablet-align-$',
'mobile' => 'title-mobile-align-$',
),
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'left' => array(
'tooltip' => __( 'Left Align Title', 'kadence' ),
'dashicon' => 'editor-alignleft',
),
'center' => array(
'tooltip' => __( 'Center Align Title', 'kadence' ),
'dashicon' => 'editor-aligncenter',
),
'right' => array(
'tooltip' => __( 'Right Align Title', 'kadence' ),
'dashicon' => 'editor-alignright',
),
),
'responsive' => true,
),
),
'sfwd-lessons_title_height' => array(
'control_type' => 'kadence_range_control',
'section' => 'sfwd_lesson_layout',
'priority' => 5,
'label' => esc_html__( 'Title Container Min Height', 'kadence' ),
'context' => array(
array(
'setting' => 'sfwd-lessons_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'sfwd-lessons_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#inner-wrap .sfwd-topic-hero-section .entry-header',
'property' => 'min-height',
'pattern' => '$',
'key' => 'size',
),
),
'default' => kadence()->default( 'sfwd-lessons_title_height' ),
'input_attrs' => array(
'min' => array(
'px' => 10,
'em' => 1,
'rem' => 1,
'vh' => 2,
),
'max' => array(
'px' => 800,
'em' => 12,
'rem' => 12,
'vh' => 100,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
'vh' => 1,
),
'units' => array( 'px', 'em', 'rem', 'vh' ),
),
),
'sfwd-lessons_title_elements' => array(
'control_type' => 'kadence_sorter_control',
'section' => 'sfwd_lesson_layout',
'priority' => 6,
'default' => kadence()->default( 'sfwd-lessons_title_elements' ),
'label' => esc_html__( 'Title Elements', 'kadence' ),
'transport' => 'refresh',
'settings' => array(
'elements' => 'sfwd-lessons_title_elements',
'title' => 'sfwd-lessons_title_element_title',
'breadcrumb' => 'sfwd-lessons_title_element_breadcrumb',
),
'context' => array(
array(
'setting' => 'sfwd-lessons_title',
'operator' => '=',
'value' => true,
),
),
'input_attrs' => array(
'group' => 'sfwd-lessons_title_element',
),
),
'sfwd-lessons_title_font' => array(
'control_type' => 'kadence_typography_control',
'section' => 'sfwd_lesson_layout_design',
'label' => esc_html__( 'Lesson Title Font', 'kadence' ),
'default' => kadence()->default( 'sfwd-lessons_title_font' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => '.sfwd-lessons-title h1',
'property' => 'font',
'key' => 'typography',
),
),
'context' => array(
array(
'setting' => 'sfwd-lessons_title',
'operator' => '=',
'value' => true,
),
),
'input_attrs' => array(
'id' => 'sfwd-lessons_title_font',
'headingInherit' => true,
),
),
'sfwd-lessons_title_breadcrumb_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'sfwd_lesson_layout_design',
'label' => esc_html__( 'Breadcrumb Colors', 'kadence' ),
'default' => kadence()->default( 'sfwd-lessons_title_breadcrumb_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.sfwd-lessons-title .kadence-breadcrumbs',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.sfwd-lessons-title .kadence-breadcrumbs a:hover',
'property' => 'color',
'pattern' => '$',
'key' => 'hover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Link Hover Color', 'kadence' ),
'palette' => true,
),
),
),
),
'sfwd-lessons_title_breadcrumb_font' => array(
'control_type' => 'kadence_typography_control',
'section' => 'sfwd_lesson_layout_design',
'label' => esc_html__( 'Breadcrumb Font', 'kadence' ),
'default' => kadence()->default( 'sfwd-lessons_title_breadcrumb_font' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => '.sfwd-lessons-title .kadence-breadcrumbs',
'property' => 'font',
'key' => 'typography',
),
),
'input_attrs' => array(
'id' => 'sfwd-lessons_title_breadcrumb_font',
'options' => 'no-color',
),
),
'sfwd-lessons_title_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'sfwd_lesson_layout_design',
'label' => esc_html__( 'Lesson Above Area Background', 'kadence' ),
'default' => kadence()->default( 'sfwd-lessons_title_background' ),
'context' => array(
array(
'setting' => 'sfwd-lessons_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'sfwd-lessons_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => '#inner-wrap .sfwd-lessons-hero-section .entry-hero-container-inner',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Lesson Title Background', 'kadence' ),
),
),
'sfwd-lessons_title_featured_image' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'sfwd_lesson_layout_design',
'default' => kadence()->default( 'sfwd-lessons_title_featured_image' ),
'label' => esc_html__( 'Use Featured Image for Background?', 'kadence' ),
'transport' => 'refresh',
'context' => array(
array(
'setting' => 'sfwd-lessons_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'sfwd-lessons_title_layout',
'operator' => '=',
'value' => 'above',
),
),
),
'sfwd-lessons_title_overlay_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'sfwd_lesson_layout_design',
'label' => esc_html__( 'Background Overlay Color', 'kadence' ),
'default' => kadence()->default( 'sfwd-lessons_title_overlay_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.sfwd-lessons-hero-section .hero-section-overlay',
'property' => 'background',
'pattern' => '$',
'key' => 'color',
),
),
'context' => array(
array(
'setting' => 'sfwd-lessons_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'sfwd-lessons_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Overlay Color', 'kadence' ),
'palette' => true,
),
),
'allowGradient' => true,
),
),
'sfwd-lessons_title_border' => array(
'control_type' => 'kadence_borders_control',
'section' => 'sfwd_lesson_layout_design',
'label' => esc_html__( 'Border', 'kadence' ),
'default' => kadence()->default( 'sfwd-lessons_title_border' ),
'context' => array(
array(
'setting' => 'sfwd-lessons_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'sfwd-lessons_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'settings' => array(
'border_top' => 'sfwd-lessons_title_top_border',
'border_bottom' => 'sfwd-lessons_title_bottom_border',
),
'live_method' => array(
'sfwd-lessons_title_top_border' => array(
array(
'type' => 'css_border',
'selector' => '.sfwd-lessons-hero-section .entry-hero-container-inner',
'pattern' => '$',
'property' => 'border-top',
'key' => 'border',
),
),
'sfwd-lessons_title_bottom_border' => array(
array(
'type' => 'css_border',
'selector' => '.sfwd-lessons-hero-section .entry-hero-container-inner',
'property' => 'border-bottom',
'pattern' => '$',
'key' => 'border',
),
),
),
),
'info_sfwd-lessons_layout' => array(
'control_type' => 'kadence_title_control',
'section' => 'sfwd_lesson_layout',
'priority' => 10,
'label' => esc_html__( 'Lesson Layout', 'kadence' ),
'settings' => false,
),
'info_sfwd-lessons_layout_design' => array(
'control_type' => 'kadence_title_control',
'section' => 'sfwd_lesson_layout_design',
'priority' => 10,
'label' => esc_html__( 'Lesson Layout', 'kadence' ),
'settings' => false,
),
'sfwd-lessons_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'sfwd_lesson_layout',
'label' => esc_html__( 'Lesson Layout', 'kadence' ),
'transport' => 'refresh',
'priority' => 10,
'default' => kadence()->default( 'sfwd-lessons_layout' ),
'input_attrs' => array(
'layout' => array(
'normal' => array(
'tooltip' => __( 'Normal', 'kadence' ),
'icon' => 'normal',
),
'narrow' => array(
'tooltip' => __( 'Narrow', 'kadence' ),
'icon' => 'narrow',
),
'fullwidth' => array(
'tooltip' => __( 'Fullwidth', 'kadence' ),
'icon' => 'fullwidth',
),
'left' => array(
'tooltip' => __( 'Left Sidebar', 'kadence' ),
'icon' => 'leftsidebar',
),
'right' => array(
'tooltip' => __( 'Right Sidebar', 'kadence' ),
'icon' => 'rightsidebar',
),
),
'responsive' => false,
'class' => 'kadence-three-col',
),
),
'sfwd-lessons_sidebar_id' => array(
'control_type' => 'kadence_select_control',
'section' => 'sfwd_lesson_layout',
'label' => esc_html__( 'Lesson Default Sidebar', 'kadence' ),
'transport' => 'refresh',
'priority' => 10,
'default' => kadence()->default( 'sfwd-lessons_sidebar_id' ),
'input_attrs' => array(
'options' => kadence()->sidebar_options(),
),
),
'sfwd-lessons_content_style' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'sfwd_lesson_layout',
'label' => esc_html__( 'Content Style', 'kadence' ),
'priority' => 10,
'default' => kadence()->default( 'sfwd-lessons_content_style' ),
'live_method' => array(
array(
'type' => 'class',
'selector' => 'body.single-sfwd-lessons',
'pattern' => 'content-style-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'boxed' => array(
'tooltip' => __( 'Boxed', 'kadence' ),
'icon' => 'boxed',
),
'unboxed' => array(
'tooltip' => __( 'Unboxed', 'kadence' ),
'icon' => 'narrow',
),
),
'responsive' => false,
'class' => 'kadence-two-col',
),
),
'sfwd-lessons_vertical_padding' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'sfwd_lesson_layout',
'label' => esc_html__( 'Content Vertical Padding', 'kadence' ),
'priority' => 10,
'default' => kadence()->default( 'sfwd-lessons_vertical_padding' ),
'live_method' => array(
array(
'type' => 'class',
'selector' => 'body.single-sfwd-lessons',
'pattern' => 'content-vertical-padding-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'show' => array(
'name' => __( 'Enable', 'kadence' ),
),
'hide' => array(
'name' => __( 'Disable', 'kadence' ),
),
'top' => array(
'name' => __( 'Top Only', 'kadence' ),
),
'bottom' => array(
'name' => __( 'Bottom Only', 'kadence' ),
),
),
'responsive' => false,
'class' => 'kadence-two-grid',
),
),
'sfwd-lessons_feature' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'sfwd_lesson_layout',
'priority' => 20,
'default' => kadence()->default( 'sfwd-lessons_feature' ),
'label' => esc_html__( 'Show Featured Image?', 'kadence' ),
'transport' => 'refresh',
),
'sfwd-lessons_feature_position' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'sfwd_lesson_layout',
'label' => esc_html__( 'Featured Image Position', 'kadence' ),
'priority' => 20,
'transport' => 'refresh',
'default' => kadence()->default( 'sfwd-lessons_feature_position' ),
'context' => array(
array(
'setting' => 'sfwd-lessons_feature',
'operator' => '=',
'value' => true,
),
),
'input_attrs' => array(
'layout' => array(
'above' => array(
'name' => __( 'Above', 'kadence' ),
),
'behind' => array(
'name' => __( 'Behind', 'kadence' ),
),
'below' => array(
'name' => __( 'Below', 'kadence' ),
),
),
'responsive' => false,
),
),
'sfwd-lessons_feature_ratio' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'sfwd_lesson_layout',
'label' => esc_html__( 'Featured Image Ratio', 'kadence' ),
'priority' => 20,
'default' => kadence()->default( 'sfwd-lessons_feature_ratio' ),
'context' => array(
array(
'setting' => 'sfwd-lessons_feature',
'operator' => '=',
'value' => true,
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => 'body.single-sfwd-lessons .article-post-thumbnail',
'pattern' => 'kadence-thumbnail-ratio-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'inherit' => array(
'name' => __( 'Inherit', 'kadence' ),
),
'1-1' => array(
'name' => __( '1:1', 'kadence' ),
),
'3-4' => array(
'name' => __( '4:3', 'kadence' ),
),
'2-3' => array(
'name' => __( '3:2', 'kadence' ),
),
'9-16' => array(
'name' => __( '16:9', 'kadence' ),
),
'1-2' => array(
'name' => __( '2:1', 'kadence' ),
),
),
'responsive' => false,
'class' => 'kadence-three-col-short',
),
),
'sfwd-lessons_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'sfwd_lesson_layout_design',
'label' => esc_html__( 'Site Background', 'kadence' ),
'default' => kadence()->default( 'sfwd-lessons_background' ),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => 'body.single-sfwd-lessons',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Lesson Background', 'kadence' ),
),
),
'sfwd-lessons_content_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'sfwd_lesson_layout_design',
'label' => esc_html__( 'Content Background', 'kadence' ),
'default' => kadence()->default( 'sfwd-lessons_content_background' ),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => 'body.single-sfwd-lessons .content-bg, body.single-sfwd-lessons.content-style-unboxed .site',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Lesson Content Background', 'kadence' ),
),
),
);
Theme_Customizer::add_settings( $settings );

View File

@@ -0,0 +1,711 @@
<?php
/**
* Quiz Layout Options
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
$settings = array(
'sfwd-quiz_layout_tabs' => array(
'control_type' => 'kadence_tab_control',
'section' => 'sfwd_quiz_layout',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'sfwd_quiz_layout',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'sfwd_quiz_layout_design',
),
'active' => 'general',
),
),
'sfwd-quiz_layout_tabs_design' => array(
'control_type' => 'kadence_tab_control',
'section' => 'sfwd_quiz_layout_design',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'sfwd_quiz_layout',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'sfwd_quiz_layout_design',
),
'active' => 'design',
),
),
'info_sfwd-quiz_title' => array(
'control_type' => 'kadence_title_control',
'section' => 'sfwd_quiz_layout',
'priority' => 2,
'label' => esc_html__( 'Quiz Title', 'kadence' ),
'settings' => false,
),
'info_sfwd-quiz_title_design' => array(
'control_type' => 'kadence_title_control',
'section' => 'sfwd_quiz_layout_design',
'priority' => 2,
'label' => esc_html__( 'Quiz Title', 'kadence' ),
'settings' => false,
),
'sfwd-quiz_title' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'sfwd_quiz_layout',
'priority' => 3,
'default' => kadence()->default( 'sfwd-quiz_title' ),
'label' => esc_html__( 'Show Quiz Title?', 'kadence' ),
'transport' => 'refresh',
),
'sfwd-quiz_title_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'sfwd_quiz_layout',
'label' => esc_html__( 'Quiz Title Layout', 'kadence' ),
'transport' => 'refresh',
'priority' => 4,
'default' => kadence()->default( 'sfwd-quiz_title_layout' ),
'context' => array(
array(
'setting' => 'sfwd-quiz_title',
'operator' => '=',
'value' => true,
),
),
'input_attrs' => array(
'layout' => array(
'normal' => array(
'tooltip' => __( 'In Content', 'kadence' ),
'icon' => 'incontent',
),
'above' => array(
'tooltip' => __( 'Above Content', 'kadence' ),
'icon' => 'abovecontent',
),
),
'responsive' => false,
'class' => 'kadence-two-col',
),
),
'sfwd-quiz_title_inner_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'sfwd_quiz_layout',
'priority' => 4,
'default' => kadence()->default( 'sfwd-quiz_title_inner_layout' ),
'label' => esc_html__( 'Title Container Width', 'kadence' ),
'context' => array(
array(
'setting' => 'sfwd-quiz_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'sfwd-quiz_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.sfwd-quiz-hero-section',
'pattern' => 'entry-hero-layout-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'standard' => array(
'tooltip' => __( 'Background Fullwidth, Content Contained', 'kadence' ),
'name' => __( 'Standard', 'kadence' ),
'icon' => '',
),
'fullwidth' => array(
'tooltip' => __( 'Background & Content Fullwidth', 'kadence' ),
'name' => __( 'Fullwidth', 'kadence' ),
'icon' => '',
),
'contained' => array(
'tooltip' => __( 'Background & Content Contained', 'kadence' ),
'name' => __( 'Contained', 'kadence' ),
'icon' => '',
),
),
'responsive' => false,
),
),
'sfwd-quiz_title_align' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'sfwd_quiz_layout',
'label' => esc_html__( 'Quiz Title Align', 'kadence' ),
'priority' => 4,
'default' => kadence()->default( 'sfwd-quiz_title_align' ),
'context' => array(
array(
'setting' => 'sfwd-quiz_title',
'operator' => '=',
'value' => true,
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.sfwd-quiz-title',
'pattern' => array(
'desktop' => 'title-align-$',
'tablet' => 'title-tablet-align-$',
'mobile' => 'title-mobile-align-$',
),
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'left' => array(
'tooltip' => __( 'Left Align Title', 'kadence' ),
'dashicon' => 'editor-alignleft',
),
'center' => array(
'tooltip' => __( 'Center Align Title', 'kadence' ),
'dashicon' => 'editor-aligncenter',
),
'right' => array(
'tooltip' => __( 'Right Align Title', 'kadence' ),
'dashicon' => 'editor-alignright',
),
),
'responsive' => true,
),
),
'sfwd-quiz_title_height' => array(
'control_type' => 'kadence_range_control',
'section' => 'sfwd_quiz_layout',
'priority' => 5,
'label' => esc_html__( 'Title Container Min Height', 'kadence' ),
'context' => array(
array(
'setting' => 'sfwd-quiz_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'sfwd-quiz_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#inner-wrap .sfwd-topic-hero-section .entry-header',
'property' => 'min-height',
'pattern' => '$',
'key' => 'size',
),
),
'default' => kadence()->default( 'sfwd-quiz_title_height' ),
'input_attrs' => array(
'min' => array(
'px' => 10,
'em' => 1,
'rem' => 1,
'vh' => 2,
),
'max' => array(
'px' => 800,
'em' => 12,
'rem' => 12,
'vh' => 100,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
'vh' => 1,
),
'units' => array( 'px', 'em', 'rem', 'vh' ),
),
),
'sfwd-quiz_title_elements' => array(
'control_type' => 'kadence_sorter_control',
'section' => 'sfwd_quiz_layout',
'priority' => 6,
'default' => kadence()->default( 'sfwd-quiz_title_elements' ),
'label' => esc_html__( 'Title Elements', 'kadence' ),
'transport' => 'refresh',
'settings' => array(
'elements' => 'sfwd-quiz_title_elements',
'title' => 'sfwd-quiz_title_element_title',
'breadcrumb' => 'sfwd-quiz_title_element_breadcrumb',
),
'context' => array(
array(
'setting' => 'sfwd-quiz_title',
'operator' => '=',
'value' => true,
),
),
'input_attrs' => array(
'group' => 'sfwd-quiz_title_element',
),
),
'sfwd-quiz_title_font' => array(
'control_type' => 'kadence_typography_control',
'section' => 'sfwd_quiz_layout_design',
'label' => esc_html__( 'Quiz Title Font', 'kadence' ),
'default' => kadence()->default( 'sfwd-quiz_title_font' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => '.sfwd-quiz-title h1',
'property' => 'font',
'key' => 'typography',
),
),
'context' => array(
array(
'setting' => 'sfwd-quiz_title',
'operator' => '=',
'value' => true,
),
),
'input_attrs' => array(
'id' => 'sfwd-quiz_title_font',
'headingInherit' => true,
),
),
'sfwd-quiz_title_breadcrumb_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'sfwd_quiz_layout_design',
'label' => esc_html__( 'Breadcrumb Colors', 'kadence' ),
'default' => kadence()->default( 'sfwd-quiz_title_breadcrumb_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.sfwd-quiz-title .kadence-breadcrumbs',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.sfwd-quiz-title .kadence-breadcrumbs a:hover',
'property' => 'color',
'pattern' => '$',
'key' => 'hover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Link Hover Color', 'kadence' ),
'palette' => true,
),
),
),
),
'sfwd-quiz_title_breadcrumb_font' => array(
'control_type' => 'kadence_typography_control',
'section' => 'sfwd_quiz_layout_design',
'label' => esc_html__( 'Breadcrumb Font', 'kadence' ),
'default' => kadence()->default( 'sfwd-quiz_title_breadcrumb_font' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => '.sfwd-quiz-title .kadence-breadcrumbs',
'property' => 'font',
'key' => 'typography',
),
),
'input_attrs' => array(
'id' => 'sfwd-quiz_title_breadcrumb_font',
'options' => 'no-color',
),
),
'sfwd-quiz_title_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'sfwd_quiz_layout_design',
'label' => esc_html__( 'Quiz Above Area Background', 'kadence' ),
'default' => kadence()->default( 'sfwd-quiz_title_background' ),
'context' => array(
array(
'setting' => 'sfwd-quiz_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'sfwd-quiz_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => '#inner-wrap .sfwd-quiz-hero-section .entry-hero-container-inner',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Quiz Title Background', 'kadence' ),
),
),
'sfwd-quiz_title_featured_image' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'sfwd_quiz_layout_design',
'default' => kadence()->default( 'sfwd-quiz_title_featured_image' ),
'label' => esc_html__( 'Use Featured Image for Background?', 'kadence' ),
'transport' => 'refresh',
'context' => array(
array(
'setting' => 'sfwd-quiz_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'sfwd-quiz_title_layout',
'operator' => '=',
'value' => 'above',
),
),
),
'sfwd-quiz_title_overlay_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'sfwd_quiz_layout_design',
'label' => esc_html__( 'Background Overlay Color', 'kadence' ),
'default' => kadence()->default( 'sfwd-quiz_title_overlay_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.sfwd-quiz-hero-section .hero-section-overlay',
'property' => 'background',
'pattern' => '$',
'key' => 'color',
),
),
'context' => array(
array(
'setting' => 'sfwd-quiz_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'sfwd-quiz_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Overlay Color', 'kadence' ),
'palette' => true,
),
),
'allowGradient' => true,
),
),
'sfwd-quiz_title_border' => array(
'control_type' => 'kadence_borders_control',
'section' => 'sfwd_quiz_layout_design',
'label' => esc_html__( 'Border', 'kadence' ),
'default' => kadence()->default( 'sfwd-quiz_title_border' ),
'context' => array(
array(
'setting' => 'sfwd-quiz_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'sfwd-quiz_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'settings' => array(
'border_top' => 'sfwd-quiz_title_top_border',
'border_bottom' => 'sfwd-quiz_title_bottom_border',
),
'live_method' => array(
'sfwd-quiz_title_top_border' => array(
array(
'type' => 'css_border',
'selector' => '.sfwd-quiz-hero-section .entry-hero-container-inner',
'pattern' => '$',
'property' => 'border-top',
'key' => 'border',
),
),
'sfwd-quiz_title_bottom_border' => array(
array(
'type' => 'css_border',
'selector' => '.sfwd-quiz-hero-section .entry-hero-container-inner',
'property' => 'border-bottom',
'pattern' => '$',
'key' => 'border',
),
),
),
),
'info_sfwd-quiz_layout' => array(
'control_type' => 'kadence_title_control',
'section' => 'sfwd_quiz_layout',
'priority' => 10,
'label' => esc_html__( 'Quiz Layout', 'kadence' ),
'settings' => false,
),
'info_sfwd-quiz_layout_design' => array(
'control_type' => 'kadence_title_control',
'section' => 'sfwd_quiz_layout_design',
'priority' => 10,
'label' => esc_html__( 'Quiz Layout', 'kadence' ),
'settings' => false,
),
'sfwd-quiz_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'sfwd_quiz_layout',
'label' => esc_html__( 'Quiz Layout', 'kadence' ),
'transport' => 'refresh',
'priority' => 10,
'default' => kadence()->default( 'sfwd-quiz_layout' ),
'input_attrs' => array(
'layout' => array(
'normal' => array(
'tooltip' => __( 'Normal', 'kadence' ),
'icon' => 'normal',
),
'narrow' => array(
'tooltip' => __( 'Narrow', 'kadence' ),
'icon' => 'narrow',
),
'fullwidth' => array(
'tooltip' => __( 'Fullwidth', 'kadence' ),
'icon' => 'fullwidth',
),
'left' => array(
'tooltip' => __( 'Left Sidebar', 'kadence' ),
'icon' => 'leftsidebar',
),
'right' => array(
'tooltip' => __( 'Right Sidebar', 'kadence' ),
'icon' => 'rightsidebar',
),
),
'responsive' => false,
'class' => 'kadence-three-col',
),
),
'sfwd-quiz_sidebar_id' => array(
'control_type' => 'kadence_select_control',
'section' => 'sfwd_quiz_layout',
'label' => esc_html__( 'Quiz Default Sidebar', 'kadence' ),
'transport' => 'refresh',
'priority' => 10,
'default' => kadence()->default( 'sfwd-quiz_sidebar_id' ),
'input_attrs' => array(
'options' => kadence()->sidebar_options(),
),
),
'sfwd-quiz_content_style' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'sfwd_quiz_layout',
'label' => esc_html__( 'Content Style', 'kadence' ),
'priority' => 10,
'default' => kadence()->default( 'sfwd-quiz_content_style' ),
'live_method' => array(
array(
'type' => 'class',
'selector' => 'body.single-sfwd-quiz',
'pattern' => 'content-style-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'boxed' => array(
'tooltip' => __( 'Boxed', 'kadence' ),
'icon' => 'boxed',
),
'unboxed' => array(
'tooltip' => __( 'Unboxed', 'kadence' ),
'icon' => 'narrow',
),
),
'responsive' => false,
'class' => 'kadence-two-col',
),
),
'sfwd-quiz_vertical_padding' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'sfwd_quiz_layout',
'label' => esc_html__( 'Content Vertical Padding', 'kadence' ),
'priority' => 10,
'default' => kadence()->default( 'sfwd-quiz_vertical_padding' ),
'live_method' => array(
array(
'type' => 'class',
'selector' => 'body.single-sfwd-quiz',
'pattern' => 'content-vertical-padding-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'show' => array(
'name' => __( 'Enable', 'kadence' ),
),
'hide' => array(
'name' => __( 'Disable', 'kadence' ),
),
'top' => array(
'name' => __( 'Top Only', 'kadence' ),
),
'bottom' => array(
'name' => __( 'Bottom Only', 'kadence' ),
),
),
'responsive' => false,
'class' => 'kadence-two-grid',
),
),
'sfwd-quiz_feature' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'sfwd_quiz_layout',
'priority' => 20,
'default' => kadence()->default( 'sfwd-quiz_feature' ),
'label' => esc_html__( 'Show Featured Image?', 'kadence' ),
'transport' => 'refresh',
),
'sfwd-quiz_feature_position' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'sfwd_quiz_layout',
'label' => esc_html__( 'Featured Image Position', 'kadence' ),
'priority' => 20,
'transport' => 'refresh',
'default' => kadence()->default( 'sfwd-quiz_feature_position' ),
'context' => array(
array(
'setting' => 'sfwd-quiz_feature',
'operator' => '=',
'value' => true,
),
),
'input_attrs' => array(
'layout' => array(
'above' => array(
'name' => __( 'Above', 'kadence' ),
),
'behind' => array(
'name' => __( 'Behind', 'kadence' ),
),
'below' => array(
'name' => __( 'Below', 'kadence' ),
),
),
'responsive' => false,
),
),
'sfwd-quiz_feature_ratio' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'sfwd_quiz_layout',
'label' => esc_html__( 'Featured Image Ratio', 'kadence' ),
'priority' => 20,
'default' => kadence()->default( 'sfwd-quiz_feature_ratio' ),
'context' => array(
array(
'setting' => 'sfwd-quiz_feature',
'operator' => '=',
'value' => true,
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => 'body.single-sfwd-quiz .article-post-thumbnail',
'pattern' => 'kadence-thumbnail-ratio-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'inherit' => array(
'name' => __( 'Inherit', 'kadence' ),
),
'1-1' => array(
'name' => __( '1:1', 'kadence' ),
),
'3-4' => array(
'name' => __( '4:3', 'kadence' ),
),
'2-3' => array(
'name' => __( '3:2', 'kadence' ),
),
'9-16' => array(
'name' => __( '16:9', 'kadence' ),
),
'1-2' => array(
'name' => __( '2:1', 'kadence' ),
),
),
'responsive' => false,
'class' => 'kadence-three-col-short',
),
),
'sfwd-quiz_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'sfwd_quiz_layout_design',
'label' => esc_html__( 'Site Background', 'kadence' ),
'default' => kadence()->default( 'sfwd-quiz_background' ),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => 'body.single-sfwd-quiz',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Quiz Background', 'kadence' ),
),
),
'sfwd-quiz_content_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'sfwd_quiz_layout_design',
'label' => esc_html__( 'Content Background', 'kadence' ),
'default' => kadence()->default( 'sfwd-quiz_content_background' ),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => 'body.single-sfwd-quiz .content-bg, body.single-sfwd-quiz.content-style-unboxed .site',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Quiz Content Background', 'kadence' ),
),
),
);
Theme_Customizer::add_settings( $settings );

View File

@@ -0,0 +1,711 @@
<?php
/**
* Topic Layout Options
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
$settings = array(
'sfwd-topic_layout_tabs' => array(
'control_type' => 'kadence_tab_control',
'section' => 'sfwd_topic_layout',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'sfwd_topic_layout',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'sfwd_topic_layout_design',
),
'active' => 'general',
),
),
'sfwd-topic_layout_tabs_design' => array(
'control_type' => 'kadence_tab_control',
'section' => 'sfwd_topic_layout_design',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'sfwd_topic_layout',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'sfwd_topic_layout_design',
),
'active' => 'design',
),
),
'info_sfwd-topic_title' => array(
'control_type' => 'kadence_title_control',
'section' => 'sfwd_topic_layout',
'priority' => 2,
'label' => esc_html__( 'Topic Title', 'kadence' ),
'settings' => false,
),
'info_sfwd-topic_title_design' => array(
'control_type' => 'kadence_title_control',
'section' => 'sfwd_topic_layout_design',
'priority' => 2,
'label' => esc_html__( 'Topic Title', 'kadence' ),
'settings' => false,
),
'sfwd-topic_title' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'sfwd_topic_layout',
'priority' => 3,
'default' => kadence()->default( 'sfwd-topic_title' ),
'label' => esc_html__( 'Show Topic Title?', 'kadence' ),
'transport' => 'refresh',
),
'sfwd-topic_title_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'sfwd_topic_layout',
'label' => esc_html__( 'Topic Title Layout', 'kadence' ),
'transport' => 'refresh',
'priority' => 4,
'default' => kadence()->default( 'sfwd-topic_title_layout' ),
'context' => array(
array(
'setting' => 'sfwd-topic_title',
'operator' => '=',
'value' => true,
),
),
'input_attrs' => array(
'layout' => array(
'normal' => array(
'tooltip' => __( 'In Content', 'kadence' ),
'icon' => 'incontent',
),
'above' => array(
'tooltip' => __( 'Above Content', 'kadence' ),
'icon' => 'abovecontent',
),
),
'responsive' => false,
'class' => 'kadence-two-col',
),
),
'sfwd-topic_title_inner_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'sfwd_topic_layout',
'priority' => 4,
'default' => kadence()->default( 'sfwd-topic_title_inner_layout' ),
'label' => esc_html__( 'Title Container Width', 'kadence' ),
'context' => array(
array(
'setting' => 'sfwd-topic_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'sfwd-topic_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.sfwd-topic-hero-section',
'pattern' => 'entry-hero-layout-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'standard' => array(
'tooltip' => __( 'Background Fullwidth, Content Contained', 'kadence' ),
'name' => __( 'Standard', 'kadence' ),
'icon' => '',
),
'fullwidth' => array(
'tooltip' => __( 'Background & Content Fullwidth', 'kadence' ),
'name' => __( 'Fullwidth', 'kadence' ),
'icon' => '',
),
'contained' => array(
'tooltip' => __( 'Background & Content Contained', 'kadence' ),
'name' => __( 'Contained', 'kadence' ),
'icon' => '',
),
),
'responsive' => false,
),
),
'sfwd-topic_title_align' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'sfwd_topic_layout',
'label' => esc_html__( 'Topic Title Align', 'kadence' ),
'priority' => 4,
'default' => kadence()->default( 'sfwd-topic_title_align' ),
'context' => array(
array(
'setting' => 'sfwd-topic_title',
'operator' => '=',
'value' => true,
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.sfwd-topic-title',
'pattern' => array(
'desktop' => 'title-align-$',
'tablet' => 'title-tablet-align-$',
'mobile' => 'title-mobile-align-$',
),
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'left' => array(
'tooltip' => __( 'Left Align Title', 'kadence' ),
'dashicon' => 'editor-alignleft',
),
'center' => array(
'tooltip' => __( 'Center Align Title', 'kadence' ),
'dashicon' => 'editor-aligncenter',
),
'right' => array(
'tooltip' => __( 'Right Align Title', 'kadence' ),
'dashicon' => 'editor-alignright',
),
),
'responsive' => true,
),
),
'sfwd-topic_title_height' => array(
'control_type' => 'kadence_range_control',
'section' => 'sfwd_topic_layout',
'priority' => 5,
'label' => esc_html__( 'Title Container Min Height', 'kadence' ),
'context' => array(
array(
'setting' => 'sfwd-topic_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'sfwd-topic_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#inner-wrap .sfwd-topic-hero-section .entry-header',
'property' => 'min-height',
'pattern' => '$',
'key' => 'size',
),
),
'default' => kadence()->default( 'sfwd-topic_title_height' ),
'input_attrs' => array(
'min' => array(
'px' => 10,
'em' => 1,
'rem' => 1,
'vh' => 2,
),
'max' => array(
'px' => 800,
'em' => 12,
'rem' => 12,
'vh' => 100,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
'vh' => 1,
),
'units' => array( 'px', 'em', 'rem', 'vh' ),
),
),
'sfwd-topic_title_elements' => array(
'control_type' => 'kadence_sorter_control',
'section' => 'sfwd_topic_layout',
'priority' => 6,
'default' => kadence()->default( 'sfwd-topic_title_elements' ),
'label' => esc_html__( 'Title Elements', 'kadence' ),
'transport' => 'refresh',
'settings' => array(
'elements' => 'sfwd-topic_title_elements',
'title' => 'sfwd-topic_title_element_title',
'breadcrumb' => 'sfwd-topic_title_element_breadcrumb',
),
'context' => array(
array(
'setting' => 'sfwd-topic_title',
'operator' => '=',
'value' => true,
),
),
'input_attrs' => array(
'group' => 'sfwd-topic_title_element',
),
),
'sfwd-topic_title_font' => array(
'control_type' => 'kadence_typography_control',
'section' => 'sfwd_topic_layout_design',
'label' => esc_html__( 'Topic Title Font', 'kadence' ),
'default' => kadence()->default( 'sfwd-topic_title_font' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => '.sfwd-topic-title h1',
'property' => 'font',
'key' => 'typography',
),
),
'context' => array(
array(
'setting' => 'sfwd-topic_title',
'operator' => '=',
'value' => true,
),
),
'input_attrs' => array(
'id' => 'sfwd-topic_title_font',
'headingInherit' => true,
),
),
'sfwd-topic_title_breadcrumb_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'sfwd_topic_layout_design',
'label' => esc_html__( 'Breadcrumb Colors', 'kadence' ),
'default' => kadence()->default( 'sfwd-topic_title_breadcrumb_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.sfwd-topic-title .kadence-breadcrumbs',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.sfwd-topic-title .kadence-breadcrumbs a:hover',
'property' => 'color',
'pattern' => '$',
'key' => 'hover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Link Hover Color', 'kadence' ),
'palette' => true,
),
),
),
),
'sfwd-topic_title_breadcrumb_font' => array(
'control_type' => 'kadence_typography_control',
'section' => 'sfwd_topic_layout_design',
'label' => esc_html__( 'Breadcrumb Font', 'kadence' ),
'default' => kadence()->default( 'sfwd-topic_title_breadcrumb_font' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => '.sfwd-topic-title .kadence-breadcrumbs',
'property' => 'font',
'key' => 'typography',
),
),
'input_attrs' => array(
'id' => 'sfwd-topic_title_breadcrumb_font',
'options' => 'no-color',
),
),
'sfwd-topic_title_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'sfwd_topic_layout_design',
'label' => esc_html__( 'Topic Above Area Background', 'kadence' ),
'default' => kadence()->default( 'sfwd-topic_title_background' ),
'context' => array(
array(
'setting' => 'sfwd-topic_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'sfwd-topic_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => '#inner-wrap .sfwd-topic-hero-section .entry-hero-container-inner',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Topic Title Background', 'kadence' ),
),
),
'sfwd-topic_title_featured_image' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'sfwd_topic_layout_design',
'default' => kadence()->default( 'sfwd-topic_title_featured_image' ),
'label' => esc_html__( 'Use Featured Image for Background?', 'kadence' ),
'transport' => 'refresh',
'context' => array(
array(
'setting' => 'sfwd-topic_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'sfwd-topic_title_layout',
'operator' => '=',
'value' => 'above',
),
),
),
'sfwd-topic_title_overlay_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'sfwd_topic_layout_design',
'label' => esc_html__( 'Background Overlay Color', 'kadence' ),
'default' => kadence()->default( 'sfwd-topic_title_overlay_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.sfwd-topic-hero-section .hero-section-overlay',
'property' => 'background',
'pattern' => '$',
'key' => 'color',
),
),
'context' => array(
array(
'setting' => 'sfwd-topic_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'sfwd-topic_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Overlay Color', 'kadence' ),
'palette' => true,
),
),
'allowGradient' => true,
),
),
'sfwd-topic_title_border' => array(
'control_type' => 'kadence_borders_control',
'section' => 'sfwd_topic_layout_design',
'label' => esc_html__( 'Border', 'kadence' ),
'default' => kadence()->default( 'sfwd-topic_title_border' ),
'context' => array(
array(
'setting' => 'sfwd-topic_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'sfwd-topic_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'settings' => array(
'border_top' => 'sfwd-topic_title_top_border',
'border_bottom' => 'sfwd-topic_title_bottom_border',
),
'live_method' => array(
'sfwd-topic_title_top_border' => array(
array(
'type' => 'css_border',
'selector' => '.sfwd-topic-hero-section .entry-hero-container-inner',
'pattern' => '$',
'property' => 'border-top',
'key' => 'border',
),
),
'sfwd-topic_title_bottom_border' => array(
array(
'type' => 'css_border',
'selector' => '.sfwd-topic-hero-section .entry-hero-container-inner',
'property' => 'border-bottom',
'pattern' => '$',
'key' => 'border',
),
),
),
),
'info_sfwd-topic_layout' => array(
'control_type' => 'kadence_title_control',
'section' => 'sfwd_topic_layout',
'priority' => 10,
'label' => esc_html__( 'Topic Layout', 'kadence' ),
'settings' => false,
),
'info_sfwd-topic_layout_design' => array(
'control_type' => 'kadence_title_control',
'section' => 'sfwd_topic_layout_design',
'priority' => 10,
'label' => esc_html__( 'Topic Layout', 'kadence' ),
'settings' => false,
),
'sfwd-topic_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'sfwd_topic_layout',
'label' => esc_html__( 'Topic Layout', 'kadence' ),
'transport' => 'refresh',
'priority' => 10,
'default' => kadence()->default( 'sfwd-topic_layout' ),
'input_attrs' => array(
'layout' => array(
'normal' => array(
'tooltip' => __( 'Normal', 'kadence' ),
'icon' => 'normal',
),
'narrow' => array(
'tooltip' => __( 'Narrow', 'kadence' ),
'icon' => 'narrow',
),
'fullwidth' => array(
'tooltip' => __( 'Fullwidth', 'kadence' ),
'icon' => 'fullwidth',
),
'left' => array(
'tooltip' => __( 'Left Sidebar', 'kadence' ),
'icon' => 'leftsidebar',
),
'right' => array(
'tooltip' => __( 'Right Sidebar', 'kadence' ),
'icon' => 'rightsidebar',
),
),
'responsive' => false,
'class' => 'kadence-three-col',
),
),
'sfwd-topic_sidebar_id' => array(
'control_type' => 'kadence_select_control',
'section' => 'sfwd_topic_layout',
'label' => esc_html__( 'Topic Default Sidebar', 'kadence' ),
'transport' => 'refresh',
'priority' => 10,
'default' => kadence()->default( 'sfwd-topic_sidebar_id' ),
'input_attrs' => array(
'options' => kadence()->sidebar_options(),
),
),
'sfwd-topic_content_style' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'sfwd_topic_layout',
'label' => esc_html__( 'Content Style', 'kadence' ),
'priority' => 10,
'default' => kadence()->default( 'sfwd-topic_content_style' ),
'live_method' => array(
array(
'type' => 'class',
'selector' => 'body.single-sfwd-topic',
'pattern' => 'content-style-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'boxed' => array(
'tooltip' => __( 'Boxed', 'kadence' ),
'icon' => 'boxed',
),
'unboxed' => array(
'tooltip' => __( 'Unboxed', 'kadence' ),
'icon' => 'narrow',
),
),
'responsive' => false,
'class' => 'kadence-two-col',
),
),
'sfwd-topic_vertical_padding' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'sfwd_topic_layout',
'label' => esc_html__( 'Content Vertical Padding', 'kadence' ),
'priority' => 10,
'default' => kadence()->default( 'sfwd-topic_vertical_padding' ),
'live_method' => array(
array(
'type' => 'class',
'selector' => 'body.single-sfwd-topic',
'pattern' => 'content-vertical-padding-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'show' => array(
'name' => __( 'Enable', 'kadence' ),
),
'hide' => array(
'name' => __( 'Disable', 'kadence' ),
),
'top' => array(
'name' => __( 'Top Only', 'kadence' ),
),
'bottom' => array(
'name' => __( 'Bottom Only', 'kadence' ),
),
),
'responsive' => false,
'class' => 'kadence-two-grid',
),
),
'sfwd-topic_feature' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'sfwd_topic_layout',
'priority' => 20,
'default' => kadence()->default( 'sfwd-topic_feature' ),
'label' => esc_html__( 'Show Featured Image?', 'kadence' ),
'transport' => 'refresh',
),
'sfwd-topic_feature_position' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'sfwd_topic_layout',
'label' => esc_html__( 'Featured Image Position', 'kadence' ),
'priority' => 20,
'transport' => 'refresh',
'default' => kadence()->default( 'sfwd-topic_feature_position' ),
'context' => array(
array(
'setting' => 'sfwd-topic_feature',
'operator' => '=',
'value' => true,
),
),
'input_attrs' => array(
'layout' => array(
'above' => array(
'name' => __( 'Above', 'kadence' ),
),
'behind' => array(
'name' => __( 'Behind', 'kadence' ),
),
'below' => array(
'name' => __( 'Below', 'kadence' ),
),
),
'responsive' => false,
),
),
'sfwd-topic_feature_ratio' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'sfwd_topic_layout',
'label' => esc_html__( 'Featured Image Ratio', 'kadence' ),
'priority' => 20,
'default' => kadence()->default( 'sfwd-topic_feature_ratio' ),
'context' => array(
array(
'setting' => 'sfwd-topic_feature',
'operator' => '=',
'value' => true,
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => 'body.single-sfwd-topic .article-post-thumbnail',
'pattern' => 'kadence-thumbnail-ratio-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'inherit' => array(
'name' => __( 'Inherit', 'kadence' ),
),
'1-1' => array(
'name' => __( '1:1', 'kadence' ),
),
'3-4' => array(
'name' => __( '4:3', 'kadence' ),
),
'2-3' => array(
'name' => __( '3:2', 'kadence' ),
),
'9-16' => array(
'name' => __( '16:9', 'kadence' ),
),
'1-2' => array(
'name' => __( '2:1', 'kadence' ),
),
),
'responsive' => false,
'class' => 'kadence-three-col-short',
),
),
'sfwd-topic_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'sfwd_topic_layout_design',
'label' => esc_html__( 'Site Background', 'kadence' ),
'default' => kadence()->default( 'sfwd-topic_background' ),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => 'body.single-sfwd-topic',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Topic Background', 'kadence' ),
),
),
'sfwd-topic_content_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'sfwd_topic_layout_design',
'label' => esc_html__( 'Content Background', 'kadence' ),
'default' => kadence()->default( 'sfwd-topic_content_background' ),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => 'body.single-sfwd-topic .content-bg, body.single-sfwd-topic.content-style-unboxed .site',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Topic Content Background', 'kadence' ),
),
),
);
Theme_Customizer::add_settings( $settings );

View File

@@ -0,0 +1,596 @@
<?php
/**
* Header Main Row Options
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
$settings = array(
'course_archive_tabs' => array(
'control_type' => 'kadence_tab_control',
'section' => 'course_archive',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'course_archive',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'course_archive_design',
),
'active' => 'general',
),
),
'course_archive_tabs_design' => array(
'control_type' => 'kadence_tab_control',
'section' => 'course_archive_design',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'course_archive',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'course_archive_design',
),
'active' => 'design',
),
),
'info_course_archive_title' => array(
'control_type' => 'kadence_title_control',
'section' => 'course_archive',
'priority' => 2,
'label' => esc_html__( 'Archive Title', 'kadence' ),
'settings' => false,
),
'info_course_archive_title_design' => array(
'control_type' => 'kadence_title_control',
'section' => 'course_archive_design',
'priority' => 2,
'label' => esc_html__( 'Archive Title', 'kadence' ),
'settings' => false,
),
'course_archive_title' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'course_archive',
'priority' => 3,
'default' => kadence()->default( 'course_archive_title' ),
'label' => esc_html__( 'Show Archive Title?', 'kadence' ),
'transport' => 'refresh',
),
'course_archive_title_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'course_archive',
'label' => esc_html__( 'Archive Title Layout', 'kadence' ),
'transport' => 'refresh',
'priority' => 4,
'default' => kadence()->default( 'course_archive_title_layout' ),
'context' => array(
array(
'setting' => 'course_archive_title',
'operator' => '=',
'value' => true,
),
),
'input_attrs' => array(
'layout' => array(
'normal' => array(
'tooltip' => __( 'In Content', 'kadence' ),
'icon' => 'incontent',
),
'above' => array(
'tooltip' => __( 'Above Content', 'kadence' ),
'icon' => 'abovecontent',
),
),
'responsive' => false,
'class' => 'kadence-two-col',
),
),
'course_archive_title_inner_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'course_archive',
'priority' => 4,
'default' => kadence()->default( 'course_archive_title_inner_layout' ),
'label' => esc_html__( 'Container Width', 'kadence' ),
'context' => array(
array(
'setting' => 'course_archive_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'course_archive_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.course-archive-hero-section',
'pattern' => 'entry-hero-layout-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'standard' => array(
'tooltip' => __( 'Background Fullwidth, Content Contained', 'kadence' ),
'name' => __( 'Standard', 'kadence' ),
'icon' => '',
),
'fullwidth' => array(
'tooltip' => __( 'Background & Content Fullwidth', 'kadence' ),
'name' => __( 'Fullwidth', 'kadence' ),
'icon' => '',
),
'contained' => array(
'tooltip' => __( 'Background & Content Contained', 'kadence' ),
'name' => __( 'Contained', 'kadence' ),
'icon' => '',
),
),
'responsive' => false,
),
),
'course_archive_title_align' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'course_archive',
'label' => esc_html__( 'Course Title Align', 'kadence' ),
'priority' => 4,
'default' => kadence()->default( 'course_archive_title_align' ),
'context' => array(
array(
'setting' => 'course_archive_title',
'operator' => '=',
'value' => true,
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.course-archive-title',
'pattern' => array(
'desktop' => 'title-align-$',
'tablet' => 'title-tablet-align-$',
'mobile' => 'title-mobile-align-$',
),
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'left' => array(
'tooltip' => __( 'Left Align Title', 'kadence' ),
'dashicon' => 'editor-alignleft',
),
'center' => array(
'tooltip' => __( 'Center Align Title', 'kadence' ),
'dashicon' => 'editor-aligncenter',
),
'right' => array(
'tooltip' => __( 'Right Align Title', 'kadence' ),
'dashicon' => 'editor-alignright',
),
),
'responsive' => true,
),
),
'course_archive_title_height' => array(
'control_type' => 'kadence_range_control',
'section' => 'course_archive',
'priority' => 5,
'label' => esc_html__( 'Container Min Height', 'kadence' ),
'context' => array(
array(
'setting' => 'course_archive_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'course_archive_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#inner-wrap .course-archive-hero-section .entry-header',
'property' => 'min-height',
'pattern' => '$',
'key' => 'size',
),
),
'default' => kadence()->default( 'course_archive_title_height' ),
'input_attrs' => array(
'min' => array(
'px' => 10,
'em' => 1,
'rem' => 1,
'vh' => 2,
),
'max' => array(
'px' => 800,
'em' => 12,
'rem' => 12,
'vh' => 100,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
'vh' => 1,
),
'units' => array( 'px', 'em', 'rem', 'vh' ),
),
),
'course_archive_title_elements' => array(
'control_type' => 'kadence_sorter_control',
'section' => 'course_archive',
'priority' => 6,
'default' => kadence()->default( 'course_archive_title_elements' ),
'label' => esc_html__( 'Title Elements', 'kadence' ),
'transport' => 'refresh',
'settings' => array(
'elements' => 'course_archive_title_elements',
'title' => 'course_archive_title_element_title',
'breadcrumb' => 'course_archive_title_element_breadcrumb',
'description' => 'course_archive_title_element_description',
),
),
'course_archive_title_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'course_archive_design',
'label' => esc_html__( 'Title Color', 'kadence' ),
'default' => kadence()->default( 'course_archive_title_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.course-archive-title h1',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Color', 'kadence' ),
'palette' => true,
),
),
),
),
'course_archive_title_description_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'course_archive_design',
'label' => esc_html__( 'Description Colors', 'kadence' ),
'default' => kadence()->default( 'course_archive_title_description_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.course-archive-title .archive-description',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.course-archive-title .archive-description a:hover',
'property' => 'color',
'pattern' => '$',
'key' => 'hover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Link Hover Color', 'kadence' ),
'palette' => true,
),
),
),
),
'course_archive_title_breadcrumb_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'course_archive_design',
'label' => esc_html__( 'Breadcrumb Colors', 'kadence' ),
'default' => kadence()->default( 'course_archive_title_breadcrumb_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.course-archive-title .kadence-breadcrumbs',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.course-archive-title .kadence-breadcrumbs a:hover',
'property' => 'color',
'pattern' => '$',
'key' => 'hover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Link Hover Color', 'kadence' ),
'palette' => true,
),
),
),
),
'course_archive_title_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'course_archive_design',
'label' => esc_html__( 'Archive Title Background', 'kadence' ),
'default' => kadence()->default( 'course_archive_title_background' ),
'context' => array(
array(
'setting' => 'course_archive_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'course_archive_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => '#inner-wrap .course-archive-hero-section .entry-hero-container-inner',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Course Archive Title Background', 'kadence' ),
),
),
'course_archive_title_overlay_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'course_archive_design',
'label' => esc_html__( 'Background Overlay Color', 'kadence' ),
'default' => kadence()->default( 'course_archive_title_overlay_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.course-archive-hero-section .hero-section-overlay',
'property' => 'background',
'pattern' => '$',
'key' => 'color',
),
),
'context' => array(
array(
'setting' => 'course_archive_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'course_archive_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Overlay Color', 'kadence' ),
'palette' => true,
),
),
'allowGradient' => true,
),
),
'course_archive_title_border' => array(
'control_type' => 'kadence_borders_control',
'section' => 'course_archive_design',
'label' => esc_html__( 'Border', 'kadence' ),
'default' => kadence()->default( 'course_archive_title_border' ),
'context' => array(
array(
'setting' => 'course_archive_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'course_archive_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'settings' => array(
'border_top' => 'course_archive_title_top_border',
'border_bottom' => 'course_archive_title_bottom_border',
),
'live_method' => array(
'course_archive_title_top_border' => array(
array(
'type' => 'css_border',
'selector' => '.course-archive-hero-section .entry-hero-container-inner',
'pattern' => '$',
'property' => 'border-top',
'key' => 'border',
),
),
'course_archive_title_bottom_border' => array(
array(
'type' => 'css_border',
'selector' => '.course-archive-hero-section .entry-hero-container-inner',
'property' => 'border-bottom',
'pattern' => '$',
'key' => 'border',
),
),
),
),
'info_course_archive_layout' => array(
'control_type' => 'kadence_title_control',
'section' => 'course_archive',
'priority' => 10,
'label' => esc_html__( 'Archive Layout', 'kadence' ),
'settings' => false,
),
'info_course_archive_layout_design' => array(
'control_type' => 'kadence_title_control',
'section' => 'course_archive_design',
'priority' => 10,
'label' => esc_html__( 'Archive Layout', 'kadence' ),
'settings' => false,
),
'course_archive_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'course_archive',
'label' => esc_html__( 'Archive Layout', 'kadence' ),
'transport' => 'refresh',
'priority' => 10,
'default' => kadence()->default( 'course_archive_layout' ),
'input_attrs' => array(
'layout' => array(
'normal' => array(
'tooltip' => __( 'Normal', 'kadence' ),
'icon' => 'normal',
),
'narrow' => array(
'tooltip' => __( 'Narrow', 'kadence' ),
'icon' => 'narrow',
),
'fullwidth' => array(
'tooltip' => __( 'Fullwidth', 'kadence' ),
'icon' => 'fullwidth',
),
'left' => array(
'tooltip' => __( 'Left Sidebar', 'kadence' ),
'icon' => 'leftsidebar',
),
'right' => array(
'tooltip' => __( 'Right Sidebar', 'kadence' ),
'icon' => 'rightsidebar',
),
),
'class' => 'kadence-three-col',
'responsive' => false,
),
),
'course_archive_content_style' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'course_archive',
'label' => esc_html__( 'Content Style', 'kadence' ),
'priority' => 10,
'default' => kadence()->default( 'course_archive_content_style' ),
'live_method' => array(
array(
'type' => 'class',
'selector' => 'body.post-type-archive-course',
'pattern' => 'content-style-$',
'key' => '',
),
array(
'type' => 'class',
'selector' => 'body.tax-course_cat',
'pattern' => 'content-style-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'boxed' => array(
'tooltip' => __( 'Boxed', 'kadence' ),
'icon' => 'gridBoxed',
),
'unboxed' => array(
'tooltip' => __( 'Unboxed', 'kadence' ),
'icon' => 'gridUnboxed',
),
),
'responsive' => false,
'class' => 'kadence-two-col',
),
),
'course_archive_columns' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'course_archive',
'priority' => 20,
'label' => esc_html__( 'Course Archive Columns', 'kadence' ),
'transport' => 'refresh',
'default' => kadence()->default( 'course_archive_columns' ),
'input_attrs' => array(
'layout' => array(
'2' => array(
'name' => __( '2', 'kadence' ),
),
'3' => array(
'name' => __( '3', 'kadence' ),
),
'4' => array(
'name' => __( '4', 'kadence' ),
),
),
'responsive' => false,
),
),
'course_archive_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'course_archive_design',
'label' => esc_html__( 'Site Background', 'kadence' ),
'default' => kadence()->default( 'course_archive_background' ),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => 'body.post-type-archive-course, body.tax-course_cat',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Course Archive Background', 'kadence' ),
),
),
'course_archive_content_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'course_archive_design',
'label' => esc_html__( 'Content Background', 'kadence' ),
'default' => kadence()->default( 'course_archive_content_background' ),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => 'body.post-type-archive-course .content-bg, body.tax-course_cat .content-bg, body.tax-course_cat.content-style-unboxed .site, body.post-type-archive-course.content-style-unboxed .site',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Archive Content Background', 'kadence' ),
),
),
);
Theme_Customizer::add_settings( $settings );

View File

@@ -0,0 +1,836 @@
<?php
/**
* Product Layout Options
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
$settings = array(
'course_layout_tabs' => array(
'control_type' => 'kadence_tab_control',
'section' => 'course_layout',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'course_layout',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'course_layout_design',
),
'active' => 'general',
),
),
'course_layout_tabs_design' => array(
'control_type' => 'kadence_tab_control',
'section' => 'course_layout_design',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'course_layout',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'course_layout_design',
),
'active' => 'design',
),
),
'info_course_title' => array(
'control_type' => 'kadence_title_control',
'section' => 'course_layout',
'priority' => 2,
'label' => esc_html__( 'Course Title', 'kadence' ),
'settings' => false,
),
'info_course_title_design' => array(
'control_type' => 'kadence_title_control',
'section' => 'course_layout_design',
'priority' => 2,
'label' => esc_html__( 'Course Title', 'kadence' ),
'settings' => false,
),
'course_title' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'course_layout',
'priority' => 3,
'default' => kadence()->default( 'course_title' ),
'label' => esc_html__( 'Show Course Title?', 'kadence' ),
'transport' => 'refresh',
),
'course_title_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'course_layout',
'label' => esc_html__( 'Course Title Layout', 'kadence' ),
'transport' => 'refresh',
'priority' => 4,
'default' => kadence()->default( 'course_title_layout' ),
'context' => array(
array(
'setting' => 'course_title',
'operator' => '=',
'value' => true,
),
),
'input_attrs' => array(
'layout' => array(
'normal' => array(
'tooltip' => __( 'In Content', 'kadence' ),
'icon' => 'incontent',
),
'above' => array(
'tooltip' => __( 'Above Content', 'kadence' ),
'icon' => 'abovecontent',
),
),
'responsive' => false,
'class' => 'kadence-two-col',
),
),
'course_title_inner_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'course_layout',
'priority' => 4,
'default' => kadence()->default( 'course_title_inner_layout' ),
'label' => esc_html__( 'Title Container Width', 'kadence' ),
'context' => array(
array(
'setting' => 'course_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'course_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.course-hero-section',
'pattern' => 'entry-hero-layout-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'standard' => array(
'tooltip' => __( 'Background Fullwidth, Content Contained', 'kadence' ),
'name' => __( 'Standard', 'kadence' ),
'icon' => '',
),
'fullwidth' => array(
'tooltip' => __( 'Background & Content Fullwidth', 'kadence' ),
'name' => __( 'Fullwidth', 'kadence' ),
'icon' => '',
),
'contained' => array(
'tooltip' => __( 'Background & Content Contained', 'kadence' ),
'name' => __( 'Contained', 'kadence' ),
'icon' => '',
),
),
'responsive' => false,
),
),
'course_title_align' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'course_layout',
'label' => esc_html__( 'Course Title Align', 'kadence' ),
'priority' => 4,
'default' => kadence()->default( 'course_title_align' ),
'context' => array(
array(
'setting' => 'course_title',
'operator' => '=',
'value' => true,
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.course-title',
'pattern' => array(
'desktop' => 'title-align-$',
'tablet' => 'title-tablet-align-$',
'mobile' => 'title-mobile-align-$',
),
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'left' => array(
'tooltip' => __( 'Left Align Title', 'kadence' ),
'dashicon' => 'editor-alignleft',
),
'center' => array(
'tooltip' => __( 'Center Align Title', 'kadence' ),
'dashicon' => 'editor-aligncenter',
),
'right' => array(
'tooltip' => __( 'Right Align Title', 'kadence' ),
'dashicon' => 'editor-alignright',
),
),
'responsive' => true,
),
),
'course_title_height' => array(
'control_type' => 'kadence_range_control',
'section' => 'course_layout',
'priority' => 5,
'label' => esc_html__( 'Title Container Min Height', 'kadence' ),
'context' => array(
array(
'setting' => 'course_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'course_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#inner-wrap .course-hero-section .entry-header',
'property' => 'min-height',
'pattern' => '$',
'key' => 'size',
),
),
'default' => kadence()->default( 'course_title_height' ),
'input_attrs' => array(
'min' => array(
'px' => 10,
'em' => 1,
'rem' => 1,
'vh' => 2,
),
'max' => array(
'px' => 800,
'em' => 12,
'rem' => 12,
'vh' => 100,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
'vh' => 1,
),
'units' => array( 'px', 'em', 'rem', 'vh' ),
),
),
'course_title_elements' => array(
'control_type' => 'kadence_sorter_control',
'section' => 'course_layout',
'priority' => 6,
'default' => kadence()->default( 'course_title_elements' ),
'label' => esc_html__( 'Title Elements', 'kadence' ),
'transport' => 'refresh',
'settings' => array(
'elements' => 'course_title_elements',
'title' => 'course_title_element_title',
'breadcrumb' => 'course_title_element_breadcrumb',
),
'context' => array(
array(
'setting' => 'course_title',
'operator' => '=',
'value' => true,
),
),
'input_attrs' => array(
'group' => 'course_title_element',
),
),
'course_title_font' => array(
'control_type' => 'kadence_typography_control',
'section' => 'course_layout_design',
'label' => esc_html__( 'Course Title Font', 'kadence' ),
'default' => kadence()->default( 'course_title_font' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => '.course-title h1',
'property' => 'font',
'key' => 'typography',
),
),
'context' => array(
array(
'setting' => 'course_title',
'operator' => '=',
'value' => true,
),
),
'input_attrs' => array(
'id' => 'course_title_font',
'headingInherit' => true,
),
),
'course_title_breadcrumb_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'course_layout_design',
'label' => esc_html__( 'Breadcrumb Colors', 'kadence' ),
'default' => kadence()->default( 'course_title_breadcrumb_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.course-title .kadence-breadcrumbs',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.course-title .kadence-breadcrumbs a:hover',
'property' => 'color',
'pattern' => '$',
'key' => 'hover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Link Hover Color', 'kadence' ),
'palette' => true,
),
),
),
),
'course_title_breadcrumb_font' => array(
'control_type' => 'kadence_typography_control',
'section' => 'course_layout_design',
'label' => esc_html__( 'Breadcrumb Font', 'kadence' ),
'default' => kadence()->default( 'course_title_breadcrumb_font' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => '.course-title .kadence-breadcrumbs',
'property' => 'font',
'key' => 'typography',
),
),
'input_attrs' => array(
'id' => 'course_title_breadcrumb_font',
'options' => 'no-color',
),
),
'course_title_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'course_layout_design',
'label' => esc_html__( 'Course Above Area Background', 'kadence' ),
'default' => kadence()->default( 'course_title_background' ),
'context' => array(
array(
'setting' => 'course_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'course_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => '#inner-wrap .course-hero-section .entry-hero-container-inner',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Course Title Background', 'kadence' ),
),
),
'course_title_featured_image' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'course_layout_design',
'default' => kadence()->default( 'course_title_featured_image' ),
'label' => esc_html__( 'Use Featured Image for Background?', 'kadence' ),
'transport' => 'refresh',
'context' => array(
array(
'setting' => 'course_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'course_title_layout',
'operator' => '=',
'value' => 'above',
),
),
),
'course_title_overlay_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'course_layout_design',
'label' => esc_html__( 'Background Overlay Color', 'kadence' ),
'default' => kadence()->default( 'course_title_overlay_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.course-hero-section .hero-section-overlay',
'property' => 'background',
'pattern' => '$',
'key' => 'color',
),
),
'context' => array(
array(
'setting' => 'course_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'course_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Overlay Color', 'kadence' ),
'palette' => true,
),
),
'allowGradient' => true,
),
),
'course_title_border' => array(
'control_type' => 'kadence_borders_control',
'section' => 'course_layout_design',
'label' => esc_html__( 'Border', 'kadence' ),
'default' => kadence()->default( 'course_title_border' ),
'context' => array(
array(
'setting' => 'course_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'course_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'settings' => array(
'border_top' => 'course_title_top_border',
'border_bottom' => 'course_title_bottom_border',
),
'live_method' => array(
'course_title_top_border' => array(
array(
'type' => 'css_border',
'selector' => '.course-hero-section .entry-hero-container-inner',
'pattern' => '$',
'property' => 'border-top',
'key' => 'border',
),
),
'course_title_bottom_border' => array(
array(
'type' => 'css_border',
'selector' => '.course-hero-section .entry-hero-container-inner',
'property' => 'border-bottom',
'pattern' => '$',
'key' => 'border',
),
),
),
),
'info_course_layout' => array(
'control_type' => 'kadence_title_control',
'section' => 'course_layout',
'priority' => 10,
'label' => esc_html__( 'Course Layout', 'kadence' ),
'settings' => false,
),
'info_course_layout_design' => array(
'control_type' => 'kadence_title_control',
'section' => 'course_layout_design',
'priority' => 10,
'label' => esc_html__( 'Course Layout', 'kadence' ),
'settings' => false,
),
'course_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'course_layout',
'label' => esc_html__( 'Course Layout', 'kadence' ),
'transport' => 'refresh',
'priority' => 10,
'default' => kadence()->default( 'course_layout' ),
'input_attrs' => array(
'layout' => array(
'normal' => array(
'tooltip' => __( 'Normal', 'kadence' ),
'icon' => 'normal',
),
'narrow' => array(
'tooltip' => __( 'Narrow', 'kadence' ),
'icon' => 'narrow',
),
'fullwidth' => array(
'tooltip' => __( 'Fullwidth', 'kadence' ),
'icon' => 'fullwidth',
),
'left' => array(
'tooltip' => __( 'Left Sidebar', 'kadence' ),
'icon' => 'leftsidebar',
),
'right' => array(
'tooltip' => __( 'Right Sidebar', 'kadence' ),
'icon' => 'rightsidebar',
),
),
'responsive' => false,
'class' => 'kadence-three-col',
),
),
'course_sidebar_id' => array(
'control_type' => 'kadence_select_control',
'section' => 'course_layout',
'label' => esc_html__( 'Course Default Sidebar', 'kadence' ),
'transport' => 'refresh',
'priority' => 10,
'default' => kadence()->default( 'course_sidebar_id' ),
'input_attrs' => array(
'options' => kadence()->sidebar_options(),
),
),
'course_content_style' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'course_layout',
'label' => esc_html__( 'Content Style', 'kadence' ),
'priority' => 10,
'default' => kadence()->default( 'course_content_style' ),
'live_method' => array(
array(
'type' => 'class',
'selector' => 'body.single-course',
'pattern' => 'content-style-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'boxed' => array(
'tooltip' => __( 'Boxed', 'kadence' ),
'icon' => 'boxed',
),
'unboxed' => array(
'tooltip' => __( 'Unboxed', 'kadence' ),
'icon' => 'narrow',
),
),
'responsive' => false,
'class' => 'kadence-two-col',
),
),
'course_vertical_padding' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'course_layout',
'label' => esc_html__( 'Content Vertical Padding', 'kadence' ),
'priority' => 10,
'default' => kadence()->default( 'course_vertical_padding' ),
'live_method' => array(
array(
'type' => 'class',
'selector' => 'body.single-course',
'pattern' => 'content-vertical-padding-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'show' => array(
'name' => __( 'Enable', 'kadence' ),
),
'hide' => array(
'name' => __( 'Disable', 'kadence' ),
),
'top' => array(
'name' => __( 'Top Only', 'kadence' ),
),
'bottom' => array(
'name' => __( 'Bottom Only', 'kadence' ),
),
),
'responsive' => false,
'class' => 'kadence-two-grid',
),
),
'course_feature' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'course_layout',
'priority' => 20,
'default' => kadence()->default( 'course_feature' ),
'label' => esc_html__( 'Show Featured Image?', 'kadence' ),
'transport' => 'refresh',
),
'course_feature_position' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'course_layout',
'label' => esc_html__( 'Featured Image Position', 'kadence' ),
'priority' => 20,
'transport' => 'refresh',
'default' => kadence()->default( 'course_feature_position' ),
'context' => array(
array(
'setting' => 'course_feature',
'operator' => '=',
'value' => true,
),
),
'input_attrs' => array(
'layout' => array(
'above' => array(
'name' => __( 'Above', 'kadence' ),
),
'behind' => array(
'name' => __( 'Behind', 'kadence' ),
),
'below' => array(
'name' => __( 'Below', 'kadence' ),
),
),
'responsive' => false,
),
),
'course_feature_ratio' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'course_layout',
'label' => esc_html__( 'Featured Image Ratio', 'kadence' ),
'priority' => 20,
'default' => kadence()->default( 'course_feature_ratio' ),
'context' => array(
array(
'setting' => 'course_feature',
'operator' => '=',
'value' => true,
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => 'body.single-course .article-post-thumbnail',
'pattern' => 'kadence-thumbnail-ratio-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'inherit' => array(
'name' => __( 'Inherit', 'kadence' ),
),
'1-1' => array(
'name' => __( '1:1', 'kadence' ),
),
'3-4' => array(
'name' => __( '4:3', 'kadence' ),
),
'2-3' => array(
'name' => __( '3:2', 'kadence' ),
),
'9-16' => array(
'name' => __( '16:9', 'kadence' ),
),
'1-2' => array(
'name' => __( '2:1', 'kadence' ),
),
),
'responsive' => false,
'class' => 'kadence-three-col-short',
),
),
'info_course_syllabus_layout' => array(
'control_type' => 'kadence_title_control',
'section' => 'course_layout',
'priority' => 20,
'label' => esc_html__( 'Course Syllabus Layout', 'kadence' ),
'settings' => false,
),
'course_syllabus_columns' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'course_layout',
'priority' => 20,
'label' => esc_html__( 'Course Syllabus Columns', 'kadence' ),
'transport' => 'refresh',
'default' => kadence()->default( 'course_syllabus_columns' ),
'input_attrs' => array(
'layout' => array(
'1' => array(
'name' => __( '1', 'kadence' ),
),
'2' => array(
'name' => __( '2', 'kadence' ),
),
'3' => array(
'name' => __( '3', 'kadence' ),
),
),
'responsive' => false,
),
),
'course_syllabus_lesson_style' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'course_layout',
'label' => esc_html__( 'Course Lesson Style', 'kadence' ),
'priority' => 20,
'transport' => 'refresh',
'default' => kadence()->default( 'course_syllabus_lesson_style' ),
'context' => array(
array(
'setting' => 'course_syllabus_columns',
'operator' => '=',
'value' => '1',
),
),
'input_attrs' => array(
'layout' => array(
'standard' => array(
'name' => __( 'Standard', 'kadence' ),
),
'tiles' => array(
'name' => __( 'Two Column Tiles', 'kadence' ),
),
'center' => array(
'name' => __( 'One Column Center', 'kadence' ),
),
),
'responsive' => false,
'class' => 'kadence-tiny-text',
),
),
'course_syllabus_thumbs' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'course_layout',
'priority' => 20,
'default' => kadence()->default( 'course_syllabus_thumbs' ),
'label' => esc_html__( 'Show Lesson Thumbnail in Syllabus?', 'kadence' ),
'transport' => 'refresh',
),
'course_syllabus_thumbs_ratio' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'course_layout',
'label' => esc_html__( 'Lesson Thumbnail Ratio', 'kadence' ),
'priority' => 20,
'default' => kadence()->default( 'course_syllabus_thumbs_ratio' ),
'context' => array(
array(
'setting' => 'course_syllabus_thumbs',
'operator' => '=',
'value' => true,
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => 'body.single-course .llms-lesson-thumbnail',
'pattern' => 'kadence-thumbnail-ratio-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'inherit' => array(
'name' => __( 'Inherit', 'kadence' ),
),
'1-1' => array(
'name' => __( '1:1', 'kadence' ),
),
'3-4' => array(
'name' => __( '4:3', 'kadence' ),
),
'2-3' => array(
'name' => __( '3:2', 'kadence' ),
),
'9-16' => array(
'name' => __( '16:9', 'kadence' ),
),
'1-2' => array(
'name' => __( '2:1', 'kadence' ),
),
),
'responsive' => false,
'class' => 'kadence-three-col-short',
),
),
'course_comments' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'course_layout',
'priority' => 20,
'default' => kadence()->default( 'course_comments' ),
'label' => esc_html__( 'Show Comments?', 'kadence' ),
'transport' => 'refresh',
),
'course_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'course_layout_design',
'priority' => 20,
'label' => esc_html__( 'Site Background', 'kadence' ),
'default' => kadence()->default( 'course_background' ),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => 'body.single-course',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Course Background', 'kadence' ),
),
),
'course_content_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'course_layout_design',
'priority' => 20,
'label' => esc_html__( 'Content Background', 'kadence' ),
'default' => kadence()->default( 'course_content_background' ),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => 'body.single-course .content-bg, body.single-course.content-style-unboxed .site',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Course Content Background', 'kadence' ),
),
),
);
Theme_Customizer::add_settings( $settings );

View File

@@ -0,0 +1,74 @@
<?php
/**
* Product Layout Options
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
$settings = array(
'info_llms_dashboard_title' => array(
'control_type' => 'kadence_title_control',
'section' => 'llms_dashboard_layout',
'priority' => 2,
'label' => esc_html__( 'Dashboard Navigation', 'kadence' ),
'settings' => false,
),
'llms_dashboard_navigation_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'llms_dashboard_layout',
'label' => esc_html__( 'Navigation Layout', 'kadence' ),
'transport' => 'refresh',
'priority' => 4,
'default' => kadence()->default( 'llms_dashboard_navigation_layout' ),
'input_attrs' => array(
'layout' => array(
'left' => array(
'tooltip' => __( 'Positioned on Left Content', 'kadence' ),
'name' => __( 'Left', 'kadence' ),
'icon' => '',
),
'above' => array(
'tooltip' => __( 'Positioned on Top Content', 'kadence' ),
'name' => __( 'Above', 'kadence' ),
'icon' => '',
),
'right' => array(
'tooltip' => __( 'Positioned on Right Content', 'kadence' ),
'name' => __( 'Right', 'kadence' ),
'icon' => '',
),
),
'responsive' => false,
),
),
'llms_dashboard_archive_columns' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'llms_dashboard_layout',
'priority' => 20,
'label' => esc_html__( 'Course and Membership Items Columns', 'kadence' ),
'transport' => 'refresh',
'default' => kadence()->default( 'llms_dashboard_archive_columns' ),
'input_attrs' => array(
'layout' => array(
'2' => array(
'name' => __( '2', 'kadence' ),
),
'3' => array(
'name' => __( '3', 'kadence' ),
),
'4' => array(
'name' => __( '4', 'kadence' ),
),
),
'responsive' => false,
),
),
);
Theme_Customizer::add_settings( $settings );

View File

@@ -0,0 +1,720 @@
<?php
/**
* Product Layout Options
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
$settings = array(
'lesson_layout_tabs' => array(
'control_type' => 'kadence_tab_control',
'section' => 'lesson_layout',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'lesson_layout',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'lesson_layout_design',
),
'active' => 'general',
),
),
'lesson_layout_tabs_design' => array(
'control_type' => 'kadence_tab_control',
'section' => 'lesson_layout_design',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'lesson_layout',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'lesson_layout_design',
),
'active' => 'design',
),
),
'info_lesson_title' => array(
'control_type' => 'kadence_title_control',
'section' => 'lesson_layout',
'priority' => 2,
'label' => esc_html__( 'Lesson Title', 'kadence' ),
'settings' => false,
),
'info_lesson_title_design' => array(
'control_type' => 'kadence_title_control',
'section' => 'lesson_layout_design',
'priority' => 2,
'label' => esc_html__( 'Lesson Title', 'kadence' ),
'settings' => false,
),
'lesson_title' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'lesson_layout',
'priority' => 3,
'default' => kadence()->default( 'lesson_title' ),
'label' => esc_html__( 'Show Lesson Title?', 'kadence' ),
'transport' => 'refresh',
),
'lesson_title_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'lesson_layout',
'label' => esc_html__( 'Lesson Title Layout', 'kadence' ),
'transport' => 'refresh',
'priority' => 4,
'default' => kadence()->default( 'lesson_title_layout' ),
'context' => array(
array(
'setting' => 'lesson_title',
'operator' => '=',
'value' => true,
),
),
'input_attrs' => array(
'layout' => array(
'normal' => array(
'tooltip' => __( 'In Content', 'kadence' ),
'icon' => 'incontent',
),
'above' => array(
'tooltip' => __( 'Above Content', 'kadence' ),
'icon' => 'abovecontent',
),
),
'responsive' => false,
'class' => 'kadence-two-col',
),
),
'lesson_title_inner_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'lesson_layout',
'priority' => 4,
'default' => kadence()->default( 'lesson_title_inner_layout' ),
'label' => esc_html__( 'Title Container Width', 'kadence' ),
'context' => array(
array(
'setting' => 'lesson_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'lesson_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.lesson-hero-section',
'pattern' => 'entry-hero-layout-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'standard' => array(
'tooltip' => __( 'Background Fullwidth, Content Contained', 'kadence' ),
'name' => __( 'Standard', 'kadence' ),
'icon' => '',
),
'fullwidth' => array(
'tooltip' => __( 'Background & Content Fullwidth', 'kadence' ),
'name' => __( 'Fullwidth', 'kadence' ),
'icon' => '',
),
'contained' => array(
'tooltip' => __( 'Background & Content Contained', 'kadence' ),
'name' => __( 'Contained', 'kadence' ),
'icon' => '',
),
),
'responsive' => false,
),
),
'lesson_title_align' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'lesson_layout',
'label' => esc_html__( 'Lesson Title Align', 'kadence' ),
'priority' => 4,
'default' => kadence()->default( 'lesson_title_align' ),
'context' => array(
array(
'setting' => 'lesson_title',
'operator' => '=',
'value' => true,
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.lesson-title',
'pattern' => array(
'desktop' => 'title-align-$',
'tablet' => 'title-tablet-align-$',
'mobile' => 'title-mobile-align-$',
),
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'left' => array(
'tooltip' => __( 'Left Align Title', 'kadence' ),
'dashicon' => 'editor-alignleft',
),
'center' => array(
'tooltip' => __( 'Center Align Title', 'kadence' ),
'dashicon' => 'editor-aligncenter',
),
'right' => array(
'tooltip' => __( 'Right Align Title', 'kadence' ),
'dashicon' => 'editor-alignright',
),
),
'responsive' => true,
),
),
'lesson_title_height' => array(
'control_type' => 'kadence_range_control',
'section' => 'lesson_layout',
'priority' => 5,
'label' => esc_html__( 'Title Container Min Height', 'kadence' ),
'context' => array(
array(
'setting' => 'lesson_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'lesson_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#inner-wrap .lesson-hero-section .entry-header',
'property' => 'min-height',
'pattern' => '$',
'key' => 'size',
),
),
'default' => kadence()->default( 'lesson_title_height' ),
'input_attrs' => array(
'min' => array(
'px' => 10,
'em' => 1,
'rem' => 1,
'vh' => 2,
),
'max' => array(
'px' => 800,
'em' => 12,
'rem' => 12,
'vh' => 100,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
'vh' => 1,
),
'units' => array( 'px', 'em', 'rem', 'vh' ),
),
),
'lesson_title_elements' => array(
'control_type' => 'kadence_sorter_control',
'section' => 'lesson_layout',
'priority' => 6,
'default' => kadence()->default( 'lesson_title_elements' ),
'label' => esc_html__( 'Title Elements', 'kadence' ),
'transport' => 'refresh',
'settings' => array(
'elements' => 'lesson_title_elements',
'title' => 'lesson_title_element_title',
'breadcrumb' => 'lesson_title_element_breadcrumb',
),
'context' => array(
array(
'setting' => 'lesson_title',
'operator' => '=',
'value' => true,
),
),
'input_attrs' => array(
'group' => 'lesson_title_element',
),
),
'lesson_title_font' => array(
'control_type' => 'kadence_typography_control',
'section' => 'lesson_layout_design',
'label' => esc_html__( 'Lesson Title Font', 'kadence' ),
'default' => kadence()->default( 'lesson_title_font' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => '.lesson-title h1',
'property' => 'font',
'key' => 'typography',
),
),
'context' => array(
array(
'setting' => 'lesson_title',
'operator' => '=',
'value' => true,
),
),
'input_attrs' => array(
'id' => 'lesson_title_font',
'headingInherit' => true,
),
),
'lesson_title_breadcrumb_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'lesson_layout_design',
'label' => esc_html__( 'Breadcrumb Colors', 'kadence' ),
'default' => kadence()->default( 'lesson_title_breadcrumb_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.lesson-title .kadence-breadcrumbs',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.lesson-title .kadence-breadcrumbs a:hover',
'property' => 'color',
'pattern' => '$',
'key' => 'hover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Link Hover Color', 'kadence' ),
'palette' => true,
),
),
),
),
'lesson_title_breadcrumb_font' => array(
'control_type' => 'kadence_typography_control',
'section' => 'lesson_layout_design',
'label' => esc_html__( 'Breadcrumb Font', 'kadence' ),
'default' => kadence()->default( 'lesson_title_breadcrumb_font' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => '.lesson-title .kadence-breadcrumbs',
'property' => 'font',
'key' => 'typography',
),
),
'input_attrs' => array(
'id' => 'lesson_title_breadcrumb_font',
'options' => 'no-color',
),
),
'lesson_title_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'lesson_layout_design',
'label' => esc_html__( 'Lesson Above Area Background', 'kadence' ),
'default' => kadence()->default( 'lesson_title_background' ),
'context' => array(
array(
'setting' => 'lesson_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'lesson_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => '#inner-wrap .lesson-hero-section .entry-hero-container-inner',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Lesson Title Background', 'kadence' ),
),
),
'lesson_title_featured_image' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'lesson_layout_design',
'default' => kadence()->default( 'lesson_title_featured_image' ),
'label' => esc_html__( 'Use Featured Image for Background?', 'kadence' ),
'transport' => 'refresh',
'context' => array(
array(
'setting' => 'lesson_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'lesson_title_layout',
'operator' => '=',
'value' => 'above',
),
),
),
'lesson_title_overlay_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'lesson_layout_design',
'label' => esc_html__( 'Background Overlay Color', 'kadence' ),
'default' => kadence()->default( 'lesson_title_overlay_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.lesson-hero-section .hero-section-overlay',
'property' => 'background',
'pattern' => '$',
'key' => 'color',
),
),
'context' => array(
array(
'setting' => 'lesson_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'lesson_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Overlay Color', 'kadence' ),
'palette' => true,
),
),
'allowGradient' => true,
),
),
'lesson_title_border' => array(
'control_type' => 'kadence_borders_control',
'section' => 'lesson_layout_design',
'label' => esc_html__( 'Border', 'kadence' ),
'default' => kadence()->default( 'lesson_title_border' ),
'context' => array(
array(
'setting' => 'lesson_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'lesson_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'settings' => array(
'border_top' => 'lesson_title_top_border',
'border_bottom' => 'lesson_title_bottom_border',
),
'live_method' => array(
'lesson_title_top_border' => array(
array(
'type' => 'css_border',
'selector' => '.lesson-hero-section .entry-hero-container-inner',
'pattern' => '$',
'property' => 'border-top',
'key' => 'border',
),
),
'lesson_title_bottom_border' => array(
array(
'type' => 'css_border',
'selector' => '.lesson-hero-section .entry-hero-container-inner',
'property' => 'border-bottom',
'pattern' => '$',
'key' => 'border',
),
),
),
),
'info_lesson_layout' => array(
'control_type' => 'kadence_title_control',
'section' => 'lesson_layout',
'priority' => 10,
'label' => esc_html__( 'Lesson Layout', 'kadence' ),
'settings' => false,
),
'info_lesson_layout_design' => array(
'control_type' => 'kadence_title_control',
'section' => 'lesson_layout_design',
'priority' => 10,
'label' => esc_html__( 'Lesson Layout', 'kadence' ),
'settings' => false,
),
'lesson_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'lesson_layout',
'label' => esc_html__( 'Lesson Layout', 'kadence' ),
'transport' => 'refresh',
'priority' => 10,
'default' => kadence()->default( 'lesson_layout' ),
'input_attrs' => array(
'layout' => array(
'normal' => array(
'tooltip' => __( 'Normal', 'kadence' ),
'icon' => 'normal',
),
'narrow' => array(
'tooltip' => __( 'Narrow', 'kadence' ),
'icon' => 'narrow',
),
'fullwidth' => array(
'tooltip' => __( 'Fullwidth', 'kadence' ),
'icon' => 'fullwidth',
),
'left' => array(
'tooltip' => __( 'Left Sidebar', 'kadence' ),
'icon' => 'leftsidebar',
),
'right' => array(
'tooltip' => __( 'Right Sidebar', 'kadence' ),
'icon' => 'rightsidebar',
),
),
'responsive' => false,
'class' => 'kadence-three-col',
),
),
'lesson_sidebar_id' => array(
'control_type' => 'kadence_select_control',
'section' => 'lesson_layout',
'label' => esc_html__( 'Lesson Default Sidebar', 'kadence' ),
'transport' => 'refresh',
'priority' => 10,
'default' => kadence()->default( 'lesson_sidebar_id' ),
'input_attrs' => array(
'options' => kadence()->sidebar_options(),
),
),
'lesson_content_style' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'lesson_layout',
'label' => esc_html__( 'Content Style', 'kadence' ),
'priority' => 10,
'default' => kadence()->default( 'lesson_content_style' ),
'live_method' => array(
array(
'type' => 'class',
'selector' => 'body.single-lesson',
'pattern' => 'content-style-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'boxed' => array(
'tooltip' => __( 'Boxed', 'kadence' ),
'icon' => 'boxed',
),
'unboxed' => array(
'tooltip' => __( 'Unboxed', 'kadence' ),
'icon' => 'narrow',
),
),
'responsive' => false,
'class' => 'kadence-two-col',
),
),
'lesson_vertical_padding' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'lesson_layout',
'label' => esc_html__( 'Content Vertical Padding', 'kadence' ),
'priority' => 10,
'default' => kadence()->default( 'lesson_vertical_padding' ),
'live_method' => array(
array(
'type' => 'class',
'selector' => 'body.single-lesson',
'pattern' => 'content-vertical-padding-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'show' => array(
'name' => __( 'Enable', 'kadence' ),
),
'hide' => array(
'name' => __( 'Disable', 'kadence' ),
),
'top' => array(
'name' => __( 'Top Only', 'kadence' ),
),
'bottom' => array(
'name' => __( 'Bottom Only', 'kadence' ),
),
),
'responsive' => false,
'class' => 'kadence-two-grid',
),
),
'lesson_feature' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'lesson_layout',
'priority' => 20,
'default' => kadence()->default( 'lesson_feature' ),
'label' => esc_html__( 'Show Featured Image?', 'kadence' ),
'transport' => 'refresh',
),
'lesson_feature_position' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'lesson_layout',
'label' => esc_html__( 'Featured Image Position', 'kadence' ),
'priority' => 20,
'transport' => 'refresh',
'default' => kadence()->default( 'lesson_feature_position' ),
'context' => array(
array(
'setting' => 'lesson_feature',
'operator' => '=',
'value' => true,
),
),
'input_attrs' => array(
'layout' => array(
'above' => array(
'name' => __( 'Above', 'kadence' ),
),
'behind' => array(
'name' => __( 'Behind', 'kadence' ),
),
'below' => array(
'name' => __( 'Below', 'kadence' ),
),
),
'responsive' => false,
),
),
'lesson_feature_ratio' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'lesson_layout',
'label' => esc_html__( 'Featured Image Ratio', 'kadence' ),
'priority' => 20,
'default' => kadence()->default( 'lesson_feature_ratio' ),
'context' => array(
array(
'setting' => 'lesson_feature',
'operator' => '=',
'value' => true,
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => 'body.single-lesson .article-post-thumbnail',
'pattern' => 'kadence-thumbnail-ratio-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'inherit' => array(
'name' => __( 'Inherit', 'kadence' ),
),
'1-1' => array(
'name' => __( '1:1', 'kadence' ),
),
'3-4' => array(
'name' => __( '4:3', 'kadence' ),
),
'2-3' => array(
'name' => __( '3:2', 'kadence' ),
),
'9-16' => array(
'name' => __( '16:9', 'kadence' ),
),
'1-2' => array(
'name' => __( '2:1', 'kadence' ),
),
),
'responsive' => false,
'class' => 'kadence-three-col-short',
),
),
'lesson_comments' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'lesson_layout',
'priority' => 20,
'default' => kadence()->default( 'lesson_comments' ),
'label' => esc_html__( 'Show Comments?', 'kadence' ),
'transport' => 'refresh',
),
'lesson_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'lesson_layout_design',
'label' => esc_html__( 'Site Background', 'kadence' ),
'default' => kadence()->default( 'lesson_background' ),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => 'body.single-lesson',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Lesson Background', 'kadence' ),
),
),
'lesson_content_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'lesson_layout_design',
'label' => esc_html__( 'Content Background', 'kadence' ),
'default' => kadence()->default( 'lesson_content_background' ),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => 'body.single-lesson .content-bg, body.single-lesson.content-style-unboxed .site',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Lesson Content Background', 'kadence' ),
),
),
);
Theme_Customizer::add_settings( $settings );

View File

@@ -0,0 +1,602 @@
<?php
/**
* Header Main Row Options
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
$settings = array(
'llms_membership_archive_tabs' => array(
'control_type' => 'kadence_tab_control',
'section' => 'llms_membership_archive',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'llms_membership_archive',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'llms_membership_archive_design',
),
'active' => 'general',
),
),
'llms_membership_archive_tabs_design' => array(
'control_type' => 'kadence_tab_control',
'section' => 'llms_membership_archive_design',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'llms_membership_archive',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'llms_membership_archive_design',
),
'active' => 'design',
),
),
'info_llms_membership_archive_title' => array(
'control_type' => 'kadence_title_control',
'section' => 'llms_membership_archive',
'priority' => 2,
'label' => esc_html__( 'Archive Title', 'kadence' ),
'settings' => false,
),
'info_llms_membership_archive_title_design' => array(
'control_type' => 'kadence_title_control',
'section' => 'llms_membership_archive_design',
'priority' => 2,
'label' => esc_html__( 'Archive Title', 'kadence' ),
'settings' => false,
),
'llms_membership_archive_title' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'llms_membership_archive',
'priority' => 3,
'default' => kadence()->default( 'llms_membership_archive_title' ),
'label' => esc_html__( 'Show Archive Title?', 'kadence' ),
'transport' => 'refresh',
),
'llms_membership_archive_title_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'llms_membership_archive',
'label' => esc_html__( 'Archive Title Layout', 'kadence' ),
'transport' => 'refresh',
'priority' => 4,
'default' => kadence()->default( 'llms_membership_archive_title_layout' ),
'context' => array(
array(
'setting' => 'llms_membership_archive_title',
'operator' => '=',
'value' => true,
),
),
'input_attrs' => array(
'layout' => array(
'normal' => array(
'tooltip' => __( 'In Content', 'kadence' ),
'icon' => 'incontent',
),
'above' => array(
'tooltip' => __( 'Above Content', 'kadence' ),
'icon' => 'abovecontent',
),
),
'responsive' => false,
'class' => 'kadence-two-col',
),
),
'llms_membership_archive_title_inner_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'llms_membership_archive',
'priority' => 4,
'default' => kadence()->default( 'llms_membership_archive_title_inner_layout' ),
'label' => esc_html__( 'Container Width', 'kadence' ),
'context' => array(
array(
'setting' => 'llms_membership_archive_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'llms_membership_archive_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.llms_membership-archive-hero-section',
'pattern' => 'entry-hero-layout-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'standard' => array(
'tooltip' => __( 'Background Fullwidth, Content Contained', 'kadence' ),
'name' => __( 'Standard', 'kadence' ),
'icon' => '',
),
'fullwidth' => array(
'tooltip' => __( 'Background & Content Fullwidth', 'kadence' ),
'name' => __( 'Fullwidth', 'kadence' ),
'icon' => '',
),
'contained' => array(
'tooltip' => __( 'Background & Content Contained', 'kadence' ),
'name' => __( 'Contained', 'kadence' ),
'icon' => '',
),
),
'responsive' => false,
),
),
'llms_membership_archive_title_align' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'llms_membership_archive',
'label' => esc_html__( 'Membership Archive Title Align', 'kadence' ),
'priority' => 4,
'default' => kadence()->default( 'llms_membership_archive_title_align' ),
'context' => array(
array(
'setting' => 'llms_membership_archive_title',
'operator' => '=',
'value' => true,
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.llms_membership-archive-title',
'pattern' => array(
'desktop' => 'title-align-$',
'tablet' => 'title-tablet-align-$',
'mobile' => 'title-mobile-align-$',
),
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'left' => array(
'tooltip' => __( 'Left Align Title', 'kadence' ),
'dashicon' => 'editor-alignleft',
),
'center' => array(
'tooltip' => __( 'Center Align Title', 'kadence' ),
'dashicon' => 'editor-aligncenter',
),
'right' => array(
'tooltip' => __( 'Right Align Title', 'kadence' ),
'dashicon' => 'editor-alignright',
),
),
'responsive' => true,
),
),
'llms_membership_archive_title_height' => array(
'control_type' => 'kadence_range_control',
'section' => 'llms_membership_archive',
'priority' => 5,
'label' => esc_html__( 'Container Min Height', 'kadence' ),
'context' => array(
array(
'setting' => 'llms_membership_archive_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'llms_membership_archive_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#inner-wrap .llms_membership-archive-hero-section .entry-header',
'property' => 'min-height',
'pattern' => '$',
'key' => 'size',
),
),
'default' => kadence()->default( 'llms_membership_archive_title_height' ),
'input_attrs' => array(
'min' => array(
'px' => 10,
'em' => 1,
'rem' => 1,
'vh' => 2,
),
'max' => array(
'px' => 800,
'em' => 12,
'rem' => 12,
'vh' => 100,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
'vh' => 1,
),
'units' => array( 'px', 'em', 'rem', 'vh' ),
),
),
'llms_membership_archive_title_elements' => array(
'control_type' => 'kadence_sorter_control',
'section' => 'llms_membership_archive',
'priority' => 6,
'default' => kadence()->default( 'llms_membership_archive_title_elements' ),
'label' => esc_html__( 'Title Elements', 'kadence' ),
'transport' => 'refresh',
'settings' => array(
'elements' => 'llms_membership_archive_title_elements',
'title' => 'llms_membership_archive_title_element_title',
'breadcrumb' => 'llms_membership_archive_title_element_breadcrumb',
'description' => 'llms_membership_archive_title_element_description',
),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
),
),
'llms_membership_archive_title_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'llms_membership_archive_design',
'label' => esc_html__( 'Title Color', 'kadence' ),
'default' => kadence()->default( 'llms_membership_archive_title_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.llms_membership-archive-title h1',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Color', 'kadence' ),
'palette' => true,
),
),
),
),
'llms_membership_archive_title_description_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'llms_membership_archive_design',
'label' => esc_html__( 'Description Colors', 'kadence' ),
'default' => kadence()->default( 'llms_membership_archive_title_description_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.llms_membership-archive-title .archive-description',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.llms_membership-archive-title .archive-description a:hover',
'property' => 'color',
'pattern' => '$',
'key' => 'hover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Link Hover Color', 'kadence' ),
'palette' => true,
),
),
),
),
'llms_membership_archive_title_breadcrumb_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'llms_membership_archive_design',
'label' => esc_html__( 'Breadcrumb Colors', 'kadence' ),
'default' => kadence()->default( 'llms_membership_archive_title_breadcrumb_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.llms_membership-archive-title .kadence-breadcrumbs',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.llms_membership-archive-title .kadence-breadcrumbs a:hover',
'property' => 'color',
'pattern' => '$',
'key' => 'hover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Link Hover Color', 'kadence' ),
'palette' => true,
),
),
),
),
'llms_membership_archive_title_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'llms_membership_archive_design',
'label' => esc_html__( 'Archive Title Background', 'kadence' ),
'default' => kadence()->default( 'llms_membership_archive_title_background' ),
'context' => array(
array(
'setting' => 'llms_membership_archive_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'llms_membership_archive_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => '#inner-wrap .llms_membership-archive-hero-section .entry-hero-container-inner',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Membership Archive Title Background', 'kadence' ),
),
),
'llms_membership_archive_title_overlay_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'llms_membership_archive_design',
'label' => esc_html__( 'Background Overlay Color', 'kadence' ),
'default' => kadence()->default( 'llms_membership_archive_title_overlay_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.llms_membership-archive-hero-section .hero-section-overlay',
'property' => 'background',
'pattern' => '$',
'key' => 'color',
),
),
'context' => array(
array(
'setting' => 'llms_membership_archive_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'llms_membership_archive_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Overlay Color', 'kadence' ),
'palette' => true,
),
),
'allowGradient' => true,
),
),
'llms_membership_archive_title_border' => array(
'control_type' => 'kadence_borders_control',
'section' => 'llms_membership_archive_design',
'label' => esc_html__( 'Border', 'kadence' ),
'default' => kadence()->default( 'llms_membership_archive_title_border' ),
'context' => array(
array(
'setting' => 'llms_membership_archive_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'llms_membership_archive_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'settings' => array(
'border_top' => 'llms_membership_archive_title_top_border',
'border_bottom' => 'llms_membership_archive_title_bottom_border',
),
'live_method' => array(
'llms_membership_archive_title_top_border' => array(
array(
'type' => 'css_border',
'selector' => '.llms_membership-archive-hero-section .entry-hero-container-inner',
'pattern' => '$',
'property' => 'border-top',
'key' => 'border',
),
),
'llms_membership_archive_title_bottom_border' => array(
array(
'type' => 'css_border',
'selector' => '.llms_membership-archive-hero-section .entry-hero-container-inner',
'property' => 'border-bottom',
'pattern' => '$',
'key' => 'border',
),
),
),
),
'info_llms_membership_archive_layout' => array(
'control_type' => 'kadence_title_control',
'section' => 'llms_membership_archive',
'priority' => 10,
'label' => esc_html__( 'Archive Layout', 'kadence' ),
'settings' => false,
),
'info_llms_membership_archive_layout_design' => array(
'control_type' => 'kadence_title_control',
'section' => 'llms_membership_archive_design',
'priority' => 10,
'label' => esc_html__( 'Archive Layout', 'kadence' ),
'settings' => false,
),
'llms_membership_archive_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'llms_membership_archive',
'label' => esc_html__( 'Archive Layout', 'kadence' ),
'transport' => 'refresh',
'priority' => 10,
'default' => kadence()->default( 'llms_membership_archive_layout' ),
'input_attrs' => array(
'layout' => array(
'normal' => array(
'tooltip' => __( 'Normal', 'kadence' ),
'icon' => 'normal',
),
'narrow' => array(
'tooltip' => __( 'Narrow', 'kadence' ),
'icon' => 'narrow',
),
'fullwidth' => array(
'tooltip' => __( 'Fullwidth', 'kadence' ),
'icon' => 'fullwidth',
),
'left' => array(
'tooltip' => __( 'Left Sidebar', 'kadence' ),
'icon' => 'leftsidebar',
),
'right' => array(
'tooltip' => __( 'Right Sidebar', 'kadence' ),
'icon' => 'rightsidebar',
),
),
'class' => 'kadence-three-col',
'responsive' => false,
),
),
'llms_membership_archive_content_style' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'llms_membership_archive',
'label' => esc_html__( 'Content Style', 'kadence' ),
'priority' => 10,
'default' => kadence()->default( 'llms_membership_archive_content_style' ),
'live_method' => array(
array(
'type' => 'class',
'selector' => 'body.post-type-archive-llms_membership',
'pattern' => 'content-style-$',
'key' => '',
),
array(
'type' => 'class',
'selector' => 'body.tax-membership_cat',
'pattern' => 'content-style-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'boxed' => array(
'tooltip' => __( 'Boxed', 'kadence' ),
'icon' => 'gridBoxed',
),
'unboxed' => array(
'tooltip' => __( 'Unboxed', 'kadence' ),
'icon' => 'gridUnboxed',
),
),
'responsive' => false,
'class' => 'kadence-two-col',
),
),
'llms_membership_archive_columns' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'llms_membership_archive',
'priority' => 20,
'label' => esc_html__( 'Membership Archive Columns', 'kadence' ),
'transport' => 'refresh',
'default' => kadence()->default( 'llms_membership_archive_columns' ),
'input_attrs' => array(
'layout' => array(
'2' => array(
'name' => __( '2', 'kadence' ),
),
'3' => array(
'name' => __( '3', 'kadence' ),
),
'4' => array(
'name' => __( '4', 'kadence' ),
),
),
'responsive' => false,
),
),
'llms_membership_archive_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'llms_membership_archive_design',
'label' => esc_html__( 'Site Background', 'kadence' ),
'default' => kadence()->default( 'llms_membership_archive_background' ),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => 'body.post-type-archive-llms_membership, body.tax-membership_cat',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Membership Archive Background', 'kadence' ),
),
),
'llms_membership_archive_content_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'llms_membership_archive_design',
'label' => esc_html__( 'Content Background', 'kadence' ),
'default' => kadence()->default( 'llms_membership_archive_content_background' ),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => 'body.post-type-archive-llms_membership .content-bg, body.tax-membership_cat .content-bg, body.tax-membership_cat.content-style-unboxed .site, body.post-type-archive-llms_membership.content-style-unboxed .site',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Archive Content Background', 'kadence' ),
),
),
);
Theme_Customizer::add_settings( $settings );

View File

@@ -0,0 +1,266 @@
<?php
/**
* Product Layout Options
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
$settings = array(
'info_llms_membership_title' => array(
'control_type' => 'kadence_title_control',
'section' => 'llms_membership_layout',
'priority' => 2,
'label' => esc_html__( 'Membership Title', 'kadence' ),
'settings' => false,
),
'llms_membership_title' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'llms_membership_layout',
'priority' => 3,
'default' => kadence()->default( 'llms_membership_title' ),
'label' => esc_html__( 'Show Membership Title?', 'kadence' ),
'transport' => 'refresh',
),
'llms_membership_title_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'llms_membership_layout',
'label' => esc_html__( 'Membership Title Layout', 'kadence' ),
'transport' => 'refresh',
'priority' => 4,
'default' => kadence()->default( 'llms_membership_title_layout' ),
'context' => array(
array(
'setting' => 'llms_membership_title',
'operator' => '=',
'value' => true,
),
),
'input_attrs' => array(
'layout' => array(
'normal' => array(
'tooltip' => __( 'In Content', 'kadence' ),
'icon' => 'incontent',
),
'above' => array(
'tooltip' => __( 'Above Content', 'kadence' ),
'icon' => 'abovecontent',
),
),
'responsive' => false,
'class' => 'kadence-two-col',
),
),
'llms_membership_title_inner_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'llms_membership_layout',
'priority' => 4,
'default' => kadence()->default( 'llms_membership_title_inner_layout' ),
'label' => esc_html__( 'Title Container Width', 'kadence' ),
'context' => array(
array(
'setting' => 'llms_membership_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'llms_membership_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.llms_membership-hero-section',
'pattern' => 'entry-hero-layout-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'standard' => array(
'tooltip' => __( 'Background Fullwidth, Content Contained', 'kadence' ),
'name' => __( 'Standard', 'kadence' ),
'icon' => '',
),
'fullwidth' => array(
'tooltip' => __( 'Background & Content Fullwidth', 'kadence' ),
'name' => __( 'Fullwidth', 'kadence' ),
'icon' => '',
),
'contained' => array(
'tooltip' => __( 'Background & Content Contained', 'kadence' ),
'name' => __( 'Contained', 'kadence' ),
'icon' => '',
),
),
'responsive' => false,
),
),
'llms_membership_title_align' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'llms_membership_layout',
'label' => esc_html__( 'Membership Title Align', 'kadence' ),
'priority' => 4,
'default' => kadence()->default( 'llms_membership_title_align' ),
'context' => array(
array(
'setting' => 'llms_membership_title',
'operator' => '=',
'value' => true,
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.llms_membership-title',
'pattern' => array(
'desktop' => 'title-align-$',
'tablet' => 'title-tablet-align-$',
'mobile' => 'title-mobile-align-$',
),
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'left' => array(
'tooltip' => __( 'Left Align Title', 'kadence' ),
'dashicon' => 'editor-alignleft',
),
'center' => array(
'tooltip' => __( 'Center Align Title', 'kadence' ),
'dashicon' => 'editor-aligncenter',
),
'right' => array(
'tooltip' => __( 'Right Align Title', 'kadence' ),
'dashicon' => 'editor-alignright',
),
),
'responsive' => true,
),
),
'info_llms_membership_layout' => array(
'control_type' => 'kadence_title_control',
'section' => 'llms_membership_layout',
'priority' => 10,
'label' => esc_html__( 'Membership Layout', 'kadence' ),
'settings' => false,
),
'llms_membership_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'llms_membership_layout',
'label' => esc_html__( 'Membership Layout', 'kadence' ),
'transport' => 'refresh',
'priority' => 10,
'default' => kadence()->default( 'llms_membership_layout' ),
'input_attrs' => array(
'layout' => array(
'normal' => array(
'tooltip' => __( 'Normal', 'kadence' ),
'icon' => 'normal',
),
'narrow' => array(
'tooltip' => __( 'Narrow', 'kadence' ),
'icon' => 'narrow',
),
'fullwidth' => array(
'tooltip' => __( 'Fullwidth', 'kadence' ),
'icon' => 'fullwidth',
),
'left' => array(
'tooltip' => __( 'Left Sidebar', 'kadence' ),
'icon' => 'leftsidebar',
),
'right' => array(
'tooltip' => __( 'Right Sidebar', 'kadence' ),
'icon' => 'rightsidebar',
),
),
'responsive' => false,
'class' => 'kadence-three-col',
),
),
'llms_membership_sidebar_id' => array(
'control_type' => 'kadence_select_control',
'section' => 'llms_membership_layout',
'label' => esc_html__( 'Membership Default Sidebar', 'kadence' ),
'transport' => 'refresh',
'priority' => 10,
'default' => kadence()->default( 'llms_membership_sidebar_id' ),
'input_attrs' => array(
'options' => kadence()->sidebar_options(),
),
),
'llms_membership_content_style' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'llms_membership_layout',
'label' => esc_html__( 'Content Style', 'kadence' ),
'priority' => 10,
'default' => kadence()->default( 'llms_membership_content_style' ),
'live_method' => array(
array(
'type' => 'class',
'selector' => 'body.single-llms_membership',
'pattern' => 'content-style-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'boxed' => array(
'tooltip' => __( 'Boxed', 'kadence' ),
'icon' => 'boxed',
),
'unboxed' => array(
'tooltip' => __( 'Unboxed', 'kadence' ),
'icon' => 'narrow',
),
),
'responsive' => false,
'class' => 'kadence-two-col',
),
),
'llms_membership_vertical_padding' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'llms_membership_layout',
'label' => esc_html__( 'Content Vertical Padding', 'kadence' ),
'priority' => 10,
'default' => kadence()->default( 'llms_membership_vertical_padding' ),
'live_method' => array(
array(
'type' => 'class',
'selector' => 'body.single-llms_membership',
'pattern' => 'content-vertical-padding-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'show' => array(
'name' => __( 'Enable', 'kadence' ),
),
'hide' => array(
'name' => __( 'Disable', 'kadence' ),
),
'top' => array(
'name' => __( 'Top Only', 'kadence' ),
),
'bottom' => array(
'name' => __( 'Bottom Only', 'kadence' ),
),
),
'responsive' => false,
'class' => 'kadence-two-grid',
),
),
);
Theme_Customizer::add_settings( $settings );

View File

@@ -0,0 +1,266 @@
<?php
/**
* Product Layout Options
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
$settings = array(
'info_llms_quiz_title' => array(
'control_type' => 'kadence_title_control',
'section' => 'llms_quiz_layout',
'priority' => 2,
'label' => esc_html__( 'Quiz Title', 'kadence' ),
'settings' => false,
),
'llms_quiz_title' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'llms_quiz_layout',
'priority' => 3,
'default' => kadence()->default( 'llms_quiz_title' ),
'label' => esc_html__( 'Show Quiz Title?', 'kadence' ),
'transport' => 'refresh',
),
'llms_quiz_title_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'llms_quiz_layout',
'label' => esc_html__( 'Quiz Title Layout', 'kadence' ),
'transport' => 'refresh',
'priority' => 4,
'default' => kadence()->default( 'llms_quiz_title_layout' ),
'context' => array(
array(
'setting' => 'llms_quiz_title',
'operator' => '=',
'value' => true,
),
),
'input_attrs' => array(
'layout' => array(
'normal' => array(
'tooltip' => __( 'In Content', 'kadence' ),
'icon' => 'incontent',
),
'above' => array(
'tooltip' => __( 'Above Content', 'kadence' ),
'icon' => 'abovecontent',
),
),
'responsive' => false,
'class' => 'kadence-two-col',
),
),
'llms_quiz_title_inner_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'llms_quiz_layout',
'priority' => 4,
'default' => kadence()->default( 'llms_quiz_title_inner_layout' ),
'label' => esc_html__( 'Title Container Width', 'kadence' ),
'context' => array(
array(
'setting' => 'llms_quiz_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'llms_quiz_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.llms_quiz-hero-section',
'pattern' => 'entry-hero-layout-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'standard' => array(
'tooltip' => __( 'Background Fullwidth, Content Contained', 'kadence' ),
'name' => __( 'Standard', 'kadence' ),
'icon' => '',
),
'fullwidth' => array(
'tooltip' => __( 'Background & Content Fullwidth', 'kadence' ),
'name' => __( 'Fullwidth', 'kadence' ),
'icon' => '',
),
'contained' => array(
'tooltip' => __( 'Background & Content Contained', 'kadence' ),
'name' => __( 'Contained', 'kadence' ),
'icon' => '',
),
),
'responsive' => false,
),
),
'llms_quiz_title_align' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'llms_quiz_layout',
'label' => esc_html__( 'Quiz Title Align', 'kadence' ),
'priority' => 4,
'default' => kadence()->default( 'llms_quiz_title_align' ),
'context' => array(
array(
'setting' => 'llms_quiz_title',
'operator' => '=',
'value' => true,
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.llms_quiz-title',
'pattern' => array(
'desktop' => 'title-align-$',
'tablet' => 'title-tablet-align-$',
'mobile' => 'title-mobile-align-$',
),
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'left' => array(
'tooltip' => __( 'Left Align Title', 'kadence' ),
'dashicon' => 'editor-alignleft',
),
'center' => array(
'tooltip' => __( 'Center Align Title', 'kadence' ),
'dashicon' => 'editor-aligncenter',
),
'right' => array(
'tooltip' => __( 'Right Align Title', 'kadence' ),
'dashicon' => 'editor-alignright',
),
),
'responsive' => true,
),
),
'info_llms_quiz_layout' => array(
'control_type' => 'kadence_title_control',
'section' => 'llms_quiz_layout',
'priority' => 10,
'label' => esc_html__( 'Quiz Layout', 'kadence' ),
'settings' => false,
),
'llms_quiz_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'llms_quiz_layout',
'label' => esc_html__( 'Quiz Layout', 'kadence' ),
'transport' => 'refresh',
'priority' => 10,
'default' => kadence()->default( 'llms_quiz_layout' ),
'input_attrs' => array(
'layout' => array(
'normal' => array(
'tooltip' => __( 'Normal', 'kadence' ),
'icon' => 'normal',
),
'narrow' => array(
'tooltip' => __( 'Narrow', 'kadence' ),
'icon' => 'narrow',
),
'fullwidth' => array(
'tooltip' => __( 'Fullwidth', 'kadence' ),
'icon' => 'fullwidth',
),
'left' => array(
'tooltip' => __( 'Left Sidebar', 'kadence' ),
'icon' => 'leftsidebar',
),
'right' => array(
'tooltip' => __( 'Right Sidebar', 'kadence' ),
'icon' => 'rightsidebar',
),
),
'responsive' => false,
'class' => 'kadence-three-col',
),
),
'llms_quiz_sidebar_id' => array(
'control_type' => 'kadence_select_control',
'section' => 'llms_quiz_layout',
'label' => esc_html__( 'Quiz Default Sidebar', 'kadence' ),
'transport' => 'refresh',
'priority' => 10,
'default' => kadence()->default( 'llms_quiz_sidebar_id' ),
'input_attrs' => array(
'options' => kadence()->sidebar_options(),
),
),
'llms_quiz_content_style' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'llms_quiz_layout',
'label' => esc_html__( 'Content Style', 'kadence' ),
'priority' => 10,
'default' => kadence()->default( 'llms_quiz_content_style' ),
'live_method' => array(
array(
'type' => 'class',
'selector' => 'body.single-llms_quiz',
'pattern' => 'content-style-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'boxed' => array(
'tooltip' => __( 'Boxed', 'kadence' ),
'icon' => 'boxed',
),
'unboxed' => array(
'tooltip' => __( 'Unboxed', 'kadence' ),
'icon' => 'narrow',
),
),
'responsive' => false,
'class' => 'kadence-two-col',
),
),
'llms_quiz_vertical_padding' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'llms_quiz_layout',
'label' => esc_html__( 'Content Vertical Spacing', 'kadence' ),
'priority' => 10,
'default' => kadence()->default( 'llms_quiz_vertical_padding' ),
'live_method' => array(
array(
'type' => 'class',
'selector' => 'body.single-llms_quiz',
'pattern' => 'content-vertical-padding-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'show' => array(
'name' => __( 'Enable', 'kadence' ),
),
'hide' => array(
'name' => __( 'Disable', 'kadence' ),
),
'top' => array(
'name' => __( 'Top Only', 'kadence' ),
),
'bottom' => array(
'name' => __( 'Bottom Only', 'kadence' ),
),
),
'responsive' => false,
'class' => 'kadence-two-grid',
),
),
);
Theme_Customizer::add_settings( $settings );

View File

@@ -0,0 +1,61 @@
<?php
/**
* Product Layout Options
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
$settings = array(
'info_woo_account_title' => array(
'control_type' => 'kadence_title_control',
'section' => 'account_layout',
'priority' => 2,
'label' => esc_html__( 'My Account Navigation', 'kadence' ),
'settings' => false,
),
'woo_account_navigation_avatar' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'account_layout',
'priority' => 3,
'default' => kadence()->default( 'woo_account_navigation_avatar' ),
'label' => esc_html__( 'Show User Name and Avatar?', 'kadence' ),
'transport' => 'refresh',
),
'woo_account_navigation_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'account_layout',
'label' => esc_html__( 'Navigation Layout', 'kadence' ),
'transport' => 'refresh',
'priority' => 4,
'default' => kadence()->default( 'woo_account_navigation_layout' ),
'input_attrs' => array(
'layout' => array(
'left' => array(
'tooltip' => __( 'Positioned on Left Content', 'kadence' ),
'name' => __( 'Left', 'kadence' ),
'icon' => '',
),
'above' => array(
'tooltip' => __( 'Positioned on Top Content', 'kadence' ),
'name' => __( 'Above', 'kadence' ),
'icon' => '',
),
'right' => array(
'tooltip' => __( 'Positioned on Right Content', 'kadence' ),
'name' => __( 'Right', 'kadence' ),
'icon' => '',
),
),
'responsive' => false,
),
),
);
Theme_Customizer::add_settings( $settings );

View File

@@ -0,0 +1,215 @@
<?php
/**
* Outline Button Options
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
Theme_Customizer::add_settings(
array(
'buttons_outline_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'outline_button',
'label' => esc_html__( 'Text Colors', 'kadence' ),
'default' => kadence()->default( 'buttons_outline_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.button.button-style-outline:not(.has-text-color), .button.kb-btn-global-outline',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.button.button-style-outline:not(.has-text-color):hover, .button.kb-btn-global-outline:hover',
'property' => 'color',
'pattern' => '$',
'key' => 'hover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Hover Color', 'kadence' ),
'palette' => true,
),
),
),
),
'buttons_outline_border_colors' => array(
'control_type' => 'kadence_color_control',
'section' => 'outline_button',
'label' => esc_html__( 'Border Colors', 'kadence' ),
'default' => kadence()->default( 'buttons_outline_border' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.button.button-style-outline, .button.kb-btn-global-outline',
'property' => 'border-color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.button.button-style-outline:hover, .button.kb-btn-global-outline:hover',
'property' => 'border-color',
'pattern' => '$',
'key' => 'hover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Hover Color', 'kadence' ),
'palette' => true,
),
),
),
),
'buttons_outline_border' => array(
'control_type' => 'kadence_border_control',
'section' => 'outline_button',
'label' => esc_html__( 'Border', 'kadence' ),
'default' => kadence()->default( 'buttons_outline_border' ),
'live_method' => array(
array(
'type' => 'css_border',
'selector' => '.button.button-style-outline, .button.kb-btn-global-outline',
'property' => 'border',
'pattern' => '$',
'key' => 'border',
),
),
'input_attrs' => array(
'responsive' => true,
'color' => false,
),
),
'buttons_outline_border_radius' => array(
'control_type' => 'kadence_range_control',
'section' => 'outline_button',
'label' => esc_html__( 'Border Radius', 'kadence' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.button.button-style-outline, .button.kb-btn-global-outline',
'property' => 'border-radius',
'pattern' => '$',
'key' => 'size',
),
),
'default' => kadence()->default( 'buttons_outline_border_radius' ),
'input_attrs' => array(
'min' => array(
'px' => 0,
'em' => 0,
'rem' => 0,
'%' => 0,
),
'max' => array(
'px' => 100,
'em' => 12,
'rem' => 12,
'%' => 100,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
'%' => 1,
),
'units' => array( 'px', 'em', 'rem', '%' ),
'responsive' => true,
),
),
'buttons_outline_typography' => array(
'control_type' => 'kadence_typography_control',
'section' => 'outline_button',
'label' => esc_html__( 'Font', 'kadence' ),
'default' => kadence()->default( 'buttons_outline_typography' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => '.button.button-style-outline, .button.kb-btn-global-outline',
'pattern' => array(
'desktop' => '$',
'tablet' => '$',
'mobile' => '$',
),
'property' => 'font',
'key' => 'typography',
),
),
'input_attrs' => array(
'id' => 'buttons_outline_typography',
'options' => 'no-color',
),
),
'buttons_outline_padding' => array(
'control_type' => 'kadence_measure_control',
'section' => 'outline_button',
'priority' => 10,
'default' => kadence()->default( 'buttons_outline_padding' ),
'label' => esc_html__( 'Padding', 'kadence' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.button.button-style-outline, .button.kb-btn-global-outline',
'property' => 'padding',
'pattern' => '$',
'key' => 'measure',
),
),
'input_attrs' => array(
'responsive' => true,
),
),
'buttons_outline_shadow' => array(
'control_type' => 'kadence_shadow_control',
'section' => 'outline_button',
'priority' => 20,
'label' => esc_html__( 'Button Shadow', 'kadence' ),
'live_method' => array(
array(
'type' => 'css_boxshadow',
'selector' => '.button.button-style-outline, .button.kb-btn-global-outline',
'property' => 'box-shadow',
'pattern' => '$',
'key' => '',
),
),
'default' => kadence()->default( 'buttons_outline_shadow' ),
),
'buttons_outline_shadow_hover' => array(
'control_type' => 'kadence_shadow_control',
'section' => 'outline_button',
'priority' => 20,
'label' => esc_html__( 'Button Hover State Shadow', 'kadence' ),
'live_method' => array(
array(
'type' => 'css_boxshadow',
'selector' => '.button.button-style-outline:hover, .button.kb-btn-global-outline:hover',
'property' => 'box-shadow',
'pattern' => '$',
'key' => '',
),
),
'default' => kadence()->default( 'buttons_outline_shadow_hover' ),
),
)
);

View File

@@ -0,0 +1,879 @@
<?php
/**
* Header Main Row Options
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
ob_start(); ?>
<div class="kadence-compontent-tabs nav-tab-wrapper wp-clearfix">
<a href="#" class="nav-tab kadence-general-tab kadence-compontent-tabs-button nav-tab-active" data-tab="general">
<span><?php esc_html_e( 'General', 'kadence' ); ?></span>
</a>
<a href="#" class="nav-tab kadence-design-tab kadence-compontent-tabs-button" data-tab="design">
<span><?php esc_html_e( 'Design', 'kadence' ); ?></span>
</a>
</div>
<?php
$compontent_tabs = ob_get_clean();
$settings = array(
'page_layout_tabs' => array(
'control_type' => 'kadence_blank_control',
'section' => 'page_layout',
'settings' => false,
'priority' => 1,
'description' => $compontent_tabs,
),
'info_page_title' => array(
'control_type' => 'kadence_title_control',
'section' => 'page_layout',
'priority' => 2,
'label' => esc_html__( 'Page Title', 'kadence' ),
'settings' => false,
),
'page_title' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'page_layout',
'priority' => 3,
'default' => kadence()->default( 'page_title' ),
'label' => esc_html__( 'Show Page Title?', 'kadence' ),
'transport' => 'refresh',
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
),
),
'page_title_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'page_layout',
'label' => esc_html__( 'Page Title Layout', 'kadence' ),
'transport' => 'refresh',
'priority' => 4,
'default' => kadence()->default( 'page_title_layout' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
array(
'setting' => 'page_title',
'operator' => '=',
'value' => true,
),
),
'input_attrs' => array(
'layout' => array(
'normal' => array(
'name' => __( 'In Content', 'kadence' ),
'icon' => 'incontent',
),
'above' => array(
'name' => __( 'Above Content', 'kadence' ),
'icon' => 'abovecontent',
),
),
'responsive' => false,
'class' => 'kadence-two-col',
),
),
'page_title_inner_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'page_layout',
'priority' => 4,
'default' => kadence()->default( 'page_title_inner_layout' ),
'label' => esc_html__( 'Title Container Width', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
array(
'setting' => 'page_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'page_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.page-hero-section',
'pattern' => 'entry-hero-layout-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'standard' => array(
'tooltip' => __( 'Background Fullwidth, Content Contained', 'kadence' ),
'name' => __( 'Standard', 'kadence' ),
'icon' => '',
),
'fullwidth' => array(
'tooltip' => __( 'Background & Content Fullwidth', 'kadence' ),
'name' => __( 'Fullwidth', 'kadence' ),
'icon' => '',
),
'contained' => array(
'tooltip' => __( 'Background & Content Contained', 'kadence' ),
'name' => __( 'Contained', 'kadence' ),
'icon' => '',
),
),
'responsive' => false,
),
),
'page_title_align' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'page_layout',
'label' => esc_html__( 'Page Title Align', 'kadence' ),
'priority' => 4,
'default' => kadence()->default( 'page_title_align' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
array(
'setting' => 'page_title',
'operator' => '=',
'value' => true,
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.page-title',
'pattern' => array(
'desktop' => 'title-align-$',
'tablet' => 'title-tablet-align-$',
'mobile' => 'title-mobile-align-$',
),
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'left' => array(
'tooltip' => __( 'Left Align Title', 'kadence' ),
'dashicon' => 'editor-alignleft',
),
'center' => array(
'tooltip' => __( 'Center Align Title', 'kadence' ),
'dashicon' => 'editor-aligncenter',
),
'right' => array(
'tooltip' => __( 'Right Align Title', 'kadence' ),
'dashicon' => 'editor-alignright',
),
),
'responsive' => true,
),
),
'page_title_height' => array(
'control_type' => 'kadence_range_control',
'section' => 'page_layout',
'priority' => 5,
'label' => esc_html__( 'Title Container Min Height', 'kadence' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
array(
'setting' => 'page_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'page_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#inner-wrap .page-hero-section .entry-header',
'property' => 'min-height',
'pattern' => '$',
'key' => 'size',
),
),
'default' => kadence()->default( 'page_title_height' ),
'input_attrs' => array(
'min' => array(
'px' => 10,
'em' => 1,
'rem' => 1,
'vh' => 2,
),
'max' => array(
'px' => 800,
'em' => 12,
'rem' => 12,
'vh' => 100,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
'vh' => 1,
),
'units' => array( 'px', 'em', 'rem', 'vh' ),
),
),
'page_title_elements' => array(
'control_type' => 'kadence_sorter_control',
'section' => 'page_layout',
'priority' => 6,
'default' => kadence()->default( 'page_title_elements' ),
'label' => esc_html__( 'Title Elements', 'kadence' ),
'transport' => 'refresh',
'settings' => array(
'elements' => 'page_title_elements',
'title' => 'page_title_element_title',
'breadcrumb' => 'page_title_element_breadcrumb',
'meta' => 'page_title_element_meta',
),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
array(
'setting' => 'page_title',
'operator' => '=',
'value' => true,
),
),
'input_attrs' => array(
'defaults' => array(
'title' => kadence()->default( 'page_title_element_title' ),
'meta' => kadence()->default( 'page_title_element_meta' ),
'breadcrumb' => kadence()->default( 'page_title_element_breadcrumb' ),
),
'group' => 'page_title_element',
),
// 'partial' => array(
// 'selector' => '.page-title',
// 'container_inclusive' => false,
// 'render_callback' => 'Kadence\kadence_entry_header',
// ),
),
'page_title_font' => array(
'control_type' => 'kadence_typography_control',
'section' => 'page_layout',
'label' => esc_html__( 'Page Title Font', 'kadence' ),
'default' => kadence()->default( 'page_title_font' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => '.wp-site-blocks .page-title h1',
'property' => 'font',
'key' => 'typography',
),
),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
array(
'setting' => 'page_title',
'operator' => '=',
'value' => true,
),
),
'input_attrs' => array(
'id' => 'page_title_font',
'headingInherit' => true,
),
),
'page_title_breadcrumb_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'page_layout',
'label' => esc_html__( 'Breadcrumb Colors', 'kadence' ),
'default' => kadence()->default( 'page_title_breadcrumb_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.page-title .kadence-breadcrumbs',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.page-title .kadence-breadcrumbs a:hover',
'property' => 'color',
'pattern' => '$',
'key' => 'hover',
),
),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Link Hover Color', 'kadence' ),
'palette' => true,
),
),
),
),
'page_title_breadcrumb_font' => array(
'control_type' => 'kadence_typography_control',
'section' => 'page_layout',
'label' => esc_html__( 'Breadcrumb Font', 'kadence' ),
'default' => kadence()->default( 'page_title_breadcrumb_font' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => '.page-title .kadence-breadcrumbs',
'property' => 'font',
'key' => 'typography',
),
),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
),
'input_attrs' => array(
'id' => 'page_title_breadcrumb_font',
'options' => 'no-color',
),
),
'page_title_meta_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'page_layout',
'label' => esc_html__( 'Meta Colors', 'kadence' ),
'default' => kadence()->default( 'page_title_meta_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.page-title .entry-meta',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.page-title .entry-meta a:hover',
'property' => 'color',
'pattern' => '$',
'key' => 'hover',
),
),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Link Hover Color', 'kadence' ),
'palette' => true,
),
),
),
),
'page_title_meta_font' => array(
'control_type' => 'kadence_typography_control',
'section' => 'page_layout',
'label' => esc_html__( 'Meta Font', 'kadence' ),
'default' => kadence()->default( 'page_title_meta_font' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => '.page-title .entry-meta',
'property' => 'font',
'key' => 'typography',
),
),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
),
'input_attrs' => array(
'id' => 'page_title_breadcrumb_font',
'options' => 'no-color',
),
),
'page_title_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'page_layout',
'label' => esc_html__( 'Page Title Background', 'kadence' ),
'default' => kadence()->default( 'page_title_background' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
array(
'setting' => 'page_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'page_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => '#inner-wrap .page-hero-section .entry-hero-container-inner',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Page Title Background', 'kadence' ),
),
),
'page_title_featured_image' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'page_layout',
'default' => kadence()->default( 'page_title_featured_image' ),
'label' => esc_html__( 'Use Featured Image for Background?', 'kadence' ),
'transport' => 'refresh',
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
array(
'setting' => 'page_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'page_title_layout',
'operator' => '=',
'value' => 'above',
),
),
),
'page_title_overlay_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'page_layout',
'label' => esc_html__( 'Background Overlay Color', 'kadence' ),
'default' => kadence()->default( 'page_title_overlay_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.page-hero-section .hero-section-overlay',
'property' => 'background',
'pattern' => '$',
'key' => 'color',
),
),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
array(
'setting' => 'page_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'page_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Overlay Color', 'kadence' ),
'palette' => true,
),
),
'allowGradient' => true,
),
),
'page_title_border' => array(
'control_type' => 'kadence_borders_control',
'section' => 'page_layout',
'label' => esc_html__( 'Border', 'kadence' ),
'default' => kadence()->default( 'page_title_border' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
array(
'setting' => 'page_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'page_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'settings' => array(
'border_top' => 'page_title_top_border',
'border_bottom' => 'page_title_bottom_border',
),
'live_method' => array(
'page_title_top_border' => array(
array(
'type' => 'css_border',
'selector' => '.page-hero-section .entry-hero-container-inner',
'pattern' => '$',
'property' => 'border-top',
'key' => 'border',
),
),
'page_title_bottom_border' => array(
array(
'type' => 'css_border',
'selector' => '.page-hero-section .entry-hero-container-inner',
'property' => 'border-bottom',
'pattern' => '$',
'key' => 'border',
),
),
),
),
'info_page_layout' => array(
'control_type' => 'kadence_title_control',
'section' => 'page_layout',
'priority' => 10,
'label' => esc_html__( 'Default Page Layout', 'kadence' ),
'settings' => false,
),
'page_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'page_layout',
'label' => esc_html__( 'Default Page Layout', 'kadence' ),
'transport' => 'refresh',
'priority' => 10,
'default' => kadence()->default( 'page_layout' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
),
'input_attrs' => array(
'layout' => array(
'normal' => array(
'name' => __( 'Normal', 'kadence' ),
'icon' => 'normal',
),
'narrow' => array(
'name' => __( 'Narrow', 'kadence' ),
'icon' => 'narrow',
),
'fullwidth' => array(
'name' => __( 'Fullwidth', 'kadence' ),
'icon' => 'fullwidth',
),
'left' => array(
'name' => __( 'Left Sidebar', 'kadence' ),
'icon' => 'leftsidebar',
),
'right' => array(
'name' => __( 'Right Sidebar', 'kadence' ),
'icon' => 'rightsidebar',
),
),
'responsive' => false,
'class' => 'kadence-three-col',
),
),
'page_sidebar_id' => array(
'control_type' => 'kadence_select_control',
'section' => 'page_layout',
'label' => esc_html__( 'Page Default Sidebar', 'kadence' ),
'transport' => 'refresh',
'priority' => 10,
'default' => kadence()->default( 'page_sidebar_id' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
),
'input_attrs' => array(
'options' => kadence()->sidebar_options(),
),
),
'page_content_style' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'page_layout',
'label' => esc_html__( 'Content Style', 'kadence' ),
'priority' => 10,
'default' => kadence()->default( 'page_content_style' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => 'body.page',
'pattern' => 'content-style-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'boxed' => array(
'name' => __( 'Boxed', 'kadence' ),
'icon' => 'boxed',
),
'unboxed' => array(
'name' => __( 'Unboxed', 'kadence' ),
'icon' => 'narrow',
),
),
'responsive' => false,
'class' => 'kadence-two-col',
),
),
'page_vertical_padding' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'page_layout',
'label' => esc_html__( 'Content Vertical Spacing', 'kadence' ),
'priority' => 10,
'default' => kadence()->default( 'page_vertical_padding' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => 'body.page',
'pattern' => 'content-vertical-padding-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'show' => array(
'name' => __( 'Enable', 'kadence' ),
),
'hide' => array(
'name' => __( 'Disable', 'kadence' ),
),
'top' => array(
'name' => __( 'Top Only', 'kadence' ),
),
'bottom' => array(
'name' => __( 'Bottom Only', 'kadence' ),
),
),
'responsive' => false,
'class' => 'kadence-two-grid',
),
),
'page_feature' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'page_layout',
'priority' => 20,
'default' => kadence()->default( 'page_feature' ),
'label' => esc_html__( 'Show Featured Image?', 'kadence' ),
'transport' => 'refresh',
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
),
),
'page_feature_position' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'page_layout',
'label' => esc_html__( 'Featured Image Position', 'kadence' ),
'priority' => 20,
'transport' => 'refresh',
'default' => kadence()->default( 'page_feature_position' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
array(
'setting' => 'page_feature',
'operator' => '=',
'value' => true,
),
),
'input_attrs' => array(
'layout' => array(
'above' => array(
'name' => __( 'Above', 'kadence' ),
),
'behind' => array(
'name' => __( 'Behind', 'kadence' ),
),
'below' => array(
'name' => __( 'Below', 'kadence' ),
),
),
'responsive' => false,
),
),
'page_feature_ratio' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'page_layout',
'label' => esc_html__( 'Featured Image Ratio', 'kadence' ),
'priority' => 20,
'default' => kadence()->default( 'page_feature_ratio' ),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
array(
'setting' => 'page_feature',
'operator' => '=',
'value' => true,
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => 'body.page .article-post-thumbnail',
'pattern' => 'kadence-thumbnail-ratio-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'inherit' => array(
'name' => __( 'Inherit', 'kadence' ),
),
'1-1' => array(
'name' => __( '1:1', 'kadence' ),
),
'3-4' => array(
'name' => __( '4:3', 'kadence' ),
),
'2-3' => array(
'name' => __( '3:2', 'kadence' ),
),
'9-16' => array(
'name' => __( '16:9', 'kadence' ),
),
'1-2' => array(
'name' => __( '2:1', 'kadence' ),
),
),
'responsive' => false,
'class' => 'kadence-three-col-short',
),
),
'page_comments' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'page_layout',
'priority' => 20,
'default' => kadence()->default( 'page_comments' ),
'label' => esc_html__( 'Show Comments?', 'kadence' ),
'transport' => 'refresh',
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'general',
),
),
),
'page_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'page_layout',
'label' => esc_html__( 'Site Background', 'kadence' ),
'default' => kadence()->default( 'page_background' ),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => 'body.page',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
),
'input_attrs' => array(
'tooltip' => __( 'Page Background', 'kadence' ),
),
),
'page_content_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'page_layout',
'label' => esc_html__( 'Content Background', 'kadence' ),
'default' => kadence()->default( 'page_content_background' ),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => 'body.page .content-bg, body.page.content-style-unboxed .site',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'context' => array(
array(
'setting' => '__current_tab',
'value' => 'design',
),
),
'input_attrs' => array(
'tooltip' => __( 'Page Content Background', 'kadence' ),
),
),
);
Theme_Customizer::add_settings( $settings );

View File

@@ -0,0 +1,872 @@
<?php
/**
* Header Main Row Options
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
$settings = array(
'post_archive_tabs' => array(
'control_type' => 'kadence_tab_control',
'section' => 'post_archive',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'post_archive',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'post_archive_design',
),
'active' => 'general',
),
),
'post_archive_tabs_design' => array(
'control_type' => 'kadence_tab_control',
'section' => 'post_archive_design',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'post_archive',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'post_archive_design',
),
'active' => 'design',
),
),
'info_post_archive_title' => array(
'control_type' => 'kadence_title_control',
'section' => 'post_archive',
'priority' => 2,
'label' => esc_html__( 'Archive Title', 'kadence' ),
'settings' => false,
),
'info_post_archive_title_design' => array(
'control_type' => 'kadence_title_control',
'section' => 'post_archive_design',
'priority' => 2,
'label' => esc_html__( 'Archive Title', 'kadence' ),
'settings' => false,
),
'post_archive_title' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'post_archive',
'priority' => 3,
'default' => kadence()->default( 'post_archive_title' ),
'label' => esc_html__( 'Show Archive Title?', 'kadence' ),
'transport' => 'refresh',
),
'post_archive_title_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'post_archive',
'label' => esc_html__( 'Archive Title Layout', 'kadence' ),
'transport' => 'refresh',
'priority' => 4,
'default' => kadence()->default( 'post_archive_title_layout' ),
'context' => array(
array(
'setting' => 'post_archive_title',
'operator' => '=',
'value' => true,
),
),
'input_attrs' => array(
'layout' => array(
'normal' => array(
'name' => __( 'In Content', 'kadence' ),
'icon' => 'incontent',
),
'above' => array(
'name' => __( 'Above Content', 'kadence' ),
'icon' => 'abovecontent',
),
),
'responsive' => false,
'class' => 'kadence-two-col',
),
),
'post_archive_title_inner_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'post_archive',
'priority' => 4,
'default' => kadence()->default( 'post_archive_title_inner_layout' ),
'label' => esc_html__( 'Container Width', 'kadence' ),
'context' => array(
array(
'setting' => 'post_archive_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'post_archive_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.post-archive-hero-section',
'pattern' => 'entry-hero-layout-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'standard' => array(
'tooltip' => __( 'Background Fullwidth, Content Contained', 'kadence' ),
'name' => __( 'Standard', 'kadence' ),
'icon' => '',
),
'fullwidth' => array(
'tooltip' => __( 'Background & Content Fullwidth', 'kadence' ),
'name' => __( 'Fullwidth', 'kadence' ),
'icon' => '',
),
'contained' => array(
'tooltip' => __( 'Background & Content Contained', 'kadence' ),
'name' => __( 'Contained', 'kadence' ),
'icon' => '',
),
),
'responsive' => false,
),
),
'post_archive_title_align' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'post_archive',
'label' => esc_html__( 'Post Archive Title Align', 'kadence' ),
'priority' => 4,
'default' => kadence()->default( 'post_archive_title_align' ),
'context' => array(
array(
'setting' => 'post_archive_title',
'operator' => '=',
'value' => true,
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.post-archive-title',
'pattern' => array(
'desktop' => 'title-align-$',
'tablet' => 'title-tablet-align-$',
'mobile' => 'title-mobile-align-$',
),
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'left' => array(
'tooltip' => __( 'Left Align Title', 'kadence' ),
'dashicon' => 'editor-alignleft',
),
'center' => array(
'tooltip' => __( 'Center Align Title', 'kadence' ),
'dashicon' => 'editor-aligncenter',
),
'right' => array(
'tooltip' => __( 'Right Align Title', 'kadence' ),
'dashicon' => 'editor-alignright',
),
),
'responsive' => true,
),
),
'post_archive_title_height' => array(
'control_type' => 'kadence_range_control',
'section' => 'post_archive',
'priority' => 5,
'label' => esc_html__( 'Container Min Height', 'kadence' ),
'context' => array(
array(
'setting' => 'post_archive_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'post_archive_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#inner-wrap .post-archive-hero-section .entry-header',
'property' => 'min-height',
'pattern' => '$',
'key' => 'size',
),
),
'default' => kadence()->default( 'post_archive_title_height' ),
'input_attrs' => array(
'min' => array(
'px' => 10,
'em' => 1,
'rem' => 1,
'vh' => 2,
),
'max' => array(
'px' => 800,
'em' => 12,
'rem' => 12,
'vh' => 100,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
'vh' => 1,
),
'units' => array( 'px', 'em', 'rem', 'vh' ),
),
),
'post_archive_title_elements' => array(
'control_type' => 'kadence_sorter_control',
'section' => 'post_archive',
'priority' => 6,
'default' => kadence()->default( 'post_archive_title_elements' ),
'label' => esc_html__( 'Title Elements', 'kadence' ),
'transport' => 'refresh',
'settings' => array(
'elements' => 'post_archive_title_elements',
'title' => 'post_archive_title_element_title',
'breadcrumb' => 'post_archive_title_element_breadcrumb',
'description' => 'post_archive_title_element_description',
),
),
'post_archive_title_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'post_archive_design',
'label' => esc_html__( 'Title Color', 'kadence' ),
'default' => kadence()->default( 'post_archive_title_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.wp-site-blocks .post-archive-title h1',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Color', 'kadence' ),
'palette' => true,
),
),
),
),
'post_archive_title_description_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'post_archive_design',
'label' => esc_html__( 'Description Colors', 'kadence' ),
'default' => kadence()->default( 'post_archive_title_description_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.post-archive-title .archive-description',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.post-archive-title .archive-description a:hover',
'property' => 'color',
'pattern' => '$',
'key' => 'hover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Link Hover Color', 'kadence' ),
'palette' => true,
),
),
),
),
'post_archive_title_breadcrumb_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'post_archive_design',
'label' => esc_html__( 'Breadcrumb Colors', 'kadence' ),
'default' => kadence()->default( 'post_archive_title_breadcrumb_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.post-archive-title .kadence-breadcrumbs',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.post-archive-title .kadence-breadcrumbs a:hover',
'property' => 'color',
'pattern' => '$',
'key' => 'hover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Link Hover Color', 'kadence' ),
'palette' => true,
),
),
),
),
'post_archive_title_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'post_archive_design',
'label' => esc_html__( 'Archive Title Background', 'kadence' ),
'default' => kadence()->default( 'post_archive_title_background' ),
'context' => array(
array(
'setting' => 'post_archive_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'post_archive_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => '#inner-wrap .post-archive-hero-section .entry-hero-container-inner',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Post Title Background', 'kadence' ),
),
),
'post_archive_title_overlay_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'post_archive_design',
'label' => esc_html__( 'Background Overlay Color', 'kadence' ),
'default' => kadence()->default( 'post_archive_title_overlay_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.post-archive-hero-section .hero-section-overlay',
'property' => 'background',
'pattern' => '$',
'key' => 'color',
),
),
'context' => array(
array(
'setting' => 'post_archive_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'post_archive_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Overlay Color', 'kadence' ),
'palette' => true,
),
),
'allowGradient' => true,
),
),
'post_archive_title_border' => array(
'control_type' => 'kadence_borders_control',
'section' => 'post_archive_design',
'label' => esc_html__( 'Border', 'kadence' ),
'default' => kadence()->default( 'post_archive_title_border' ),
'context' => array(
array(
'setting' => 'post_archive_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'post_archive_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'settings' => array(
'border_top' => 'post_archive_title_top_border',
'border_bottom' => 'post_archive_title_bottom_border',
),
'live_method' => array(
'post_archive_title_top_border' => array(
array(
'type' => 'css_border',
'selector' => '.post-archive-hero-section .entry-hero-container-inner',
'pattern' => '$',
'property' => 'border-top',
'key' => 'border',
),
),
'post_archive_title_bottom_border' => array(
array(
'type' => 'css_border',
'selector' => '.post-archive-hero-section .entry-hero-container-inner',
'property' => 'border-bottom',
'pattern' => '$',
'key' => 'border',
),
),
),
),
'info_post_archive_layout' => array(
'control_type' => 'kadence_title_control',
'section' => 'post_archive',
'priority' => 10,
'label' => esc_html__( 'Archive Layout', 'kadence' ),
'settings' => false,
),
'info_post_archive_layout_design' => array(
'control_type' => 'kadence_title_control',
'section' => 'post_archive_design',
'priority' => 10,
'label' => esc_html__( 'Archive Layout', 'kadence' ),
'settings' => false,
),
'post_archive_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'post_archive',
'label' => esc_html__( 'Archive Layout', 'kadence' ),
'transport' => 'refresh',
'priority' => 10,
'default' => kadence()->default( 'post_archive_layout' ),
'input_attrs' => array(
'layout' => array(
'normal' => array(
'name' => __( 'Normal', 'kadence' ),
'icon' => 'normal',
),
'narrow' => array(
'name' => __( 'Narrow', 'kadence' ),
'icon' => 'narrow',
),
'fullwidth' => array(
'name' => __( 'Fullwidth', 'kadence' ),
'icon' => 'fullwidth',
),
'left' => array(
'name' => __( 'Left Sidebar', 'kadence' ),
'icon' => 'leftsidebar',
),
'right' => array(
'name' => __( 'Right Sidebar', 'kadence' ),
'icon' => 'rightsidebar',
),
),
'class' => 'kadence-three-col',
'responsive' => false,
),
),
'post_archive_sidebar_id' => array(
'control_type' => 'kadence_select_control',
'section' => 'post_archive',
'label' => esc_html__( 'Post Archive Default Sidebar', 'kadence' ),
'transport' => 'refresh',
'priority' => 10,
'default' => kadence()->default( 'post_archive_sidebar_id' ),
'input_attrs' => array(
'options' => kadence()->sidebar_options(),
),
),
'post_archive_content_style' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'post_archive',
'label' => esc_html__( 'Content Style', 'kadence' ),
'priority' => 10,
'default' => kadence()->default( 'post_archive_content_style' ),
'live_method' => array(
array(
'type' => 'class',
'selector' => 'body.archive',
'pattern' => 'content-style-$',
'key' => '',
),
array(
'type' => 'class',
'selector' => 'body.blog',
'pattern' => 'content-style-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'boxed' => array(
'tooltip' => __( 'Boxed', 'kadence' ),
'icon' => 'gridBoxed',
'name' => __( 'Boxed', 'kadence' ),
),
'unboxed' => array(
'tooltip' => __( 'Unboxed', 'kadence' ),
'icon' => 'gridUnboxed',
'name' => __( 'Unboxed', 'kadence' ),
),
),
'responsive' => false,
'class' => 'kadence-two-col',
),
),
'post_archive_columns' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'post_archive',
'priority' => 10,
'label' => esc_html__( 'Post Archive Columns', 'kadence' ),
'transport' => 'refresh',
'default' => kadence()->default( 'post_archive_columns' ),
'input_attrs' => array(
'layout' => array(
'1' => array(
'name' => __( '1', 'kadence' ),
),
'2' => array(
'name' => __( '2', 'kadence' ),
),
'3' => array(
'name' => __( '3', 'kadence' ),
),
'4' => array(
'name' => __( '4', 'kadence' ),
),
),
'responsive' => false,
),
),
'post_archive_item_image_placement' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'post_archive',
'label' => esc_html__( 'Item Image Placement', 'kadence' ),
'priority' => 10,
'default' => kadence()->default( 'post_archive_item_image_placement' ),
'context' => array(
array(
'setting' => 'post_archive_columns',
'operator' => '=',
'value' => '1',
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.post-archive.grid-cols',
'pattern' => 'item-image-style-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'beside' => array(
'name' => __( 'Beside', 'kadence' ),
),
'above' => array(
'name' => __( 'Above', 'kadence' ),
),
),
'responsive' => false,
),
),
'post_archive_item_vertical_alignment' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'post_archive',
'label' => esc_html__( 'Content Vertical Alignment', 'kadence' ),
'priority' => 10,
'default' => kadence()->default( 'post_archive_item_vertical_alignment' ),
'context' => array(
array(
'setting' => 'post_archive_columns',
'operator' => '=',
'value' => '1',
),
array(
'setting' => 'post_archive_item_image_placement',
'operator' => '=',
'value' => 'beside',
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.post-archive.grid-cols',
'pattern' => 'item-content-vertical-align-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'top' => array(
'name' => __( 'Top', 'kadence' ),
),
'center' => array(
'name' => __( 'Center', 'kadence' ),
),
),
'responsive' => false,
),
),
'info_post_archive_item_layout' => array(
'control_type' => 'kadence_title_control',
'section' => 'post_archive',
'priority' => 12,
'label' => esc_html__( 'Post Item Layout', 'kadence' ),
'settings' => false,
),
'post_archive_elements' => array(
'control_type' => 'kadence_sorter_control',
'section' => 'post_archive',
'priority' => 12,
'default' => kadence()->default( 'post_archive_elements' ),
'label' => esc_html__( 'Post Item Elements', 'kadence' ),
'transport' => 'refresh',
'settings' => array(
'elements' => 'post_archive_elements',
'feature' => 'post_archive_element_feature',
'categories' => 'post_archive_element_categories',
'title' => 'post_archive_element_title',
'meta' => 'post_archive_element_meta',
'excerpt' => 'post_archive_element_excerpt',
'readmore' => 'post_archive_element_readmore',
),
'input_attrs' => array(
'groupe' => 'post_archive_elements',
'sortable' => false,
'defaults' => array(
'feature' => kadence()->default( 'post_archive_element_feature' ),
'categories' => kadence()->default( 'post_archive_element_categories' ),
'title' => kadence()->default( 'post_archive_element_title' ),
'meta' => kadence()->default( 'post_archive_element_meta' ),
'excerpt' => kadence()->default( 'post_archive_element_excerpt' ),
'readmore' => kadence()->default( 'post_archive_element_readmore' ),
),
'dividers' => array(
'dot' => array(
'icon' => 'dot',
),
'slash' => array(
'icon' => 'slash',
),
'dash' => array(
'icon' => 'dash',
),
'vline' => array(
'icon' => 'vline',
),
'customicon' => array(
'icon' => 'hours',
),
),
),
),
'post_archive_item_title_font' => array(
'control_type' => 'kadence_typography_control',
'section' => 'post_archive_design',
'label' => esc_html__( 'Post Item Title Font', 'kadence' ),
'default' => kadence()->default( 'post_archive_item_title_font' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => '.loop-entry.type-post h2.entry-title',
'property' => 'font',
'key' => 'typography',
),
),
'input_attrs' => array(
'id' => 'post_archive_item_title_font',
'headingInherit' => true,
),
),
'post_archive_item_category_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'post_archive_design',
'label' => esc_html__( 'Item Category Colors', 'kadence' ),
'default' => kadence()->default( 'post_archive_item_category_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.loop-entry.type-post .entry-taxonomies, .loop-entry.type-post .entry-taxonomies a',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.loop-entry.type-post .entry-taxonomies a:hover',
'property' => 'color',
'pattern' => '$',
'key' => 'hover',
),
array(
'type' => 'css',
'selector' => '.loop-entry.type-post .entry-taxonomies .category-style-pill a',
'property' => 'background',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.loop-entry.type-post .entry-taxonomies .category-style-pill a:hover',
'property' => 'background',
'pattern' => '$',
'key' => 'hover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Link Hover Color', 'kadence' ),
'palette' => true,
),
),
),
),
'post_archive_item_category_font' => array(
'control_type' => 'kadence_typography_control',
'section' => 'post_archive_design',
'label' => esc_html__( 'Item Category Font', 'kadence' ),
'default' => kadence()->default( 'post_archive_item_category_font' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => '.loop-entry.type-post .entry-taxonomies',
'property' => 'font',
'key' => 'typography',
),
),
'input_attrs' => array(
'id' => 'post_archive_item_category_font',
'options' => 'no-color',
),
),
'post_archive_item_meta_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'post_archive_design',
'label' => esc_html__( 'Item Meta Colors', 'kadence' ),
'default' => kadence()->default( 'post_archive_item_meta_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.loop-entry.type-post .entry-meta',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.loop-entry.type-post .entry-meta a:hover',
'property' => 'color',
'pattern' => '$',
'key' => 'hover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Link Hover Color', 'kadence' ),
'palette' => true,
),
),
),
),
'post_archive_item_meta_font' => array(
'control_type' => 'kadence_typography_control',
'section' => 'post_archive_design',
'label' => esc_html__( 'Item Meta Font', 'kadence' ),
'default' => kadence()->default( 'post_archive_item_meta_font' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => '.loop-entry.type-post .entry-meta',
'property' => 'font',
'key' => 'typography',
),
),
'input_attrs' => array(
'id' => 'post_archive_item_meta_font',
'options' => 'no-color',
),
),
'post_archive_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'post_archive_design',
'label' => esc_html__( 'Site Background', 'kadence' ),
'default' => kadence()->default( 'post_archive_background' ),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => 'body.archive, body.blog',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Post Background', 'kadence' ),
),
),
'post_archive_content_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'post_archive_design',
'label' => esc_html__( 'Content Background', 'kadence' ),
'default' => kadence()->default( 'post_archive_content_background' ),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => 'body.blog .content-bg, body.archive .content-bg, body.archive.content-style-unboxed .site, body.blog.content-style-unboxed .site',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Archive Content Background', 'kadence' ),
),
),
);
Theme_Customizer::add_settings( $settings );

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,805 @@
<?php
/**
* Product Layout Options
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
$settings = array(
'product_layout_tabs' => array(
'control_type' => 'kadence_tab_control',
'section' => 'product_layout',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'product_layout',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'product_layout_design',
),
'active' => 'general',
),
),
'product_layout_tabs_design' => array(
'control_type' => 'kadence_tab_control',
'section' => 'product_layout_design',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'product_layout',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'product_layout_design',
),
'active' => 'design',
),
),
'info_product_title' => array(
'control_type' => 'kadence_title_control',
'section' => 'product_layout',
'priority' => 2,
'label' => esc_html__( 'Product Above Content', 'kadence' ),
'settings' => false,
),
'info_product_title_design' => array(
'control_type' => 'kadence_title_control',
'section' => 'product_layout_design',
'priority' => 2,
'label' => esc_html__( 'Product Above Content', 'kadence' ),
'settings' => false,
),
'product_above_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'product_layout',
'priority' => 4,
'default' => kadence()->default( 'product_above_layout' ),
'label' => esc_html__( 'Above Content Layout', 'kadence' ),
'transport' => 'refresh',
'input_attrs' => array(
'layout' => array(
'title' => array(
'tooltip' => __( 'Enables an Extra above content title area', 'kadence' ),
'name' => __( 'Extra Title Area', 'kadence' ),
'icon' => '',
),
'breadcrumbs' => array(
'tooltip' => __( 'Enables Breadcrumbs', 'kadence' ),
'name' => __( 'Breadcrumbs', 'kadence' ),
'icon' => '',
),
'none' => array(
'tooltip' => __( 'Hides this area', 'kadence' ),
'name' => __( 'Nothing', 'kadence' ),
'icon' => '',
),
),
'responsive' => false,
'class' => 'kadence-tiny-text',
),
),
'product_title_inner_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'product_layout',
'priority' => 4,
'default' => kadence()->default( 'product_title_inner_layout' ),
'label' => esc_html__( 'Title Container Width', 'kadence' ),
'context' => array(
array(
'setting' => 'product_above_layout',
'operator' => '=',
'value' => 'title',
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.product-hero-section',
'pattern' => 'entry-hero-layout-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'standard' => array(
'tooltip' => __( 'Background Fullwidth, Content Contained', 'kadence' ),
'name' => __( 'Standard', 'kadence' ),
'icon' => '',
),
'fullwidth' => array(
'tooltip' => __( 'Background & Content Fullwidth', 'kadence' ),
'name' => __( 'Fullwidth', 'kadence' ),
'icon' => '',
),
'contained' => array(
'tooltip' => __( 'Background & Content Contained', 'kadence' ),
'name' => __( 'Contained', 'kadence' ),
'icon' => '',
),
),
'responsive' => false,
),
),
'product_title_align' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'product_layout',
'label' => esc_html__( 'Product Above Align', 'kadence' ),
'priority' => 4,
'default' => kadence()->default( 'product_title_align' ),
'context' => array(
array(
'setting' => 'product_above_layout',
'operator' => '=',
'value' => 'title',
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.product-title',
'pattern' => array(
'desktop' => 'title-align-$',
'tablet' => 'title-tablet-align-$',
'mobile' => 'title-mobile-align-$',
),
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'left' => array(
'tooltip' => __( 'Left Align Title', 'kadence' ),
'dashicon' => 'editor-alignleft',
),
'center' => array(
'tooltip' => __( 'Center Align Title', 'kadence' ),
'dashicon' => 'editor-aligncenter',
),
'right' => array(
'tooltip' => __( 'Right Align Title', 'kadence' ),
'dashicon' => 'editor-alignright',
),
),
'responsive' => true,
),
),
'product_title_height' => array(
'control_type' => 'kadence_range_control',
'section' => 'product_layout',
'priority' => 5,
'label' => esc_html__( 'Above Container Min Height', 'kadence' ),
'context' => array(
array(
'setting' => 'product_above_layout',
'operator' => '=',
'value' => 'title',
),
),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#inner-wrap .product-hero-section .entry-header',
'property' => 'min-height',
'pattern' => '$',
'key' => 'size',
),
),
'default' => kadence()->default( 'product_title_height' ),
'input_attrs' => array(
'min' => array(
'px' => 10,
'em' => 1,
'rem' => 1,
'vh' => 2,
),
'max' => array(
'px' => 800,
'em' => 12,
'rem' => 12,
'vh' => 100,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
'vh' => 1,
),
'units' => array( 'px', 'em', 'rem', 'vh' ),
),
),
'product_title_elements' => array(
'control_type' => 'kadence_sorter_control',
'section' => 'product_layout',
'priority' => 6,
'default' => kadence()->default( 'product_title_elements' ),
'label' => esc_html__( 'Above Elements', 'kadence' ),
'transport' => 'refresh',
'settings' => array(
'elements' => 'product_title_elements',
'above_title' => 'product_title_element_above_title',
'breadcrumb' => 'product_title_element_breadcrumb',
'category' => 'product_title_element_category',
),
'context' => array(
array(
'setting' => 'product_above_layout',
'operator' => '=',
'value' => 'title',
),
),
'input_attrs' => array(
'group' => 'product_title_element',
),
),
'product_above_title_font' => array(
'control_type' => 'kadence_typography_control',
'section' => 'product_layout_design',
'label' => esc_html__( 'Product Above Title Font', 'kadence' ),
'default' => kadence()->default( 'product_above_title_font' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => '.product-hero-section .extra-title',
'property' => 'font',
'key' => 'typography',
),
),
'context' => array(
array(
'setting' => 'product_above_layout',
'operator' => '=',
'value' => 'title',
),
),
'input_attrs' => array(
'id' => 'product_above_title_font',
'headingInherit' => true,
),
),
'product_above_category_font' => array(
'control_type' => 'kadence_typography_control',
'section' => 'product_layout_design',
'label' => esc_html__( 'Product Above Category Font', 'kadence' ),
'default' => kadence()->default( 'product_above_category_font' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => '.product-hero-section .single-category',
'property' => 'font',
'key' => 'typography',
),
),
'context' => array(
array(
'setting' => 'product_above_layout',
'operator' => '=',
'value' => 'title',
),
),
'input_attrs' => array(
'id' => 'product_above_category_font',
'headingInherit' => true,
),
),
'product_title_breadcrumb_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'product_layout_design',
'label' => esc_html__( 'Breadcrumb Colors', 'kadence' ),
'default' => kadence()->default( 'product_title_breadcrumb_color' ),
'context' => array(
array(
'setting' => 'product_above_layout',
'operator' => '!=',
'value' => 'none',
),
),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.product-title .kadence-breadcrumbs',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.product-title .kadence-breadcrumbs a:hover',
'property' => 'color',
'pattern' => '$',
'key' => 'hover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Link Hover Color', 'kadence' ),
'palette' => true,
),
),
),
),
'product_title_breadcrumb_font' => array(
'control_type' => 'kadence_typography_control',
'section' => 'product_layout_design',
'label' => esc_html__( 'Breadcrumb Font', 'kadence' ),
'default' => kadence()->default( 'product_title_breadcrumb_font' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => '.product-title .kadence-breadcrumbs',
'property' => 'font',
'key' => 'typography',
),
),
'context' => array(
array(
'setting' => 'product_above_layout',
'operator' => '!=',
'value' => 'none',
),
),
'input_attrs' => array(
'id' => 'product_title_breadcrumb_font',
'options' => 'no-color',
),
),
'product_title_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'product_layout_design',
'label' => esc_html__( 'Product Above Area Background', 'kadence' ),
'default' => kadence()->default( 'product_title_background' ),
'context' => array(
array(
'setting' => 'product_above_layout',
'operator' => '=',
'value' => 'title',
),
),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => '#inner-wrap .product-hero-section .entry-hero-container-inner',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Product Above Title Background', 'kadence' ),
),
),
'product_title_featured_image' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'product_layout_design',
'default' => kadence()->default( 'product_title_featured_image' ),
'label' => esc_html__( 'Use Featured Image for Background?', 'kadence' ),
'transport' => 'refresh',
'context' => array(
array(
'setting' => 'product_above_layout',
'operator' => '=',
'value' => 'title',
),
),
),
'product_title_overlay_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'product_layout_design',
'label' => esc_html__( 'Background Overlay Color', 'kadence' ),
'default' => kadence()->default( 'product_title_overlay_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.product-hero-section .hero-section-overlay',
'property' => 'background',
'pattern' => '$',
'key' => 'color',
),
),
'context' => array(
array(
'setting' => 'product_above_layout',
'operator' => '=',
'value' => 'title',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Overlay Color', 'kadence' ),
'palette' => true,
),
),
'allowGradient' => true,
),
),
'product_title_border' => array(
'control_type' => 'kadence_borders_control',
'section' => 'product_layout_design',
'label' => esc_html__( 'Border', 'kadence' ),
'default' => kadence()->default( 'product_title_border' ),
'context' => array(
array(
'setting' => 'product_above_layout',
'operator' => '=',
'value' => 'title',
),
),
'settings' => array(
'border_top' => 'product_title_top_border',
'border_bottom' => 'product_title_bottom_border',
),
'live_method' => array(
'product_title_top_border' => array(
array(
'type' => 'css_border',
'selector' => '.product-hero-section .entry-hero-container-inner',
'pattern' => '$',
'property' => 'border-top',
'key' => 'border',
),
),
'product_title_bottom_border' => array(
array(
'type' => 'css_border',
'selector' => '.product-hero-section .entry-hero-container-inner',
'property' => 'border-bottom',
'pattern' => '$',
'key' => 'border',
),
),
),
),
'info_product_layout' => array(
'control_type' => 'kadence_title_control',
'section' => 'product_layout',
'priority' => 10,
'label' => esc_html__( 'Product Layout', 'kadence' ),
'settings' => false,
),
'info_product_layout_design' => array(
'control_type' => 'kadence_title_control',
'section' => 'product_layout_design',
'priority' => 10,
'label' => esc_html__( 'Product Layout', 'kadence' ),
'settings' => false,
),
'product_single_category_font' => array(
'control_type' => 'kadence_typography_control',
'section' => 'product_layout_design',
'label' => esc_html__( 'Product In Content Category Font', 'kadence' ),
'default' => kadence()->default( 'product_single_category_font' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => '.woocommerce div.product .product-single-category',
'property' => 'font',
'key' => 'typography',
),
),
'input_attrs' => array(
'id' => 'product_single_category_font',
),
),
'product_title_font' => array(
'control_type' => 'kadence_typography_control',
'section' => 'product_layout_design',
'label' => esc_html__( 'Product Title Font', 'kadence' ),
'default' => kadence()->default( 'product_title_font' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => '.woocommerce div.product .product_title',
'property' => 'font',
'key' => 'typography',
),
),
'input_attrs' => array(
'id' => 'product_title_font',
'headingInherit' => true,
),
),
'product_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'product_layout',
'label' => esc_html__( 'Product Layout', 'kadence' ),
'transport' => 'refresh',
'priority' => 10,
'default' => kadence()->default( 'product_layout' ),
'input_attrs' => array(
'layout' => array(
'normal' => array(
'tooltip' => __( 'Normal', 'kadence' ),
'icon' => 'normal',
),
'narrow' => array(
'tooltip' => __( 'Narrow', 'kadence' ),
'icon' => 'narrow',
),
'fullwidth' => array(
'tooltip' => __( 'Fullwidth', 'kadence' ),
'icon' => 'fullwidth',
),
'left' => array(
'tooltip' => __( 'Left Sidebar', 'kadence' ),
'icon' => 'leftsidebar',
),
'right' => array(
'tooltip' => __( 'Right Sidebar', 'kadence' ),
'icon' => 'rightsidebar',
),
),
'responsive' => false,
'class' => 'kadence-three-col',
),
),
'product_sidebar_id' => array(
'control_type' => 'kadence_select_control',
'section' => 'product_layout',
'label' => esc_html__( 'Product Default Sidebar', 'kadence' ),
'transport' => 'refresh',
'priority' => 10,
'default' => kadence()->default( 'product_sidebar_id' ),
'input_attrs' => array(
'options' => kadence()->sidebar_options(),
),
),
'product_content_style' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'product_layout',
'label' => esc_html__( 'Content Style', 'kadence' ),
'priority' => 10,
'default' => kadence()->default( 'product_content_style' ),
'live_method' => array(
array(
'type' => 'class',
'selector' => 'body.single-product',
'pattern' => 'content-style-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'boxed' => array(
'tooltip' => __( 'Boxed', 'kadence' ),
'icon' => 'boxed',
),
'unboxed' => array(
'tooltip' => __( 'Unboxed', 'kadence' ),
'icon' => 'narrow',
),
),
'responsive' => false,
'class' => 'kadence-two-col',
),
),
'product_vertical_padding' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'product_layout',
'label' => esc_html__( 'Content Vertical Spacing', 'kadence' ),
'priority' => 10,
'default' => kadence()->default( 'product_vertical_padding' ),
'live_method' => array(
array(
'type' => 'class',
'selector' => 'body.single-product',
'pattern' => 'content-vertical-padding-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'show' => array(
'name' => __( 'Enable', 'kadence' ),
),
'hide' => array(
'name' => __( 'Disable', 'kadence' ),
),
'top' => array(
'name' => __( 'Top Only', 'kadence' ),
),
'bottom' => array(
'name' => __( 'Bottom Only', 'kadence' ),
),
),
'responsive' => false,
'class' => 'kadence-two-grid',
),
),
'product_content_elements' => array(
'control_type' => 'kadence_sorter_control',
'section' => 'product_layout',
'priority' => 10,
'default' => kadence()->default( 'product_content_elements' ),
'label' => esc_html__( 'Product Elements', 'kadence' ),
'transport' => 'refresh',
'settings' => array(
'elements' => 'product_content_elements',
'category' => 'product_content_element_category',
'title' => 'product_content_element_title',
'rating' => 'product_content_element_rating',
'price' => 'product_content_element_price',
'excerpt' => 'product_content_element_excerpt',
'add_to_cart' => 'product_content_element_add_to_cart',
'extras' => 'product_content_element_extras',
'payments' => 'product_content_element_payments',
'product_meta' => 'product_content_element_product_meta',
'share' => 'product_content_element_share',
),
'input_attrs' => array(
'group' => 'product_content_element',
'sortable' => false,
),
),
'custom_quantity' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'product_layout',
'priority' => 10,
'default' => kadence()->default( 'custom_quantity' ),
'label' => esc_html__( 'Use Custom Quantity Plus and Minus', 'kadence' ),
'transport' => 'refresh',
),
'variation_direction' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'product_layout',
'priority' => 10,
'default' => kadence()->default( 'variation_direction' ),
'label' => esc_html__( 'Product Variation Display', 'kadence' ),
'live_method' => array(
array(
'type' => 'class',
'selector' => 'body.single-product',
'pattern' => 'product-variation-style-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'horizontal' => array(
'name' => __( 'Horizontal', 'kadence' ),
),
'vertical' => array(
'name' => __( 'Vertical', 'kadence' ),
),
),
'responsive' => false,
),
),
'product_tab_style' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'product_layout',
'label' => esc_html__( 'Tab Style', 'kadence' ),
'priority' => 10,
'default' => kadence()->default( 'product_tab_style' ),
'live_method' => array(
array(
'type' => 'class',
'selector' => 'body.single-product',
'pattern' => 'product-tab-style-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'normal' => array(
'name' => __( 'Normal', 'kadence' ),
),
'center' => array(
'name' => __( 'Center', 'kadence' ),
),
),
'responsive' => false,
),
),
'product_tab_title' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'product_layout',
'priority' => 10,
'default' => kadence()->default( 'product_tab_title' ),
'label' => esc_html__( 'Show default headings in tab content', 'kadence' ),
'transport' => 'refresh',
),
'product_additional_weight_dimensions' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'product_layout',
'priority' => 10,
'default' => kadence()->default( 'product_additional_weight_dimensions' ),
'label' => esc_html__( 'Show Weight and Dimensions in Additional Information tab?', 'kadence' ),
'transport' => 'refresh',
),
'product_related' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'product_layout',
'priority' => 10,
'default' => kadence()->default( 'product_related' ),
'label' => esc_html__( 'Show Related Products?', 'kadence' ),
'transport' => 'refresh',
),
'product_related_columns' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'product_layout',
'priority' => 10,
'label' => esc_html__( 'Related Products Columns', 'kadence' ),
'transport' => 'refresh',
'default' => kadence()->default( 'product_related_columns' ),
'context' => array(
array(
'setting' => 'product_related',
'operator' => '=',
'value' => true,
),
),
'input_attrs' => array(
'layout' => array(
'2' => array(
'name' => __( '2', 'kadence' ),
),
'3' => array(
'name' => __( '3', 'kadence' ),
),
'4' => array(
'name' => __( '4', 'kadence' ),
),
),
'responsive' => false,
),
),
'product_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'product_layout_design',
'label' => esc_html__( 'Site Background', 'kadence' ),
'default' => kadence()->default( 'product_background' ),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => 'body.single-product',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Product Background', 'kadence' ),
),
),
'product_content_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'product_layout_design',
'label' => esc_html__( 'Content Background', 'kadence' ),
'default' => kadence()->default( 'product_content_background' ),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => 'body.single-product .content-bg, body.single-product.content-style-unboxed .site',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Product Content Background', 'kadence' ),
),
),
);
Theme_Customizer::add_settings( $settings );

View File

@@ -0,0 +1,746 @@
<?php
/**
* Header Main Row Options
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
$settings = array(
'search_archive_tabs' => array(
'control_type' => 'kadence_tab_control',
'section' => 'search',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'search',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'search_design',
),
'active' => 'general',
),
),
'search_archive_tabs_design' => array(
'control_type' => 'kadence_tab_control',
'section' => 'search_design',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'search',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'search_design',
),
'active' => 'design',
),
),
'info_search_archive_title' => array(
'control_type' => 'kadence_title_control',
'section' => 'search',
'priority' => 2,
'label' => esc_html__( 'Search Results Title', 'kadence' ),
'settings' => false,
),
'info_search_archive_title_design' => array(
'control_type' => 'kadence_title_control',
'section' => 'search_design',
'priority' => 2,
'label' => esc_html__( 'Search Results Title', 'kadence' ),
'settings' => false,
),
'search_archive_title' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'search',
'priority' => 3,
'default' => kadence()->default( 'search_archive_title' ),
'label' => esc_html__( 'Show Search Results Title?', 'kadence' ),
'transport' => 'refresh',
),
'search_archive_title_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'search',
'label' => esc_html__( 'Search Results Title Layout', 'kadence' ),
'transport' => 'refresh',
'priority' => 4,
'default' => kadence()->default( 'search_archive_title_layout' ),
'context' => array(
array(
'setting' => 'search_archive_title',
'operator' => '=',
'value' => true,
),
),
'input_attrs' => array(
'layout' => array(
'normal' => array(
'name' => __( 'In Content', 'kadence' ),
'icon' => 'incontent',
),
'above' => array(
'name' => __( 'Above Content', 'kadence' ),
'icon' => 'abovecontent',
),
),
'responsive' => false,
'class' => 'kadence-two-col',
),
),
'search_archive_title_inner_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'search',
'priority' => 4,
'default' => kadence()->default( 'search_archive_title_inner_layout' ),
'label' => esc_html__( 'Container Width', 'kadence' ),
'context' => array(
array(
'setting' => 'search_archive_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'search_archive_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.search-archive-hero-section',
'pattern' => 'entry-hero-layout-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'standard' => array(
'tooltip' => __( 'Background Fullwidth, Content Contained', 'kadence' ),
'name' => __( 'Standard', 'kadence' ),
'icon' => '',
),
'fullwidth' => array(
'tooltip' => __( 'Background & Content Fullwidth', 'kadence' ),
'name' => __( 'Fullwidth', 'kadence' ),
'icon' => '',
),
'contained' => array(
'tooltip' => __( 'Background & Content Contained', 'kadence' ),
'name' => __( 'Contained', 'kadence' ),
'icon' => '',
),
),
'responsive' => false,
),
),
'search_archive_title_align' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'search',
'label' => esc_html__( 'Search Results Title Align', 'kadence' ),
'priority' => 4,
'default' => kadence()->default( 'search_archive_title_align' ),
'context' => array(
array(
'setting' => 'search_archive_title',
'operator' => '=',
'value' => true,
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.search-archive-title',
'pattern' => array(
'desktop' => 'title-align-$',
'tablet' => 'title-tablet-align-$',
'mobile' => 'title-mobile-align-$',
),
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'left' => array(
'tooltip' => __( 'Left Align Title', 'kadence' ),
'dashicon' => 'editor-alignleft',
),
'center' => array(
'tooltip' => __( 'Center Align Title', 'kadence' ),
'dashicon' => 'editor-aligncenter',
),
'right' => array(
'tooltip' => __( 'Right Align Title', 'kadence' ),
'dashicon' => 'editor-alignright',
),
),
'responsive' => true,
),
),
'search_archive_title_height' => array(
'control_type' => 'kadence_range_control',
'section' => 'search',
'priority' => 5,
'label' => esc_html__( 'Container Min Height', 'kadence' ),
'context' => array(
array(
'setting' => 'search_archive_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'search_archive_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#inner-wrap .search-archive-hero-section .entry-header',
'property' => 'min-height',
'pattern' => '$',
'key' => 'size',
),
),
'default' => kadence()->default( 'search_archive_title_height' ),
'input_attrs' => array(
'min' => array(
'px' => 10,
'em' => 1,
'rem' => 1,
'vh' => 2,
),
'max' => array(
'px' => 800,
'em' => 12,
'rem' => 12,
'vh' => 100,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
'vh' => 1,
),
'units' => array( 'px', 'em', 'rem', 'vh' ),
),
),
'search_archive_title_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'search_design',
'label' => esc_html__( 'Title Color', 'kadence' ),
'default' => kadence()->default( 'search_archive_title_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.search-archive-title h1',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Color', 'kadence' ),
'palette' => true,
),
),
),
),
'search_archive_title_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'search_design',
'label' => esc_html__( 'Archive Title Background', 'kadence' ),
'default' => kadence()->default( 'search_archive_title_background' ),
'context' => array(
array(
'setting' => 'search_archive_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'search_archive_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => '#inner-wrap .search-archive-hero-section .entry-hero-container-inner',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Post Title Background', 'kadence' ),
),
),
'search_archive_title_overlay_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'search_design',
'label' => esc_html__( 'Background Overlay Color', 'kadence' ),
'default' => kadence()->default( 'search_archive_title_overlay_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.search-archive-hero-section .hero-section-overlay',
'property' => 'background',
'pattern' => '$',
'key' => 'color',
),
),
'context' => array(
array(
'setting' => 'search_archive_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'search_archive_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Overlay Color', 'kadence' ),
'palette' => true,
),
),
'allowGradient' => true,
),
),
'search_archive_title_border' => array(
'control_type' => 'kadence_borders_control',
'section' => 'search_design',
'label' => esc_html__( 'Border', 'kadence' ),
'default' => kadence()->default( 'search_archive_title_border' ),
'context' => array(
array(
'setting' => 'search_archive_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'search_archive_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'settings' => array(
'border_top' => 'search_archive_title_top_border',
'border_bottom' => 'search_archive_title_bottom_border',
),
'live_method' => array(
'search_archive_title_top_border' => array(
array(
'type' => 'css_border',
'selector' => '.search-archive-hero-section .entry-hero-container-inner',
'pattern' => '$',
'property' => 'border-top',
'key' => 'border',
),
),
'search_archive_title_bottom_border' => array(
array(
'type' => 'css_border',
'selector' => '.search-archive-hero-section .entry-hero-container-inner',
'property' => 'border-bottom',
'pattern' => '$',
'key' => 'border',
),
),
),
),
'info_search_archive_layout' => array(
'control_type' => 'kadence_title_control',
'section' => 'search',
'priority' => 10,
'label' => esc_html__( 'Archive Layout', 'kadence' ),
'settings' => false,
),
'info_search_archive_layout_design' => array(
'control_type' => 'kadence_title_control',
'section' => 'search_design',
'priority' => 10,
'label' => esc_html__( 'Archive Layout', 'kadence' ),
'settings' => false,
),
'search_archive_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'search',
'label' => esc_html__( 'Archive Layout', 'kadence' ),
'transport' => 'refresh',
'priority' => 10,
'default' => kadence()->default( 'search_archive_layout' ),
'input_attrs' => array(
'layout' => array(
'normal' => array(
'name' => __( 'Normal', 'kadence' ),
'icon' => 'normal',
),
'narrow' => array(
'name' => __( 'Narrow', 'kadence' ),
'icon' => 'narrow',
),
'fullwidth' => array(
'name' => __( 'Fullwidth', 'kadence' ),
'icon' => 'fullwidth',
),
'left' => array(
'name' => __( 'Left Sidebar', 'kadence' ),
'icon' => 'leftsidebar',
),
'right' => array(
'name' => __( 'Right Sidebar', 'kadence' ),
'icon' => 'rightsidebar',
),
),
'class' => 'kadence-three-col',
'responsive' => false,
),
),
'search_archive_sidebar_id' => array(
'control_type' => 'kadence_select_control',
'section' => 'search',
'label' => esc_html__( 'Post Archive Default Sidebar', 'kadence' ),
'transport' => 'refresh',
'priority' => 10,
'default' => kadence()->default( 'search_archive_sidebar_id' ),
'input_attrs' => array(
'options' => kadence()->sidebar_options(),
),
),
'search_archive_content_style' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'search',
'label' => esc_html__( 'Content Style', 'kadence' ),
'priority' => 10,
'default' => kadence()->default( 'search_archive_content_style' ),
'live_method' => array(
array(
'type' => 'class',
'selector' => 'body.search-results',
'pattern' => 'content-style-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'boxed' => array(
'tooltip' => __( 'Boxed', 'kadence' ),
'icon' => 'gridBoxed',
'name' => __( 'Boxed', 'kadence' ),
),
'unboxed' => array(
'tooltip' => __( 'Unboxed', 'kadence' ),
'icon' => 'gridUnboxed',
'name' => __( 'Unboxed', 'kadence' ),
),
),
'responsive' => false,
'class' => 'kadence-two-col',
),
),
'search_archive_columns' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'search',
'priority' => 10,
'label' => esc_html__( 'Search Result Columns', 'kadence' ),
'transport' => 'refresh',
'default' => kadence()->default( 'search_archive_columns' ),
'input_attrs' => array(
'layout' => array(
'1' => array(
'name' => __( '1', 'kadence' ),
),
'2' => array(
'name' => __( '2', 'kadence' ),
),
'3' => array(
'name' => __( '3', 'kadence' ),
),
'4' => array(
'name' => __( '4', 'kadence' ),
),
),
'responsive' => false,
),
),
'search_archive_item_image_placement' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'search',
'label' => esc_html__( 'Item Image Placement', 'kadence' ),
'priority' => 10,
'default' => kadence()->default( 'search_archive_item_image_placement' ),
'context' => array(
array(
'setting' => 'search_archive_columns',
'operator' => '=',
'value' => '1',
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.search-archive.grid-cols',
'pattern' => 'item-image-style-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'beside' => array(
'name' => __( 'Beside', 'kadence' ),
),
'above' => array(
'name' => __( 'Above', 'kadence' ),
),
),
'responsive' => false,
),
),
'info_search_archive_item_layout' => array(
'control_type' => 'kadence_title_control',
'section' => 'search',
'priority' => 12,
'label' => esc_html__( 'Search Item Layout', 'kadence' ),
'settings' => false,
),
'search_archive_elements' => array(
'control_type' => 'kadence_sorter_control',
'section' => 'search',
'priority' => 12,
'default' => kadence()->default( 'search_archive_elements' ),
'label' => esc_html__( 'Search Item Elements', 'kadence' ),
'transport' => 'refresh',
'settings' => array(
'elements' => 'search_archive_elements',
'feature' => 'search_archive_element_feature',
'categories' => 'search_archive_element_categories',
'title' => 'search_archive_element_title',
'meta' => 'search_archive_element_meta',
'excerpt' => 'search_archive_element_excerpt',
'readmore' => 'search_archive_element_readmore',
),
'input_attrs' => array(
'groupe' => 'search_archive_elements',
'sortable' => false,
'defaults' => array(
'feature' => kadence()->default( 'search_archive_element_feature' ),
'categories' => kadence()->default( 'search_archive_element_categories' ),
'title' => kadence()->default( 'search_archive_element_title' ),
'meta' => kadence()->default( 'search_archive_element_meta' ),
'excerpt' => kadence()->default( 'search_archive_element_excerpt' ),
'readmore' => kadence()->default( 'search_archive_element_readmore' ),
),
'dividers' => array(
'dot' => array(
'icon' => 'dot',
),
'slash' => array(
'icon' => 'slash',
),
'dash' => array(
'icon' => 'dash',
),
'vline' => array(
'icon' => 'vline',
),
'customicon' => array(
'icon' => 'hours',
),
),
),
),
'search_archive_item_title_font' => array(
'control_type' => 'kadence_typography_control',
'section' => 'search_design',
'label' => esc_html__( 'Search Item Title Font', 'kadence' ),
'default' => kadence()->default( 'search_archive_item_title_font' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => 'body.search-results .loop-entry h2.entry-title',
'property' => 'font',
'key' => 'typography',
),
),
'input_attrs' => array(
'id' => 'search_archive_item_title_font',
'headingInherit' => true,
),
),
'search_archive_item_category_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'search_design',
'label' => esc_html__( 'Item Category Colors', 'kadence' ),
'default' => kadence()->default( 'search_archive_item_category_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => 'body.search-results .loop-entry .entry-taxonomies, .loop-entry .entry-taxonomies a',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => 'body.search-results .loop-entry .entry-taxonomies a:hover',
'property' => 'color',
'pattern' => '$',
'key' => 'hover',
),
array(
'type' => 'css',
'selector' => 'body.search-results .loop-entry .entry-taxonomies .category-style-pill a',
'property' => 'background',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => 'body.search-results .loop-entry .entry-taxonomies .category-style-pill a:hover',
'property' => 'background',
'pattern' => '$',
'key' => 'hover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Link Hover Color', 'kadence' ),
'palette' => true,
),
),
),
),
'search_archive_item_category_font' => array(
'control_type' => 'kadence_typography_control',
'section' => 'search_design',
'label' => esc_html__( 'Item Category Font', 'kadence' ),
'default' => kadence()->default( 'search_archive_item_category_font' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => 'body.search-results .loop-entry .entry-taxonomies',
'property' => 'font',
'key' => 'typography',
),
),
'input_attrs' => array(
'id' => 'search_archive_item_category_font',
'options' => 'no-color',
),
),
'search_archive_item_meta_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'search_design',
'label' => esc_html__( 'Item Meta Colors', 'kadence' ),
'default' => kadence()->default( 'search_archive_item_meta_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => 'body.search-results .loop-entry .entry-meta',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => 'body.search-results .loop-entry .entry-meta a:hover',
'property' => 'color',
'pattern' => '$',
'key' => 'hover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Link Hover Color', 'kadence' ),
'palette' => true,
),
),
),
),
'search_archive_item_meta_font' => array(
'control_type' => 'kadence_typography_control',
'section' => 'search_design',
'label' => esc_html__( 'Item Meta Font', 'kadence' ),
'default' => kadence()->default( 'search_archive_item_meta_font' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => 'body.search-results .loop-entry .entry-meta',
'property' => 'font',
'key' => 'typography',
),
),
'input_attrs' => array(
'id' => 'search_archive_item_meta_font',
'options' => 'no-color',
),
),
'search_archive_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'search_design',
'label' => esc_html__( 'Site Background', 'kadence' ),
'default' => kadence()->default( 'search_archive_background' ),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => 'body.search-results',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Search Results Background', 'kadence' ),
),
),
'search_archive_content_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'search_design',
'label' => esc_html__( 'Content Background', 'kadence' ),
'default' => kadence()->default( 'search_archive_content_background' ),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => 'body.search-results .content-bg, body.search-results.content-style-unboxed .site',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Search Results Content Background', 'kadence' ),
),
),
);
Theme_Customizer::add_settings( $settings );

View File

@@ -0,0 +1,249 @@
<?php
/**
* Secondary Button Options
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
Theme_Customizer::add_settings(
array(
'buttons_secondary_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'secondary_button',
'label' => esc_html__( 'Text Colors', 'kadence' ),
'default' => kadence()->default( 'buttons_secondary_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.button.button-style-secondary',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.button.button-style-secondary:hover',
'property' => 'color',
'pattern' => '$',
'key' => 'hover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Hover Color', 'kadence' ),
'palette' => true,
),
),
),
),
'buttons_secondary_background' => array(
'control_type' => 'kadence_color_control',
'section' => 'secondary_button',
'label' => esc_html__( 'Background Colors', 'kadence' ),
'default' => kadence()->default( 'buttons_secondary_background' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.button.button-style-secondary',
'property' => 'background',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.button.button-style-secondary:hover',
'property' => 'background',
'pattern' => '$',
'key' => 'hover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Hover Color', 'kadence' ),
'palette' => true,
),
),
'allowGradient' => true,
),
),
'buttons_secondary_border_colors' => array(
'control_type' => 'kadence_color_control',
'section' => 'secondary_button',
'label' => esc_html__( 'Border Colors', 'kadence' ),
'default' => kadence()->default( 'buttons_secondary_border' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.button.button-style-secondary',
'property' => 'border-color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.button.button-style-secondary:hover',
'property' => 'border-color',
'pattern' => '$',
'key' => 'hover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Hover Color', 'kadence' ),
'palette' => true,
),
),
),
),
'buttons_secondary_border' => array(
'control_type' => 'kadence_border_control',
'section' => 'secondary_button',
'label' => esc_html__( 'Border', 'kadence' ),
'default' => kadence()->default( 'buttons_secondary_border' ),
'live_method' => array(
array(
'type' => 'css_border',
'selector' => '.button.button-style-secondary',
'property' => 'border',
'pattern' => '$',
'key' => 'border',
),
),
'input_attrs' => array(
'responsive' => true,
'color' => false,
),
),
'buttons_secondary_border_radius' => array(
'control_type' => 'kadence_range_control',
'section' => 'secondary_button',
'label' => esc_html__( 'Border Radius', 'kadence' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.button.button-style-secondary',
'property' => 'border-radius',
'pattern' => '$',
'key' => 'size',
),
),
'default' => kadence()->default( 'buttons_secondary_border_radius' ),
'input_attrs' => array(
'min' => array(
'px' => 0,
'em' => 0,
'rem' => 0,
'%' => 0,
),
'max' => array(
'px' => 100,
'em' => 12,
'rem' => 12,
'%' => 100,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
'%' => 1,
),
'units' => array( 'px', 'em', 'rem', '%' ),
'responsive' => true,
),
),
'buttons_secondary_typography' => array(
'control_type' => 'kadence_typography_control',
'section' => 'secondary_button',
'label' => esc_html__( 'Font', 'kadence' ),
'default' => kadence()->default( 'buttons_secondary_typography' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => '.button.button-style-secondary',
'pattern' => array(
'desktop' => '$',
'tablet' => '$',
'mobile' => '$',
),
'property' => 'font',
'key' => 'typography',
),
),
'input_attrs' => array(
'id' => 'buttons_secondary_typography',
'options' => 'no-color',
),
),
'buttons_secondary_padding' => array(
'control_type' => 'kadence_measure_control',
'section' => 'secondary_button',
'priority' => 10,
'default' => kadence()->default( 'buttons_secondary_padding' ),
'label' => esc_html__( 'Padding', 'kadence' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.button.button-style-secondary',
'property' => 'padding',
'pattern' => '$',
'key' => 'measure',
),
),
'input_attrs' => array(
'responsive' => true,
),
),
'buttons_secondary_shadow' => array(
'control_type' => 'kadence_shadow_control',
'section' => 'secondary_button',
'priority' => 20,
'label' => esc_html__( 'Button Shadow', 'kadence' ),
'live_method' => array(
array(
'type' => 'css_boxshadow',
'selector' => '.button.button-style-secondary',
'property' => 'box-shadow',
'pattern' => '$',
'key' => '',
),
),
'default' => kadence()->default( 'buttons_secondary_shadow' ),
),
'buttons_secondary_shadow_hover' => array(
'control_type' => 'kadence_shadow_control',
'section' => 'secondary_button',
'priority' => 20,
'label' => esc_html__( 'Button Hover State Shadow', 'kadence' ),
'live_method' => array(
array(
'type' => 'css_boxshadow',
'selector' => '.button.button-style-secondary:hover',
'property' => 'box-shadow',
'pattern' => '$',
'key' => '',
),
),
'default' => kadence()->default( 'buttons_secondary_shadow_hover' ),
),
)
);

View File

@@ -0,0 +1,87 @@
<?php
/**
* Header Main Row Options
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
$settings = array(
'info_tribe_events_archive_layout' => array(
'control_type' => 'kadence_title_control',
'section' => 'tribe_events_archive',
'priority' => 10,
'label' => esc_html__( 'Events Layout', 'kadence' ),
'settings' => false,
),
'tribe_events_archive_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'tribe_events_archive',
'label' => esc_html__( 'Events Layout', 'kadence' ),
'transport' => 'refresh',
'priority' => 10,
'default' => kadence()->default( 'tribe_events_archive_layout' ),
'input_attrs' => array(
'layout' => array(
'normal' => array(
'tooltip' => __( 'Normal', 'kadence' ),
'icon' => 'normal',
),
'narrow' => array(
'tooltip' => __( 'Narrow', 'kadence' ),
'icon' => 'narrow',
),
'fullwidth' => array(
'tooltip' => __( 'Fullwidth', 'kadence' ),
'icon' => 'fullwidth',
),
'left' => array(
'tooltip' => __( 'Left Sidebar', 'kadence' ),
'icon' => 'leftsidebar',
),
'right' => array(
'tooltip' => __( 'Right Sidebar', 'kadence' ),
'icon' => 'rightsidebar',
),
),
'class' => 'kadence-three-col',
'responsive' => false,
),
),
'tribe_events_archive_sidebar_id' => array(
'control_type' => 'kadence_select_control',
'section' => 'tribe_events_archive',
'label' => esc_html__( 'Events Sidebar', 'kadence' ),
'transport' => 'refresh',
'priority' => 10,
'default' => kadence()->default( 'tribe_events_archive_sidebar_id' ),
'input_attrs' => array(
'options' => kadence()->sidebar_options(),
),
),
'tribe_events_archive_content_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'tribe_events_archive',
'label' => esc_html__( 'Events Background', 'kadence' ),
'default' => kadence()->default( 'tribe_events_archive_content_background' ),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => 'body.post-type-archive-tribe_events .site, body.post-type-archive-tribe_events.content-style-unboxed .site',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Events Background', 'kadence' ),
),
),
);
Theme_Customizer::add_settings( $settings );

View File

@@ -0,0 +1,766 @@
<?php
/**
* Event Layout Options
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
$settings = array(
'tribe_events_layout_tabs' => array(
'control_type' => 'kadence_tab_control',
'section' => 'tribe_events_layout',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'tribe_events_layout',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'tribe_events_layout_design',
),
'active' => 'general',
),
),
'tribe_events_layout_tabs_design' => array(
'control_type' => 'kadence_tab_control',
'section' => 'tribe_events_layout_design',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'tribe_events_layout',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'tribe_events_layout_design',
),
'active' => 'design',
),
),
'info_tribe_events_title' => array(
'control_type' => 'kadence_title_control',
'section' => 'tribe_events_layout',
'priority' => 2,
'label' => esc_html__( 'Event Title', 'kadence' ),
'settings' => false,
),
'info_tribe_events_title_design' => array(
'control_type' => 'kadence_title_control',
'section' => 'tribe_events_layout_design',
'priority' => 2,
'label' => esc_html__( 'Event Title', 'kadence' ),
'settings' => false,
),
'tribe_events_title' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'tribe_events_layout',
'priority' => 3,
'default' => kadence()->default( 'tribe_events_title' ),
'label' => esc_html__( 'Show Event Title?', 'kadence' ),
'transport' => 'refresh',
),
'tribe_events_title_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'tribe_events_layout',
'label' => esc_html__( 'Event Title Layout', 'kadence' ),
'transport' => 'refresh',
'priority' => 4,
'default' => kadence()->default( 'tribe_events_title_layout' ),
'context' => array(
array(
'setting' => 'tribe_events_title',
'operator' => '=',
'value' => true,
),
),
'input_attrs' => array(
'layout' => array(
'normal' => array(
'tooltip' => __( 'In Content', 'kadence' ),
'icon' => 'incontent',
),
'above' => array(
'tooltip' => __( 'Above Content', 'kadence' ),
'icon' => 'abovecontent',
),
),
'responsive' => false,
'class' => 'kadence-two-col',
),
),
'tribe_events_title_inner_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'tribe_events_layout',
'priority' => 4,
'default' => kadence()->default( 'tribe_events_title_inner_layout' ),
'label' => esc_html__( 'Title Container Width', 'kadence' ),
'context' => array(
array(
'setting' => 'tribe_events_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'tribe_events_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.tribe_events-hero-section',
'pattern' => 'entry-hero-layout-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'standard' => array(
'tooltip' => __( 'Background Fullwidth, Content Contained', 'kadence' ),
'name' => __( 'Standard', 'kadence' ),
'icon' => '',
),
'fullwidth' => array(
'tooltip' => __( 'Background & Content Fullwidth', 'kadence' ),
'name' => __( 'Fullwidth', 'kadence' ),
'icon' => '',
),
'contained' => array(
'tooltip' => __( 'Background & Content Contained', 'kadence' ),
'name' => __( 'Contained', 'kadence' ),
'icon' => '',
),
),
'responsive' => false,
),
),
'tribe_events_title_align' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'tribe_events_layout',
'label' => esc_html__( 'Event Title Align', 'kadence' ),
'priority' => 4,
'default' => kadence()->default( 'tribe_events_title_align' ),
'context' => array(
array(
'setting' => 'tribe_events_title',
'operator' => '=',
'value' => true,
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.tribe_events-title',
'pattern' => array(
'desktop' => 'title-align-$',
'tablet' => 'title-tablet-align-$',
'mobile' => 'title-mobile-align-$',
),
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'left' => array(
'tooltip' => __( 'Left Align Title', 'kadence' ),
'dashicon' => 'editor-alignleft',
),
'center' => array(
'tooltip' => __( 'Center Align Title', 'kadence' ),
'dashicon' => 'editor-aligncenter',
),
'right' => array(
'tooltip' => __( 'Right Align Title', 'kadence' ),
'dashicon' => 'editor-alignright',
),
),
'responsive' => true,
),
),
'tribe_events_title_height' => array(
'control_type' => 'kadence_range_control',
'section' => 'tribe_events_layout',
'priority' => 5,
'label' => esc_html__( 'Title Container Min Height', 'kadence' ),
'context' => array(
array(
'setting' => 'tribe_events_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'tribe_events_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#inner-wrap .tribe_events-hero-section .entry-header',
'property' => 'min-height',
'pattern' => '$',
'key' => 'size',
),
),
'default' => kadence()->default( 'tribe_events_title_height' ),
'input_attrs' => array(
'min' => array(
'px' => 10,
'em' => 1,
'rem' => 1,
'vh' => 2,
),
'max' => array(
'px' => 800,
'em' => 12,
'rem' => 12,
'vh' => 100,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
'vh' => 1,
),
'units' => array( 'px', 'em', 'rem', 'vh' ),
),
),
'tribe_events_title_elements' => array(
'control_type' => 'kadence_sorter_control',
'section' => 'tribe_events_layout',
'priority' => 6,
'default' => kadence()->default( 'tribe_events_title_elements' ),
'label' => esc_html__( 'Title Elements', 'kadence' ),
'transport' => 'refresh',
'settings' => array(
'elements' => 'tribe_events_title_elements',
'title' => 'tribe_events_title_element_title',
'back_link' => 'tribe_events_title_element_back_link',
'breadcrumb' => 'tribe_events_title_element_breadcrumb',
),
'context' => array(
array(
'setting' => 'tribe_events_title',
'operator' => '=',
'value' => true,
),
),
'input_attrs' => array(
'group' => 'tribe_events_title_element',
),
),
'tribe_events_title_font' => array(
'control_type' => 'kadence_typography_control',
'section' => 'tribe_events_layout_design',
'label' => esc_html__( 'Event Title Font', 'kadence' ),
'default' => kadence()->default( 'tribe_events_title_font' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => '.tribe_events-title h1',
'property' => 'font',
'key' => 'typography',
),
),
'context' => array(
array(
'setting' => 'tribe_events_title',
'operator' => '=',
'value' => true,
),
),
'input_attrs' => array(
'id' => 'tribe_events_title_font',
'headingInherit' => true,
),
),
'tribe_events_title_breadcrumb_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'tribe_events_layout_design',
'label' => esc_html__( 'Breadcrumb Colors', 'kadence' ),
'default' => kadence()->default( 'tribe_events_title_breadcrumb_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.tribe_events-title .kadence-breadcrumbs',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.tribe_events-title .kadence-breadcrumbs a:hover',
'property' => 'color',
'pattern' => '$',
'key' => 'hover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Link Hover Color', 'kadence' ),
'palette' => true,
),
),
),
),
'tribe_events_title_breadcrumb_font' => array(
'control_type' => 'kadence_typography_control',
'section' => 'tribe_events_layout_design',
'label' => esc_html__( 'Breadcrumb Font', 'kadence' ),
'default' => kadence()->default( 'tribe_events_title_breadcrumb_font' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => '.tribe_events-title .kadence-breadcrumbs',
'property' => 'font',
'key' => 'typography',
),
),
'input_attrs' => array(
'id' => 'tribe_events_title_breadcrumb_font',
'options' => 'no-color',
),
),
'tribe_events_title_back_link_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'tribe_events_layout_design',
'label' => esc_html__( 'Back Link Colors', 'kadence' ),
'default' => kadence()->default( 'tribe_events_title_back_link_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.tribe_events-title .tribe-events-back a',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.tribe_events-title .tribe-events-back a:hover',
'property' => 'color',
'pattern' => '$',
'key' => 'hover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Hover Color', 'kadence' ),
'palette' => true,
),
),
),
),
'tribe_events_title_back_link_font' => array(
'control_type' => 'kadence_typography_control',
'section' => 'tribe_events_layout_design',
'label' => esc_html__( 'Back Link Font', 'kadence' ),
'default' => kadence()->default( 'tribe_events_title_back_link_font' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => '.tribe_events-title .tribe-events-back a',
'property' => 'font',
'key' => 'typography',
),
),
'input_attrs' => array(
'id' => 'tribe_events_title_back_link_font',
'options' => 'no-color',
),
),
'tribe_events_title_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'tribe_events_layout_design',
'label' => esc_html__( 'Event Above Area Background', 'kadence' ),
'default' => kadence()->default( 'tribe_events_title_background' ),
'context' => array(
array(
'setting' => 'tribe_events_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'tribe_events_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => '#inner-wrap .tribe_events-hero-section .entry-hero-container-inner',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Event Title Background', 'kadence' ),
),
),
'tribe_events_title_featured_image' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'tribe_events_layout_design',
'default' => kadence()->default( 'tribe_events_title_featured_image' ),
'label' => esc_html__( 'Use Featured Image for Background?', 'kadence' ),
'transport' => 'refresh',
'context' => array(
array(
'setting' => 'tribe_events_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'tribe_events_title_layout',
'operator' => '=',
'value' => 'above',
),
),
),
'tribe_events_title_overlay_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'tribe_events_layout_design',
'label' => esc_html__( 'Background Overlay Color', 'kadence' ),
'default' => kadence()->default( 'tribe_events_title_overlay_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.tribe_events-hero-section .hero-section-overlay',
'property' => 'background',
'pattern' => '$',
'key' => 'color',
),
),
'context' => array(
array(
'setting' => 'tribe_events_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'tribe_events_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Overlay Color', 'kadence' ),
'palette' => true,
),
),
'allowGradient' => true,
),
),
'tribe_events_title_border' => array(
'control_type' => 'kadence_borders_control',
'section' => 'tribe_events_layout_design',
'label' => esc_html__( 'Border', 'kadence' ),
'default' => kadence()->default( 'tribe_events_title_border' ),
'context' => array(
array(
'setting' => 'tribe_events_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'tribe_events_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'settings' => array(
'border_top' => 'tribe_events_title_top_border',
'border_bottom' => 'tribe_events_title_bottom_border',
),
'live_method' => array(
'tribe_events_title_top_border' => array(
array(
'type' => 'css_border',
'selector' => '.tribe_events-hero-section .entry-hero-container-inner',
'pattern' => '$',
'property' => 'border-top',
'key' => 'border',
),
),
'tribe_events_title_bottom_border' => array(
array(
'type' => 'css_border',
'selector' => '.tribe_events-hero-section .entry-hero-container-inner',
'property' => 'border-bottom',
'pattern' => '$',
'key' => 'border',
),
),
),
),
'info_tribe_events_layout' => array(
'control_type' => 'kadence_title_control',
'section' => 'tribe_events_layout',
'priority' => 10,
'label' => esc_html__( 'Event Layout', 'kadence' ),
'settings' => false,
),
'info_tribe_events_layout_design' => array(
'control_type' => 'kadence_title_control',
'section' => 'tribe_events_layout_design',
'priority' => 10,
'label' => esc_html__( 'Event Layout', 'kadence' ),
'settings' => false,
),
'tribe_events_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'tribe_events_layout',
'label' => esc_html__( 'Event Layout', 'kadence' ),
'transport' => 'refresh',
'priority' => 10,
'default' => kadence()->default( 'tribe_events_layout' ),
'input_attrs' => array(
'layout' => array(
'normal' => array(
'tooltip' => __( 'Normal', 'kadence' ),
'icon' => 'normal',
),
'narrow' => array(
'tooltip' => __( 'Narrow', 'kadence' ),
'icon' => 'narrow',
),
'fullwidth' => array(
'tooltip' => __( 'Fullwidth', 'kadence' ),
'icon' => 'fullwidth',
),
'left' => array(
'tooltip' => __( 'Left Sidebar', 'kadence' ),
'icon' => 'leftsidebar',
),
'right' => array(
'tooltip' => __( 'Right Sidebar', 'kadence' ),
'icon' => 'rightsidebar',
),
),
'responsive' => false,
'class' => 'kadence-three-col',
),
),
'tribe_events_sidebar_id' => array(
'control_type' => 'kadence_select_control',
'section' => 'tribe_events_layout',
'label' => esc_html__( 'Event Default Sidebar', 'kadence' ),
'transport' => 'refresh',
'priority' => 10,
'default' => kadence()->default( 'tribe_events_sidebar_id' ),
'input_attrs' => array(
'options' => kadence()->sidebar_options(),
),
),
'tribe_events_content_style' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'tribe_events_layout',
'label' => esc_html__( 'Content Style', 'kadence' ),
'priority' => 10,
'default' => kadence()->default( 'tribe_events_content_style' ),
'live_method' => array(
array(
'type' => 'class',
'selector' => 'body.single-tribe_events',
'pattern' => 'content-style-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'boxed' => array(
'tooltip' => __( 'Boxed', 'kadence' ),
'icon' => 'boxed',
),
'unboxed' => array(
'tooltip' => __( 'Unboxed', 'kadence' ),
'icon' => 'narrow',
),
),
'responsive' => false,
'class' => 'kadence-two-col',
),
),
'tribe_events_vertical_padding' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'tribe_events_layout',
'label' => esc_html__( 'Content Vertical Padding', 'kadence' ),
'priority' => 10,
'default' => kadence()->default( 'tribe_events_vertical_padding' ),
'live_method' => array(
array(
'type' => 'class',
'selector' => 'body.single-tribe_events',
'pattern' => 'content-vertical-padding-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'show' => array(
'name' => __( 'Enable', 'kadence' ),
),
'hide' => array(
'name' => __( 'Disable', 'kadence' ),
),
'top' => array(
'name' => __( 'Top Only', 'kadence' ),
),
'bottom' => array(
'name' => __( 'Bottom Only', 'kadence' ),
),
),
'responsive' => false,
'class' => 'kadence-two-grid',
),
),
// 'tribe_events_feature' => array(
// 'control_type' => 'kadence_switch_control',
// 'sanitize' => 'kadence_sanitize_toggle',
// 'section' => 'tribe_events_layout',
// 'priority' => 20,
// 'default' => kadence()->default( 'tribe_events_feature' ),
// 'label' => esc_html__( 'Show Featured Image?', 'kadence' ),
// 'transport' => 'refresh',
// ),
// 'tribe_events_feature_position' => array(
// 'control_type' => 'kadence_radio_icon_control',
// 'section' => 'tribe_events_layout',
// 'label' => esc_html__( 'Featured Image Position', 'kadence' ),
// 'priority' => 20,
// 'transport' => 'refresh',
// 'default' => kadence()->default( 'tribe_events_feature_position' ),
// 'context' => array(
// array(
// 'setting' => 'tribe_events_feature',
// 'operator' => '=',
// 'value' => true,
// ),
// ),
// 'input_attrs' => array(
// 'layout' => array(
// 'above' => array(
// 'name' => __( 'Above', 'kadence' ),
// ),
// 'behind' => array(
// 'name' => __( 'Behind', 'kadence' ),
// ),
// 'below' => array(
// 'name' => __( 'Below', 'kadence' ),
// ),
// ),
// 'responsive' => false,
// ),
// ),
// 'tribe_events_feature_ratio' => array(
// 'control_type' => 'kadence_radio_icon_control',
// 'section' => 'tribe_events_layout',
// 'label' => esc_html__( 'Featured Image Ratio', 'kadence' ),
// 'priority' => 20,
// 'default' => kadence()->default( 'tribe_events_feature_ratio' ),
// 'context' => array(
// array(
// 'setting' => 'tribe_events_feature',
// 'operator' => '=',
// 'value' => true,
// ),
// ),
// 'live_method' => array(
// array(
// 'type' => 'class',
// 'selector' => 'body.single-tribe_events .article-post-thumbnail',
// 'pattern' => 'kadence-thumbnail-ratio-$',
// 'key' => '',
// ),
// ),
// 'input_attrs' => array(
// 'layout' => array(
// 'inherit' => array(
// 'name' => __( 'Inherit', 'kadence' ),
// ),
// '1-1' => array(
// 'name' => __( '1:1', 'kadence' ),
// ),
// '3-4' => array(
// 'name' => __( '4:3', 'kadence' ),
// ),
// '2-3' => array(
// 'name' => __( '3:2', 'kadence' ),
// ),
// '9-16' => array(
// 'name' => __( '16:9', 'kadence' ),
// ),
// '1-2' => array(
// 'name' => __( '2:1', 'kadence' ),
// ),
// ),
// 'responsive' => false,
// 'class' => 'kadence-three-col-short',
// ),
// ),
'tribe_events_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'tribe_events_layout_design',
'priority' => 20,
'label' => esc_html__( 'Site Background', 'kadence' ),
'default' => kadence()->default( 'tribe_events_background' ),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => 'body.single-tribe_events',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Event Background', 'kadence' ),
),
),
'tribe_events_content_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'tribe_events_layout_design',
'priority' => 20,
'label' => esc_html__( 'Content Background', 'kadence' ),
'default' => kadence()->default( 'tribe_events_content_background' ),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => 'body.single-tribe_events .content-bg, body.single-tribe_events.content-style-unboxed .site',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Event Content Background', 'kadence' ),
),
),
);
Theme_Customizer::add_settings( $settings );

View File

@@ -0,0 +1,860 @@
<?php
/**
* Product Layout Options
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
Theme_Customizer::add_settings(
array(
'topic_layout_tabs' => array(
'control_type' => 'kadence_tab_control',
'section' => 'topic_layout',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'topic_layout',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'topic_layout_design',
),
'active' => 'general',
),
),
'topic_layout_tabs_design' => array(
'control_type' => 'kadence_tab_control',
'section' => 'topic_layout_design',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'topic_layout',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'topic_layout_design',
),
'active' => 'design',
),
),
'info_topic_title' => array(
'control_type' => 'kadence_title_control',
'section' => 'topic_layout',
'priority' => 2,
'label' => esc_html__( 'Topic Title', 'kadence' ),
'settings' => false,
),
'info_topic_title_design' => array(
'control_type' => 'kadence_title_control',
'section' => 'topic_layout_design',
'priority' => 2,
'label' => esc_html__( 'Topic Title', 'kadence' ),
'settings' => false,
),
'topic_title' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'topic_layout',
'priority' => 3,
'default' => kadence()->default( 'topic_title' ),
'label' => esc_html__( 'Show Topic Title?', 'kadence' ),
'transport' => 'refresh',
),
'topic_title_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'topic_layout',
'label' => esc_html__( 'Topic Title Layout', 'kadence' ),
'transport' => 'refresh',
'priority' => 4,
'default' => kadence()->default( 'topic_title_layout' ),
'context' => array(
array(
'setting' => 'topic_title',
'operator' => '=',
'value' => true,
),
),
'input_attrs' => array(
'layout' => array(
'normal' => array(
'tooltip' => __( 'In Content', 'kadence' ),
'icon' => 'incontent',
),
'above' => array(
'tooltip' => __( 'Above Content', 'kadence' ),
'icon' => 'abovecontent',
),
),
'responsive' => false,
'class' => 'kadence-two-col',
),
),
'topic_title_inner_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'topic_layout',
'priority' => 4,
'default' => kadence()->default( 'topic_title_inner_layout' ),
'label' => esc_html__( 'Title Container Width', 'kadence' ),
'context' => array(
array(
'setting' => 'topic_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'topic_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.topic-hero-section',
'pattern' => 'entry-hero-layout-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'standard' => array(
'tooltip' => __( 'Background Fullwidth, Content Contained', 'kadence' ),
'name' => __( 'Standard', 'kadence' ),
'icon' => '',
),
'fullwidth' => array(
'tooltip' => __( 'Background & Content Fullwidth', 'kadence' ),
'name' => __( 'Fullwidth', 'kadence' ),
'icon' => '',
),
'contained' => array(
'tooltip' => __( 'Background & Content Contained', 'kadence' ),
'name' => __( 'Contained', 'kadence' ),
'icon' => '',
),
),
'responsive' => false,
),
),
'topic_title_align' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'topic_layout',
'label' => esc_html__( 'Topic Title Align', 'kadence' ),
'priority' => 4,
'default' => kadence()->default( 'topic_title_align' ),
'context' => array(
array(
'setting' => 'topic_title',
'operator' => '=',
'value' => true,
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.topic-title',
'pattern' => array(
'desktop' => 'title-align-$',
'tablet' => 'title-tablet-align-$',
'mobile' => 'title-mobile-align-$',
),
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'left' => array(
'tooltip' => __( 'Left Align Title', 'kadence' ),
'dashicon' => 'editor-alignleft',
),
'center' => array(
'tooltip' => __( 'Center Align Title', 'kadence' ),
'dashicon' => 'editor-aligncenter',
),
'right' => array(
'tooltip' => __( 'Right Align Title', 'kadence' ),
'dashicon' => 'editor-alignright',
),
),
'responsive' => true,
),
),
'topic_title_height' => array(
'control_type' => 'kadence_range_control',
'section' => 'topic_layout',
'priority' => 5,
'label' => esc_html__( 'Title Container Min Height', 'kadence' ),
'context' => array(
array(
'setting' => 'topic_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'topic_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#inner-wrap .topic-hero-section .entry-header',
'property' => 'min-height',
'pattern' => '$',
'key' => 'size',
),
),
'default' => kadence()->default( 'topic_title_height' ),
'input_attrs' => array(
'min' => array(
'px' => 10,
'em' => 1,
'rem' => 1,
'vh' => 2,
),
'max' => array(
'px' => 800,
'em' => 12,
'rem' => 12,
'vh' => 100,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
'vh' => 1,
),
'units' => array( 'px', 'em', 'rem', 'vh' ),
),
),
'topic_title_elements' => array(
'control_type' => 'kadence_sorter_control',
'section' => 'topic_layout',
'priority' => 6,
'default' => kadence()->default( 'topic_title_elements' ),
'label' => esc_html__( 'Title Elements', 'kadence' ),
'transport' => 'refresh',
'settings' => array(
'elements' => 'topic_title_elements',
'title' => 'topic_title_element_title',
'breadcrumb' => 'topic_title_element_breadcrumb',
'search' => 'topic_title_element_search',
'info' => 'topic_title_element_info',
),
'context' => array(
array(
'setting' => 'topic_title',
'operator' => '=',
'value' => true,
),
),
'input_attrs' => array(
'group' => 'topic_title_element',
),
),
'topic_title_font' => array(
'control_type' => 'kadence_typography_control',
'section' => 'topic_layout_design',
'label' => esc_html__( 'Topic Title Font', 'kadence' ),
'default' => kadence()->default( 'topic_title_font' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => '.topic-title h1',
'property' => 'font',
'key' => 'typography',
),
),
'context' => array(
array(
'setting' => 'topic_title',
'operator' => '=',
'value' => true,
),
),
'input_attrs' => array(
'id' => 'topic_title_font',
'headingInherit' => true,
),
),
'topic_title_search_width' => array(
'control_type' => 'kadence_range_control',
'section' => 'topic_layout_design',
'label' => esc_html__( 'Search Bar Width', 'kadence' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.topic-title .bbp-search-form',
'property' => 'width',
'pattern' => '$',
'key' => 'size',
),
),
'default' => kadence()->default( 'topic_title_search_width' ),
'input_attrs' => array(
'min' => array(
'px' => 100,
'em' => 4,
'rem' => 4,
),
'max' => array(
'px' => 600,
'em' => 12,
'rem' => 12,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
),
'units' => array( 'px', 'em', 'rem' ),
'responsive' => false,
),
),
'topic_title_search_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'topic_layout_design',
'label' => esc_html__( 'Input Text Colors', 'kadence' ),
'default' => kadence()->default( 'topic_title_search_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.topic-title .bbp-search-form input.search-field, .topic-title .bbp-search-form .kadence-search-icon-wrap',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.topic-title .bbp-search-form input.search-field:focus, .topic-title .bbp-search-form input.search-submit:hover ~ .kadence-search-icon-wrap',
'property' => 'color',
'pattern' => '$',
'key' => 'hover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Focus Color', 'kadence' ),
'palette' => true,
),
),
),
),
'topic_title_search_background' => array(
'control_type' => 'kadence_color_control',
'section' => 'topic_layout_design',
'label' => esc_html__( 'Input Background', 'kadence' ),
'default' => kadence()->default( 'topic_title_search_background' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.topic-title .bbp-search-form input.search-field',
'property' => 'background',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.topic-title .bbp-search-form input.search-field:focus',
'property' => 'background',
'pattern' => '$',
'key' => 'hover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Focus Color', 'kadence' ),
'palette' => true,
),
),
),
),
'topic_title_search_border' => array(
'control_type' => 'kadence_border_control',
'section' => 'topic_layout_design',
'label' => esc_html__( 'Border', 'kadence' ),
'default' => kadence()->default( 'topic_title_search_border' ),
'live_method' => array(
array(
'type' => 'css_border',
'selector' => '.topic-title .bbp-search-form input.search-field',
'pattern' => '$',
'property' => 'border',
'pattern' => '$',
'key' => 'border',
),
),
'input_attrs' => array(
'responsive' => false,
'color' => false,
),
),
'topic_title_search_border_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'topic_layout_design',
'label' => esc_html__( 'Input Border Color', 'kadence' ),
'default' => kadence()->default( 'topic_title_search_border_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.topic-title .bbp-search-form input.search-field',
'property' => 'border-color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.topic-title .bbp-search-form input.search-field:focus',
'property' => 'border-color',
'pattern' => '$',
'key' => 'hover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Focus Color', 'kadence' ),
'palette' => true,
),
),
),
),
'topic_title_search_typography' => array(
'control_type' => 'kadence_typography_control',
'section' => 'topic_layout_design',
'label' => esc_html__( 'Font', 'kadence' ),
'default' => kadence()->default( 'topic_title_search_typography' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => '.topic-title .bbp-search-form input.search-field',
'pattern' => array(
'desktop' => '$',
'tablet' => '$',
'mobile' => '$',
),
'property' => 'font',
'key' => 'typography',
),
),
'input_attrs' => array(
'id' => 'topic_title_search_typography',
'options' => 'no-color',
),
),
'topic_title_search_margin' => array(
'control_type' => 'kadence_measure_control',
'section' => 'topic_layout_design',
'default' => kadence()->default( 'topic_title_search_margin' ),
'label' => esc_html__( 'Margin', 'kadence' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.topic-title .bbp-search-form form',
'property' => 'margin',
'pattern' => '$',
'key' => 'measure',
),
),
'input_attrs' => array(
'responsive' => false,
),
),
'topic_title_breadcrumb_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'topic_layout_design',
'label' => esc_html__( 'Breadcrumb Colors', 'kadence' ),
'default' => kadence()->default( 'topic_title_breadcrumb_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.topic-title .kadence-breadcrumbs',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.topic-title .kadence-breadcrumbs a:hover',
'property' => 'color',
'pattern' => '$',
'key' => 'hover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Link Hover Color', 'kadence' ),
'palette' => true,
),
),
),
),
'topic_title_breadcrumb_font' => array(
'control_type' => 'kadence_typography_control',
'section' => 'topic_layout_design',
'label' => esc_html__( 'Breadcrumb Font', 'kadence' ),
'default' => kadence()->default( 'topic_title_breadcrumb_font' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => '.topic-title .kadence-breadcrumbs',
'property' => 'font',
'key' => 'typography',
),
),
'input_attrs' => array(
'id' => 'topic_title_breadcrumb_font',
'options' => 'no-color',
),
),
'topic_title_info_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'topic_layout_design',
'label' => esc_html__( 'Info Colors', 'kadence' ),
'default' => kadence()->default( 'topic_title_info_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.wp-site-blocks .topic-title .bbpress-topic-meta',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.wp-site-blocks .topic-title .bbpress-topic-meta a:hover',
'property' => 'color',
'pattern' => '$',
'key' => 'hover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Link Hover Color', 'kadence' ),
'palette' => true,
),
),
),
),
'topic_title_info_font' => array(
'control_type' => 'kadence_typography_control',
'section' => 'topic_layout_design',
'label' => esc_html__( 'Meta Font', 'kadence' ),
'default' => kadence()->default( 'topic_title_info_font' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => '.topic-title .bbpress-topic-meta',
'property' => 'font',
'key' => 'typography',
),
),
'input_attrs' => array(
'id' => 'topic_title_info_font',
'options' => 'no-color',
),
),
'topic_title_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'topic_layout_design',
'label' => esc_html__( 'Forum Above Area Background', 'kadence' ),
'default' => kadence()->default( 'topic_title_background' ),
'context' => array(
array(
'setting' => 'topic_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'topic_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => '#inner-wrap .topic-hero-section .entry-hero-container-inner',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Topic Title Background', 'kadence' ),
),
),
'topic_title_overlay_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'topic_layout_design',
'label' => esc_html__( 'Background Overlay Color', 'kadence' ),
'default' => kadence()->default( 'topic_title_overlay_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.topic-hero-section .hero-section-overlay',
'property' => 'background',
'pattern' => '$',
'key' => 'color',
),
),
'context' => array(
array(
'setting' => 'topic_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'topic_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Overlay Color', 'kadence' ),
'palette' => true,
),
),
'allowGradient' => true,
),
),
'topic_title_border' => array(
'control_type' => 'kadence_borders_control',
'section' => 'topic_layout_design',
'label' => esc_html__( 'Border', 'kadence' ),
'default' => kadence()->default( 'topic_title_border' ),
'context' => array(
array(
'setting' => 'topic_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'topic_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'settings' => array(
'border_top' => 'topic_title_top_border',
'border_bottom' => 'topic_title_bottom_border',
),
'live_method' => array(
'topic_title_top_border' => array(
array(
'type' => 'css_border',
'selector' => '.topic-hero-section .entry-hero-container-inner',
'pattern' => '$',
'property' => 'border-top',
'key' => 'border',
),
),
'topic_title_bottom_border' => array(
array(
'type' => 'css_border',
'selector' => '.topic-hero-section .entry-hero-container-inner',
'property' => 'border-bottom',
'pattern' => '$',
'key' => 'border',
),
),
),
),
'info_topic_layout' => array(
'control_type' => 'kadence_title_control',
'section' => 'topic_layout',
'priority' => 10,
'label' => esc_html__( 'Topic Layout', 'kadence' ),
'settings' => false,
),
'info_topic_layout_design' => array(
'control_type' => 'kadence_title_control',
'section' => 'topic_layout_design',
'priority' => 10,
'label' => esc_html__( 'Topic Layout', 'kadence' ),
'settings' => false,
),
'topic_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'topic_layout',
'label' => esc_html__( 'Topic Layout', 'kadence' ),
'transport' => 'refresh',
'priority' => 10,
'default' => kadence()->default( 'topic_layout' ),
'input_attrs' => array(
'layout' => array(
'normal' => array(
'tooltip' => __( 'Normal', 'kadence' ),
'icon' => 'normal',
),
'narrow' => array(
'tooltip' => __( 'Narrow', 'kadence' ),
'icon' => 'narrow',
),
'fullwidth' => array(
'tooltip' => __( 'Fullwidth', 'kadence' ),
'icon' => 'fullwidth',
),
'left' => array(
'tooltip' => __( 'Left Sidebar', 'kadence' ),
'icon' => 'leftsidebar',
),
'right' => array(
'tooltip' => __( 'Right Sidebar', 'kadence' ),
'icon' => 'rightsidebar',
),
),
'responsive' => false,
'class' => 'kadence-three-col',
),
),
'topic_sidebar_id' => array(
'control_type' => 'kadence_select_control',
'section' => 'topic_layout',
'label' => esc_html__( 'Topic Default Sidebar', 'kadence' ),
'transport' => 'refresh',
'priority' => 10,
'default' => kadence()->default( 'topic_sidebar_id' ),
'input_attrs' => array(
'options' => kadence()->sidebar_options(),
),
),
'topic_content_style' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'topic_layout',
'label' => esc_html__( 'Content Style', 'kadence' ),
'priority' => 10,
'default' => kadence()->default( 'topic_content_style' ),
'live_method' => array(
array(
'type' => 'class',
'selector' => 'body.single-topic',
'pattern' => 'content-style-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'boxed' => array(
'tooltip' => __( 'Boxed', 'kadence' ),
'icon' => 'boxed',
),
'unboxed' => array(
'tooltip' => __( 'Unboxed', 'kadence' ),
'icon' => 'narrow',
),
),
'responsive' => false,
'class' => 'kadence-two-col',
),
),
'topic_vertical_padding' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'topic_layout',
'label' => esc_html__( 'Content Vertical Padding', 'kadence' ),
'priority' => 10,
'default' => kadence()->default( 'topic_vertical_padding' ),
'live_method' => array(
array(
'type' => 'class',
'selector' => 'body.single-forum',
'pattern' => 'content-vertical-padding-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'show' => array(
'name' => __( 'Enable', 'kadence' ),
),
'hide' => array(
'name' => __( 'Disable', 'kadence' ),
),
'top' => array(
'name' => __( 'Top Only', 'kadence' ),
),
'bottom' => array(
'name' => __( 'Bottom Only', 'kadence' ),
),
),
'responsive' => false,
'class' => 'kadence-two-grid',
),
),
'topic_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'topic_layout_design',
'priority' => 20,
'label' => esc_html__( 'Site Background', 'kadence' ),
'default' => kadence()->default( 'topic_background' ),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => 'body.single-topic',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Topic Background', 'kadence' ),
),
),
'topic_content_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'topic_layout_design',
'priority' => 20,
'label' => esc_html__( 'Content Background', 'kadence' ),
'default' => kadence()->default( 'topic_content_background' ),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => 'body.single-topic .content-bg, body.single-topic.content-style-unboxed .site',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Topic Content Background', 'kadence' ),
),
),
)
);

View File

@@ -0,0 +1,913 @@
<?php
/**
* Header Top Row Options
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
$kadence_trans_settings = array(
'transparent_header_tabs' => array(
'control_type' => 'kadence_tab_control',
'section' => 'transparent_header',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'transparent_header',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'transparent_header_design',
),
'active' => 'general',
),
),
'transparent_header_tabs_design' => array(
'control_type' => 'kadence_tab_control',
'section' => 'transparent_header_design',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'transparent_header',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'transparent_header_design',
),
'active' => 'design',
),
),
'transparent_header_enable' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'transparent_header',
'priority' => 5,
'default' => kadence()->default( 'transparent_header_enable' ),
'label' => esc_html__( 'Enable Transparent Header?', 'kadence' ),
'transport' => 'refresh',
),
'transparent_header_archive' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'transparent_header',
'priority' => 5,
'default' => kadence()->default( 'transparent_header_archive' ),
'label' => esc_html__( 'Disable Search and Archives?', 'kadence' ),
'transport' => 'refresh',
'context' => array(
array(
'setting' => 'transparent_header_enable',
'operator' => '=',
'value' => true,
),
),
),
'transparent_header_page' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'transparent_header',
'priority' => 5,
'default' => kadence()->default( 'transparent_header_page' ),
'label' => esc_html__( 'Disable on Pages?', 'kadence' ),
'transport' => 'refresh',
'context' => array(
array(
'setting' => 'transparent_header_enable',
'operator' => '=',
'value' => true,
),
),
),
'transparent_header_post' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'transparent_header',
'priority' => 5,
'default' => kadence()->default( 'transparent_header_post' ),
'label' => esc_html__( 'Disable on Posts?', 'kadence' ),
'transport' => 'refresh',
'context' => array(
array(
'setting' => 'transparent_header_enable',
'operator' => '=',
'value' => true,
),
),
),
'transparent_header_device' => array(
'control_type' => 'kadence_check_icon_control',
'section' => 'transparent_header',
'priority' => 10,
'transport' => 'refresh',
'default' => kadence()->default( 'transparent_header_device' ),
'label' => esc_html__( 'Enable for:', 'kadence' ),
'context' => array(
array(
'setting' => 'transparent_header_enable',
'operator' => '=',
'value' => true,
),
),
'input_attrs' => array(
'options' => array(
'desktop' => array(
'name' => __( 'Desktop', 'kadence' ),
'icon' => 'desktop',
),
'mobile' => array(
'name' => __( 'Mobile', 'kadence' ),
'icon' => 'smartphone',
),
),
),
),
'transparent_header_custom_logo' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'transparent_header',
'transport' => 'refresh',
'priority' => 12,
'default' => kadence()->default( 'transparent_header_custom_logo' ),
'label' => esc_html__( 'Different Logo for Transparent Header?', 'kadence' ),
'context' => array(
array(
'setting' => 'logo_layout',
'operator' => 'sub_object_contains',
'sub_key' => 'include',
'responsive' => true,
'value' => 'logo',
),
array(
'setting' => 'transparent_header_enable',
'operator' => '=',
'value' => true,
),
),
),
'transparent_header_logo' => array(
'control_type' => 'media',
'section' => 'transparent_header',
'transport' => 'refresh',
'priority' => 12,
'mime_type' => 'image',
'default' => '',
'label' => esc_html__( 'Transparent Header Logo', 'kadence' ),
'context' => array(
array(
'setting' => 'logo_layout',
'operator' => 'sub_object_contains',
'sub_key' => 'include',
'responsive' => true,
'value' => 'logo',
),
array(
'setting' => 'transparent_header_enable',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'transparent_header_custom_logo',
'operator' => '=',
'value' => true,
),
),
),
'transparent_header_logo_width' => array(
'control_type' => 'kadence_range_control',
'section' => 'transparent_header',
'priority' => 12,
'label' => esc_html__( 'Logo Max Width', 'kadence' ),
'description' => esc_html__( 'Define the maxium width for the logo', 'kadence' ),
'context' => array(
array(
'setting' => 'logo_layout',
'operator' => 'sub_object_contains',
'sub_key' => 'include',
'responsive' => true,
'value' => 'logo',
),
array(
'setting' => 'transparent_header_enable',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'transparent_header_custom_logo',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'transparent_header_logo',
'operator' => '!empty',
'value' => '',
),
),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.transparent-header #main-header .site-branding img',
'property' => 'max-width',
'pattern' => '$',
'key' => 'size',
),
),
'default' => kadence()->default( 'transparent_header_logo_width' ),
'input_attrs' => array(
'min' => array(
'px' => 10,
'em' => 1,
'rem' => 1,
'vw' => 2,
'%' => 2,
),
'max' => array(
'px' => 800,
'em' => 12,
'rem' => 12,
'vw' => 80,
'%' => 80,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
'vw' => 1,
'%' => 1,
),
'units' => array( 'px', 'em', 'rem', 'vw', '%' ),
),
),
'transparent_header_custom_mobile_logo' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'transparent_header',
'transport' => 'refresh',
'priority' => 12,
'default' => kadence()->default( 'use_mobile_logo' ),
'label' => esc_html__( 'Different Logo for Mobile?', 'kadence' ),
'context' => array(
array(
'setting' => 'logo_layout',
'operator' => 'sub_object_contains',
'sub_key' => 'include',
'responsive' => true,
'value' => 'logo',
),
array(
'setting' => 'transparent_header_enable',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'transparent_header_custom_logo',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'transparent_header_logo',
'operator' => '!empty',
'value' => '',
),
array(
'setting' => '__device',
'operator' => 'in',
'value' => array( 'tablet', 'mobile' ),
),
),
),
'transparent_header_mobile_logo' => array(
'control_type' => 'media',
'section' => 'transparent_header',
'transport' => 'refresh',
'priority' => 12,
'mime_type' => 'image',
'default' => '',
'label' => esc_html__( 'Mobile Logo', 'kadence' ),
'context' => array(
array(
'setting' => 'logo_layout',
'operator' => 'sub_object_contains',
'sub_key' => 'include',
'responsive' => true,
'value' => 'logo',
),
array(
'setting' => 'transparent_header_enable',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'transparent_header_custom_mobile_logo',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'transparent_header_custom_logo',
'operator' => '=',
'value' => true,
),
array(
'setting' => '__device',
'operator' => 'in',
'value' => array( 'tablet', 'mobile' ),
),
),
),
'transparent_logo_icon_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'transparent_header_design',
'label' => esc_html__( 'Logo Icon Color', 'kadence' ),
'default' => kadence()->default( 'transparent_logo_icon_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.transparent-header #main-header .site-branding .logo-icon',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
),
),
),
'transparent_header_site_title_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'transparent_header_design',
'label' => esc_html__( 'Site Title Color', 'kadence' ),
'default' => kadence()->default( 'transparent_header_site_title_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.transparent-header #main-header .site-branding .site-title, .transparent-header #main-header .site-branding .site-description, .mobile-transparent-header #mobile-header .site-branding .site-title, .mobile-transparent-header #mobile-header .site-branding .site-description',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
),
),
),
'transparent_header_navigation_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'transparent_header_design',
'label' => esc_html__( 'Navigation Colors', 'kadence' ),
'default' => kadence()->default( 'transparent_header_navigation_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.transparent-header .header-navigation .header-menu-container > ul > li.menu-item > a, .transparent-header .mobile-toggle-open-container .menu-toggle-open, .transparent-header .search-toggle-open-container .search-toggle-open',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.transparent-header .header-navigation .header-menu-container > ul > li.menu-item > a:hover',
'property' => 'color',
'pattern' => '$',
'key' => 'hover',
),
array(
'type' => 'css',
'selector' => '.transparent-header .header-navigation .header-menu-container > ul > li.menu-item.current-menu-item > a, .transparent-header .header-navigation .header-menu-container > ul > li.menu-item.current_page_item > a',
'property' => 'color',
'pattern' => '$',
'key' => 'active',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Hover Color', 'kadence' ),
'palette' => true,
),
'active' => array(
'tooltip' => __( 'Active Color', 'kadence' ),
'palette' => true,
),
),
),
),
'transparent_header_navigation_background' => array(
'control_type' => 'kadence_color_control',
'section' => 'transparent_header_design',
'label' => esc_html__( 'Navigation Items Background', 'kadence' ),
'default' => kadence()->default( 'transparent_header_navigation_background' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.transparent-header .header-menu-container > ul > li.menu-item > a',
'property' => 'background',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.transparent-header .header-menu-container > ul > li.menu-item > a:hover',
'property' => 'background',
'pattern' => '$',
'key' => 'hover',
),
array(
'type' => 'css',
'selector' => '.transparent-header .header-menu-container > ul > li.menu-item.current-menu-item > a, .transparent-header .header-menu-container > ul > li.menu-item.current_page_item > a',
'property' => 'background',
'pattern' => '$',
'key' => 'active',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Background', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Hover Background', 'kadence' ),
'palette' => true,
),
'active' => array(
'tooltip' => __( 'Active Background', 'kadence' ),
'palette' => true,
),
),
),
),
'transparent_header_button_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'transparent_header_design',
'label' => esc_html__( 'Button Colors', 'kadence' ),
'default' => kadence()->default( 'transparent_header_button_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.transparent-header #main-header .header-button, .mobile-transparent-header .mobile-header-button-wrap .mobile-header-button',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.transparent-header #main-header .header-button:hover, .mobile-transparent-header .mobile-header-button-wrap .mobile-header-button:hover',
'property' => 'color',
'pattern' => '$',
'key' => 'hover',
),
array(
'type' => 'css',
'selector' => '.transparent-header #main-header .header-button, .mobile-transparent-header .mobile-header-button-wrap .mobile-header-button',
'property' => 'background',
'pattern' => '$',
'key' => 'background',
),
array(
'type' => 'css',
'selector' => '.transparent-header #main-header .header-button:hover, .mobile-transparent-header .mobile-header-button-wrap .mobile-header-button:hover',
'property' => 'background',
'pattern' => '$',
'key' => 'backgroundHover',
),
array(
'type' => 'css',
'selector' => '.transparent-header #main-header .header-button, .mobile-transparent-header .mobile-header-button-wrap .mobile-header-button',
'property' => 'border-color',
'pattern' => '$',
'key' => 'border',
),
array(
'type' => 'css',
'selector' => '.transparent-header #main-header .header-button:hover, .mobile-transparent-header .mobile-header-button-wrap .mobile-header-button:hover',
'property' => 'border-color',
'pattern' => '$',
'key' => 'borderHover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Hover Color', 'kadence' ),
'palette' => true,
),
'background' => array(
'tooltip' => __( 'Background', 'kadence' ),
'palette' => true,
),
'backgroundHover' => array(
'tooltip' => __( 'Background Hover', 'kadence' ),
'palette' => true,
),
'border' => array(
'tooltip' => __( 'Border', 'kadence' ),
'palette' => true,
),
'borderHover' => array(
'tooltip' => __( 'Border Hover', 'kadence' ),
'palette' => true,
),
),
),
),
'transparent_header_social_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'transparent_header_design',
'label' => esc_html__( 'Social Colors', 'kadence' ),
'default' => kadence()->default( 'transparent_header_social_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.transparent-header .header-social-wrap a.social-button, .mobile-transparent-header #mobile-header .header-mobile-social-wrap a.social-button',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.transparent-header .header-social-wrap a.social-button:hover, .mobile-transparent-header #mobile-header .header-mobile-social-wrap a.social-button:hover',
'property' => 'color',
'pattern' => '$',
'key' => 'hover',
),
array(
'type' => 'css',
'selector' => '.transparent-header .header-social-wrap a.social-button, .mobile-transparent-header #mobile-header .header-mobile-social-wrap a.social-button',
'property' => 'background',
'pattern' => '$',
'key' => 'background',
),
array(
'type' => 'css',
'selector' => '.transparent-header .header-social-wrap a.social-button:hover, .mobile-transparent-header #mobile-header .header-mobile-social-wrap a.social-button:hover',
'property' => 'background',
'pattern' => '$',
'key' => 'backgroundHover',
),
array(
'type' => 'css',
'selector' => '.transparent-header .header-social-wrap a.social-button, .mobile-transparent-header #mobile-header .header-mobile-social-wrap a.social-button',
'property' => 'border-color',
'pattern' => '$',
'key' => 'border',
),
array(
'type' => 'css',
'selector' => '.transparent-header .header-social-wrap a.social-button:hover, .mobile-transparent-header #mobile-header .header-mobile-social-wrap a.social-button:hover',
'property' => 'border-color',
'pattern' => '$',
'key' => 'borderHover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Hover Color', 'kadence' ),
'palette' => true,
),
'background' => array(
'tooltip' => __( 'Background', 'kadence' ),
'palette' => true,
),
'backgroundHover' => array(
'tooltip' => __( 'Background Hover', 'kadence' ),
'palette' => true,
),
'border' => array(
'tooltip' => __( 'Border', 'kadence' ),
'palette' => true,
),
'borderHover' => array(
'tooltip' => __( 'Border Hover', 'kadence' ),
'palette' => true,
),
),
),
),
'transparent_header_html_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'transparent_header_design',
'label' => esc_html__( 'HTML Colors', 'kadence' ),
'default' => kadence()->default( 'transparent_header_html_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.transparent-header #main-header .header-html,.mobile-transparent-header .mobile-html',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.transparent-header #main-header .header-html a, .mobile-transparent-header .mobile-html a',
'property' => 'color',
'pattern' => '$',
'key' => 'link',
),
array(
'type' => 'css',
'selector' => '.transparent-header #main-header .header-html a:hover, .mobile-transparent-header .mobile-html a:hover',
'property' => 'color',
'pattern' => '$',
'key' => 'hover',
),
),
'context' => array(
array(
'setting' => '__device',
'operator' => '==',
'value' => 'desktop',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Color', 'kadence' ),
'palette' => true,
),
'link' => array(
'tooltip' => __( 'Link Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Link Hover', 'kadence' ),
'palette' => true,
),
),
),
),
'transparent_header_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'transparent_header_design',
'label' => esc_html__( 'Transparent Header Background', 'kadence' ),
'default' => kadence()->default( 'transparent_header_background' ),
'context' => array(
array(
'setting' => 'transparent_header_enable',
'operator' => '=',
'value' => true,
),
),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => array(
'desktop' => '.transparent-header #wrapper #masthead',
'tablet' => '.mobile-transparent-header #wrapper #masthead',
'mobile' => '.mobile-transparent-header #wrapper #masthead',
),
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Transparent Header Background', 'kadence' ),
),
),
'transparent_header_bottom_border' => array(
'control_type' => 'kadence_border_control',
'section' => 'transparent_header_design',
'label' => esc_html__( 'Bottom Border', 'kadence' ),
'default' => kadence()->default( 'transparent_header_bottom_border' ),
'context' => array(
array(
'setting' => 'transparent_header_enable',
'operator' => '=',
'value' => true,
),
),
'live_method' => array(
array(
'type' => 'css_border',
'selector' => array(
'desktop' => '.transparent-header #wrapper #masthead',
'tablet' => '.mobile-transparent-header #wrapper #masthead',
'mobile' => '.mobile-transparent-header #wrapper #masthead',
),
'property' => 'border-bottom',
'pattern' => '$',
'key' => 'border',
),
),
),
);
if ( class_exists( 'woocommerce' ) ) {
$kadence_trans_settings = array_merge(
$kadence_trans_settings,
array(
'transparent_header_product' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'transparent_header',
'priority' => 5,
'default' => kadence()->default( 'transparent_header_product' ),
'label' => esc_html__( 'Disable on Products?', 'kadence' ),
'transport' => 'refresh',
'context' => array(
array(
'setting' => 'transparent_header_enable',
'operator' => '=',
'value' => true,
),
),
),
'transparent_header_cart_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'transparent_header_design',
'label' => esc_html__( 'Cart Colors', 'kadence' ),
'default' => kadence()->default( 'transparent_header_cart_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.transparent-header #main-header .header-cart-wrap .header-cart-button, .mobile-transparent-header #mobile-header .header-mobile-cart-wrap .header-cart-button',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.transparent-header #main-header .header-cart-wrap .header-cart-button:hover, .mobile-transparent-header #mobile-header .header-mobile-cart-wrap .header-cart-button:hover',
'property' => 'color',
'pattern' => '$',
'key' => 'hover',
),
array(
'type' => 'css',
'selector' => '.transparent-header #main-header .header-cart-wrap .header-cart-button, .mobile-transparent-header #mobile-header .header-mobile-cart-wrap .header-cart-button',
'property' => 'background',
'pattern' => '$',
'key' => 'background',
),
array(
'type' => 'css',
'selector' => '.transparent-header #main-header .header-cart-wrap .header-cart-button:hover, .mobile-transparent-header #mobile-header .header-mobile-cart-wrap .header-cart-button:hover',
'property' => 'background',
'pattern' => '$',
'key' => 'backgroundHover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Hover Color', 'kadence' ),
'palette' => true,
),
'background' => array(
'tooltip' => __( 'Background', 'kadence' ),
'palette' => true,
),
'backgroundHover' => array(
'tooltip' => __( 'Background Hover', 'kadence' ),
'palette' => true,
),
),
),
),
'transparent_header_cart_total_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'transparent_header_design',
'label' => esc_html__( 'Cart Total Colors', 'kadence' ),
'default' => kadence()->default( 'transparent_header_cart_total_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.transparent-header #main-header .header-cart-wrap .header-cart-button .header-cart-total, .mobile-transparent-header #mobile-header .header-mobile-cart-wrap .header-cart-button .header-cart-total',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.transparent-header #main-header .header-cart-wrap .header-cart-button:hover .header-cart-total, .mobile-transparent-header #mobile-header .header-mobile-cart-wrap .header-cart-button:hover .header-cart-total',
'property' => 'color',
'pattern' => '$',
'key' => 'hover',
),
array(
'type' => 'css',
'selector' => '.transparent-header #main-header .header-cart-wrap .header-cart-button .header-cart-total, .mobile-transparent-header #mobile-header .header-mobile-cart-wrap .header-cart-button .header-cart-total',
'property' => 'background',
'pattern' => '$',
'key' => 'background',
),
array(
'type' => 'css',
'selector' => '.transparent-header #main-header .header-cart-wrap .header-cart-button:hover .header-cart-total, .mobile-transparent-header #mobile-header .header-mobile-cart-wrap .header-cart-button:hover .header-cart-total',
'property' => 'background',
'pattern' => '$',
'key' => 'backgroundHover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Hover Color', 'kadence' ),
'palette' => true,
),
'background' => array(
'tooltip' => __( 'Background', 'kadence' ),
'palette' => true,
),
'backgroundHover' => array(
'tooltip' => __( 'Background Hover', 'kadence' ),
'palette' => true,
),
),
),
),
)
);
}
$kadence_trans_post_types = kadence()->get_post_types_objects();
$kadence_trans_extras_post_types = array();
$kadence_trans_add_extras = false;
foreach ( $kadence_trans_post_types as $post_type_item ) {
$post_type_name = $post_type_item->name;
$post_type_label = $post_type_item->label;
$ignore_type = kadence()->get_transparent_post_types_to_ignore();
if ( ! in_array( $post_type_name, $ignore_type, true ) ) {
$kadence_trans_add_extras = true;
$kadence_trans_extras_post_types[ 'transparent_header_' . $post_type_name ] = array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'transparent_header',
'priority' => 5,
'default' => true,
'label' => esc_html__( 'Disable on', 'kadence' ) . ' ' . $post_type_label . '?',
'transport' => 'refresh',
'context' => array(
array(
'setting' => 'transparent_header_enable',
'operator' => '=',
'value' => true,
),
),
);
if ( 'tribe_events' === $post_type_name ) {
$kadence_trans_extras_post_types[ 'transparent_header_tribe_events_archive' ] = array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'transparent_header',
'priority' => 5,
'default' => true,
'label' => esc_html__( 'Disable on Events Archive?', 'kadence' ),
'transport' => 'refresh',
'context' => array(
array(
'setting' => 'transparent_header_enable',
'operator' => '=',
'value' => true,
),
),
);
}
}
}
if ( $kadence_trans_add_extras ) {
$kadence_trans_settings = array_merge(
$kadence_trans_settings,
$kadence_trans_extras_post_types
);
}
Theme_Customizer::add_settings( $kadence_trans_settings );

View File

@@ -0,0 +1,515 @@
<?php
/**
* Tutor Course Layout
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
$settings = array(
'courses_archive_layout_tabs' => array(
'control_type' => 'kadence_tab_control',
'section' => 'courses_archive_layout',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'courses_archive_layout',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'courses_archive_layout_design',
),
'active' => 'general',
),
),
'courses_archive_layout_tabs_design' => array(
'control_type' => 'kadence_tab_control',
'section' => 'courses_archive_layout_design',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'courses_archive_layout',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'courses_archive_layout_design',
),
'active' => 'design',
),
),
'info_courses_archive_title' => array(
'control_type' => 'kadence_title_control',
'section' => 'courses_archive_layout',
'priority' => 2,
'label' => esc_html__( 'Archive Title', 'kadence' ),
'settings' => false,
),
'info_courses_archive_title_design' => array(
'control_type' => 'kadence_title_control',
'section' => 'courses_archive_layout_design',
'priority' => 2,
'label' => esc_html__( 'Archive Title', 'kadence' ),
'settings' => false,
),
'courses_archive_title' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'courses_archive_layout',
'priority' => 3,
'default' => kadence()->default( 'courses_archive_title' ),
'label' => esc_html__( 'Show Archive Title?', 'kadence' ),
'transport' => 'refresh',
),
'courses_archive_title_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'courses_archive_layout',
'label' => esc_html__( 'Archive Title Layout', 'kadence' ),
'transport' => 'refresh',
'priority' => 4,
'default' => kadence()->default( 'courses_archive_title_layout' ),
'context' => array(
array(
'setting' => 'courses_archive_title',
'operator' => '=',
'value' => true,
),
),
'input_attrs' => array(
'layout' => array(
'normal' => array(
'tooltip' => __( 'In Content', 'kadence' ),
'icon' => 'incontent',
),
'above' => array(
'tooltip' => __( 'Above Content', 'kadence' ),
'icon' => 'abovecontent',
),
),
'responsive' => false,
'class' => 'kadence-two-col',
),
),
'courses_archive_title_inner_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'courses_archive_layout',
'priority' => 4,
'default' => kadence()->default( 'courses_archive_title_inner_layout' ),
'label' => esc_html__( 'Container Width', 'kadence' ),
'context' => array(
array(
'setting' => 'courses_archive_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'courses_archive_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.course-archive-hero-section',
'pattern' => 'entry-hero-layout-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'standard' => array(
'tooltip' => __( 'Background Fullwidth, Content Contained', 'kadence' ),
'name' => __( 'Standard', 'kadence' ),
'icon' => '',
),
'fullwidth' => array(
'tooltip' => __( 'Background & Content Fullwidth', 'kadence' ),
'name' => __( 'Fullwidth', 'kadence' ),
'icon' => '',
),
'contained' => array(
'tooltip' => __( 'Background & Content Contained', 'kadence' ),
'name' => __( 'Contained', 'kadence' ),
'icon' => '',
),
),
'responsive' => false,
),
),
'courses_archive_title_align' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'courses_archive_layout',
'label' => esc_html__( 'Course Title Align', 'kadence' ),
'priority' => 4,
'default' => kadence()->default( 'courses_archive_title_align' ),
'context' => array(
array(
'setting' => 'courses_archive_title',
'operator' => '=',
'value' => true,
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.course-archive-title',
'pattern' => array(
'desktop' => 'title-align-$',
'tablet' => 'title-tablet-align-$',
'mobile' => 'title-mobile-align-$',
),
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'left' => array(
'tooltip' => __( 'Left Align Title', 'kadence' ),
'dashicon' => 'editor-alignleft',
),
'center' => array(
'tooltip' => __( 'Center Align Title', 'kadence' ),
'dashicon' => 'editor-aligncenter',
),
'right' => array(
'tooltip' => __( 'Right Align Title', 'kadence' ),
'dashicon' => 'editor-alignright',
),
),
'responsive' => true,
),
),
'courses_archive_title_height' => array(
'control_type' => 'kadence_range_control',
'section' => 'courses_archive_layout',
'priority' => 5,
'label' => esc_html__( 'Container Min Height', 'kadence' ),
'context' => array(
array(
'setting' => 'courses_archive_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'courses_archive_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#inner-wrap .course-archive-hero-section .entry-header',
'property' => 'min-height',
'pattern' => '$',
'key' => 'size',
),
),
'default' => kadence()->default( 'courses_archive_title_height' ),
'input_attrs' => array(
'min' => array(
'px' => 10,
'em' => 1,
'rem' => 1,
'vh' => 2,
),
'max' => array(
'px' => 800,
'em' => 12,
'rem' => 12,
'vh' => 100,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
'vh' => 1,
),
'units' => array( 'px', 'em', 'rem', 'vh' ),
),
),
'courses_archive_title_elements' => array(
'control_type' => 'kadence_sorter_control',
'section' => 'courses_archive_layout',
'priority' => 6,
'default' => kadence()->default( 'courses_archive_title_elements' ),
'label' => esc_html__( 'Title Elements', 'kadence' ),
'transport' => 'refresh',
'settings' => array(
'elements' => 'courses_archive_title_elements',
'title' => 'courses_archive_title_element_title',
'breadcrumb' => 'courses_archive_title_element_breadcrumb',
),
),
'courses_archive_title_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'courses_archive_layout_design',
'label' => esc_html__( 'Title Color', 'kadence' ),
'default' => kadence()->default( 'courses_archive_title_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.courses-archive-title h1',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Color', 'kadence' ),
'palette' => true,
),
),
),
),
'courses_archive_title_breadcrumb_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'courses_archive_layout_design',
'label' => esc_html__( 'Breadcrumb Colors', 'kadence' ),
'default' => kadence()->default( 'courses_archive_title_breadcrumb_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.courses-archive-title .kadence-breadcrumbs',
'property' => 'color',
'pattern' => '$',
'key' => 'color',
),
array(
'type' => 'css',
'selector' => '.courses-archive-title .kadence-breadcrumbs a:hover',
'property' => 'color',
'pattern' => '$',
'key' => 'hover',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Initial Color', 'kadence' ),
'palette' => true,
),
'hover' => array(
'tooltip' => __( 'Link Hover Color', 'kadence' ),
'palette' => true,
),
),
),
),
'courses_archive_title_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'courses_archive_layout_design',
'label' => esc_html__( 'Archive Title Background', 'kadence' ),
'default' => kadence()->default( 'courses_archive_title_background' ),
'context' => array(
array(
'setting' => 'courses_archive_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'courses_archive_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => '#inner-wrap .courses-archive-hero-section .entry-hero-container-inner',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Course Archive Title Background', 'kadence' ),
),
),
'courses_archive_title_overlay_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'courses_archive_layout_design',
'label' => esc_html__( 'Background Overlay Color', 'kadence' ),
'default' => kadence()->default( 'courses_archive_title_overlay_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.courses-archive-hero-section .hero-section-overlay',
'property' => 'background',
'pattern' => '$',
'key' => 'color',
),
),
'context' => array(
array(
'setting' => 'courses_archive_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'courses_archive_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Overlay Color', 'kadence' ),
'palette' => true,
),
),
'allowGradient' => true,
),
),
'courses_archive_title_border' => array(
'control_type' => 'kadence_borders_control',
'section' => 'courses_archive_layout_design',
'label' => esc_html__( 'Border', 'kadence' ),
'default' => kadence()->default( 'courses_archive_title_border' ),
'context' => array(
array(
'setting' => 'courses_archive_title',
'operator' => '=',
'value' => true,
),
array(
'setting' => 'courses_archive_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'settings' => array(
'border_top' => 'courses_archive_title_top_border',
'border_bottom' => 'courses_archive_title_bottom_border',
),
'live_method' => array(
'courses_archive_title_top_border' => array(
array(
'type' => 'css_border',
'selector' => '.courses-archive-hero-section .entry-hero-container-inner',
'pattern' => '$',
'property' => 'border-top',
'key' => 'border',
),
),
'courses_archive_title_bottom_border' => array(
array(
'type' => 'css_border',
'selector' => '.courses-archive-hero-section .entry-hero-container-inner',
'property' => 'border-bottom',
'pattern' => '$',
'key' => 'border',
),
),
),
),
'info_courses_archive_layout' => array(
'control_type' => 'kadence_title_control',
'section' => 'courses_archive_layout',
'priority' => 10,
'label' => esc_html__( 'Archive Layout', 'kadence' ),
'settings' => false,
),
'info_courses_archive_layout_design' => array(
'control_type' => 'kadence_title_control',
'section' => 'courses_archive_layout_design',
'priority' => 10,
'label' => esc_html__( 'Archive Layout', 'kadence' ),
'settings' => false,
),
'courses_archive_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'courses_archive_layout',
'label' => esc_html__( 'Archive Layout', 'kadence' ),
'transport' => 'refresh',
'priority' => 10,
'default' => kadence()->default( 'courses_archive_layout' ),
'input_attrs' => array(
'layout' => array(
'normal' => array(
'tooltip' => __( 'Normal', 'kadence' ),
'icon' => 'normal',
),
'narrow' => array(
'tooltip' => __( 'Narrow', 'kadence' ),
'icon' => 'narrow',
),
'fullwidth' => array(
'tooltip' => __( 'Fullwidth', 'kadence' ),
'icon' => 'fullwidth',
),
'left' => array(
'tooltip' => __( 'Left Sidebar', 'kadence' ),
'icon' => 'leftsidebar',
),
'right' => array(
'tooltip' => __( 'Right Sidebar', 'kadence' ),
'icon' => 'rightsidebar',
),
),
'class' => 'kadence-three-col',
'responsive' => false,
),
),
'courses_archive_sidebar_id' => array(
'control_type' => 'kadence_select_control',
'section' => 'courses_archive_layout',
'label' => esc_html__( 'Archive Default Sidebar', 'kadence' ),
'transport' => 'refresh',
'priority' => 10,
'default' => kadence()->default( 'courses_archive_sidebar_id' ),
'input_attrs' => array(
'options' => kadence()->sidebar_options(),
),
),
'courses_archive_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'courses_archive_layout_design',
'label' => esc_html__( 'Site Background', 'kadence' ),
'default' => kadence()->default( 'courses_archive_background' ),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => 'body.post-type-archive-courses, body.tax-courses_cat',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Course Archive Background', 'kadence' ),
),
),
'courses_archive_content_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'courses_archive_layout_design',
'label' => esc_html__( 'Content Background', 'kadence' ),
'default' => kadence()->default( 'courses_archive_content_background' ),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => 'body.post-type-archive-courses .content-bg, body.tax-courses_cat .content-bg, body.tax-courses_cat.content-style-unboxed .site, body.post-type-archive-courses.content-style-unboxed .site',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Archive Content Background', 'kadence' ),
),
),
);
Theme_Customizer::add_settings( $settings );

View File

@@ -0,0 +1,771 @@
<?php
/**
* Tutor Course Layout Options
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
$settings = array(
'courses_layout_tabs' => array(
'control_type' => 'kadence_tab_control',
'section' => 'courses_layout',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'courses_layout',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'courses_layout_design',
),
'active' => 'general',
),
),
'courses_layout_tabs_design' => array(
'control_type' => 'kadence_tab_control',
'section' => 'courses_layout_design',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'courses_layout',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'courses_layout_design',
),
'active' => 'design',
),
),
'info_course_title' => array(
'control_type' => 'kadence_title_control',
'section' => 'courses_layout',
'priority' => 2,
'label' => esc_html__( 'Course Title', 'kadence' ),
'settings' => false,
),
'info_course_title_design' => array(
'control_type' => 'kadence_title_control',
'section' => 'courses_layout_design',
'priority' => 2,
'label' => esc_html__( 'Course Title', 'kadence' ),
'settings' => false,
),
'courses_title_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'courses_layout',
'label' => esc_html__( 'Course Title Layout', 'kadence' ),
'transport' => 'refresh',
'priority' => 4,
'default' => kadence()->default( 'courses_title_layout' ),
'input_attrs' => array(
'layout' => array(
'normal' => array(
'tooltip' => __( 'In Content', 'kadence' ),
'icon' => 'incontent',
),
'above' => array(
'tooltip' => __( 'Above Content', 'kadence' ),
'icon' => 'abovecontent',
),
),
'responsive' => false,
'class' => 'kadence-two-col',
),
),
'courses_title_inner_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'courses_layout',
'priority' => 4,
'default' => kadence()->default( 'courses_title_inner_layout' ),
'label' => esc_html__( 'Title Container Width', 'kadence' ),
'context' => array(
array(
'setting' => 'courses_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => '.courses-hero-section',
'pattern' => 'entry-hero-layout-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'standard' => array(
'tooltip' => __( 'Background Fullwidth, Content Contained', 'kadence' ),
'name' => __( 'Standard', 'kadence' ),
'icon' => '',
),
'fullwidth' => array(
'tooltip' => __( 'Background & Content Fullwidth', 'kadence' ),
'name' => __( 'Fullwidth', 'kadence' ),
'icon' => '',
),
'contained' => array(
'tooltip' => __( 'Background & Content Contained', 'kadence' ),
'name' => __( 'Contained', 'kadence' ),
'icon' => '',
),
),
'responsive' => false,
),
),
// 'courses_title_align' => array(
// 'control_type' => 'kadence_radio_icon_control',
// 'section' => 'courses_layout',
// 'label' => esc_html__( 'Course Title Align', 'kadence' ),
// 'priority' => 4,
// 'default' => kadence()->default( 'courses_title_align' ),
// 'context' => array(
// array(
// 'setting' => 'courses_title_layout',
// 'operator' => '=',
// 'value' => 'above',
// ),
// ),
// 'live_method' => array(
// array(
// 'type' => 'class',
// 'selector' => '.courses-title',
// 'pattern' => array(
// 'desktop' => 'title-align-$',
// 'tablet' => 'title-tablet-align-$',
// 'mobile' => 'title-mobile-align-$',
// ),
// 'key' => '',
// ),
// ),
// 'input_attrs' => array(
// 'layout' => array(
// 'left' => array(
// 'tooltip' => __( 'Left Align Title', 'kadence' ),
// 'dashicon' => 'editor-alignleft',
// ),
// 'center' => array(
// 'tooltip' => __( 'Center Align Title', 'kadence' ),
// 'dashicon' => 'editor-aligncenter',
// ),
// 'right' => array(
// 'tooltip' => __( 'Right Align Title', 'kadence' ),
// 'dashicon' => 'editor-alignright',
// ),
// ),
// 'responsive' => true,
// ),
// ),
'courses_title_height' => array(
'control_type' => 'kadence_range_control',
'section' => 'courses_layout',
'priority' => 5,
'label' => esc_html__( 'Title Container Min Height', 'kadence' ),
'context' => array(
array(
'setting' => 'courses_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'live_method' => array(
array(
'type' => 'css',
'selector' => '#inner-wrap .courses-hero-section .entry-header',
'property' => 'min-height',
'pattern' => '$',
'key' => 'size',
),
),
'default' => kadence()->default( 'courses_title_height' ),
'input_attrs' => array(
'min' => array(
'px' => 10,
'em' => 1,
'rem' => 1,
'vh' => 2,
),
'max' => array(
'px' => 800,
'em' => 12,
'rem' => 12,
'vh' => 100,
),
'step' => array(
'px' => 1,
'em' => 0.01,
'rem' => 0.01,
'vh' => 1,
),
'units' => array( 'px', 'em', 'rem', 'vh' ),
),
),
'courses_enroll_overlay' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'courses_layout',
'default' => kadence()->default( 'courses_enroll_overlay' ),
'label' => esc_html__( 'Move sidebar up into header?', 'kadence' ),
'context' => array(
array(
'setting' => 'courses_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'live_method' => array(
array(
'type' => 'class',
'selector' => 'body.single-courses',
'pattern' => 'courses-sidebar-overlay-$',
'key' => '',
),
),
),
// 'courses_title_elements' => array(
// 'control_type' => 'kadence_sorter_control',
// 'section' => 'courses_layout',
// 'priority' => 6,
// 'default' => kadence()->default( 'courses_title_elements' ),
// 'label' => esc_html__( 'Title Elements', 'kadence' ),
// 'transport' => 'refresh',
// 'context' => array(
// array(
// 'setting' => 'courses_title_layout',
// 'operator' => '=',
// 'value' => 'above',
// ),
// ),
// 'settings' => array(
// 'elements' => 'courses_title_elements',
// 'title' => 'courses_title_element_title',
// 'breadcrumb' => 'courses_title_element_breadcrumb',
// ),
// 'input_attrs' => array(
// 'group' => 'courses_title_element',
// ),
// ),
'courses_title_font' => array(
'control_type' => 'kadence_typography_control',
'section' => 'courses_layout_design',
'label' => esc_html__( 'Course Title Font', 'kadence' ),
'default' => kadence()->default( 'course_title_font' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => '.tutor-single-course-lead-info h1.tutor-course-header-h1, .tutor-course-details-title.tutor-fs-4',
'property' => 'font',
'key' => 'typography',
),
),
'input_attrs' => array(
'id' => 'courses_title_font',
'headingInherit' => true,
),
),
// 'courses_title_breadcrumb_color' => array(
// 'control_type' => 'kadence_color_control',
// 'section' => 'courses_layout_design',
// 'label' => esc_html__( 'Breadcrumb Colors', 'kadence' ),
// 'default' => kadence()->default( 'courses_title_breadcrumb_color' ),
// 'live_method' => array(
// array(
// 'type' => 'css',
// 'selector' => '.course-title .kadence-breadcrumbs',
// 'property' => 'color',
// 'pattern' => '$',
// 'key' => 'color',
// ),
// array(
// 'type' => 'css',
// 'selector' => '.course-title .kadence-breadcrumbs a:hover',
// 'property' => 'color',
// 'pattern' => '$',
// 'key' => 'hover',
// ),
// ),
// 'input_attrs' => array(
// 'colors' => array(
// 'color' => array(
// 'tooltip' => __( 'Initial Color', 'kadence' ),
// 'palette' => true,
// ),
// 'hover' => array(
// 'tooltip' => __( 'Link Hover Color', 'kadence' ),
// 'palette' => true,
// ),
// ),
// ),
// ),
// 'courses_title_breadcrumb_font' => array(
// 'control_type' => 'kadence_typography_control',
// 'section' => 'courses_layout_design',
// 'label' => esc_html__( 'Breadcrumb Font', 'kadence' ),
// 'default' => kadence()->default( 'course_title_breadcrumb_font' ),
// 'live_method' => array(
// array(
// 'type' => 'css_typography',
// 'selector' => '.courses-title .kadence-breadcrumbs',
// 'property' => 'font',
// 'key' => 'typography',
// ),
// ),
// 'input_attrs' => array(
// 'id' => 'course_title_breadcrumb_font',
// 'options' => 'no-color',
// ),
// ),
'courses_title_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'courses_layout_design',
'label' => esc_html__( 'Course Above Area Background', 'kadence' ),
'default' => kadence()->default( 'courses_title_background' ),
'context' => array(
array(
'setting' => 'courses_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => '#inner-wrap .courses-hero-section .entry-hero-container-inner',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Course Title Background', 'kadence' ),
),
),
'courses_title_featured_image' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'courses_layout_design',
'default' => kadence()->default( 'courses_title_featured_image' ),
'label' => esc_html__( 'Use Featured Image for Background?', 'kadence' ),
'transport' => 'refresh',
'context' => array(
array(
'setting' => 'courses_title_layout',
'operator' => '=',
'value' => 'above',
),
),
),
'courses_title_overlay_color' => array(
'control_type' => 'kadence_color_control',
'section' => 'courses_layout_design',
'label' => esc_html__( 'Background Overlay Color', 'kadence' ),
'default' => kadence()->default( 'courses_title_overlay_color' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.courses-hero-section .hero-section-overlay',
'property' => 'background',
'pattern' => '$',
'key' => 'color',
),
),
'context' => array(
array(
'setting' => 'courses_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Overlay Color', 'kadence' ),
'palette' => true,
),
),
'allowGradient' => true,
),
),
'courses_title_border' => array(
'control_type' => 'kadence_borders_control',
'section' => 'courses_layout_design',
'label' => esc_html__( 'Border', 'kadence' ),
'default' => kadence()->default( 'courses_title_border' ),
'context' => array(
array(
'setting' => 'courses_title_layout',
'operator' => '=',
'value' => 'above',
),
),
'settings' => array(
'border_top' => 'course_title_top_border',
'border_bottom' => 'course_title_bottom_border',
),
'live_method' => array(
'course_title_top_border' => array(
array(
'type' => 'css_border',
'selector' => '.courses-hero-section .entry-hero-container-inner',
'pattern' => '$',
'property' => 'border-top',
'key' => 'border',
),
),
'course_title_bottom_border' => array(
array(
'type' => 'css_border',
'selector' => '.courses-hero-section .entry-hero-container-inner',
'property' => 'border-bottom',
'pattern' => '$',
'key' => 'border',
),
),
),
),
'info_courses_layout' => array(
'control_type' => 'kadence_title_control',
'section' => 'courses_layout',
'priority' => 10,
'label' => esc_html__( 'Course Layout', 'kadence' ),
'settings' => false,
),
'info_courses_layout_design' => array(
'control_type' => 'kadence_title_control',
'section' => 'courses_layout_design',
'priority' => 10,
'label' => esc_html__( 'Course Layout', 'kadence' ),
'settings' => false,
),
'courses_layout' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'courses_layout',
'label' => esc_html__( 'Course Layout', 'kadence' ),
'transport' => 'refresh',
'priority' => 10,
'default' => kadence()->default( 'courses_layout' ),
'input_attrs' => array(
'layout' => array(
'left' => array(
'tooltip' => __( 'Left Sidebar', 'kadence' ),
'icon' => 'leftsidebar',
),
'right' => array(
'tooltip' => __( 'Right Sidebar', 'kadence' ),
'icon' => 'rightsidebar',
),
),
'responsive' => false,
'class' => 'kadence-two-col',
),
),
'courses_content_style' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'courses_layout',
'label' => esc_html__( 'Content Style', 'kadence' ),
'priority' => 10,
'default' => kadence()->default( 'course_content_style' ),
'live_method' => array(
array(
'type' => 'class',
'selector' => 'body.single-courses',
'pattern' => 'content-style-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'boxed' => array(
'tooltip' => __( 'Boxed', 'kadence' ),
'icon' => 'boxed',
),
'unboxed' => array(
'tooltip' => __( 'Unboxed', 'kadence' ),
'icon' => 'narrow',
),
),
'responsive' => false,
'class' => 'kadence-two-col',
),
),
'courses_vertical_padding' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'courses_layout',
'label' => esc_html__( 'Content Vertical Padding', 'kadence' ),
'priority' => 10,
'default' => kadence()->default( 'courses_vertical_padding' ),
'live_method' => array(
array(
'type' => 'class',
'selector' => 'body.single-courses',
'pattern' => 'content-vertical-padding-$',
'key' => '',
),
),
'input_attrs' => array(
'layout' => array(
'show' => array(
'name' => __( 'Enable', 'kadence' ),
),
'hide' => array(
'name' => __( 'Disable', 'kadence' ),
),
'top' => array(
'name' => __( 'Top Only', 'kadence' ),
),
'bottom' => array(
'name' => __( 'Bottom Only', 'kadence' ),
),
),
'responsive' => false,
'class' => 'kadence-two-grid',
),
),
// 'course_feature' => array(
// 'control_type' => 'kadence_switch_control',
// 'section' => 'courses_layout',
// 'priority' => 20,
// 'default' => kadence()->default( 'course_feature' ),
// 'label' => esc_html__( 'Show Featured Image?', 'kadence' ),
// 'transport' => 'refresh',
// ),
// 'course_feature_position' => array(
// 'control_type' => 'kadence_radio_icon_control',
// 'section' => 'courses_layout',
// 'label' => esc_html__( 'Featured Image Position', 'kadence' ),
// 'priority' => 20,
// 'transport' => 'refresh',
// 'default' => kadence()->default( 'course_feature_position' ),
// 'context' => array(
// array(
// 'setting' => 'course_feature',
// 'operator' => '=',
// 'value' => true,
// ),
// ),
// 'input_attrs' => array(
// 'layout' => array(
// 'above' => array(
// 'name' => __( 'Above', 'kadence' ),
// ),
// 'behind' => array(
// 'name' => __( 'Behind', 'kadence' ),
// ),
// 'below' => array(
// 'name' => __( 'Below', 'kadence' ),
// ),
// ),
// 'responsive' => false,
// ),
// ),
// 'course_feature_ratio' => array(
// 'control_type' => 'kadence_radio_icon_control',
// 'section' => 'courses_layout',
// 'label' => esc_html__( 'Featured Image Ratio', 'kadence' ),
// 'priority' => 20,
// 'default' => kadence()->default( 'course_feature_ratio' ),
// 'context' => array(
// array(
// 'setting' => 'course_feature',
// 'operator' => '=',
// 'value' => true,
// ),
// ),
// 'live_method' => array(
// array(
// 'type' => 'class',
// 'selector' => 'body.single-course .article-post-thumbnail',
// 'pattern' => 'kadence-thumbnail-ratio-$',
// 'key' => '',
// ),
// ),
// 'input_attrs' => array(
// 'layout' => array(
// 'inherit' => array(
// 'name' => __( 'Inherit', 'kadence' ),
// ),
// '1-1' => array(
// 'name' => __( '1:1', 'kadence' ),
// ),
// '3-4' => array(
// 'name' => __( '3:4', 'kadence' ),
// ),
// '2-3' => array(
// 'name' => __( '2:3', 'kadence' ),
// ),
// '9-16' => array(
// 'name' => __( '9:16', 'kadence' ),
// ),
// '1-2' => array(
// 'name' => __( '1:2', 'kadence' ),
// ),
// ),
// 'responsive' => false,
// 'class' => 'kadence-three-col-short',
// ),
// ),
// 'info_course_syllabus_layout' => array(
// 'control_type' => 'kadence_title_control',
// 'section' => 'courses_layout',
// 'priority' => 20,
// 'label' => esc_html__( 'Course Syllabus Layout', 'kadence' ),
// 'settings' => false,
// ),
// 'course_syllabus_columns' => array(
// 'control_type' => 'kadence_radio_icon_control',
// 'section' => 'courses_layout',
// 'priority' => 20,
// 'label' => esc_html__( 'Course Syllabus Columns', 'kadence' ),
// 'transport' => 'refresh',
// 'default' => kadence()->default( 'course_syllabus_columns' ),
// 'input_attrs' => array(
// 'layout' => array(
// '1' => array(
// 'name' => __( '1', 'kadence' ),
// ),
// '2' => array(
// 'name' => __( '2', 'kadence' ),
// ),
// '3' => array(
// 'name' => __( '3', 'kadence' ),
// ),
// ),
// 'responsive' => false,
// ),
// ),
// 'course_syllabus_lesson_style' => array(
// 'control_type' => 'kadence_radio_icon_control',
// 'section' => 'courses_layout',
// 'label' => esc_html__( 'Course Lesson Style', 'kadence' ),
// 'priority' => 20,
// 'transport' => 'refresh',
// 'default' => kadence()->default( 'course_syllabus_lesson_style' ),
// 'context' => array(
// array(
// 'setting' => 'course_syllabus_columns',
// 'operator' => '=',
// 'value' => '1',
// ),
// ),
// 'input_attrs' => array(
// 'layout' => array(
// 'standard' => array(
// 'name' => __( 'Standard', 'kadence' ),
// ),
// 'tiles' => array(
// 'name' => __( 'Two Column Tiles', 'kadence' ),
// ),
// 'center' => array(
// 'name' => __( 'One Column Center', 'kadence' ),
// ),
// ),
// 'responsive' => false,
// 'class' => 'kadence-tiny-text',
// ),
// ),
// 'course_syllabus_thumbs' => array(
// 'control_type' => 'kadence_switch_control',
// 'section' => 'courses_layout',
// 'priority' => 20,
// 'default' => kadence()->default( 'course_syllabus_thumbs' ),
// 'label' => esc_html__( 'Show Lesson Thumbnail in Syllabus?', 'kadence' ),
// 'transport' => 'refresh',
// ),
// 'course_syllabus_thumbs_ratio' => array(
// 'control_type' => 'kadence_radio_icon_control',
// 'section' => 'courses_layout',
// 'label' => esc_html__( 'Lesson Thumbnail Ratio', 'kadence' ),
// 'priority' => 20,
// 'default' => kadence()->default( 'course_syllabus_thumbs_ratio' ),
// 'context' => array(
// array(
// 'setting' => 'course_syllabus_thumbs',
// 'operator' => '=',
// 'value' => true,
// ),
// ),
// 'live_method' => array(
// array(
// 'type' => 'class',
// 'selector' => 'body.single-courses .llms-lesson-thumbnail',
// 'pattern' => 'kadence-thumbnail-ratio-$',
// 'key' => '',
// ),
// ),
// 'input_attrs' => array(
// 'layout' => array(
// 'inherit' => array(
// 'name' => __( 'Inherit', 'kadence' ),
// ),
// '1-1' => array(
// 'name' => __( '1:1', 'kadence' ),
// ),
// '3-4' => array(
// 'name' => __( '3:4', 'kadence' ),
// ),
// '2-3' => array(
// 'name' => __( '2:3', 'kadence' ),
// ),
// '9-16' => array(
// 'name' => __( '9:16', 'kadence' ),
// ),
// '1-2' => array(
// 'name' => __( '1:2', 'kadence' ),
// ),
// ),
// 'responsive' => false,
// 'class' => 'kadence-three-col-short',
// ),
// ),
'course_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'courses_layout_design',
'priority' => 20,
'label' => esc_html__( 'Site Background', 'kadence' ),
'default' => kadence()->default( 'course_background' ),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => 'body.single-courses',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Course Background', 'kadence' ),
),
),
'course_content_background' => array(
'control_type' => 'kadence_background_control',
'section' => 'courses_layout_design',
'priority' => 20,
'label' => esc_html__( 'Content Background', 'kadence' ),
'default' => kadence()->default( 'course_content_background' ),
'live_method' => array(
array(
'type' => 'css_background',
'selector' => 'body.single-courses .content-bg, body.single-courses:not(.content-style-unboxed) .tutor-price-preview-box, body.single-courses.content-style-unboxed .site',
'property' => 'background',
'pattern' => '$',
'key' => 'base',
),
),
'input_attrs' => array(
'tooltip' => __( 'Course Content Background', 'kadence' ),
),
),
);
Theme_Customizer::add_settings( $settings );

View File

@@ -0,0 +1,134 @@
<?php
/**
* Header Main Row Options
*
* @package Kadence
*/
namespace Kadence;
use Kadence\Theme_Customizer;
use function Kadence\kadence;
$settings = array(
'woocommerce_store_notice_tabs' => array(
'control_type' => 'kadence_tab_control',
'section' => 'woocommerce_store_notice',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'woocommerce_store_notice',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'woocommerce_store_notice_design',
),
'active' => 'general',
),
),
'woocommerce_store_notice_tabs_design' => array(
'control_type' => 'kadence_tab_control',
'section' => 'woocommerce_store_notice_design',
'settings' => false,
'priority' => 1,
'input_attrs' => array(
'general' => array(
'label' => __( 'General', 'kadence' ),
'target' => 'woocommerce_store_notice',
),
'design' => array(
'label' => __( 'Design', 'kadence' ),
'target' => 'woocommerce_store_notice_design',
),
'active' => 'design',
),
),
'woo_store_notice_placement' => array(
'control_type' => 'kadence_radio_icon_control',
'section' => 'woocommerce_store_notice',
'transport' => 'refresh',
'default' => kadence()->default( 'woo_store_notice_placement' ),
'label' => esc_html__( 'Store Notice Placement', 'kadence' ),
'input_attrs' => array(
'layout' => array(
'standard' => array(
'tooltip' => __( 'Hangs down over the top of the header', 'kadence' ),
'name' => __( 'Hang Over Top', 'kadence' ),
'icon' => '',
),
'above' => array(
'tooltip' => __( 'Placed above the Header', 'kadence' ),
'name' => __( 'Above', 'kadence' ),
'icon' => '',
),
'bottom' => array(
'tooltip' => __( 'Stuck to the Bottom of the screen', 'kadence' ),
'name' => __( 'Bottom', 'kadence' ),
'icon' => '',
),
),
'responsive' => false,
),
),
'woo_store_notice_hide_dismiss' => array(
'control_type' => 'kadence_switch_control',
'sanitize' => 'kadence_sanitize_toggle',
'section' => 'woocommerce_store_notice',
'default' => kadence()->default( 'woo_store_notice_hide_dismiss' ),
'label' => esc_html__( 'Disable Dismiss Button?', 'kadence' ),
'transport' => 'refresh',
'context' => array(
array(
'setting' => 'woo_store_notice_placement',
'operator' => '=',
'value' => 'above',
),
),
),
'woo_store_notice_font' => array(
'control_type' => 'kadence_typography_control',
'section' => 'woocommerce_store_notice_design',
'label' => esc_html__( 'Notice Font', 'kadence' ),
'default' => kadence()->default( 'woo_store_notice_font' ),
'live_method' => array(
array(
'type' => 'css_typography',
'selector' => '.woocommerce-demo-store .woocommerce-store-notice, .woocommerce-demo-store .woocommerce-store-notice a',
'property' => 'font',
'key' => 'typography',
),
),
'input_attrs' => array(
'id' => 'woo_store_notice_font',
),
),
'woo_store_notice_background' => array(
'control_type' => 'kadence_color_control',
'section' => 'woocommerce_store_notice_design',
'label' => esc_html__( 'Background Color', 'kadence' ),
'default' => kadence()->default( 'woo_store_notice_background' ),
'live_method' => array(
array(
'type' => 'css',
'selector' => '.woocommerce-demo-store .woocommerce-store-notice',
'property' => 'background',
'pattern' => '$',
'key' => 'color',
),
),
'input_attrs' => array(
'colors' => array(
'color' => array(
'tooltip' => __( 'Overlay Color', 'kadence' ),
'palette' => true,
),
),
'allowGradient' => true,
),
),
);
Theme_Customizer::add_settings( $settings );

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,46 @@
<?php
/**
* The blank customize control extends the WP_Customize_Control class.
*
* @package customizer-controls
*/
if ( ! class_exists( 'WP_Customize_Control' ) ) {
return;
}
/**
* Class Kadence_Control_Available
*
* @access public
*/
class Kadence_Control_Available extends WP_Customize_Control {
/**
* Control type
*
* @var string
*/
public $type = 'kadence_available_control';
/**
* Additional arguments passed to JS.
*
* @var array
*/
public $input_attrs = array();
/**
* Refresh the parameters passed to the JavaScript via JSON.
*/
public function to_json() {
parent::to_json();
$this->json['input_attrs'] = $this->input_attrs;
}
/**
* Empty Render Function to prevent errors.
*/
public function render_content() {
}
}
$wp_customize->register_control_type( 'Kadence_Control_Available' );

View File

@@ -0,0 +1,75 @@
<?php
/**
* The Background customize control extends the WP_Customize_Control class.
*
* @package customizer-controls
*/
if ( ! class_exists( 'WP_Customize_Control' ) ) {
return;
}
/**
* Class Kadence_Control_Background
*
* @access public
*/
class Kadence_Control_Background extends WP_Customize_Media_Control {
/**
* Control type
*
* @var string
*/
public $type = 'kadence_background_control';
/**
* Additional arguments passed to JS.
*
* @var array
*/
public $default = array();
/**
* Additional arguments passed to JS.
*
* @var array
*/
public $input_attrs = array(
'attachments' => array(
'desktop' => array(),
'tablet' => array(),
'mobile' => array(),
),
);
/**
* Additional arguments passed to JS.
*
* @var string
*/
public $mime_type = 'image';
/**
* Send to JS.
*/
public function to_json() {
parent::to_json();
$value = $this->value();
if ( $value && is_array( $value ) ) {
foreach ( array( 'desktop', 'tablet', 'mobile' ) as $device ) {
if ( isset( $value[ $device ] ) && isset( $value[ $device ]['image'] ) && isset( $value[ $device ]['image']['url'] ) && ! empty( $value[ $device ]['image']['url'] ) ) {
$attachment_id = attachment_url_to_postid( $value[ $device ]['image']['url'] );
$this->input_attrs['attachments'][ $device ] = wp_prepare_attachment_for_js( $attachment_id );
}
}
}
$this->json['input_attrs'] = $this->input_attrs;
$this->json['default'] = $this->default;
}
/**
* Empty Render Function to prevent errors.
*/
public function render_content() {
}
}
$wp_customize->register_control_type( 'Kadence_Control_Background' );

View File

@@ -0,0 +1,54 @@
<?php
/**
* The Border customize control extends the WP_Customize_Control class.
*
* @package customizer-controls
*/
if ( ! class_exists( 'WP_Customize_Control' ) ) {
return;
}
/**
* Class Kadence_Control_Border
*
* @access public
*/
class Kadence_Control_Border extends WP_Customize_Control {
/**
* Control type
*
* @var string
*/
public $type = 'kadence_border_control';
/**
* Additional arguments passed to JS.
*
* @var array
*/
public $default = array();
/**
* Additional arguments passed to JS.
*
* @var array
*/
public $input_attrs = array();
/**
* Send to JS.
*/
public function to_json() {
parent::to_json();
$this->json['input_attrs'] = $this->input_attrs;
$this->json['default'] = $this->default;
}
/**
* Empty Render Function to prevent errors.
*/
public function render_content() {
}
}
$wp_customize->register_control_type( 'Kadence_Control_Border' );

Some files were not shown because too many files have changed in this diff Show More