'text_color_first', 'default' => '#222222', 'label' => __('Box Text Color', 'annina') ); $colors[] = array( 'slug'=>'header_background_fourth', 'default' => '#222222', 'label' => __('Header Background', 'annina') ); $colors[] = array( 'slug'=>'box_color_second', 'default' => '#ffffff', 'label' => __('Box Background Color', 'annina') ); $colors[] = array( 'slug'=>'special_color_third', 'default' => '#dd4c39', 'label' => __('Special Color', 'annina') ); foreach( $colors as $annina_theme_options ) { // SETTINGS $wp_customize->add_setting( 'annina_theme_options[' . $annina_theme_options['slug'] . ']', array( 'default' => $annina_theme_options['default'], 'type' => 'option', 'sanitize_callback' => 'sanitize_hex_color', 'capability' => 'edit_theme_options' ) ); // CONTROLS $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, $annina_theme_options['slug'], array('label' => $annina_theme_options['label'], 'section' => 'colors', 'settings' =>'annina_theme_options[' . $annina_theme_options['slug'] . ']', ) ) ); } } add_action( 'customize_register', 'annina_color_primary_register' ); /** * Add Custom CSS to Header */ function annina_custom_css_styles() { global $annina_theme_options; $se_options = get_option( 'annina_theme_options', $annina_theme_options ); if( isset( $se_options[ 'text_color_first' ] ) ) { $text_color_first = $se_options['text_color_first']; } if( isset( $se_options[ 'box_color_second' ] ) ) { $box_color_second = $se_options['box_color_second']; } if( isset( $se_options[ 'special_color_third' ] ) ) { $special_color_third = $se_options['special_color_third']; } if( isset( $se_options[ 'header_background_fourth' ] ) ) { $header_background_fourth = $se_options['header_background_fourth']; } ?>