type ) { case 'textarea': ?> label ); ?> choices as $value => $label ) : //if get theme mod background image has a value then we need to set cyberchimps bg to none $test_bg = $this->value(); $test_bg = ( get_theme_mod( 'background_image' ) ) ? 'none' : $test_bg; $name = '_customize-radio-' . $this->id; $selected = ( $test_bg == $value ) ? 'of-radio-img-selected' : ''; ?>
label ); ?> choices as $value => $label ) : //if get theme mod background image has a value then we need to set cyberchimps bg to none $test_skin = $this->value(); $name = '_customize-radio-' . $this->id; $selected = ( $test_skin == $value ) ? 'of-radio-img-selected' : ''; ?>
add_section( 'cyberchimps_design_section', array( 'title' => 'Design', 'priority' => 35, ) ); // website width $wp_customize->add_setting( 'cyberchimps_options[max_width]', array( 'default' => 1020, 'type' => 'option', ) ); $wp_customize->add_control( 'max_width', array( 'label' => __( 'Max Width', 'cyberchimps_core' ), 'section' => 'cyberchimps_design_section', 'type' => 'text', 'settings' => 'cyberchimps_options[max_width]', ) ); // theme skin $wp_customize->add_setting( 'cyberchimps_options[cyberchimps_skin_color]', array( 'default' => array( 'default' => get_template_directory_uri(). '/inc/css/skins/images/default.png' ), 'type' => 'option', ) ); $wp_customize -> add_control( new Cyberchimps_skin_selector( $wp_customize, 'skin_color', array( 'label' => __( 'Skin Color', 'cyberchimps_core' ), 'section' => 'cyberchimps_design_section', 'settings' => 'cyberchimps_options[cyberchimps_skin_color]', 'choices' => apply_filters( 'cyberchimps_skin_color', array( 'default' => get_template_directory_uri(). '/inc/css/skins/images/default.png' ) ), ) ) ); // text color $wp_customize->add_setting( 'cyberchimps_options[text_colorpicker]', array( 'default' => '', 'type' => 'option', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'text_colorpicker', array( 'label' => __( 'Text Color', 'cyberchimps_core' ), 'section' => 'cyberchimps_design_section', 'settings' => 'cyberchimps_options[text_colorpicker]', ) ) ); // link color $wp_customize->add_setting( 'cyberchimps_options[link_colorpicker]', array( 'default' => '', 'type' => 'option', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'link_colorpicker', array( 'label' => __( 'Link Color', 'cyberchimps_core' ), 'section' => 'cyberchimps_design_section', 'settings' => 'cyberchimps_options[link_colorpicker]', ) ) ); // link hover color $wp_customize->add_setting( 'cyberchimps_options[link_hover_colorpicker]', array( 'default' => '', 'type' => 'option', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'link_hover_colorpicker', array( 'label' => __( 'Link Hover Color', 'cyberchimps_core' ), 'section' => 'cyberchimps_design_section', 'settings' => 'cyberchimps_options[link_hover_colorpicker]', ) ) ); // Custom CSS $wp_customize->add_setting( 'cyberchimps_options[custom_css]', array( 'default' => '', 'type' => 'option' ) ); // Content area $wp_customize->add_control( new Cyberchimps_Form( $wp_customize, 'custom_css', array( 'label' => __( 'Custom Css', 'cyberchimps_core' ), 'section' => 'cyberchimps_design_section', 'settings' => 'cyberchimps_options[custom_css]', 'type' => 'textarea' ) ) ); // new typography section $wp_customize->add_section( 'cyberchimps_typography_section', array( 'title' => 'Typography', 'priority' => 40, ) ); // typography sizes $wp_customize->add_setting( 'cyberchimps_options[typography_options][size]', array( 'default' => '14px', 'type' => 'option', ) ); $wp_customize->add_control( new Cyberchimps_Typography_Size( $wp_customize, 'typography_size', array( 'label' => __( 'Typography Size', 'cyberchimps_core' ), 'section' => 'cyberchimps_typography_section', 'type' => 'select', 'settings' => 'cyberchimps_options[typography_options][size]', 'choices' => apply_filters( 'cyberchimps_typography_sizes', '' ) ) ) ); // typography style $wp_customize->add_setting( 'cyberchimps_options[typography_options][style]', array( 'default' => 'normal', 'type' => 'option', ) ); $wp_customize->add_control( 'typography_style', array( 'label' => __( 'Typography Style', 'cyberchimps_core' ), 'section' => 'cyberchimps_typography_section', 'type' => 'select', 'settings' => 'cyberchimps_options[typography_options][style]', 'choices' => apply_filters( 'cyberchimps_typography_styles', '' ) ) ); // typography face /* Default font faces */ $faces = array( 'Arial, Helvetica, sans-serif' => 'Arial', 'Arial Black, Gadget, sans-serif' => 'Arial Black', 'Comic Sans MS, cursive' => 'Comic Sans MS', 'Courier New, monospace' => 'Courier New', 'Georgia, serif' => 'Georgia', '"HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue",Helvetica, Arial, "Lucida Grande", sans-serif' => 'Helvetica Neue', 'Impact, Charcoal, sans-serif' => 'Impact', 'Lucida Console, Monaco, monospace' => 'Lucida Console', 'Lucida Sans Unicode, Lucida Grande, sans-serif' => 'Lucida Sans Unicode', '"Open Sans", sans-serif' => 'Open Sans', 'Palatino Linotype, Book Antiqua, Palatino, serif' => 'Palatino Linotype', 'Tahoma, Geneva, sans-serif' => 'Tahoma', 'Times New Roman, Times, serif' => 'Times New Roman', 'Trebuchet MS, sans-serif' => 'Trebuchet MS', 'Verdana, Geneva, sans-serif' => 'Verdana', 'Symbol' => 'Symbol', 'Webdings' => 'Webdings', 'Wingdings, Zapf Dingbats' => 'Wingdings', 'MS Sans Serif, Geneva, sans-serif' => 'MS Sans Serif', 'MS Serif, New York, serif' => 'MS Serif', 'Google Fonts' => 'Google Fonts' ); // Font family for text $wp_customize->add_setting( 'cyberchimps_options[typography_options][face]', array( 'default' => 'Arial', 'type' => 'option', ) ); $wp_customize->add_control( 'typography_face', array( 'label' => __( 'Typography Face', 'cyberchimps_core' ), 'section' => 'cyberchimps_typography_section', 'type' => 'select', 'settings' => 'cyberchimps_options[typography_options][face]', 'choices' => apply_filters( 'cyberchimps_typography_faces', $faces ) ) ); // Google Font family for text $wp_customize->add_setting( 'cyberchimps_options[google_font_field]', array( 'default' => 'Arial', 'type' => 'option', ) ); $wp_customize->add_control( 'google_font_field', array( 'label' => __( 'Text google font', 'cyberchimps_core' ), 'section' => 'cyberchimps_typography_section', 'type' => 'text', 'settings' => 'cyberchimps_options[google_font_field]', ) ); // Font family for headings $wp_customize->add_setting( 'cyberchimps_options[font_family_headings]', array( 'default' => 'Arial', 'type' => 'option', ) ); $wp_customize->add_control( 'font_family_headings', array( 'label' => __( 'Font Family for headings', 'cyberchimps_core' ), 'section' => 'cyberchimps_typography_section', 'type' => 'select', 'settings' => 'cyberchimps_options[font_family_headings]', 'choices' => apply_filters( 'cyberchimps_typography_faces', $faces ) ) ); // Google Font family for headings $wp_customize->add_setting( 'cyberchimps_options[google_font_headings]', array( 'default' => 'Arial', 'type' => 'option', ) ); $wp_customize->add_control( 'google_font_headings', array( 'label' => __( 'Google font for headings', 'cyberchimps_core' ), 'section' => 'cyberchimps_typography_section', 'type' => 'text', 'settings' => 'cyberchimps_options[google_font_headings]', ) ); // background image $wp_customize->add_setting( 'cyberchimps_background', array( 'default' => 'none', 'type' => 'theme_mod', ) ); $wp_customize->add_control( new Cyberchimps_Background_Image( $wp_customize, 'cyberchimps_background', array( 'label' => 'CyberChimps '. __( 'Background Image', 'cyberchimps_core' ), 'section' => 'background_image', 'settings' => 'cyberchimps_background', 'choices' => apply_filters( 'cyberchimps_background_image', '' ), ) ) ); }