'text_color_first', 'default' => '#404040', 'label' => __('Text Color', 'blogghiamo') ); $colors[] = array( 'slug'=>'box_color_second', 'default' => '#ffffff', 'label' => __('Box Color', 'blogghiamo') ); $colors[] = array( 'slug'=>'special_color_third', 'default' => '#f7c322', 'label' => __('Special Color', 'blogghiamo') ); foreach( $colors as $color ) { // SETTINGS $wp_customize->add_setting( $color['slug'], array( 'default' => $color['default'], 'type' => 'option', 'capability' => 'edit_theme_options' ) ); // CONTROLS $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, $color['slug'], array('label' => $color['label'], 'section' => 'colors', 'settings' => $color['slug']) ) ); } // SECTIONS $wp_customize->add_section( 'blogghiamo_pro', array('title' => __('Upgrade to Blogghiamo PRO', 'blogghiamo'), 'priority' => 999) ); //SETTINGS $wp_customize->add_setting( 'bl_options[premium_version_label]', array('default' => '', 'type' => 'option') ); $wp_customize->add_setting( 'bl_options[premium_version_text]', array('default' => '', 'type' => 'option') ); $wp_customize->add_setting( 'bl_options[premium_version_button]', array('default' => '', 'type' => 'option') ); $wp_customize->add_setting( 'bl_options[premium_version_button_demo]', array('default' => '', 'type' => 'option') ); class BL_Customize_Header_Control extends WP_Customize_Control { public function render_content() { ?> label); ?>
add_control(new BL_Customize_Header_Control($wp_customize, 'premium_version_label', array('label' => __('Need more features and options?', 'blogghiamo'), 'section' => 'blogghiamo_pro', 'settings' => 'bl_options[premium_version_label]', 'priority' => 1))); $wp_customize->add_control(new BL_Customize_Text_Control($wp_customize, 'premium_version_text', array('label' => __('Check out the Premium Version of Blogghiamo WP Theme which comes with additional features and advanced customization options.', 'blogghiamo'), 'section' => 'blogghiamo_pro', 'settings' => 'bl_options[premium_version_text]', 'priority' => 2))); $wp_customize->add_control(new BL_Customize_Button_Control($wp_customize, 'premium_version_button', array('label' => __('Learn more about Blogghiamo PRO', 'blogghiamo'), 'section' => 'blogghiamo_pro', 'settings' => 'bl_options[premium_version_button]', 'priority' => 3))); $wp_customize->add_control(new BL_Customize_Button_Control_Demo($wp_customize, 'premium_version_button_demo', array('label' => __('See the Demo (Blogghiamo PRO)', 'blogghiamo'), 'section' => 'blogghiamo_pro', 'settings' => 'bl_options[premium_version_button_demo]', 'priority' => 4))); } add_action( 'customize_register', 'blogghiamo_color_primary_register' ); /** * Add Custom CSS to Header */ function blogghiamo_custom_css_styles() { $text_color_first = get_option('text_color_first'); $box_color_second = get_option('box_color_second'); $special_color_third = get_option('special_color_third'); ?>