File: //proc/thread-self/cwd/wp-content/themes/codate/redux-framework/redux-themnific.php
<?php
if ( ! class_exists( 'codate_redux_config' ) ) {
class codate_redux_config {
public $args = array();
public $sections = array();
public $theme;
public $ReduxFramework;
public function __construct() {
if ( ! class_exists( 'ReduxFramework' ) ) {
return;
}
$this->initSettings();
}
public function initSettings() {
$this->theme = wp_get_theme();
$this->setArguments();
$this->setHelpTabs();
$this->setSections();
if ( ! isset( $this->args['opt_name'] ) ) { // No errors please
return;
}
add_action( 'redux/loaded', array( $this, 'remove_demo' ) );
$this->ReduxFramework = new ReduxFramework( $this->sections, $this->args );
}
// Remove the demo link
function remove_demo() {
if ( class_exists( 'ReduxFrameworkPlugin' ) ) {
remove_filter( 'plugin_row_meta', array(
ReduxFrameworkPlugin::instance(),
'plugin_metalinks'
), null, 2 );
remove_action( 'admin_notices', array( ReduxFrameworkPlugin::instance(), 'admin_notices' ) );
}
}
public function setSections() {
ob_start();
$ct = wp_get_theme();
$this->theme = $ct;
$item_name = $this->theme->get( 'Name' );
$tags = $this->theme->Tags;
$screenshot = $this->theme->get_screenshot();
$class = $screenshot ? 'has-screenshot' : '';
$customize_title = sprintf( esc_html__( 'Customize “%s”','codate' ), $this->theme->display( 'Name' ) );
$item_info = ob_get_contents();
ob_end_clean();
$sampleHTML = '';
// ACTUAL DECLARATION OF SECTIONS
$this->sections[] = array(
'title' => esc_html__( 'General Settings','codate' ),
'desc' => esc_html__( '','codate' ),
'icon' => 'el el-cogs',
'fields' => array( // header end
array(
'id' => 'tmnf-main-logo',
'type' => 'media',
'default' => '',
'readonly' => false,
'preview' => true,
'url' => true,
'title' => esc_html__( 'Main Logo','codate' ),
'desc' => esc_html__( 'Upload a logo for your theme','codate' ),
),
array(
'id' => 'tmnf-container-width',
'type' => 'radio',
'title' => esc_html__('Container Width Limitation','codate'),
'subtitle' => esc_html__('Select layout for your header','codate'),
//Must provide key => value pairs for radio options
'options' => array(
'tmnf_width_wide' => esc_html__('Wide (1480px)','codate'),
'tmnf_width_normal' => esc_html__('Normal (1360px)','codate'),
'tmnf_width_narrow' => esc_html__('Narrow (1200px)','codate'),
'tmnf_width_minimal' => esc_html__('Minimal (1060px)','codate'),
),
'default' => 'tmnf_width_normal'
),
array(
'id' => 'tmnf-blog-layout',
'type' => 'radio',
'title' => esc_html__('Blog Layout','codate'),
'subtitle' => esc_html__('Select layout and styling for blog template','codate'),
//Must provide key => value pairs for radio options
'options' => array(
'blog_layout' => esc_html__('Blog Style 1 (large images)','codate'),
'blog_layout_2' => esc_html__('Blog Style 2 (small images)','codate'),
'blog_layout_list' => esc_html__('Blog Style 3 (posts list)','codate'),
),
'default' => 'blog_layout'
),
array(
'id' => 'tmnf-uppercase',
'type' => 'radio',
'title' => esc_html__('Uppercase Fonts','codate'),
//Must provide key => value pairs for radio options
'options' => array(
'upper_none' => esc_html__('None','codate'),
'upper' => esc_html__('Minimal','codate'),
'upper upper_medium' => esc_html__('Medium','codate'),
'upper upper_maxi' => esc_html__('Maximal','codate'),
),
'default' => 'upper'
),
array(
'id' => 'tmnf-letter-space',
'type' => 'checkbox',
'title' => esc_html__( 'Additional Letter Space','codate' ),
'default' => '0'// 1 = on | 0 = off
),
array(
'id' => 'tmnf-image-filter',
'type' => 'radio',
'title' => esc_html__('Images Filter','codate'),
//Must provide key => value pairs for radio options
'options' => array(
'image_css_none' => esc_html__('None','codate'),
'image_css_desaturate' => esc_html__('Desaturate','codate'),
'image_css_desaturate_half' => esc_html__('Desaturate 50%','codate'),
'image_css_sepia' => esc_html__('Sepia','codate'),
'image_css_bright' => esc_html__('Bright','codate'),
),
'default' => 'image_css_none'
),
array(
'id' => 'tmnf-mailchimp',
'type' => 'text',
'title' => esc_html__( 'MailChimp Shortcode','codate' ),
'default' => '',
'validate' => 'html',
),
// section end
)
);
// General Layout THE END
$this->sections[] = array(
'type' => 'divide',
);
$this->sections[] = array(
'title' => esc_html__( 'Primary Styling','codate' ),
'desc' => esc_html__( '','codate' ),
'icon' => 'el el-tint',
'fields' => array( // header end
array(
'id' => 'codate-body-typography',
'type' => 'typography',
'title' => esc_html__( 'Typography','codate' ),
'google' => true,
'font-backup' => true,
'all_styles' => true,
'output' => array( 'body,input,button,textarea' ),
'units' => 'px',
'line-height' => false,
'subtitle' => esc_html__( 'Select the typography used as general text.','codate' ),
'default' => array(
'color' => '#373737',
'font-weight' => '400',
'font-family' => 'Libre Franklin',
'google' => true,
'font-size' => '16px',
),
),
array(
'id' => 'codate-background',
'type' => 'background',
'title' => esc_html__( 'Main Body Background','codate' ),
'subtitle' => esc_html__( 'Body background with image, color, etc.','codate' ),
'output' => array('.wrapper_inn,.postbar,.item_small.has-post-thumbnail .item_inn' ),
'default' => array(
'background-color' => '#fff',
),
),
array(
'id' => 'codate-ghost',
'type' => 'color',
'title' => esc_html__('Ghost Background Color','codate'),
'subtitle' => esc_html__('Set alternative background color (similar to the Main Body Background) ','codate'),
'default' => '#F8F8F8',
'output' => array(
'background-color' => '.ghost,.sidebar_item,#respond textarea,#respond input'
)
),
array(
'id' => 'codate-link-color',
'type' => 'link_color',
'title' => esc_html__( 'Links Color Option','codate' ),
'subtitle' => esc_html__( 'Pick a link color','codate' ),
'output' => array( 'a' ),
'default' => array(
'regular' => '#373737',
'hover' => '#e85442',
'active' => '#000',
)
),
array(
'id' => 'codate-color-entry-link',
'type' => 'color',
'title' => esc_html__('Entry Links (in post texts)','codate'),
'subtitle' => esc_html__('Pick a custom color for post links.','codate'),
'default' => '#e85442',
'output' => array(
'color' => '.entry p a,.entry ol a,.entry ul a',
'border-color' => '.entry p a,.entry ol a,.entry ul a',
)
),
array(
'id' => 'codate-color-entry-link-hover',
'type' => 'color',
'title' => esc_html__('Entry Links (in post texts): Hover Background Color','codate'),
'subtitle' => esc_html__('Pick a custom color for post links.','codate'),
'default' => '#000',
'output' => array(
'background-color' => '.entry p a:hover,.entry ol li>a:hover,.entry ul li>a:hover',
)
),
array(
'id' => 'codate-primary-border',
'type' => 'color',
'title' => esc_html__('Borders Color','codate'),
'subtitle' => esc_html__('Pick a color for primary borders','codate'),
'default' => '#efefef',
'output' => array(
'border-color' => '.p-border,.sidebar_item,.sidebar_item h5,.sidebar_item li,.sidebar_item ul.menu li,.block_title:after,.meta,.tagcloud a,.page-numbers,input,textarea,select,.page-link span,.post-pagination>p a',
)
),
array(
'id' => 'codate-text-sidebar',
'type' => 'color',
'title' => esc_html__('Sidebar Text Color','codate'),
'subtitle' => esc_html__('Pick a color for sidebar text.','codate'),
'default' => '#3f3f3f',
'output' => array(
'color' => '#sidebar',
)
),
array(
'id' => 'codate-links-sidebar',
'type' => 'color',
'title' => esc_html__('Sidebar Link Color','codate'),
'subtitle' => esc_html__('Pick a color for sidebar links.','codate'),
'default' => '#3d4444',
'output' => array(
'color' => '.widgetable a',
)
),
// section end
)
);
// Primary styling THE END
$this->sections[] = array(
'title' => esc_html__( 'Header Styling','codate' ),
'icon' => 'el el-tint',
'fields' => array( // header end
array(
'id' => 'tmnf-header-full',
'type' => 'checkbox',
'title' => esc_html__( 'Enable Full Width Header','codate' ),
'default' => '0'// 1 = on | 0 = off
),
array(
'id' => 'tmnf-header-layout',
'type' => 'radio',
'title' => esc_html__('Header Layout','codate'),
'subtitle' => esc_html__('Select layout for your header','codate'),
//Must provide key => value pairs for radio options
'options' => array(
'header_classic' => esc_html__('Classic Header','codate'),
'header_slim' => esc_html__('Slim Header','codate'),
'header_centered' => esc_html__('Centered Header','codate'),
'header_centered_2' => esc_html__('Centered Header 2','codate'),
),
'default' => 'header_classic'
),
array(
'id' => 'codate-bg-myheader',
'type' => 'color',
'title' => esc_html__('Header Background Color','codate'),
'subtitle' => esc_html__('Pick a bg color for header. On mobile devices is transparent header disabled.','codate'),
'default' => '#fff',
'output' => array(
'background-color' => '#header',
)
),
array(
'id' => 'codate-links-myheader',
'type' => 'color',
'title' => esc_html__('Header Link Color','codate'),
'subtitle' => esc_html__('Pick a color for header links.','codate'),
'default' => '#373737',
'output' => array(
'color' => '#header h1 a',
)
),
array(
'id' => 'codate-borders-myheader',
'type' => 'color',
'title' => esc_html__('Header Borders Color','codate'),
'subtitle' => esc_html__('Pick a bg color for header. On mobile devices is transparent header disabled.','codate'),
'default' => '#efefef',
'output' => array(
'border-color' => '.header_row',
)
),
array(
'id' => 'info_normal',
'type' => 'info',
'title' => esc_html__('Menu Section + Special menu button','codate'),
'style' => 'success',
),
array(
'id' => 'codate-navbar-myheader',
'type' => 'color',
'title' => esc_html__('Navigation Background Color (only for "Centered" header layout)','codate'),
'subtitle' => esc_html__('Pick a color for header links.','codate'),
'default' => '#fcfcfc',
'output' => array(
'background-color' => '.header_centered .will_stick,.header_centered_2 .will_stick,.will_stick.scrollDown',
)
),
array(
'id' => 'codate-header-typography',
'type' => 'typography',
'title' => esc_html__( 'Navigation Typography','codate' ),
'google' => true,
'font-backup' => true,
'all_styles' => false,
'output' => array( '.nav>li>a,.top_nav .searchform input.s' ),
'units' => 'px',
'line-height' => false,
'subtitle' => esc_html__( 'Select the typography used as navigation text.','codate' ),
'default' => array(
'color' => '#373737',
'font-weight' => '600',
'font-family' => 'Poppins',
'google' => true,
'font-size' => '16px',
),
),
array(
'id' => 'codate-hover-myheader',
'type' => 'color',
'title' => esc_html__('Navigation Link Color: Hover Color','codate'),
'subtitle' => esc_html__('Pick a hover color for header links.','codate'),
'default' => '#e85442',
'output' => array(
'color' => '.nav>li.current-menu-item>a,.nav>li>a:hover,.menu-item-has-children>a:after',
)
),
array(
'id' => 'codate-icons-myheader',
'type' => 'color',
'title' => esc_html__('Header Icons: Color','codate'),
'subtitle' => esc_html__('Pick a hover color for header icons.','codate'),
'default' => '#373737',
'output' => array(
'color' => '#header ul.social-menu li a,.head_extend a',
)
),
array(
'id' => 'codate-bg-submenu',
'type' => 'color',
'title' => esc_html__('Sub-menu Background Color','codate'),
'subtitle' => esc_html__('Pick a hover color for header links.','codate'),
'default' => '#e85442',
'output' => array(
'background-color' => '.nav li ul',
'border-bottom-color' => '.nav>li>ul:after',
)
),
array(
'id' => 'codate-submenu-typography',
'type' => 'typography',
'title' => esc_html__( 'Sub-menu Typography','codate' ),
'google' => true,
'font-backup' => true,
'all_styles' => false,
'output' => array( '.nav ul li>a' ),
'units' => 'px',
'line-height' => false,
'subtitle' => esc_html__( 'Select the typography used as navigation text.','codate' ),
'default' => array(
'color' => '#fff',
'font-weight' => '500',
'font-family' => 'Poppins',
'google' => true,
'font-size' => '13px',
),
),
array(
'id' => 'codate-hover-submenu',
'type' => 'color',
'title' => esc_html__('Sub-menu Link Color: Hover Color','codate'),
'subtitle' => esc_html__('Pick a hover color for header links.','codate'),
'default' => '#efccc2',
'output' => array(
'color' => '.nav li ul li>a:hover',
)
),
array(
'id' => 'info_normal',
'type' => 'info',
'title' => esc_html__('Mobile Menu Button','codate'),
'style' => 'success',
),
array(
'id' => 'codate-header-special-bg',
'type' => 'color',
'title' => esc_html__('Menu Button: Background Color','codate'),
'subtitle' => esc_html__('Pick a color for header text.','codate'),
'default' => '#e85442',
'output' => array(
'background-color' => '.show-menu,#main-nav>li.special>a',
'color' => '.nav a i',
)
),
array(
'id' => 'codate-header-special-text',
'type' => 'color',
'title' => esc_html__('Menu Button: Text Color','codate'),
'subtitle' => esc_html__('Pick a color for header text.','codate'),
'default' => '#fff',
'output' => array(
'color' => '#header .show-menu,#main-nav>li.special>a',
)
),
array(
'id' => 'info_normal',
'type' => 'info',
'title' => esc_html__('Transparent Header','codate'),
'style' => 'success',
),
array(
'id' => 'codate-images-bg',
'type' => 'color',
'title' => esc_html__('Transparent Header: Background Color (fallback)','codate'),
'subtitle' => esc_html__('Pick a fallback background color for transparent header','codate'),
'default' => '#192126',
'output' => array(
'background-color' => '[class*="hero-cover"] .will_stick.scrollDown,.page-header-image,.main_slider_wrap,[class*="hero-cover"] #header,.imgwrap',
)
),
array(
'id' => 'codate-images-text',
'type' => 'color',
'title' => esc_html__('Transparent Header: Text Color','codate'),
'subtitle' => esc_html__('Pick a custom bg color for images','codate'),
'default' => '#fff',
'output' => array(
'color' => '.page-header-image p,.page-header-image h1.entry-title,.page-header-image .meta a,[class*="hero-cover"] #header .nav > li:not(.special) > a,[class*="hero-cover"] #header #titles a,[class*="hero-cover"] #header .head_extend a,[class*="hero-cover"] #header .social-menu a,.eleslideinside a,.eleslideinside .tmnf_excerpt p,.has-post-thumbnail .titles_over a,.has-post-thumbnail .titles_over p',
)
),
array(
'id' => 'tmnf-main-logo-inv',
'type' => 'media',
'default' => '',
'readonly' => false,
'preview' => true,
'url' => true,
'title' => esc_html__( 'Main Logo for Tranparent Header','codate' ),
'desc' => esc_html__( 'Upload a logo for your theme','codate' ),
),
array(
'id' => 'info_normal',
'type' => 'info',
'title' => esc_html__('Header Spacing','codate'),
'style' => 'success',
),
array(
'id' => 'codate-width-header',
'type' => 'dimensions',
'output' => array( '#titles' ),
'units' => 'px',
'units_extended' => 'true',
'height' => false,
'title' => esc_html__( 'Header Title/Logo Width Option','codate' ),
'subtitle' => esc_html__( 'Choose the width limitation for header logo.','codate' ),
'default' => array(
'width' => 200,
)
),
array(
'id' => 'codate-spacing-header',
'type' => 'spacing',
'output' => array( '#titles,.header_fix' ),
'mode' => 'margin',
'all' => false,
'right' => false,
'left' => false,
'units' => 'px',
'title' => esc_html__( 'Header Title/Logo Spacing','codate' ),
'subtitle' => esc_html__( 'Choose the margin for header logo.','codate' ),
'default' => array(
'margin-top' => '27px',
'margin-bottom' => '20px',
)
),
array(
'id' => 'codate-spacing-nav',
'type' => 'spacing',
'output' => array( '#main-nav,.head_extend,#header ul.social-menu' ),
'mode' => 'margin',
'all' => false,
'right' => false,
'left' => false,
'units' => 'px',
'title' => esc_html__( 'Header Navigation Spacing','codate' ),
'subtitle' => esc_html__( 'Choose the margin for header navigation.','codate' ),
'default' => array(
'margin-top' => '15px',
'margin-bottom' => '15px',
)
),
// section end
)
);
// header styling THE END
$this->sections[] = array(
'title' => esc_html__( 'Footer Styling','codate' ),
'icon' => 'el el-tint',
'fields' => array( // header end
array(
'id' => 'tmnf-footer-editor',
'type' => 'textarea',
'title' => esc_html__( 'Footer Text','codate' ),
'subtitle' => esc_html__( 'Just like a text box widget.','codate' ),
'desc' => esc_html__( 'This field is HTML validated!','codate' ),
'default' => 'Copyright © 2020 - Codate Theme',
'validate' => 'html',
),
array(
'id' => 'codate-color-myfooter',
'type' => 'background',
'title' => esc_html__('Footer Background Color','codate'),
'subtitle' => esc_html__('Pick a background color for footer.','codate'),
'output' => array('#footer,#footer .searchform input.s' ),
'default' => array(
'background-color' => '#192126',
),
),
array(
'id' => 'codate-color-wrapper',
'type' => 'color',
'title' => esc_html__('Alt Background Color','codate'),
'subtitle' => esc_html__('Pick a background color','codate'),
'default' => '#2d2d2d',
'output' => array(
'background-color' => '.footer-below'
)
),
array(
'id' => 'codate-text-myfooter',
'type' => 'color',
'title' => esc_html__('Footer Text - Color','codate'),
'subtitle' => esc_html__('Pick a color for footer links.','codate'),
'default' => '#9b9b9b',
'output' => array(
'color' => '#footer,#footer h2,#footer h3,#footer h4,#footer h5,#footer .meta,#footer .searchform input.s,#footer cite',
)
),
array(
'id' => 'codate-links-myfooter',
'type' => 'color',
'title' => esc_html__('Footer Links - Color','codate'),
'subtitle' => esc_html__('Pick a color for footer links.','codate'),
'default' => '#c9c9c9',
'output' => array(
'color' => '#footer a,#footer .meta a,#footer ul.social-menu a span,.bottom-menu li a',
)
),
array(
'id' => 'codate-hover-myfooter',
'type' => 'color',
'title' => esc_html__('Footer Links - Hover Color','codate'),
'subtitle' => esc_html__('Pick a hover color for footer links.','codate'),
'default' => '#ba5536',
'output' => array(
'color' => '#footer a:hover',
)
),
array(
'id' => 'codate-footer-border',
'type' => 'color',
'title' => esc_html__('Footer Borders','codate'),
'subtitle' => esc_html__('Pick a color for footer borders.','codate'),
'default' => '#333333',
'output' => array(
'border-color' => '#footer,#footer h5.widget,#footer .sidebar_item li,#copyright,#footer .tagcloud a,#footer .tp_recent_tweets ul li,#footer .p-border,#footer .searchform input.s,#footer input,.footer-icons ul.social-menu a,.footer_text',
)
),
// section end
)
);
// footer styling THE END
$this->sections[] = array(
'title' => esc_html__( 'Typography','codate' ),
'icon' => 'el el-bold',
'fields' => array( // header end
array(
'id' => 'info_normal',
'type' => 'info',
'title' => esc_html__('Special Headings','codate'),
'style' => 'success',
),
array(
'id' => 'codate-h1-title',
'type' => 'typography',
'title' => esc_html__( 'Site Title','codate' ),
'google' => true,
'font-backup' => true,
'all_styles' => false,
'output' => array( '#header h1' ),
'units' => 'px',
'line-height' => false,
'subtitle' => esc_html__( 'Select the typography for heading H1.','codate' ),
'default' => array(
'color' => '#373737',
'font-weight' => '700',
'font-family' => 'Poppins',
'google' => true,
'font-size' => '20px',
),
),
array(
'id' => 'codate-large-titles',
'type' => 'typography',
'title' => esc_html__( 'Large Titles','codate' ),
'google' => true,
'font-backup' => true,
'all_styles' => false,
'output' => array( 'h1.tmnf_title_large,h2.tmnf_title_large,.tmnf_titles_are_large .tmnf_title' ),
'units' => 'px',
'line-height' => false,
'subtitle' => esc_html__( 'Select the typography for heading H2.','codate' ),
'default' => array(
'color' => '#373737',
'font-weight' => '700',
'font-family' => 'Poppins',
'google' => true,
'font-size' => '50px',
),
),
array(
'id' => 'codate-medium-titles',
'type' => 'typography',
'title' => esc_html__( 'Medium Titles','codate' ),
'google' => true,
'font-backup' => true,
'all_styles' => false,
'output' => array( 'h2.tmnf_title_medium,h3.tmnf_title_medium,.tmnf_titles_are_medium .tmnf_title' ),
'units' => 'px',
'line-height' => false,
'subtitle' => esc_html__( 'Select the typography for heading H2.','codate' ),
'default' => array(
'color' => '#373737',
'font-weight' => '700',
'font-family' => 'Poppins',
'google' => true,
'font-size' => '24px',
),
),
array(
'id' => 'codate-small-titles',
'type' => 'typography',
'title' => esc_html__( 'Small Titles','codate' ),
'google' => true,
'font-backup' => true,
'all_styles' => false,
'output' => array( 'h3.tmnf_title_small,h4.tmnf_title_small,.tmnf_columns_4 h3.tmnf_title_medium,.tmnf_titles_are_small .tmnf_title' ),
'units' => 'px',
'line-height' => false,
'subtitle' => esc_html__( 'Select the typography for heading H2.','codate' ),
'default' => array(
'color' => '#373737',
'font-weight' => '700',
'font-family' => 'Poppins',
'google' => true,
'font-size' => '16px',
),
),
array(
'id' => 'codate-buttons-typo',
'type' => 'typography',
'title' => esc_html__( 'Buttons Font Style','codate' ),
'google' => true,
'font-backup' => true,
'all_styles' => false,
'output' => array( '.tptn_link,.tab-post h4,.tptn_posts_widget li::before,cite,.menuClose span,.icon_extend,ul.social-menu a span,a.mainbutton,.owl-nav>div,.submit,.mc4wp-form input,.woocommerce #respond input#submit, .woocommerce a.button,.woocommerce button.button, .woocommerce input.button,.bottom-menu li a,.wpcf7-submit' ),
'units' => 'px',
'line-height' => false,
'subtitle' => esc_html__( 'Select the typography for heading H5.','codate' ),
'default' => array(
'color' => '#373737',
'font-weight' => '600',
'font-family' => 'Poppins',
'google' => true,
'font-size' => '14px',
),
),
array(
'id' => 'info_normal',
'type' => 'info',
'title' => esc_html__('In Post Headings','codate'),
'style' => 'success',
),
array(
'id' => 'codate-h1',
'type' => 'typography',
'title' => esc_html__( 'H1 Font Style','codate' ),
'google' => true,
'font-backup' => true,
'all_styles' => false,
'output' => array( 'h1' ),
'units' => 'px',
'line-height' => false,
'subtitle' => esc_html__( 'Select the typography for heading H2.','codate' ),
'default' => array(
'color' => '#373737',
'font-weight' => '700',
'font-family' => 'Poppins',
'google' => true,
'font-size' => '40px',
),
),
array(
'id' => 'codate-h2',
'type' => 'typography',
'title' => esc_html__( 'H2 Font Style','codate' ),
'google' => true,
'font-backup' => true,
'all_styles' => false,
'output' => array( 'h2' ),
'units' => 'px',
'line-height' => false,
'subtitle' => esc_html__( 'Select the typography for heading H2.','codate' ),
'default' => array(
'color' => '#373737',
'font-weight' => '700',
'font-family' => 'Poppins',
'google' => true,
'font-size' => '34px',
),
),
array(
'id' => 'codate-h3',
'type' => 'typography',
'title' => esc_html__( 'H3 Font Style','codate' ),
'google' => true,
'font-backup' => true,
'all_styles' => false,
'output' => array( 'h3' ),
'units' => 'px',
'line-height' => false,
'subtitle' => esc_html__( 'Select the typography for heading H3.','codate' ),
'default' => array(
'color' => '#373737',
'font-weight' => '700',
'font-family' => 'Poppins',
'google' => true,
'font-size' => '28px',
),
),
array(
'id' => 'codate-h4',
'type' => 'typography',
'title' => esc_html__( 'H4 Font Style','codate' ),
'google' => true,
'font-backup' => true,
'all_styles' => false,
'output' => array( 'h4,h3#reply-title,.entry h5, .entry h6' ),
'units' => 'px',
'line-height' => false,
'subtitle' => esc_html__( 'Select the typography for heading H4.','codate' ),
'default' => array(
'color' => '#373737',
'font-weight' => '700',
'font-family' => 'Poppins',
'google' => true,
'font-size' => '24px',
),
),
array(
'id' => 'codate-h5',
'type' => 'typography',
'title' => esc_html__( 'H5 + H6 Font Style','codate' ),
'google' => true,
'font-backup' => true,
'all_styles' => false,
'output' => array( 'h5,h6,.block_title span' ),
'units' => 'px',
'line-height' => false,
'subtitle' => esc_html__( 'Select the typography for heading H5.','codate' ),
'default' => array(
'color' => '#373737',
'font-weight' => '600',
'font-family' => 'Poppins',
'google' => true,
'font-size' => '14px',
),
),
// section end
)
);
// typography styling THE END
$this->sections[] = array(
'title' => esc_html__( 'Other Styling','codate' ),
'icon' => 'el el-tint',
'fields' => array( // header end
array(
'id' => 'codate-meta',
'type' => 'typography',
'title' => esc_html__( 'Meta Sections - Font Style','codate' ),
'google' => true,
'font-backup' => true,
'all_styles' => false,
'output' => array( '.meta,.meta a,.tptn_date,.post_nav_text span' ),
'units' => 'px',
'subtitle' => esc_html__( 'Select the typography for meta sections.','codate' ),
'default' => array(
'color' => '#a0a0a0',
'font-weight' => '400',
'font-family' => 'Lato',
'google' => true,
'font-size' => '10px',
'line-height' => '18px'
),
),
array(
'id' => 'codate-bg-color-dekoline',
'type' => 'color',
'title' => esc_html__('"Read More" Buttons and Dividers: Background Color','codate'),
'default' => '#192126',
'output' => array(
'background-color' => '.meta_deko::after,.meta_more a,h3#reply-title:after,.tptn_posts_widget li::before',
'color' => '.meta_deko::after,.gimmimore',
)
),
array(
'id' => 'codate-text-color-dekoline',
'type' => 'color',
'title' => esc_html__('"Read More" Buttons: Text Color','codate'),
'default' => '#fff',
'output' => array(
'color' => '.meta_more a,.tptn_posts_widget li::before',
)
),
array(
'id' => 'codate-color-elements',
'type' => 'color',
'title' => esc_html__('Elements Background Color','codate'),
'subtitle' => esc_html__('Pick a custom background color for main buttons, special sections etc.','codate'),
'default' => '#e85442',
'output' => array(
'background-color' => 'a.searchSubmit,.sticky:after,.ribbon,.post_pagination_inn,.format-quote .item_inn,.woocommerce #respond input#submit,.woocommerce a.button,.woocommerce button.button.alt,.woocommerce button.button,.woocommerce a.button.alt.checkout-button,input#place_order,.woocommerce input.button,#respond #submit,li.current a,.page-numbers.current,a.mainbutton,#submit,#comments .navigation a,.contact-form .submit,.wpcf7-submit,#woo-inn ul li span.current',
'border-color' => 'input.button,button.submit,.entry blockquote,li span.current',
'color' => '.current-cat>a,a.active',
)
),
array(
'id' => 'codate-text-elements',
'type' => 'color',
'title' => esc_html__('Elements Links/Texts - Color','codate'),
'subtitle' => esc_html__('Pick a custom text color for main buttons, special sections etc.','codate'),
'default' => '#fff',
'output' => array(
'color' => 'a.searchSubmit,.sticky:after,.ribbon,.ribbon a,.ribbon p,#footer .ribbon,.woocommerce #respond input#submit,.woocommerce a.button,.woocommerce button.button.alt, .woocommerce button.button,.woocommerce a.button.alt.checkout-button,input#place_order,.woocommerce input.button,#respond #submit,.tmnf_icon,a.mainbutton,#submit,#comments .navigation a,.tagssingle a,.wpcf7-submit,.page-numbers.current,.format-quote .item_inn p,.format-quote a,.post_pagination_inn a,.color_slider .owl-nav>div,.color_slider .owl-nav>div:before,.mc4wp-form input[type="submit"],#woo-inn ul li span.current',
'background-color' => '.color_slider .owl-nav>div:after',
)
),
array(
'id' => 'codate-hover-color-elements',
'type' => 'color',
'title' => esc_html__('Elements Background Hover Color','codate'),
'subtitle' => esc_html__('Pick a custom background color for main buttons, special sections etc.','codate'),
'default' => '#9b958a',
'output' => array(
'background-color' => 'a.searchSubmit:hover,.ribbon:hover,a.mainbutton:hover,.entry a.ribbon:hover,.woocommerce #respond input#submit:hover, .woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce input.button:hover,.owl-nav>div:hover,.meta_more a:hover',
'border-color' => 'input.button:hover,button.submit:hover',
'color' => '.meta_more a:hover .gimmimore',
)
),
array(
'id' => 'codate-hover-text-elements',
'type' => 'color',
'title' => esc_html__('Elements Links/Texts - Hover Color','codate'),
'subtitle' => esc_html__('Pick a custom text color for main buttons, special sections etc.','codate'),
'default' => '#fff',
'output' => array(
'color' => '.ribbon:hover,.ribbon:hover a,.ribbon:hover a,.meta.ribbon:hover a,.entry a.ribbon:hover,a.mainbutton:hover,.woocommerce #respond input#submit:hover, .woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce input.button:hover,.owl-nav>div:hover,.owl-nav>div:hover:before,.mc4wp-form input[type="submit"]:hover,.meta_more a:hover',
'background-color' => '.owl-nav>div:hover:after',
),
),
array(
'id' => 'codate-special-bg',
'type' => 'color',
'title' => esc_html__('Special Sections: Background Color','codate'),
'subtitle' => esc_html__('Pick a bg color for special sections.','codate'),
'default' => '#373737',
'output' => array(
'background-color' => '#flyoff,.content_inn .mc4wp-form,.block_title::after',
)
),
array(
'id' => 'codate-special-text',
'type' => 'color',
'title' => esc_html__('Special Sections: Text/Link Color','codate'),
'subtitle' => esc_html__('Pick a color for text in special sections.','codate'),
'default' => '#efefef',
'output' => array(
'color' => '#flyoff,#flyoff h5,#flyoff p,#flyoff a,#flyoff span,.content_inn .mc4wp-form',
)
),
// section end
)
);
// other styling THE END
$this->sections[] = array(
'type' => 'divide',
);
$this->sections[] = array(
'title' => esc_html__( 'Post Settings','codate' ),
'icon' => 'el el-edit',
'fields' => array( // header end
array(
'id' => 'tmnf-post-meta-dis',
'type' => 'checkbox',
'title' => esc_html__( 'Disable "Meta" sections','codate' ),
'subtitle' => esc_html__( 'Tick to disable post "information" - date, category etc.','codate' ),
'default' => '0'// 1 = on | 0 = off
),
array(
'id' => 'tmnf-post-nextprev-dis',
'type' => 'checkbox',
'title' => esc_html__( 'Enable Next/Previous Post Section','codate' ),
'subtitle' => esc_html__( 'Tick to disable Next/Previous section in single post page.','codate' ),
'default' => '1'// 1 = on | 0 = off
),
array(
'id' => 'tmnf-post-likes-dis',
'type' => 'checkbox',
'title' => esc_html__( 'Enable Tags Section','codate' ),
'subtitle' => esc_html__( 'Tick to disable likes/tags section in single post page.','codate' ),
'default' => '1'// 1 = on | 0 = off
),
array(
'id' => 'tmnf-post-related-dis',
'type' => 'checkbox',
'title' => esc_html__( 'Enable Related posts Section','codate' ),
'subtitle' => esc_html__( 'Tick to disable related section in single post page.','codate' ),
'default' => '1'// 1 = on | 0 = off
),
// section end
)
);
// post settings THE END
$this->sections[] = array(
'title' => esc_html__( 'Social Networks','codate'),
'icon' => 'el el-share',
'fields' => array( // header end
array(
'id' => 'tmnf-social-bottom-dis',
'type' => 'checkbox',
'title' => esc_html__( 'Enable Social Networks Section (in the footer)','codate' ),
'subtitle' => esc_html__( 'You can enable section here.','codate' ),
'default' => '0'// 1 = on | 0 = off
),
array(
'id' => 'tmnf-social-rss',
'type' => 'text',
'title' => esc_html__( 'Rss Feed','codate'),
'subtitle' => esc_html__( 'Enter full URL','codate'),
'validate' => 'url',
),
array(
'id' => 'tmnf-social-facebook',
'type' => 'text',
'title' => esc_html__( 'Facebook','codate'),
'subtitle' => esc_html__( 'Enter full URL','codate'),
'validate' => 'url',
),
array(
'id' => 'tmnf-social-twitter',
'type' => 'text',
'title' => esc_html__( 'Twitter','codate'),
'subtitle' => esc_html__( 'Enter full URL','codate'),
'validate' => 'url',
),
array(
'id' => 'tmnf-social-pinterest',
'type' => 'text',
'title' => esc_html__( 'Pinterest','codate'),
'subtitle' => esc_html__( 'Enter full URL','codate'),
'validate' => 'url',
),
array(
'id' => 'tmnf-social-instagram',
'type' => 'text',
'title' => esc_html__( 'Instagram','codate'),
'subtitle' => esc_html__( 'Enter full URL','codate'),
'validate' => 'url',
),
array(
'id' => 'tmnf-social-youtube',
'type' => 'text',
'title' => esc_html__( 'YouTube','codate'),
'subtitle' => esc_html__( 'Enter full URL','codate'),
'validate' => 'url',
),
array(
'id' => 'tmnf-social-vimeo',
'type' => 'text',
'title' => esc_html__( 'Vimeo','codate'),
'subtitle' => esc_html__( 'Enter full URL','codate'),
'validate' => 'url',
),
array(
'id' => 'tmnf-social-tumblr',
'type' => 'text',
'title' => esc_html__( 'Tumblr','codate'),
'subtitle' => esc_html__( 'Enter full URL','codate'),
'validate' => 'url',
),
array(
'id' => 'tmnf-social-500',
'type' => 'text',
'title' => esc_html__( '500px','codate'),
'subtitle' => esc_html__( 'Enter full URL','codate'),
'validate' => 'url',
),
array(
'id' => 'tmnf-social-flickr',
'type' => 'text',
'title' => esc_html__( 'Flickr','codate'),
'subtitle' => esc_html__( 'Enter full URL','codate'),
'validate' => 'url',
),
array(
'id' => 'tmnf-social-linkedin',
'type' => 'text',
'title' => esc_html__( 'LinkedIn','codate'),
'subtitle' => esc_html__( 'Enter full URL','codate'),
'validate' => 'url',
),
array(
'id' => 'tmnf-social-tripadvisor',
'type' => 'text',
'title' => esc_html__( 'TripAdvisor','codate'),
'subtitle' => esc_html__( 'Enter full URL','codate'),
'validate' => 'url',
),
array(
'id' => 'tmnf-social-foursquare',
'type' => 'text',
'title' => esc_html__( 'Foursquare','codate'),
'subtitle' => esc_html__( 'Enter full URL','codate'),
'validate' => 'url',
),
array(
'id' => 'tmnf-social-dribbble',
'type' => 'text',
'title' => esc_html__( 'Dribbble','codate'),
'subtitle' => esc_html__( 'Enter full URL','codate'),
'validate' => 'url',
),
array(
'id' => 'tmnf-social-skype',
'type' => 'text',
'title' => esc_html__( 'Skype','codate'),
'subtitle' => esc_html__( 'Enter skype URL','codate'),
),
array(
'id' => 'tmnf-social-stumbleupon',
'type' => 'text',
'title' => esc_html__( 'Stumbleupon','codate'),
'subtitle' => esc_html__( 'Enter full URL','codate'),
'validate' => 'url',
),
array(
'id' => 'tmnf-social-github',
'type' => 'text',
'title' => esc_html__( 'Github','codate'),
'subtitle' => esc_html__( 'Enter full URL','codate'),
'validate' => 'url',
),
array(
'id' => 'tmnf-social-soundcloud',
'type' => 'text',
'title' => esc_html__( 'SoundCloud','codate'),
'subtitle' => esc_html__( 'Enter full URL','codate'),
'validate' => 'url',
),
array(
'id' => 'tmnf-social-spotify',
'type' => 'text',
'title' => esc_html__( 'Spotify','codate'),
'subtitle' => esc_html__( 'Enter full URL','codate'),
'validate' => 'url',
),
array(
'id' => 'tmnf-social-xing',
'type' => 'text',
'title' => esc_html__( 'Xing','codate'),
'subtitle' => esc_html__( 'Enter full URL','codate'),
'validate' => 'url',
),
array(
'id' => 'tmnf-social-whatsapp',
'type' => 'text',
'title' => esc_html__( 'WhatsApp','codate'),
'subtitle' => esc_html__( 'Enter full URL','codate'),
'validate' => 'url',
),
array(
'id' => 'tmnf-social-vk',
'type' => 'text',
'title' => esc_html__( 'VK','codate'),
'subtitle' => esc_html__( 'Enter full URL','codate'),
'validate' => 'url',
),
array(
'id' => 'tmnf-social-snapchat',
'type' => 'text',
'title' => esc_html__( 'Snapchat','codate'),
'subtitle' => esc_html__( 'Enter full URL','codate'),
'validate' => 'url',
),
// section end
)
);
// social networks THE END
$this->sections[] = array(
'type' => 'divide',
);
$this->sections[] = array(
'title' => esc_html__( 'Import / Export','codate' ),
'desc' => esc_html__( 'Import and Export your Redux Framework settings from file, text or URL.','codate' ),
'icon' => 'el el-refresh',
'fields' => array(
array(
'id' => 'opt-import-export',
'type' => 'import_export',
'title' => esc_html__( 'Import/Export','codate'),
'subtitle' => esc_html__( 'Save and restore your Redux options','codate'),
'full_width' => false,
),
),
);
}
public function setHelpTabs() {
// Custom page help tabs, displayed using the help API. Tabs are shown in order of definition.
$this->args['help_tabs'][] = array(
'id' => 'redux-help-tab-1',
'title' => esc_html__( 'Theme Information 1','codate' ),
'content' => esc_html__( '<p>This is the tab content, HTML is allowed.</p>','codate' )
);
$this->args['help_tabs'][] = array(
'id' => 'redux-help-tab-2',
'title' => esc_html__( 'Theme Information 2','codate' ),
'content' => esc_html__( '<p>This is the tab content, HTML is allowed.</p>','codate' )
);
// Set the help sidebar
$this->args['help_sidebar'] = esc_html__( '<p>This is the sidebar content, HTML is allowed.</p>','codate' );
}
/**
* All the possible arguments for Redux.
* For full documentation on arguments, please refer to: https://github.com/ReduxFramework/ReduxFramework/wiki/Arguments
* */
public function setArguments() {
$theme = wp_get_theme(); // For use with some settings. Not necessary.
$this->args = array(
// TYPICAL -> Change these values as you need/desire
'opt_name' => 'themnific_redux',
// This is where your data is stored in the database and also becomes your global variable name.
'display_name' => $theme->get( 'Name' ),
// Name that appears at the top of your panel
'display_version' => $theme->get( 'Version' ),
// Version that appears at the top of your panel
'menu_type' => 'menu',
//Specify if the admin menu should appear or not. Options: menu or submenu (Under appearance only)
'allow_sub_menu' => true,
// Show the sections below the admin menu item or not
'menu_title' => esc_html__( 'Codate - admin panel','codate' ),
'page_title' => esc_html__( 'Codate admin panel','codate' ),
// You will need to generate a Google API key to use this feature.
// Please visit: https://developers.google.com/fonts/docs/developer_api#Auth
'google_api_key' => '',
// Set it you want google fonts to update weekly. A google_api_key value is required.
'google_update_weekly' => false,
// Must be defined to add google fonts to the typography module
'async_typography' => false,
// Use a asynchronous font on the front end or font string
//'disable_google_fonts_link' => true, // Disable this in case you want to create your own google fonts loader
'admin_bar' => true,
// Show the panel pages on the admin bar
'admin_bar_icon' => 'dashicons-portfolio',
// Choose an icon for the admin bar menu
'admin_bar_priority' => 50,
// Choose an priority for the admin bar menu
'global_variable' => '',
// Set a different name for your global variable other than the opt_name
'dev_mode' => false,
'forced_dev_mode_off' => false,
// Show the time the page took to load, etc
'update_notice' => false,
// If dev_mode is enabled, will notify developer of updated versions available in the GitHub Repo
'customizer' => true,
// Enable basic customizer support
//'open_expanded' => true, // Allow you to start the panel in an expanded way initially.
//'disable_save_warn' => true, // Disable the save warning when a user changes a field
// OPTIONAL -> Give you extra features
'page_priority' => null,
// Order where the menu appears in the admin area. If there is any conflict, something will not show. Warning.
'page_parent' => 'themes.php',
// For a full list of options, visit: http://codex.wordpress.org/Function_Reference/add_submenu_page#Parameters
'page_permissions' => 'manage_options',
// Permissions needed to access the options panel.
'menu_icon' => '',
// Specify a custom URL to an icon
'last_tab' => '',
// Force your panel to always open to a specific tab (by id)
'page_icon' => 'icon-themes',
// Icon displayed in the admin panel next to your menu_title
'page_slug' => 'themnific-options',
// Page slug used to denote the panel
'save_defaults' => true,
// On load save the defaults to DB before user clicks save or not
'default_show' => false,
// If true, shows the default value next to each field that is not the default value.
'default_mark' => '',
// What to print by the field's title if the value shown is default. Suggested: *
'show_import_export' => true,
// Shows the Import/Export panel when not used as a field.
// CAREFUL -> These options are for advanced use only
'transient_time' => 60 * MINUTE_IN_SECONDS,
'output' => true,
// Global shut-off for dynamic CSS output by the framework. Will also disable google fonts output
'output_tag' => true,
// Allows dynamic CSS to be generated for customizer and google fonts, but stops the dynamic CSS from going to the head
// 'footer_credit' => '', // Disable the footer credit of Redux. Please leave if you can help it.
// FUTURE -> Not in use yet, but reserved or partially implemented. Use at your own risk.
'database' => '',
// possible: options, theme_mods, theme_mods_expanded, transient. Not fully functional, warning!
'system_info' => false,
// REMOVE
// HINTS
'hints' => array(
'icon' => 'el el-question-sign',
'icon_position' => 'right',
'icon_color' => 'lightgray',
'icon_size' => 'normal',
'tip_style' => array(
'color' => 'light',
'shadow' => true,
'rounded' => false,
'style' => '',
),
'tip_position' => array(
'my' => 'top left',
'at' => 'bottom right',
),
'tip_effect' => array(
'show' => array(
'effect' => 'slide',
'duration' => '500',
'event' => 'mouseover',
),
'hide' => array(
'effect' => 'slide',
'duration' => '500',
'event' => 'click mouseleave',
),
),
)
);
// ADMIN BAR LINKS -> Setup custom links in the admin bar menu as external items.
$this->args['admin_bar_links'][] = array(
//'id' => 'redux-support',
'href' => 'https://nofussworks.com/docs/codate/',
'target' => '_blank',
'title' => esc_html__( 'Documentation', 'codate' ),
);
// SOCIAL ICONS -> Setup custom links in the footer for quick links in your panel footer icons.
$this->args['share_icons'][] = array(
'url' => 'https://nofussworks.com/docs/codate/',
'target' => '_blank',
'title' => esc_html__( 'Documentation', 'codate' ),
'icon' => 'el el-wrench-alt'
//'img' => '', // You can use icon OR img. IMG needs to be a full URL.
);
// Add content after the form.
$this->args['footer_text'] = esc_html__( 'No Fuss Works & Dannci','codate' );
}
}
global $reduxConfig;
$reduxConfig = new codate_redux_config();
} else {
}
// TMNF admin panel styling
function codate__add_css() {
wp_register_style(
'redux-tmnf-css',
get_template_directory_uri() .'/redux-framework/assets/redux-themnific.css',
array( 'redux-admin-css' ),
time(),
'all'
);
wp_enqueue_style('redux-tmnf-css');
}
add_action( 'redux/page/themnific_redux/enqueue', 'codate__add_css' );
// remove redux notices
function codate_remove_redux_notices() {
if ( class_exists('ReduxFrameworkPlugin') ) {
remove_filter( 'plugin_row_meta', array( ReduxFrameworkPlugin::get_instance(), 'plugin_metalinks'), null, 2 );
}
if ( class_exists('ReduxFrameworkPlugin') ) {
remove_action('admin_notices', array( ReduxFrameworkPlugin::get_instance(), 'admin_notices' ) );
}
}
add_action('init', 'codate_remove_redux_notices');