add_section( 'textcolors' , array( 'title' => 'Color Scheme', ) ); // primary color ( header , footer, buttons ) $txtcolors[] = array( 'arbitragex'=>'primary_color', 'default' => '#161E6D', 'label' => 'Primary Color' ); // heading color ( site title, h1, h2, h4. h6, widget headings, nav links, footer headings ) $txtcolors[] = array( 'arbitragex'=>'color_scheme_1', 'default' => '#333', 'label' => 'Headings color' ); // secondary color ( site description, sidebar headings, h3, h5, nav links on hover ) $txtcolors[] = array( 'arbitragex'=>'color_scheme_2', 'default' => '#FF6B00', 'label' => 'Secondary Color' ); /*// link color $txtcolors[] = array( 'slug'=>'link_color', 'default' => '#008AB7', 'label' => 'Link Color' ); // link color ( hover, active ) $txtcolors[] = array( 'slug'=>'hover_link_color', 'default' => '#9e4059', 'label' => 'Link Color (on hover)' );*/ // add the settings and controls for each color foreach( $txtcolors as $txtcolor ) { // SETTINGS $wp_customize->add_setting( $txtcolor['arbitragex'], array( 'default' => $txtcolor['default'], 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_hex_color', ) ); // CONTROLS $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, $txtcolor['arbitragex'], array('label' => $txtcolor['label'], 'section' => 'textcolors', 'settings' => $txtcolor['arbitragex']) ) ); } } add_action( 'customize_register', 'wptutsplus_customize_register' ); ?>