add_panel( 'website_colors_panel', array( 'title' => __( 'Other Website Colors', 'amyra-lite' ), )); $wp_customize->add_section( 'nav_section' , array( 'title' => __('Navigation Color', 'amyra-lite'), 'panel' => 'website_colors_panel', )); $wp_customize->add_section( 'heading_section' , array( 'title' => __('Heading Color', 'amyra-lite'), 'panel' => 'website_colors_panel', )); $wp_customize->add_section( 'link_section' , array( 'title' => __('Link Color', 'amyra-lite'), 'panel' => 'website_colors_panel', )); // Navigation background color $txtcolors[] = array( 'slug' =>'menu_bar_bg_clr', 'default' => $default_settings['menu_bar_bg_clr'], 'label' => __('Navigation Bar - Background Color', 'amyra-lite'), 'section' => 'nav_section', 'section_title' => __('Navigation Color', 'amyra-lite'), ); // Navigation link color $txtcolors[] = array( 'slug' => 'menu_bar_link_clr', 'default' => $default_settings['menu_bar_link_clr'], 'label' => __('Navigation Bar - Link Color', 'amyra-lite'), 'section' => 'nav_section', 'section_title' => __('Navigation Color', 'amyra-lite'), ); // Navigation link hover color $txtcolors[] = array( 'slug' =>'menu_bar_linkh_clr', 'default' => $default_settings['menu_bar_linkh_clr'], 'label' => __('Navigation Bar - Link Hover Color', 'amyra-lite'), 'section' => 'nav_section', 'section_title' => __('Navigation Color', 'amyra-lite'), ); // Site heading color $txtcolors[] = array( 'slug' => 'h1_clr', 'default' => $default_settings['h1_clr'], 'label' => __('H1 Color', 'amyra-lite'), 'section' => 'heading_section', 'section_title' => __('Heading Color', 'amyra-lite'), ); // H2 color $txtcolors[] = array( 'slug' => 'h2_clr', 'default' => $default_settings['h2_clr'], 'label' => __('H2 Color', 'amyra-lite'), 'section' => 'heading_section', 'section_title' => __('Heading Color', 'amyra-lite'), ); // H3 color $txtcolors[] = array( 'slug' => 'h3_clr', 'default' => $default_settings['h3_clr'], 'label' => __('H3 Color', 'amyra-lite'), 'section' => 'heading_section', 'section_title' => __('Heading Color', 'amyra-lite'), ); // H4 color $txtcolors[] = array( 'slug' => 'h4_clr', 'default' => $default_settings['h4_clr'], 'label' => __('H4 Color', 'amyra-lite'), 'section' => 'heading_section', 'section_title' => __('Heading Color', 'amyra-lite'), ); // H5 color $txtcolors[] = array( 'slug' => 'h5_clr', 'default' => $default_settings['h5_clr'], 'label' => __('H5 Color', 'amyra-lite'), 'section' => 'heading_section', 'section_title' => __('Heading Color', 'amyra-lite'), ); // H6 color $txtcolors[] = array( 'slug' => 'h6_clr', 'default' => $default_settings['h6_clr'], 'label' => __('H6 Color', 'amyra-lite'), 'section' => 'heading_section', 'section_title' => __('Heading Color', 'amyra-lite'), ); // Site link color $txtcolors[] = array( 'slug' => 'link_clr', 'default' => $default_settings['link_clr'], 'label' => __('Link Color', 'amyra-lite'), 'section' => 'link_section', 'section_title' => __('Link Color', 'amyra-lite'), ); // Site link hover color $txtcolors[] = array( 'slug' => 'hover_link_clr', 'default' => $default_settings['hover_link_clr'], 'label' => __('Link Hover Color', 'amyra-lite'), 'section' => 'link_section', 'section_title' => __('Link Color', 'amyra-lite'), ); // Read continue. $txtcolors[] = array( 'slug' =>'continue_read_clr', 'default' => $default_settings['continue_read_clr'], 'label' => __('Continue Reading Button Color', 'amyra-lite'), 'section' => 'link_section', 'section_title' => __('Link Color', 'amyra-lite'), ); $txtcolors[] = array( 'slug' => 'continue_read_hvr_clr', 'default' => $default_settings['continue_read_hvr_clr'], 'label' => __('Continue Reading Button hover Color', 'amyra-lite'), 'section' => 'link_section', 'section_title' => __('Link Color', 'amyra-lite'), ); // Website color settings foreach( $txtcolors as $txtcolor ) { // SETTINGS $wp_customize->add_setting( $txtcolor['slug'], array( 'default' => $txtcolor['default'], 'sanitize_callback' => 'sanitize_hex_color', 'capability' => 'edit_theme_options' )); // CONTROLS $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, $txtcolor['slug'], array( 'label' => $txtcolor['label'], 'section' => $txtcolor['section'], 'settings' => $txtcolor['slug'] )) ); } // End of foreach /* Post Settings panel*/ $wp_customize->add_panel('post_panel', array( 'title' => __( 'Post Settings', 'amyra-lite' ), )); /* Blog Page Settings */ $wp_customize->add_section( 'blog-sett' , array( 'title' => __( 'Blog Page', 'amyra-lite' ), 'panel' => 'post_panel', )); $wp_customize->add_setting( 'blog_layout', array( 'sanitize_callback' => 'amyra_lite_sanitize_select', 'transport' => 'refresh', 'default' => $default_settings['blog_layout'], )); $wp_customize->add_control( 'blog_layout', array( 'label' => __( 'Blog Layout', 'amyra-lite' ), 'section' => 'blog-sett', 'settings' => 'blog_layout', 'type' => 'select', 'choices' => array( 'list' => __('List Layout', 'amyra-lite'), 'list-alt' => __('List Alternet Layout', 'amyra-lite'), 'grid' => __('Grid Layout', 'amyra-lite'), 'masonry' => __('Masonry Layout', 'amyra-lite'), ), 'description' => __('Choose blog page layout.', 'amyra-lite') )); // Add blog layout grid settings $wp_customize->add_setting( 'blog_layout_grid', array( 'sanitize_callback' => 'amyra_lite_sanitize_select', 'transport' => 'refresh', 'default' => $default_settings['blog_layout_grid'], )); $wp_customize->add_control( 'blog_layout_grid', array( 'label' => __( 'Blog Grid', 'amyra-lite' ), 'section' => 'blog-sett', 'settings' => 'blog_layout_grid', 'type' => 'select', 'choices' => array( '12' => __('Grid 1', 'amyra-lite'), '6' => __('Grid 2', 'amyra-lite'), '4' => __('Grid 3', 'amyra-lite'), '3' => __('Grid 4', 'amyra-lite'), ), 'description' => __('Choose blog grid. (Note : This will only work with Grid and Masonry blog layout. )', 'amyra-lite') )); // Add blog layout excerpt length $wp_customize->add_setting( 'blog_excerpt_length', array( 'sanitize_callback' => 'absint', 'transport' => 'refresh', 'default' => $default_settings['blog_excerpt_length'], )); $wp_customize->add_control( 'blog_excerpt_length', array( 'label' => __( 'Excerpt Length', 'amyra-lite' ), 'section' => 'blog-sett', 'settings' => 'blog_excerpt_length', 'type' => 'number', 'description' => __('Enter excerpt length eg 40', 'amyra-lite') )); // Show/hide date $wp_customize->add_setting( 'blog_show_date', array( 'sanitize_callback' => 'amyra_lite_sanitize_checkbox', 'transport' => 'refresh', 'default' => $default_settings['blog_show_date'], )); $wp_customize->add_control( 'blog_show_date', array( 'label' => __( 'Show Post Date', 'amyra-lite' ), 'section' => 'blog-sett', 'settings' => 'blog_show_date', 'type' => 'checkbox', 'description' => __('Check this box if you want to show post date.', 'amyra-lite') )); // Show/hide author $wp_customize->add_setting( 'blog_show_author', array( 'sanitize_callback' => 'amyra_lite_sanitize_checkbox', 'transport' => 'refresh', 'default' => $default_settings['blog_show_author'], )); $wp_customize->add_control( 'blog_show_author', array( 'label' => __( 'Show Post Author', 'amyra-lite' ), 'section' => 'blog-sett', 'settings' => 'blog_show_author', 'type' => 'checkbox', 'description' => __('Check this box if you want to show post author.', 'amyra-lite') )); // Show/hide Category $wp_customize->add_setting( 'blog_show_cat', array( 'sanitize_callback' => 'amyra_lite_sanitize_checkbox', 'transport' => 'refresh', 'default' => $default_settings['blog_show_cat'], )); $wp_customize->add_control( 'blog_show_cat', array( 'label' => __( 'Show Post Category', 'amyra-lite' ), 'section' => 'blog-sett', 'settings' => 'blog_show_cat', 'type' => 'checkbox', 'description' => __('Check this box if you want to show post category.', 'amyra-lite') )); // Show/hide Tags $wp_customize->add_setting( 'blog_show_tags', array( 'sanitize_callback' => 'amyra_lite_sanitize_checkbox', 'transport' => 'refresh', 'default' => $default_settings['blog_show_tags'], )); $wp_customize->add_control( 'blog_show_tags', array( 'label' => __( 'Show Post Tags', 'amyra-lite' ), 'section' => 'blog-sett', 'settings' => 'blog_show_tags', 'type' => 'checkbox', 'description' => __('Check this box if you want to show post tags.', 'amyra-lite') )); // Show/hide Comments $wp_customize->add_setting( 'blog_show_comment', array( 'sanitize_callback' => 'amyra_lite_sanitize_checkbox', 'transport' => 'refresh', 'default' => $default_settings['blog_show_comment'], )); $wp_customize->add_control( 'blog_show_comment', array( 'label' => __( 'Show Post Comment', 'amyra-lite' ), 'section' => 'blog-sett', 'settings' => 'blog_show_comment', 'type' => 'checkbox', 'description' => __('Check this box if you want to show post comment.', 'amyra-lite') )); /***** Category Page Settings *****/ $wp_customize->add_section( 'cat-sett' , array( 'title' => __( 'Category Page', 'amyra-lite' ), 'panel' => 'post_panel', )); // Add blog page layout settings $wp_customize->add_setting( 'cat_layout', array( 'sanitize_callback' => 'amyra_lite_sanitize_select', 'transport' => 'refresh', 'default' => $default_settings['cat_layout'], )); $wp_customize->add_control( 'cat_layout', array( 'label' => __( 'Category Page Layout', 'amyra-lite' ), 'section' => 'cat-sett', 'settings' => 'cat_layout', 'type' => 'select', 'choices' => array( 'list' => __('List Layout', 'amyra-lite'), 'list-alt' => __('List Alternet Layout', 'amyra-lite'), 'grid' => __('Grid Layout', 'amyra-lite'), 'masonry' => __('Masonry Layout', 'amyra-lite'), ), 'description' => __('Choose category page layout.', 'amyra-lite') )); // Add blog layout grid settings $wp_customize->add_setting( 'cat_layout_grid', array( 'sanitize_callback' => 'amyra_lite_sanitize_select', 'transport' => 'refresh', 'default' => $default_settings['cat_layout_grid'], )); $wp_customize->add_control( 'cat_layout_grid', array( 'label' => __( 'Grid', 'amyra-lite' ), 'section' => 'cat-sett', 'settings' => 'cat_layout_grid', 'type' => 'select', 'choices' => array( '12' => __('Grid 1', 'amyra-lite'), '6' => __('Grid 2', 'amyra-lite'), '4' => __('Grid 3', 'amyra-lite'), '3' => __('Grid 4', 'amyra-lite'), ), 'description' => __('Choose category post grid. (Note : This will only work with Grid and Masonry blog layout. )', 'amyra-lite') )); // Show/hide date $wp_customize->add_setting( 'cat_show_date', array( 'sanitize_callback' => 'amyra_lite_sanitize_checkbox', 'transport' => 'refresh', 'default' => $default_settings['cat_show_date'], )); $wp_customize->add_control( 'cat_show_date', array( 'label' => __( 'Show Post Date', 'amyra-lite' ), 'section' => 'cat-sett', 'settings' => 'cat_show_date', 'type' => 'checkbox', 'description' => __('Check this box if you want to show post date.', 'amyra-lite') )); // Show/hide author $wp_customize->add_setting( 'cat_show_author', array( 'sanitize_callback' => 'amyra_lite_sanitize_checkbox', 'transport' => 'refresh', 'default' => $default_settings['cat_show_author'], )); $wp_customize->add_control( 'cat_show_author', array( 'label' => __( 'Show Post Author', 'amyra-lite' ), 'section' => 'cat-sett', 'settings' => 'cat_show_author', 'type' => 'checkbox', 'description' => __('Check this box if you want to show post author.', 'amyra-lite') )); // Show/hide Category $wp_customize->add_setting( 'cat_show_cat', array( 'sanitize_callback' => 'amyra_lite_sanitize_checkbox', 'transport' => 'refresh', 'default' => $default_settings['cat_show_cat'], )); $wp_customize->add_control( 'cat_show_cat', array( 'label' => __( 'Show Post Category', 'amyra-lite' ), 'section' => 'cat-sett', 'settings' => 'cat_show_cat', 'type' => 'checkbox', 'description' => __('Check this box if you want to show post category.', 'amyra-lite') )); // Show/hide Tags $wp_customize->add_setting( 'cat_show_tags', array( 'sanitize_callback' => 'amyra_lite_sanitize_checkbox', 'transport' => 'refresh', 'default' => $default_settings['cat_show_tags'], )); $wp_customize->add_control( 'cat_show_tags', array( 'label' => __( 'Show Post Tags', 'amyra-lite' ), 'section' => 'cat-sett', 'settings' => 'cat_show_tags', 'type' => 'checkbox', 'description' => __('Check this box if you want to show post tags.', 'amyra-lite') )); // Show/hide Comments $wp_customize->add_setting( 'cat_show_comment', array( 'sanitize_callback' => 'amyra_lite_sanitize_checkbox', 'transport' => 'refresh', 'default' => $default_settings['cat_show_comment'], )); $wp_customize->add_control( 'cat_show_comment', array( 'label' => __( 'Show Post Comment', 'amyra-lite' ), 'section' => 'cat-sett', 'settings' => 'cat_show_comment', 'type' => 'checkbox', 'description' => __('Check this box if you want to show post comment.', 'amyra-lite') )); /***** Single Post Settings *****/ $wp_customize->add_section( 'single-post-sett' , array( 'title' => __( 'Single Post', 'amyra-lite' ), 'panel' => 'post_panel', )); // Add blog template settings $wp_customize->add_setting( 'single_post_fet_img', array( 'sanitize_callback' => 'amyra_lite_sanitize_checkbox', 'transport' => 'refresh', 'default' => $default_settings['single_post_fet_img'], )); $wp_customize->add_control( 'single_post_fet_img', array( 'label' => __( 'Show Featured Image.', 'amyra-lite' ), 'section' => 'single-post-sett', 'settings' => 'single_post_fet_img', 'type' => 'checkbox', 'description' => __('Check this box if you want to show featured image from single post.', 'amyra-lite') )); /***** Featured Post Setting *****/ $wp_customize->add_section( 'theme-featured-post' , array( 'title' => __( 'Featured Post', 'amyra-lite' ), )); // Display on Blog Page $wp_customize->add_setting( 'show_fc_post_home', array( 'sanitize_callback' => 'amyra_lite_sanitize_checkbox', 'transport' => 'refresh', 'default' => $default_settings['show_fc_post_home'], )); $wp_customize->add_control( 'show_fc_post_home', array( 'label' => __( 'Display on Blog Page', 'amyra-lite' ), 'section' => 'theme-featured-post', 'settings' => 'show_fc_post_home', 'type' => 'checkbox', )); // Display on Front Page $wp_customize->add_setting( 'show_fc_post_front', array( 'sanitize_callback' => 'amyra_lite_sanitize_checkbox', 'transport' => 'refresh', 'default' => $default_settings['show_fc_post_front'], )); $wp_customize->add_control( 'show_fc_post_front', array( 'label' => __( 'Display on Front Page', 'amyra-lite' ), 'section' => 'theme-featured-post', 'settings' => 'show_fc_post_front', 'type' => 'checkbox', )); // Display on Search Page $wp_customize->add_setting( 'show_fc_post_search', array( 'sanitize_callback' => 'amyra_lite_sanitize_checkbox', 'transport' => 'refresh', 'default' => $default_settings['show_fc_post_search'], )); $wp_customize->add_control( 'show_fc_post_search', array( 'label' => __( 'Display on Search Page', 'amyra-lite' ), 'section' => 'theme-featured-post', 'settings' => 'show_fc_post_search', 'type' => 'checkbox', )); // Display on Single Page $wp_customize->add_setting( 'show_fc_post_single', array( 'sanitize_callback' => 'amyra_lite_sanitize_checkbox', 'transport' => 'refresh', 'default' => $default_settings['show_fc_post_single'], )); $wp_customize->add_control( 'show_fc_post_single', array( 'label' => __( 'Display on Single Page', 'amyra-lite' ), 'section' => 'theme-featured-post', 'settings' => 'show_fc_post_single', 'type' => 'checkbox', )); // Display on Category Page $wp_customize->add_setting( 'show_fc_post_cat', array( 'sanitize_callback' => 'amyra_lite_sanitize_checkbox', 'transport' => 'refresh', 'default' => $default_settings['show_fc_post_cat'], )); $wp_customize->add_control( 'show_fc_post_cat', array( 'label' => __( 'Display on Category Page', 'amyra-lite' ), 'section' => 'theme-featured-post', 'settings' => 'show_fc_post_cat', 'type' => 'checkbox', )); // Featured post type settings $wp_customize->add_setting( 'fc_post_layout', array( 'sanitize_callback' => 'amyra_lite_sanitize_select', 'transport' => 'refresh', 'default' => $default_settings['fc_post_layout'], )); $wp_customize->add_control( 'fc_post_layout', array( 'label' => __( 'Featured Post Display', 'amyra-lite' ), 'section' => 'theme-featured-post', 'settings' => 'fc_post_layout', 'type' => 'text', )); /***** Social Icons Settings *****/ $wp_customize->add_section( 'wpostheme_general_socials_section', array( 'title' => __( 'Social Profile', 'amyra-lite' ), )); // Socials Icons on Header $wp_customize->add_setting( 'header_social', array( 'sanitize_callback' => 'amyra_lite_sanitize_checkbox', 'transport' => 'refresh', 'default' => $default_settings['header_social'], )); $wp_customize->add_control( 'header_social', array( 'label' => __( 'Enable Socials Icons on Header', 'amyra-lite' ), 'section' => 'wpostheme_general_socials_section', 'type' => 'checkbox', )); // Socials Icons on Footer $wp_customize->add_setting( 'footer_social', array( 'sanitize_callback' => 'amyra_lite_sanitize_checkbox', 'transport' => 'refresh', 'default' => $default_settings['footer_social'], )); $wp_customize->add_control( 'footer_social', array( 'label' => __( 'Enable Socials Icons on Footer', 'amyra-lite' ), 'section' => 'wpostheme_general_socials_section', 'type' => 'checkbox', )); // Facebook $wp_customize->add_setting( 'facebook', array( 'sanitize_callback' => 'amyra_lite_sanitize_url', 'transport' => 'refresh', 'default' => $default_settings['facebook'], )); $wp_customize->add_control( 'facebook', array( 'label' => __( 'Facebook', 'amyra-lite' ), 'section' => 'wpostheme_general_socials_section', )); // Twitter $wp_customize->add_setting( 'twitter', array( 'sanitize_callback' => 'amyra_lite_sanitize_url', 'transport' => 'refresh', 'default' => $default_settings['twitter'], )); $wp_customize->add_control( 'twitter', array( 'label' => __( 'Twitter', 'amyra-lite' ), 'section' => 'wpostheme_general_socials_section', )); // Linkedin $wp_customize->add_setting( 'linkedin', array( 'sanitize_callback' => 'amyra_lite_sanitize_url', 'transport' => 'refresh', 'default' => $default_settings['linkedin'], )); $wp_customize->add_control( 'linkedin', array( 'label' => __( 'Linkedin', 'amyra-lite' ), 'section' => 'wpostheme_general_socials_section', )); // Instagram $wp_customize->add_setting( 'instagram', array( 'sanitize_callback' => 'amyra_lite_sanitize_url', 'transport' => 'refresh', 'default' => $default_settings['instagram'], )); $wp_customize->add_control( 'instagram', array( 'label' => __( 'Instagram', 'amyra-lite' ), 'section' => 'wpostheme_general_socials_section', )); // YouTube $wp_customize->add_setting( 'youtube', array( 'sanitize_callback' => 'amyra_lite_sanitize_url', 'transport' => 'refresh', 'default' => $default_settings['youtube'], )); $wp_customize->add_control( 'youtube', array( 'label' => __( 'YouTube', 'amyra-lite' ), 'section' => 'wpostheme_general_socials_section', )); // Behance $wp_customize->add_setting( 'behance', array( 'sanitize_callback' => 'amyra_lite_sanitize_url', 'transport' => 'refresh', 'default' => $default_settings['behance'], )); $wp_customize->add_control( 'behance', array( 'label' => __( 'Behance', 'amyra-lite' ), 'section' => 'wpostheme_general_socials_section', )); // Dribbble $wp_customize->add_setting( 'dribbble', array( 'sanitize_callback' => 'amyra_lite_sanitize_url', 'transport' => 'refresh', 'default' => $default_settings['dribbble'], )); $wp_customize->add_control( 'dribbble', array( 'label' => __( 'Dribbble', 'amyra-lite' ), 'section' => 'wpostheme_general_socials_section', )); // Pinterest $wp_customize->add_setting( 'pinterest', array( 'sanitize_callback' => 'amyra_lite_sanitize_url', 'transport' => 'refresh', 'default' => $default_settings['pinterest'], )); $wp_customize->add_control( 'pinterest', array( 'label' => __( 'Pinterest', 'amyra-lite' ), 'section' => 'wpostheme_general_socials_section', )); /***** Footer Settings *****/ $wp_customize->add_section( 'wpostheme_general_footer_section', array( 'title' => __( 'Footer Content', 'amyra-lite' ), )); // Footer Copyright $wp_customize->add_setting( 'copyright', array( 'sanitize_callback' => 'amyra_lite_sanitize_clean', 'default' => $default_settings['copyright'], 'transport' => 'refresh', )); $wp_customize->add_control( 'copyright', array( 'label' => __( 'Footer Copyright', 'amyra-lite' ), 'section' => 'wpostheme_general_footer_section', )); } add_action( 'customize_register', 'amyra_lite_register_customizer_settings' );