|
Server IP : 10.131.40.8 / Your IP : 216.73.216.37 Web Server : Apache System : Linux webd008.cluster131.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64 User : ludmqhh ( 137773) PHP Version : 8.4.10 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /home/ludmqhh/www/guillaume/wp-content/themes/flexblog/framework/customizer/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
<?php
add_action('customize_register', 'infinity_customize_register');
function infinity_customize_register( $wp_customize ) {
// Change Priority
$wp_customize->get_section( 'title_tagline' )->priority = 9999;
/**
* ----------------------------------------------------------------------------------------
* Sanitize Callback Functions
* ----------------------------------------------------------------------------------------
*/
function infinity_checkbox_callback ( $value ) {
return $value;
}
function infinity_number_callback ( $value ) {
return $value;
}
function infinity_text_callback ( $value ) {
return $value;
}
function infinity_textarea_callback ( $value ) {
return $value;
}
function infinity_radio_callback ( $value ) {
return $value;
}
function infinity_select_callback ( $value ) {
return $value;
}
/**
* ----------------------------------------------------------------------------------------
* Color Pannel
* ----------------------------------------------------------------------------------------
*/
$wp_customize->add_panel( 'color', array(
'priority' => 1,
'capability' => 'edit_theme_options',
'title' => esc_html__( 'Colors', 'flexblog' ),
'description' => '',
));
/**
* ----------------------------------------------------------------------------------------
* Header Color Section
* ----------------------------------------------------------------------------------------
*/
$wp_customize->add_section('infinity_header_color', array(
'title' => esc_html__( 'Header', 'flexblog' ),
'priority' => 10,
'capability' => 'edit_theme_options',
'panel' => 'color',
));
// Top Bar Background Color Setting
$wp_customize->add_setting( 'infinity_header_color[tb_bg]', array(
'default' => '#272727',
'type' => 'option',
'transport' => 'postMessage',
'sanitize_callback' => 'sanitize_hex_color'
));
// Top Bar Background Color Control
$wp_customize->add_control(
new WP_Customize_Color_Control( $wp_customize, 'infinity_header_color[tb_bg]', array(
'label' => esc_html__( 'Background', 'flexblog' ),
'section' => 'infinity_header_color'
)
));
// Top Bar Main Color Setting
$wp_customize->add_setting( 'infinity_header_color[tb_text]', array(
'default' => '#ffffff',
'type' => 'option',
'transport' => 'postMessage',
'sanitize_callback' => 'sanitize_hex_color'
));
// Top Bar Main Color Control
$wp_customize->add_control(
new WP_Customize_Color_Control( $wp_customize, 'infinity_header_color[tb_text]', array(
'label' => esc_html__( 'Text', 'flexblog' ),
'section' => 'infinity_header_color'
)
));
// Top Bar Main Hover Color Setting
$wp_customize->add_setting( 'infinity_header_color[tb_text_hv]', array(
'default' => '#c69c53',
'type' => 'option',
'transport' => 'postMessage',
'sanitize_callback' => 'sanitize_hex_color'
));
// Top Bar Main Hover Color Control
$wp_customize->add_control(
new WP_Customize_Color_Control( $wp_customize, 'infinity_header_color[tb_text_hv]', array(
'label' => esc_html__( 'Text Hover', 'flexblog' ),
'section' => 'infinity_header_color'
)
));
// Top Bar Sub Menu Text Color Setting
$wp_customize->add_setting( 'infinity_header_color[tb_sub_text]', array(
'default' => '#aaaaaa',
'type' => 'option',
'transport' => 'postMessage',
'sanitize_callback' => 'sanitize_hex_color'
));
// Top Bar Sub Menu Text Color Control
$wp_customize->add_control(
new WP_Customize_Color_Control( $wp_customize, 'infinity_header_color[tb_sub_text]', array(
'label' => esc_html__( 'Text', 'flexblog' ),
'section' => 'infinity_header_color'
)
));
// Top Bar Sub Menu Text Hover Color Setting
$wp_customize->add_setting( 'infinity_header_color[tb_sub_text_hv]', array(
'default' => '#ffffff',
'type' => 'option',
'transport' => 'postMessage',
'sanitize_callback' => 'sanitize_hex_color'
));
// Top Bar Sub Menu Text Hover Color Control
$wp_customize->add_control(
new WP_Customize_Color_Control( $wp_customize, 'infinity_header_color[tb_sub_text_hv]', array(
'label' => esc_html__( 'Text Hover', 'flexblog' ),
'section' => 'infinity_header_color'
)
));
// Top Bar Sub Menu background Color Setting
$wp_customize->add_setting( 'infinity_header_color[tb_sub_bg]', array(
'default' => '#272727',
'type' => 'option',
'transport' => 'postMessage',
'sanitize_callback' => 'sanitize_hex_color'
));
// Top Bar Sub Menu background Color Control
$wp_customize->add_control(
new WP_Customize_Color_Control( $wp_customize, 'infinity_header_color[tb_sub_bg]', array(
'label' => esc_html__( 'Background', 'flexblog' ),
'section' => 'infinity_header_color'
)
));
// Top Bar Sub Menu background Hover Color Setting
$wp_customize->add_setting( 'infinity_header_color[tb_sub_bg_hv]', array(
'default' => '#333333',
'type' => 'option',
'transport' => 'postMessage',
'sanitize_callback' => 'sanitize_hex_color'
));
// Top Bar Sub Menu background Hover Color Control
$wp_customize->add_control(
new WP_Customize_Color_Control( $wp_customize, 'infinity_header_color[tb_sub_bg_hv]', array(
'label' => esc_html__( 'Background Hover', 'flexblog' ),
'section' => 'infinity_header_color'
)
));
// Top Bar Sub Menu Border Color Setting
$wp_customize->add_setting( 'infinity_header_color[tb_sub_border]', array(
'default' => '#2d2d2d',
'type' => 'option',
'transport' => 'postMessage',
'sanitize_callback' => 'sanitize_hex_color'
));
// Top Bar Sub Menu Border Color Control
$wp_customize->add_control(
new WP_Customize_Color_Control( $wp_customize, 'infinity_header_color[tb_sub_border]', array(
'label' => esc_html__( 'Border', 'flexblog' ),
'section' => 'infinity_header_color'
)
));
// Main Menu Background Color Setting
$wp_customize->add_setting( 'infinity_header_color[mm_bg]', array(
'default' => '#ffffff',
'type' => 'option',
'transport' => 'postMessage',
'sanitize_callback' => 'sanitize_hex_color'
));
// Main Menu Background Color Control
$wp_customize->add_control(
new WP_Customize_Color_Control( $wp_customize, 'infinity_header_color[mm_bg]', array(
'label' => esc_html__( 'Background', 'flexblog' ),
'section' => 'infinity_header_color'
)
));
// Main Menu Color Setting
$wp_customize->add_setting( 'infinity_header_color[mm_text]', array(
'default' => '#222222',
'type' => 'option',
'transport' => 'postMessage',
'sanitize_callback' => 'sanitize_hex_color'
));
// Main Menu Color Control
$wp_customize->add_control(
new WP_Customize_Color_Control( $wp_customize, 'infinity_header_color[mm_text]', array(
'label' => esc_html__( 'Text', 'flexblog' ),
'section' => 'infinity_header_color'
)
));
// Main Menu Hover Color Setting
$wp_customize->add_setting( 'infinity_header_color[mm_text_hv]', array(
'default' => '#c69c53',
'type' => 'option',
'transport' => 'postMessage',
'sanitize_callback' => 'sanitize_hex_color'
));
// Main Menu Hover Color Control
$wp_customize->add_control(
new WP_Customize_Color_Control( $wp_customize, 'infinity_header_color[mm_text_hv]', array(
'label' => esc_html__( 'Text Hover', 'flexblog' ),
'section' => 'infinity_header_color'
)
));
// Main Menu Sub Menu Text Color Setting
$wp_customize->add_setting( 'infinity_header_color[mm_sub_text]', array(
'default' => '#333333',
'type' => 'option',
'transport' => 'postMessage',
'sanitize_callback' => 'sanitize_hex_color'
));
// Main Menu Sub Menu Text Color Control
$wp_customize->add_control(
new WP_Customize_Color_Control( $wp_customize, 'infinity_header_color[mm_sub_text]', array(
'label' => esc_html__( 'Text', 'flexblog' ),
'section' => 'infinity_header_color'
)
));
// Main Menu Sub Menu Text Hover Color Setting
$wp_customize->add_setting( 'infinity_header_color[mm_sub_text_hv]', array(
'default' => '#c69c53',
'type' => 'option',
'transport' => 'postMessage',
'sanitize_callback' => 'sanitize_hex_color'
));
// Main Menu Sub Menu Text Hover Color Control
$wp_customize->add_control(
new WP_Customize_Color_Control( $wp_customize, 'infinity_header_color[mm_sub_text_hv]', array(
'label' => esc_html__( 'Text Hover', 'flexblog' ),
'section' => 'infinity_header_color'
)
));
// Main Menu Sub Menu background Color Setting
$wp_customize->add_setting( 'infinity_header_color[mm_sub_bg]', array(
'default' => '#ffffff',
'type' => 'option',
'transport' => 'postMessage',
'sanitize_callback' => 'sanitize_hex_color'
));
// Main Menu Sub Menu background Color Control
$wp_customize->add_control(
new WP_Customize_Color_Control( $wp_customize, 'infinity_header_color[mm_sub_bg]', array(
'label' => esc_html__( 'Background', 'flexblog' ),
'section' => 'infinity_header_color'
)
));
// Main Menu Sub Menu background Hover Color Setting
$wp_customize->add_setting( 'infinity_header_color[mm_sub_bg_hv]', array(
'default' => '#f8f8f8',
'type' => 'option',
'transport' => 'postMessage',
'sanitize_callback' => 'sanitize_hex_color'
));
// Main Menu Sub Menu background Hover Color Control
$wp_customize->add_control(
new WP_Customize_Color_Control( $wp_customize, 'infinity_header_color[mm_sub_bg_hv]', array(
'label' => esc_html__( 'Background Hover', 'flexblog' ),
'section' => 'infinity_header_color'
)
));
// Main Menu Sub Menu Border Color Setting
$wp_customize->add_setting( 'infinity_header_color[mm_sub_border]', array(
'default' => '#e8e8e8',
'type' => 'option',
'transport' => 'postMessage',
'sanitize_callback' => 'sanitize_hex_color'
));
// Main Menu Sub Menu Border Color Control
$wp_customize->add_control(
new WP_Customize_Color_Control( $wp_customize, 'infinity_header_color[mm_sub_border]', array(
'label' => esc_html__( 'Border', 'flexblog' ),
'section' => 'infinity_header_color'
)
));
/**
* ----------------------------------------------------------------------------------------
* Carousel Section
* ----------------------------------------------------------------------------------------
*/
$wp_customize->add_section('infinity_carousel_color', array(
'title' => esc_html__( 'Carousel', 'flexblog' ),
'priority' => 25,
'capability' => 'edit_theme_options',
'panel' => 'color',
));
// Carousel Title Color Setting
$wp_customize->add_setting( 'infinity_carousel_color[title]', array(
'default' => '#ffffff',
'type' => 'option',
'transport' => 'postMessage',
'sanitize_callback' => 'sanitize_hex_color'
));
// Carousel Title Color Control
$wp_customize->add_control(
new WP_Customize_Color_Control( $wp_customize, 'infinity_carousel_color[title]', array(
'label' => esc_html__( 'Title', 'flexblog' ),
'section' => 'infinity_carousel_color'
)
));
// Carousel Text Color Setting
$wp_customize->add_setting( 'infinity_carousel_color[text]', array(
'default' => '#ffffff',
'type' => 'option',
'transport' => 'postMessage',
'sanitize_callback' => 'sanitize_hex_color'
));
// Carousel Text Color Control
$wp_customize->add_control(
new WP_Customize_Color_Control( $wp_customize, 'infinity_carousel_color[text]', array(
'label' => esc_html__( 'Text', 'flexblog' ),
'section' => 'infinity_carousel_color'
)
));
// Carousel Hover Color Setting
$wp_customize->add_setting( 'infinity_carousel_color[text_hv]', array(
'default' => '#c69c53',
'type' => 'option',
'transport' => 'postMessage',
'sanitize_callback' => 'sanitize_hex_color'
));
// Carousel Hover Color Control
$wp_customize->add_control(
new WP_Customize_Color_Control( $wp_customize, 'infinity_carousel_color[text_hv]', array(
'label' => esc_html__( 'Hover', 'flexblog' ),
'section' => 'infinity_carousel_color'
)
));
// Carousel Read More Color Setting
$wp_customize->add_setting( 'infinity_carousel_color[read_more]', array(
'default' => '#ffffff',
'type' => 'option',
'transport' => 'postMessage',
'sanitize_callback' => 'sanitize_hex_color'
));
// Carousel Read More Color Control
$wp_customize->add_control(
new WP_Customize_Color_Control( $wp_customize, 'infinity_carousel_color[read_more]', array(
'label' => esc_html__( 'Main color', 'flexblog' ),
'section' => 'infinity_carousel_color'
)
));
// Carousel Read More Color Setting
$wp_customize->add_setting( 'infinity_carousel_color[read_more_hv]', array(
'default' => '#222222',
'type' => 'option',
'transport' => 'postMessage',
'sanitize_callback' => 'sanitize_hex_color'
));
// Carousel Read More Color Control
$wp_customize->add_control(
new WP_Customize_Color_Control( $wp_customize, 'infinity_carousel_color[read_more_hv]', array(
'label' => esc_html__( 'Text Hover', 'flexblog' ),
'section' => 'infinity_carousel_color'
)
));
/**
* ----------------------------------------------------------------------------------------
* General Color Section
* ----------------------------------------------------------------------------------------
*/
$wp_customize->add_section('infinity_general_color', array(
'title' => esc_html__( 'General', 'flexblog' ),
'priority' => 30,
'capability' => 'edit_theme_options',
'panel' => 'color',
));
// General Background Color Setting
$wp_customize->add_setting( 'infinity_general_color[body_bg]', array(
'default' => '#ffffff',
'type' => 'option',
'transport' => 'postMessage',
'sanitize_callback' => 'sanitize_hex_color'
));
// General Background Color Control
$wp_customize->add_control(
new WP_Customize_Color_Control( $wp_customize, 'infinity_general_color[body_bg]', array(
'label' => esc_html__( 'Background', 'flexblog' ),
'section' => 'infinity_general_color'
)
));
// General Content Background Color Setting
$wp_customize->add_setting( 'infinity_general_color[content_bg]', array(
'default' => '#ffffff',
'type' => 'option',
'transport' => 'postMessage',
'sanitize_callback' => 'sanitize_hex_color'
));
// General Content Background Color Control
$wp_customize->add_control(
new WP_Customize_Color_Control( $wp_customize, 'infinity_general_color[content_bg]', array(
'label' => esc_html__( 'Content Background', 'flexblog' ),
'section' => 'infinity_general_color'
)
));
// General Accent Color Setting
$wp_customize->add_setting( 'infinity_general_color[accent]', array(
'default' => '#c69c53',
'type' => 'option',
'transport' => 'postMessage',
'sanitize_callback' => 'sanitize_hex_color'
));
// General Accent Color Control
$wp_customize->add_control(
new WP_Customize_Color_Control( $wp_customize, 'infinity_general_color[accent]', array(
'label' => esc_html__( 'Accent', 'flexblog' ),
'section' => 'infinity_general_color'
)
));
// General Text Color Setting
$wp_customize->add_setting( 'infinity_general_color[text]', array(
'default' => '#111111',
'type' => 'option',
'transport' => 'postMessage',
'sanitize_callback' => 'sanitize_hex_color'
));
// General Text Color Control
$wp_customize->add_control(
new WP_Customize_Color_Control( $wp_customize, 'infinity_general_color[text]', array(
'label' => esc_html__( 'Title', 'flexblog' ),
'section' => 'infinity_general_color'
)
));
// General Sub Text Color Setting
$wp_customize->add_setting( 'infinity_general_color[sub_text]', array(
'default' => '#000000',
'type' => 'option',
'transport' => 'postMessage',
'sanitize_callback' => 'sanitize_hex_color'
));
// General Sub Text Color Control
$wp_customize->add_control(
new WP_Customize_Color_Control( $wp_customize, 'infinity_general_color[sub_text]', array(
'label' => esc_html__( 'Text', 'flexblog' ),
'section' => 'infinity_general_color'
)
));
// General Selection Color Setting
$wp_customize->add_setting( 'infinity_general_color[selection]', array(
'default' => '#c69c53',
'type' => 'option',
'transport' => 'postMessage',
'sanitize_callback' => 'sanitize_hex_color'
));
// General Selection Color Control
$wp_customize->add_control(
new WP_Customize_Color_Control( $wp_customize, 'infinity_general_color[selection]', array(
'label' => esc_html__( 'Text Selection', 'flexblog' ),
'section' => 'infinity_general_color'
)
));
// General Meta Color Setting
$wp_customize->add_setting( 'infinity_general_color[meta]', array(
'default' => '#aaaaaa',
'type' => 'option',
'transport' => 'postMessage',
'sanitize_callback' => 'sanitize_hex_color'
));
// General Meta Color Control
$wp_customize->add_control(
new WP_Customize_Color_Control( $wp_customize, 'infinity_general_color[meta]', array(
'label' => esc_html__( 'Meta', 'flexblog' ),
'section' => 'infinity_general_color'
)
));
// General Border Color Setting
$wp_customize->add_setting( 'infinity_general_color[border]', array(
'default' => '#e8e8e8',
'type' => 'option',
'transport' => 'postMessage',
'sanitize_callback' => 'sanitize_hex_color'
));
// General Border Color Control
$wp_customize->add_control(
new WP_Customize_Color_Control( $wp_customize, 'infinity_general_color[border]', array(
'label' => esc_html__( 'Border', 'flexblog' ),
'section' => 'infinity_general_color'
)
));
// General Alt Color Setting
$wp_customize->add_setting( 'infinity_general_color[alt]', array(
'default' => '#f8f8f8',
'type' => 'option',
'transport' => 'postMessage',
'sanitize_callback' => 'sanitize_hex_color'
));
// General Alt Color Control
$wp_customize->add_control(
new WP_Customize_Color_Control( $wp_customize, 'infinity_general_color[alt]', array(
'label' => esc_html__( 'Alt', 'flexblog' ),
'section' => 'infinity_general_color'
)
));
// Read More Color Setting
$wp_customize->add_setting( 'infinity_general_color[read_more]', array(
'default' => '#222222',
'type' => 'option',
'transport' => 'postMessage',
'sanitize_callback' => 'sanitize_hex_color'
));
// Read More Color Control
$wp_customize->add_control(
new WP_Customize_Color_Control( $wp_customize, 'infinity_general_color[read_more]', array(
'label' => esc_html__( 'Text', 'flexblog' ),
'section' => 'infinity_general_color'
)
));
// Read More Color Setting
$wp_customize->add_setting( 'infinity_general_color[read_more_hv]', array(
'default' => '#ffffff',
'type' => 'option',
'transport' => 'postMessage',
'sanitize_callback' => 'sanitize_hex_color'
));
// Read More Color Control
$wp_customize->add_control(
new WP_Customize_Color_Control( $wp_customize, 'infinity_general_color[read_more_hv]', array(
'label' => esc_html__( 'Text Hover', 'flexblog' ),
'section' => 'infinity_general_color'
)
));
// Read More Background Color Setting
$wp_customize->add_setting( 'infinity_general_color[read_more_bg]', array(
'default' => '#f8f8f8',
'type' => 'option',
'transport' => 'postMessage',
'sanitize_callback' => 'sanitize_hex_color'
));
// Read More Background Color Control
$wp_customize->add_control(
new WP_Customize_Color_Control( $wp_customize, 'infinity_general_color[read_more_bg]', array(
'label' => esc_html__( 'Background', 'flexblog' ),
'section' => 'infinity_general_color'
)
));
// Read More Background Color Setting
$wp_customize->add_setting( 'infinity_general_color[read_more_bg_hv]', array(
'default' => '#c69c53',
'type' => 'option',
'transport' => 'postMessage',
'sanitize_callback' => 'sanitize_hex_color'
));
// Read More Background Color Control
$wp_customize->add_control(
new WP_Customize_Color_Control( $wp_customize, 'infinity_general_color[read_more_bg_hv]', array(
'label' => esc_html__( 'Hover Background', 'flexblog' ),
'section' => 'infinity_general_color'
)
));
// Read More Border Color Setting
$wp_customize->add_setting( 'infinity_general_color[read_more_border]', array(
'default' => '#e8e8e8',
'type' => 'option',
'transport' => 'postMessage',
'sanitize_callback' => 'sanitize_hex_color'
));
// Read More Border Color Control
$wp_customize->add_control(
new WP_Customize_Color_Control( $wp_customize, 'infinity_general_color[read_more_border]', array(
'label' => esc_html__( 'Border', 'flexblog' ),
'section' => 'infinity_general_color'
)
));
// Button Info Color Setting
$wp_customize->add_setting( 'infinity_general_color[btn_info]', array(
'default' => '#ffffff',
'type' => 'option',
'transport' => 'postMessage',
'sanitize_callback' => 'sanitize_hex_color'
));
// Button Info Color Control
$wp_customize->add_control(
new WP_Customize_Color_Control( $wp_customize, 'infinity_general_color[btn_info]', array(
'label' => esc_html__( 'Info', 'flexblog' ),
'section' => 'infinity_general_color'
)
));
// Button Info Background Setting
$wp_customize->add_setting( 'infinity_general_color[btn_info_bg]', array(
'default' => '#111111',
'type' => 'option',
'transport' => 'postMessage',
'sanitize_callback' => 'sanitize_hex_color'
));
// Button Info Background Control
$wp_customize->add_control(
new WP_Customize_Color_Control( $wp_customize, 'infinity_general_color[btn_info_bg]', array(
'label' => esc_html__( 'Info Background', 'flexblog' ),
'section' => 'infinity_general_color'
)
));
// Sidebar Button Color Setting
$wp_customize->add_setting( 'infinity_general_color[main_btn]', array(
'default' => '#ffffff',
'type' => 'option',
'transport' => 'postMessage',
'sanitize_callback' => 'sanitize_hex_color'
));
// Sidebar Button Color Control
$wp_customize->add_control(
new WP_Customize_Color_Control( $wp_customize, 'infinity_general_color[main_btn]', array(
'label' => esc_html__( 'Text', 'flexblog' ),
'section' => 'infinity_general_color'
)
));
// Sidebar Button Color Setting
$wp_customize->add_setting( 'infinity_general_color[main_btn_hv]', array(
'default' => '#ffffff',
'type' => 'option',
'transport' => 'postMessage',
'sanitize_callback' => 'sanitize_hex_color'
));
// Sidebar Button Color Control
$wp_customize->add_control(
new WP_Customize_Color_Control( $wp_customize, 'infinity_general_color[main_btn_hv]', array(
'label' => esc_html__( 'Text Hover', 'flexblog' ),
'section' => 'infinity_general_color'
)
));
// Sidebar Button Background Color Setting
$wp_customize->add_setting( 'infinity_general_color[main_btn_bg]', array(
'default' => '#222222',
'type' => 'option',
'transport' => 'postMessage',
'sanitize_callback' => 'sanitize_hex_color'
));
// Sidebar Button Background Color Control
$wp_customize->add_control(
new WP_Customize_Color_Control( $wp_customize, 'infinity_general_color[main_btn_bg]', array(
'label' => esc_html__( 'Background', 'flexblog' ),
'section' => 'infinity_general_color'
)
));
// Sidebar Button Background Color Setting
$wp_customize->add_setting( 'infinity_general_color[main_btn_bg_hv]', array(
'default' => '#c69c53',
'type' => 'option',
'transport' => 'postMessage',
'sanitize_callback' => 'sanitize_hex_color'
));
// Sidebar Button Background Color Control
$wp_customize->add_control(
new WP_Customize_Color_Control( $wp_customize, 'infinity_general_color[main_btn_bg_hv]', array(
'label' => esc_html__( 'Hover Background', 'flexblog' ),
'section' => 'infinity_general_color'
)
));
/**
* ----------------------------------------------------------------------------------------
* Footer Color Section
* ----------------------------------------------------------------------------------------
*/
$wp_customize->add_section('infinity_footer_color', array(
'title' => esc_html__( 'Footer', 'flexblog' ),
'priority' => 40,
'capability' => 'edit_theme_options',
'panel' => 'color',
));
// Footer Widget Background Color Setting
$wp_customize->add_setting( 'infinity_footer_color[widget_bg]', array(
'default' => '#222222',
'type' => 'option',
'transport' => 'postMessage',
'sanitize_callback' => 'sanitize_hex_color'
));
// Footer Widget Background Color Control
$wp_customize->add_control(
new WP_Customize_Color_Control( $wp_customize, 'infinity_footer_color[widget_bg]', array(
'label' => esc_html__( 'Background', 'flexblog' ),
'section' => 'infinity_footer_color'
)
));
// Footer Widget Title Color Setting
$wp_customize->add_setting( 'infinity_footer_color[widget_title]', array(
'default' => '#ffffff',
'type' => 'option',
'transport' => 'postMessage',
'sanitize_callback' => 'sanitize_hex_color'
));
// Footer Widget Title Color Control
$wp_customize->add_control(
new WP_Customize_Color_Control( $wp_customize, 'infinity_footer_color[widget_title]', array(
'label' => esc_html__( 'Title', 'flexblog' ),
'section' => 'infinity_footer_color'
)
));
// Footer Widget Text Color Setting
$wp_customize->add_setting( 'infinity_footer_color[widget_text]', array(
'default' => '#ffffff',
'type' => 'option',
'transport' => 'postMessage',
'sanitize_callback' => 'sanitize_hex_color'
));
// Footer Widget Text Color Control
$wp_customize->add_control(
new WP_Customize_Color_Control( $wp_customize, 'infinity_footer_color[widget_text]', array(
'label' => esc_html__( 'Text', 'flexblog' ),
'section' => 'infinity_footer_color'
)
));
// Footer Widget Text Hover Color Setting
$wp_customize->add_setting( 'infinity_footer_color[widget_text_hv]', array(
'default' => '#c69c53',
'type' => 'option',
'transport' => 'postMessage',
'sanitize_callback' => 'sanitize_hex_color'
));
// Footer Widget Text Hover Color Control
$wp_customize->add_control(
new WP_Customize_Color_Control( $wp_customize, 'infinity_footer_color[widget_text_hv]', array(
'label' => esc_html__( 'Text Hover', 'flexblog' ),
'section' => 'infinity_footer_color'
)
));
// Footer Widget border Color Setting
$wp_customize->add_setting( 'infinity_footer_color[widget_border]', array(
'default' => '#777777',
'type' => 'option',
'transport' => 'postMessage',
'sanitize_callback' => 'sanitize_hex_color'
));
// Footer Widget border Color Control
$wp_customize->add_control(
new WP_Customize_Color_Control( $wp_customize, 'infinity_footer_color[widget_border]', array(
'label' => esc_html__( 'Border', 'flexblog' ),
'section' => 'infinity_footer_color'
)
));
// Copyright Background Color Setting
$wp_customize->add_setting( 'infinity_footer_color[copyright_bg]', array(
'default' => '#171717',
'type' => 'option',
'transport' => 'postMessage',
'sanitize_callback' => 'sanitize_hex_color'
));
// Copyright Background Color Control
$wp_customize->add_control(
new WP_Customize_Color_Control( $wp_customize, 'infinity_footer_color[copyright_bg]', array(
'label' => esc_html__( 'Background', 'flexblog' ),
'section' => 'infinity_footer_color'
)
));
// Copyright Text Color Setting
$wp_customize->add_setting( 'infinity_footer_color[copyright_text]', array(
'default' => '#8c8c8c',
'type' => 'option',
'transport' => 'postMessage',
'sanitize_callback' => 'sanitize_hex_color'
));
// Copyright Text Color Control
$wp_customize->add_control(
new WP_Customize_Color_Control( $wp_customize, 'infinity_footer_color[copyright_text]', array(
'label' => esc_html__( 'Text', 'flexblog' ),
'section' => 'infinity_footer_color'
)
));
// Backtotop Color Setting
$wp_customize->add_setting( 'infinity_footer_color[backtotop]', array(
'default' => '#c69c53',
'type' => 'option',
'transport' => 'postMessage',
'sanitize_callback' => 'sanitize_hex_color'
));
// Backtotop Color Control
$wp_customize->add_control(
new WP_Customize_Color_Control( $wp_customize, 'infinity_footer_color[backtotop]', array(
'label' => esc_html__( 'Backtotop', 'flexblog' ),
'section' => 'infinity_footer_color'
)
));
// Backtotop Hover Color Setting
$wp_customize->add_setting( 'infinity_footer_color[backtotop_hv]', array(
'default' => '#ffffff',
'type' => 'option',
'transport' => 'postMessage',
'sanitize_callback' => 'sanitize_hex_color'
));
// Backtotop Hover Color Control
$wp_customize->add_control(
new WP_Customize_Color_Control( $wp_customize, 'infinity_footer_color[backtotop_hv]', array(
'label' => esc_html__( 'Backtotop Hover', 'flexblog' ),
'section' => 'infinity_footer_color'
)
));
// Social Text Color Setting
$wp_customize->add_setting( 'infinity_footer_color[social_text]', array(
'default' => '#222222',
'type' => 'option',
'transport' => 'postMessage',
'sanitize_callback' => 'sanitize_hex_color'
));
// Social Text Color Control
$wp_customize->add_control(
new WP_Customize_Color_Control( $wp_customize, 'infinity_footer_color[social_text]', array(
'label' => esc_html__( 'Text', 'flexblog' ),
'section' => 'infinity_footer_color'
)
));
// Social Text Hover Color Setting
$wp_customize->add_setting( 'infinity_footer_color[social_text_hv]', array(
'default' => '#ffffff',
'type' => 'option',
'transport' => 'postMessage',
'sanitize_callback' => 'sanitize_hex_color'
));
// Social Text Hover Color Control
$wp_customize->add_control(
new WP_Customize_Color_Control( $wp_customize, 'infinity_footer_color[social_text_hv]', array(
'label' => esc_html__( 'Text Hover', 'flexblog' ),
'section' => 'infinity_footer_color'
)
));
// Social Text Color Setting
$wp_customize->add_setting( 'infinity_footer_color[social_bg]', array(
'default' => '#ffffff',
'type' => 'option',
'transport' => 'postMessage',
'sanitize_callback' => 'sanitize_hex_color'
));
// Social Text Color Control
$wp_customize->add_control(
new WP_Customize_Color_Control( $wp_customize, 'infinity_footer_color[social_bg]', array(
'label' => esc_html__( 'Background', 'flexblog' ),
'section' => 'infinity_footer_color'
)
));
// Copyright Text Hover Color Setting
$wp_customize->add_setting( 'infinity_footer_color[social_bg_hv]', array(
'default' => '#c69c53',
'type' => 'option',
'transport' => 'postMessage',
'sanitize_callback' => 'sanitize_hex_color'
));
// Copyright Text Hover Color Control
$wp_customize->add_control(
new WP_Customize_Color_Control( $wp_customize, 'infinity_footer_color[social_bg_hv]', array(
'label' => esc_html__( 'Background Hover', 'flexblog' ),
'section' => 'infinity_footer_color'
)
));
/**
* ----------------------------------------------------------------------------------------
* General Section
* ----------------------------------------------------------------------------------------
*/
$wp_customize->add_section( 'infinity_general', array(
'title' => esc_html__( 'General', 'flexblog' ),
'priority' => 25
));
//FadeIn effect Setting
$wp_customize->add_setting( 'infinity_general[effect]', array(
'default' => 0,
'type' => 'option',
'sanitize_callback' => 'infinity_checkbox_callback'
));
//FadeIn effect Control
$wp_customize->add_control( 'infinity_general[effect]', array(
'label' => esc_html__( 'Page Transition', 'flexblog' ),
'section' => 'infinity_general',
'type' => 'checkbox'
));
// Site Width Setting
$wp_customize->add_setting( 'infinity_general[width]', array(
'default' => 1180,
'type' => 'option',
'sanitize_callback' => 'infinity_number_callback'
));
// Site Width Control
$wp_customize->add_control( 'infinity_general[width]', array(
'label' => esc_html__( 'Site Width', 'flexblog' ),
'section' => 'infinity_general',
'type' => 'number',
'input_attrs' => array(
'min' => 0,
'step' => 1,
'class' => '',
'style' => '',
)
));
// Content Padding Setting
$wp_customize->add_setting( 'infinity_general[padding]', array(
'default' => 0,
'type' => 'option',
'sanitize_callback' => 'infinity_number_callback'
));
// Content Padding Control
$wp_customize->add_control( 'infinity_general[padding]', array(
'label' => esc_html__( 'Content Padding', 'flexblog' ),
'section' => 'infinity_general',
'type' => 'number',
'input_attrs' => array(
'min' => 0,
'step' => 1
)
));
// Background Image upload Setting
$wp_customize->add_setting( 'infinity_general[bg_img]', array(
'default' => '',
'type' => 'option',
'sanitize_callback' => 'esc_url_raw'
));
// Background Image upload Setting
$wp_customize->add_control(
new WP_Customize_Image_Control( $wp_customize, 'infinity_general[bg_img]', array(
'label' => esc_html__( 'Background Image Upload', 'flexblog' ),
'section' => 'infinity_general'
)
));
// Background Image Size
$wp_customize->add_setting( 'infinity_general[bg_size]', array(
'default' => 'cover',
'type' => 'option',
'sanitize_callback' => 'infinity_radio_callback'
));
// Background Image Size
$wp_customize->add_control( 'infinity_general[bg_size]', array(
'label' => esc_html__( 'Background Image Size', 'flexblog' ),
'section' => 'infinity_general',
'type' => 'radio',
'choices' => array(
'pattern' => esc_html__( 'Pattern', 'flexblog' ),
'cover' => esc_html__( 'Cover', 'flexblog' )
)
));
// Background Attachment Setting
$wp_customize->add_setting( 'infinity_general[bg_att]', array(
'default' => 'scroll',
'type' => 'option',
'sanitize_callback' => 'infinity_radio_callback'
));
// Background Attachment Control
$wp_customize->add_control( 'infinity_general[bg_att]', array(
'label' => esc_html__( 'Background Image Type', 'flexblog' ),
'section' => 'infinity_general',
'type' => 'radio',
'choices' => array(
'scroll' => esc_html__( 'Scroll', 'flexblog' ),
'fixed' => esc_html__( 'Fixed', 'flexblog' )
)
));
// Full Width Post Setting
$wp_customize->add_setting( 'infinity_general[full_post]', array(
'default' => 0,
'type' => 'option',
'sanitize_callback' => 'infinity_checkbox_callback'
));
// Full Width Post Control
$wp_customize->add_control( 'infinity_general[full_post]', array(
'label' => esc_html__( 'Full Post ( Grid / List ) Layout', 'flexblog' ),
'section' => 'infinity_general',
'type' => 'checkbox'
));
// Home Page Layout Setting
$wp_customize->add_setting( 'infinity_general[home_layout]', array(
'default' => 'col2-rsidebar',
'type' => 'option',
'sanitize_callback' => 'infinity_select_callback'
));
// Home Page Layout Control
$wp_customize->add_control( 'infinity_general[home_layout]', array(
'label' => esc_html__( 'Home Page', 'flexblog' ),
'section' => 'infinity_general',
'type' => 'select',
'choices' => array(
'full-rsidebar' => esc_html__( 'Right Sidebar', 'flexblog' ),
'full-lsidebar' => esc_html__( 'Left Sidebar', 'flexblog' ),
'full-nsidebar' => esc_html__( 'Fullwidth', 'flexblog' ),
'col2-rsidebar' => esc_html__( 'Grid 2 columns + Right Sidebar', 'flexblog' ),
'col2-lsidebar' => esc_html__( 'Grid 2 columns + Left Sidebar', 'flexblog' ),
'col2-nsidebar' => esc_html__( 'Grid 2 columns', 'flexblog' ),
'col3-rsidebar' => esc_html__( 'Grid 3 columns + Right Sidebar', 'flexblog' ),
'col3-lsidebar' => esc_html__( 'Grid 3 columns + Left Sidebar', 'flexblog' ),
'col3-nsidebar' => esc_html__( 'Grid 3 columns', 'flexblog' ),
'list-rsidebar' => esc_html__( 'List + Right Sidebar', 'flexblog' ),
'list-lsidebar' => esc_html__( 'List + Left Sidebar', 'flexblog' ),
'list-nsidebar' => esc_html__( 'List', 'flexblog' )
)
));
// Single Page Layout Setting
$wp_customize->add_setting( 'infinity_general[single_layout]', array(
'default' => 'full-rsidebar',
'type' => 'option',
'sanitize_callback' => 'infinity_select_callback'
));
// Single Page Layout Control
$wp_customize->add_control( 'infinity_general[single_layout]', array(
'label' => esc_html__( 'Single Page', 'flexblog' ),
'section' => 'infinity_general',
'type' => 'select',
'choices' => array(
'full-rsidebar' => esc_html__( 'Right Sidebar', 'flexblog' ),
'full-lsidebar' => esc_html__( 'Left Sidebar', 'flexblog' ),
'full-nsidebar' => esc_html__( 'Fullwidth', 'flexblog' ),
)
));
// Category Page Layout Setting
$wp_customize->add_setting( 'infinity_general[category_layout]', array(
'default' => 'col3-nsidebar',
'type' => 'option',
'sanitize_callback' => 'infinity_select_callback'
));
// Category Page Layout Control
$wp_customize->add_control( 'infinity_general[category_layout]', array(
'label' => esc_html__( 'Category Page', 'flexblog' ),
'section' => 'infinity_general',
'type' => 'select',
'choices' => array(
'full-rsidebar' => esc_html__( 'Right Sidebar', 'flexblog' ),
'full-lsidebar' => esc_html__( 'Left Sidebar', 'flexblog' ),
'full-nsidebar' => esc_html__( 'Fullwidth', 'flexblog' ),
'col2-rsidebar' => esc_html__( 'Grid 2 columns + Right Sidebar', 'flexblog' ),
'col2-lsidebar' => esc_html__( 'Grid 2 columns + Left Sidebar', 'flexblog' ),
'col2-nsidebar' => esc_html__( 'Grid 2 columns', 'flexblog' ),
'col3-rsidebar' => esc_html__( 'Grid 3 columns + Right Sidebar', 'flexblog' ),
'col3-lsidebar' => esc_html__( 'Grid 3 columns + Left Sidebar', 'flexblog' ),
'col3-nsidebar' => esc_html__( 'Grid 3 columns', 'flexblog' ),
'list-rsidebar' => esc_html__( 'List + Right Sidebar', 'flexblog' ),
'list-lsidebar' => esc_html__( 'List + Left Sidebar', 'flexblog' ),
'list-nsidebar' => esc_html__( 'List', 'flexblog' )
)
));
// Tag Page Layout Setting
$wp_customize->add_setting( 'infinity_general[tag_layout]', array(
'default' => 'col2-nsidebar',
'type' => 'option',
'sanitize_callback' => 'infinity_select_callback'
));
// Tag Page Layout Control
$wp_customize->add_control( 'infinity_general[tag_layout]', array(
'label' => esc_html__( 'Tag Page', 'flexblog' ),
'section' => 'infinity_general',
'type' => 'select',
'choices' => array(
'full-rsidebar' => esc_html__( 'Right Sidebar', 'flexblog' ),
'full-lsidebar' => esc_html__( 'Left Sidebar', 'flexblog' ),
'full-nsidebar' => esc_html__( 'Fullwidth', 'flexblog' ),
'col2-rsidebar' => esc_html__( 'Grid 2 columns + Right Sidebar', 'flexblog' ),
'col2-lsidebar' => esc_html__( 'Grid 2 columns + Left Sidebar', 'flexblog' ),
'col2-nsidebar' => esc_html__( 'Grid 2 columns', 'flexblog' ),
'col3-rsidebar' => esc_html__( 'Grid 3 columns + Right Sidebar', 'flexblog' ),
'col3-lsidebar' => esc_html__( 'Grid 3 columns + Left Sidebar', 'flexblog' ),
'col3-nsidebar' => esc_html__( 'Grid 3 columns', 'flexblog' ),
'list-rsidebar' => esc_html__( 'List + Right Sidebar', 'flexblog' ),
'list-lsidebar' => esc_html__( 'List + Left Sidebar', 'flexblog' ),
'list-nsidebar' => esc_html__( 'List', 'flexblog' )
)
));
// Archive Page Layout Setting
$wp_customize->add_setting( 'infinity_general[archive_layout]', array(
'default' => 'col2-nsidebar',
'type' => 'option',
'sanitize_callback' => 'infinity_select_callback'
));
// Archive Page Layout Control
$wp_customize->add_control( 'infinity_general[archive_layout]', array(
'label' => esc_html__( 'Archive Page', 'flexblog' ),
'section' => 'infinity_general',
'type' => 'select',
'choices' => array(
'full-rsidebar' => esc_html__( 'Right Sidebar', 'flexblog' ),
'full-lsidebar' => esc_html__( 'Left Sidebar', 'flexblog' ),
'full-nsidebar' => esc_html__( 'Fullwidth', 'flexblog' ),
'col2-rsidebar' => esc_html__( 'Grid 2 columns + Right Sidebar', 'flexblog' ),
'col2-lsidebar' => esc_html__( 'Grid 2 columns + Left Sidebar', 'flexblog' ),
'col2-nsidebar' => esc_html__( 'Grid 2 columns', 'flexblog' ),
'col3-rsidebar' => esc_html__( 'Grid 3 columns + Right Sidebar', 'flexblog' ),
'col3-lsidebar' => esc_html__( 'Grid 3 columns + Left Sidebar', 'flexblog' ),
'col3-nsidebar' => esc_html__( 'Grid 3 columns', 'flexblog' ),
'list-rsidebar' => esc_html__( 'List + Right Sidebar', 'flexblog' ),
'list-lsidebar' => esc_html__( 'List + Left Sidebar', 'flexblog' ),
'list-nsidebar' => esc_html__( 'List', 'flexblog' )
)
));
// Search Page Layout Setting
$wp_customize->add_setting( 'infinity_general[search_layout]', array(
'default' => 'col2-rsidebar',
'type' => 'option',
'sanitize_callback' => 'infinity_select_callback'
));
// Search Page Layout Control
$wp_customize->add_control( 'infinity_general[search_layout]', array(
'label' => esc_html__( 'Search Page', 'flexblog' ),
'section' => 'infinity_general',
'type' => 'select',
'choices' => array(
'full-rsidebar' => esc_html__( 'Right Sidebar', 'flexblog' ),
'full-lsidebar' => esc_html__( 'Left Sidebar', 'flexblog' ),
'full-nsidebar' => esc_html__( 'Fullwidth', 'flexblog' ),
'col2-rsidebar' => esc_html__( 'Grid 2 columns + Right Sidebar', 'flexblog' ),
'col2-lsidebar' => esc_html__( 'Grid 2 columns + Left Sidebar', 'flexblog' ),
'col2-nsidebar' => esc_html__( 'Grid 2 columns', 'flexblog' ),
'col3-rsidebar' => esc_html__( 'Grid 3 columns + Right Sidebar', 'flexblog' ),
'col3-lsidebar' => esc_html__( 'Grid 3 columns + Left Sidebar', 'flexblog' ),
'col3-nsidebar' => esc_html__( 'Grid 3 columns', 'flexblog' ),
'list-rsidebar' => esc_html__( 'List + Right Sidebar', 'flexblog' ),
'list-lsidebar' => esc_html__( 'List + Left Sidebar', 'flexblog' ),
'list-nsidebar' => esc_html__( 'List', 'flexblog' )
)
));
// Author Page Layout Setting
$wp_customize->add_setting( 'infinity_general[author_layout]', array(
'default' => 'col2-rsidebar',
'type' => 'option',
'sanitize_callback' => 'infinity_select_callback'
));
// Author Page Layout Control
$wp_customize->add_control( 'infinity_general[author_layout]', array(
'label' => esc_html__( 'Author Page', 'flexblog' ),
'section' => 'infinity_general',
'type' => 'select',
'choices' => array(
'full-rsidebar' => esc_html__( 'Right Sidebar', 'flexblog' ),
'full-lsidebar' => esc_html__( 'Left Sidebar', 'flexblog' ),
'full-nsidebar' => esc_html__( 'Fullwidth', 'flexblog' ),
'col2-rsidebar' => esc_html__( 'Grid 2 columns + Right Sidebar', 'flexblog' ),
'col2-lsidebar' => esc_html__( 'Grid 2 columns + Left Sidebar', 'flexblog' ),
'col2-nsidebar' => esc_html__( 'Grid 2 columns', 'flexblog' ),
'col3-rsidebar' => esc_html__( 'Grid 3 columns + Right Sidebar', 'flexblog' ),
'col3-lsidebar' => esc_html__( 'Grid 3 columns + Left Sidebar', 'flexblog' ),
'col3-nsidebar' => esc_html__( 'Grid 3 columns', 'flexblog' ),
'list-rsidebar' => esc_html__( 'List + Right Sidebar', 'flexblog' ),
'list-lsidebar' => esc_html__( 'List + Left Sidebar', 'flexblog' ),
'list-nsidebar' => esc_html__( 'List', 'flexblog' )
)
));
/**
* ----------------------------------------------------------------------------------------
* Header Section
* ----------------------------------------------------------------------------------------
*/
$wp_customize->add_section( 'infinity_header', array(
'title' => esc_html__( 'Header', 'flexblog' ),
'priority' => 25
));
// Header Boxed Style Setting
$wp_customize->add_setting( 'infinity_header[boxed]', array(
'default' => 0,
'type' => 'option',
'sanitize_callback' => 'infinity_checkbox_callback'
));
// Header Boxed Style Control
$wp_customize->add_control( 'infinity_header[boxed]', array(
'label' => esc_html__( 'Boxed Style', 'flexblog' ),
'section' => 'infinity_header',
'type' => 'checkbox'
));
// Top Header Checkbox Setting
$wp_customize->add_setting( 'infinity_header[top_menu]', array(
'default' => true,
'type' => 'option',
'sanitize_callback' => 'infinity_checkbox_callback'
));
// Top Header Checkbox Control
$wp_customize->add_control( 'infinity_header[top_menu]', array(
'label' => esc_html__( 'Show Top Bar', 'flexblog' ),
'section' => 'infinity_header',
'type' => 'checkbox'
));
// Top Fixed Nav Checkbox Setting
$wp_customize->add_setting( 'infinity_header[fixed_menu]', array(
'default' => true,
'type' => 'option',
'sanitize_callback' => 'infinity_checkbox_callback'
));
// Top Fixed Nav Checkbox Control
$wp_customize->add_control( 'infinity_header[fixed_menu]', array(
'label' => esc_html__( 'Show Fixed Menu', 'flexblog' ),
'section' => 'infinity_header',
'type' => 'checkbox'
));
// Header Center Height Setting
$wp_customize->add_setting( 'infinity_header[center_height]', array(
'default' => 420,
'type' => 'option',
'sanitize_callback' => 'infinity_number_callback'
));
// Header Center Height Control
$wp_customize->add_control( 'infinity_header[center_height]', array(
'label' => esc_html__( 'Header Height', 'flexblog' ),
'section' => 'infinity_header',
'type' => 'number'
));
// Background Image upload Setting
$wp_customize->add_setting( 'infinity_header[bg_img]', array(
'default' => 'http://infinitythemes.ge/flex-blog/wp-content/uploads/2017/01/header-background.jpg',
'type' => 'option',
'sanitize_callback' => 'esc_url_raw'
));
// Background Image upload Setting
$wp_customize->add_control(
new WP_Customize_Image_Control( $wp_customize, 'infinity_header[bg_img]', array(
'label' => esc_html__( 'Background Image Upload', 'flexblog' ),
'section' => 'infinity_header'
)
));
// Background Image Size
$wp_customize->add_setting( 'infinity_header[bg_size]', array(
'default' => 'cover',
'type' => 'option',
'sanitize_callback' => 'infinity_radio_callback'
));
// Background Image Size
$wp_customize->add_control( 'infinity_header[bg_size]', array(
'label' => esc_html__( 'Background Image Size', 'flexblog' ),
'section' => 'infinity_header',
'type' => 'radio',
'choices' => array(
'pattern' => esc_html__( 'Pattern', 'flexblog' ),
'cover' => esc_html__( 'Cover', 'flexblog' )
)
));
// Background Attachment Setting
$wp_customize->add_setting( 'infinity_header[bg_att]', array(
'default' => 'scroll',
'type' => 'option',
'sanitize_callback' => 'infinity_radio_callback'
));
// Background Attachment Control
$wp_customize->add_control( 'infinity_header[bg_att]', array(
'label' => esc_html__( 'Background Image Type', 'flexblog' ),
'section' => 'infinity_header',
'type' => 'radio',
'choices' => array(
'scroll' => esc_html__( 'Scroll', 'flexblog' ),
'fixed' => esc_html__( 'Fixed', 'flexblog' )
)
));
// Logo upload Setting
$wp_customize->add_setting( 'infinity_header[logo]', array(
'default' => 'http://infinitythemes.ge/flex-blog/wp-content/uploads/2017/01/logo-img.png',
'type' => 'option',
'sanitize_callback' => 'esc_url_raw'
));
// Logo upload Setting
$wp_customize->add_control(
new WP_Customize_Image_Control( $wp_customize, 'infinity_header[logo]', array(
'label' => esc_html__( 'Logo Upload', 'flexblog' ),
'section' => 'infinity_header'
)
));
// Header Logo Width Setting
$wp_customize->add_setting( 'infinity_header[logo_width]', array(
'default' => 600,
'type' => 'option',
'sanitize_callback' => 'infinity_number_callback'
));
// Header Logo Width Control
$wp_customize->add_control( 'infinity_header[logo_width]', array(
'label' => esc_html__( 'Logo Width', 'flexblog' ),
'section' => 'infinity_header',
'type' => 'number'
));
// Header Logo Margin Setting
$wp_customize->add_setting( 'infinity_header[logo_top_magin]', array(
'default' => 90,
'type' => 'option',
'sanitize_callback' => 'infinity_number_callback'
));
// Header Logo Margin Control
$wp_customize->add_control( 'infinity_header[logo_top_magin]', array(
'label' => esc_html__( 'Logo Top Distance', 'flexblog' ),
'section' => 'infinity_header',
'type' => 'number'
));
// Mini Logo upload Setting
$wp_customize->add_setting( 'infinity_header[mini_logo]', array(
'default' => 'http://infinitythemes.ge/flex-blog/wp-content/uploads/2017/01/mini-logo.png',
'type' => 'option',
'sanitize_callback' => 'esc_url_raw'
));
// Mini Logo upload Setting
$wp_customize->add_control(
new WP_Customize_Image_Control( $wp_customize, 'infinity_header[mini_logo]', array(
'label' => esc_html__( 'Mini Logo Upload', 'flexblog' ),
'section' => 'infinity_header'
)
));
/**
* ----------------------------------------------------------------------------------------
* Carousel Section
* ----------------------------------------------------------------------------------------
*/
$wp_customize->add_section('infinity_carousel', array(
'title' => esc_html__( 'Carousel', 'flexblog' ),
'priority' => 30
));
// Carousel Style Setting
$wp_customize->add_setting( 'infinity_carousel[style]', array(
'default' => 'inner_content',
'type' => 'option',
'sanitize_callback' => 'infinity_select_callback'
));
// Carousel Style Control
$wp_customize->add_control( 'infinity_carousel[style]', array(
'label' => esc_html__( 'Style', 'flexblog' ),
'section' => 'infinity_carousel',
'type' => 'select',
'choices' => array(
'none' => esc_html__( 'None','flexblog' ),
'default' => esc_html__( 'Default','flexblog' ),
'boxed' => esc_html__( 'Boxed','flexblog' ),
'inner_boxed' => esc_html__( 'Inner Boxed','flexblog' ),
'inner_content' => esc_html__( 'Inner Content','flexblog' )
)
));
// Carousel Post Amount Setting
$wp_customize->add_setting( 'infinity_carousel[posts_amount]', array(
'default' => '12',
'type' => 'option',
'sanitize_callback' => 'infinity_number_callback'
));
// Carousel Post Amount Control
$wp_customize->add_control( 'infinity_carousel[posts_amount]', array(
'label' => esc_html__( 'Posts Amount', 'flexblog' ),
'section' => 'infinity_carousel',
'type' => 'number',
'input_attrs' => array(
'min' => 2,
'step' => 1,
'class' => '',
'style' => '',
)
));
// Carousel Columns Setting
$wp_customize->add_setting( 'infinity_carousel[columns]', array(
'default' => 1,
'type' => 'option',
'sanitize_callback' => 'infinity_number_callback'
));
// Carousel Columns Control
$wp_customize->add_control( 'infinity_carousel[columns]', array(
'label' => esc_html__( 'Columns', 'flexblog' ),
'section' => 'infinity_carousel',
'type' => 'number',
'input_attrs' => array(
'min' => 1,
'max' => 4,
'step' => 1,
'class' => '',
'style' => ''
)
));
// Carousel Orderby Setting
$wp_customize->add_setting( 'infinity_carousel[orderby]', array(
'default' => 'date',
'type' => 'option',
'sanitize_callback' => 'infinity_select_callback'
));
// Carousel Orderby Control
$wp_customize->add_control( 'infinity_carousel[orderby]', array(
'label' => esc_html__( 'Order By', 'flexblog' ),
'section' => 'infinity_carousel',
'type' => 'select',
'choices' => array(
'date' => esc_html__( 'Date','flexblog' ),
'comment_count' => esc_html__( 'Comments','flexblog' ),
'like' => esc_html__( 'Likes','flexblog' ),
'rand' => esc_html__( 'Random','flexblog' )
)
));
// Carousel Item Width Setting
$wp_customize->add_setting( 'infinity_carousel[width]', array(
'default' => 835,
'type' => 'option',
'sanitize_callback' => 'infinity_number_callback'
));
// Carousel Item Width Control
$wp_customize->add_control( 'infinity_carousel[width]', array(
'label' => esc_html__( 'Thumbnail Width ', 'flexblog' ),
'section' => 'infinity_carousel',
'type' => 'number',
'input_attrs' => array(
'min' => 0,
'step' => 1,
'class' => '',
'style' => ''
)
));
// Carousel Item Height Setting
$wp_customize->add_setting( 'infinity_carousel[height]', array(
'default' => 510,
'type' => 'option',
'sanitize_callback' => 'infinity_number_callback'
));
// Carousel Item Height Control
$wp_customize->add_control( 'infinity_carousel[height]', array(
'label' => esc_html__( 'Thumbnail Height ', 'flexblog' ),
'section' => 'infinity_carousel',
'type' => 'number',
'input_attrs' => array(
'min' => 0,
'step' => 1,
'class' => '',
'style' => ''
)
));
// Carousel Loop Setting
$wp_customize->add_setting( 'infinity_carousel[loop]', array(
'default' => true,
'type' => 'option',
'sanitize_callback' => 'infinity_checkbox_callback'
));
// Carousel Loop Control
$wp_customize->add_control( 'infinity_carousel[loop]', array(
'label' => esc_html__( 'Carousel Loop', 'flexblog' ),
'section' => 'infinity_carousel',
'type' => 'checkbox'
));
// Carousel Autoplay Setting
$wp_customize->add_setting( 'infinity_carousel[autoplay]', array(
'default' => '0',
'type' => 'option',
'sanitize_callback' => 'infinity_number_callback'
));
// Carousel Autoplay Control
$wp_customize->add_control( 'infinity_carousel[autoplay]', array(
'label' => esc_html__( 'Autoplay', 'flexblog' ),
'section' => 'infinity_carousel',
'type' => 'number',
'input_attrs' => array(
'min' => 0,
'step' => 500,
'class' => '',
'style' => '',
)
));
// Carousel Slide By Setting
$wp_customize->add_setting( 'infinity_carousel[slideby]', array(
'default' => 1,
'type' => 'option',
'sanitize_callback' => 'infinity_number_callback'
));
// Carousel Slide By Control
$wp_customize->add_control( 'infinity_carousel[slideby]', array(
'label' => esc_html__( 'Slide By [1-N]', 'flexblog' ),
'section' => 'infinity_carousel',
'type' => 'number',
'input_attrs' => array(
'min' => 1,
'step' => 1,
'class' => '',
'style' => ''
)
));
// Carousel Margin Right(PX) On Item Setting
$wp_customize->add_setting( 'infinity_carousel[margin]', array(
'default' => '0',
'type' => 'option',
'sanitize_callback' => 'infinity_number_callback'
));
// Carousel Margin Right(PX) On Item Control
$wp_customize->add_control( 'infinity_carousel[margin]', array(
'label' => esc_html__( 'Margin Right On Item', 'flexblog' ),
'section' => 'infinity_carousel',
'type' => 'number',
'input_attrs' => array(
'min' => 0,
'step' => 1,
'class' => '',
'style' => '',
)
));
// Padding Left&Right On Stage Setting
$wp_customize->add_setting( 'infinity_carousel[stage_padding]', array(
'default' => '0',
'type' => 'option',
'sanitize_callback' => 'infinity_number_callback'
));
// Padding Left&Right On Stage Control
$wp_customize->add_control( 'infinity_carousel[stage_padding]', array(
'label' => esc_html__( 'Padding Left&Right On Stage', 'flexblog' ),
'section' => 'infinity_carousel',
'type' => 'number',
'input_attrs' => array(
'min' => 0,
'step' => 1,
'class' => '',
'style' => '',
)
));
// Carousel Pagination Setting
$wp_customize->add_setting( 'infinity_carousel[pagination]', array(
'default' => true,
'type' => 'option',
'sanitize_callback' => 'infinity_checkbox_callback'
));
// Carousel Pagination Control
$wp_customize->add_control( 'infinity_carousel[pagination]', array(
'label' => esc_html__( 'Show Pagination', 'flexblog' ),
'section' => 'infinity_carousel',
'type' => 'checkbox'
));
// Carousel Navigation Setting
$wp_customize->add_setting( 'infinity_carousel[navigation]', array(
'default' => 'on_hover',
'type' => 'option',
'sanitize_callback' => 'infinity_select_callback'
));
// Carousel Navigation Control
$wp_customize->add_control( 'infinity_carousel[navigation]', array(
'label' => esc_html__( 'Show Navigation', 'flexblog' ),
'section' => 'infinity_carousel',
'type' => 'select',
'choices' => array(
'off' => esc_html__( 'Off','flexblog' ),
'on' => esc_html__( 'On','flexblog' ),
'on_hover' => esc_html__( 'On Hover','flexblog' )
)
));
// Carousel Category Setting
$wp_customize->add_setting( 'infinity_carousel[category]', array(
'default' => true,
'type' => 'option',
'sanitize_callback' => 'infinity_checkbox_callback'
));
// Carousel Category Control
$wp_customize->add_control( 'infinity_carousel[category]', array(
'label' => esc_html__( 'Show Category', 'flexblog' ),
'section' => 'infinity_carousel',
'type' => 'checkbox'
));
// Carousel Title Setting
$wp_customize->add_setting( 'infinity_carousel[title]', array(
'default' => true,
'type' => 'option',
'sanitize_callback' => 'infinity_checkbox_callback'
));
// Carousel Title Control
$wp_customize->add_control( 'infinity_carousel[title]', array(
'label' => esc_html__( 'Show Title', 'flexblog' ),
'section' => 'infinity_carousel',
'type' => 'checkbox'
));
// Carousel Post Content Setting
$wp_customize->add_setting( 'infinity_carousel[content]', array(
'default' => '15',
'type' => 'option',
'sanitize_callback' => 'infinity_number_callback'
));
// Carousel Post Content Control
$wp_customize->add_control( 'infinity_carousel[content]', array(
'label' => esc_html__( 'Post Content length [0-N]', 'flexblog' ),
'section' => 'infinity_carousel',
'type' => 'number',
'input_attrs' => array(
'min' => 0,
'step' => 1,
'class' => '',
'style' => '',
)
));
// Carousel Read More Setting
$wp_customize->add_setting( 'infinity_carousel[read_more]', array(
'default' => true,
'type' => 'option',
'sanitize_callback' => 'infinity_checkbox_callback'
));
// Carousel Read More Control
$wp_customize->add_control( 'infinity_carousel[read_more]', array(
'label' => esc_html__( 'Show Read More', 'flexblog' ),
'section' => 'infinity_carousel',
'type' => 'checkbox'
));
// Carousel Date Setting
$wp_customize->add_setting( 'infinity_carousel[date]', array(
'default' => true,
'type' => 'option',
'sanitize_callback' => 'infinity_checkbox_callback'
));
// Carousel Date Control
$wp_customize->add_control( 'infinity_carousel[date]', array(
'label' => esc_html__( 'Show Date', 'flexblog' ),
'section' => 'infinity_carousel',
'type' => 'checkbox'
));
// Carousel like Setting
$wp_customize->add_setting( 'infinity_carousel[like]', array(
'default' => true,
'type' => 'option',
'sanitize_callback' => 'infinity_checkbox_callback'
));
// Carousel like Control
$wp_customize->add_control( 'infinity_carousel[like]', array(
'label' => esc_html__( 'Show Likes', 'flexblog' ),
'section' => 'infinity_carousel',
'type' => 'checkbox'
));
// Carousel Comment Setting
$wp_customize->add_setting( 'infinity_carousel[comment]', array(
'default' => true,
'type' => 'option',
'sanitize_callback' => 'infinity_checkbox_callback'
));
// Carousel Comment Control
$wp_customize->add_control( 'infinity_carousel[comment]', array(
'label' => esc_html__( 'Show Comments', 'flexblog' ),
'section' => 'infinity_carousel',
'type' => 'checkbox'
));
// Carousel Post New window Setting
$wp_customize->add_setting( 'infinity_carousel[post_window]', array(
'default' => false,
'type' => 'option',
'sanitize_callback' => 'infinity_checkbox_callback'
));
// Carousel Post New window Control
$wp_customize->add_control( 'infinity_carousel[post_window]', array(
'label' => esc_html__( 'Show Post In New Window', 'flexblog' ),
'section' => 'infinity_carousel',
'type' => 'checkbox'
));
// Info Area Title Setting
$wp_customize->add_setting( 'infinity_carousel[info_title]', array(
'default' => '',
'type' => 'option',
'sanitize_callback' => 'infinity_textarea_callback'
));
// Info Area Title Control
$wp_customize->add_control( 'infinity_carousel[info_title]', array(
'type' => 'textarea',
'section' => 'infinity_carousel',
'label' => esc_html__( 'Title', 'flexblog' )
));
// Info Area Text Setting
$wp_customize->add_setting( 'infinity_carousel[info_text]', array(
'default' => '',
'type' => 'option',
'sanitize_callback' => 'infinity_textarea_callback'
));
// Info Area Text Control
$wp_customize->add_control( 'infinity_carousel[info_text]', array(
'type' => 'textarea',
'section' => 'infinity_carousel',
'label' => esc_html__( 'Text', 'flexblog' )
));
/**
* ----------------------------------------------------------------------------------------
* Content Section
* ----------------------------------------------------------------------------------------
*/
$wp_customize->add_section('infinity_content', array(
'title' => esc_html__( 'Content', 'flexblog' ),
'priority' => 40
));
// Content Boxed Style Setting
$wp_customize->add_setting( 'infinity_content[boxed]', array(
'default' => true,
'type' => 'option',
'sanitize_callback' => 'infinity_checkbox_callback'
));
// Content Boxed Style control
$wp_customize->add_control( 'infinity_content[boxed]', array(
'label' => esc_html__( 'Content Boxed Style', 'flexblog' ),
'section' => 'infinity_content',
'type' => 'checkbox'
));
// Content Single Boxed Style Setting
$wp_customize->add_setting( 'infinity_content[single_boxed]', array(
'default' => true,
'type' => 'option',
'sanitize_callback' => 'infinity_checkbox_callback'
));
// Content Single Boxed Style control
$wp_customize->add_control( 'infinity_content[single_boxed]', array(
'label' => esc_html__( 'Single Boxed Style', 'flexblog' ),
'section' => 'infinity_content',
'type' => 'checkbox'
));
// Post New window Setting
$wp_customize->add_setting( 'infinity_content[post_window]', array(
'default' => false,
'type' => 'option',
'sanitize_callback' => 'infinity_checkbox_callback'
));
// Post New window Control
$wp_customize->add_control( 'infinity_content[post_window]', array(
'label' => esc_html__( 'Show Post In New Window', 'flexblog' ),
'section' => 'infinity_content',
'type' => 'checkbox'
));
// Post thumbnail Setting
$wp_customize->add_setting( 'infinity_content[post_thumbnail]', array(
'default' => false,
'type' => 'option',
'sanitize_callback' => 'infinity_checkbox_callback'
));
// Post thumbnail Control
$wp_customize->add_control( 'infinity_content[post_thumbnail]', array(
'label' => esc_html__( 'Show Thumbnail Only', 'flexblog' ),
'section' => 'infinity_content',
'type' => 'checkbox'
));
// Sticky Sidebar Setting
$wp_customize->add_setting( 'infinity_content[sticky_sidebar]', array(
'default' => true,
'type' => 'option',
'sanitize_callback' => 'infinity_checkbox_callback'
));
// Sticky Sidebar Control
$wp_customize->add_control( 'infinity_content[sticky_sidebar]', array(
'label' => esc_html__( 'Sticky Sidebar', 'flexblog' ),
'section' => 'infinity_content',
'type' => 'checkbox'
));
// Content Sidebar Width Setting
$wp_customize->add_setting( 'infinity_content[sidebar_width]', array(
'default' => 345,
'type' => 'option',
'sanitize_callback' => 'infinity_number_callback'
));
// Content Sidebar Width Control
$wp_customize->add_control( 'infinity_content[sidebar_width]', array(
'label' => esc_html__( 'Sidebar Width', 'flexblog' ),
'section' => 'infinity_content',
'type' => 'number',
'input_attrs' => array(
'min' => 0,
'step' => 1,
'class' => '',
'style' => '',
)
));
// Content Pagination Setting
$wp_customize->add_setting( 'infinity_content[pagination]', array(
'default' => 'expand-numbered',
'type' => 'option',
'sanitize_callback' => 'infinity_select_callback'
));
// Content Pagination Control
$wp_customize->add_control( 'infinity_content[pagination]', array(
'label' => esc_html__( 'Pagination Style', 'flexblog' ),
'section' => 'infinity_content',
'type' => 'select',
'choices' => array(
'default' => esc_html__( 'Default','flexblog' ),
'numbered' => esc_html__( 'Numbered','flexblog' ),
'expand-numbered' => esc_html__( 'Expand Numbered','flexblog' ),
)
));
// Post Header Position Setting
$wp_customize->add_setting( 'infinity_content[post_header]', array(
'default' => 'below-media',
'type' => 'option',
'sanitize_callback' => 'infinity_select_callback'
));
// Post Header Position Control
$wp_customize->add_control( 'infinity_content[post_header]', array(
'label' => esc_html__( 'Header Position', 'flexblog' ),
'section' => 'infinity_content',
'type' => 'select',
'choices' => array(
'above-media' => esc_html__( 'Above Media','flexblog' ),
'below-media' => esc_html__( 'Below Media','flexblog' )
)
));
// Grid Thumbnail Width Setting
$wp_customize->add_setting( 'infinity_content[grid_thumb_width]', array(
'default' => 400,
'type' => 'option',
'sanitize_callback' => 'infinity_number_callback'
));
// Grid Thumbnail Width Control
$wp_customize->add_control( 'infinity_content[grid_thumb_width]', array(
'label' => esc_html__( 'Grid Thumbnail Width ', 'flexblog' ),
'section' => 'infinity_content',
'type' => 'number',
'input_attrs' => array(
'min' => 0,
'step' => 1,
'class' => '',
'style' => ''
)
));
// Grid Thumbnail Height Setting
$wp_customize->add_setting( 'infinity_content[grid_thumb_height]', array(
'default' => 260,
'type' => 'option',
'sanitize_callback' => 'infinity_number_callback'
));
// Grid Thumbnail Height Control
$wp_customize->add_control( 'infinity_content[grid_thumb_height]', array(
'label' => esc_html__( 'Grid Thumbnail Height ', 'flexblog' ),
'section' => 'infinity_content',
'type' => 'number',
'input_attrs' => array(
'min' => 0,
'step' => 1,
'class' => '',
'style' => ''
)
));
// List Thumbnail Width Setting
$wp_customize->add_setting( 'infinity_content[list_thumb_width]', array(
'default' => 300,
'type' => 'option',
'sanitize_callback' => 'infinity_number_callback'
));
// List Thumbnail Width Control
$wp_customize->add_control( 'infinity_content[list_thumb_width]', array(
'label' => esc_html__( 'List Thumbnail Width ', 'flexblog' ),
'section' => 'infinity_content',
'type' => 'number',
'input_attrs' => array(
'min' => 0,
'step' => 1,
'class' => '',
'style' => ''
)
));
// List Thumbnail Height Setting
$wp_customize->add_setting( 'infinity_content[list_thumb_height]', array(
'default' => 300,
'type' => 'option',
'sanitize_callback' => 'infinity_number_callback'
));
// List Thumbnail Height Control
$wp_customize->add_control( 'infinity_content[list_thumb_height]', array(
'label' => esc_html__( 'List Thumbnail Height ', 'flexblog' ),
'section' => 'infinity_content',
'type' => 'number',
'input_attrs' => array(
'min' => 0,
'step' => 1,
'class' => '',
'style' => ''
)
));
//Post Horizontal Gutter Setting
$wp_customize->add_setting( 'infinity_content[horizontal_gutter]', array(
'default' => 35,
'type' => 'option',
'sanitize_callback' => 'infinity_number_callback'
));
// Post Horizontal Gutter Control
$wp_customize->add_control( 'infinity_content[horizontal_gutter]', array(
'label' => esc_html__( 'Horizontal Gutter', 'flexblog' ),
'section' => 'infinity_content',
'type' => 'number',
'input_attrs' => array(
'min' => 0,
'step' => 1,
'class' => '',
'style' => ''
)
));
//Header Post Vertical Gutter Setting
$wp_customize->add_setting( 'infinity_content[vertical_gutter]', array(
'default' => 40,
'type' => 'option',
'sanitize_callback' => 'infinity_number_callback'
));
//Header Post Vertical Gutter Control
$wp_customize->add_control( 'infinity_content[vertical_gutter]', array(
'label' => esc_html__( 'Vertical Gutter', 'flexblog' ),
'section' => 'infinity_content',
'type' => 'number',
'input_attrs' => array(
'min' => 0,
'step' => 1,
'class' => '',
'style' => ''
)
));
// Post categories Setting
$wp_customize->add_setting( 'infinity_content[post_categories]', array(
'default' => true,
'type' => 'option',
'sanitize_callback' => 'infinity_checkbox_callback'
));
// Post categories Control
$wp_customize->add_control( 'infinity_content[post_categories]', array(
'label' => esc_html__( 'Show Category', 'flexblog' ),
'section' => 'infinity_content',
'type' => 'checkbox'
));
// Post Date Setting
$wp_customize->add_setting( 'infinity_content[post_date]', array(
'default' => true,
'type' => 'option',
'sanitize_callback' => 'infinity_checkbox_callback'
));
// Post Date Control
$wp_customize->add_control( 'infinity_content[post_date]', array(
'label' => esc_html__( 'Show Date', 'flexblog' ),
'section' => 'infinity_content',
'type' => 'checkbox'
));
// Post Author Setting
$wp_customize->add_setting( 'infinity_content[post_author]', array(
'default' => true,
'type' => 'option',
'sanitize_callback' => 'infinity_checkbox_callback'
));
// Post Author Control
$wp_customize->add_control( 'infinity_content[post_author]', array(
'label' => esc_html__( 'Show Author', 'flexblog' ),
'section' => 'infinity_content',
'type' => 'checkbox'
));
// Dropcap Setting
$wp_customize->add_setting( 'infinity_content[dropcap]', array(
'default' => false,
'type' => 'option',
'sanitize_callback' => 'infinity_checkbox_callback'
));
// Dropcap Control
$wp_customize->add_control( 'infinity_content[dropcap]', array(
'label' => esc_html__( 'Show Dropcap', 'flexblog' ),
'section' => 'infinity_content',
'type' => 'checkbox'
));
// Dropcap Single Setting
$wp_customize->add_setting( 'infinity_content[single_dropcap]', array(
'default' => true,
'type' => 'option',
'sanitize_callback' => 'infinity_checkbox_callback'
));
// Dropcap Single Control
$wp_customize->add_control( 'infinity_content[single_dropcap]', array(
'label' => esc_html__( 'Show Single Dropcap', 'flexblog' ),
'section' => 'infinity_content',
'type' => 'checkbox'
));
// Post Description Setting
$wp_customize->add_setting( 'infinity_content[post_description]', array(
'default' => 'the-excerpt',
'type' => 'option',
'sanitize_callback' => 'infinity_select_callback'
));
// Post Description Control
$wp_customize->add_control( 'infinity_content[post_description]', array(
'label' => esc_html__( 'Post Description', 'flexblog' ),
'section' => 'infinity_content',
'type' => 'select',
'choices' => array(
'the-content' => esc_html__( 'The Content','flexblog' ),
'the-excerpt' => esc_html__( 'The Excerpt','flexblog' )
)
));
// Post Excerpt Length Setting
$wp_customize->add_setting( 'infinity_content[post_excerpt_length]', array(
'default' => 34,
'type' => 'option',
'sanitize_callback' => 'infinity_number_callback'
));
// Post Excerpt Length Control
$wp_customize->add_control( 'infinity_content[post_excerpt_length]', array(
'label' => esc_html__( 'Except Length', 'flexblog' ),
'section' => 'infinity_content',
'type' => 'number',
'input_attrs' => array(
'min' => 0,
'step' => 1,
'class' => '',
'style' => ''
)
));
// Post Description Align Setting
$wp_customize->add_setting( 'infinity_content[post_description_align]', array(
'default' => 'justify',
'type' => 'option',
'sanitize_callback' => 'infinity_select_callback'
));
// Post Description Align Control
$wp_customize->add_control( 'infinity_content[post_description_align]', array(
'label' => esc_html__( 'Post Description', 'flexblog' ),
'section' => 'infinity_content',
'type' => 'select',
'choices' => array(
'left' => esc_html__( 'Left','flexblog' ),
'center' => esc_html__( 'Center','flexblog' ),
'justify' => esc_html__( 'Justify','flexblog' ),
'right' => esc_html__( 'Right','flexblog' )
)
));
// Read More Setting
$wp_customize->add_setting( 'infinity_content[post_read_more]', array(
'default' => false,
'type' => 'option',
'sanitize_callback' => 'infinity_checkbox_callback'
));
// Read More Control
$wp_customize->add_control( 'infinity_content[post_read_more]', array(
'label' => esc_html__( 'Show Read More ( Grid / List )', 'flexblog' ),
'section' => 'infinity_content',
'type' => 'checkbox'
));
// Post Share Setting
$wp_customize->add_setting( 'infinity_content[post_like]', array(
'default' => true,
'type' => 'option',
'sanitize_callback' => 'infinity_checkbox_callback'
));
// Post Share Control
$wp_customize->add_control( 'infinity_content[post_like]', array(
'label' => esc_html__( 'Show Like', 'flexblog' ),
'section' => 'infinity_content',
'type' => 'checkbox'
));
// Post Comment Setting
$wp_customize->add_setting( 'infinity_content[post_comment]', array(
'default' => true,
'type' => 'option',
'sanitize_callback' => 'infinity_checkbox_callback'
));
// Post Comment Control
$wp_customize->add_control( 'infinity_content[post_comment]', array(
'label' => esc_html__( 'Show Comment', 'flexblog' ),
'section' => 'infinity_content',
'type' => 'checkbox'
));
// Post Share Facebook Setting
$wp_customize->add_setting( 'infinity_content[facebook_share]', array(
'default' => true,
'type' => 'option',
'sanitize_callback' => 'infinity_checkbox_callback'
));
// Post Share Facebook Control
$wp_customize->add_control( 'infinity_content[facebook_share]', array(
'label' => esc_html__( 'Show Facebook', 'flexblog' ),
'section' => 'infinity_content',
'type' => 'checkbox'
));
// Post Share Twitter Setting
$wp_customize->add_setting( 'infinity_content[twitter_share]', array(
'default' => true,
'type' => 'option',
'sanitize_callback' => 'infinity_checkbox_callback'
));
// Post Share Twitter Control
$wp_customize->add_control( 'infinity_content[twitter_share]', array(
'label' => esc_html__( 'Show Twitter', 'flexblog' ),
'section' => 'infinity_content',
'type' => 'checkbox'
));
// Post Share Pinterest Setting
$wp_customize->add_setting( 'infinity_content[pinterest_share]', array(
'default' => true,
'type' => 'option',
'sanitize_callback' => 'infinity_checkbox_callback'
));
// Post Share Pinterest Control
$wp_customize->add_control( 'infinity_content[pinterest_share]', array(
'label' => esc_html__( 'Show Pinterest', 'flexblog' ),
'section' => 'infinity_content',
'type' => 'checkbox'
));
// Post Share Google Plus Setting
$wp_customize->add_setting( 'infinity_content[googleplus_share]', array(
'default' => false,
'type' => 'option',
'sanitize_callback' => 'infinity_checkbox_callback'
));
// Post Share Google Plus Control
$wp_customize->add_control( 'infinity_content[googleplus_share]', array(
'label' => esc_html__( 'Show Google+', 'flexblog' ),
'section' => 'infinity_content',
'type' => 'checkbox'
));
// Post Share Linkedin Setting
$wp_customize->add_setting( 'infinity_content[linkedin_share]', array(
'default' => false,
'type' => 'option',
'sanitize_callback' => 'infinity_checkbox_callback'
));
// Post Share Linkedin Control
$wp_customize->add_control( 'infinity_content[linkedin_share]', array(
'label' => esc_html__( 'Show Linkedin', 'flexblog' ),
'section' => 'infinity_content',
'type' => 'checkbox'
));
// Post Share Tumblr Setting
$wp_customize->add_setting( 'infinity_content[tumblr_share]', array(
'default' => false,
'type' => 'option',
'sanitize_callback' => 'infinity_checkbox_callback'
));
// Post Share Tumblr Control
$wp_customize->add_control( 'infinity_content[tumblr_share]', array(
'label' => esc_html__( 'Show Tumblr', 'flexblog' ),
'section' => 'infinity_content',
'type' => 'checkbox'
));
// Post Share Reddit Setting
$wp_customize->add_setting( 'infinity_content[reddit_share]', array(
'default' => false,
'type' => 'option',
'sanitize_callback' => 'infinity_checkbox_callback'
));
// Post Share Reddit Control
$wp_customize->add_control( 'infinity_content[reddit_share]', array(
'label' => esc_html__( 'Show Reddit', 'flexblog' ),
'section' => 'infinity_content',
'type' => 'checkbox'
));
// Breadcrumb Setting
$wp_customize->add_setting( 'infinity_content[breadcrumb]', array(
'default' => true,
'type' => 'option',
'sanitize_callback' => 'infinity_checkbox_callback'
));
// Breadcrumb Control
$wp_customize->add_control( 'infinity_content[breadcrumb]', array(
'label' => esc_html__( 'Show breadcrumb', 'flexblog' ),
'section' => 'infinity_content',
'type' => 'checkbox'
));
// Post Tags Setting
$wp_customize->add_setting( 'infinity_content[post_tags]', array(
'default' => true,
'type' => 'option',
'sanitize_callback' => 'infinity_checkbox_callback'
));
// Post Tags Control
$wp_customize->add_control( 'infinity_content[post_tags]', array(
'label' => esc_html__( 'Show Tags', 'flexblog' ),
'section' => 'infinity_content',
'type' => 'checkbox'
));
// Post Author Description Setting
$wp_customize->add_setting( 'infinity_content[post_author_description]', array(
'default' => true,
'type' => 'option',
'sanitize_callback' => 'infinity_checkbox_callback'
));
// Post Author Description Control
$wp_customize->add_control( 'infinity_content[post_author_description]', array(
'label' => esc_html__( 'Show Author Description', 'flexblog' ),
'section' => 'infinity_content',
'type' => 'checkbox'
));
// Post Pagination Setting
$wp_customize->add_setting( 'infinity_content[post_pagination]', array(
'default' => true,
'type' => 'option',
'sanitize_callback' => 'infinity_checkbox_callback'
));
// Post Pagination Control
$wp_customize->add_control( 'infinity_content[post_pagination]', array(
'label' => esc_html__( 'Show pagination', 'flexblog' ),
'section' => 'infinity_content',
'type' => 'checkbox'
));
// Similar Post Title Setting
$wp_customize->add_setting( 'infinity_content[similar_posts_title]', array(
'default' => 'You Might Also Like',
'type' => 'option',
'sanitize_callback' => 'infinity_text_callback'
));
// Similar Post Title Control
$wp_customize->add_control( 'infinity_content[similar_posts_title]', array(
'label' => esc_html__( 'Similar Posts Title', 'flexblog' ),
'section' => 'infinity_content',
'type' => 'text'
));
// Similar Post Description Setting
$wp_customize->add_setting( 'infinity_content[similar_posts]', array(
'default' => 'random',
'type' => 'option',
'sanitize_callback' => 'infinity_select_callback'
));
// Similar Post Description Control
$wp_customize->add_control( 'infinity_content[similar_posts]', array(
'label' => esc_html__( 'Similar post', 'flexblog' ),
'section' => 'infinity_content',
'type' => 'select',
'choices' => array(
'none' => esc_html__( 'none','flexblog' ),
'related' => esc_html__( 'Related','flexblog' ),
'random' => esc_html__( 'Random','flexblog' )
)
));
// Post Comment Area Setting
$wp_customize->add_setting( 'infinity_content[post_comment_area]', array(
'default' => true,
'type' => 'option',
'sanitize_callback' => 'infinity_checkbox_callback'
));
// Post Comment Area Control
$wp_customize->add_control( 'infinity_content[post_comment_area]', array(
'label' => esc_html__( 'Show Post Comments', 'flexblog' ),
'section' => 'infinity_content',
'type' => 'checkbox'
));
// Page Comment Area Setting
$wp_customize->add_setting( 'infinity_content[page_comment_area]', array(
'default' => true,
'type' => 'option',
'sanitize_callback' => 'infinity_checkbox_callback'
));
// Page Comment Area Control
$wp_customize->add_control( 'infinity_content[page_comment_area]', array(
'label' => esc_html__( 'Show Page Comments', 'flexblog' ),
'section' => 'infinity_content',
'type' => 'checkbox'
));
/**
* ----------------------------------------------------------------------------------------
* Footer Section
* ----------------------------------------------------------------------------------------
*/
$wp_customize->add_section('infinity_footer', array(
'title' => esc_html__( 'Footer', 'flexblog' ),
'priority' => 55
));
// Footer Style Setting
$wp_customize->add_setting( 'infinity_footer[boxed]', array(
'default' => 'inner_boxed',
'type' => 'option',
'sanitize_callback' => 'infinity_checkbox_callback'
));
// Footer Style Control
$wp_customize->add_control( 'infinity_footer[boxed]', array(
'label' => esc_html__( 'Footer Style', 'flexblog' ),
'section' => 'infinity_footer',
'type' => 'select',
'choices' => array(
'boxed' => esc_html__( 'Boxed','flexblog' ),
'inner_boxed' => esc_html__( 'Inner Boxed','flexblog' ),
'off_boxed' => esc_html__( 'Off Boxed','flexblog' )
)
));
// Footer Widget Columns Setting
$wp_customize->add_setting( 'infinity_footer[column]', array(
'default' => 'none',
'type' => 'option',
'sanitize_callback' => 'infinity_checkbox_callback'
));
// Footer Widget Control
$wp_customize->add_control( 'infinity_footer[column]', array(
'label' => esc_html__( 'Footer Widget Area Column', 'flexblog' ),
'section' => 'infinity_footer',
'type' => 'select',
'choices' => array(
'none' => esc_html__( 'None','flexblog' ),
'three' => esc_html__( 'Three','flexblog' ),
'four' => esc_html__( 'Four','flexblog' )
)
));
// Social Setting
$wp_customize->add_setting( 'infinity_footer[social]', array(
'default' => true,
'type' => 'option',
'sanitize_callback' => 'infinity_checkbox_callback'
));
// Social Control
$wp_customize->add_control( 'infinity_footer[social]', array(
'label' => esc_html__( 'Show Social', 'flexblog' ),
'section' => 'infinity_footer',
'type' => 'checkbox'
));
// Copyright Setting
$wp_customize->add_setting( 'infinity_footer[copyright]', array(
'default' => 'Copyrights 2017 Infinity-Themes. All Rights Reserved.',
'type' => 'option',
'sanitize_callback' => 'infinity_textarea_callback'
));
// Copyright Control
$wp_customize->add_control( 'infinity_footer[copyright]', array(
'type' => 'textarea',
'section' => 'infinity_footer',
'label' => esc_html__( 'Enter Copyright Text', 'flexblog' )
));
/**
* ----------------------------------------------------------------------------------------
* Social Section
* ----------------------------------------------------------------------------------------
*/
$wp_customize->add_section('infinity_social', array(
'title' => esc_html__( 'Social Media', 'flexblog' ),
'priority' => 65
));
// Social Facebook Setting
$wp_customize->add_setting( 'infinity_social[facebook]', array(
'default' => '#',
'type' => 'option',
'sanitize_callback' => 'esc_url_raw'
));
// Social Facebook Control
$wp_customize->add_control( 'infinity_social[facebook]', array(
'type' => 'url',
'section' => 'infinity_social',
'label' => esc_html__( 'Facebook', 'flexblog' )
));
// Social Twitter Setting
$wp_customize->add_setting( 'infinity_social[twitter]', array(
'default' => '#',
'type' => 'option',
'sanitize_callback' => 'esc_url_raw'
));
// Social Twitter Control
$wp_customize->add_control( 'infinity_social[twitter]', array(
'type' => 'url',
'section' => 'infinity_social',
'label' => esc_html__( 'Twitter', 'flexblog' )
));
// Social instagram Setting
$wp_customize->add_setting( 'infinity_social[instagram]', array(
'default' => '#',
'type' => 'option',
'sanitize_callback' => 'esc_url_raw'
));
// Social instagram Control
$wp_customize->add_control( 'infinity_social[instagram]', array(
'type' => 'url',
'section' => 'infinity_social',
'label' => esc_html__( 'Instagram', 'flexblog' )
));
// Social pinterest Setting
$wp_customize->add_setting( 'infinity_social[pinterest]', array(
'default' => '#',
'type' => 'option',
'sanitize_callback' => 'esc_url_raw'
));
// Social pinterest Control
$wp_customize->add_control( 'infinity_social[pinterest]', array(
'type' => 'url',
'section' => 'infinity_social',
'label' => esc_html__( 'Pinterest', 'flexblog' )
));
// Social bloglovin Setting
$wp_customize->add_setting( 'infinity_social[bloglovin]', array(
'default' => '',
'type' => 'option',
'sanitize_callback' => 'esc_url_raw'
));
// Social bloglovin Control
$wp_customize->add_control( 'infinity_social[bloglovin]', array(
'type' => 'url',
'section' => 'infinity_social',
'label' => esc_html__( 'Bloglovin', 'flexblog' )
));
// Social Google Plus Setting
$wp_customize->add_setting( 'infinity_social[google_plus]', array(
'default' => '#',
'type' => 'option',
'sanitize_callback' => 'esc_url_raw'
));
// Social Google Plus Control
$wp_customize->add_control( 'infinity_social[google_plus]', array(
'type' => 'url',
'section' => 'infinity_social',
'label' => esc_html__( 'Google Plus', 'flexblog' )
));
// Social tumblr Setting
$wp_customize->add_setting( 'infinity_social[tumblr]', array(
'default' => '',
'type' => 'option',
'sanitize_callback' => 'esc_url_raw'
));
// Social tumblr Control
$wp_customize->add_control( 'infinity_social[tumblr]', array(
'type' => 'url',
'section' => 'infinity_social',
'label' => esc_html__( 'Tumblr', 'flexblog' )
));
// Social Youtube Setting
$wp_customize->add_setting( 'infinity_social[youtube]', array(
'default' => '',
'type' => 'option',
'sanitize_callback' => 'esc_url_raw'
));
// Social Youtube Control
$wp_customize->add_control( 'infinity_social[youtube]', array(
'type' => 'url',
'section' => 'infinity_social',
'label' => esc_html__( 'Youtube', 'flexblog' )
));
// Social Vine Setting
$wp_customize->add_setting( 'infinity_social[vine]', array(
'default' => '',
'type' => 'option',
'sanitize_callback' => 'esc_url_raw'
));
// Social Vine Control
$wp_customize->add_control( 'infinity_social[vine]', array(
'type' => 'url',
'section' => 'infinity_social',
'label' => esc_html__( 'Vine', 'flexblog' )
));
// Social flickr Setting
$wp_customize->add_setting( 'infinity_social[flickr]', array(
'default' => '',
'type' => 'option',
'sanitize_callback' => 'esc_url_raw'
));
// Social flickr Control
$wp_customize->add_control( 'infinity_social[flickr]', array(
'type' => 'url',
'section' => 'infinity_social',
'label' => esc_html__( 'Flickr', 'flexblog' )
));
// Social Linkedin Setting
$wp_customize->add_setting( 'infinity_social[linkedin]', array(
'default' => '',
'type' => 'option',
'sanitize_callback' => 'esc_url_raw'
));
// Social Linkedin Control
$wp_customize->add_control( 'infinity_social[linkedin]', array(
'type' => 'url',
'section' => 'infinity_social',
'label' => esc_html__( 'Linkedin', 'flexblog' )
));
// Social behance Setting
$wp_customize->add_setting( 'infinity_social[behance]', array(
'default' => '',
'type' => 'option',
'sanitize_callback' => 'esc_url_raw'
));
// Social behance Control
$wp_customize->add_control( 'infinity_social[behance]', array(
'type' => 'url',
'section' => 'infinity_social',
'label' => esc_html__( 'Behance', 'flexblog' )
));
// Social soundcloud Setting
$wp_customize->add_setting( 'infinity_social[soundcloud]', array(
'default' => '',
'type' => 'option',
'sanitize_callback' => 'esc_url_raw'
));
// Social soundcloud Control
$wp_customize->add_control( 'infinity_social[soundcloud]', array(
'type' => 'url',
'section' => 'infinity_social',
'label' => esc_html__( 'Soundcloud', 'flexblog' )
));
// Social vimeo Setting
$wp_customize->add_setting( 'infinity_social[vimeo]', array(
'default' => '',
'type' => 'option',
'sanitize_callback' => 'esc_url_raw'
));
// Social vimeo Control
$wp_customize->add_control( 'infinity_social[vimeo]', array(
'type' => 'url',
'section' => 'infinity_social',
'label' => esc_html__( 'Vimeo', 'flexblog' )
));
// Social Rss Setting
$wp_customize->add_setting( 'infinity_social[rss]', array(
'default' => '',
'type' => 'option',
'sanitize_callback' => 'esc_url_raw'
));
// Social Rss Control
$wp_customize->add_control( 'infinity_social[rss]', array(
'type' => 'url',
'section' => 'infinity_social',
'label' => esc_html__( 'RSS', 'flexblog' )
));
// Social Dribbble Setting
$wp_customize->add_setting( 'infinity_social[dribbble]', array(
'default' => '',
'type' => 'option',
'sanitize_callback' => 'esc_url_raw'
));
// Social Dribbble Control
$wp_customize->add_control( 'infinity_social[dribbble]', array(
'type' => 'url',
'section' => 'infinity_social',
'label' => esc_html__( 'Dribbble', 'flexblog' )
));
// Social Envelope Setting
$wp_customize->add_setting( 'infinity_social[envelope]', array(
'default' => '',
'type' => 'option',
'sanitize_callback' => 'esc_url_raw'
));
// Social Envelope Control
$wp_customize->add_control( 'infinity_social[envelope]', array(
'type' => 'url',
'section' => 'infinity_social',
'label' => esc_html__( 'Envelope', 'flexblog' )
));
// theme Activation
$wp_customize->add_setting( 'infinity_social[theme_activation]', array(
'default' => '',
'type' => 'option',
'sanitize_callback' => 'infinity_checkbox_callback'
));
$wp_customize->add_control( 'infinity_social[theme_activation]', array(
'label' => '',
'section' => 'infinity_social',
'type' => 'checkbox'
));
/**
* ----------------------------------------------------------------------------------------
* Google Analytics Css Section
* ----------------------------------------------------------------------------------------
*/
$wp_customize->add_section('infinity_google_analytics', array(
'title' => esc_html__( 'Google Analytics', 'flexblog' ),
'priority' => 70
));
// Google Analytics Textarea Setting
$wp_customize->add_setting( 'infinity_google_analytics[code]', array(
'default' => '',
'type' => 'option',
'sanitize_callback' => 'infinity_textarea_callback'
));
// Google Analytics Textarea Control
$wp_customize->add_control( 'infinity_google_analytics[code]', array(
'type' => 'textarea',
'section' => 'infinity_google_analytics',
'label' => esc_html__( 'Enter Google Analytics Code', 'flexblog' )
));
}
/**
* ----------------------------------------------------------------------------------------
* Load Customizer Scripts
* ----------------------------------------------------------------------------------------
*/
function infinity_customizer_scripts() {
// Register style
wp_register_style( 'infinity-customizer-css', INFINITY_THEMEROOT. '/framework/customizer/css/infinity-customizer.css');
wp_register_style('infinity-font-awesome', INFINITY_THEMEROOT . '/css/font-awesome.min.css');
// Register scripts
wp_register_script( 'infinity-customizer-js', INFINITY_THEMEROOT . '/framework/customizer/js/infinity-customizer.js', array( 'jquery' ), false, true );
// Load the custom scripts
wp_enqueue_script( 'infinity-customizer-js' );
// Load the stylesheets
wp_enqueue_style('infinity-customizer-css');
wp_enqueue_style('infinity-font-awesome');
}
add_action( 'customize_controls_enqueue_scripts', 'infinity_customizer_scripts' );
function infinity_live_preview() {
// Register scripts
wp_register_script( 'infinity-customizer-livepreview', INFINITY_THEMEROOT .'/framework/customizer/js/customizer-livepreview.js', array('jquery'), null, true );
$infinity_options = array(
'header_color' => get_option('infinity_header_color'),
'carousel_color' => get_option('infinity_carousel_color'),
'general_color' => get_option('infinity_general_color'),
'footer_color' => get_option('infinity_footer_color')
);
wp_localize_script( 'infinity-customizer-livepreview', 'infinity_options', $infinity_options );
// Load the custom scripts
wp_enqueue_script( 'infinity-customizer-livepreview' );
}
add_action( 'customize_preview_init', 'infinity_live_preview' );
