<?php
if (!defined( 'ABSPATH' )) {
exit;
}
if (!class_exists( 'Reon_Customize' )){
class Reon_Customize {
public function __construct() {
add_action( 'customize_register', array( $this, 'reon_customize_register' ) );
}
public function reon_customize_register($wp_customize) {
$this->reon_init_remove_setting( $wp_customize );
$this->reon_init_ova_typography( $wp_customize );
$this->reon_init_ova_layout( $wp_customize );
$this->reon_init_ova_header( $wp_customize );
$this->reon_init_ova_footer( $wp_customize );
$this->reon_init_ova_blog( $wp_customize );
$this->reon_init_ova_countdown( $wp_customize );
$this->reon_init_ova_event( $wp_customize );
if( reon_is_woo_active() ){
$this->reon_init_ova_woo( $wp_customize );
}
do_action( 'reon_customize_register', $wp_customize );
}
public function reon_init_remove_setting( $wp_customize ){
/* Remove Colors & Header Image Customize */
$wp_customize->remove_section('colors');
$wp_customize->remove_section('header_image');
}
/* Typo */
public function reon_init_ova_typography($wp_customize){
/* Body Pane ******************************/
$wp_customize->add_section( 'typo_general' , array(
'title' => esc_html__( 'Typography', 'reon' ),
'priority' => 1,
// 'panel' => 'typo_panel',
) );
/* General Typo */
$wp_customize->add_setting( 'general_heading', array(
'default' => '',
'sanitize_callback' => 'sanitize_text_field' // Get function name
) );
$wp_customize->add_control(
new Reon_Customize_Control_Heading(
$wp_customize,
'general_heading',
array(
'label' => esc_html__('General Typo','reon'),
'section' => 'typo_general',
'settings' => 'general_heading',
) )
);
/* General Font */
$wp_customize->add_setting( 'primary_font',
array(
'default' => reon_primary_font(),
'sanitize_callback' => 'reon_google_font_sanitization'
)
);
$wp_customize->add_control( new Reon_Google_Font_Select_Custom_Control( $wp_customize, 'primary_font',
array(
'label' => esc_html__( 'Primary Font', 'reon' ),
'section' => 'typo_general',
'input_attrs' => array(
'font_count' => 'all',
'orderby' => 'popular',
),
)
) );
/* Font Size */
$wp_customize->add_setting( 'general_font_size', array(
'type' => 'theme_mod', // or 'option'
'capability' => 'edit_theme_options',
'theme_supports' => '', // Rarely needed.
'default' => '16px',
'transport' => 'refresh', // or postMessage
'sanitize_callback' => 'sanitize_text_field' // Get function name
) );
$wp_customize->add_control('general_font_size', array(
'label' => esc_html__('Font Size','reon'),
'description' => esc_html__('Example: 16px, 1.2em','reon'),
'section' => 'typo_general',
'settings' => 'general_font_size',
'type' =>'text'
));
/* Line Height */
$wp_customize->add_setting( 'general_line_height', array(
'type' => 'theme_mod', // or 'option'
'capability' => 'edit_theme_options',
'theme_supports' => '', // Rarely needed.
'default' => '1.67',
'transport' => 'refresh', // or postMessage
'sanitize_callback' => 'sanitize_text_field' // Get function name
) );
$wp_customize->add_control('general_line_height', array(
'label' => esc_html__('Line height','reon'),
'description' => esc_html__('Example: 23px, 1.67','reon'),
'section' => 'typo_general',
'settings' => 'general_line_height',
'type' =>'text'
));
/* Letter Space */
$wp_customize->add_setting( 'general_letter_space', array(
'type' => 'theme_mod', // or 'option'
'capability' => 'edit_theme_options',
'theme_supports' => '', // Rarely needed.
'default' => '0px',
'transport' => 'refresh', // or postMessage
'sanitize_callback' => 'sanitize_text_field' // Get function name
) );
$wp_customize->add_control('general_letter_space', array(
'label' => esc_html__('Letter Spacing','reon'),
'description' => esc_html__('Example: 0px, 0.5em','reon'),
'section' => 'typo_general',
'settings' => 'general_letter_space',
'type' =>'text'
));
$wp_customize->add_setting( 'general_color', array(
'type' => 'theme_mod', // or 'option'
'capability' => 'edit_theme_options',
'theme_supports' => '', // Rarely needed.
'default' => '#666',
'transport' => 'refresh', // or postMessage
'sanitize_callback' => 'sanitize_text_field' // Get function name
) );
$wp_customize->add_control(
new WP_Customize_Color_Control(
$wp_customize,
'general_color',
array(
'label' => esc_html__("Content Color",'reon'),
'section' => 'typo_general',
'settings' => 'general_color',
) )
);
/* Message */
$wp_customize->add_setting( 'second_font_message', array(
'type' => 'theme_mod', // or 'option'
'capability' => 'edit_theme_options',
'theme_supports' => '', // Rarely needed.
'default' => '',
'transport' => 'refresh', // or postMessage
'sanitize_callback' => 'sanitize_text_field' // Get function name
) );
$wp_customize->add_control(
new Reon_Customize_Control_Heading(
$wp_customize,
'second_font_message',
array(
'label' => esc_html__('Second Font','reon'),
'section' => 'typo_general',
'settings' => 'second_font_message',
) )
);
/* Heading Font */
$wp_customize->add_setting( 'second_font',
array(
'default' => reon_second_font(),
'sanitize_callback' => 'reon_google_font_sanitization'
)
);
$wp_customize->add_control( new Reon_Google_Font_Select_Custom_Control( $wp_customize, 'second_font',
array(
'label' => esc_html__( 'Font', 'reon' ),
'section' => 'typo_general',
'input_attrs' => array(
'font_count' => 'all',
'orderby' => 'popular',
),
)
) );
/* Three Font */
$wp_customize->add_setting( 'three_font_message', array(
'type' => 'theme_mod', // or 'option'
'capability' => 'edit_theme_options',
'theme_supports' => '', // Rarely needed.
'default' => '',
'transport' => 'refresh', // or postMessage
'sanitize_callback' => 'sanitize_text_field' // Get function name
) );
$wp_customize->add_control(
new Reon_Customize_Control_Heading(
$wp_customize,
'three_font_message',
array(
'label' => esc_html__('Three Font','reon'),
'section' => 'typo_general',
'settings' => 'three_font_message',
) )
);
/* Heading Font */
$wp_customize->add_setting( 'three_font',
array(
'default' => reon_second_font(),
'sanitize_callback' => 'reon_google_font_sanitization'
)
);
$wp_customize->add_control( new Reon_Google_Font_Select_Custom_Control( $wp_customize, 'three_font',
array(
'label' => esc_html__( 'Font', 'reon' ),
'section' => 'typo_general',
'input_attrs' => array(
'font_count' => 'all',
'orderby' => 'popular',
),
)
) );
$wp_customize->add_setting( 'color_message', array(
'type' => 'theme_mod', // or 'option'
'capability' => 'edit_theme_options',
'theme_supports' => '', // Rarely needed.
'default' => '',
'transport' => 'refresh', // or postMessage
'sanitize_callback' => 'sanitize_text_field' // Get function name
) );
$wp_customize->add_control(
new Reon_Customize_Control_Heading(
$wp_customize,
'color_message',
array(
'label' => esc_html__('General Color','reon'),
'section' => 'typo_general',
'settings' => 'color_message',
) )
);
$wp_customize->add_setting( 'primary_color', array(
'type' => 'theme_mod', // or 'option'
'capability' => 'edit_theme_options',
'theme_supports' => '', // Rarely needed.
'default' => '#d9a868',
'transport' => 'refresh', // or postMessage
'sanitize_callback' => 'sanitize_text_field' // Get function name
) );
$wp_customize->add_control(
new WP_Customize_Color_Control(
$wp_customize,
'primary_color',
array(
'label' => esc_html__("Primary color",'reon'),
'section' => 'typo_general',
'settings' => 'primary_color',
) )
);
/* Custom Font */
/* Message */
$wp_customize->add_setting( 'custom_font_message', array(
'type' => 'theme_mod', // or 'option'
'capability' => 'edit_theme_options',
'theme_supports' => '', // Rarely needed.
'default' => '',
'transport' => 'refresh', // or postMessage
'sanitize_callback' => 'sanitize_text_field' // Get function name
) );
$wp_customize->add_control(
new Reon_Customize_Control_Heading(
$wp_customize,
'custom_font_message',
array(
'label' => esc_html__('Custom Font','reon'),
'section' => 'typo_general',
'settings' => 'custom_font_message',
) )
);
$wp_customize->add_control(
new Reon_Customize_Control_Heading(
$wp_customize,
'custom_font_message',
array(
'label' => esc_html__('Custom Font','reon'),
'section' => 'typo_general',
'settings' => 'custom_font_message',
) )
);
$wp_customize->add_setting( 'ova_custom_font', array(
'type' => 'theme_mod', // or 'option'
'capability' => 'edit_theme_options',
'theme_supports' => '', // Rarely needed.
'default' => '',
'transport' => 'refresh', // or postMessage
'sanitize_callback' => 'sanitize_text_field' // Get function name
) );
$wp_customize->add_control('ova_custom_font', array(
'label' => esc_html__('Custom Font','reon'),
'description' => esc_html__('Step 1: Insert font-face in style.css file: Refer https://www.w3schools.com/cssref/css3_pr_font-face_rule.asp. Step 2: Insert font-family and font-weight like format:
["Perpetua", "Regular:Bold:Italic:Light"]. Step 3: Refresh customize page to display new font in dropdown font field.','reon'),
'section' => 'typo_general',
'settings' => 'ova_custom_font',
'type' =>'textarea'
));
}
/* Layout */
public function reon_init_ova_layout( $wp_customize ){
$wp_customize->add_section( 'layout_section' , array(
'title' => esc_html__( 'Layout', 'reon' ),
'priority' => 2,
) );
$wp_customize->add_setting( 'global_preload', array(
'type' => 'theme_mod', // or 'option'
'capability' => 'edit_theme_options',
'theme_supports' => '', // Rarely needed.
'default' => 'yes',
'transport' => 'refresh', // or postMessage
'sanitize_callback' => 'sanitize_text_field' // Get function name
) );
$wp_customize->add_control('global_preload', array(
'label' => esc_html__('Preload','reon'),
'section' => 'layout_section',
'settings' => 'global_preload',
'type' =>'select',
'choices' => array(
'yes' => esc_html__('Yes', 'reon'),
'no' => esc_html__('No', 'reon')
)
));
$wp_customize->add_setting( 'global_layout', array(
'type' => 'theme_mod', // or 'option'
'capability' => 'edit_theme_options',
'theme_supports' => '', // Rarely needed.
'default' => 'layout_1c',
'transport' => 'refresh', // or postMessage
'sanitize_callback' => 'sanitize_text_field' // Get function name
) );
$wp_customize->add_control('global_layout', array(
'label' => esc_html__('Layout','reon'),
'section' => 'layout_section',
'settings' => 'global_layout',
'type' =>'select',
'choices' => apply_filters( 'reon_define_layout', '' )
));
$wp_customize->add_setting( 'global_sidebar_width', array(
'type' => 'theme_mod', // or 'option'
'capability' => 'edit_theme_options',
'theme_supports' => '', // Rarely needed.
'default' => '320',
'transport' => 'refresh', // or postMessage
'sanitize_callback' => 'sanitize_text_field' // Get function name
) );
$wp_customize->add_control('global_sidebar_width', array(
'label' => esc_html__('Sidebar Width (px)','reon'),
'section' => 'layout_section',
'settings' => 'global_sidebar_width',
'type' =>'number'
));
$wp_customize->add_setting( 'global_width_content', array(
'type' => 'theme_mod', // or 'option'
'capability' => 'edit_theme_options',
'theme_supports' => '', // Rarely needed.
'default' => '1170',
'transport' => 'refresh', // or postMessage
'sanitize_callback' => 'sanitize_text_field' // Get function name
) );
$wp_customize->add_control('global_width_content', array(
'label' => esc_html__('Width Content (px)','reon'),
'section' => 'layout_section',
'settings' => 'global_width_content',
'type' =>'number',
'default' => '1170'
));
$wp_customize->add_setting( 'global_width_site', array(
'type' => 'theme_mod', // or 'option'
'capability' => 'edit_theme_options',
'theme_supports' => '', // Rarely needed.
'default' => 'wide',
'transport' => 'refresh', // or postMessage
'sanitize_callback' => 'sanitize_text_field' // Get function name
) );
$wp_customize->add_control('global_width_site', array(
'label' => esc_html__('Width Site','reon'),
'section' => 'layout_section',
'settings' => 'global_width_site',
'type' =>'select',
'choices' => apply_filters('reon_define_wide_boxed', '')
));
$wp_customize->add_setting( 'global_boxed_container_width', array(
'type' => 'theme_mod', // or 'option'
'capability' => 'edit_theme_options',
'theme_supports' => '', // Rarely needed.
'default' => '1170',
'transport' => 'refresh', // or postMessage
'sanitize_callback' => 'sanitize_text_field' // Get function name
) );
$wp_customize->add_control('global_boxed_container_width', array(
'label' => esc_html__('Boxed Container Width (px)','reon'),
'section' => 'layout_section',
'settings' => 'global_boxed_container_width',
'type' =>'number',
'default' => '1170'
));
$wp_customize->add_setting( 'global_boxed_offset', array(
'type' => 'theme_mod', // or 'option'
'capability' => 'edit_theme_options',
'theme_supports' => '', // Rarely needed.
'default' => '20',
'transport' => 'refresh', // or postMessage
'sanitize_callback' => 'sanitize_text_field' // Get function name
) );
$wp_customize->add_control('global_boxed_offset', array(
'label' => esc_html__('Boxed Offset (px)','reon'),
'section' => 'layout_section',
'settings' => 'global_boxed_offset',
'type' =>'number',
'default' => '20'
));
}
/* Header */
public function reon_init_ova_header( $wp_customize ){
$wp_customize->add_section( 'header_section' , array(
'title' => esc_html__( 'Header', 'reon' ),
'priority' => 3,
) );
$wp_customize->add_setting( 'global_header', array(
'type' => 'theme_mod', // or 'option'
'capability' => 'edit_theme_options',
'theme_supports' => '', // Rarely needed.
'default' => 'default',
'transport' => 'refresh', // or postMessage
'sanitize_callback' => 'sanitize_text_field' // Get function name
) );
$wp_customize->add_control('global_header', array(
'label' => esc_html__('Header Default','reon'),
'description' => esc_html__('This isn\'t effect in Blog' ,'reon'),
'section' => 'header_section',
'settings' => 'global_header',
'type' =>'select',
'choices' => apply_filters('reon_list_header', '')
));
}
/* Footer */
public function reon_init_ova_footer( $wp_customize ){
$wp_customize->add_section( 'footer_section' , array(
'title' => esc_html__( 'Footer', 'reon' ),
'priority' => 4,
) );
$wp_customize->add_setting( 'global_footer', array(
'type' => 'theme_mod', // or 'option'
'capability' => 'edit_theme_options',
'theme_supports' => '', // Rarely needed.
'default' => 'default',
'transport' => 'refresh', // or postMessage
'sanitize_callback' => 'sanitize_text_field' // Get function name
) );
$wp_customize->add_control('global_footer', array(
'label' => esc_html__('Footer Default','reon'),
'description' => esc_html__('This isn\'t effect in Blog' ,'reon'),
'section' => 'footer_section',
'settings' => 'global_footer',
'type' =>'select',
'choices' => apply_filters('reon_list_footer', '')
));
}
/* Blog */
public function reon_init_ova_blog( $wp_customize ){
$wp_customize->add_panel( 'blog_panel', array(
'title' => esc_html__( 'Blog', 'reon' ),
'priority' => 5,
) );
$wp_customize->add_section( 'blog_section' , array(
'title' => esc_html__( 'Archive', 'reon' ),
'priority' => 30,
'panel' => 'blog_panel',
) );
$wp_customize->add_setting( 'blog_type', array(
'type' => 'theme_mod', // or 'option'
'capability' => 'edit_theme_options',
'theme_supports' => '', // Rarely needed.
'default' => 'default',
'transport' => 'refresh', // or postMessage
'sanitize_callback' => 'sanitize_text_field' // Get function name
) );
$wp_customize->add_control('blog_type', array(
'label' => esc_html__('Type','reon'),
'section' => 'blog_section',
'settings' => 'blog_type',
'type' =>'select',
'choices' => array(
'default' => esc_html__('Default', 'reon'),
'version1' => esc_html__('Version 1', 'reon')
)
));
$wp_customize->add_setting( 'blog_layout', array(
'type' => 'theme_mod', // or 'option'
'capability' => 'edit_theme_options',
'theme_supports' => '', // Rarely needed.
'default' => 'layout_2r',
'transport' => 'refresh', // or postMessage
'sanitize_callback' => 'sanitize_text_field' // Get function name
) );
$wp_customize->add_control('blog_layout', array(
'label' => esc_html__('Layout','reon'),
'section' => 'blog_section',
'settings' => 'blog_layout',
'type' =>'select',
'choices' => apply_filters( 'reon_define_layout', '' )
));
$wp_customize->add_setting( 'blog_sidebar_width', array(
'type' => 'theme_mod', // or 'option'
'capability' => 'edit_theme_options',
'theme_supports' => '', // Rarely needed.
'default' => '320',
'transport' => 'refresh', // or postMessage
'sanitize_callback' => 'sanitize_text_field' // Get function name
) );
$wp_customize->add_control('blog_sidebar_width', array(
'label' => esc_html__('Sidebar Width (px)','reon'),
'section' => 'blog_section',
'settings' => 'blog_sidebar_width',
'type' =>'number'
));
$wp_customize->add_setting( 'show_title', array(
'type' => 'theme_mod', // or 'option'
'capability' => 'edit_theme_options',
'theme_supports' => '', // Rarely needed.
'default' => 'yes',
'transport' => 'refresh', // or postMessage
'sanitize_callback' => 'sanitize_text_field' // Get function name
) );
$wp_customize->add_control('show_title', array(
'label' => esc_html__('Show Title','reon'),
'section' => 'blog_section',
'settings' => 'show_title',
'type' =>'radio',
'choices' => array(
'yes' => esc_html__('Yes', 'reon'),
'no' => esc_html__('No', 'reon'),
)
));
$wp_customize->add_setting( 'show_date', array(
'type' => 'theme_mod', // or 'option'
'capability' => 'edit_theme_options',
'theme_supports' => '', // Rarely needed.
'default' => 'yes',
'transport' => 'refresh', // or postMessage
'sanitize_callback' => 'sanitize_text_field' // Get function name
) );
$wp_customize->add_control('show_date', array(
'label' => esc_html__('Show Date','reon'),
'section' => 'blog_section',
'settings' => 'show_date',
'type' =>'radio',
'choices' => array(
'yes' => esc_html__('Yes', 'reon'),
'no' => esc_html__('No', 'reon'),
)
));
$wp_customize->add_setting( 'show_excerpt', array(
'type' => 'theme_mod', // or 'option'
'capability' => 'edit_theme_options',
'theme_supports' => '', // Rarely needed.
'default' => 'yes',
'transport' => 'refresh', // or postMessage
'sanitize_callback' => 'sanitize_text_field' // Get function name
) );
$wp_customize->add_control('show_excerpt', array(
'label' => esc_html__('Show Exerpt','reon'),
'section' => 'blog_section',
'settings' => 'show_excerpt',
'type' =>'radio',
'choices' => array(
'yes' => esc_html__('Yes', 'reon'),
'no' => esc_html__('No', 'reon'),
)
));
$wp_customize->add_setting( 'show_readmore', array(
'type' => 'theme_mod', // or 'option'
'capability' => 'edit_theme_options',
'theme_supports' => '', // Rarely needed.
'default' => 'yes',
'transport' => 'refresh', // or postMessage
'sanitize_callback' => 'sanitize_text_field' // Get function name
) );
$wp_customize->add_control('show_readmore', array(
'label' => esc_html__('Show Readmore','reon'),
'section' => 'blog_section',
'settings' => 'show_readmore',
'type' =>'radio',
'choices' => array(
'yes' => esc_html__('Yes', 'reon'),
'no' => esc_html__('No', 'reon'),
)
));
$wp_customize->add_setting( 'header_blog_background_image', array(
'type' => 'theme_mod', // or 'option'
'capability' => 'edit_theme_options',
'theme_supports' => '', // Rarely needed.
'transport' => 'refresh', // or postMessage
'sanitize_callback' => 'sanitize_text_field' // Get function name
) );
$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'header_blog_background_image', array(
'label' => esc_html__('Header Blog Background Image', 'reon'),
'section' => 'blog_section',
'settings' => 'header_blog_background_image',
)));
$wp_customize->add_setting( 'header_blog_title', array(
'type' => 'theme_mod', // or 'option'
'capability' => 'edit_theme_options',
'theme_supports' => '', // Rarely needed.
'transport' => 'refresh', // or postMessage
'sanitize_callback' => 'sanitize_text_field' // Get function name
) );
$wp_customize->add_control('header_blog_title', array(
'label' => esc_html__('Title Header Blog','reon'),
'section' => 'blog_section',
'settings' => 'header_blog_title',
'type' =>'text',
));
$wp_customize->add_setting( 'header_blog_desc', array(
'type' => 'theme_mod', // or 'option'
'capability' => 'edit_theme_options',
'theme_supports' => '', // Rarely needed.
'transport' => 'refresh', // or postMessage
'sanitize_callback' => 'sanitize_text_field' // Get function name
) );
$wp_customize->add_control('header_blog_desc', array(
'label' => esc_html__('Description Header Blog','reon'),
'section' => 'blog_section',
'settings' => 'header_blog_desc',
'type' =>'textarea',
));
$wp_customize->add_setting( 'blog_header', array(
'type' => 'theme_mod', // or 'option'
'capability' => 'edit_theme_options',
'theme_supports' => '', // Rarely needed.
'default' => 'default',
'transport' => 'refresh', // or postMessage
'sanitize_callback' => 'sanitize_text_field' // Get function name
) );
$wp_customize->add_control('blog_header', array(
'label' => esc_html__('Header','reon'),
'section' => 'blog_section',
'settings' => 'blog_header',
'type' =>'select',
'choices' => apply_filters('reon_list_header', '')
));
$wp_customize->add_setting( 'blog_footer', array(
'type' => 'theme_mod', // or 'option'
'capability' => 'edit_theme_options',
'theme_supports' => '', // Rarely needed.
'default' => 'default',
'transport' => 'refresh', // or postMessage
'sanitize_callback' => 'sanitize_text_field' // Get function name
) );
$wp_customize->add_control('blog_footer', array(
'label' => esc_html__('Footer','reon'),
'section' => 'blog_section',
'settings' => 'blog_footer',
'type' =>'select',
'choices' => apply_filters('reon_list_footer', '')
));
$wp_customize->add_section( 'single_section' , array(
'title' => esc_html__( 'Single', 'reon' ),
'priority' => 30,
'panel' => 'blog_panel',
) );
$wp_customize->add_setting( 'single_layout', array(
'type' => 'theme_mod', // or 'option'
'capability' => 'edit_theme_options',
'theme_supports' => '', // Rarely needed.
'default' => 'layout_2r',
'transport' => 'refresh', // or postMessage
'sanitize_callback' => 'sanitize_text_field' // Get function name
) );
$wp_customize->add_control('single_layout', array(
'label' => esc_html__('Layout','reon'),
'section' => 'single_section',
'settings' => 'single_layout',
'type' =>'select',
'choices' => apply_filters( 'reon_define_layout', '' )
));
$wp_customize->add_setting( 'single_sidebar_width', array(
'type' => 'theme_mod', // or 'option'
'capability' => 'edit_theme_options',
'theme_supports' => '', // Rarely needed.
'default' => '320',
'transport' => 'refresh', // or postMessage
'sanitize_callback' => 'sanitize_text_field' // Get function name
) );
$wp_customize->add_control('single_sidebar_width', array(
'label' => esc_html__('Sidebar Width (px)','reon'),
'section' => 'single_section',
'settings' => 'single_sidebar_width',
'type' =>'number'
));
$wp_customize->add_setting( 'single_header', array(
'type' => 'theme_mod', // or 'option'
'capability' => 'edit_theme_options',
'theme_supports' => '', // Rarely needed.
'default' => 'default',
'transport' => 'refresh', // or postMessage
'sanitize_callback' => 'sanitize_text_field' // Get function name
) );
$wp_customize->add_control('single_header', array(
'label' => esc_html__('Header','reon'),
'section' => 'single_section',
'settings' => 'single_header',
'type' =>'select',
'choices' => apply_filters('reon_list_header', '')
));
$wp_customize->add_setting( 'single_header_background_image', array(
'type' => 'theme_mod', // or 'option'
'capability' => 'edit_theme_options',
'theme_supports' => '', // Rarely needed.
'transport' => 'refresh', // or postMessage
'sanitize_callback' => 'sanitize_text_field' // Get function name
) );
$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'single_header_background_image', array(
'label' => esc_html__('Header Background Image', 'reon'),
'section' => 'single_section',
'settings' => 'single_header_background_image',
)));
$wp_customize->add_setting( 'single_header_background_title', array(
'type' => 'theme_mod', // or 'option'
'capability' => 'edit_theme_options',
'theme_supports' => '', // Rarely needed.
'transport' => 'refresh', // or postMessage
'default' => 'Blog Detail',
'sanitize_callback' => 'sanitize_text_field' // Get function name
) );
$wp_customize->add_setting( 'single_footer', array(
'type' => 'theme_mod', // or 'option'
'capability' => 'edit_theme_options',
'theme_supports' => '', // Rarely needed.
'default' => 'default',
'transport' => 'refresh', // or postMessage
'sanitize_callback' => 'sanitize_text_field' // Get function name
) );
$wp_customize->add_control('single_footer', array(
'label' => esc_html__('Footer','reon'),
'section' => 'single_section',
'settings' => 'single_footer',
'type' =>'select',
'choices' => apply_filters('reon_list_footer', '')
));
}
/* Event Setting */
public function reon_init_ova_event( $wp_customize ){
$wp_customize->add_panel( 'event_panel', array(
'title' => esc_html__( 'Event', 'reon' ),
'priority' => 6,
) );
$wp_customize->add_section( 'event_section' , array(
'title' => esc_html__( 'Archive', 'reon' ),
'priority' => 31,
'panel' => 'event_panel',
) );
$wp_customize->add_setting( 'show_title_event', array(
'type' => 'theme_mod', // or 'option'
'capability' => 'edit_theme_options',
'theme_supports' => '', // Rarely needed.
'default' => 'yes',
'transport' => 'refresh', // or postMessage
'sanitize_callback' => 'sanitize_text_field' // Get function name
) );
$wp_customize->add_control('show_title_event', array(
'label' => esc_html__('Show Title','reon'),
'section' => 'event_section',
'settings' => 'show_title_event',
'type' =>'radio',
'choices' => array(
'yes' => esc_html__('Yes', 'reon'),
'no' => esc_html__('No', 'reon'),
)
));
$wp_customize->add_setting( 'show_date_event', array(
'type' => 'theme_mod', // or 'option'
'capability' => 'edit_theme_options',
'theme_supports' => '', // Rarely needed.
'default' => 'yes',
'transport' => 'refresh', // or postMessage
'sanitize_callback' => 'sanitize_text_field' // Get function name
) );
$wp_customize->add_control('show_date_event', array(
'label' => esc_html__('Show Date','reon'),
'section' => 'event_section',
'settings' => 'show_date_event',
'type' =>'radio',
'choices' => array(
'yes' => esc_html__('Yes', 'reon'),
'no' => esc_html__('No', 'reon'),
)
));
$wp_customize->add_setting( 'show_excerpt_event', array(
'type' => 'theme_mod', // or 'option'
'capability' => 'edit_theme_options',
'theme_supports' => '', // Rarely needed.
'default' => 'yes',
'transport' => 'refresh', // or postMessage
'sanitize_callback' => 'sanitize_text_field' // Get function name
) );
$wp_customize->add_control('show_excerpt_event', array(
'label' => esc_html__('Show Exerpt','reon'),
'section' => 'event_section',
'settings' => 'show_excerpt_event',
'type' =>'radio',
'choices' => array(
'yes' => esc_html__('Yes', 'reon'),
'no' => esc_html__('No', 'reon'),
)
));
$wp_customize->add_setting( 'show_readmore_event', array(
'type' => 'theme_mod', // or 'option'
'capability' => 'edit_theme_options',
'theme_supports' => '', // Rarely needed.
'default' => 'yes',
'transport' => 'refresh', // or postMessage
'sanitize_callback' => 'sanitize_text_field' // Get function name
) );
$wp_customize->add_control('show_readmore_event', array(
'label' => esc_html__('Show Readmore','reon'),
'section' => 'event_section',
'settings' => 'show_readmore_event',
'type' =>'radio',
'choices' => array(
'yes' => esc_html__('Yes', 'reon'),
'no' => esc_html__('No', 'reon'),
)
));
$wp_customize->add_setting( 'text_read_more_event', array(
'type' => 'theme_mod', // or 'option'
'capability' => 'edit_theme_options',
'theme_supports' => '', // Rarely needed.
'transport' => 'refresh', // or postMessage
'sanitize_callback' => 'sanitize_text_field', // Get function name
'default' => 'READ MORE'
) );
$wp_customize->add_control('text_read_more_event', array(
'label' => esc_html__('Text Read More','reon'),
'section' => 'event_section',
'settings' => 'text_read_more_event',
'type' =>'text',
));
$wp_customize->add_setting( 'header_event_background_image', array(
'type' => 'theme_mod', // or 'option'
'capability' => 'edit_theme_options',
'theme_supports' => '', // Rarely needed.
'transport' => 'refresh', // or postMessage
'sanitize_callback' => 'sanitize_text_field' // Get function name
) );
$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'header_event_background_image', array(
'label' => esc_html__('Header Event Background Image', 'reon'),
'section' => 'event_section',
'settings' => 'header_event_background_image',
)));
$wp_customize->add_setting( 'header_event_title', array(
'type' => 'theme_mod', // or 'option'
'capability' => 'edit_theme_options',
'theme_supports' => '', // Rarely needed.
'transport' => 'refresh', // or postMessage
'sanitize_callback' => 'sanitize_text_field', // Get function name
'default' => 'Our Events'
) );
$wp_customize->add_control('header_event_title', array(
'label' => esc_html__('Title Header Event','reon'),
'section' => 'event_section',
'settings' => 'header_event_title',
'type' =>'text',
));
$wp_customize->add_setting( 'header_event_desc', array(
'type' => 'theme_mod', // or 'option'
'capability' => 'edit_theme_options',
'theme_supports' => '', // Rarely needed.
'transport' => 'refresh', // or postMessage
'sanitize_callback' => 'sanitize_text_field', // Get function name
'default' => 'Eget duis at tellus at urna condimentum. Mauris sit amet massa. Nullam non nisi est sit amet.'
) );
$wp_customize->add_control('header_event_desc', array(
'label' => esc_html__('Description Header Event','reon'),
'section' => 'event_section',
'settings' => 'header_event_desc',
'type' =>'textarea',
));
$wp_customize->add_setting( 'event_header', array(
'type' => 'theme_mod', // or 'option'
'capability' => 'edit_theme_options',
'theme_supports' => '', // Rarely needed.
'default' => 'default',
'transport' => 'refresh', // or postMessage
'sanitize_callback' => 'sanitize_text_field' // Get function name
) );
$wp_customize->add_control('event_header', array(
'label' => esc_html__('Header','reon'),
'section' => 'event_section',
'settings' => 'event_header',
'type' =>'select',
'choices' => apply_filters('reon_list_header', '')
));
$wp_customize->add_setting( 'event_footer', array(
'type' => 'theme_mod', // or 'option'
'capability' => 'edit_theme_options',
'theme_supports' => '', // Rarely needed.
'default' => 'default',
'transport' => 'refresh', // or postMessage
'sanitize_callback' => 'sanitize_text_field' // Get function name
) );
$wp_customize->add_control('event_footer', array(
'label' => esc_html__('Footer','reon'),
'section' => 'event_section',
'settings' => 'event_footer',
'type' =>'select',
'choices' => apply_filters('reon_list_footer', '')
));
}
public function reon_init_ova_woo( $wp_customize ){
$wp_customize->add_setting( 'woo_layout', array(
'type' => 'theme_mod', // or 'option'
'capability' => 'edit_theme_options',
'theme_supports' => '', // Rarely needed.
'default' => 'layout_1c',
'transport' => 'refresh', // or postMessage
'sanitize_callback' => 'sanitize_text_field' // Get function name
) );
$wp_customize->add_control('woo_layout', array(
'label' => esc_html__('Layout Archive','reon'),
'section' => 'rental_list_section',
'settings' => 'woo_layout',
'type' =>'select',
'choices' => apply_filters( 'reon_define_layout', '' )
));
$wp_customize->add_setting( 'woo_sidebar_width', array(
'type' => 'theme_mod', // or 'option'
'capability' => 'edit_theme_options',
'theme_supports' => '', // Rarely needed.
'default' => '320',
'transport' => 'refresh', // or postMessage
'sanitize_callback' => 'sanitize_text_field' // Get function name
) );
$wp_customize->add_control('woo_sidebar_width', array(
'label' => esc_html__('Sidebar Width (px)','reon'),
'section' => 'rental_list_section',
'settings' => 'woo_sidebar_width',
'type' =>'number'
));
}
/* Countdown */
public function reon_init_ova_countdown( $wp_customize ){
$wp_customize->add_section( 'countdown_language', array(
'title' => esc_html__( 'Language Countdown', 'reon' ),
'priority' => 10,
) );
$wp_customize->add_setting( 'choice_language', array(
'type' => 'theme_mod', // or 'option'
'capability' => 'edit_theme_options',
'theme_supports' => '', // Rarely needed.
'default' => '',
'transport' => 'refresh', // or postMessage
'sanitize_callback' => 'sanitize_text_field' // Get function name
) );
$wp_customize->add_control('choice_language', array(
'label' => esc_html__('Language','reon'),
'section' => 'countdown_language',
'settings' => 'choice_language',
'type' =>'select',
'choices' => array(
'' => 'English',
'ar' => 'Arabic',
'bg' => 'Bulgarian',
'bn' => 'Bengali/Bangla',
'bs' => 'Bosnian',
'ca' => 'Catalan',
'cs' => 'Czech',
'cy' => 'Welsh',
'da' => 'Danish',
'de' => 'German',
'el' => 'Greek',
'es' => 'Spanish',
'et' => 'Estonian',
'fa' => 'Farsi/Persian',
'fi' => 'Finnish',
'fo' => 'Faroese',
'fr' => 'French',
'gl' => 'Galician',
'gu' => 'Gujarati',
'he' => 'Hebrew',
'hr' => 'Croatian',
'hu' => 'Hungarian',
'hy' => 'Armenian',
'id' => 'Indonesian',
'is' => 'Icelandic',
'it' => 'Italian',
'ja' => 'Japanese',
'kn' => 'Kannada',
'ko' => 'Korean',
'lt' => 'Lithuanian',
'lv' => 'Latvian',
'mk' => 'Macedonian',
'ml' => 'Malayalam',
'ms' => 'Malaysian',
'my' => 'Burmese',
'nb' => 'Norwegian',
'nl' => 'Dutch',
'pl' => 'Polish',
'pt-BR' => 'Portuguese/Brazilian',
'ro' => 'Romanian',
'ru' => 'Russian',
'sk' => 'Slovak',
'sl' => 'Slovenian',
'sq' => 'Albanian',
'sr-SR' => 'Serbian Latin',
'sr' => 'Serbian Cyrillic',
'sv' => 'Swedish',
'th' => 'Thai',
'tr' => 'Turkish',
'uk' => 'Ukrainian',
'ur' => 'Urdu',
'uz' => 'Uzbek',
'vi' => 'Vietnamese',
'zh-CN' => 'Chinese/Simplified',
'zh-TW' => 'Chinese/Traditional',
),
));
}
}
}
new Reon_Customize();