remove_control("header_textcolor");
$wp_customize->remove_control("background_color");
$wp_customize->remove_control("display_header_text");
$wp_customize->register_control_type( 'Simple_Days_Image_Select_Control' );
get_template_part( 'inc/social', 'list' );
$social = get_query_var('social_list');
$heading_border_style = array(
'none' => esc_html__( 'none', 'simple-days' ),
'solid' => esc_html__( 'Solid', 'simple-days' ),
'double' => esc_html__( 'Double', 'simple-days' ),
'groove' => esc_html__( 'Groove', 'simple-days' ),
'ridge' => esc_html__( 'Ridge', 'simple-days' ),
'inset' => esc_html__( 'Inset', 'simple-days' ),
'outset' => esc_html__( 'Outset', 'simple-days' ),
'dashed' => esc_html__( 'Dashed', 'simple-days' ),
'dotted' => esc_html__( 'Dotted', 'simple-days' ),
);
$wp_customize->add_panel( 'simple_days_setting', array(
'priority' => 0,
'title' => esc_html__('Simple Days settings', 'simple-days'),
));
$wp_customize->add_section('simple_days_layout',array(
'title' => esc_html__('Layout', 'simple-days'),
'panel' => 'simple_days_setting',
));
// Add Settings and Controls for Layout.
$wp_customize->add_setting( 'simple_days_menu_layout', array(
'default' => '1',
'sanitize_callback' => 'sanitize_key'
));
$wp_customize->add_setting( 'simple_days_sidebar_layout', array(
'default' => '3',
'sanitize_callback' => 'sanitize_key',
'transport'=>'postMessage',
) );
$wp_customize->add_control( new Simple_Days_Image_Select_Control( $wp_customize, 'simple_days_sidebar_layout', array(
'label' => esc_html__( 'Sidebar Layout', 'simple-days' ),
'section' => 'simple_days_layout',
'choices' => array(
'1' => array(
'label' => esc_html__( 'Left Sidebar', 'simple-days' ),
'url' => '%ssidebar_left.png'
),
'3' => array(
'label' => esc_html__( 'Right Sidebar', 'simple-days' ),
'url' => '%ssidebar_right.png'
),
'0' => array(
'label' => esc_html__( 'No Sidebar', 'simple-days' ),
'url' => '%ssidebar_no.png'
),
),
)));
// Add Settings and Controls for Box Style.
$wp_customize->add_setting( 'simple_days_box_style', array(
'default' => 'flat',
'sanitize_callback' => 'simple_days_sanitize_radio',
'transport'=>'postMessage',
));
$wp_customize->add_control( 'simple_days_box_style', array(
'label' => esc_html__( 'Box Style', 'simple-days' ),
'section' => 'simple_days_layout',
'type' => 'radio',
'choices' => array(
'flat' => esc_html__( 'Flat', 'simple-days' ),
'shadow' => esc_html__( 'Shadow', 'simple-days' ),
),
));
$delimiter = '|';
$wp_customize->add_setting( 'simple_days_title_separator',array(
'default' => $delimiter,
'sanitize_callback' => 'wp_strip_all_tags',
));
$wp_customize->add_control( 'simple_days_title_separator',array(
'label' => esc_html__( 'the separator for the document title.', 'simple-days'),
'section' => 'simple_days_layout',
'type' => 'select',
'choices' => array(
' ' => esc_html(' '),
'|' => esc_html('|'),
'—' => esc_html('—'),
'−' => esc_html('−'),
'&' => esc_html('&'),
'·' => esc_html('·'),
'•' => esc_html('•'),
':' => esc_html(':'),
'¦' => esc_html('¦'),
'+' => esc_html('+'),
'/' => esc_html('/'),
'♠' => esc_html('♠'),
'♥' => esc_html('♥'),
'♦' => esc_html('♦'),
'♣' => esc_html('♣'),
'◊' => esc_html('◊'),
'⌘' => esc_html('⌘'),
'»' => esc_html('»'),
'>' => esc_html('>'),
'→' => esc_html('→'),
'⇒' => esc_html('⇒'),
'∼' => esc_html('∼'),
'…' => esc_html('…'),
),
));
$wp_customize->add_setting( 'simple_days_one_column_post', array(
'default' => '',
'sanitize_callback' => 'sanitize_text_field',
)
);
$wp_customize->add_control( 'simple_days_one_column_post', array(
'label' => esc_html__( 'to be single column when you type post id.', 'simple-days' ),
'description' => esc_html__(' Multiple id must be seperated by a comma.', 'simple-days'),
'section' => 'simple_days_layout',
'type' => 'text',
)
);
$wp_customize->add_section('simple_days_layout_header',array(
'title' => esc_html__('Layout', 'simple-days').esc_html__('(Header)', 'simple-days'),
'panel' => 'simple_days_setting',
));
$wp_customize->add_control( new Simple_Days_Image_Select_Control( $wp_customize, 'simple_days_menu_layout', array(
'label' => esc_html__( 'Title and Menu Layout', 'simple-days' ),
'section' => 'simple_days_layout_header',
'choices' => array(
'1' => array(
'label' => esc_html__( 'One row Left Title Right Menu', 'simple-days' ),
'url' => '%smenu_1.png'
),
'2' => array(
'label' => esc_html__( 'One row Left Menu Right Title', 'simple-days' ),
'url' => '%smenu_2.png'
),
'3' => array(
'label' => esc_html__( 'Two rows Up Title Down Menu', 'simple-days' ),
'url' => '%smenu_3.png'
),
'4' => array(
'label' => esc_html__( 'Two rows Up Menu Down Title', 'simple-days' ),
'url' => '%smenu_4.png'
),
),
)));
$wp_customize->add_setting( 'simple_days_menu_layout_title_position', array(
'default' => 'center',
'sanitize_callback' => 'simple_days_sanitize_radio',
));
$wp_customize->add_control( 'simple_days_menu_layout_title_position', array(
'label' => esc_html__( 'Title display position ( when Two rows )', 'simple-days' ),
'section' => 'simple_days_layout_header',
'type' => 'select',
'choices' => array(
'left' => esc_html__( 'Left', 'simple-days' ),
'center' => esc_html__( 'Center', 'simple-days' ),
'right' => esc_html__( 'Right', 'simple-days' ),
),
));
$wp_customize->add_setting( 'simple_days_menu_layout_menu_position', array(
'default' => 'left',
'sanitize_callback' => 'simple_days_sanitize_radio',
));
$wp_customize->add_control( 'simple_days_menu_layout_menu_position', array(
'label' => esc_html__( 'Menu display position ( when Two rows )', 'simple-days' ),
'section' => 'simple_days_layout_header',
'type' => 'select',
'choices' => array(
'left' => esc_html__( 'Left', 'simple-days' ),
'center' => esc_html__( 'Center', 'simple-days' ),
'right' => esc_html__( 'Right', 'simple-days' ),
),
));
$wp_customize->add_setting( 'simple_days_sticky_header',array(
'default' => false,
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( 'simple_days_sticky_header',array(
'label' => esc_html__( 'Enable', 'simple-days'),
'description' => esc_html__('Sticky header', 'simple-days'),
'section' => 'simple_days_layout_header',
'type' => 'checkbox',
));
$wp_customize->add_setting( 'simple_days_header_shadow',array(
'default' => true,
'sanitize_callback' => 'sanitize_text_field',
'transport'=>'postMessage',
));
$wp_customize->add_control( 'simple_days_header_shadow',array(
'label' => esc_html__( 'Enable', 'simple-days'),
'description' => esc_html__('Display header shadow', 'simple-days'),
'section' => 'simple_days_layout_header',
'type' => 'checkbox',
));
$wp_customize->add_setting( 'simple_days_mobile_header_search',array(
'default' => true,
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( 'simple_days_mobile_header_search',array(
'label' => esc_html__( 'Enable', 'simple-days'),
'description' => esc_html__('Display search button in header for mobile user', 'simple-days'),
'section' => 'simple_days_layout_header',
'type' => 'checkbox',
));
$wp_customize->add_section('simple_days_font_setting',array(
'title' => esc_html__('Fonts','simple-days'),
'panel' => 'simple_days_setting',
));
$normal_fonts = array(
'none' => '',
'Arial, Helvetica, sans-serif' => esc_html('Arial, Helvetica, sans-serif'),
'"Arial Black", Gadget, sans-serif' => esc_html('Arial Black, Gadget, sans-serif'),
'"Comic Sans MS", cursive, sans-serif' => esc_html('Comic Sans MS, cursive, sans-serif'),
'"Courier New", Courier, monospace' => esc_html('Courier New, Courier, monospace'),
'Georgia, serif' => esc_html('Georgia, Helvetica, serif'),
'Impact, Charcoal, sans-serif' => esc_html('Impact, Charcoal, sans-serif'),
'"Lucida Console", Monaco, monospace' => esc_html('Lucida Console, Monaco, monospace'),
'"Palatino Linotype", "Book Antiqua", Palatino, serif' => esc_html('Palatino Linotype, Book Antiqua, Palatino, serif'),
'"Times New Roman", Times, serif' => esc_html('Times New Roman, Times, serif'),
'"Trebuchet MS", Helvetica, sans-serif' => esc_html('Trebuchet MS, Helvetica, sans-serif'),
'Verdana, Geneva, sans-serif' => esc_html('Verdana, Geneva, sans-serif'),
);
$google_font_effects = array(
'none' => '',
'anaglyph' => esc_html__('Anaglyph', 'simple-days'),
'brick-sign' => esc_html__('Brick Sign', 'simple-days'),
'canvas-print' => esc_html__('Canvas Print', 'simple-days'),
'crackle' => esc_html__('Crackle', 'simple-days'),
'decaying' => esc_html__('Decaying', 'simple-days'),
'destruction' => esc_html__('Destruction', 'simple-days'),
'distressed' => esc_html__('Distressed', 'simple-days'),
'distressed-wood' => esc_html__('Distressed Wood', 'simple-days'),
'emboss' => esc_html__('Emboss', 'simple-days'),
'fire' => esc_html__('Fire', 'simple-days'),
'fire-animation' => esc_html__('Fire Animation', 'simple-days'),
'fragile' => esc_html__('Fragile', 'simple-days'),
'grass' => esc_html__('Grass', 'simple-days'),
'ice' => esc_html__('Ice', 'simple-days'),
'mitosis' => esc_html__('Mitosis', 'simple-days'),
'neon' => esc_html__('Neon', 'simple-days'),
'outline' => esc_html__('Outline', 'simple-days'),
'putting-green' => esc_html__('Putting Green', 'simple-days'),
'scuffed-steel' => esc_html__('Scuffed Steel', 'simple-days'),
'shadow-multiple' => esc_html__('Shadow Multiple', 'simple-days'),
'splintered' => esc_html__('Splintered', 'simple-days'),
'static' => esc_html__('Static', 'simple-days'),
'stonewash' => esc_html__('Stonewash', 'simple-days'),
'3d' => esc_html__('Three Dimensional', 'simple-days'),
'3d-float' => esc_html__('Three Dimensional Float', 'simple-days'),
'vintage' => esc_html__('Vintage', 'simple-days'),
'wallpaper' => esc_html__('Wallpaper', 'simple-days'),
);
$customize_font_section = array();
$customize_font = array();
get_template_part( 'inc/googlefonts' );
$googlefonts = simple_days_google_fonts_list();
$customize_font_slug = 'simple_days_web_safe_fonts_info';
$customize_font_section[$customize_font_slug] = array(
'slug' => $customize_font_slug,
'title' => esc_html__('Web Safe Fonts', 'simple-days'),
'content' => '',
'fonts' => 'normal_fonts',
);
$customize_font[$customize_font_slug][] = array(
'slug' => 'simple_days_font_body',
'label' => esc_html_x( 'Body', 'font' , 'simple-days'),
);
$customize_font[$customize_font_slug][] = array(
'slug' => 'simple_days_font_headings',
'label' => esc_html_x( 'Headings', 'font' , 'simple-days'),
);
$customize_font[$customize_font_slug][] = array(
'slug' => 'simple_days_font_site_title',
'label' => esc_html_x( 'Site title', 'font' , 'simple-days'),
);
$customize_font[$customize_font_slug][] = array(
'slug' => 'simple_days_font_post_title',
'label' => esc_html_x( 'Post title', 'font' , 'simple-days'),
);
$customize_font_slug = 'simple_days_google_fonts_info';
$customize_font_section[$customize_font_slug] = array(
'slug' => $customize_font_slug,
'title' => esc_html__('Google Fonts', 'simple-days'),
'content' => sprintf(esc_html__('This selection overrides %s.', 'simple-days'),esc_html__( 'Web Safe Fonts', 'simple-days')),
'fonts' => 'googlefonts',
);
$customize_font[$customize_font_slug][] = array(
'slug' => 'simple_days_font_body_google',
'label' => esc_html_x( 'Body', 'font' , 'simple-days'),
);
$customize_font[$customize_font_slug][] = array(
'slug' => 'simple_days_font_headings_google',
'label' => esc_html_x( 'Headings', 'font' , 'simple-days'),
);
$customize_font[$customize_font_slug][] = array(
'slug' => 'simple_days_font_site_title_google',
'label' => esc_html_x( 'Site title', 'font' , 'simple-days'),
);
$customize_font[$customize_font_slug][] = array(
'slug' => 'simple_days_font_post_title_google',
'label' => esc_html_x( 'Post title', 'font' , 'simple-days'),
);
$customize_font[$customize_font_slug][] = array(
'slug' => 'simple_days_font_site_title_google_effects_1',
'label' => esc_html_x( 'Site title', 'font' , 'simple-days').esc_html__( '(Effect)', 'simple-days'),
'fonts' => 'google_font_effects',
);
$customize_font[$customize_font_slug][] = array(
'slug' => 'simple_days_font_site_title_google_effects_2',
'label' => esc_html_x( 'Post title', 'font' , 'simple-days').esc_html__( '(Effect)', 'simple-days'),
'fonts' => 'google_font_effects',
);
if( get_locale() == 'ja' ) {
$normal_jp_fonts = array(
'none' => '',
esc_html__('Verdana, "YuGothic", YuGothic, "Hiragino Kaku Gothic ProN W3", "Hiragino Kaku Gothic ProN", "Meiryo", Meiryo, sans-serif', 'simple-days') => esc_html__('Verdana, "YuGothic", YuGothic, "Hiragino Kaku Gothic ProN W3", "Hiragino Kaku Gothic ProN", "Meiryo", Meiryo, sans-serif', 'simple-days'),
esc_html__('"Times New Roman", "YuMincho", YuMincho, "Hiragino Mincho ProN W3", "Hiragino Mincho ProN", "Meiryo", Meiryo, serif', 'simple-days') => esc_html__('"Times New Roman", "YuMincho", YuMincho, "Hiragino Mincho ProN W3", "Hiragino Mincho ProN", "Meiryo", Meiryo, serif', 'simple-days'),
esc_html__('"Osaka", Osaka-mono, "MS Gothic", "MS Gothic", monospace', 'simple-days') => esc_html__('"Osaka", Osaka-mono, "MS Gothic", "MS Gothic", monospace', 'simple-days'),
esc_html__('Verdana, Roboto, "Droid Sans", "YuGothic", YuGothic, "Hiragino Kaku Gothic ProN W3", "Hiragino Kaku Gothic ProN", "Meiryo", Meiryo, sans-serif', 'simple-days') => esc_html__('Verdana, Roboto, "Droid Sans", "YuGothic", YuGothic, "Hiragino Kaku Gothic ProN W3", "Hiragino Kaku Gothic ProN", "Meiryo", Meiryo, sans-serif', 'simple-days'),
);
$google_jp_fonts = array(
'none' => '',
'M PLUS 1p' => esc_html('M PLUS 1p'),
'M PLUS Rounded 1c' => esc_html('M PLUS Rounded 1c'),
'Sawarabi Mincho' => esc_html__('Sawarabi Mincho', 'simple-days'),
'Sawarabi Gothic' => esc_html__('Sawarabi Gothic', 'simple-days'),
'Kosugi' => esc_html('Kosugi'),
'Kosugi Maru' => esc_html('Kosugi Maru'),
'Hannari' => esc_html__('Hannari', 'simple-days'),
'Kokoro' => esc_html__('Kokoro', 'simple-days'),
'Nikukyu' => esc_html__('Nikukyu', 'simple-days'),
'Nico Moji' => esc_html__('Nico Moji', 'simple-days'),
'Noto Sans Japanese' => esc_html('Noto Sans Japanese'),
'Noto Sans JP' => esc_html('Noto Sans JP'),
);
$customize_font_slug = 'simple_days_local_fonts_japanese_info';
$customize_font_section[$customize_font_slug] = array(
'slug' => $customize_font_slug,
'title' => esc_html__('Local Fonts', 'simple-days').esc_html__( '(Japanese)', 'simple-days' ),
'content' => sprintf(esc_html__('This selection overrides %s.', 'simple-days'),esc_html__( 'Google Fonts', 'simple-days')),
'fonts' => 'normal_jp_fonts',
);
$customize_font[$customize_font_slug][] = array(
'slug' => 'simple_days_font_body_jp',
'label' => esc_html_x( 'Body', 'font' , 'simple-days'),
);
$customize_font[$customize_font_slug][] = array(
'slug' => 'simple_days_font_headings_jp',
'label' => esc_html_x( 'Headings', 'font' , 'simple-days'),
);
$customize_font[$customize_font_slug][] = array(
'slug' => 'simple_days_font_site_title_jp',
'label' => esc_html_x( 'Site title', 'font' , 'simple-days'),
);
$customize_font[$customize_font_slug][] = array(
'slug' => 'simple_days_font_post_title_jp',
'label' => esc_html_x( 'Post title', 'font' , 'simple-days'),
);
$customize_font_slug = 'simple_days_google_fonts_japanese_info';
$customize_font_section[$customize_font_slug] = array(
'slug' => $customize_font_slug,
'title' => esc_html__('Google Fonts', 'simple-days').esc_html__( '(Japanese)', 'simple-days' ),
'content' => sprintf(esc_html__('This selection overrides %s.', 'simple-days'),esc_html__('Local Fonts', 'simple-days').esc_html__( '(Japanese)', 'simple-days' )),
'fonts' => 'google_jp_fonts',
);
$customize_font[$customize_font_slug][] = array(
'slug' => 'simple_days_font_body_google_jp',
'label' => esc_html_x( 'Body', 'font' , 'simple-days'),
);
$customize_font[$customize_font_slug][] = array(
'slug' => 'simple_days_font_headings_google_jp',
'label' => esc_html_x( 'Headings', 'font' , 'simple-days'),
);
$customize_font[$customize_font_slug][] = array(
'slug' => 'simple_days_font_site_title_google_jp',
'label' => esc_html_x( 'Site title', 'font' , 'simple-days'),
);
$customize_font[$customize_font_slug][] = array(
'slug' => 'simple_days_font_post_title_google_jp',
'label' => esc_html_x( 'Post title', 'font' , 'simple-days'),
);
$customize_font[$customize_font_slug][] = array(
'slug' => 'simple_days_font_site_title_google_jp_effects_1',
'label' => esc_html_x( 'Site title', 'font' , 'simple-days').esc_html__( '(Effect)', 'simple-days'),
'fonts' => 'google_font_effects',
);
$customize_font[$customize_font_slug][] = array(
'slug' => 'simple_days_font_site_title_google_jp_effects_2',
'label' => esc_html_x( 'Post title', 'font' , 'simple-days').esc_html__( '(Effect)', 'simple-days'),
'fonts' => 'google_font_effects',
);
}// Japanese only
foreach( $customize_font_section as $section_value ) {
$wp_customize->add_setting( $section_value['slug'], array(
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( new Simple_Days_html_text_Custom_Content( $wp_customize, $section_value['slug'], array(
'section' => 'simple_days_font_setting',
'label' => $section_value['title'],
'content' => $section_value['content'],
)));
foreach( $customize_font[$section_value['slug']] as $setting_value ) {
if(isset($setting_value['fonts']))$section_value['fonts'] = $setting_value['fonts'];
$wp_customize->add_setting( $setting_value['slug'],array(
'default' => 'none',
'sanitize_callback' => 'wp_kses_post',
//'transport' => 'postMessage',
));
$wp_customize->add_control( $setting_value['slug'],array(
'label' => $setting_value['label'],
'section' => 'simple_days_font_setting',
'type' => 'select',
'choices' => ${$section_value['fonts']},
));
}
}
function simple_days_sanitize_radio( $input, $setting ){
//input must be a slug: lowercase alphanumeric characters, dashes and underscores are allowed only
$input = sanitize_key($input);
//get the list of possible radio box options
$choices = $setting->manager->get_control( $setting->id )->choices;
//return input if valid or return default option
return ( array_key_exists( $input, $choices ) ? $input : $setting->default );
}
function simple_days_sanitize_select( $input, $setting ){
//input must be a slug: lowercase alphanumeric characters, dashes and underscores are allowed only
$input = sanitize_key($input);
//get the list of possible select options
$choices = $setting->manager->get_control( $setting->id )->choices;
//return input if valid or return default option
return ( array_key_exists( $input, $choices ) ? $input : $setting->default );
}
function simple_days_sanitize_image_file( $file, $setting ) {
//allowed file types
$mimes = array(
'jpg|jpeg|jpe' => 'assets/images/jpeg',
'gif' => 'assets/images/gif',
'png' => 'assets/images/png'
);
//check file type from file name
$file_ext = wp_check_filetype( $file, $mimes );
//if file has a valid mime type return it, otherwise return default
return ( $file_ext['ext'] ? $file : $setting->default );
}
//select sanitization function
function simple_days_sns_name_sanitize($input){
//input must be a slug: lowercase alphanumeric characters, dashes and underscores are allowed only
$input = sanitize_key($input);
//get the list of possible select options
$choices = array(
'none' => '-',
'amazon' => 'Amazon',
'buffer' => 'buffer',
'codepen' => 'CodePen',
'digg' => 'digg',
'mail' => 'Email',
'evernote' => 'Evernote',
'facebook' => 'Facebook',
'feedly' => 'Feedly',
'flickr' => 'Flickr',
'github' => 'Github',
'googleplus' => 'Google+',
'hatenabookmark' => 'Hatena Bookmark',
'instagram' => 'Instagram',
'line' => 'Line',
'linkedin' => 'LinkedIn',
'meetup' => 'Meetup',
'messenger' => 'Messenger',
'pinterest' => 'Pinterest',
'pocket' => 'Pocket',
'reddit' => 'Reddit',
'rss' => 'RSS',
'soundcloud' => 'SoundCloud',
'tumblr' => 'Tumblr',
'twitter' => 'Twitter',
'whatsapp' => 'WhatsApp',
'vimeo' => 'Vimeo',
'youtube' => 'Youtube',
);
//return input if valid or return default option
return ( array_key_exists( $input, $choices ) ? $input : '' );
}
function simple_days_sanitize_intval($input){
$input = intval($input);
return $input;
}
$wp_customize->add_section('simple_days_index_page_setting',array(
'title' => esc_html__('Index Page', 'simple-days'),
'panel' => 'simple_days_setting',
));
$wp_customize->add_setting( 'simple_days_index_layout_list', array(
'default' => 'list',
'sanitize_callback' => 'sanitize_key'
) );
$wp_customize->add_control( new Simple_Days_Image_Select_Control( $wp_customize, 'simple_days_index_layout_list', array(
'label' => esc_html__( 'Layout', 'simple-days' ),
'description' => __( 'Choose a layout for the blog posts.', 'simple-days' ),
'section' => 'simple_days_index_page_setting',
'choices' => array(
'list' => array(
'label' => esc_html__( 'List layout', 'simple-days' ),
'url' => '%slayout_list.png'
),
'grid2' => array(
'label' => esc_html__( 'Two grid layout', 'simple-days' ),
'url' => '%slayout_grid2.png'
),
'grid3' => array(
'label' => esc_html__( 'Three grid layout', 'simple-days' ),
'url' => '%slayout_grid3.png'
),
),
)));
$wp_customize->add_setting('index_thumbnail',array('sanitize_callback' => 'absint',));
$wp_customize->add_control('index_thumbnail',array(
'section' => 'simple_days_index_page_setting',
'type' => 'hidden'
));
$wp_customize->selective_refresh->add_partial( 'index_thumbnail', array(
'selector' => '.post_card_thum',
));
$wp_customize->add_setting( 'simple_days_index_thumbnail', array(
'default' => 'left',
'sanitize_callback' => 'simple_days_sanitize_radio',
));
$wp_customize->add_control( 'simple_days_index_thumbnail', array(
'label' => esc_html__( 'Thumbnail display position', 'simple-days' ),
//'description' => esc_html__('Date and category disappears when you select hide.', 'simple-days'),
'section' => 'simple_days_index_page_setting',
'type' => 'radio',
'choices' => array(
'left' => esc_html__( 'Left', 'simple-days' ).esc_html__( '(Up)', 'simple-days' ),
'right' => esc_html__( 'Right', 'simple-days' ).esc_html__( '(Down)', 'simple-days' ),
'none' => esc_html__( 'Hide', 'simple-days' ),
),
));
$wp_customize->add_setting('post_date_wrap',array('sanitize_callback' => 'absint',));
$wp_customize->add_control('post_date_wrap',array(
'section' => 'simple_days_index_page_setting',
'type' => 'hidden'
));
$wp_customize->selective_refresh->add_partial( 'post_date_wrap', array(
'selector' => '.post_date_wrap',
));
$wp_customize->add_setting( 'simple_days_top_date_format', array(
'default' => '1',
'sanitize_callback' => 'simple_days_sanitize_radio',
'transport' => 'postMessage',
)
);
$wp_customize->add_control( 'simple_days_top_date_format', array(
'label' => esc_html__( 'post date display format', 'simple-days' ),
'section' => 'simple_days_index_page_setting',
'type' => 'radio',
'choices' => array(
'1' => esc_html__( 'day-month-year', 'simple-days' ),
'2' => esc_html__( 'month-day-year', 'simple-days' ),
),
));
$wp_customize->add_setting( 'simple_days_top_date_wrap', array(
'default' => '1',
'sanitize_callback' => 'simple_days_sanitize_radio',
'transport' => 'postMessage',
)
);
$wp_customize->add_control( 'simple_days_top_date_wrap', array(
'label' => esc_html__( 'post date display shape', 'simple-days' ),
'description' => esc_html__('around of a line appear rounded or squared', 'simple-days'),
'section' => 'simple_days_index_page_setting',
'type' => 'radio',
'choices' => array(
'1' => esc_html__( 'Circle', 'simple-days' ),
'2' => esc_html__( 'Square', 'simple-days' ),
),
));
$wp_customize->add_setting( 'simple_days_index_date_position', array(
'default' => 'left',
'sanitize_callback' => 'simple_days_sanitize_radio',
'transport' => 'postMessage',
));
$wp_customize->add_control( 'simple_days_index_date_position', array(
'label' => esc_html__( 'Post date display position', 'simple-days' ),
'section' => 'simple_days_index_page_setting',
'type' => 'radio',
'choices' => array(
'left' => esc_html__( 'Left', 'simple-days' ),
'right' => esc_html__( 'Right', 'simple-days' ),
'none' => esc_html__( 'Hide', 'simple-days' ),
),
));
$wp_customize->add_setting('index_category',array('sanitize_callback' => 'absint',));
$wp_customize->add_control('index_category',array(
'section' => 'simple_days_index_page_setting',
'type' => 'hidden'
));
$wp_customize->selective_refresh->add_partial( 'index_category', array(
'selector' => '.post_card_category',
));
$wp_customize->add_setting( 'simple_days_index_category_position', array(
'default' => 'right',
'sanitize_callback' => 'simple_days_sanitize_radio',
'transport' => 'postMessage',
));
$wp_customize->add_control( 'simple_days_index_category_position', array(
'label' => esc_html__( 'Post category display position', 'simple-days' ),
'section' => 'simple_days_index_page_setting',
'type' => 'radio',
'choices' => array(
'left' => esc_html__( 'Left', 'simple-days' ),
'right' => esc_html__( 'Right', 'simple-days' ),
'none' => esc_html__( 'Hide', 'simple-days' ),
),
));
$wp_customize->add_setting('excerpt_length',array('sanitize_callback' => 'absint',));
$wp_customize->add_control('excerpt_length',array(
'section' => 'simple_days_index_page_setting',
'type' => 'hidden'
));
$wp_customize->selective_refresh->add_partial( 'excerpt_length', array(
'selector' => '.post_card .summary',
));
$wp_customize->add_setting( 'simple_days_excerpt_length_customize', array(
'default' => 150,
'sanitize_callback' => 'absint',
));
$wp_customize->add_control( 'simple_days_excerpt_length_customize', array(
'label' => esc_html__( 'Excerpt length', 'simple-days' ),
'description' => esc_html__('default:', 'simple-days').esc_html('150'),
'section' => 'simple_days_index_page_setting',
'type' => 'number',
'input_attrs' => array(
'min' => '0', 'step' => '1', 'max' => '500',),
));
$delimiter = '…';
$wp_customize->add_setting( 'simple_days_excerpt_ellipsis',array(
'default' => $delimiter,
'sanitize_callback' => 'wp_strip_all_tags',
));
$wp_customize->add_control( 'simple_days_excerpt_ellipsis',array(
'label' => esc_html__( 'Ellipsis', 'simple-days'),
'section' => 'simple_days_index_page_setting',
'type' => 'select',
'choices' => array(
' ' => esc_html(' '),
'…' => esc_html('…'),
'[…]' => esc_html('[…]'),
'‥' => esc_html('‥'),
),
));
$wp_customize->add_setting('more_read',array('sanitize_callback' => 'absint',));
$wp_customize->add_control('more_read',array(
'section' => 'simple_days_index_page_setting',
'type' => 'hidden'
));
$wp_customize->selective_refresh->add_partial( 'more_read', array(
'selector' => '.more_read',
));
$wp_customize->add_setting( 'simple_days_read_more_position', array(
'default' => 'right',
'sanitize_callback' => 'simple_days_sanitize_radio',
'transport' => 'postMessage',
));
$wp_customize->add_control( 'simple_days_read_more_position', array(
'label' => esc_html__( 'Read More display position', 'simple-days' ),
'section' => 'simple_days_index_page_setting',
'type' => 'radio',
'choices' => array(
'left' => esc_html__( 'Left', 'simple-days' ),
'center' => esc_html__( 'Center', 'simple-days' ),
'right' => esc_html__( 'Right', 'simple-days' ),
'none' => esc_html__( 'Hide', 'simple-days' ),
),
));
$wp_customize->add_setting( 'simple_days_index_list_widget_position', array(
'default' => 'after',
'sanitize_callback' => 'simple_days_sanitize_radio',
));
$wp_customize->add_control( 'simple_days_index_list_widget_position', array(
'label' => esc_html__( 'How to Insert Index list widget area', 'simple-days' ),
'section' => 'simple_days_index_page_setting',
'type' => 'radio',
'choices' => array(
'after' => esc_html__( 'Just after post', 'simple-days' ),
'every' => esc_html__( 'Every post', 'simple-days' ),
),
));
$wp_customize->add_setting( 'simple_days_index_list_widget_number', array(
'default' => 3,
'sanitize_callback' => 'absint',
));
$wp_customize->add_control( 'simple_days_index_list_widget_number', array(
'label' => esc_html__( 'Count of post for above configuring', 'simple-days' ),
//'description' => esc_html__( 'Count of post for above configuring', 'simple-days' ),
'section' => 'simple_days_index_page_setting', // Add a default or your own section
'type' => 'number',
'input_attrs' => array(
'min' => 1, 'step' => 1, 'max' => 10,
),
));
$wp_customize->add_section('simple_days_layout_footer',array(
'title' => esc_html__('Layout', 'simple-days').esc_html__('(Footer)', 'simple-days'),
'panel' => 'simple_days_setting',
));
$wp_customize->add_setting( 'simple_days_footer_layout', array(
'default' => '2',
'sanitize_callback' => 'sanitize_key'
) );
$wp_customize->add_control( new Simple_Days_Image_Select_Control( $wp_customize, 'simple_days_footer_layout', array(
'label' => esc_html__( 'Footer Menu Layout', 'simple-days' ),
'section' => 'simple_days_layout_footer',
'choices' => array(
'1' => array(
'label' => esc_html__( 'First', 'simple-days' ),
'url' => '%sfooter_1.png'
),
'2' => array(
'label' => esc_html__( 'Second', 'simple-days' ),
'url' => '%sfooter_2.png'
),
'3' => array(
'label' => esc_html__( 'Third', 'simple-days' ),
'url' => '%sfooter_3.png'
),
),
)));
$wp_customize->add_setting('back_to_top_button',array('sanitize_callback' => 'absint',));
$wp_customize->add_control('back_to_top_button',array(
'section' => 'simple_days_layout_footer',
'type' => 'hidden'
));
$wp_customize->selective_refresh->add_partial( 'back_to_top_button', array(
'selector' => '.to_top',
));
$wp_customize->add_setting( 'simple_days_back_to_top_button',array(
'default' => true,
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( 'simple_days_back_to_top_button',array(
'label' => esc_html__( 'Enable', 'simple-days'),
'description' => esc_html__('Back to top button', 'simple-days'),
'section' => 'simple_days_layout_footer',
'type' => 'checkbox',
));
$wp_customize->add_setting('copyright',array('sanitize_callback' => 'absint',));
$wp_customize->add_control('copyright',array(
'section' => 'simple_days_layout_footer',
'type' => 'hidden'
));
$wp_customize->selective_refresh->add_partial( 'copyright', array(
'selector' => '.copyright',
));
$copyright_year = 1998;
$copyright_year_list = array();
while($copyright_year <= date('Y')){
$copyright_year_list[] = (string) $copyright_year;
$copyright_year++;
}
$copyright_year_list = array_combine( $copyright_year_list, $copyright_year_list ) ;
$copyright_year_list = $copyright_year_list + array('none' => '');
$wp_customize->add_setting( 'simple_days_copyright_year',array(
'default' => 'none',
'sanitize_callback' => 'wp_kses_post',
));
$wp_customize->add_control( 'simple_days_copyright_year',array(
'label' => esc_html__( 'Year of Publication', 'simple-days'),
'section' => 'simple_days_layout_footer',
'type' => 'select',
'choices' => $copyright_year_list,
));
$wp_customize->add_setting('copyright_description',array('sanitize_callback' => 'absint',));
$wp_customize->add_control('copyright_description',array(
'section' => 'simple_days_layout_footer',
'type' => 'hidden'
));
$wp_customize->selective_refresh->add_partial( 'copyright_description', array(
'selector' => '.description',
));
$wp_customize->add_setting( 'simple_days_copyright_description',array(
'default' => false,
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( 'simple_days_copyright_description',array(
'label' => esc_html__( 'Hide', 'simple-days'),
'description' => esc_html__('Description', 'simple-days'),
'section' => 'simple_days_layout_footer',
'type' => 'checkbox',
));
$wp_customize->add_setting('copyright_wordpress',array('sanitize_callback' => 'absint',));
$wp_customize->add_control('copyright_wordpress',array(
'section' => 'simple_days_layout_footer',
'type' => 'hidden'
));
$wp_customize->selective_refresh->add_partial( 'copyright_wordpress', array(
'selector' => '.copyright_wordpress',
));
$wp_customize->add_setting( 'simple_days_copyright_wordpress',array(
'default' => false,
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( 'simple_days_copyright_wordpress',array(
'label' => esc_html__( 'Hide', 'simple-days'),
'description' => esc_html__('Powered by WordPress', 'simple-days'),
'section' => 'simple_days_layout_footer',
'type' => 'checkbox',
));
$wp_customize->add_setting( 'simple_days_copyright_simple_days',array(
'default' => false,
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( 'simple_days_copyright_simple_days',array(
'label' => esc_html__( 'Hide', 'simple-days'),
'description' => esc_html__('Theme by Simple Days', 'simple-days'),
'section' => 'simple_days_layout_footer',
'type' => 'checkbox',
));
$wp_customize->add_section('simple_days_posts',array(
'title' => esc_html__('Posts','simple-days'),
'panel' => 'simple_days_setting',
));
$wp_customize->add_setting('posts_thumbnail',array('sanitize_callback' => 'absint',));
$wp_customize->add_control('posts_thumbnail',array(
'section' => 'simple_days_posts',
'type' => 'hidden'
));
$wp_customize->selective_refresh->add_partial( 'posts_thumbnail', array(
'selector' => '.posts_thum',
));
$wp_customize->add_setting( 'simple_days_posts_thumbnail',array(
'default' => true,
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( 'simple_days_posts_thumbnail',array(
'label' => esc_html__( 'Display', 'simple-days'),
'description' => esc_html__('Thumbnail', 'simple-days'),
'section' => 'simple_days_posts',
'type' => 'checkbox',
));
$wp_customize->add_setting( 'simple_days_posts_title_over_thumbnail',array(
'default' => false,
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( 'simple_days_posts_title_over_thumbnail',array(
'label' => esc_html__( 'Enable', 'simple-days'),
'description' => esc_html__('Post title over the thumbnail.', 'simple-days'),
'section' => 'simple_days_posts',
'type' => 'checkbox',
));
$wp_customize->add_setting( 'simple_days_posts_full_width_thumbnail',array(
'default' => false,
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( 'simple_days_posts_full_width_thumbnail',array(
'label' => esc_html__( 'Enable', 'simple-days'),
'description' => esc_html__('Full width thumbnail at under the header.', 'simple-days'),
'section' => 'simple_days_posts',
'type' => 'checkbox',
));
$wp_customize->add_setting('author_position',array('sanitize_callback' => 'absint',));
$wp_customize->add_control('author_position',array(
'section' => 'simple_days_posts',
'type' => 'hidden'
));
$wp_customize->selective_refresh->add_partial( 'author_position', array(
'selector' => '.post_author',
));
$wp_customize->add_setting( 'simple_days_posts_author_position', array(
'default' => 'right',
'sanitize_callback' => 'simple_days_sanitize_radio',
'transport'=>'postMessage',
));
$wp_customize->add_control( 'simple_days_posts_author_position', array(
'label' => esc_html__( 'Author display position', 'simple-days' ),
'section' => 'simple_days_posts',
'type' => 'radio',
'choices' => array(
'left' => esc_html__( 'Left', 'simple-days' ),
'right' => esc_html__( 'Right', 'simple-days' ),
'none' => esc_html__( 'Hide', 'simple-days' ),
),
));
$wp_customize->add_setting( 'simple_days_posts_author_icon',array(
'default' => 'fa-user',
'sanitize_callback' => 'wp_strip_all_tags',
));
$wp_customize->add_control( 'simple_days_posts_author_icon',array(
'label' => esc_html__( 'Author icon', 'simple-days'),
'section' => 'simple_days_posts',
'type' => 'select',
'choices' => array(
' ' => esc_html(' '),
'fa-user' => ' fa-user',
'fa-user-o' => ' fa-user-o',
'fa-user-circle' => ' fa-user-circle',
'fa-user-circle-o' => ' fa-user-circle-o',
'fa-users' => ' fa-users',
'fa-user-secret' => ' fa-user-secret',
'fa-female' => ' fa-female',
'fa-male' => ' fa-male',
'fa-child' => ' fa-child',
'fa-id-badge' => ' fa-id-badge',
'fa-smile-o' => ' fa-smile-o',
'fa-star-o' => ' fa-star-o',
'fa-star' => ' fa-star',
'fa-heart' => ' fa-heart',
'fa-heart-o' => ' fa-heart-o',
),
));
$wp_customize->add_setting('date_position',array('sanitize_callback' => 'absint',));
$wp_customize->add_control('date_position',array(
'section' => 'simple_days_posts',
'type' => 'hidden'
));
$wp_customize->selective_refresh->add_partial( 'date_position', array(
'selector' => '.post_date',
));
$wp_customize->add_setting( 'simple_days_posts_date_position', array(
'default' => 'right',
'sanitize_callback' => 'simple_days_sanitize_radio',
'transport'=>'postMessage',
));
$wp_customize->add_control( 'simple_days_posts_date_position', array(
'label' => esc_html__( 'Post date display position', 'simple-days' ),
'section' => 'simple_days_posts',
'type' => 'radio',
'choices' => array(
'left' => esc_html__( 'Left', 'simple-days' ),
'right' => esc_html__( 'Right', 'simple-days' ),
'none' => esc_html__( 'Hide', 'simple-days' ),
),
));
$wp_customize->add_setting( 'simple_days_posts_date_display', array(
'default' => 'both',
'sanitize_callback' => 'simple_days_sanitize_radio',
));
$wp_customize->add_control( 'simple_days_posts_date_display', array(
'label' => esc_html__( 'Display method Post date', 'simple-days' ),
'section' => 'simple_days_posts',
'type' => 'radio',
'choices' => array(
'date' => esc_html__( 'Only Date', 'simple-days' ),
'update' => esc_html__( 'Date hide when post have update.', 'simple-days' ),
'both' => esc_html__( 'Both', 'simple-days' ),
),
));
$wp_customize->add_setting( 'simple_days_posts_date_icon',array(
'default' => 'fa-calendar-check-o',
'sanitize_callback' => 'wp_strip_all_tags',
));
$wp_customize->add_control( 'simple_days_posts_date_icon',array(
'label' => esc_html__( 'Date icon', 'simple-days'),
'section' => 'simple_days_posts',
'type' => 'select',
'choices' => array(
' ' => esc_html(' '),
'fa-calendar-check-o' => ' fa-calendar-check-o',
'fa-clock-o' => ' fa-clock-o',
'fa-calendar-o' => ' fa-calendar-o',
'fa-calendar' => ' fa-calendar',
'fa-history' => ' fa-history',
'fa-refresh' => ' fa-refresh',
),
));
$wp_customize->add_setting( 'simple_days_posts_up_date_icon',array(
'default' => 'fa-history',
'sanitize_callback' => 'wp_strip_all_tags',
));
$wp_customize->add_control( 'simple_days_posts_up_date_icon',array(
'label' => esc_html__( 'Update icon', 'simple-days'),
'section' => 'simple_days_posts',
'type' => 'select',
'choices' => array(
' ' => esc_html(' '),
'fa-history' => ' fa-history',
'fa-refresh' => ' fa-refresh',
'fa-calendar-o' => ' fa-calendar-o',
'fa-calendar' => ' fa-calendar',
'fa-calendar-check-o' => ' fa-calendar-check-o',
'fa-clock-o' => ' fa-clock-o',
),
));
$wp_customize->add_setting('post_category_icon',array('sanitize_callback' => 'absint',));
$wp_customize->add_control('post_category_icon',array(
'section' => 'simple_days_posts',
'type' => 'hidden'
));
$wp_customize->selective_refresh->add_partial( 'post_category_icon', array(
'selector' => '.post_category',
));
$wp_customize->add_setting( 'simple_days_posts_category_icon',array(
'default' => 'fa-folder-o',
'sanitize_callback' => 'wp_strip_all_tags',
));
$wp_customize->add_control( 'simple_days_posts_category_icon',array(
'label' => esc_html__( 'Category icon', 'simple-days'),
'section' => 'simple_days_posts',
'type' => 'select',
'choices' => array(
' ' => esc_html(' '),
'fa-folder-o' => ' fa-folder-o',
'fa-folder-open-o' => ' fa-folder-open-o',
'fa-folder' => ' fa-folder',
'fa-folder-open' => ' folder-open',
),
));
$wp_customize->add_setting('post_tag_icon',array('sanitize_callback' => 'absint',));
$wp_customize->add_control('post_tag_icon',array(
'section' => 'simple_days_posts',
'type' => 'hidden'
));
$wp_customize->selective_refresh->add_partial( 'post_tag_icon', array(
'selector' => '.post_tag',
));
$wp_customize->add_setting( 'simple_days_posts_tag_icon',array(
'default' => 'fa-tag',
'sanitize_callback' => 'wp_strip_all_tags',
));
$wp_customize->add_control( 'simple_days_posts_tag_icon',array(
'label' => esc_html__( 'Tag icon', 'simple-days'),
'section' => 'simple_days_posts',
'type' => 'select',
'choices' => array(
' ' => esc_html(' '),
'fa-tag' => ' fa-tag',
'fa-tags' => ' fa-tags',
),
));
$wp_customize->add_setting('author_profile',array('sanitize_callback' => 'absint',));
$wp_customize->add_control('author_profile',array(
'section' => 'simple_days_posts',
'type' => 'hidden'
));
$wp_customize->selective_refresh->add_partial( 'author_profile', array(
'selector' => '.tabs',
));
$wp_customize->add_setting( 'simple_days_posts_author_profile',array(
'default' => true,
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control('simple_days_posts_author_profile',array(
'label' => esc_html__( 'Display', 'simple-days'),
'description' => esc_html__('About the author(Author profile)', 'simple-days'),
'section' => 'simple_days_posts',
'type' => 'checkbox',
));
$wp_customize->add_setting('related_post',array('sanitize_callback' => 'absint',));
$wp_customize->add_control('related_post',array(
'section' => 'simple_days_posts',
'type' => 'hidden'
));
$wp_customize->selective_refresh->add_partial( 'related_post', array(
'selector' => '#related_posts',
));
$wp_customize->add_setting( 'simple_days_posts_related_post',array(
'default' => true,
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( 'simple_days_posts_related_post',array(
'label' => esc_html__( 'Display', 'simple-days'),
'description' => esc_html__('Related Posts', 'simple-days'),
'section' => 'simple_days_posts',
'type' => 'checkbox',
));
$wp_customize->add_setting( 'simple_days_posts_related_post_number', array(
'default' => 9,
'sanitize_callback' => 'absint',
));
$wp_customize->add_control( 'simple_days_posts_related_post_number', array(
'label' => esc_html__( 'Related Posts view count.', 'simple-days' ),
'description' => esc_html__( '(min1 max18)', 'simple-days' ),
'section' => 'simple_days_posts', // Add a default or your own section
'type' => 'number',
'input_attrs' => array(
'min' => '1', 'step' => '1', 'max' => '18',
),
));
$sort_order_list =array(
'breadcrumbs','title','date','author','pv','thumbnail','content','widget','page_link','cta','share','author_profile','related','category','tag','pagenation','comment',
);
$wp_customize->add_setting( 'simple_days_posts_sortable',
array(
'default' => $sort_order_list,
'sanitize_callback' => 'wp_kses_post',
)
);
$wp_customize->add_control( new Simple_Days_Posts_Sortable_Custom_Control( $wp_customize, 'simple_days_posts_sortable',
array(
'type' => 'simple_days_posts_sortable',
'label' => esc_html__( 'Reorder Sections', 'simple-days' ),
'description' => esc_html__( 'drag the columns to rearrange their order.', 'simple-days' ),
'section' => 'simple_days_posts',
'choices' => get_theme_mod( 'simple_days_posts_sortable',$sort_order_list),
)
) );
$wp_customize->add_section('simple_days_page',array(
'title' => esc_html_x('Page', 'customizer' ,'simple-days'),
'panel' => 'simple_days_setting',
));
$wp_customize->add_setting('page_thumbnail',array('sanitize_callback' => 'absint',));
$wp_customize->add_control('page_thumbnail',array(
'section' => 'simple_days_page',
'type' => 'hidden'
));
$wp_customize->selective_refresh->add_partial( 'page_thumbnail', array(
'selector' => '.page_thum',
));
$wp_customize->add_setting( 'simple_days_page_thumbnail',array(
'default' => true,
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( 'simple_days_page_thumbnail',array(
'label' => esc_html__( 'Display', 'simple-days'),
'description' => esc_html__('Thumbnail', 'simple-days'),
'section' => 'simple_days_page',
'type' => 'checkbox',
));
$wp_customize->add_setting( 'simple_days_page_title_over_thumbnail',array(
'default' => false,
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( 'simple_days_page_title_over_thumbnail',array(
'label' => esc_html__( 'Enable', 'simple-days'),
'description' => esc_html__('Page title over the thumbnail.', 'simple-days'),
'section' => 'simple_days_page',
'type' => 'checkbox',
));
$wp_customize->add_setting( 'simple_days_page_full_width_thumbnail',array(
'default' => false,
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( 'simple_days_page_full_width_thumbnail',array(
'label' => esc_html__( 'Enable', 'simple-days'),
'description' => esc_html__('Full width thumbnail at under the header.', 'simple-days'),
'section' => 'simple_days_page',
'type' => 'checkbox',
));
$wp_customize->add_setting('page_author_position',array('sanitize_callback' => 'absint',));
$wp_customize->add_control('page_author_position',array(
'section' => 'simple_days_page',
'type' => 'hidden'
));
$wp_customize->selective_refresh->add_partial( 'page_author_position', array(
'selector' => '.page_author',
));
$wp_customize->add_setting( 'simple_days_page_author_position', array(
'default' => 'none',
'sanitize_callback' => 'simple_days_sanitize_radio',
'transport'=>'postMessage',
));
$wp_customize->add_control( 'simple_days_page_author_position', array(
'label' => esc_html__( 'Author display position', 'simple-days' ),
'section' => 'simple_days_page',
'type' => 'radio',
'choices' => array(
'left' => esc_html__( 'Left', 'simple-days' ),
'right' => esc_html__( 'Right', 'simple-days' ),
'none' => esc_html__( 'Hide', 'simple-days' ),
),
));
$wp_customize->add_setting( 'simple_days_page_author_icon',array(
'default' => 'fa-user',
'sanitize_callback' => 'wp_strip_all_tags',
));
$wp_customize->add_control( 'simple_days_page_author_icon',array(
'label' => esc_html__( 'Author icon', 'simple-days'),
'section' => 'simple_days_page',
'type' => 'select',
'choices' => array(
' ' => esc_html(' '),
'fa-user' => ' fa-user',
'fa-user-o' => ' fa-user-o',
'fa-user-circle' => ' fa-user-circle',
'fa-user-circle-o' => ' fa-user-circle-o',
'fa-users' => ' fa-users',
'fa-user-secret' => ' fa-user-secret',
'fa-female' => ' fa-female',
'fa-male' => ' fa-male',
'fa-child' => ' fa-child',
'fa-id-badge' => ' fa-id-badge',
'fa-smile-o' => ' fa-smile-o',
'fa-star-o' => ' fa-star-o',
'fa-star' => ' fa-star',
'fa-heart' => ' fa-heart',
'fa-heart-o' => ' fa-heart-o',
),
));
$wp_customize->add_setting('page_date_position',array('sanitize_callback' => 'absint',));
$wp_customize->add_control('page_date_position',array(
'section' => 'simple_days_page',
'type' => 'hidden'
));
$wp_customize->selective_refresh->add_partial( 'page_date_position', array(
'selector' => '.page_date',
));
$wp_customize->add_setting( 'simple_days_page_date_position', array(
'default' => 'none',
'sanitize_callback' => 'simple_days_sanitize_radio',
'transport'=>'postMessage',
));
$wp_customize->add_control( 'simple_days_page_date_position', array(
'label' => esc_html__( 'Post date display position', 'simple-days' ),
'section' => 'simple_days_page',
'type' => 'radio',
'choices' => array(
'left' => esc_html__( 'Left', 'simple-days' ),
'right' => esc_html__( 'Right', 'simple-days' ),
'none' => esc_html__( 'Hide', 'simple-days' ),
),
));
$wp_customize->add_setting( 'simple_days_page_date_display', array(
'default' => 'both',
'sanitize_callback' => 'simple_days_sanitize_radio',
));
$wp_customize->add_control( 'simple_days_page_date_display', array(
'label' => esc_html__( 'Display method Post date', 'simple-days' ),
'section' => 'simple_days_page',
'type' => 'radio',
'choices' => array(
'date' => esc_html__( 'Only Date', 'simple-days' ),
'update' => esc_html__( 'Date hide when post have update.', 'simple-days' ),
'both' => esc_html__( 'Both', 'simple-days' ),
),
));
$wp_customize->add_setting( 'simple_days_page_date_icon',array(
'default' => 'fa-calendar-check-o',
'sanitize_callback' => 'wp_strip_all_tags',
));
$wp_customize->add_control( 'simple_days_page_date_icon',array(
'label' => esc_html__( 'Date icon', 'simple-days'),
'section' => 'simple_days_page',
'type' => 'select',
'choices' => array(
' ' => esc_html(' '),
'fa-calendar-check-o' => ' fa-calendar-check-o',
'fa-clock-o' => ' fa-clock-o',
'fa-calendar-o' => ' fa-calendar-o',
'fa-calendar' => ' fa-calendar',
'fa-history' => ' fa-history',
'fa-refresh' => ' fa-refresh',
),
));
$wp_customize->add_setting( 'simple_days_page_up_date_icon',array(
'default' => 'fa-history',
'sanitize_callback' => 'wp_strip_all_tags',
));
$wp_customize->add_control( 'simple_days_page_up_date_icon',array(
'label' => esc_html__( 'Update icon', 'simple-days'),
'section' => 'simple_days_page',
'type' => 'select',
'choices' => array(
' ' => esc_html(' '),
'fa-history' => ' fa-history',
'fa-refresh' => ' fa-refresh',
'fa-calendar-o' => ' fa-calendar-o',
'fa-calendar' => ' fa-calendar',
'fa-calendar-check-o' => ' fa-calendar-check-o',
'fa-clock-o' => ' fa-clock-o',
),
));
$wp_customize->add_setting('page_folder_icon',array('sanitize_callback' => 'absint',));
$wp_customize->add_control('page_folder_icon',array(
'section' => 'simple_days_page',
'type' => 'hidden'
));
$wp_customize->selective_refresh->add_partial( 'page_folder_icon', array(
'selector' => '.page_folder',
));
$wp_customize->add_setting( 'simple_days_page_category_icon',array(
'default' => 'fa-folder-o',
'sanitize_callback' => 'wp_strip_all_tags',
));
$wp_customize->add_control( 'simple_days_page_category_icon',array(
'label' => esc_html__( 'Category icon', 'simple-days'),
'section' => 'simple_days_page',
'type' => 'select',
'choices' => array(
' ' => esc_html(' '),
'fa-folder-o' => ' fa-folder-o',
'fa-folder-open-o' => ' fa-folder-open-o',
'fa-folder' => ' fa-folder',
'fa-folder-open' => ' folder-open',
),
));
$wp_customize->add_setting('page_tag_icon',array('sanitize_callback' => 'absint',));
$wp_customize->add_control('page_tag_icon',array(
'section' => 'simple_days_page',
'type' => 'hidden'
));
$wp_customize->selective_refresh->add_partial( 'page_tag_icon', array(
'selector' => '.page_tag',
));
$wp_customize->add_setting( 'simple_days_page_tag_icon',array(
'default' => 'fa-tag',
'sanitize_callback' => 'wp_strip_all_tags',
));
$wp_customize->add_control( 'simple_days_page_tag_icon',array(
'label' => esc_html__( 'Tag icon', 'simple-days'),
'section' => 'simple_days_page',
'type' => 'select',
'choices' => array(
' ' => esc_html(' '),
'fa-tag' => ' fa-tag',
'fa-tags' => ' fa-tags',
),
));
$wp_customize->add_setting( 'simple_days_page_social_share',array(
'default' => false,
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( 'simple_days_page_social_share',array(
'label' => esc_html__( 'Display', 'simple-days'),
'description' => esc_html__('Social share', 'simple-days'),
'section' => 'simple_days_page',
'type' => 'checkbox',
));
$wp_customize->add_setting( 'simple_days_page_author_profile',array(
'default' => false,
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( 'simple_days_page_author_profile',array(
'label' => esc_html__( 'Display', 'simple-days'),
'description' => esc_html__('About the author(Author profile)', 'simple-days'),
'section' => 'simple_days_page',
'type' => 'checkbox',
));
$wp_customize->add_setting( 'simple_days_page_related_page',array(
'default' => false,
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( 'simple_days_page_related_page',array(
'label' => esc_html__( 'Display', 'simple-days'),
'description' => esc_html__('Related Pages', 'simple-days').'
'.esc_html__('The plugin [Pages with category and tag] is needed', 'simple-days'),
'section' => 'simple_days_page',
'type' => 'checkbox',
));
/*
$wp_customize->add_setting( 'simple_days_page_install_pwcat', array(
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( new Simple_Days_html_text_Custom_Content( $wp_customize, 'simple_days_page_install_pwcat', array(
'section' => 'simple_days_page',
//'label' => esc_html__( 'Install Plugins', 'simple-days' ),
'content' => ''.esc_html__( 'Install Plugins', 'simple-days' ).'',
//'description' => esc_html__( 'Optional: Example Description.', 'simple-days' ),
)));
*/
$wp_customize->add_setting( 'simple_days_page_install_pwcat', array(
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( new Simple_Days_plugin_install_Custom_Content( $wp_customize, 'simple_days_page_install_pwcat', array(
'section' => 'simple_days_page',
'label' => sprintf(esc_html__('Install Plugin [ %s ]', 'simple-days'), esc_html__( 'Pages with category and tag', 'simple-days')),
'plugin' => array(
'name' => esc_html__('Pages with category and tag', 'simple-days'),
'dir' => 'pages-with-category-and-tag',
'filename' => 'pages_with_category_and_tag.php',
),
)));
$wp_customize->add_setting( 'simple_days_page_related_post_number', array(
'default' => 9,
'sanitize_callback' => 'absint',
));
$wp_customize->add_control( 'simple_days_page_related_post_number', array(
'label' => esc_html__( 'Related Pages view count.', 'simple-days' ),
'description' => esc_html__( 'multiples of 3 (min3 max18)', 'simple-days' ),
'section' => 'simple_days_page', // Add a default or your own section
'type' => 'number',
'input_attrs' => array(
'min' => '3', 'step' => '3', 'max' => '18',
),
));
$wp_customize->add_setting( 'simple_days_page_sortable',
array(
'default' => $sort_order_list,
'sanitize_callback' => 'wp_kses_post',
)
);
$wp_customize->add_control( new Simple_Days_Posts_Sortable_Custom_Control( $wp_customize, 'simple_days_page_sortable',
array(
'type' => 'simple_days_posts_sortable',
'label' => esc_html__( 'Reorder Sections', 'simple-days' ),
'description' => esc_html__( 'drag the columns to rearrange their order.', 'simple-days' ),
'section' => 'simple_days_page',
'choices' => get_theme_mod( 'simple_days_page_sortable',$sort_order_list),
)
) );
$wp_customize->add_section('simple_days_menu_bar',array(
'title' => esc_html__('Menu Icon','simple-days'),
'panel' => 'simple_days_setting',
));
$wp_customize->add_setting( 'simple_days_menu_bar_fontawsome_icon_info', array(
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( new Simple_Days_html_text_Custom_Content( $wp_customize, 'simple_days_menu_bar_fontawsome_icon_info', array(
'section' => 'simple_days_menu_bar',
//'label' => esc_html__( 'Footer Menu Icon', 'simple-days' ),
'content' => ''.__( 'FontAwesome 4 Icon List' , 'simple-days').'
'.''.esc_html__( 'You need full icons?', 'simple-days' ).'',
//'description' => esc_html__( 'Optional: Example Description.', 'simple-days' ),
)));
$wp_customize->add_setting( 'simple_days_menu_bar_h_icon_info', array(
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( new Simple_Days_html_text_Custom_Content( $wp_customize, 'simple_days_menu_bar_h_icon_info', array(
'section' => 'simple_days_menu_bar',
'label' => esc_html__( 'Header Menu Icon', 'simple-days' ),
//'content' => ''.__( 'Icon List' , 'simple-days').'',
//'description' => esc_html__( 'Optional: Example Description.', 'simple-days' ),
)));
$i = 1;
while($i <= 10){
$wp_customize->add_setting( 'simple_days_menu_bar_h_icon_'.$i.'_info', array(
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( new Simple_Days_html_text_Custom_Content( $wp_customize, 'simple_days_menu_bar_h_icon_'.$i.'_info', array(
'section' => 'simple_days_menu_bar',
'label' => sprintf(esc_html__( 'Icon #%s', 'simple-days'),$i),
)));
$wp_customize->add_setting( 'simple_days_menu_bar_h_icon_'.$i,array(
'default' => '',
'sanitize_callback' => 'wp_strip_all_tags',
'transport' => 'postMessage',
));
$wp_customize->add_control('simple_days_menu_bar_h_icon_'.$i,array(
'label' => esc_html__( 'Select', 'simple-days'),
'section' => 'simple_days_menu_bar',
'type' => 'text',
));
$wp_customize->add_setting( 'simple_days_menu_bar_h_icon_after_'.$i,array(
'default' => false,
'sanitize_callback' => 'sanitize_text_field',
'transport' => 'postMessage',
));
$wp_customize->add_control( 'simple_days_menu_bar_h_icon_after_'.$i,array(
'label' => esc_html__( 'after icon', 'simple-days'),
//'description' => esc_html__('Current name', 'simple-days'),
'section' => 'simple_days_menu_bar',
'type' => 'checkbox',
));
$wp_customize->add_setting( 'simple_days_menu_bar_h_icon_color_'.$i,array(
'default' => '',
'sanitize_callback' => 'sanitize_text_field',
'transport' => 'postMessage',
));
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'simple_days_menu_bar_h_icon_color_'.$i, array(
//'label' => sprintf(esc_html__( 'Icon color #%s', 'simple-days'),$i),
'section' => 'simple_days_menu_bar',
)));
$i++;
}
$wp_customize->add_setting( 'simple_days_menu_bar_f_icon_info', array(
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( new Simple_Days_html_text_Custom_Content( $wp_customize, 'simple_days_menu_bar_f_icon_info', array(
'section' => 'simple_days_menu_bar',
'label' => esc_html__( 'Footer Menu Icon', 'simple-days' ),
//'content' => sprintf(esc_html__('This selection overrides %s.', 'simple-days'),esc_html__( 'Local Fonts Japanese', 'simple-days')),
//'description' => esc_html__( 'Optional: Example Description.', 'simple-days' ),
)));
$i = 1;
while($i <= 10){
$wp_customize->add_setting( 'simple_days_menu_bar_f_icon_'.$i.'_info', array(
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( new Simple_Days_html_text_Custom_Content( $wp_customize, 'simple_days_menu_bar_f_icon_'.$i.'_info', array(
'section' => 'simple_days_menu_bar',
'label' => sprintf(esc_html__( 'Icon #%s', 'simple-days'),$i),
)));
$wp_customize->add_setting( 'simple_days_menu_bar_f_icon_'.$i,array(
'default' => 'none',
'sanitize_callback' => 'wp_strip_all_tags',
'transport' => 'postMessage',
));
$wp_customize->add_control('simple_days_menu_bar_f_icon_'.$i,array(
'label' => esc_html__( 'Select', 'simple-days'),
'section' => 'simple_days_menu_bar',
'type' => 'text',
));
$wp_customize->add_setting( 'simple_days_menu_bar_f_icon_after_'.$i,array(
'default' => false,
'sanitize_callback' => 'sanitize_text_field',
'transport' => 'postMessage',
));
$wp_customize->add_control( 'simple_days_menu_bar_f_icon_after_'.$i,array(
'label' => esc_html__( 'after icon', 'simple-days'),
//'description' => esc_html__('Current name', 'simple-days'),
'section' => 'simple_days_menu_bar',
'type' => 'checkbox',
));
$wp_customize->add_setting( 'simple_days_menu_bar_f_icon_color_'.$i,array(
'default' => '',
'sanitize_callback' => 'sanitize_text_field',
'transport' => 'postMessage',
));
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'simple_days_menu_bar_f_icon_color_'.$i, array(
//'label' => sprintf(esc_html__( 'Icon color #%s', 'simple-days'),$i),
'section' => 'simple_days_menu_bar',
)));
$i++;
}
$wp_customize->add_section('simple_days_post_heading_setting',array(
'title' => esc_html__('Post Heading','simple-days'),
'panel' => 'simple_days_setting',
));
$i = 2;
$border_angle = array('top' => esc_html_x('top','post_heading','simple-days') , 'right' => esc_html_x('right','post_heading','simple-days') , 'bottom' => esc_html_x('bottom','post_heading','simple-days') , 'left' => esc_html_x('left','post_heading','simple-days'));
$heading_font_size = array(0,36,30,24,18,14,12);
while ( $i < 5) {
$wp_customize->add_setting( 'simple_days_post_heading_'.$i.'_info', array(
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( new Simple_Days_html_text_Custom_Content( $wp_customize, 'simple_days_post_heading_'.$i.'_info', array(
'section' => 'simple_days_post_heading_setting',
'label' => sprintf(esc_html_x( 'H%s', 'post_heading' , 'simple-days'),$i),
//'content' => ''.__( 'Icon List' , 'simple-days').'',
//'description' => esc_html__( 'Optional: Example Description.', 'simple-days' ),
)));
$wp_customize->add_setting( 'simple_days_post_heading_'.$i.'_text_size', array(
'default' => $heading_font_size[$i],
'sanitize_callback' => 'absint',
'transport' => 'postMessage',
));
$wp_customize->add_control( 'simple_days_post_heading_'.$i.'_text_size', array(
'label' => esc_html_x('font size', 'post_heading' ,'simple-days'),
//'description' => esc_html__('default:', 'simple-days').esc_html('1'),
'section' => 'simple_days_post_heading_setting',
'type' => 'number',
'input_attrs' => array(
'min' => 1, 'step' => 1, 'max' => 64,),
));
$wp_customize->add_setting( 'simple_days_post_heading_'.$i.'_text_color',array(
'default' => define("simple_days_post_heading_".$i."_text_color", ""),
'sanitize_callback' => 'sanitize_text_field',
'transport' => 'postMessage',
));
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'simple_days_post_heading_'.$i.'_text_color', array(
'label' => esc_html_x('font color', 'post_heading' ,'simple-days'),
'section' => 'simple_days_post_heading_setting',
)));
$wp_customize->add_setting( 'simple_days_post_heading_'.$i.'_text_position', array(
'default' => 'left',
'sanitize_callback' => 'simple_days_sanitize_radio',
'transport' => 'postMessage',
));
$wp_customize->add_control( 'simple_days_post_heading_'.$i.'_text_position', array(
'label' => esc_html__( 'heading position', 'simple-days' ),
'section' => 'simple_days_post_heading_setting',
'type' => 'radio',
'choices' => array(
'left' => esc_html__( 'Left', 'simple-days' ),
'center' => esc_html__( 'Center', 'simple-days' ),
'right' => esc_html__( 'Right', 'simple-days' ),
),
));
$wp_customize->add_setting( 'simple_days_post_heading_'.$i.'_padding_info', array(
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( new Simple_Days_html_text_Custom_Content( $wp_customize, 'simple_days_post_heading_'.$i.'_padding_info', array(
'section' => 'simple_days_post_heading_setting',
'label' => esc_html_x( 'padding', 'post_heading' , 'simple-days').esc_html_x( '(top,right,bottom,left)', 'post_heading' , 'simple-days'),
//'content' => ''.__( 'Icon List' , 'simple-days').'',
//'description' => esc_html__( 'Optional: Example Description.', 'simple-days' ),
)));
foreach ($border_angle as $key => $value) {
$wp_customize->add_setting( 'simple_days_post_heading_'.$i.'_padding_'.$key, array(
'default' => 0,
'sanitize_callback' => 'absint',
'transport' => 'postMessage',
));
$wp_customize->add_control( 'simple_days_post_heading_'.$i.'_padding_'.$key, array(
//'label' => esc_html_x('font size', 'post_heading' ,'simple-days'),
'section' => 'simple_days_post_heading_setting',
'type' => 'number',
'input_attrs' => array(
'min' => 0, 'step' => 1, 'max' => 100,),
));
}
$wp_customize->add_setting( 'simple_days_post_heading_'.$i.'_margin_info', array(
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( new Simple_Days_html_text_Custom_Content( $wp_customize, 'simple_days_post_heading_'.$i.'_margin_info', array(
'section' => 'simple_days_post_heading_setting',
'label' => esc_html_x( 'margin', 'post_heading' , 'simple-days').esc_html_x( '(top,right,bottom,left)', 'post_heading' , 'simple-days'),
//'content' => ''.__( 'Icon List' , 'simple-days').'',
//'description' => esc_html__( 'Optional: Example Description.', 'simple-days' ),
)));
foreach ($border_angle as $key => $value) {
$wp_customize->add_setting( 'simple_days_post_heading_'.$i.'_margin_'.$key, array(
'default' => 0,
'sanitize_callback' => 'simple_days_sanitize_intval',
'transport' => 'postMessage',
));
$wp_customize->add_control( 'simple_days_post_heading_'.$i.'_margin_'.$key, array(
//'label' => esc_html_x('font size', 'post_heading' ,'simple-days'),
'section' => 'simple_days_post_heading_setting',
'type' => 'number',
'input_attrs' => array(
'min' => -20, 'step' => 1, 'max' => 100,),
));
}
foreach ($border_angle as $key => $value) {
$wp_customize->add_setting( 'simple_days_post_heading_'.$i.'_border_'.$key.'_info', array(
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( new Simple_Days_html_text_Custom_Content( $wp_customize, 'simple_days_post_heading_'.$i.'_border_'.$key.'_info', array(
'section' => 'simple_days_post_heading_setting',
'label' => sprintf(esc_html_x( 'border %s', 'post_heading' , 'simple-days'),$value),
//'content' => ''.__( 'Icon List' , 'simple-days').'',
//'description' => esc_html__( 'Optional: Example Description.', 'simple-days' ),
)));
$wp_customize->add_setting( 'simple_days_post_heading_'.$i.'_border_'.$key.'_style', array(
'default' => 'none',
'sanitize_callback' => 'simple_days_sanitize_radio',
'transport' => 'postMessage',
));
$wp_customize->add_control( 'simple_days_post_heading_'.$i.'_border_'.$key.'_style', array(
//'label' => esc_html__( 'border top style', 'simple-days' ),
'section' => 'simple_days_post_heading_setting',
'type' => 'select',
'choices' => $heading_border_style,
));
$wp_customize->add_setting( 'simple_days_post_heading_'.$i.'_border_'.$key.'_width', array(
'default' => 1,
'sanitize_callback' => 'absint',
'transport' => 'postMessage',
));
$wp_customize->add_control( 'simple_days_post_heading_'.$i.'_border_'.$key.'_width', array(
//'label' => esc_html_x('border top width', 'post_heading' ,'simple-days'),
'section' => 'simple_days_post_heading_setting',
'type' => 'number',
'input_attrs' => array(
'min' => 1, 'step' => 1, 'max' => 64,),
));
$wp_customize->add_setting( 'simple_days_post_heading_'.$i.'_border_'.$key.'_color',array(
'default' => define("simple_days_post_heading_".$i."_border_".$key."_color", ""),
'sanitize_callback' => 'sanitize_text_field',
'transport' => 'postMessage',
));
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'simple_days_post_heading_'.$i.'_border_'.$key.'_color', array(
//'label' => esc_html_x('border top color', 'post_heading' ,'simple-days'),
'section' => 'simple_days_post_heading_setting',
)));
}
$wp_customize->add_setting( 'simple_days_post_heading_'.$i.'_background_color',array(
'default' => define("simple_days_post_heading_".$i."_background_color", ""),
'sanitize_callback' => 'sanitize_text_field',
'transport' => 'postMessage',
));
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'simple_days_post_heading_'.$i.'_background_color', array(
'label' => esc_html_x('background color', 'post_heading' ,'simple-days'),
'section' => 'simple_days_post_heading_setting',
)));
$wp_customize->add_setting( 'simple_days_post_heading_'.$i.'_border_radius_info', array(
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( new Simple_Days_html_text_Custom_Content( $wp_customize, 'simple_days_post_heading_'.$i.'_border_radius_info', array(
'section' => 'simple_days_post_heading_setting',
'label' => esc_html_x( 'border radius', 'post_heading' , 'simple-days').esc_html_x( '(top-left,top-right,bottom-right,bottom-left)', 'post_heading' , 'simple-days'),
//'content' => ''.__( 'Icon List' , 'simple-days').'',
//'description' => esc_html__( 'Optional: Example Description.', 'simple-days' ),
)));
$border_radius_angle = array('top' , 'bottom');
$border_radius_angle2 = array('left' , 'right');
foreach ($border_radius_angle as $value) {
foreach ($border_radius_angle2 as $value2) {
$wp_customize->add_setting( 'simple_days_post_heading_'.$i.'_border_radius_'.$value.'_'.$value2, array(
'default' => 0,
'sanitize_callback' => 'absint',
'transport' => 'postMessage',
));
$wp_customize->add_control( 'simple_days_post_heading_'.$i.'_border_radius_'.$value.'_'.$value2, array(
//'label' => esc_html_x('font size', 'post_heading' ,'simple-days'),
'section' => 'simple_days_post_heading_setting',
'type' => 'number',
'input_attrs' => array(
'min' => 0, 'step' => 1, 'max' => 100,),
));
}
}
$wp_customize->add_setting( 'simple_days_post_heading_'.$i.'_balloon',array(
'default' => false,
'sanitize_callback' => 'sanitize_text_field',
'transport' => 'postMessage',
));
$wp_customize->add_control( 'simple_days_post_heading_'.$i.'_balloon',array(
'label' => esc_html_x( 'balloon', 'post_heading' , 'simple-days'),
//'description' => esc_html__('Current name', 'simple-days'),
'section' => 'simple_days_post_heading_setting',
'type' => 'checkbox',
));
$wp_customize->add_setting( 'simple_days_post_heading_'.$i.'_balloon_info', array(
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( new Simple_Days_html_text_Custom_Content( $wp_customize, 'simple_days_post_heading_'.$i.'_balloon_info', array(
'section' => 'simple_days_post_heading_setting',
'label' => esc_html_x( 'balloon', 'post_heading' , 'simple-days').esc_html_x( '(position,width,height)', 'post_heading' , 'simple-days'),
//'content' => ''.__( 'Icon List' , 'simple-days').'',
//'description' => esc_html__( 'Optional: Example Description.', 'simple-days' ),
)));
$wp_customize->add_setting( 'simple_days_post_heading_'.$i.'_balloon_position', array(
'default' => 30,
'sanitize_callback' => 'absint',
'transport' => 'postMessage',
));
$wp_customize->add_control( 'simple_days_post_heading_'.$i.'_balloon_position', array(
//'label' => esc_html_x('font size', 'post_heading' ,'simple-days'),
'section' => 'simple_days_post_heading_setting',
'type' => 'number',
'input_attrs' => array(
'min' => -14, 'step' => 1, 'max' => 857,),
));
$wp_customize->add_setting( 'simple_days_post_heading_'.$i.'_balloon_width', array(
'default' => 15,
'sanitize_callback' => 'absint',
'transport' => 'postMessage',
));
$wp_customize->add_control( 'simple_days_post_heading_'.$i.'_balloon_width', array(
//'label' => esc_html_x('font size', 'post_heading' ,'simple-days'),
'section' => 'simple_days_post_heading_setting',
'type' => 'number',
'input_attrs' => array(
'min' => 1, 'step' => 1, 'max' => 100,),
));
$wp_customize->add_setting( 'simple_days_post_heading_'.$i.'_balloon_height', array(
'default' => 15,
'sanitize_callback' => 'absint',
'transport' => 'postMessage',
));
$wp_customize->add_control( 'simple_days_post_heading_'.$i.'_balloon_height', array(
//'label' => esc_html_x('font size', 'post_heading' ,'simple-days'),
'section' => 'simple_days_post_heading_setting',
'type' => 'number',
'input_attrs' => array(
'min' => 1, 'step' => 1, 'max' => 100,),
));
$wp_customize->add_setting( 'simple_days_post_heading_'.$i.'_balloon_color',array(
'default' => define("simple_days_post_heading_".$i."_balloon_color", ""),
'sanitize_callback' => 'sanitize_text_field',
'transport' => 'postMessage',
));
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'simple_days_post_heading_'.$i.'_balloon_color', array(
'label' => esc_html_x('balloon color', 'post_heading' ,'simple-days'),
'section' => 'simple_days_post_heading_setting',
)));
++$i;
}
$wp_customize->add_section('simple_days_widget_title_setting',array(
'title' => esc_html__('Widget Title','simple-days'),
'panel' => 'simple_days_setting',
));
$side_footer = array('sidebar' => esc_html_x( 'Sidebar', 'widget_title' , 'simple-days'),'footer' => esc_html_x( 'Footer', 'widget_title' , 'simple-days'));
foreach ($side_footer as $s_f_name => $s_f_t_name) {
$wp_customize->add_setting( 'simple_days_widget_title_'.$s_f_name.'_info', array(
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( new Simple_Days_html_text_Custom_Content( $wp_customize, 'simple_days_widget_title_'.$s_f_name.'_info', array(
'section' => 'simple_days_widget_title_setting',
'label' => sprintf(esc_html_x( '%s Widget', 'widget_title' , 'simple-days'),$s_f_t_name),
)));
$wp_customize->add_setting( 'simple_days_widget_title_'.$s_f_name.'_text_size', array(
'default' => 18,
'sanitize_callback' => 'absint',
'transport' => 'postMessage',
));
$wp_customize->add_control( 'simple_days_widget_title_'.$s_f_name.'_text_size', array(
'label' => esc_html_x('font size', 'post_heading' ,'simple-days'),
//'description' => esc_html__('default:', 'simple-days').esc_html('1'),
'section' => 'simple_days_widget_title_setting',
'type' => 'number',
'input_attrs' => array(
'min' => 1, 'step' => 1, 'max' => 64,),
));
$wp_customize->add_setting( 'simple_days_widget_title_'.$s_f_name.'_text_color',array(
'default' => '',
'sanitize_callback' => 'sanitize_text_field',
'transport' => 'postMessage',
));
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'simple_days_widget_title_'.$s_f_name.'_text_color', array(
'label' => esc_html_x('font color', 'post_heading' ,'simple-days'),
'section' => 'simple_days_widget_title_setting',
)));
$wp_customize->add_setting( 'simple_days_widget_title_'.$s_f_name.'_text_position', array(
'default' => 'left',
'sanitize_callback' => 'simple_days_sanitize_radio',
'transport' => 'postMessage',
));
$wp_customize->add_control( 'simple_days_widget_title_'.$s_f_name.'_text_position', array(
'label' => esc_html__( 'heading position', 'simple-days' ),
'section' => 'simple_days_widget_title_setting',
'type' => 'radio',
'choices' => array(
'left' => esc_html__( 'Left', 'simple-days' ),
'center' => esc_html__( 'Center', 'simple-days' ),
'right' => esc_html__( 'Right', 'simple-days' ),
),
));
$wp_customize->add_setting( 'simple_days_widget_title_'.$s_f_name.'_padding_info', array(
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( new Simple_Days_html_text_Custom_Content( $wp_customize, 'simple_days_widget_title_'.$s_f_name.'_padding_info', array(
'section' => 'simple_days_widget_title_setting',
'label' => esc_html_x( 'padding', 'post_heading' , 'simple-days').esc_html_x( '(top,right,bottom,left)', 'post_heading' , 'simple-days'),
//'content' => ''.__( 'Icon List' , 'simple-days').'',
//'description' => esc_html__( 'Optional: Example Description.', 'simple-days' ),
)));
foreach ($border_angle as $key => $value) {
$wp_customize->add_setting( 'simple_days_widget_title_'.$s_f_name.'_padding_'.$key, array(
'default' => 0,
'sanitize_callback' => 'absint',
'transport' => 'postMessage',
));
$wp_customize->add_control( 'simple_days_widget_title_'.$s_f_name.'_padding_'.$key, array(
//'label' => esc_html_x('font size', 'post_heading' ,'simple-days'),
'section' => 'simple_days_widget_title_setting',
'type' => 'number',
'input_attrs' => array(
'min' => 0, 'step' => 1, 'max' => 100,),
));
}
$wp_customize->add_setting( 'simple_days_widget_title_'.$s_f_name.'_margin_info', array(
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( new Simple_Days_html_text_Custom_Content( $wp_customize, 'simple_days_widget_title_'.$s_f_name.'_margin_info', array(
'section' => 'simple_days_widget_title_setting',
'label' => esc_html_x( 'margin', 'post_heading' , 'simple-days').esc_html_x( '(top,right,bottom,left)', 'post_heading' , 'simple-days'),
//'content' => ''.__( 'Icon List' , 'simple-days').'',
//'description' => esc_html__( 'Optional: Example Description.', 'simple-days' ),
)));
foreach ($border_angle as $key => $value) {
$wp_customize->add_setting( 'simple_days_widget_title_'.$s_f_name.'_margin_'.$key, array(
'default' => 0,
'sanitize_callback' => 'simple_days_sanitize_intval',
'transport' => 'postMessage',
));
$wp_customize->add_control( 'simple_days_widget_title_'.$s_f_name.'_margin_'.$key, array(
//'label' => esc_html_x('font size', 'post_heading' ,'simple-days'),
'section' => 'simple_days_widget_title_setting',
'type' => 'number',
'input_attrs' => array(
'min' => -20, 'step' => 1, 'max' => 100,),
));
}
foreach ($border_angle as $key => $value) {
$wp_customize->add_setting( 'simple_days_widget_title_'.$s_f_name.'_border_'.$key.'_info', array(
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( new Simple_Days_html_text_Custom_Content( $wp_customize, 'simple_days_widget_title_'.$s_f_name.'_border_'.$key.'_info', array(
'section' => 'simple_days_widget_title_setting',
'label' => sprintf(esc_html_x( 'border %s', 'post_heading' , 'simple-days'),$value),
//'content' => ''.__( 'Icon List' , 'simple-days').'',
//'description' => esc_html__( 'Optional: Example Description.', 'simple-days' ),
)));
$wp_customize->add_setting( 'simple_days_widget_title_'.$s_f_name.'_border_'.$key.'_style', array(
'default' => 'none',
'sanitize_callback' => 'simple_days_sanitize_radio',
'transport' => 'postMessage',
));
$wp_customize->add_control( 'simple_days_widget_title_'.$s_f_name.'_border_'.$key.'_style', array(
//'label' => esc_html__( 'border top style', 'simple-days' ),
'section' => 'simple_days_widget_title_setting',
'type' => 'select',
'choices' => $heading_border_style,
));
$wp_customize->add_setting( 'simple_days_widget_title_'.$s_f_name.'_border_'.$key.'_width', array(
'default' => 1,
'sanitize_callback' => 'absint',
'transport' => 'postMessage',
));
$wp_customize->add_control( 'simple_days_widget_title_'.$s_f_name.'_border_'.$key.'_width', array(
//'label' => esc_html_x('border top width', 'post_heading' ,'simple-days'),
'section' => 'simple_days_widget_title_setting',
'type' => 'number',
'input_attrs' => array(
'min' => 1, 'step' => 1, 'max' => 64,),
));
$wp_customize->add_setting( 'simple_days_widget_title_'.$s_f_name.'_border_'.$key.'_color',array(
'default' => '',
'sanitize_callback' => 'sanitize_text_field',
'transport' => 'postMessage',
));
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'simple_days_widget_title_'.$s_f_name.'_border_'.$key.'_color', array(
//'label' => esc_html_x('border top color', 'post_heading' ,'simple-days'),
'section' => 'simple_days_widget_title_setting',
)));
}
$wp_customize->add_setting( 'simple_days_widget_title_'.$s_f_name.'_background_color',array(
'default' => '',
'sanitize_callback' => 'sanitize_text_field',
'transport' => 'postMessage',
));
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'simple_days_widget_title_'.$s_f_name.'_background_color', array(
'label' => esc_html_x('background color', 'post_heading' ,'simple-days'),
'section' => 'simple_days_widget_title_setting',
)));
$wp_customize->add_setting( 'simple_days_widget_title_'.$s_f_name.'_border_radius_info', array(
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( new Simple_Days_html_text_Custom_Content( $wp_customize, 'simple_days_widget_title_'.$s_f_name.'_border_radius_info', array(
'section' => 'simple_days_widget_title_setting',
'label' => esc_html_x( 'border radius', 'post_heading' , 'simple-days').esc_html_x( '(top-left,top-right,bottom-right,bottom-left)', 'post_heading' , 'simple-days'),
//'content' => ''.__( 'Icon List' , 'simple-days').'',
//'description' => esc_html__( 'Optional: Example Description.', 'simple-days' ),
)));
$border_radius_angle = array('top' , 'bottom');
$border_radius_angle2 = array('left' , 'right');
foreach ($border_radius_angle as $value) {
foreach ($border_radius_angle2 as $value2) {
$wp_customize->add_setting( 'simple_days_widget_title_'.$s_f_name.'_border_radius_'.$value.'_'.$value2, array(
'default' => 0,
'sanitize_callback' => 'absint',
'transport' => 'postMessage',
));
$wp_customize->add_control( 'simple_days_widget_title_'.$s_f_name.'_border_radius_'.$value.'_'.$value2, array(
//'label' => esc_html_x('font size', 'post_heading' ,'simple-days'),
'section' => 'simple_days_widget_title_setting',
'type' => 'number',
'input_attrs' => array(
'min' => 0, 'step' => 1, 'max' => 100,),
));
}
}
$wp_customize->add_setting( 'simple_days_widget_title_'.$s_f_name.'_balloon',array(
'default' => false,
'sanitize_callback' => 'sanitize_text_field',
'transport' => 'postMessage',
));
$wp_customize->add_control( 'simple_days_widget_title_'.$s_f_name.'_balloon',array(
'label' => esc_html_x( 'balloon', 'post_heading' , 'simple-days'),
//'description' => esc_html__('Current name', 'simple-days'),
'section' => 'simple_days_widget_title_setting',
'type' => 'checkbox',
));
$wp_customize->add_setting( 'simple_days_widget_title_'.$s_f_name.'_balloon_info', array(
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( new Simple_Days_html_text_Custom_Content( $wp_customize, 'simple_days_widget_title_'.$s_f_name.'_balloon_info', array(
'section' => 'simple_days_widget_title_setting',
'label' => esc_html_x( 'balloon', 'post_heading' , 'simple-days').esc_html_x( '(position,width,height)', 'post_heading' , 'simple-days'),
//'content' => ''.__( 'Icon List' , 'simple-days').'',
//'description' => esc_html__( 'Optional: Example Description.', 'simple-days' ),
)));
$wp_customize->add_setting( 'simple_days_widget_title_'.$s_f_name.'_balloon_position', array(
'default' => 30,
'sanitize_callback' => 'absint',
'transport' => 'postMessage',
));
$wp_customize->add_control( 'simple_days_widget_title_'.$s_f_name.'_balloon_position', array(
//'label' => esc_html_x('font size', 'post_heading' ,'simple-days'),
'section' => 'simple_days_widget_title_setting',
'type' => 'number',
'input_attrs' => array(
'min' => -14, 'step' => 1, 'max' => 857,),
));
$wp_customize->add_setting( 'simple_days_widget_title_'.$s_f_name.'_balloon_width', array(
'default' => 15,
'sanitize_callback' => 'absint',
'transport' => 'postMessage',
));
$wp_customize->add_control( 'simple_days_widget_title_'.$s_f_name.'_balloon_width', array(
//'label' => esc_html_x('font size', 'post_heading' ,'simple-days'),
'section' => 'simple_days_widget_title_setting',
'type' => 'number',
'input_attrs' => array(
'min' => 1, 'step' => 1, 'max' => 100,),
));
$wp_customize->add_setting( 'simple_days_widget_title_'.$s_f_name.'_balloon_height', array(
'default' => 15,
'sanitize_callback' => 'absint',
'transport' => 'postMessage',
));
$wp_customize->add_control( 'simple_days_widget_title_'.$s_f_name.'_balloon_height', array(
//'label' => esc_html_x('font size', 'post_heading' ,'simple-days'),
'section' => 'simple_days_widget_title_setting',
'type' => 'number',
'input_attrs' => array(
'min' => 1, 'step' => 1, 'max' => 100,),
));
$wp_customize->add_setting( 'simple_days_widget_title_'.$s_f_name.'_balloon_color',array(
'default' => '',
'sanitize_callback' => 'sanitize_text_field',
'transport' => 'postMessage',
));
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'simple_days_widget_title_'.$s_f_name.'_balloon_color', array(
'label' => esc_html_x('balloon color', 'post_heading' ,'simple-days'),
'section' => 'simple_days_widget_title_setting',
)));
# code...
}
$wp_customize->add_section('simple_days_alert_box_setting',array(
'title' => esc_html__('Alert Box','simple-days'),
'panel' => 'simple_days_setting',
));
$wp_customize->add_setting( 'simple_days_alert_box',array(
'default' => false,
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( 'simple_days_alert_box',array(
'label' => esc_html__( 'Display', 'simple-days'),
//'description' => esc_html__('Current name', 'simple-days'),
'section' => 'simple_days_alert_box_setting',
'type' => 'checkbox',
));
$wp_customize->add_setting( 'simple_days_alert_box_text',array(
'default' => '',
'sanitize_callback' => 'wp_strip_all_tags',
));
$wp_customize->add_control('simple_days_alert_box_text',array(
'label' => esc_html__( 'Text', 'simple-days'),
//'description' => esc_html__('e.g. ', 'simple-days').esc_html('1234567890'),
'section' => 'simple_days_alert_box_setting',
'type' => 'text',
));
$wp_customize->add_setting( 'simple_days_alert_box_text_position', array(
'default' => 'center',
'sanitize_callback' => 'simple_days_sanitize_radio',
'transport' => 'postMessage',
));
$wp_customize->add_control( 'simple_days_alert_box_text_position', array(
'label' => esc_html__( 'Text display position', 'simple-days' ),
'section' => 'simple_days_alert_box_setting',
'type' => 'select',
'choices' => array(
'left' => esc_html__( 'Left', 'simple-days' ),
'center' => esc_html__( 'Center', 'simple-days' ),
'right' => esc_html__( 'Right', 'simple-days' ),
),
));
$wp_customize->add_setting( 'simple_days_alert_box_text_size', array(
'default' => 16,
'sanitize_callback' => 'absint',
'transport' => 'postMessage',
));
$wp_customize->add_control( 'simple_days_alert_box_text_size', array(
'label' => esc_html__( 'Text Size', 'simple-days' ),
//'description' => esc_html__('default:', 'simple-days').esc_html('1'),
'section' => 'simple_days_alert_box_setting',
'type' => 'number',
'input_attrs' => array(
'min' => 1, 'step' => 1, 'max' => 64,),
));
$alert_box_icon = array(
' ' => esc_html(' '),
'fa-info-circle' => ' info-circle',
'fa-info' => ' info',
'fa-question-circle' => ' question-circle',
'fa-times-circle' => ' times-circle',
'fa-times-circle-o' => ' times-circle-o',
'fa-warning' => ' warning',
'fa-exclamation-circle' => ' exclamation-circle',
'fa-search' => ' search',
'fa-envelope-o' => ' envelope-o',
'fa-heart-o' => ' fa-heart-o',
'fa-heart' => ' fa-heart',
'fa-star-o' => ' fa-star-o',
'fa-star' => ' fa-star',
'fa-user' => ' fa-user',
'fa-user-o' => ' fa-user-o',
'fa-user-circle' => ' fa-user-circle',
'fa-user-circle-o' => ' fa-user-circle-o',
'fa-users' => ' fa-users',
'fa-user-secret' => ' fa-user-secret',
'fa-female' => ' fa-female',
'fa-male' => ' fa-male',
'fa-child' => ' fa-child',
'fa-id-badge' => ' fa-id-badge',
'fa-smile-o' => ' fa-smile-o',
'fa-frown-o' => ' fa-frown-o',
'fa-meh-o' => ' fa-meh-o',
'fa-check' => ' check',
'fa-close' => ' close',
'fa-signal' => ' fa-signal',
'fa-cog' => ' cog',
'fa-trash-o' => ' trash-o',
'fa-home' => ' home',
'fa-file-o' => ' file-o',
'fa-clock-o' => ' clock-o',
'fa-play-circle-o' => ' play-circle-o',
'fa-repeat' => ' repeat',
'fa-refresh' => ' fa-refresh',
'fa-lock' => ' fa-lock',
'fa-arrow-circle-o-up' => ' arrow-circle-o-up',
'fa-arrow-circle-o-down' => ' arrow-circle-o-down',
'fa-arrow-circle-o-right' => ' arrow-circle-o-right',
'fa-arrow-circle-o-left' => ' arrow-circle-o-left',
'fa-arrow-up' => ' arrow-up',
'fa-arrow-down' => ' arrow-down',
'fa-arrow-right' => ' arrow-right',
'fa-arrow-left' => ' arrow-left',
'fa-chevron-up' => ' chevron-up',
'fa-chevron-down' => ' chevron-down',
'fa-chevron-right' => ' chevron-right',
'fa-chevron-left' => ' chevron-left',
'fa-arrow-circle-up' => ' arrow-circle-up',
'fa-arrow-circle-down' => ' arrow-circle-down',
'fa-arrow-circle-right' => ' arrow-circle-right',
'fa-arrow-circle-left' => ' arrow-circle-left',
'fa-angle-up' => ' angle-up',
'fa-angle-down' => ' angle-down',
'fa-angle-right' => ' angle-right',
'fa-angle-left' => ' angle-left',
'fa-angle-double-up' => ' angle-double-up',
'fa-angle-double-down' => ' angle-double-down',
'fa-angle-double-right' => ' angle-double-right',
'fa-angle-double-left' => ' angle-double-left',
'fa-area-chart' => ' fa-area-chart',
'fa-line-chart' => ' fa-line-chart',
'fa-history' => ' fa-history',
'fa-bolt' => ' fa-bolt',
'fa-lightbulb-o' => ' fa-lightbulb-o',
'fa-rocket' => ' fa-rocket',
'fa-location-arrow' => ' fa-location-arrow',
'fa-paw' => ' fa-paw',
'fa-bomb' => ' fa-bomb',
'fa-birthday-cake' => ' fa-birthday-cake',
'fa-fort-awesome' => ' fa-fort-awesome',
'fa-gamepad' => ' fa-gamepad',
);
$wp_customize->add_setting( 'simple_days_alert_box_start_icon',array(
'default' => 'fa-info-circle',
'sanitize_callback' => 'wp_strip_all_tags',
));
$wp_customize->add_control( 'simple_days_alert_box_start_icon',array(
'label' => esc_html__( 'Heading icon', 'simple-days'),
'section' => 'simple_days_alert_box_setting',
'type' => 'select',
'choices' => $alert_box_icon,
));
$wp_customize->add_setting( 'simple_days_alert_box_end_icon',array(
'default' => '',
'sanitize_callback' => 'wp_strip_all_tags',
));
$wp_customize->add_control( 'simple_days_alert_box_end_icon',array(
'label' => esc_html__( 'Ending icon', 'simple-days'),
'section' => 'simple_days_alert_box_setting',
'type' => 'select',
'choices' => $alert_box_icon,
));
$wp_customize->add_setting( 'simple_days_alert_box_color',array(
'default' => define("simple_days_alert_box_color", ""),
'sanitize_callback' => 'sanitize_text_field',
'transport' => 'postMessage',
));
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'simple_days_alert_box_color', array(
'label' => esc_html__( 'Text Color', 'simple-days' ),
'section' => 'simple_days_alert_box_setting',
)));
$wp_customize->add_setting( 'simple_days_alert_box_bg_color',array(
'default' => define("simple_days_alert_box_bg_color", ""),
'sanitize_callback' => 'sanitize_text_field',
'transport' => 'postMessage',
));
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'simple_days_alert_box_bg_color', array(
'label' => esc_html__( 'Background Color', 'simple-days' ),
'section' => 'simple_days_alert_box_setting',
)));
$wp_customize->add_setting( 'simple_days_alert_box_border_type', array(
'default' => 'none',
'sanitize_callback' => 'simple_days_sanitize_radio',
'transport' => 'postMessage',
));
$wp_customize->add_control( 'simple_days_alert_box_border_type', array(
'label' => esc_html__( 'Border Type', 'simple-days' ),
'section' => 'simple_days_alert_box_setting',
'type' => 'select',
'choices' => $heading_border_style,
));
$wp_customize->add_setting( 'simple_days_alert_box_border_width', array(
'default' => 1,
'sanitize_callback' => 'absint',
'transport' => 'postMessage',
));
$wp_customize->add_control( 'simple_days_alert_box_border_width', array(
'label' => esc_html__( 'Border width', 'simple-days' ),
//'description' => esc_html__('default:', 'simple-days').esc_html('1'),
'section' => 'simple_days_alert_box_setting',
'type' => 'number',
'input_attrs' => array(
'min' => 1, 'step' => 1, 'max' => 50,),
));
$wp_customize->add_setting( 'simple_days_alert_box_border_color',array(
'default' => define("simple_days_alert_box_border_color", ""),
'sanitize_callback' => 'sanitize_text_field',
'transport' => 'postMessage',
));
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'simple_days_alert_box_border_color', array(
'label' => esc_html__( 'Border Color', 'simple-days' ),
'section' => 'simple_days_alert_box_setting',
)));
$wp_customize->add_setting( 'simple_days_alert_box_border_inside',array(
'default' => false,
'sanitize_callback' => 'sanitize_text_field',
'transport' => 'postMessage',
));
$wp_customize->add_control( 'simple_days_alert_box_border_inside',array(
'label' => esc_html__( 'Enable', 'simple-days'),
'description' => esc_html__('Border is inside', 'simple-days'),
'section' => 'simple_days_alert_box_setting',
'type' => 'checkbox',
));
$wp_customize->add_setting('breadcrumbs',array('sanitize_callback' => 'absint',));
$wp_customize->add_control('breadcrumbs',array(
'section' => 'simple_days_breadcrumbs',
'type' => 'hidden'
));
$wp_customize->selective_refresh->add_partial( 'breadcrumbs', array(
'selector' => '#breadcrumb',
));
$wp_customize->add_section('simple_days_breadcrumbs',array(
'title' => esc_html__('Breadcrumbs','simple-days'),
'panel' => 'simple_days_setting',
));
$wp_customize->add_setting( 'simple_days_breadcrumbs_display', array(
'default' => 'left',
'sanitize_callback' => 'simple_days_sanitize_radio',
'transport'=>'postMessage',
));
$wp_customize->add_control( 'simple_days_breadcrumbs_display', array(
'label' => esc_html__( 'Breadcrumbs display position', 'simple-days' ),
'section' => 'simple_days_breadcrumbs',
'type' => 'radio',
'choices' => array(
'left' => esc_html__( 'Left', 'simple-days' ),
'right' => esc_html__( 'Right', 'simple-days' ),
'none' => esc_html__( 'Hide', 'simple-days' ),
),
));
$wp_customize->add_setting( 'simple_days_breadcrumbs_current',array(
'default' => true,
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( 'simple_days_breadcrumbs_current',array(
'label' => esc_html__( 'Display', 'simple-days'),
'description' => esc_html__('Current name', 'simple-days'),
'section' => 'simple_days_breadcrumbs',
'type' => 'checkbox',
));
$delimiter = '»';
$wp_customize->add_setting( 'simple_days_breadcrumbs_delimiter',array(
'default' => $delimiter,
'sanitize_callback' => 'wp_strip_all_tags',
));
$wp_customize->add_control( 'simple_days_breadcrumbs_delimiter',array(
'label' => esc_html__( 'Delimiter', 'simple-days'),
'section' => 'simple_days_breadcrumbs',
'type' => 'select',
'choices' => array(
' ' => esc_html(' '),
'»' => esc_html('»'),
'>' => esc_html('>'),
'·' => esc_html('·'),
'-' => esc_html('-'),
'→' => esc_html('→'),
'⇒' => esc_html('⇒'),
'∼' => esc_html('∼'),
'|' => esc_html('|'),
'…' => esc_html('…'),
),
));
$wp_customize->add_setting( 'simple_days_breadcrumbs_homeicon',array(
'default' => 'fa-home',
'sanitize_callback' => 'wp_strip_all_tags',
));
$wp_customize->add_control( 'simple_days_breadcrumbs_homeicon',array(
'label' => esc_html__( 'Home icon', 'simple-days'),
'section' => 'simple_days_breadcrumbs',
'type' => 'select',
'choices' => array(
' ' => esc_html(' '),
'fa-home' => ' fa-home',
'fa-star-o' => ' fa-star-o',
'fa-star' => ' fa-star',
'fa-cube' => ' fa-cube',
'fa-tree' => ' fa-tree',
'fa-map-pin' => ' fa-map-pin',
'fa-map-marker' => ' fa-map-marker',
'fa-fort-awesome' => ' fa-fort-awesome',
'fa-rocket' => ' fa-rocket',
),
));
$wp_customize->add_setting( 'simple_days_breadcrumbs_treeicon',array(
'default' => 'fa-folder-open-o',
'sanitize_callback' => 'wp_strip_all_tags',
));
$wp_customize->add_control( 'simple_days_breadcrumbs_treeicon',array(
'label' => esc_html__( 'Tree icon', 'simple-days'),
'section' => 'simple_days_breadcrumbs',
'type' => 'select',
'choices' => array(
' ' => esc_html(' '),
'fa-folder-open-o' => ' fa-folder-open-o',
'fa-folder-o' => ' fa-folder-o',
'fa-folder-open' => ' fa-folder-open',
'fa-folder' => ' fa-folder',
'fa-files-o' => ' fa-files-o',
'fa-book' => ' fa-book',
'fa-check' => ' fa-check',
'fa-check-square' => ' fa-check-square',
'fa-cubes' => ' fa-cubes',
),
));
$wp_customize->add_setting( 'simple_days_breadcrumbs_currenticon',array(
'default' => 'fa-file-text-o',
'sanitize_callback' => 'wp_strip_all_tags',
));
$wp_customize->add_control( 'simple_days_breadcrumbs_currenticon',array(
'label' => esc_html__( 'Current icon', 'simple-days'),
'section' => 'simple_days_breadcrumbs',
'type' => 'select',
'choices' => array(
' ' => esc_html(' '),
'fa-file-text-o' => ' fa-file-text-o',
'fa-file-o' => ' fa-file-o',
'fa-file-text' => ' fa-file-text',
'fa-newspaper-o' => ' fa-newspaper-o',
'fa-sticky-note' => ' fa-sticky-note',
'fa-sticky-note-o' => ' fa-sticky-note-o',
'fa-pencil' => ' fa-pencil',
'fa-smile-o' => ' fa-smile-o',
'fa-check' => ' fa-check',
'fa-check-square' => ' fa-check-square',
'fa-cube' => ' fa-cube',
'fa-paw' => ' fa-paw',
'fa-gamepad' => ' fa-gamepad',
),
));
$wp_customize->add_section('simple_days_widget_setting',array(
'title' => esc_html__('Simple Days Widget','simple-days'),
'panel' => 'simple_days_setting',
));
$wp_customize->add_setting( 'simple_days_social_link_widget',array(
'default' => false,
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( 'simple_days_social_link_widget',array(
'label' => esc_html__( 'Enable', 'simple-days'),
'description' => esc_html__('Add Social Links Widget', 'simple-days'),
'section' => 'simple_days_widget_setting',
'type' => 'checkbox',
));
$wp_customize->add_setting( 'simple_days_recent_posts_with_thumbnail_widget',array(
'default' => false,
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( 'simple_days_recent_posts_with_thumbnail_widget',array(
'label' => esc_html__( 'Enable', 'simple-days'),
'description' => esc_html__('Recent Posts with thumbnail widget', 'simple-days'),
'section' => 'simple_days_widget_setting',
'type' => 'checkbox',
));
$wp_customize->add_setting( 'simple_days_update_posts_with_thumbnail_widget',array(
'default' => false,
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( 'simple_days_update_posts_with_thumbnail_widget',array(
'label' => esc_html__( 'Enable', 'simple-days'),
'description' => esc_html__('Update Posts with thumbnail widget', 'simple-days'),
'section' => 'simple_days_widget_setting',
'type' => 'checkbox',
));
$wp_customize->add_setting( 'simple_days_recommend_posts_widget',array(
'default' => false,
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( 'simple_days_recommend_posts_widget',array(
'label' => esc_html__( 'Enable', 'simple-days'),
'description' => esc_html__('Recommended Posts with thumbnail widget', 'simple-days'),
'section' => 'simple_days_widget_setting',
'type' => 'checkbox',
));
$wp_customize->add_setting( 'simple_days_dd_archives_widget',array(
'default' => false,
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( 'simple_days_dd_archives_widget',array(
'label' => esc_html__( 'Enable', 'simple-days'),
'description' => esc_html__('Drop Down Archives widget without JavaScript', 'simple-days'),
'section' => 'simple_days_widget_setting',
'type' => 'checkbox',
));
$wp_customize->add_setting( 'simple_days_dd_categories_widget',array(
'default' => false,
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( 'simple_days_dd_categories_widget',array(
'label' => esc_html__( 'Enable', 'simple-days'),
'description' => esc_html__('Drop Down Categories widget without JavaScript', 'simple-days'),
'section' => 'simple_days_widget_setting',
'type' => 'checkbox',
));
$social_account_description_before = esc_html__('e.g. ', 'simple-days');
$social_account_description_after = '∗∗∗∗∗∗
'.esc_html__('type the ∗ part of your url', 'simple-days');
$social_account_description['amazon'] = esc_html__("add your amazon website's full URL", 'simple-days').'
'.esc_html__('e.g. ', 'simple-days').esc_html__('Your wish list URL', 'simple-days');
$social_account_description['facebook'] = $social_account_description_before.' facebook.com/'.$social_account_description_after;
$social_account_description['twitter'] = $social_account_description_before.' twitter.com/'.$social_account_description_after;
$social_account_description['linkedin'] = $social_account_description_before.' linkedin.com/in/'.$social_account_description_after;
$social_account_description['instagram'] = $social_account_description_before.' instagram.com/'.$social_account_description_after;
$social_account_description['googleplus'] = $social_account_description_before.' plus.google.com/'.$social_account_description_after;
$social_account_description['pinterest'] = $social_account_description_before.' pinterest.com/'.$social_account_description_after;
$social_account_description['flickr'] = $social_account_description_before.' flickr.com/photos/'.$social_account_description_after;
$social_account_description['github'] = $social_account_description_before.' github.com/'.$social_account_description_after;
$social_account_description['codepen'] = $social_account_description_before.' codepen.io/'.$social_account_description_after;
$social_account_description['youtube'] = $social_account_description_before.' youtube.com/'.$social_account_description_after;
$social_account_description['vimeo'] = $social_account_description_before.' vimeo.com/'.$social_account_description_after;
$social_account_description['soundcloud'] = $social_account_description_before.' soundcloud.com/'.$social_account_description_after;
$social_account_description['meetup'] = $social_account_description_before.' meetup.com/'.$social_account_description_after;
$social_account_description['hatenabookmark'] = $social_account_description_before.' b.hatena.ne.jp/'.$social_account_description_after;
$social_account_description['line'] = $social_account_description_before.' line.naver.jp/ti/p/'.$social_account_description_after;
$social_account_description['tumblr'] = esc_html__('e.g. ', 'simple-days').' ∗∗∗∗∗∗.tumblr.com
'.esc_html__('type the ∗ part of your url', 'simple-days');
$social_account_list = $social['name_list'];
unset($social_account_list['none']);
unset($social_account_list['feedly']);
unset($social_account_list['rss']);
$wp_customize->add_section('simple_days_social_account_setting',array(
'title' => esc_html__('Social Account','simple-days'),
'panel' => 'simple_days_setting',
));
foreach ($social_account_list as $key => $value) {
$wp_customize->add_setting( 'simple_days_social_account_'.$key,array(
'default' => '',
'sanitize_callback' => 'wp_strip_all_tags',
));
$wp_customize->add_control('simple_days_social_account_'.$key,array(
'label' => $value,
'description' => $social_account_description[$key],
'section' => 'simple_days_social_account_setting',
'type' => 'text',
));
}
$wp_customize->add_setting( 'simple_days_social_account_facebook_app_id',array(
'default' => '',
'sanitize_callback' => 'wp_strip_all_tags',
));
$wp_customize->add_control('simple_days_social_account_facebook_app_id',array(
'label' => esc_html__( 'Facebook App ID', 'simple-days'),
'description' => esc_html__('e.g. ', 'simple-days').esc_html('1234567890'),
'section' => 'simple_days_social_account_setting',
'type' => 'text',
));
$wp_customize->add_setting( 'simple_days_social_account_facebook_admins',array(
'default' => '',
'sanitize_callback' => 'wp_strip_all_tags',
));
$wp_customize->add_control('simple_days_social_account_facebook_admins',array(
'label' => esc_html__( 'Facebook fb:admins', 'simple-days'),
'description' => esc_html__('e.g. ', 'simple-days').esc_html('1234567890'),
'section' => 'simple_days_social_account_setting',
'type' => 'text',
));
$wp_customize->add_section('simple_days_social_share_setting',array(
'title' => esc_html__('Social Share','simple-days'),
'panel' => 'simple_days_setting',
));
$wp_customize->add_setting('sns_share',array('sanitize_callback' => 'absint',));
$wp_customize->add_control('sns_share',array(
'section' => 'simple_days_social_share_setting',
'type' => 'hidden'
));
$wp_customize->selective_refresh->add_partial( 'sns_share', array(
'selector' => '.social_share_list',
));
$wp_customize->add_setting( 'simple_days_social_share',array(
'default' => 'false',
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( 'simple_days_social_share',array(
'label' => esc_html__( 'Display Style', 'simple-days'),
'description' => esc_html__('Social share', 'simple-days'),
'section' => 'simple_days_social_share_setting',
'type' => 'radio',
'choices' => array(
'false' => esc_html__( 'Disable', 'simple-days' )
) + $social['shape_list'],
));
$wp_customize->add_setting( 'simple_days_social_share_size',array(
'default' => '',
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( 'simple_days_social_share_size',array(
'label' => esc_html__( 'Icon Size', 'simple-days'),
'section' => 'simple_days_social_share_setting',
'type' => 'radio',
'choices' => $social['size_list'],
));
$wp_customize->add_setting( 'simple_days_social_share_icon_color',array(
'default' => '',
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'simple_days_social_share_icon_color', array(
'label' => esc_html__( 'Specifies the color of the icon.', 'simple-days' ),
'section' => 'simple_days_social_share_setting',
)));
$wp_customize->add_setting( 'simple_days_social_share_icon_hover_color',array(
'default' => '',
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'simple_days_social_share_icon_hover_color', array(
'label' => esc_html__( 'Specifies the color of hover.', 'simple-days' ),
'section' => 'simple_days_social_share_setting',
)));
$wp_customize->add_setting( 'simple_days_social_share_icon_tooltip',array(
'default' => false,
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( 'simple_days_social_share_icon_tooltip',array(
'label' => esc_html__( 'Enable', 'simple-days'),
'description' => esc_html__('Tool tip', 'simple-days'),
'section' => 'simple_days_social_share_setting',
'type' => 'checkbox',
));
$wp_customize->add_setting( 'simple_days_social_share_title_icon',array(
'default' => 'fa-share-alt',
'sanitize_callback' => 'wp_strip_all_tags',
));
$wp_customize->add_control( 'simple_days_social_share_title_icon',array(
'label' => esc_html__( 'Title icon', 'simple-days'),
'section' => 'simple_days_social_share_setting',
'type' => 'select',
'choices' => array(
' ' => esc_html(' '),
'fa-share-alt' => ' fa-share-alt',
'fa-share-alt-square' => ' fa-share-alt-square',
'fa-share-square-o' => ' fa-share-square-o',
'fa-share-square' => ' fa-share-square',
'fa-share' => ' fa-share',
'fa-retweet' => ' fa-retweet',
),
));
$wp_customize->add_setting( 'simple_days_social_share_title',array(
'default' => esc_html__('Share this post', 'simple-days'),
'sanitize_callback' => 'wp_strip_all_tags',
));
$wp_customize->add_control('simple_days_social_share_title',array(
'label' => esc_html__( 'Title', 'simple-days'),
'section' => 'simple_days_social_share_setting',
'type' => 'text',
));
$sns_share_name = array(
'none' => '-',
'buffer' => esc_html__('buffer', 'simple-days'),
'digg' => esc_html__('digg', 'simple-days'),
'mail' => esc_html__('Email', 'simple-days'),
'evernote' => esc_html__('Evernote', 'simple-days'),
'facebook' => esc_html__('Facebook', 'simple-days'),
'googleplus' => esc_html__('Google+', 'simple-days'),
'hatenabookmark' => esc_html__('Hatena Bookmark', 'simple-days'),
'line' => esc_html__('Line', 'simple-days'),
'linkedin' => esc_html__('LinkedIn', 'simple-days'),
'messenger' => esc_html__('Messenger', 'simple-days'),
'pinterest' => esc_html__('Pinterest', 'simple-days'),
'pocket' => esc_html__('Pocket', 'simple-days'),
'reddit' => esc_html__('Reddit', 'simple-days'),
'tumblr' => esc_html__('Tumblr', 'simple-days'),
'twitter' => esc_html__('Twitter', 'simple-days'),
'whatsapp' => esc_html__('WhatsApp', 'simple-days'),
);
$i = 1;
while($i <= 10){
$wp_customize->add_setting( 'simple_days_sns_share_'.$i,array(
'default' => 'none',
'sanitize_callback' => 'simple_days_sns_name_sanitize',
));
$wp_customize->add_control('simple_days_sns_share_'.$i,array(
'label' => sprintf(esc_html__( 'Social share Icon #%s', 'simple-days'),$i),
'section' => 'simple_days_social_share_setting',
'type' => 'select',
'choices' => $sns_share_name,
'priority' => $i+100,
));
$i++;
}
$wp_customize->add_section('simple_days_social_cta_setting',array(
'title' => esc_html__('Social CTA','simple-days'),
'panel' => 'simple_days_setting',
));
$wp_customize->add_setting('sns_cta',array('sanitize_callback' => 'absint',));
$wp_customize->add_control('sns_cta',array(
'section' => 'simple_days_social_cta_setting',
'type' => 'hidden'
));
$wp_customize->selective_refresh->add_partial( 'sns_cta', array(
'selector' => '.simple_days_cta_box ',
));
$wp_customize->add_setting( 'simple_days_social_cta',array(
'default' => false,
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( 'simple_days_social_cta',array(
'label' => esc_html__( 'Display', 'simple-days'),
'description' => esc_html__('call-to-action under in the contents of the post', 'simple-days'),
'section' => 'simple_days_social_cta_setting',
'type' => 'checkbox',
));
$wp_customize->add_setting( 'simple_days_social_cta_page',array(
'default' => false,
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( 'simple_days_social_cta_page',array(
'label' => esc_html__( 'Display', 'simple-days'),
'description' => esc_html__('call-to-action under in the contents of the page', 'simple-days'),
'section' => 'simple_days_social_cta_setting',
'type' => 'checkbox',
));
$wp_customize->add_setting( 'simple_days_social_cta_heading_text',array(
'default' => esc_html__('Follow us', 'simple-days'),
'sanitize_callback' => 'wp_strip_all_tags',
));
$wp_customize->add_control('simple_days_social_cta_heading_text',array(
'label' => esc_html__( 'heading text', 'simple-days'),
'section' => 'simple_days_social_cta_setting',
'type' => 'text',
));
$wp_customize->add_setting( 'simple_days_social_cta_end_text',array(
'default' => esc_html__('We will keep you updated', 'simple-days'),
'sanitize_callback' => 'wp_strip_all_tags',
));
$wp_customize->add_control('simple_days_social_cta_end_text',array(
'label' => esc_html__( 'end text', 'simple-days'),
'section' => 'simple_days_social_cta_setting',
'type' => 'text',
));
$wp_customize->add_setting( 'simple_days_social_cta_facebook',array(
'default' => false,
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( 'simple_days_social_cta_facebook',array(
'label' => esc_html__( 'Display', 'simple-days'),
'description' => esc_html__('Facebook', 'simple-days'),
'section' => 'simple_days_social_cta_setting',
'type' => 'checkbox',
));
$wp_customize->add_setting( 'simple_days_social_cta_facebook_script',array(
'default' => false,
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( 'simple_days_social_cta_facebook_script',array(
'label' => esc_html__( 'Enable', 'simple-days'),
'description' => esc_html__('required Facebook script.', 'simple-days').'
'.esc_html__('be careful not to conflict', 'simple-days'),
'section' => 'simple_days_social_cta_setting',
'type' => 'checkbox',
));
$wp_customize->add_setting( 'simple_days_social_cta_twitter',array(
'default' => false,
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( 'simple_days_social_cta_twitter',array(
'label' => esc_html__( 'Display', 'simple-days'),
'description' => esc_html__('Twitter', 'simple-days'),
'section' => 'simple_days_social_cta_setting',
'type' => 'checkbox',
));
$wp_customize->add_setting( 'simple_days_social_cta_gradation',array(
'default' => false,
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( 'simple_days_social_cta_gradation',array(
'label' => esc_html__( 'Gradation Color', 'simple-days'),
'description' => esc_html__('Background color', 'simple-days'),
'section' => 'simple_days_social_cta_setting',
'type' => 'checkbox',
));
$wp_customize->add_setting('profile',array('sanitize_callback' => 'absint',));
$wp_customize->add_control('profile',array(
'section' => 'simple_days_profile_setting',
'type' => 'hidden'
));
$wp_customize->selective_refresh->add_partial( 'profile', array(
'selector' => '.pf_box:not(.pf_another_box)',
));
$wp_customize->add_section('simple_days_profile_setting',array(
'title' => esc_html__('Profile Widget', 'simple-days'),
'panel' => 'simple_days_setting',
));
$wp_customize->add_setting( 'simple_days_profile_widget',array(
'default' => false,
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( 'simple_days_profile_widget',array(
'label' => esc_html__( 'Enable', 'simple-days'),
'description' => esc_html__('Add Profile Widget', 'simple-days'),
'section' => 'simple_days_profile_setting',
'type' => 'checkbox',
));
$wp_customize->add_setting( 'simple_days_another_profile_widget',array(
'default' => false,
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( 'simple_days_another_profile_widget',array(
'label' => esc_html__( 'Enable', 'simple-days'),
'description' => esc_html__('Add Another Profile Widget', 'simple-days'),
'section' => 'simple_days_profile_setting',
'type' => 'checkbox',
));
$wp_customize->add_setting( 'simple_days_profile_title',array(
'default' => esc_html__( 'Profile', 'simple-days'),
'sanitize_callback' => 'wp_strip_all_tags',
));
$wp_customize->add_control('simple_days_profile_title',array(
'label' => esc_html__( 'Title', 'simple-days'),
'section' => 'simple_days_profile_setting',
'type' => 'text',
));
$wp_customize->add_setting( 'simple_days_profile_name',array(
'default' => '',
'sanitize_callback' => 'wp_strip_all_tags',
));
$wp_customize->add_control('simple_days_profile_name',array(
'label' => esc_html__( 'Name', 'simple-days'),
'section' => 'simple_days_profile_setting',
'type' => 'text',
));
$wp_customize->add_setting( 'simple_days_profile_image',array(
'default' => '',
'sanitize_callback' => 'simple_days_sanitize_image_file',
));
$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'simple_days_profile_image', array(
'label' => esc_html__( 'Profile image', 'simple-days'),
'description' => esc_html__( 'Profile use this image.', 'simple-days'),
'section' => 'simple_days_profile_setting',
)));
$wp_customize->add_setting( 'simple_days_profile_image_wrap', array(
'default' => 'circle',
'sanitize_callback' => 'simple_days_sanitize_radio',
)
);
$wp_customize->add_control( 'simple_days_profile_image_wrap', array(
'label' => esc_html__( 'Profile image display shape', 'simple-days' ),
'section' => 'simple_days_profile_setting',
'type' => 'radio',
'choices' => array(
'circle' => esc_html__( 'Circle', 'simple-days' ),
'square' => esc_html__( 'Square', 'simple-days' ),
),
));
$wp_customize->add_setting( 'simple_days_profile_background_image',array(
'default' => '',
'sanitize_callback' => 'simple_days_sanitize_image_file',
));
$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'simple_days_profile_background_image', array(
'label' => esc_html__( 'Background image', 'simple-days'),
'description' => esc_html__( 'Background use this image.', 'simple-days'),
'section' => 'simple_days_profile_setting',
)));
$wp_customize->add_setting( 'simple_days_profile_text',array(
'default' => '',
'sanitize_callback' => 'wp_kses_post',
));
$wp_customize->add_control('simple_days_profile_text',array(
'label' => esc_html__( 'Profile text', 'simple-days'),
'section' => 'simple_days_profile_setting',
'type' => 'textarea',
));
$wp_customize->add_setting( 'simple_days_profile_read_more_url',array(
'default' => '',
'sanitize_callback' => 'wp_kses_post',
));
$wp_customize->add_control('simple_days_profile_read_more_url',array(
'label' => esc_html__( 'Read more URL', 'simple-days'),
'section' => 'simple_days_profile_setting',
'type' => 'text',
));
$wp_customize->add_setting( 'simple_days_profile_read_more_text',array(
'default' => esc_html__( 'Read More', 'simple-days' ),
'sanitize_callback' => 'wp_kses_post',
));
$wp_customize->add_control('simple_days_profile_read_more_text',array(
'label' => esc_html__( 'Read more text', 'simple-days'),
'section' => 'simple_days_profile_setting',
'type' => 'text',
));
$wp_customize->add_setting( 'simple_days_profile_read_more_blank',array(
'default' => false,
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( 'simple_days_profile_read_more_blank',array(
'label' => esc_html__( 'Enable', 'simple-days'),
'description' => esc_html__('Read more link open new window.', 'simple-days'),
'section' => 'simple_days_profile_setting',
'type' => 'checkbox',
));
$wp_customize->add_setting( 'simple_days_profile_social_link_shape',array(
'default' => 'icon_square',
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( 'simple_days_profile_social_link_shape',array(
'label' => esc_html__( 'Social Links', 'simple-days'),
'description' => esc_html__('Display Style', 'simple-days'),
'section' => 'simple_days_profile_setting',
'type' => 'radio',
'choices' => $social['shape_list'],
));
$wp_customize->add_setting( 'simple_days_profile_social_link_size',array(
'default' => '',
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( 'simple_days_profile_social_link_size',array(
'label' => esc_html__( 'Icon Size', 'simple-days'),
'section' => 'simple_days_profile_setting',
'type' => 'radio',
'choices' => $social['size_list'],
));
$wp_customize->add_setting( 'simple_days_profile_social_icon_color',array(
'default' => '',
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'simple_days_profile_social_icon_color', array(
'label' => esc_html__( 'Specifies the color of the icon.', 'simple-days' ),
'section' => 'simple_days_profile_setting',
)));
$wp_customize->add_setting( 'simple_days_profile_social_icon_hover_color',array(
'default' => '',
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'simple_days_profile_social_icon_hover_color', array(
'label' => esc_html__( 'Specifies the color of hover.', 'simple-days' ),
'section' => 'simple_days_profile_setting',
)));
$wp_customize->add_setting( 'simple_days_profile_social_icon_tooltip',array(
'default' => false,
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( 'simple_days_profile_social_icon_tooltip',array(
'label' => esc_html__( 'Enable', 'simple-days'),
'description' => esc_html__('Tool tip', 'simple-days'),
'section' => 'simple_days_profile_setting',
'type' => 'checkbox',
));
$wp_customize->add_setting( 'simple_days_profile_caution', array(
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( new Simple_Days_html_text_Custom_Content( $wp_customize, 'simple_days_profile_caution', array(
'section' => 'simple_days_profile_setting',
'label' => esc_html__( 'How to show social icon', 'simple-days' ),
'content' => sprintf(esc_html__( 'You must register your %1$s before you can show social links.', 'simple-days' ),''.esc_html__( 'Social Account', 'simple-days' ).''),
//'description' => esc_html__( 'Optional: Example Description.', 'simple-days' ),
)));
$i = 1;
while($i <= 5){
$wp_customize->add_setting( 'simple_days_profile_social_icon_'.$i,array(
'default' => 'none',
'sanitize_callback' => 'simple_days_sns_name_sanitize',
));
$wp_customize->add_control('simple_days_profile_social_icon_'.$i,array(
'label' => sprintf(esc_html__( 'Social Icon #%s', 'simple-days'),$i),
'section' => 'simple_days_profile_setting',
'type' => 'select',
'choices' => $social['name_list'],
'priority' => $i+100,
));
$i++;
}
$wp_customize->add_section('simple_days_popular_post_setting',array(
'title' => esc_html__('Popular Post', 'simple-days'),
'panel' => 'simple_days_setting',
));
$wp_customize->add_setting( 'simple_days_popular_post',array(
'default' => false,
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( 'simple_days_popular_post',array(
'label' => esc_html__( 'Enable', 'simple-days'),
'description' => esc_html__('Count Popular Post', 'simple-days'),
'section' => 'simple_days_popular_post_setting',
'type' => 'checkbox',
));
$wp_customize->add_setting( 'simple_days_popular_post_widget',array(
'default' => false,
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( 'simple_days_popular_post_widget',array(
'label' => esc_html__( 'Enable', 'simple-days'),
'description' => esc_html__('Popular Posts Widgets', 'simple-days'),
'section' => 'simple_days_popular_post_setting',
'type' => 'checkbox',
));
$wp_customize->add_setting('popular_post_view',array('sanitize_callback' => 'absint',));
$wp_customize->add_control('popular_post_view',array(
'section' => 'simple_days_popular_post_setting',
'type' => 'hidden'
));
$wp_customize->selective_refresh->add_partial( 'popular_post_view', array(
'selector' => '.page_view',
));
$wp_customize->add_setting( 'simple_days_popular_post_view',array(
'default' => 'none',
'sanitize_callback' => 'simple_days_sanitize_select',
));
$wp_customize->add_control( 'simple_days_popular_post_view',array(
'label' => esc_html__( 'Display page view at the each post.', 'simple-days'),
'section' => 'simple_days_popular_post_setting',
'type' => 'select',
'choices' => array(
'none' => esc_html__( 'Hide', 'simple-days' ),
'all' => esc_html__('Page View', 'simple-days'),
'yearly' => esc_html__('Yearly Page View', 'simple-days'),
'monthly' => esc_html__('Monthly Page View', 'simple-days'),
'weekly' => esc_html__('Weekly Page View', 'simple-days'),
'daily' => esc_html__('Daily Page View', 'simple-days'),
),
));
$wp_customize->add_setting( 'simple_days_popular_post_view_icon',array(
'default' => 'fa-signal',
'sanitize_callback' => 'wp_strip_all_tags',
));
$wp_customize->add_control( 'simple_days_popular_post_view_icon',array(
'label' => esc_html__( 'Page view icon', 'simple-days'),
'section' => 'simple_days_popular_post_setting',
'type' => 'select',
'choices' => array(
' ' => esc_html(' '),
'fa-signal' => ' fa-signal',
'fa-area-chart' => ' fa-area-chart',
'fa-line-chart' => ' fa-line-chart',
'fa-heart-o' => ' fa-heart-o',
'fa-heart' => ' fa-heart',
'fa-star-o' => ' fa-star-o',
'fa-star' => ' fa-star',
'fa-history' => ' fa-history',
'fa-history' => ' fa-history',
'fa-home' => ' fa-home',
'fa-bolt' => ' fa-bolt',
'fa-lightbulb-o' => ' fa-lightbulb-o',
'fa-smile-o' => ' fa-smile-o',
'fa-rocket' => ' fa-rocket',
'fa-location-arrow' => ' fa-location-arrow',
'fa-info-circle' => ' fa-info-circle',
'fa-info' => ' fa-info',
'fa-paw' => ' fa-paw',
'fa-bomb' => ' fa-bomb',
'fa-birthday-cake' => ' fa-birthday-cake',
'fa-fort-awesome' => ' fa-fort-awesome',
'fa-gamepad' => ' fa-gamepad',
),
));
$wp_customize->add_setting( 'simple_days_popular_post_view_position', array(
'default' => 'right',
'sanitize_callback' => 'simple_days_sanitize_radio',
'transport'=>'postMessage',
));
$wp_customize->add_control( 'simple_days_popular_post_view_position', array(
'label' => esc_html__( 'Post view display position', 'simple-days' ),
'section' => 'simple_days_popular_post_setting',
'type' => 'radio',
'choices' => array(
'left' => esc_html__( 'Left', 'simple-days' ),
'center' => esc_html__( 'Center', 'simple-days' ),
'right' => esc_html__( 'Right', 'simple-days' ),
),
));
$wp_customize->add_setting( 'simple_days_popular_post_view_logout',array(
'default' => false,
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( 'simple_days_popular_post_view_logout',array(
'label' => esc_html__( 'Enable', 'simple-days'),
'description' => esc_html__('Display page view to logout user.', 'simple-days'),
'section' => 'simple_days_popular_post_setting',
'type' => 'checkbox',
));
$wp_customize->add_section('simple_days_toc_setting',array(
'title' => esc_html__('Table of contents', 'simple-days'),
'panel' => 'simple_days_setting',
));
$wp_customize->add_setting('toc_setting',array('sanitize_callback' => 'absint',));
$wp_customize->add_control('toc_setting',array(
'section' => 'simple_days_toc_setting',
'type' => 'hidden'
));
$wp_customize->selective_refresh->add_partial( 'toc_setting', array(
'selector' => '.s_d_toc',
));
$wp_customize->add_setting( 'simple_days_toc',array(
'default' => false,
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( 'simple_days_toc',array(
'label' => esc_html__( 'Enable', 'simple-days'),
'description' => esc_html__('insert table of contents', 'simple-days'),
'section' => 'simple_days_toc_setting',
'type' => 'checkbox',
));
$wp_customize->add_setting( 'simple_days_toc_title',array(
'default' => esc_html_x( 'Contents', 'toc' , 'simple-days' ),
'sanitize_callback' => 'wp_strip_all_tags',
));
$wp_customize->add_control('simple_days_toc_title',array(
'label' => esc_html_x( 'Toc Title', 'toc' , 'simple-days' ),
'section' => 'simple_days_toc_setting',
'type' => 'text',
));
$wp_customize->add_setting( 'simple_days_toc_hide',array(
'default' => false,
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( 'simple_days_toc_hide',array(
'label' => esc_html__( 'Initially hide table of contents', 'simple-days'),
'section' => 'simple_days_toc_setting',
'type' => 'checkbox',
));
$wp_customize->add_setting( 'simple_days_toc_dc',array(
'default' => '3',
'sanitize_callback' => 'simple_days_sanitize_select',
));
$wp_customize->add_control( 'simple_days_toc_dc',array(
'label' => esc_html__( 'lower limit the heading which toc is displayed', 'simple-days'),
'section' => 'simple_days_toc_setting',
'type' => 'select',
'choices' => array(
'2' => '2',
'3' => '3',
'4' => '4',
'5' => '5',
'6' => '6',
'7' => '7',
'8' => '8',
'9' => '9',
'10' => '10',
),
));
$wp_customize->add_setting( 'simple_days_toc_post',array(
'default' => true,
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( 'simple_days_toc_post',array(
'label' => esc_html__( 'Automatically display toc in post', 'simple-days'),
'section' => 'simple_days_toc_setting',
'type' => 'checkbox',
));
$wp_customize->add_setting( 'simple_days_toc_page',array(
'default' => true,
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( 'simple_days_toc_page',array(
'label' => esc_html__( 'Automatically display toc in page', 'simple-days'),
'section' => 'simple_days_toc_setting',
'type' => 'checkbox',
));
$wp_customize->add_setting( 'simple_days_toc_dp',array(
'default' => '0',
'sanitize_callback' => 'simple_days_sanitize_select',
));
$wp_customize->add_control( 'simple_days_toc_dp',array(
'label' => esc_html__( 'display position', 'simple-days'),
'section' => 'simple_days_toc_setting',
'type' => 'select',
'choices' => array(
'0' => esc_html__('Before the first heading', 'simple-days'),
'1' => esc_html__('After the first heading', 'simple-days'),
'2' => esc_html__('Top', 'simple-days'),
),
));
$wp_customize->add_setting( 'simple_days_toc_hierarchical',array(
'default' => false,
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( 'simple_days_toc_hierarchical',array(
'label' => esc_html__( 'hierarchical view', 'simple-days'),
'section' => 'simple_days_toc_setting',
'type' => 'checkbox',
));
$wp_customize->add_setting( 'simple_days_toc_numerical',array(
'default' => true,
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( 'simple_days_toc_numerical',array(
'label' => esc_html__( 'numerical display', 'simple-days'),
'section' => 'simple_days_toc_setting',
'type' => 'checkbox',
));
$wp_customize->add_setting( 'simple_days_toc_widget',array(
'default' => false,
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( 'simple_days_toc_widget',array(
'label' => esc_html__( 'Enable', 'simple-days'),
'description' => esc_html__('Add Widgets TOC', 'simple-days'),
'section' => 'simple_days_toc_setting',
'type' => 'checkbox',
));
$wp_customize->add_setting( 'simple_days_toc_widget_sticky',array(
'default' => false,
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( 'simple_days_toc_widget_sticky',array(
'label' => esc_html__( 'Enable', 'simple-days'),
'description' => esc_html__('Sticky TOC of SideBar Widgets', 'simple-days'),
'section' => 'simple_days_toc_setting',
'type' => 'checkbox',
));
$wp_customize->add_section('simple_days_blog_card_setting',array(
'title' => esc_html__('Blog Card', 'simple-days'),
'panel' => 'simple_days_setting',
));
$wp_customize->add_setting( 'simple_days_blog_card_internal',array(
'default' => false,
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( 'simple_days_blog_card_internal',array(
'label' => esc_html__( 'Enable', 'simple-days'),
'description' => esc_html__('Blog card(internal site)', 'simple-days'),
'section' => 'simple_days_blog_card_setting',
'type' => 'checkbox',
));
$wp_customize->add_setting( 'simple_days_blog_card_external',array(
'default' => false,
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( 'simple_days_blog_card_external',array(
'label' => esc_html__( 'Enable', 'simple-days'),
'description' => esc_html__('Blog card(external site)', 'simple-days'),
'section' => 'simple_days_blog_card_setting',
'type' => 'checkbox',
));
$wp_customize->add_section('simple_days_google_analytics_setteing',array(
'title' => esc_html__('Google Analytics', 'simple-days'),
'panel' => 'simple_days_setting',
));
$wp_customize->add_setting( 'simple_days_ga_analytics', array(
'default' => 'false',
'sanitize_callback' => 'simple_days_sanitize_radio',
)
);
$wp_customize->add_control( 'simple_days_ga_analytics', array(
'label' => esc_html__( 'Google Analytics', 'simple-days' ),
'section' => 'simple_days_google_analytics_setteing',
'type' => 'radio',
'choices' => array(
'false' => esc_html__( 'Disable', 'simple-days' ),
'1' => esc_html__( 'ga.js', 'simple-days' ),
'2' => esc_html__( 'gtag.js', 'simple-days' ),
),
));
$wp_customize->add_setting( 'simple_days_ga_analytics_id',array(
'default' => '',
'sanitize_callback' => 'wp_strip_all_tags',
));
$wp_customize->add_control('simple_days_ga_analytics_id',array(
'label' => esc_html__( 'Google Analytics account', 'simple-days'),
'description' => esc_html__('e.g. ', 'simple-days').esc_html('UA-XXXXXX-Y'),
'section' => 'simple_days_google_analytics_setteing',
'type' => 'text',
));
$wp_customize->add_setting( 'simple_days_google_site_verification',array(
'default' => '',
'sanitize_callback' => 'wp_strip_all_tags',
));
$wp_customize->add_control('simple_days_google_site_verification',array(
'label' => esc_html__( 'Google Site Verification', 'simple-days'),
'description' => esc_html__('e.g. ', 'simple-days').esc_html('1234567890AbCdeFghIjKLMnoPQrstuVWXYz'),
'section' => 'simple_days_google_analytics_setteing',
'type' => 'text',
));
// Add Settings and Controls for Google AD.
$wp_customize->add_section('simple_days_google_ad_setteing',array(
'title' => esc_html__('Google AdSense', 'simple-days'),
'panel' => 'simple_days_setting',
));
$wp_customize->add_setting( 'simple_days_google_ad_publisher_id',array(
'default' => '',
'sanitize_callback' => 'wp_strip_all_tags',
));
$wp_customize->add_control('simple_days_google_ad_publisher_id',array(
'label' => esc_html__( 'Your publisher ID(data-ad-client):', 'simple-days'),
'description' => esc_html__('e.g. ', 'simple-days').esc_html('ca-pub-1234567890'),
'section' => 'simple_days_google_ad_setteing',
'type' => 'text',
));
$wp_customize->add_setting( 'simple_days_google_ad_labeling',array(
'default' => '0',
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( 'simple_days_google_ad_labeling',array(
'label' => esc_html__( 'Labeling ads', 'simple-days'),
'section' => 'simple_days_google_ad_setteing',
'type' => 'radio',
'choices' => array(
'0' => esc_html__( 'Hide', 'simple-days' ),
'1' => esc_html__( 'Advertisements', 'simple-days' ),
'2' => esc_html__( 'Sponsored Links', 'simple-days' ),
),
));
$wp_customize->add_setting( 'simple_days_google_ad_responsive_info', array(
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( new Simple_Days_html_text_Custom_Content( $wp_customize, 'simple_days_google_ad_responsive_info', array(
'section' => 'simple_days_google_ad_setteing',
'label' => sprintf(esc_html__('%s ad setting', 'simple-days'),esc_html_x('Responsive', 'google_ad', 'simple-days')),
//'content' => sprintf(esc_html__('This selection overrides %s.', 'simple-days'),esc_html__( 'Local Fonts Japanese', 'simple-days')),
//'description' => esc_html__( 'Optional: Example Description.', 'simple-days' ),
)));
$wp_customize->add_setting( 'simple_days_google_ad',array(
'default' => false,
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( 'simple_days_google_ad',array(
'label' => esc_html__( 'Enable', 'simple-days'),
'description' => sprintf(esc_html__('Add Widgets Google AdSense (%s)', 'simple-days'),esc_html_x('Responsive', 'google_ad', 'simple-days')),
'section' => 'simple_days_google_ad_setteing',
'type' => 'checkbox',
));
$wp_customize->add_setting( 'simple_days_google_ad_data_ad_slot',array(
'default' => '',
'sanitize_callback' => 'wp_strip_all_tags',
));
$wp_customize->add_control('simple_days_google_ad_data_ad_slot',array(
'label' => sprintf(esc_html__( 'Your %s ad unit\'s ID(data-ad-slot):', 'simple-days'),esc_html_x('Responsive', 'google_ad', 'simple-days')),
'description' => esc_html__('e.g. ', 'simple-days').esc_html('1234567890'),
'section' => 'simple_days_google_ad_setteing',
'type' => 'text',
));
$wp_customize->add_setting( 'simple_days_google_ad_infeed_info', array(
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( new Simple_Days_html_text_Custom_Content( $wp_customize, 'simple_days_google_ad_infeed_info', array(
'section' => 'simple_days_google_ad_setteing',
'label' => sprintf(esc_html__('%s ad setting', 'simple-days'),esc_html_x('In-feed', 'google_ad', 'simple-days')),
//'content' => sprintf(esc_html__('This selection overrides %s.', 'simple-days'),esc_html__( 'Local Fonts Japanese', 'simple-days')),
//'description' => esc_html__( 'Optional: Example Description.', 'simple-days' ),
)));
$wp_customize->add_setting( 'simple_days_google_ad_infeed',array(
'default' => false,
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( 'simple_days_google_ad_infeed',array(
'label' => esc_html__( 'Enable', 'simple-days'),
'description' => sprintf(esc_html__('Add Widgets Google AdSense (%s)', 'simple-days'),esc_html_x('In-feed', 'google_ad', 'simple-days')),
'section' => 'simple_days_google_ad_setteing',
'type' => 'checkbox',
));
$wp_customize->add_setting( 'simple_days_google_ad_data_ad_slot_infeed',array(
'default' => '',
'sanitize_callback' => 'wp_strip_all_tags',
));
$wp_customize->add_control('simple_days_google_ad_data_ad_slot_infeed',array(
'label' => sprintf(esc_html__( 'Your %s ad unit\'s ID(data-ad-slot):', 'simple-days'),esc_html_x('In-feed', 'google_ad', 'simple-days')),
'description' => esc_html__('e.g. ', 'simple-days').esc_html('1234567890'),
'section' => 'simple_days_google_ad_setteing',
'type' => 'text',
));
$wp_customize->add_setting( 'simple_days_google_ad_data_ad_layout_key_infeed',array(
'default' => '',
'sanitize_callback' => 'wp_strip_all_tags',
));
$wp_customize->add_control('simple_days_google_ad_data_ad_layout_key_infeed',array(
'label' => sprintf(esc_html__( 'Your %s ad unit\'s layout key(data-ad-layout-key):', 'simple-days'),esc_html_x('In-feed', 'google_ad', 'simple-days')),
'description' => esc_html__('e.g. ', 'simple-days').esc_html('-a0+b1+2c-d3+4e'),
'section' => 'simple_days_google_ad_setteing',
'type' => 'text',
));
$wp_customize->add_setting( 'simple_days_google_ad_data_ad_slot_infeed_mobile',array(
'default' => '',
'sanitize_callback' => 'wp_strip_all_tags',
));
$wp_customize->add_control('simple_days_google_ad_data_ad_slot_infeed_mobile',array(
'label' => esc_html_x('For Mobile', 'google_ad', 'simple-days').sprintf(esc_html__( 'Your %s ad unit\'s ID(data-ad-slot):', 'simple-days'),esc_html_x('In-feed', 'google_ad', 'simple-days')),
'description' => esc_html__('e.g. ', 'simple-days').esc_html('1234567890'),
'section' => 'simple_days_google_ad_setteing',
'type' => 'text',
));
$wp_customize->add_setting( 'simple_days_google_ad_data_ad_layout_key_infeed_mobile',array(
'default' => '',
'sanitize_callback' => 'wp_strip_all_tags',
));
$wp_customize->add_control('simple_days_google_ad_data_ad_layout_key_infeed_mobile',array(
'label' => esc_html_x('For Mobile', 'google_ad', 'simple-days').sprintf(esc_html__( 'Your %s ad unit\'s layout key(data-ad-layout-key):', 'simple-days'),esc_html_x('In-feed', 'google_ad', 'simple-days')),
'description' => esc_html__('e.g. ', 'simple-days').esc_html('-a0+b1+2c-d3+4e'),
'section' => 'simple_days_google_ad_setteing',
'type' => 'text',
));
$wp_customize->add_setting( 'simple_days_google_ad_inarticle_info', array(
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( new Simple_Days_html_text_Custom_Content( $wp_customize, 'simple_days_google_ad_inarticle_info', array(
'section' => 'simple_days_google_ad_setteing',
'label' => sprintf(esc_html__('%s ad setting', 'simple-days'),esc_html_x('In-article', 'google_ad', 'simple-days')),
//'content' => sprintf(esc_html__('This selection overrides %s.', 'simple-days'),esc_html__( 'Local Fonts Japanese', 'simple-days')),
//'description' => esc_html__( 'Optional: Example Description.', 'simple-days' ),
)));
$wp_customize->add_setting( 'simple_days_google_ad_inarticle',array(
'default' => false,
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( 'simple_days_google_ad_inarticle',array(
'label' => esc_html__( 'Enable', 'simple-days'),
'description' => sprintf(esc_html__('Add Widgets Google AdSense (%s)', 'simple-days'),esc_html_x('In-article', 'google_ad', 'simple-days')),
'section' => 'simple_days_google_ad_setteing',
'type' => 'checkbox',
));
$wp_customize->add_setting( 'simple_days_google_ad_data_ad_slot_inarticle',array(
'default' => '',
'sanitize_callback' => 'wp_strip_all_tags',
));
$wp_customize->add_control('simple_days_google_ad_data_ad_slot_inarticle',array(
'label' => sprintf(esc_html__( 'Your %s ad unit\'s ID(data-ad-slot):', 'simple-days'),esc_html_x('In-article', 'google_ad', 'simple-days')),
'description' => esc_html__('e.g. ', 'simple-days').esc_html('1234567890'),
'section' => 'simple_days_google_ad_setteing',
'type' => 'text',
));
$wp_customize->add_section('simple_days_amp_setting',array(
'title' => esc_html__('AMP(beta Ver.)', 'simple-days'),
'panel' => 'simple_days_setting',
));
$wp_customize->add_setting( 'simple_days_amp',array(
'default' => false,
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( 'simple_days_amp',array(
'label' => esc_html__( 'Enable', 'simple-days'),
'description' => esc_html__('Accelerated Mobile Pages(AMP)', 'simple-days'),
'section' => 'simple_days_amp_setting',
'type' => 'checkbox',
));
$wp_customize->add_setting( 'simple_days_amp_logo_img',array(
'default' => esc_url(get_template_directory_uri() .'/assets/images/amp-logo.png'),
'sanitize_callback' => 'simple_days_sanitize_image_file',
));
$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'simple_days_amp_logo_img', array(
'label' => esc_html__( 'AMP Logo Image', 'simple-days'),
'description' => __( 'AMP Logo use this image.', 'simple-days').'
'.__( 'For more information', 'simple-days').' '.__( 'click here' , 'simple-days').'',
'section' => 'simple_days_amp_setting',
)));
$wp_customize->add_setting( 'simple_days_amp_analytics',array(
'default' => '',
'sanitize_callback' => 'wp_strip_all_tags',
));
$wp_customize->add_control('simple_days_amp_analytics',array(
'label' => esc_html__( 'Google Analytics AMP account', 'simple-days'),
'description' => esc_html__('e.g. ', 'simple-days').esc_html('UA-XXXXXX-Y'),
'section' => 'simple_days_amp_setting',
'type' => 'text',
));
// Add Settings and Controls for OGP.
$wp_customize->add_section('simple_days_ogp_setteing',array(
'title' => esc_html__('OGP', 'simple-days'),
'panel' => 'simple_days_setting',
));
$wp_customize->add_setting( 'simple_days_ogp',array(
'default' => false,
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( 'simple_days_ogp',array(
'label' => esc_html__( 'Enable', 'simple-days'),
'description' => esc_html__('add metadata for Open Graph protocol(OGP)', 'simple-days'),
'section' => 'simple_days_ogp_setteing',
'type' => 'checkbox',
));
$wp_customize->add_setting( 'simple_days_ogp_logo_img',array(
'default' => esc_url(get_template_directory_uri() .'/assets/images/ogp.jpg'),
'sanitize_callback' => 'simple_days_sanitize_image_file',
));
$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'simple_days_ogp_logo_img', array(
'label' => esc_html__( 'OGP Image', 'simple-days'),
'description' => esc_html__( 'If no thumbnail or home page then use this image.', 'simple-days'),
'section' => 'simple_days_ogp_setteing',
)));
$wp_customize->add_setting( 'simple_days_twitter_card', array(
'default' => 'false',
'sanitize_callback' => 'simple_days_sanitize_radio',
)
);
$wp_customize->add_control( 'simple_days_twitter_card', array(
'label' => esc_html__( 'Twitter Card', 'simple-days' ),
'section' => 'simple_days_ogp_setteing',
'type' => 'radio',
'choices' => array(
'false' => esc_html__( 'Disable', 'simple-days' ),
'summary' => esc_html__( 'Summary Card', 'simple-days' ),
'summary_large_image' => esc_html__( 'Summary Card with Large Image', 'simple-days' ),
),
));
// Add Settings and Controls for Sitemap.
$wp_customize->add_section('simple_days_sitemap_setteing',array(
'title' => esc_html__('Site map', 'simple-days'),
'panel' => 'simple_days_setting',
));
$wp_customize->add_setting( 'simple_days_sitemap_page',array(
'default' => false,
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( 'simple_days_sitemap_page',array(
'label' => esc_html__( 'Enable', 'simple-days'),
'description' => esc_html__('Display the site map at the page.', 'simple-days'),
'section' => 'simple_days_sitemap_setteing',
'type' => 'checkbox',
));
$wp_customize->add_setting( 'simple_days_sitemap_page_post_name',array(
'default' => '',
'sanitize_callback' => 'wp_strip_all_tags',
));
$wp_customize->add_control('simple_days_sitemap_page_post_name',array(
'label' => esc_html__( 'Page slug to be display at the page.', 'simple-days'),
'description' => esc_html__('e.g. ', 'simple-days').esc_html('sitemap'),
'section' => 'simple_days_sitemap_setteing',
'type' => 'text',
));
$wp_customize->add_setting( 'simple_days_sitemap_footer',array(
'default' => false,
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( 'simple_days_sitemap_footer',array(
'label' => esc_html__( 'Enable', 'simple-days'),
'description' => esc_html__('Display the site map link at footer area', 'simple-days'),
'section' => 'simple_days_sitemap_setteing',
'type' => 'checkbox',
));
// Add Settings and Controls for Option.
$wp_customize->add_section('simple_days_script_css',array(
'title' => esc_html__('JavaScript and CSS', 'simple-days'),
'panel' => 'simple_days_setting',
));
$wp_customize->add_setting( 'simple_days_inline_style_css',array(
'default' => false,
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( 'simple_days_inline_style_css',array(
'label' => esc_html__( 'Enable', 'simple-days'),
'description' => esc_html__('Style Css inline mode', 'simple-days'),
'section' => 'simple_days_script_css',
'type' => 'checkbox',
));
$wp_customize->add_setting( 'simple_days_script_css_fontawesome_info', array(
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( new Simple_Days_html_text_Custom_Content( $wp_customize, 'simple_days_script_css_fontawesome_info', array(
'section' => 'simple_days_script_css',
'label' => esc_html__( 'use CDN FontAwesome 4', 'simple-days' ),
'content' => esc_html__('Simple Days\'s careful selection of FontAwesome icons to make it smoothly.', 'simple-days').'
'.esc_html__('Therefore, you can not use full icons.', 'simple-days').'
'.esc_html__('If you use CDN FontAwesome, you can use full icons.', 'simple-days').'
'.esc_html__('but to be slowly.', 'simple-days'),
//'description' => esc_html__( 'Optional: Example Description.', 'simple-days' ),
)));
$wp_customize->add_setting( 'simple_days_fontawesome',array(
'default' => false,
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( 'simple_days_fontawesome',array(
'label' => esc_html__( 'Enable', 'simple-days'),
'description' => esc_html__('use CDN FontAwesome 4', 'simple-days'),
'section' => 'simple_days_script_css',
'type' => 'checkbox',
));
$wp_customize->add_setting( 'simple_days_lightbox',array(
'default' => 'false',
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( 'simple_days_lightbox',array(
'label' => esc_html__( 'Lightbox', 'simple-days'),
'section' => 'simple_days_script_css',
'type' => 'radio',
'choices' => array(
'false' => esc_html__( 'Disable', 'simple-days' ),
'lity' => esc_html__( 'Lity', 'simple-days' ),
),
));
$wp_customize->add_setting( 'simple_days_highlight',array(
'default' => false,
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( 'simple_days_highlight',array(
'label' => esc_html__( 'Enable', 'simple-days'),
'description' => esc_html__('use highlight.js', 'simple-days'),
'section' => 'simple_days_script_css',
'type' => 'checkbox',
));
$wp_customize->add_setting( 'simple_days_highlight_styles',array(
'default' => 'default',
'sanitize_callback' => 'simple_days_sanitize_select',
));
$highlight_styles = array(
'default' => 'default',
'agate' => 'agate',
'androidstudio' => 'androidstudio',
'arduino-light' => 'arduino-light',
'arta' => 'arta',
'ascetic' => 'ascetic',
'atelier-cave-dark' => 'atelier-cave-dark',
'atelier-cave-light' => 'atelier-cave-light',
'atelier-dune-dark' => 'atelier-dune-dark',
'atelier-dune-light' => 'atelier-dune-light',
'atelier-estuary-dark' => 'atelier-estuary-dark',
'atelier-estuary-light' => 'atelier-estuary-light',
'atelier-forest-dark' => 'atelier-forest-dark',
'atelier-forest-light' => 'atelier-forest-light',
'atelier-heath-dark' => 'atelier-heath-dark',
'atelier-heath-light' => 'atelier-heath-light',
'atelier-lakeside-dark' => 'atelier-lakeside-dark',
'atelier-lakeside-light' => 'atelier-lakeside-light',
'atelier-plateau-dark' => 'atelier-plateau-dark',
'atelier-plateau-light' => 'atelier-plateau-light',
'atelier-savanna-dark' => 'atelier-savanna-dark',
'atelier-savanna-light' => 'atelier-savanna-light',
'atelier-seaside-dark' => 'atelier-seaside-dark',
'atelier-seaside-light' => 'atelier-seaside-light',
'atelier-sulphurpool-dark' => 'atelier-sulphurpool-dark',
'atelier-sulphurpool-light' => 'atelier-sulphurpool-light',
'atom-one-dark' => 'atom-one-dark',
'atom-one-light' => 'atom-one-light',
'brown-paper' => 'brown-paper',
'codepen-embed' => 'codepen-embed',
'color-brewer' => 'color-brewer',
'darcula' => 'darcula',
'dark' => 'dark',
'darkula' => 'darkula',
'docco' => 'docco',
'dracula' => 'dracula',
'far' => 'far',
'foundation' => 'foundation',
'github' => 'github',
'github-gist' => 'github-gist',
'googlecode' => 'googlecode',
'grayscale' => 'grayscale',
'gruvbox-dark' => 'gruvbox-dark',
'gruvbox-light' => 'gruvbox-light',
'hopscotch' => 'hopscotch',
'hybrid' => 'hybrid',
'idea' => 'idea',
'ir-black' => 'ir-black',
'kimbie.dark' => 'kimbie.dark',
'kimbie.light' => 'kimbie.light',
'magula' => 'magula',
'mono-blue' => 'mono-blue',
'monokai' => 'monokai',
'monokai-sublime' => 'monokai-sublime',
'obsidian' => 'obsidian',
'ocean' => 'ocean',
'paraiso-dark' => 'paraiso-dark',
'paraiso-light' => 'paraiso-light',
'pojoaque' => 'pojoaque',
'purebasic' => 'purebasic',
'qtcreator_dark' => 'qtcreator_dark',
'qtcreator_light' => 'qtcreator_light',
'railscasts' => 'railscasts',
'rainbow' => 'rainbow',
'routeros' => 'routeros',
'school-book' => 'school-book',
'solarized-dark' => 'solarized-dark',
'solarized-light' => 'solarized-light',
'sunburst' => 'sunburst',
'tomorrow' => 'tomorrow',
'tomorrow-night' => 'tomorrow-night',
'tomorrow-night-blue' => 'tomorrow-night-blue',
'tomorrow-night-bright' => 'tomorrow-night-bright',
'tomorrow-night-eighties' => 'tomorrow-night-eighties',
'vs' => 'vs',
'vs2015' => 'vs2015',
'xcode' => 'xcode',
'xt256' => 'xt256',
'zenburn' => 'zenburn',
);
$wp_customize->add_control('simple_days_highlight_styles',array(
'label' => esc_html__( 'Style of highlight.js', 'simple-days'),
'section' => 'simple_days_script_css',
'type' => 'select',
'choices' => $highlight_styles,
));
// Add Settings and Controls for Option.
$wp_customize->add_section('simple_days_word_balloon',array(
'title' => esc_html__('Word Balloon', 'simple-days'),
'panel' => 'simple_days_setting',
));
$wp_customize->add_setting( 'simple_days_page_word_balloon_amp',array(
'default' => false,
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( 'simple_days_page_word_balloon_amp',array(
'label' => esc_html__( 'Enable', 'simple-days'),
'description' => esc_html__('Use word balloon css when AMP', 'simple-days'),
'section' => 'simple_days_word_balloon',
'type' => 'checkbox',
));
/*
$wp_customize->add_setting( 'simple_days_page_word_balloon_install', array(
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( new Simple_Days_html_text_Custom_Content( $wp_customize, 'simple_days_page_word_balloon_install', array(
'section' => 'simple_days_word_balloon',
'label' => esc_html__( 'Install Word Balloon Plugins', 'simple-days' ),
'content' => ''.esc_html__( 'Install Plugins', 'simple-days' ).'',
//'description' => esc_html__( 'Optional: Example Description.', 'simple-days' ),
)));
*/
$wp_customize->add_setting( 'simple_days_page_word_balloon_install', array(
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( new Simple_Days_plugin_install_Custom_Content( $wp_customize, 'simple_days_page_word_balloon_install', array(
'section' => 'simple_days_word_balloon',
'label' => sprintf(esc_html__('Install Plugin [ %s ]', 'simple-days'), esc_html__( 'Word Balloon', 'simple-days')),
'plugin' => array(
'name' => esc_html__('Word Balloon', 'simple-days'),
'dir' => 'word-balloon',
'filename' => 'word_balloon.php',
),
//'description' => esc_html__( 'Optional: Example Description.', 'simple-days' ),
)));
// Add Settings and Controls for Option.
$wp_customize->add_section('simple_days_gutenberg_setting',array(
'title' => esc_html__('Gutenberg', 'simple-days'),
'panel' => 'simple_days_setting',
));
get_template_part( 'inc/gutenberg_block', 'list' );
$gutenberg_block = get_query_var('gutenberg_block_list');
$wp_customize->add_setting( 'simple_days_gutenberg_block_info', array(
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( new Simple_Days_html_text_Custom_Content( $wp_customize, 'simple_days_gutenberg_block_info', array(
'section' => 'simple_days_gutenberg_setting',
'label' => esc_html__( 'Select a block to be displayed', 'simple-days' ),
//'content' => sprintf(esc_html__('This selection overrides %s.', 'simple-days'), esc_html__( 'Google Fonts', 'simple-days')),
//'description' => esc_html__( 'Optional: Example Description.', 'simple-days' ),
)));
foreach ($gutenberg_block['core_list'] as $key => $value) {
$wp_customize->add_setting( 'simple_days_gutenberg_block_'.$key,array(
'default' => true,
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( 'simple_days_gutenberg_block_'.$key,array(
'label' => esc_html($value),
//'description' => esc_html__('Uploaded to this post is always enabled on the Add Media.', 'simple-days'),
'section' => 'simple_days_gutenberg_setting',
'type' => 'checkbox',
));
}
foreach ($gutenberg_block['embed_list'] as $key => $value) {
$wp_customize->add_setting( 'simple_days_gutenberg_block_'.$key,array(
'default' => true,
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( 'simple_days_gutenberg_block_'.$key,array(
'label' => esc_html($value),
//'description' => esc_html__('Uploaded to this post is always enabled on the Add Media.', 'simple-days'),
'section' => 'simple_days_gutenberg_setting',
'type' => 'checkbox',
));
}
// Add Settings and Controls for Option.
$wp_customize->add_section('simple_days_option',array(
'title' => esc_html__('Option', 'simple-days'),
'panel' => 'simple_days_setting',
));
$wp_customize->add_setting( 'simple_days_uploaded_to_this_post',array(
'default' => false,
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( 'simple_days_uploaded_to_this_post',array(
'label' => esc_html__( 'Enable', 'simple-days'),
'description' => esc_html__('Uploaded to this post is always enabled on the Add Media.', 'simple-days'),
'section' => 'simple_days_option',
'type' => 'checkbox',
));
$wp_customize->add_setting( 'simple_days_no_robots',array(
'default' => true,
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( 'simple_days_no_robots',array(
'label' => esc_html__( 'Enable', 'simple-days'),
'description' => esc_html__('Robots do not search for 404 , search , tag , year , month , day page', 'simple-days'),
'section' => 'simple_days_option',
'type' => 'checkbox',
));
$wp_customize->add_setting( 'simple_days_404_img',array(
'default' => esc_url(get_template_directory_uri() .'/assets/images/404.jpg'),
'sanitize_callback' => 'simple_days_sanitize_image_file',
));
$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'simple_days_404_img', array(
'label' => esc_html__( '404 Image', 'simple-days'),
'description' => esc_html__( '404 page use this image.', 'simple-days'),
'section' => 'simple_days_option',
)));
$wp_customize->add_setting( 'simple_days_no_img',array(
'default' => esc_url(get_template_directory_uri() .'/assets/images/no_image.png'),
'sanitize_callback' => 'simple_days_sanitize_image_file',
));
$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'simple_days_no_img', array(
'label' => esc_html__( 'No Image', 'simple-days'),
'description' => esc_html__( 'No thumbnail page use this image.', 'simple-days'),
'section' => 'simple_days_option',
)));
$wp_customize->add_setting( 'simple_days_header_image_text',array(
'default' => '',
'sanitize_callback' => 'wp_strip_all_tags',
));
$wp_customize->add_control('simple_days_header_image_text',array(
'label' => esc_html__( 'Text on Header image', 'simple-days'),
//'description' => esc_html__('e.g. ', 'simple-days').esc_html('1234567890'),
'section' => 'header_image',
'priority' => 0,
'type' => 'text',
));
$wp_customize->add_panel('simple_days_custom_color', array(
'title' => esc_html__('Simple Days Colors', 'simple-days'),
'priority' => 2
));
$wp_customize->add_section('simple_days_custom_color_skin', array(
'title' => esc_html__('Skin', 'simple-days'),
'panel' => 'simple_days_custom_color',
));
$wp_customize->add_setting( 'simple_days_skin_style',array(
'default' => 'none',
'sanitize_callback' => 'simple_days_sanitize_select',
));
$wp_customize->add_control( 'simple_days_skin_style',array(
'label' => esc_html__( 'Skins', 'simple-days'),
'description' => esc_html__('You can easily change color', 'simple-days'),
'section' => 'simple_days_custom_color_skin',
'type' => 'select',
'choices' => array(
'none' => 'none',
'red_orange' => esc_html__('Red Orange', 'simple-days'),
'orange' => esc_html__('Orange', 'simple-days'),
'rose_peche' => esc_html__('Rose Peche', 'simple-days'),
'grape_juice' => esc_html__('Grape Juice', 'simple-days'),
'blue_yellow' => esc_html__('Blue Yellow', 'simple-days'),
'blue_ocean' => esc_html__('Blue Ocean', 'simple-days'),
'petrole' => esc_html__('Petrole', 'simple-days'),
'apple_green' => esc_html__('Apple Green', 'simple-days'),
'moss_green' => esc_html__('Moss Green', 'simple-days'),
'yellow_mustard' => esc_html__('Yellow Mustard', 'simple-days'),
'cinnamon' => esc_html__('Cinnamon', 'simple-days'),
'brown_bread' => esc_html__('Brown Bread', 'simple-days'),
'gray_horse' => esc_html__('Gray Horse', 'simple-days'),
'black_coffee' => esc_html__('Black Coffee', 'simple-days'),
),
));
$wp_customize->add_setting( 'simple_days_skin_style_random',array(
'default' => false,
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control( 'simple_days_skin_style_random',array(
'label' => esc_html__( 'Enable', 'simple-days'),
'description' => esc_html__('Selects skins randomly at access.', 'simple-days'),
'section' => 'simple_days_custom_color_skin',
'type' => 'checkbox',
));
$customize_color_section = array();
$customize_color = array();
$customize_color_slug = 'simple_days_custom_color_whole_site';
//サイト全体
$customize_color_section[] = array(
'slug' => $customize_color_slug,
'title' => esc_html__('Whole site', 'simple-days'),
);
//background Color
$customize_color[$customize_color_slug][] = array(
'slug' => 'simple_days_background_color',
'default' => '',
'label' => esc_html__( 'Background Color', 'simple-days' ),
'description' => esc_html__('default:', 'simple-days').esc_html('#fafafa'),
);
//Link Color
$customize_color[$customize_color_slug][] = array(
'slug' => 'link_textcolor',
'default' => '',
'label' => esc_html__( 'Link Color', 'simple-days' ),
'description' => esc_html__('default:', 'simple-days').esc_html('#07a'),
);
//Link Hover Color
$customize_color[$customize_color_slug][] = array(
'slug' => 'link_hover_color',
'default' => '',
'label' => esc_html__( 'Link Hover Color', 'simple-days' ),
'description' => esc_html__('default:', 'simple-days').esc_html('#222'),
);
$customize_color_slug = 'simple_days_custom_color_header';
//ヘッダー
$customize_color_section[] = array(
'slug' => $customize_color_slug,
'title' => esc_html__('Header', 'simple-days'),
);
//Blog Title Color
$customize_color[$customize_color_slug][] = array(
'slug' => 'blog_name',
'default' => '',
'label' => esc_html__( 'Site Title', 'simple-days' ),
'description' => esc_html__('default:', 'simple-days').esc_html('#07a'),
);
//Blog Header Color
$customize_color[$customize_color_slug][] = array(
'slug' => 'header_color',
'default' => '',
'label' => esc_html__( 'Header background color', 'simple-days' ),
'description' => esc_html__('default:', 'simple-days').esc_html('#fff'),
);
//Blog Header Menu BG Color
$customize_color[$customize_color_slug][] = array(
'slug' => 'header_nav_h2_bg_color',
'default' => '',
'label' => esc_html__( 'Header Menu background color', 'simple-days' ),
'description' => esc_html__('default:', 'simple-days').esc_html('#f1f1f1'),
);
//Blog Footer Color
$customize_color[$customize_color_slug][] = array(
'slug' => 'oh_wrap_bg_color',
'default' => '',
'label' => esc_html__( 'Over Header background color', 'simple-days' ),
'description' => esc_html__('default:', 'simple-days').esc_html('#33363b'),
);
$customize_color_slug = 'simple_days_custom_color_footer';
//フッター
$customize_color_section[] = array(
'slug' => $customize_color_slug,
'title' => esc_html__('Footer', 'simple-days'),
);
//Blog Footer Widget Color
$customize_color[$customize_color_slug][] = array(
'slug' => 'footer_widget_color',
'default' => '',
'label' => esc_html__( 'Footer Widget background area color', 'simple-days' ),
'description' => esc_html__('default:', 'simple-days').esc_html('#474747'),
);
//Footer Widget text color
$customize_color[$customize_color_slug][] = array(
'slug' => 'footer_widget_textcolor',
'default' => '',
'label' => esc_html__( 'Footer Widget text color', 'simple-days' ),
'description' => esc_html__('default:', 'simple-days').esc_html('#d4d4d4'),
);
//Footer Widget Link color
$customize_color[$customize_color_slug][] = array(
'slug' => 'footer_widget_linkcolor',
'default' => '',
'label' => esc_html__( 'Footer Widget link color', 'simple-days' ),
'description' => esc_html__('default:', 'simple-days').esc_html('#fff'),
);
//Footer Menu background color
$customize_color[$customize_color_slug][] = array(
'slug' => 'f_menu_wrap_bg_color',
'default' => '',
'label' => esc_html__( 'Footer Menu background color', 'simple-days' ),
'description' => esc_html__('default:', 'simple-days').esc_html('#f1f1f1'),
);
//Blog Footer Color
$customize_color[$customize_color_slug][] = array(
'slug' => 'footer_color',
'default' => '',
'label' => esc_html__( 'Footer color', 'simple-days' ),
'description' => esc_html__('default:', 'simple-days').esc_html('#33363b'),
);
//to TOP Color
$customize_color[$customize_color_slug][] = array(
'slug' => 'to_top_color',
'default' => '',
'label' => esc_html__( 'to TOP color', 'simple-days' ),
'description' => esc_html__('default:', 'simple-days').esc_html('#777'),
);
//to TOP bg Color
$customize_color[$customize_color_slug][] = array(
'slug' => 'to_top_bg_color',
'default' => '',
'label' => esc_html__( 'to TOP Background color', 'simple-days' ),
'description' => esc_html__('default:', 'simple-days').esc_html('#ccc'),
);
//to TOP Hover Color
$customize_color[$customize_color_slug][] = array(
'slug' => 'to_top_hover_color',
'default' => '',
'label' => esc_html__( 'to TOP Hover color', 'simple-days' ),
'description' => esc_html__('default:', 'simple-days').esc_html('#fff'),
);
//to TOP bg Hover Color
$customize_color[$customize_color_slug][] = array(
'slug' => 'to_top_bg_hover_color',
'default' => '',
'label' => esc_html__( 'to TOP Hover Background color', 'simple-days' ),
'description' => esc_html__('default:', 'simple-days').esc_html('#ccc'),
);
$customize_color_slug = 'simple_days_custom_color_index';
//インデックス
$customize_color_section[] = array(
'slug' => $customize_color_slug,
'title' => esc_html__('Index', 'simple-days'),
);
$customize_color[$customize_color_slug][] = array(
'slug' => 'simple_days_index_date_text_color',
'default' => '',
'label' => esc_html__( 'Text Color of Date', 'simple-days' ),
'description' => '',
);
$customize_color[$customize_color_slug][] = array(
'slug' => 'simple_days_index_date_bg_color',
'default' => '',
'label' => esc_html__( 'Background Color of Date', 'simple-days' ),
'description' => '',
);
$customize_color[$customize_color_slug][] = array(
'slug' => 'simple_days_index_date_separator_color',
'default' => '',
'label' => esc_html__( 'Separator Color of Date', 'simple-days' ),
'description' => '',
);
$customize_color[$customize_color_slug][] = array(
'slug' => 'simple_days_index_category_text_color',
'default' => '',
'label' => esc_html__( 'Text Color of Category', 'simple-days' ),
'description' => '',
);
$customize_color[$customize_color_slug][] = array(
'slug' => 'simple_days_index_category_border_color',
'default' => '',
'label' => esc_html__( 'Border Color of Category', 'simple-days' ),
'description' => '',
);
$customize_color[$customize_color_slug][] = array(
'slug' => 'simple_days_index_category_bg_color',
'default' => '',
'label' => esc_html__( 'Background Color of Category', 'simple-days' ),
'description' => '',
);
$customize_color[$customize_color_slug][] = array(
'slug' => 'simple_days_index_category_text_hover_color',
'default' => '',
'label' => esc_html__( 'Text Hover Color of Category', 'simple-days' ),
'description' => '',
);
$customize_color[$customize_color_slug][] = array(
'slug' => 'simple_days_index_category_border_hover_color',
'default' => '',
'label' => esc_html__( 'Border Hover Color of Category', 'simple-days' ),
'description' => '',
);
$customize_color[$customize_color_slug][] = array(
'slug' => 'simple_days_index_category_bg_hover_color',
'default' => '',
'label' => esc_html__( 'Background Hover Color of Category', 'simple-days' ),
'description' => '',
);
$customize_color[$customize_color_slug][] = array(
'slug' => 'simple_days_index_read_more_text_color',
'default' => '',
'label' => esc_html__( 'Text Color of Read More', 'simple-days' ),
'description' => '',
);
$customize_color[$customize_color_slug][] = array(
'slug' => 'simple_days_index_read_more_border_color',
'default' => '',
'label' => esc_html__( 'Border Color of Read More', 'simple-days' ),
'description' => '',
);
$customize_color[$customize_color_slug][] = array(
'slug' => 'simple_days_index_read_more_bg_color',
'default' => '',
'label' => esc_html__( 'Background Color of Read More', 'simple-days' ),
'description' => '',
);
$customize_color[$customize_color_slug][] = array(
'slug' => 'simple_days_index_read_more_text_hover_color',
'default' => '',
'label' => esc_html__( 'Text Hover Color of Read More', 'simple-days' ),
'description' => '',
);
$customize_color[$customize_color_slug][] = array(
'slug' => 'simple_days_index_read_more_border_hover_color',
'default' => '',
'label' => esc_html__( 'Border Hover Color of Read More', 'simple-days' ),
'description' => '',
);
$customize_color[$customize_color_slug][] = array(
'slug' => 'simple_days_index_read_more_bg_hover_color',
'default' => '',
'label' => esc_html__( 'Background Hover Color of Read More', 'simple-days' ),
'description' => '',
);
foreach( $customize_color_section as $section_value ) {
$wp_customize->add_section($section_value['slug'], array(
'title' => $section_value['title'],
'panel' => 'simple_days_custom_color',
));
foreach( $customize_color[$section_value['slug']] as $setting_value ) {
$wp_customize->add_setting( $setting_value['slug'],array(
'default' => $setting_value['default'],
'sanitize_callback' => 'sanitize_hex_color',
'transport' => 'postMessage',
));
$wp_customize->add_control( new WP_Customize_Color_Control($wp_customize,
$setting_value['slug'],array(
'label' => $setting_value['label'],
'description' => $setting_value['description'],
'section' => $section_value['slug'],
)));
}
}
/*if ( isset( $wp_customize->selective_refresh ) ) {
$wp_customize->selective_refresh->add_partial( 'blogname', array(
'selector' => '.site_title a',
// PHP 5.2 or earlier 'render_callback' => function() { bloginfo( 'name' ); },
'render_callback' => 'simple_days_customize_partial_blogname',
) );
}*/
$wp_customize->get_setting( 'blogname' )->transport = 'postMessage';
$wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage';
}// end of public static function register
function simple_days_customize_partial_blogname() {
bloginfo( 'name' );
}
public static function live_preview() {
wp_enqueue_script(
'simple_days_customizer_script', // Give the script a unique ID
get_template_directory_uri() . '/assets/js/customizer/customizer.min.js', // Define the path to the JS file
array( 'jquery', 'customize-preview' ), // Define dependencies
null, // Define a version (optional)
true // Specify whether to put in footer (leave this true)
);
}
public static function Simple_Days_preview_style() {
get_template_part( 'inc/preview_style');
}//end of public static function header_output
public static function Simple_Days_build_css() {
get_template_part( 'inc/build_style');
}
public static function simple_days_customizer_print_scripts_styles() {
get_template_part('inc/customizer-script');
}
}//end of Simple_Days_Customize
// Setup the Theme Customizer settings and controls...
add_action( 'customize_register' , array( 'Simple_Days_Customize' , 'register' ) );
// Output custom CSS to live site
if ( is_customize_preview() ) {
add_action( 'wp_head' , array( 'Simple_Days_Customize' , 'Simple_Days_preview_style' ) );
add_action( 'wp_footer', array( 'Simple_Days_Customize' , 'simple_days_customizer_print_scripts_styles' ) ,999999999999999 );
}
// 即時反映用の JavaScript をエンキューします。
add_action( 'customize_preview_init' , array( 'Simple_Days_Customize' , 'live_preview' ) );
//CSS Save
add_action( 'customize_save_after', array( 'Simple_Days_Customize' , 'Simple_Days_build_css' ) );
if ( class_exists( 'WP_Customize_Control' ) ) {
class Simple_Days_Posts_Sortable_Custom_Control extends WP_Customize_Control {
public $type = 'simple_days_posts_sortable';
public function enqueue() {
wp_register_script(
'simple_days_sortable',
get_template_directory_uri() . '/assets/js/customizer/sortable.min.js',
array( 'jquery', 'customize-base', 'jquery-ui-core', 'jquery-ui-sortable' ),
'',
true
);
wp_enqueue_script( 'simple_days_sortable' );
}
public function render_content() {
$sort_order_list =array(
'breadcrumbs','title','date','author','pv','thumbnail','content','widget','page_link','cta','share','author_profile','related','category','tag','pagenation','comment'
);
$sortable = $this->choices;
if(count($sort_order_list) != count($this->choices)){
$sortable = $sortable + array_diff($sort_order_list,$this->choices);
}
echo ''.esc_html($this->label).'';
echo ''.esc_html($this->description).'';
echo '