add_setting( 'center_header_text', array( 'default' => 0, 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'center_header_text', array( 'label' => __( 'Center Header Text', 'customizable-blogily' ), 'section' => 'header_image', 'priority' => 0, 'settings' => 'center_header_text', 'type' => 'checkbox', ) ); $wp_customize->add_setting( 'top_header_background_color', array( 'default' => '#fff', 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'postMessage', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'top_header_background_color', array( 'label' => __( 'Header Background Color', 'customizable-blogily' ), 'description' => __( 'Applied to header background.', 'customizable-blogily' ), 'section' => 'header_image', 'priority' => 10, 'settings' => 'top_header_background_color', ) ) ); $wp_customize->add_setting( 'navigation_frontpage_link_color', array( 'default' => '#fff', 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'postMessage', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'navigation_frontpage_link_color', array( 'label' => __( 'Navigation Link Color', 'customizable-blogily' ), 'section' => 'header_image', 'priority' => 1, 'settings' => 'navigation_frontpage_link_color', ) ) ); $wp_customize->add_setting( 'upper_widgets_headlinke_color', array( 'default' => '#000', 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'postMessage', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'upper_widgets_headlinke_color', array( 'label' => __( 'Top Widgets Headline Color', 'customizable-blogily' ), 'section' => 'upper_widgets_settings', 'priority' => 1, 'settings' => 'upper_widgets_headlinke_color', ) ) ); $wp_customize->add_setting( 'upper_widgets_content_color', array( 'default' => '#828282', 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'postMessage', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'upper_widgets_content_color', array( 'label' => __( 'Top Widgets Content Color', 'customizable-blogily' ), 'section' => 'upper_widgets_settings', 'priority' => 1, 'settings' => 'upper_widgets_content_color', ) ) ); $wp_customize->add_setting( 'upper_widgets_link_color', array( 'default' => '#fab526', 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'postMessage', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'upper_widgets_link_color', array( 'label' => __( 'Top Widgets Link Color', 'customizable-blogily' ), 'section' => 'upper_widgets_settings', 'priority' => 1, 'settings' => 'upper_widgets_link_color', ) ) ); $wp_customize->add_setting( 'upper_widgets_background_color', array( 'default' => '#fff', 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'postMessage', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'upper_widgets_background_color', array( 'label' => __( 'Top Widgets Background Color', 'customizable-blogily' ), 'section' => 'upper_widgets_settings', 'priority' => 1, 'settings' => 'upper_widgets_background_color', ) ) ); /***************************************************/ /***** Sections ****/ /**************************************************/ $wp_customize->add_section( 'theme_color', array( 'title' => __('Theme Color','customizable-blogily'), 'priority' => 1, 'capability' => 'edit_theme_options', ) ); $wp_customize->add_setting( 'primary_theme_color', array( 'default' => '#fab526', 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'postMessage', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'primary_theme_color', array( 'label' => __( 'Primary Theme Color', 'customizable-blogily' ), 'section' => 'theme_color', 'priority' => 1, 'settings' => 'primary_theme_color', ) ) ); $wp_customize->add_section( 'colors', array( 'title' => __('Background Color','customizable-blogily'), 'priority' => 150, 'capability' => 'edit_theme_options', ) ); $wp_customize->add_section( 'static_front_page', array( 'title' => __('Static Front Page','customizable-blogily'), 'priority' => 150, 'capability' => 'edit_theme_options', ) ); $wp_customize->add_section( 'sidebars_settings', array( 'title' => __('Sidebar','customizable-blogily'), 'priority' => 100, 'capability' => 'edit_theme_options', ) ); $wp_customize->add_section( 'all_blog_posts', array( 'title' => __('All Blog Posts','customizable-blogily'), 'priority' => 100, 'capability' => 'edit_theme_options', ) ); $wp_customize->add_section( 'customizable_blogily_header_settings', array( 'title' => __('Header','customizable-blogily'), 'priority' => 122, 'capability' => 'edit_theme_options', ) ); $wp_customize->add_section( 'navigation_settings', array( 'title' => __('Navigation Settings','customizable-blogily'), 'priority' => 50, 'capability' => 'edit_theme_options', ) ); $wp_customize->add_section( 'upper_widgets_settings', array( 'title' => __('Top Widget Settings','customizable-blogily'), 'priority' => 50, 'capability' => 'edit_theme_options', ) ); /***************************************************/ /***** pagination ****/ /**************************************************/ $wp_customize->add_section( 'customizable_blogily_pagination_settings', array( 'title' => __('Pagination Type','customizable-blogily'), 'priority' => 122, 'capability' => 'edit_theme_options', ) ); $wp_customize->add_setting( 'customizable_blogily_pagination_type', array( 'default' => '1', 'capability' => 'edit_theme_options', 'priority' => 1, 'sanitize_callback' => 'sanitize_key', )); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'customizable_blogily_pagination_type', array( 'label' => __('Pagination Type', 'customizable-blogily'), 'section' => 'all_blog_posts', 'settings' => 'customizable_blogily_pagination_type', 'type' => 'radio', 'choices' => array( '0' => __('Next/Previous', 'customizable-blogily'), '1' => __('Numbered', 'customizable-blogily'), ), 'transport' => 'refresh', 'priority' => 99, ) ) ); $wp_customize->add_setting( 'all_blog_posts_headline', array( 'default' => '#333', 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'postMessage', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'all_blog_posts_headline', array( 'label' => __( 'Headline Colors', 'customizable-blogily' ), 'section' => 'all_blog_posts', 'priority' => 1, 'settings' => 'all_blog_posts_headline', ) ) ); $wp_customize->add_setting( 'all_blog_posts_date', array( 'default' => '#8c8c8c', 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'postMessage', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'all_blog_posts_date', array( 'label' => __( 'Date Colors', 'customizable-blogily' ), 'section' => 'all_blog_posts', 'priority' => 1, 'settings' => 'all_blog_posts_date', ) ) ); $wp_customize->add_setting( 'all_blog_posts_text', array( 'default' => '#989898', 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'postMessage', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'all_blog_posts_text', array( 'label' => __( 'Text Colors', 'customizable-blogily' ), 'section' => 'all_blog_posts', 'priority' => 1, 'settings' => 'all_blog_posts_text', ) ) ); $wp_customize->add_setting( 'all_blog_posts_bg', array( 'default' => '#fff', 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'postMessage', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'all_blog_posts_bg', array( 'label' => __( 'Background Color', 'customizable-blogily' ), 'section' => 'all_blog_posts', 'priority' => 1, 'settings' => 'all_blog_posts_bg', ) ) ); //Breadcrumb $wp_customize->add_setting('customizable_blogily_single_breadcrumb_section', array( 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_key', 'transport' => 'refresh', 'default' => '1', )); $wp_customize->add_control('customizable_blogily_single_breadcrumb_section', array( 'label' => __('Breadcrumb Section', 'customizable-blogily'), 'section' => 'customizable_single_settings', 'description' => __('This setting will only affect blog posts.','customizable-blogily'), 'settings' => 'customizable_blogily_single_breadcrumb_section', 'type' => 'radio', 'choices' => array( '1' => __('OFF', 'customizable-blogily'), '0' => __('ON', 'customizable-blogily'), ), )); //Tags $wp_customize->add_setting('customizable_blogily_single_tags_section', array( 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_key', 'transport' => 'refresh', 'default' => '1', )); $wp_customize->add_control('customizable_blogily_single_tags_section', array( 'label' => __('Tags Section', 'customizable-blogily'), 'section' => 'customizable_single_settings', 'description' => __('This setting will only affect blog posts.','customizable-blogily'), 'settings' => 'customizable_blogily_single_tags_section', 'type' => 'radio', 'choices' => array( '0' => __('OFF', 'customizable-blogily'), '1' => __('ON', 'customizable-blogily'), ), )); //Related Posts $wp_customize->add_setting('customizable_blogily_relatedposts_section', array( 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_key', 'transport' => 'refresh', 'default' => '1', )); $wp_customize->add_control('customizable_blogily_relatedposts_section', array( 'label' => __('Related Posts Section', 'customizable-blogily'), 'section' => 'customizable_single_settings', 'description' => __('This setting will only affect blog posts.','customizable-blogily'), 'settings' => 'customizable_blogily_relatedposts_section', 'type' => 'radio', 'choices' => array( '1' => __('OFF', 'customizable-blogily'), '0' => __('ON', 'customizable-blogily'), ), )); //Author Box $wp_customize->add_setting('customizable_blogily_authorbox_section', array( 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_key', 'transport' => 'refresh', 'default' => '1', )); $wp_customize->add_control('customizable_blogily_authorbox_section', array( 'label' => __('Author box Section', 'customizable-blogily'), 'section' => 'customizable_single_settings', 'description' => __('This setting will only affect blog posts.','customizable-blogily'), 'settings' => 'customizable_blogily_authorbox_section', 'type' => 'radio', 'choices' => array( '1' => __('OFF', 'customizable-blogily'), '0' => __('ON', 'customizable-blogily'), ), )); $wp_customize->add_setting( 'post_page_headline', array( 'default' => '#000', 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'postMessage', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'post_page_headline', array( 'label' => __( 'Headline Colors', 'customizable-blogily' ), 'section' => 'customizable_single_settings', 'priority' => 1, 'settings' => 'post_page_headline', ) ) ); $wp_customize->add_setting( 'post_page_date', array( 'default' => '#a2a2a2', 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'postMessage', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'post_page_date', array( 'label' => __( 'Date Colors', 'customizable-blogily' ), 'section' => 'customizable_single_settings', 'description' => __('This setting will only affect blog posts.','customizable-blogily'), 'priority' => 1, 'settings' => 'post_page_date', ) ) ); $wp_customize->add_setting( 'post_page_text', array( 'default' => '#555555', 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'postMessage', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'post_page_text', array( 'label' => __( 'Text Colors', 'customizable-blogily' ), 'section' => 'customizable_single_settings', 'priority' => 1, 'settings' => 'post_page_text', ) ) ); $wp_customize->add_setting( 'post_page_link', array( 'default' => '#fab526', 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'postMessage', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'post_page_link', array( 'label' => __( 'Link Colors', 'customizable-blogily' ), 'section' => 'customizable_single_settings', 'priority' => 1, 'settings' => 'post_page_link', ) ) ); $wp_customize->add_setting( 'post_page_background', array( 'default' => '#fff', 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'postMessage', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'post_page_background', array( 'label' => __( 'Background Color', 'customizable-blogily' ), 'section' => 'customizable_single_settings', 'priority' => 1, 'settings' => 'post_page_background', ) ) ); $wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; $wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage'; $wp_customize->get_section('header_image')->title = __( 'Header', 'customizable-blogily' ); $wp_customize->get_control( 'header_textcolor' )->section = 'header_image'; } add_action( 'customize_register', 'customizable_blogily_customize_register' ); if(! function_exists('customizable_color_choice' ) ): function customizable_color_choice(){ ?>