add_panel( 'postmag_color_panel', array( 'priority' => 21, 'title' => __( 'Customize Color settings', 'postmag' ) ) ); $wp_customize->add_section( 'background_color_section', array( 'title' => __( 'Background color Setting', 'postmag' ), 'priority' => 10, 'panel' => 'postmag_color_panel', ) ); $wp_customize->add_setting( 'header_color4', array( 'default' => '#f2f2f2', 'transport' => 'refresh', 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'link_color4', array( 'label' => __( 'Menu Background color', 'postmag' ), 'section' => 'background_color_section', 'settings' => 'header_color4', 'type' => 'color', ) ) ); $wp_customize->add_setting( 'header_color5', array( 'default' => '#e7e7e7', 'transport' => 'refresh', 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'link_color5', array( 'label' => __( 'Frontpage Section Background color', 'postmag' ), 'section' => 'background_color_section', 'settings' => 'header_color5', 'type' => 'color' ) )); $wp_customize->add_setting( 'header_color6', array( 'default' => '#ffffff', 'transport' => 'refresh', 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'link_color6', array( 'label' => __( 'Frontpage Subsection Background color', 'postmag' ), 'section' => 'background_color_section', 'settings' => 'header_color6', 'type' => 'color' ) )); $wp_customize->add_setting( 'header_color7', array( 'default' => '#ffffff', 'transport' => 'refresh', 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'link_color7', array( 'label' => __( 'Footer Background color', 'postmag' ), 'section' => 'background_color_section', 'settings' => 'header_color7', 'type' => 'color' ) ) ); $wp_customize->add_section( 'text_color_section' , array( 'title' => __( 'Text color Setting', 'postmag' ), 'priority' => 11, 'panel' => 'postmag_color_panel', ) ); $wp_customize->add_setting( 'header_color9', array( 'default' => '#2d76bf', 'transport' => 'refresh', 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'link_color9', array( 'label' => __( 'Site Title, Menu & Category', 'postmag' ), 'section' => 'text_color_section', 'settings' => 'header_color9', 'type' => 'color' ) ) ); $wp_customize->add_setting( 'header_color10', array( 'default' => '#000000', 'transport' => 'refresh', 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'link_color10', array( 'label' => __( 'Date', 'postmag' ), 'section' => 'text_color_section', 'settings' => 'header_color10', 'type' => 'color' ) ) ); $wp_customize->add_setting( 'header_color1', array( 'default' => '#000000', 'transport' => 'refresh', 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'link_color1', array( 'label' => __( 'Posts Title', 'postmag' ), 'section' => 'text_color_section', 'settings' => 'header_color1', 'type' => 'color' ) ) ); $wp_customize->add_setting( 'header_color2', array( 'default' => '#707070', 'transport' => 'refresh', 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'link_color2', array( 'label' => __( 'Paragraph', 'postmag' ), 'section' => 'text_color_section', 'settings' => 'header_color2', 'type' => 'color' ) ) ); $wp_customize->add_setting( 'header_color3', array( 'default' => '#ffffff', 'transport' => 'refresh', 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'link_color3', array( 'label' => __( 'Post Overlay Title on Image', 'postmag' ), 'section' => 'text_color_section', 'settings' => 'header_color3', 'type' => 'color' ) ) ); } add_action( 'customize_register', 'postmag_customize_color' );