'image/jpeg', 'gif' => 'image/gif', 'png' => 'image/png', 'bmp' => 'image/bmp', 'tif|tiff' => 'image/tiff', 'ico' => 'image/x-icon' ); $file = wp_check_filetype( $image, $mimes ); return ( $file['ext'] ? $image : $setting->default ); } // ADD PANEL ///////////////////////////////////////////////// $wp_customize->add_panel( 'cam_custom_header_footer_panel', array( 'title' => __( 'Header and footer texts color', 'cameleon' ), 'priority' => 23, 'capability' => 'edit_theme_options', 'description' => __('Customize header and footer texts color', 'cameleon'), ) ); ///////////////////////////////////////////////// ///////////////////////////////////////////////// // Setting CUSTOM LOGO ///////////////////////////////////////////////// ///////////////////////////////////////////////// $wp_customize->add_section( 'cam_custom_logo_colors', array( 'title' => __( 'Logo', 'cameleon' ), 'priority' => 23, 'capability' => 'edit_theme_options', 'description' => __('Add or remove your logo', 'cameleon'), 'panel' => 'cam_custom_header_footer_panel', ) ); $wp_customize->add_setting( 'upload_logo', array( 'sanitize_callback' => 'cameleon_sanitize_image', ) ); $wp_customize->add_control( new WP_Customize_Upload_Control( $wp_customize, 'upload_logo', array( 'label' => __('Logo (Image size : 315 x 75 pixels)', 'cameleon'), 'section' => 'cam_custom_logo_colors', 'settings' => 'upload_logo' ) ) ); ///////////////////////////////////////////////// ///////////////////////////////////////////////// // Setting HEADER TEXTS ///////////////////////////////////////////////// ///////////////////////////////////////////////// $wp_customize->add_section( 'cam_custom_header_texts_colors', array( 'title' => __( 'Header texts', 'cameleon' ), 'priority' => 23, 'capability' => 'edit_theme_options', 'description' => __('Customize header texts color', 'cameleon'), 'panel' => 'cam_custom_header_footer_panel', ) ); // Setting TITLE color ///////////////////////////////////////////////// ///////////////////////////////////////////////// $wp_customize->add_setting( 'custom_title_link_color', array( 'default' => '#98b8df', 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'transport' => 'refresh', 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'cameleon_custom_title_link_color', array( 'label' => __( 'Site title color', 'cameleon' ), 'section' => 'cam_custom_header_texts_colors', 'settings' => 'custom_title_link_color', 'priority' => 10, ) ) ); // Setting TITLE color:hover ///////////////////////////////////////////////// ///////////////////////////////////////////////// $wp_customize->add_setting( 'custom_title_link_hover_color', array( 'default' => '#94a7be', 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'transport' => 'refresh', 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'cameleon_custom_title_link_hover_color', array( 'label' => __( 'Site title color on mouse over', 'cameleon' ), 'section' => 'cam_custom_header_texts_colors', 'settings' => 'custom_title_link_hover_color', 'priority' => 10, ) ) ); // Setting DESCRIPTION color ///////////////////////////////////////////////// ///////////////////////////////////////////////// $wp_customize->add_setting( 'custom_title_text_color', array( 'default' => '#eaeaea', 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'cameleon_custom_title_text_color', array( 'label' => __( 'Site description', 'cameleon' ), 'section' => 'cam_custom_header_texts_colors', 'settings' => 'custom_title_text_color', 'priority' => 10, ) ) ); // Setting NAVIGATION LINKS color ///////////////////////////////////////////////// ///////////////////////////////////////////////// $wp_customize->add_setting( 'custom_nav_links', array( 'default' => '#98b8df', 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'transport' => 'refresh', 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'cameleon_custom_nav_links', array( 'label' => __( 'Navigation texts', 'cameleon' ), 'section' => 'cam_custom_header_texts_colors', 'settings' => 'custom_nav_links', 'priority' => 10, ) ) ); // Setting NAVIGATION LINKS:hover color ///////////////////////////////////////////////// ///////////////////////////////////////////////// $wp_customize->add_setting( 'custom_nav_links_hover', array( 'default' => '#94a7be', 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'transport' => 'refresh', 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'cameleon_custom_nav_links_hover', array( 'label' => __( 'Navigation texts on mouseover', 'cameleon' ), 'section' => 'cam_custom_header_texts_colors', 'settings' => 'custom_nav_links_hover', 'priority' => 10, ) ) ); ///////////////////////////////////////////////// ///////////////////////////////////////////////// // Setting FOOTER TEXTS ///////////////////////////////////////////////// ///////////////////////////////////////////////// $wp_customize->add_section( 'cam_custom_footer_texts_colors', array( 'title' => __( 'Footer texts', 'cameleon' ), 'priority' => 23, 'capability' => 'edit_theme_options', 'description' => __('Customize footer texts color', 'cameleon'), 'panel' => 'cam_custom_header_footer_panel', ) ); // Setting footer text color ///////////////////////////////////////////////// ///////////////////////////////////////////////// $wp_customize->add_setting( 'custom_footer_text', array( 'default' => '#000000', 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'cameleon_custom_footer_text', array( 'label' => __( 'Texts color', 'cameleon' ), 'section' => 'cam_custom_footer_texts_colors', 'settings' => 'custom_footer_text', 'priority' => 10, ) ) ); // Setting footer links color ///////////////////////////////////////////////// ///////////////////////////////////////////////// $wp_customize->add_setting( 'custom_footer_link', array( 'default' => '#98b8df', 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'transport' => 'refresh', 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'cameleon_custom_footer_link', array( 'label' => __( 'Links color', 'cameleon' ), 'section' => 'cam_custom_footer_texts_colors', 'settings' => 'custom_footer_link', 'priority' => 10, ) ) ); // Setting footer links:hover color ///////////////////////////////////////////////// ///////////////////////////////////////////////// $wp_customize->add_setting( 'custom_footer_link_hover', array( 'default' => '#98b8df', 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'transport' => 'refresh', 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'cameleon_custom_footer_link_hover', array( 'label' => __( 'Links color on mouse over', 'cameleon' ), 'section' => 'cam_custom_footer_texts_colors', 'settings' => 'custom_footer_link_hover', 'priority' => 10, ) ) ); } public static function header_output() { ?>