term_id] = $teh_cats[$i]->name; else $count++; } return $results; } add_action( 'customize_register', 'themename_customize_register' ); function themename_customize_register($wp_customize) { if ( class_exists( 'WP_Customize_Control' ) && ! class_exists( 'Cleanblog_Customize_Misc_Control' ) ) : class Cleanblog_Customize_Misc_Control extends WP_Customize_Control { public $settings = 'blogname'; public $description = ''; public function render_content() { switch ( $this->type ) { default: case 'desc' : echo '

' . $this->description . '

'; break; case 'heading': echo '' . esc_html( $this->label ) . ''; break; case 'title': echo '' . esc_html( $this->label ) . ''; break; case 'line' : echo '
'; break; case 'textdesc' : ?>add_section( 'cleanblog_social_section', array( 'title' => __( 'Social Links', 'cleanblogg' ), 'priority' => 36, ) ); //Section Top Message $wp_customize->add_control( new Cleanblog_Customize_Misc_Control($wp_customize,'social_message', array( 'section' => 'cleanblog_social_section', 'description' => __( 'Set the URLs for your social media profiles here to be used in the Header and Footer. Keep the fields empty if you don\'t use.', 'cleanblogg' ), 'type' => 'desc', 'priority' => 1, ))); //Section Top Message End // Show social icons in Header $wp_customize->add_setting( 'cleanblog_social_in_header', array( 'default' => 'show', 'sanitize_callback' => 'cleanblogg_sanitize_value', 'transport' => 'refresh') ); $wp_customize->add_control( 'cleanblog_social_in_header', array( 'label' => __('Show/Hide Header Social Icons', 'cleanblogg'), 'section' => 'cleanblog_social_section', 'settings' => 'cleanblog_social_in_header', 'type' => 'radio', 'choices' => array( 'show' => 'Show', 'hide' => 'Hide', ), 'priority' => 2 ) ); // Show social icons in Footer $wp_customize->add_setting( 'cleanblog_social_in_footer', array( 'default' => 'show', 'sanitize_callback' => 'cleanblogg_sanitize_value', 'transport' => 'refresh', ) ); $wp_customize->add_control( 'cleanblog_social_in_footer', array( 'label' => __('Show/Hide Footer Social Icons', 'cleanblogg'), 'section' => 'cleanblog_social_section', 'settings' => 'cleanblog_social_in_footer', 'type' => 'radio', 'choices' => array( 'show' => 'Show', 'hide' => 'Hide', ), 'priority' => 3 ) ); // Email $wp_customize->add_setting( 'cleanblog_social_email', array( 'default' => '', 'sanitize_callback' => 'cleanblogg_sanitize_value', 'transport' => 'refresh', ) ); $wp_customize->add_control( 'cleanblog_social_email', array( 'label' => __( 'Email', 'cleanblogg' ), 'section' => 'cleanblog_social_section', 'type' => 'text', 'priority' => 4 ) ); // Facebook $wp_customize->add_setting( 'cleanblog_fb', array( 'default' => '', 'sanitize_callback' => 'esc_url_raw', 'transport' => 'refresh', ) ); $wp_customize->add_control( 'cleanblog_fb', array( 'label' => __( 'Facebook', 'cleanblogg' ), 'section' => 'cleanblog_social_section', 'type' => 'text', 'priority' => 5 ) ); // Twitter $wp_customize->add_setting( 'cleanblog_twitter', array( 'default' => '', 'sanitize_callback' => 'esc_url_raw', 'transport' => 'refresh', ) ); $wp_customize->add_control( 'cleanblog_twitter', array( 'label' => __( 'Twitter', 'cleanblogg' ), 'section' => 'cleanblog_social_section', 'type' => 'text', 'priority' => 6 ) ); // Google Plus $wp_customize->add_setting( 'cleanblog_googleplus', array( 'default' => '', 'sanitize_callback' => 'esc_url_raw', 'transport' => 'refresh', ) ); $wp_customize->add_control( 'cleanblog_googleplus', array( 'label' => __( 'Google +', 'cleanblogg' ), 'section' => 'cleanblog_social_section', 'type' => 'text', 'priority' => 7 ) ); // Instagram $wp_customize->add_setting( 'cleanblog_instagram', array( 'default' => '', 'sanitize_callback' => 'esc_url_raw', 'transport' => 'refresh', ) ); $wp_customize->add_control( 'cleanblog_instagram', array( 'label' => __( 'Instagram', 'cleanblogg' ), 'section' => 'cleanblog_social_section', 'type' => 'text', 'priority' => 8 ) ); // Pinterest $wp_customize->add_setting( 'cleanblog_pinterest', array( 'default' => '', 'sanitize_callback' => 'esc_url_raw', 'transport' => 'refresh', ) ); $wp_customize->add_control( 'cleanblog_pinterest', array( 'label' => __( 'Pinterest', 'cleanblogg' ), 'section' => 'cleanblog_social_section', 'type' => 'text', 'priority' => 9 ) ); // LinkedIn $wp_customize->add_setting( 'cleanblog_linkedin', array( 'default' => '', 'sanitize_callback' => 'esc_url_raw', 'transport' => 'refresh', ) ); $wp_customize->add_control( 'cleanblog_linkedin', array( 'label' => __( 'LinkedIn', 'cleanblogg' ), 'section' => 'cleanblog_social_section', 'type' => 'text', 'priority' => 10 ) ); // Tumblr $wp_customize->add_setting( 'cleanblog_tumblr', array( 'default' => '', 'sanitize_callback' => 'esc_url_raw', 'transport' => 'refresh', ) ); $wp_customize->add_control( 'cleanblog_tumblr', array( 'label' => __( 'Tumblr', 'cleanblogg' ), 'section' => 'cleanblog_social_section', 'type' => 'text', 'priority' => 11 ) ); // Flickr $wp_customize->add_setting( 'cleanblog_flickr', array( 'default' => '', 'sanitize_callback' => 'esc_url_raw', 'transport' => 'refresh', ) ); $wp_customize->add_control( 'cleanblog_flickr', array( 'label' => __( 'Flickr', 'cleanblogg' ), 'section' => 'cleanblog_social_section', 'type' => 'text', 'priority' => 12 ) ); // Reddit $wp_customize->add_setting( 'cleanblog_reddit', array( 'default' => '', 'sanitize_callback' => 'esc_url_raw', 'transport' => 'refresh', ) ); $wp_customize->add_control( 'cleanblog_reddit', array( 'label' => __( 'Reddit', 'cleanblogg' ), 'section' => 'cleanblog_social_section', 'type' => 'text', 'priority' => 13 ) ); // Youtube $wp_customize->add_setting( 'cleanblog_youtube', array( 'default' => '', 'sanitize_callback' => 'esc_url_raw', 'transport' => 'refresh', ) ); $wp_customize->add_control( 'cleanblog_youtube', array( 'label' => __( 'Youtube', 'cleanblogg' ), 'section' => 'cleanblog_social_section', 'type' => 'text', 'priority' => 14 ) ); // Vimeo $wp_customize->add_setting( 'cleanblog_vimeo', array( 'default' => '', 'sanitize_callback' => 'esc_url_raw', 'transport' => 'refresh', ) ); $wp_customize->add_control( 'cleanblog_vimeo', array( 'label' => __( 'Vimeo', 'cleanblogg' ), 'section' => 'cleanblog_social_section', 'type' => 'text', 'priority' => 15 ) ); // RSS $wp_customize->add_setting( 'cleanblog_rss', array( 'default' =>'' , 'sanitize_callback' => 'esc_url_raw', 'transport' => 'refresh', ) ); $wp_customize->add_control( 'cleanblog_rss', array( 'label' => __( 'RSS Feed', 'cleanblogg' ), 'section' => 'cleanblog_social_section', 'type' => 'text', 'priority' => 16 ) ); //## Header Section $wp_customize->add_section( 'cleanblog_header_section', array( 'title' => __( 'Header', 'cleanblogg' ), 'priority' => 34, ) ); //Section Top Message $wp_customize->add_control( new Cleanblog_Customize_Misc_Control($wp_customize,'header_message', array( 'section' => 'cleanblog_header_section', 'description' => __( 'Manage elements of header', 'cleanblogg' ), 'type' => 'desc', 'priority' => 1, ))); //Section Top Message End // Logo $wp_customize->add_setting( 'cleanblog_logo', array( 'default' => '', 'sanitize_callback' => 'esc_url_raw', 'transport' => 'refresh', ) ); $wp_customize->add_control( new WP_Customize_Upload_Control( $wp_customize, 'cleanblog_logo', array( 'label' => __( 'Upload Logo', 'cleanblogg' ), 'section' => 'cleanblog_header_section', 'settings' => 'cleanblog_logo', 'priority' => 1 ) ) ); // Logo Width $wp_customize->add_setting( 'cleanblog_logo_width', array( 'default' =>'250', 'sanitize_callback' => 'sanitize_text_field', 'transport' => 'refresh', ) ); $wp_customize->add_control( 'cleanblog_logo_width', array( 'label' => __( 'Logo Width (px)', 'cleanblogg' ), 'section' => 'cleanblog_header_section', 'type' => 'text', 'priority' => 2 ) ); // Logo Top Margin $wp_customize->add_setting( 'cleanblog_logo_top', array( 'default' =>'50', 'sanitize_callback' => 'sanitize_text_field', 'transport' => 'refresh', ) ); $wp_customize->add_control( 'cleanblog_logo_top', array( 'label' => __( 'Logo Top Margin (px)', 'cleanblogg' ), 'section' => 'cleanblog_header_section', 'type' => 'text', 'priority' => 3 ) ); // Logo Bottom Margin $wp_customize->add_setting( 'cleanblog_logo_bottom', array( 'default' =>'50', 'sanitize_callback' => 'sanitize_text_field', 'transport' => 'refresh', ) ); $wp_customize->add_control( 'cleanblog_logo_bottom', array( 'label' => __( 'Logo Bottom Margin (px)', 'cleanblogg' ), 'section' => 'cleanblog_header_section', 'type' => 'text', 'priority' => 4 ) ); // Margin Between Logo and Tagline $wp_customize->add_setting( 'cleanblog_tagline_margin', array( 'default' =>'5', 'sanitize_callback' => 'sanitize_text_field', 'transport' => 'refresh', ) ); $wp_customize->add_control( 'cleanblog_tagline_margin', array( 'label' => __( 'Margin Between Logo and Tagline (px)', 'cleanblogg' ), 'section' => 'cleanblog_header_section', 'type' => 'text', 'priority' => 5 ) ); // Show Tagline $wp_customize->add_setting( 'cleanblog_show_tagline', array( 'default' => 'show', 'sanitize_callback' => 'cleanblogg_sanitize_value', 'transport' => 'refresh', ) ); $wp_customize->add_control( 'cleanblog_show_tagline', array( 'label' => __('Show/Hide Tagline', 'cleanblogg'), 'section' => 'cleanblog_header_section', 'settings' => 'cleanblog_show_tagline', 'type' => 'radio', 'choices' => array( 'show' => 'Show', 'hide' => 'Hide', ), 'priority' => 6 ) ); // Show Search $wp_customize->add_setting( 'cleanblog_show_search', array( 'default' => 'show', 'sanitize_callback' => 'cleanblogg_sanitize_value', 'transport' => 'refresh', ) ); $wp_customize->add_control( 'cleanblog_show_search', array( 'label' => __('Show/Hide Search Form', 'cleanblogg'), 'section' => 'cleanblog_header_section', 'settings' => 'cleanblog_show_search', 'type' => 'radio', 'choices' => array( 'show' => 'Show', 'hide' => 'Hide', ), 'priority' => 7 ) ); // Stick Topbar $wp_customize->add_setting( 'cleanblog_sticky_topbar', array( 'default' => 'off', 'sanitize_callback' => 'cleanblogg_sanitize_value', 'transport' => 'refresh', ) ); $wp_customize->add_control( 'cleanblog_sticky_topbar', array( 'label' => __('On/Off Sticky Top Bar', 'cleanblogg'), 'section' => 'cleanblog_header_section', 'settings' => 'cleanblog_sticky_topbar', 'type' => 'radio', 'choices' => array( 'on' => 'On', 'off' => 'Off', ), 'priority' => 8 ) ); //## Footer Section $wp_customize->add_section( 'cleanblog_footer_section', array( 'title' => __( 'Footer', 'cleanblogg' ), 'priority' => 36, ) ); //Section Top Message $wp_customize->add_control( new Cleanblog_Customize_Misc_Control($wp_customize,'footer_message', array( 'section' => 'cleanblog_footer_section', 'description' => __( 'Adjust your site footer setting and widget areas to the specific number desired and turning on or off various parts as needed.', 'cleanblogg' ), 'type' => 'desc', 'priority' => 1, ))); //Section Top Message End //Footer widgets $wp_customize->add_setting( 'cleanblog_footer_widgets_show', array( 'default' => 'none', 'sanitize_callback' => 'cleanblogg_sanitize_value', 'transport' => 'refresh', ) ); $wp_customize->add_control( 'cleanblog_footer_widgets_show', array( 'label' => __('Footer Widgets', 'cleanblogg'), 'section' => 'cleanblog_footer_section', 'settings' => 'cleanblog_footer_widgets_show', 'type' => 'radio', 'choices' => array( 'none' => 'None (Disables Footer Widgets)', 'one' => 'One', 'two' => 'Two', 'three' => 'Three', ), 'priority' =>2 ) ); //Footer socket Show/Hide $wp_customize->add_setting( 'cleanblog_footer_socket', array( 'default' => 'show', 'sanitize_callback' => 'cleanblogg_sanitize_value', 'transport' => 'refresh', ) ); $wp_customize->add_control( 'cleanblog_footer_socket', array( 'label' => __('Show/Hide Footer Socket', 'cleanblogg'), 'section' => 'cleanblog_footer_section', 'settings' => 'cleanblog_footer_socket', 'type' => 'radio', 'choices' => array( 'show' => 'Show', 'hide' => 'Hide', ), 'priority' =>3 ) ); //Footer copyright Show/Hide $wp_customize->add_setting( 'cleanblog_footer_copyright_show', array( 'default' => 'show', 'sanitize_callback' => 'cleanblogg_sanitize_value', 'transport' => 'refresh', ) ); $wp_customize->add_control( 'cleanblog_footer_copyright_show', array( 'label' => __('Show/Hide Footer Copyright', 'cleanblogg'), 'section' => 'cleanblog_footer_section', 'settings' => 'cleanblog_footer_copyright_show', 'type' => 'radio', 'choices' => array( 'show' => 'Show', 'hide' => 'Hide', ), 'priority' =>4 ) ); /* */ //Footer copyright Text $wp_customize->add_setting( 'cleanblog_footer_copyright', array( 'default' => sprintf( __( 'Copyright 2015 CleanBlog | Theme by %s', 'cleanblogg' ), 'AirThemes' ), 'sanitize_callback' => 'balanceTags', 'transport' => 'refresh', ) ); $wp_customize->add_control( 'cleanblog_footer_copyright', array( 'label' => __( 'Copyright Content', 'cleanblogg' ), 'section' => 'cleanblog_footer_section', 'type' => 'textarea', 'priority' => 5 ) ); //## Slider Section $wp_customize->add_section( 'cleanblog_slider_section', array( 'title' => __( 'Slider', 'cleanblogg' ), 'priority' => 35, ) ); //Section Top Message $wp_customize->add_control( new Cleanblog_Customize_Misc_Control($wp_customize,'slider_message', array( 'section' => 'cleanblog_slider_section', 'description' => __( 'Adjust your slider settings and customize slider posts .', 'cleanblogg' ), 'type' => 'desc', 'priority' => 1, ))); //Section Top Message End //Slider Type $wp_customize->add_setting( 'cleanblog_slider_type', array( 'default' => 'default', 'sanitize_callback' => 'cleanblogg_sanitize_value', 'transport' => 'refresh', ) ); $wp_customize->add_control( 'cleanblog_slider_type', array( 'label' => __('Home Slider Type', 'cleanblogg'), 'section' => 'cleanblog_slider_section', 'settings' => 'cleanblog_slider_type', 'type' => 'select', 'choices' => array( 'default' => 'Default Slider (Single Image)', 'modern_carousel' => 'Modern Carousel (3 Images)', 'carousel' => 'Carousel Slider (3 Images)', 'carousel2' => 'Carousel Slider (2 Images)', ), 'priority' => 2 ) ); //Slider Show/Hide $wp_customize->add_setting( 'cleanblog_slider_show', array( 'default' => 'show', 'sanitize_callback' => 'cleanblogg_sanitize_value', 'transport' => 'refresh', ) ); $wp_customize->add_control( 'cleanblog_slider_show', array( 'label' => __('Show/Hide Slider', 'cleanblogg'), 'section' => 'cleanblog_slider_section', 'settings' => 'cleanblog_slider_show', 'type' => 'radio', 'choices' => array( 'show' => 'Show', 'hide' => 'Hide', ), 'priority' => 3 ) ); //Slider Posts $wp_customize->add_setting( 'cleanblog_slider_posts', array( 'default' => 'ASC', 'sanitize_callback' => 'cleanblogg_sanitize_value', 'transport' => 'refresh', ) ); $wp_customize->add_control( 'cleanblog_slider_posts', array( 'label' => __('Slider Posts', 'cleanblogg'), 'section' => 'cleanblog_slider_section', 'settings' => 'cleanblog_slider_posts', 'type' => 'radio', 'choices' => array( 'ASC' => 'Recent Posts', 'comment_count' => 'Popular Posts', 'rand' => 'Random Posts', 'custom' => 'Custom (Add Posts by IDs)', ), 'priority' => 4 ) ); //Slider Categories $wp_customize->add_setting( 'cleanblog_slider_category', array( 'default' => '0', 'sanitize_callback' => 'cleanblogg_sanitize_value', 'transport' => 'refresh', ) ); $wp_customize->add_control( 'cleanblog_slider_category', array( 'label' => __('Slider Category', 'cleanblogg'), 'section' => 'cleanblog_slider_section', 'settings' => 'cleanblog_slider_category', 'type' => 'select', 'choices' => get_categories_select(), 'priority' => 5 ) ); // Slider Number of Posts $wp_customize->add_setting( 'cleanblog_slider_posts_num', array( 'default' => '10', 'sanitize_callback' => 'sanitize_text_field', 'transport' => 'refresh', ) ); $wp_customize->add_control( new Cleanblog_Customize_Misc_Control($wp_customize,'cleanblog_slider_posts_num', array( 'label' => __('Number of Posts', 'cleanblogg'), 'section' => 'cleanblog_slider_section', 'settings' => 'cleanblog_slider_posts_num', 'type' => 'textdesc', 'description' => 'Enter number of posts do you want show in the slider. Show all posts enter value "-1" ', 'priority' => 6, ))); // Slider Custom Posts id $wp_customize->add_setting( 'cleanblog_slider_custom_id', array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field', 'transport' => 'refresh', ) ); $wp_customize->add_control( new Cleanblog_Customize_Misc_Control($wp_customize,'cleanblog_slider_custom_id', array( 'label' => __('Posts IDs', 'cleanblogg'), 'section' => 'cleanblog_slider_section', 'settings' => 'cleanblog_slider_custom_id', 'type' => 'textdesc', 'description' => 'Add your own posts Ids separated by comma. Ex: 8,12,17,25', 'priority' => 7, ))); //Slider Automatically Transition $wp_customize->add_setting( 'cleanblog_slider_auto', array( 'default' => true, 'sanitize_callback' => 'cleanblogg_sanitize_value', 'transport' => 'refresh', ) ); $wp_customize->add_control( 'cleanblog_slider_auto', array( 'label' => __('Automatically Transition', 'cleanblogg'), 'section' => 'cleanblog_slider_section', 'settings' => 'cleanblog_slider_auto', 'type' => 'radio', 'choices' => array( true => 'Yes', false => 'No', ), 'priority' => 8 ) ); //Slider Transition Mode $wp_customize->add_setting( 'cleanblog_slider_mode', array( 'default' => 'horizontal', 'sanitize_callback' => 'cleanblogg_sanitize_value', 'transport' => 'refresh', ) ); $wp_customize->add_control( 'cleanblog_slider_mode', array( 'label' => __('Transition Mode', 'cleanblogg'), 'section' => 'cleanblog_slider_section', 'settings' => 'cleanblog_slider_mode', 'type' => 'radio', 'choices' => array( 'horizontal' => 'Slide', 'fade' => 'Fade', ), 'priority' => 9 ) ); //Slider Controls $wp_customize->add_setting( 'cleanblog_slider_controls', array( 'default' => true, 'sanitize_callback' => 'cleanblogg_sanitize_value', 'transport' => 'refresh', ) ); $wp_customize->add_control( 'cleanblog_slider_controls', array( 'label' => __('Show/Hide Slider Controls', 'cleanblogg'), 'section' => 'cleanblog_slider_section', 'settings' => 'cleanblog_slider_controls', 'type' => 'radio', 'choices' => array( true => 'Show', false => 'Hide', ), 'priority' => 10 ) ); //Slider Speed $wp_customize->add_setting( 'cleanblog_slider_speed', array( 'default' => '1000', 'sanitize_callback' => 'sanitize_text_field', 'transport' => 'refresh', ) ); $wp_customize->add_control( 'cleanblog_slider_speed', array( 'label' => __( 'Transition Speed (ms)', 'cleanblogg' ), 'section' => 'cleanblog_slider_section', 'type' => 'text', 'priority' => 11 ) ); //Slider Pause $wp_customize->add_setting( 'cleanblog_slider_pause', array( 'default' => '5000', 'sanitize_callback' => 'sanitize_text_field', 'transport' => 'refresh', ) ); $wp_customize->add_control( 'cleanblog_slider_pause', array( 'label' => __( 'Pause Time (ms)', 'cleanblogg' ), 'section' => 'cleanblog_slider_section', 'type' => 'text', 'priority' => 12 ) ); //## Layout Section $wp_customize->add_section( 'cleanblog_layout_section', array( 'title' => __( 'Layout', 'cleanblogg' ), 'priority' => 35, ) ); //Section Top Message $wp_customize->add_control( new Cleanblog_Customize_Misc_Control($wp_customize,'layout_message', array( 'section' => 'cleanblog_layout_section', 'description' => __( 'Select your site\'s layout options here and manage blog listing layouts', 'cleanblogg' ), 'type' => 'desc', 'priority' => 1, ))); //Section Top Message End //Layout Type $wp_customize->add_setting( 'cleanblog_content_layout_type', array( 'default' => 'wide-layout', 'sanitize_callback' => 'cleanblogg_sanitize_value', 'transport' => 'refresh', ) ); $wp_customize->add_control( 'cleanblog_content_layout_type', array( 'label' => __('Layout Type', 'cleanblogg'), 'section' => 'cleanblog_layout_section', 'settings' => 'cleanblog_content_layout_type', 'type' => 'radio', 'choices' => array( 'wide-layout' => 'Wide Layout', 'box-layout' => 'Box Layout', ), 'priority' =>2 ) ); //Layout $wp_customize->add_setting( 'cleanblog_content_layout', array( 'default' => 'right', 'sanitize_callback' => 'cleanblogg_sanitize_value', 'transport' => 'refresh', ) ); $wp_customize->add_control( 'cleanblog_content_layout', array( 'label' => __('Default Layout', 'cleanblogg'), 'section' => 'cleanblog_layout_section', 'settings' => 'cleanblog_content_layout', 'type' => 'radio', 'choices' => array( 'right' => 'Content Left, Sidebar Right', 'left' => 'Sidebar Left, Content Right', 'full' => 'Fullwidth', ), 'priority' =>3 ) ); //Home Layout $wp_customize->add_setting( 'cleanblog_home_layout', array( 'default' => 'default', 'sanitize_callback' => 'cleanblogg_sanitize_value', 'transport' => 'refresh', ) ); $wp_customize->add_control( 'cleanblog_home_layout', array( 'label' => __('Home Page Layout', 'cleanblogg'), 'section' => 'cleanblog_layout_section', 'settings' => 'cleanblog_home_layout', 'type' => 'radio', 'choices' => array( 'default' => 'Default', 'right' => 'Content Left, Sidebar Right', 'left' => 'Sidebar Left, Content Right', 'full' => 'Fullwidth', ), 'priority' =>4 ) ); //Single Post Layout $wp_customize->add_setting( 'cleanblog_single_post_layout', array( 'default' => 'default', 'sanitize_callback' => 'cleanblogg_sanitize_value', 'transport' => 'refresh', ) ); $wp_customize->add_control( 'cleanblog_single_post_layout', array( 'label' => __('Single Post Layout', 'cleanblogg'), 'section' => 'cleanblog_layout_section', 'settings' => 'cleanblog_single_post_layout', 'type' => 'radio', 'choices' => array( 'default' => 'Default', 'right' => 'Content Left, Sidebar Right', 'left' => 'Sidebar Left, Content Right', 'full' => 'Fullwidth', ), 'priority' =>5 ) ); // Content Width $wp_customize->add_setting( 'cleanblog_content_width', array( 'default' => '1100', 'sanitize_callback' => 'sanitize_text_field', 'transport' => 'refresh', ) ); $wp_customize->add_control( 'cleanblog_content_width', array( 'type' => 'number', 'priority' => 5, 'section' => 'cleanblog_layout_section', 'settings' => 'cleanblog_content_width', 'label' => __('Content Width (px)','cleanblogg'), 'description' => __('Enter value between 800px and 1200px','cleanblogg'), 'input_attrs' => array( 'min' => 800, 'max' => 1200, 'step' => 10, 'value' => 1100, ), ) ); //## Blog Section $wp_customize->add_section( 'cleanblog_blog_section', array( 'title' => __( 'Blog', 'cleanblogg' ), 'priority' => 38, ) ); //Section Top Message $wp_customize->add_control( new Cleanblog_Customize_Misc_Control($wp_customize,'blog_message', array( 'section' => 'cleanblog_blog_section', 'description' => __( 'Adjust the style and layout of your blog using the settings below. This will affect the posts index page and archive or search results pages of your blog. ', 'cleanblogg' ), 'type' => 'desc', 'priority' => 1, ))); //Section Top Message End //Blog Default Style $wp_customize->add_setting( 'cleanblog_content_style', array( 'default' => 'grid', 'sanitize_callback' => 'cleanblogg_sanitize_value', 'transport' => 'refresh', ) ); $wp_customize->add_control( 'cleanblog_content_style', array( 'label' => __('Blog Default Style', 'cleanblogg'), 'section' => 'cleanblog_blog_section', 'settings' => 'cleanblog_content_style', 'type' => 'radio', 'choices' => array( 'standard' => 'Standard Layout', 'list' => 'List Layout', 'grid' => 'Grid Layout', ), 'priority' =>2 ) ); //Blog Archive Style $wp_customize->add_setting( 'cleanblog_archive_style', array( 'default' => 'grid', 'sanitize_callback' => 'cleanblogg_sanitize_value', 'transport' => 'refresh', ) ); $wp_customize->add_control( 'cleanblog_archive_style', array( 'label' => __('Blog Archive Style', 'cleanblogg'), 'section' => 'cleanblog_blog_section', 'settings' => 'cleanblog_archive_style', 'type' => 'radio', 'choices' => array( 'standard' => __('Standard Layout', 'cleanblogg'), 'list' => __('List Layout', 'cleanblogg'), 'grid' => __('Grid Layout', 'cleanblogg'), ), 'priority' =>3 ) ); $wp_customize->add_control( new Cleanblog_Customize_Misc_Control($wp_customize,'blog_list_title', array( 'section' => 'cleanblog_blog_section', 'label' => __( 'Show/Hide Elements in Posts List', 'cleanblogg' ), 'type' => 'title', 'priority' => 4, ))); // Standerd Featured Image $wp_customize->add_setting('cleanblog_list_featured_image_show', array( 'transport' => 'refresh', 'sanitize_callback' => 'cleanblogg_sanitize_value', 'default' => '1' )); $wp_customize->add_control( new WP_Customize_Control( $wp_customize,'cleanblog_list_featured_image_show',array( 'label' => __('Featured Image','cleanblogg'), 'section' => 'cleanblog_blog_section', 'settings' => 'cleanblog_list_featured_image_show', 'type' => 'checkbox', 'priority' => 6, ) ) ); // Standerd Category $wp_customize->add_setting('cleanblog_list_category_show', array( 'transport' => 'refresh', 'sanitize_callback' => 'cleanblogg_sanitize_value', 'default' => '1' )); $wp_customize->add_control( new WP_Customize_Control( $wp_customize,'cleanblog_list_category_show',array( 'label' => __('Category','cleanblogg'), 'section' => 'cleanblog_blog_section', 'settings' => 'cleanblog_list_category_show', 'type' => 'checkbox', 'priority' => 7, ) ) ); // Standerd Date $wp_customize->add_setting('cleanblog_list_date_show', array( 'transport' => 'refresh', 'sanitize_callback' => 'cleanblogg_sanitize_value', 'default' => '1', )); $wp_customize->add_control( new WP_Customize_Control( $wp_customize,'cleanblog_list_date_show',array( 'label' => __('Date','cleanblogg'), 'section' => 'cleanblog_blog_section', 'settings' => 'cleanblog_list_date_show', 'type' => 'checkbox', 'priority' => 8, ) ) ); // Standerd Author $wp_customize->add_setting('cleanblog_list_author_show', array( 'transport' => 'refresh', 'sanitize_callback' => 'cleanblogg_sanitize_value', 'default' => '1' )); $wp_customize->add_control( new WP_Customize_Control( $wp_customize,'cleanblog_list_author_show',array( 'label' => __('Author','cleanblogg'), 'section' => 'cleanblog_blog_section', 'settings' => 'cleanblog_list_author_show', 'type' => 'checkbox', 'priority' => 9, ) ) ); // Standerd Comments $wp_customize->add_setting('cleanblog_list_comments_show', array( 'transport' => 'refresh', 'sanitize_callback' => 'cleanblogg_sanitize_value', 'default' => '1' )); $wp_customize->add_control( new WP_Customize_Control( $wp_customize,'cleanblog_list_comments_show',array( 'label' => __('Comment Counts','cleanblogg'), 'section' => 'cleanblog_blog_section', 'settings' => 'cleanblog_list_comments_show', 'type' => 'checkbox', 'priority' => 10, ))); $wp_customize->add_control( new Cleanblog_Customize_Misc_Control($wp_customize,'blog_single_title', array( 'section' => 'cleanblog_blog_section', 'label' => __( 'Show/Hide Elements in Single Post', 'cleanblogg' ), 'type' => 'title', 'priority' => 12, ))); // Single Featured Image $wp_customize->add_setting('cleanblog_single_featured_image_show', array( 'transport' => 'refresh', 'sanitize_callback' => 'cleanblogg_sanitize_value', 'default' => '1' )); $wp_customize->add_control( new WP_Customize_Control( $wp_customize,'cleanblog_single_featured_image_show',array( 'label' => __('Featured Image','cleanblogg'), 'section' => 'cleanblog_blog_section', 'settings' => 'cleanblog_single_featured_image_show', 'type' => 'checkbox', 'priority' => 13, ) ) ); // Single Category $wp_customize->add_setting('cleanblog_single_category_show', array( 'transport' => 'refresh', 'sanitize_callback' => 'esc_url_raw', 'default' => '1' )); $wp_customize->add_control( new WP_Customize_Control( $wp_customize,'cleanblog_single_category_show',array( 'label' => __('Category','cleanblogg'), 'section' => 'cleanblog_blog_section', 'settings' => 'cleanblog_single_category_show', 'type' => 'checkbox', 'priority' => 14, ) ) ); // Single Date $wp_customize->add_setting('cleanblog_single_date_show', array( 'transport' => 'refresh', 'sanitize_callback' => 'cleanblogg_sanitize_value', 'default' => '1' )); $wp_customize->add_control( new WP_Customize_Control( $wp_customize,'cleanblog_single_date_show',array( 'label' => __('Date','cleanblogg'), 'section' => 'cleanblog_blog_section', 'settings' => 'cleanblog_single_date_show', 'type' => 'checkbox', 'priority' => 15, ) ) ); // Single Author $wp_customize->add_setting('cleanblog_single_author_show', array( 'transport' => 'refresh', 'sanitize_callback' => 'cleanblogg_sanitize_value', 'default' => '1' )); $wp_customize->add_control( new WP_Customize_Control( $wp_customize,'cleanblog_single_author_show',array( 'label' => __('Author','cleanblogg'), 'section' => 'cleanblog_blog_section', 'settings' => 'cleanblog_single_author_show', 'type' => 'checkbox', 'priority' => 17, ) ) ); // Single Comments $wp_customize->add_setting('cleanblog_single_comments_show', array( 'transport' => 'refresh', 'sanitize_callback' => 'cleanblogg_sanitize_value', 'default' => '1' )); $wp_customize->add_control( new WP_Customize_Control( $wp_customize,'cleanblog_single_comments_show',array( 'label' => __('Comment Counts','cleanblogg'), 'section' => 'cleanblog_blog_section', 'settings' => 'cleanblog_single_comments_show', 'type' => 'checkbox', 'priority' => 18, ) ) ); // Single Tags $wp_customize->add_setting('cleanblog_single_tags_show', array( 'transport' => 'refresh', 'sanitize_callback' => 'cleanblogg_sanitize_value', 'default' => '1' )); $wp_customize->add_control( new WP_Customize_Control( $wp_customize,'cleanblog_single_tags_show',array( 'label' => __('Tags','cleanblogg'), 'section' => 'cleanblog_blog_section', 'settings' => 'cleanblog_single_tags_show', 'type' => 'checkbox', 'priority' => 19, ))); // Single Author Bio Info $wp_customize->add_setting('cleanblog_single_author_bio_show', array( 'transport' => 'refresh', 'sanitize_callback' => 'cleanblogg_sanitize_value', 'default' => '0' )); $wp_customize->add_control( new WP_Customize_Control( $wp_customize,'cleanblog_single_author_bio_show',array( 'label' => __('Author Bio Info','cleanblogg'), 'section' => 'cleanblog_blog_section', 'settings' => 'cleanblog_single_author_bio_show', 'type' => 'checkbox', 'priority' => 20, ))); // Single Next Previous $wp_customize->add_setting('cleanblog_single_next_prev_show', array( 'transport' => 'refresh', 'sanitize_callback' => 'cleanblogg_sanitize_value', 'default' => '0' )); $wp_customize->add_control( new WP_Customize_Control( $wp_customize,'cleanblog_single_next_prev_show',array( 'label' => __('Next Previous Posts','cleanblogg'), 'section' => 'cleanblog_blog_section', 'settings' => 'cleanblog_single_next_prev_show', 'type' => 'checkbox', 'priority' => 21, ))); // Single Related Posts $wp_customize->add_setting('cleanblog_single_relatedpost_show', array( 'transport' => 'refresh', 'sanitize_callback' => 'cleanblogg_sanitize_value', 'default' => '0' )); $wp_customize->add_control( new WP_Customize_Control( $wp_customize,'cleanblog_single_relatedpost_show',array( 'label' => __('Related Posts','cleanblogg'), 'section' => 'cleanblog_blog_section', 'settings' => 'cleanblog_single_relatedpost_show', 'type' => 'checkbox', 'priority' => 22, ))); //## Style Section $wp_customize->add_section( 'cleanblog_style_section', array( 'title' => __( 'Styles', 'cleanblogg' ), 'priority' => 38, ) ); //Section Top Message $wp_customize->add_control( new Cleanblog_Customize_Misc_Control($wp_customize,'style_message', array( 'section' => 'cleanblog_style_section', 'description' => __( 'These Options are Available in CleanBlog Pro Version. View CleanBlog Pro Features', 'cleanblogg' ), 'type' => 'desc', 'priority' => 1, ))); //Section Top Message End //## Typography Section $wp_customize->add_section( 'cleanblog_typography_section', array( 'title' => __( 'Typography', 'cleanblogg' ), 'sanitize_callback' => 'esc_url_raw', 'priority' => 39, ) ); //Section Top Message $wp_customize->add_control( new Cleanblog_Customize_Misc_Control($wp_customize,'typography_message', array( 'section' => 'cleanblog_typography_section', 'description' => __( 'These Options are Available in CleanBlog Pro Version. View CleanBlog Pro Features', 'cleanblogg' ), 'type' => 'desc', 'priority' => 1, ))); //## Custom CSS Section $wp_customize->add_section( 'cleanblog_custom_section', array( 'title' => __( 'Custom CSS', 'cleanblogg' ), 'sanitize_callback' => 'esc_url_raw', 'priority' => 40, ) ); //Section Top Message $wp_customize->add_control( new Cleanblog_Customize_Misc_Control($wp_customize,'custom_sec_message', array( 'section' => 'cleanblog_custom_section', 'description' => __( 'Add your custom CSS code without "Style" tag.', 'cleanblogg' ), 'type' => 'desc', 'priority' => 1, ))); // Custom CSS $wp_customize->add_setting( 'cleanblog_custom_css', array( 'default' => '', 'sanitize_callback' => 'wp_filter_nohtml_kses', 'transport' => 'refresh', ) ); $wp_customize->add_control( 'cleanblog_custom_css', array( 'label' => __( 'Quick CSS', 'cleanblogg' ), 'section' => 'cleanblog_custom_section', 'type' => 'textarea', 'priority' => 2 ) ); } function cleanblogg_sanitize_value( $value ) { return $value; } function cleanblog_customizer_query() { wp_enqueue_script( 'cleanblog_customizer_script', get_template_directory_uri() . '/js/customizer.js', array("jquery"), '20160701', true ); } add_action( 'customize_controls_enqueue_scripts', 'cleanblog_customizer_query' ); //Customizer Styles function cleanblogg_customizer_stylesheet() { ?>