add_panel( 'colors', array( 'priority' => 40, 'title' => esc_html__( 'Colours', 'alurra' ), ) ); // SECTION - CONTENT COLOURS $wp_customize->add_section( 'alurra_content_colours', array( 'title' => esc_html__( 'Content Colors', 'alurra' ), 'priority' => 15, 'panel' => 'colors' ) ); // SECTION - NAVIGATION COLOURS $wp_customize->add_section( 'alurra_nav_colours', array( 'title' => esc_html__( 'Navigation Colors', 'alurra' ), 'priority' => 20, 'panel' => 'colors' ) ); // SECTION - WIDGET COLOURS $wp_customize->add_section( 'alurra_widget_colours', array( 'title' => esc_html__( 'Widget Colors', 'alurra' ), 'priority' => 25, 'panel' => 'colors' ) ); // SECTION - OTHER COLOURS $wp_customize->add_section( 'alurra_other_colours', array( 'title' => esc_html__( 'Other Colors', 'alurra' ), 'priority' => 30, 'panel' => 'colors' ) ); // SECTION - FORM COLOURS $wp_customize->add_section( 'alurra_form_colours', array( 'title' => esc_html__( 'Form Colors', 'alurra' ), 'priority' => 35, 'panel' => 'colors' ) ); /* --------------------------------------------------------------------------- MAIN BODY COLOURS Settings and Controls ------------------------------------------------------------------------------ */ // Body bg $wp_customize->add_setting( 'alurra_body_bg_colour', array( 'default' => '#fff', 'transport' => 'postMessage', 'sanitize_callback' => 'alurra_sanitize_hex_colour' ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'alurra_body_bg_colour', array( 'label' => esc_html__( 'Body Background', 'alurra' ), 'description' => esc_html__( 'Sets the colour for your main body page background.', 'alurra' ), 'section' => 'colors', ) ) ); // Header bg $wp_customize->add_setting( 'alurra_header_bg_colour', array( 'default' => '#222', 'transport' => 'postMessage', 'sanitize_callback' => 'alurra_sanitize_hex_colour' ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'alurra_header_bg_colour', array( 'label' => esc_html__( 'Header Background Colour', 'alurra' ), 'description' => esc_html__( 'Sets the colour for your header background.', 'alurra' ), 'section' => 'colors', ) ) ); // Bottom sidebar bg $wp_customize->add_setting( 'alurra_bottom_sidebar_bg_colour', array( 'default' => '#fff', 'transport' => 'postMessage', 'sanitize_callback' => 'alurra_sanitize_hex_colour' ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'alurra_bottom_sidebar_bg_colour', array( 'label' => esc_html__( 'Bottom Sidebar Background Colour', 'alurra' ), 'description' => esc_html__( 'Sets the colour for your bottom sidebar background area.', 'alurra' ), 'section' => 'colors', ) ) ); // Footer Background $wp_customize->add_setting( 'alurra_footer_bg_colour', array( 'default' => '#fff', 'transport' => 'postMessage', 'sanitize_callback' => 'alurra_sanitize_hex_colour' ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'alurra_footer_bg_colour', array( 'label' => esc_html__( 'Footer Background', 'alurra' ), 'description' => esc_html__( 'Sets the background colour for the footer area.', 'alurra' ), 'section' => 'colors', ) ) ); /* --------------------------------------------------------------------------- CONTENT COLOURS Settings and Controls ------------------------------------------------------------------------------ */ // Primary text colour $wp_customize->add_setting( 'alurra_primary_text_colour', array( 'default' => '#484848', 'transport' => 'postMessage', 'sanitize_callback' => 'alurra_sanitize_hex_colour' ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'alurra_primary_text_colour', array( 'label' => esc_html__( 'Primary Text Colour', 'alurra' ), 'description' => esc_html__( 'Sets the main text colour for your content.', 'alurra' ), 'section' => 'alurra_content_colours', ) ) ); // Secondary text colour $wp_customize->add_setting( 'alurra_secondary_text_colour', array( 'default' => '#aeaeae', 'transport' => 'postMessage', 'sanitize_callback' => 'alurra_sanitize_hex_colour' ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'alurra_secondary_text_colour', array( 'label' => esc_html__( 'Secondary Text Colour', 'alurra' ), 'description' => esc_html__( 'Sets the secondary text colour for your content.', 'alurra' ), 'section' => 'alurra_content_colours', ) ) ); // Secondary text hover colour $wp_customize->add_setting( 'alurra_secondary_hover_colour', array( 'default' => '#aeaeae', 'transport' => 'postMessage', 'sanitize_callback' => 'alurra_sanitize_hex_colour' ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'alurra_secondary_hover_colour', array( 'label' => esc_html__( 'Secondary Text Hover Colour', 'alurra' ), 'description' => esc_html__( 'Sets the secondary text hover colour for your content, such as the post meta info links.', 'alurra' ), 'section' => 'alurra_content_colours', ) ) ); // Headings $wp_customize->add_setting( 'alurra_heading_colour', array( 'default' => '#222', 'transport' => 'postMessage', 'sanitize_callback' => 'alurra_sanitize_hex_colour' ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'alurra_heading_colour', array( 'label' => esc_html__( 'Heading and Title Colours', 'alurra' ), 'description' => esc_html__( 'Sets the colour for your headings and titles.', 'alurra' ), 'section' => 'alurra_content_colours', ) ) ); // Page excerpts $wp_customize->add_setting( 'alurra_page_excerpt_colour', array( 'default' => '#757575', 'transport' => 'postMessage', 'sanitize_callback' => 'alurra_sanitize_hex_colour' ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'alurra_page_excerpt_colour', array( 'label' => esc_html__( 'Page Excerpt Colour', 'alurra' ), 'description' => esc_html__( 'Sets the colour for your page excerpts.', 'alurra' ), 'section' => 'alurra_content_colours', ) ) ); // Archive Prefix $wp_customize->add_setting( 'alurra_archive_prefix_colour', array( 'default' => '#d6ac6a', 'transport' => 'postMessage', 'sanitize_callback' => 'alurra_sanitize_hex_colour' ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'alurra_archive_prefix_colour', array( 'label' => esc_html__( 'Archive Prefix Colour', 'alurra' ), 'description' => esc_html__( 'Sets the colour for your archive heading prefix label.', 'alurra' ), 'section' => 'alurra_content_colours', ) ) ); // Links $wp_customize->add_setting( 'alurra_link_colour', array( 'default' => '#cc9926', 'transport' => 'postMessage', 'sanitize_callback' => 'alurra_sanitize_hex_colour' ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'alurra_link_colour', array( 'label' => esc_html__( 'Links', 'alurra' ), 'description' => esc_html__( 'Sets the colour for your links.', 'alurra' ), 'section' => 'alurra_content_colours', ) ) ); // Link active and hover $wp_customize->add_setting( 'alurra_link_hover_colour', array( 'default' => '#a9b87b', 'transport' => 'postMessage', 'sanitize_callback' => 'alurra_sanitize_hex_colour' ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'alurra_link_hover_colour', array( 'label' => esc_html__( 'Link Hover Colour', 'alurra' ), 'description' => esc_html__( 'Sets the hover colour for your links.', 'alurra' ), 'section' => 'alurra_content_colours', ) ) ); // Content lines $wp_customize->add_setting( 'alurra_content_line_colour', array( 'default' => '#f1f1f1', 'transport' => 'postMessage', 'sanitize_callback' => 'alurra_sanitize_hex_colour' ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'alurra_content_line_colour', array( 'label' => esc_html__( 'Content Line Colour', 'alurra' ), 'description' => esc_html__( 'Sets the colour for content lines, such as above the footer area.', 'alurra' ), 'section' => 'alurra_content_colours', ) ) ); // Footer text colour $wp_customize->add_setting( 'alurra_footer_text_colour', array( 'default' => '#8c8c8c', 'transport' => 'postMessage', 'sanitize_callback' => 'alurra_sanitize_hex_colour' ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'alurra_footer_text_colour', array( 'label' => esc_html__( 'Footer Text Colour', 'alurra' ), 'description' => esc_html__( 'Sets the text colour for your footer area.', 'alurra' ), 'section' => 'alurra_content_colours', ) ) ); // Image placeholder bg $wp_customize->add_setting( 'alurra_image_placeholder_bg_colour', array( 'default' => '#f1f1f1', 'transport' => 'postMessage', 'sanitize_callback' => 'alurra_sanitize_hex_colour' ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'alurra_image_placeholder_bg_colour', array( 'label' => esc_html__( 'Image Placeholder Background', 'alurra' ), 'description' => esc_html__( 'Sets the colour for image placeholders, such as the recent posts widget.', 'alurra' ), 'section' => 'alurra_content_colours', ) ) ); // Image placeholder icon $wp_customize->add_setting( 'alurra_image_placeholder_icon_colour', array( 'default' => '#bfbfbf', 'transport' => 'postMessage', 'sanitize_callback' => 'alurra_sanitize_hex_colour' ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'alurra_image_placeholder_icon_colour', array( 'label' => esc_html__( 'Image Placeholder Icon', 'alurra' ), 'description' => esc_html__( 'Sets the colour for image placeholder icon, such as the recent posts widget.', 'alurra' ), 'section' => 'alurra_content_colours', ) ) ); // select text bg $wp_customize->add_setting( 'alurra_select_text_bg_colour', array( 'default' => '#a9b87b', 'transport' => 'postMessage', 'sanitize_callback' => 'alurra_sanitize_hex_colour' ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'alurra_select_text_bg_colour', array( 'label' => esc_html__( 'Selection Text Background Colour', 'alurra' ), 'description' => esc_html__( 'Sets the background colour when you select a batch of text.', 'alurra' ), 'section' => 'alurra_content_colours', ) ) ); // select text $wp_customize->add_setting( 'alurra_select_text_colour', array( 'default' => '#fff', 'transport' => 'postMessage', 'sanitize_callback' => 'alurra_sanitize_hex_colour' ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'alurra_select_text_colour', array( 'label' => esc_html__( 'Selection Text Colour', 'alurra' ), 'description' => esc_html__( 'Sets the colour when you select a batch of text.', 'alurra' ), 'section' => 'alurra_content_colours', ) ) ); /* --------------------------------------------------------------------------- NAVIGATION COLOURS Settings and Controls ------------------------------------------------------------------------------ */ // Primary nav bg $wp_customize->add_setting( 'alurra_primary_nav_bg_colour', array( 'default' => '#e2e2d1', 'transport' => 'postMessage', 'sanitize_callback' => 'alurra_sanitize_hex_colour' ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'alurra_primary_nav_bg_colour', array( 'label' => esc_html__( 'Primary Menu Background Colour', 'alurra' ), 'description' => esc_html__( 'Sets the colour for your primary menu background row.', 'alurra' ), 'section' => 'alurra_nav_colours', ) ) ); // Primary link $wp_customize->add_setting( 'alurra_primary_nav_link_colour', array( 'default' => '#6b6b26', 'transport' => 'postMessage', 'sanitize_callback' => 'alurra_sanitize_hex_colour' ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'alurra_primary_nav_link_colour', array( 'label' => esc_html__( 'Primary Menu Link', 'alurra' ), 'description' => esc_html__( 'Sets the colour for your main menu links.', 'alurra' ), 'section' => 'alurra_nav_colours', ) ) ); // Primary hover link $wp_customize->add_setting( 'alurra_primary_nav_link_hover_colour', array( 'default' => '#000', 'transport' => 'postMessage', 'sanitize_callback' => 'alurra_sanitize_hex_colour' ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'alurra_primary_nav_link_hover_colour', array( 'label' => esc_html__( 'Primary Menu Hover Link', 'alurra' ), 'description' => esc_html__( 'Sets the hover and active colour for your main menu links.', 'alurra' ), 'section' => 'alurra_nav_colours', ) ) ); // Primary submenu bg $wp_customize->add_setting( 'alurra_primary_submenu_bg_colour', array( 'default' => '#f5f5f5', 'transport' => 'postMessage', 'sanitize_callback' => 'alurra_sanitize_hex_colour' ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'alurra_primary_submenu_bg_colour', array( 'label' => esc_html__( 'Primary SubMenu Background', 'alurra' ), 'description' => esc_html__( 'Sets the background for your submenu.', 'alurra' ), 'section' => 'alurra_nav_colours', ) ) ); // Primary submenu links $wp_customize->add_setting( 'alurra_primary_submenu_link_colour', array( 'default' => '#3e3e3e', 'transport' => 'postMessage', 'sanitize_callback' => 'alurra_sanitize_hex_colour' ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'alurra_primary_submenu_link_colour', array( 'label' => esc_html__( 'Primary SubMenu Links', 'alurra' ), 'description' => esc_html__( 'Sets the link colour for your submenu.', 'alurra' ), 'section' => 'alurra_nav_colours', ) ) ); // Primary submenu hover links $wp_customize->add_setting( 'alurra_primary_submenu_link_hover_colour', array( 'default' => '#3e3e3e', 'transport' => 'postMessage', 'sanitize_callback' => 'alurra_sanitize_hex_colour' ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'alurra_primary_submenu_link_hover_colour', array( 'label' => esc_html__( 'Primary SubMenu Hover Links', 'alurra' ), 'description' => esc_html__( 'Sets the link hover colour for your submenu.', 'alurra' ), 'section' => 'alurra_nav_colours', ) ) ); // Mobile Menu Lines $wp_customize->add_setting( 'alurra_mobile_nav_lines_colour', array( 'default' => '#f5f5f5', 'transport' => 'postMessage', 'sanitize_callback' => 'alurra_sanitize_hex_colour' ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'alurra_mobile_nav_lines_colour', array( 'label' => esc_html__( 'Mobile Menu Lines', 'alurra' ), 'description' => esc_html__( 'Sets the colour for your mobile lines.', 'alurra' ), 'section' => 'alurra_nav_colours', ) ) ); // Post nav bg $wp_customize->add_setting( 'alurra_post_nav_bg_colour', array( 'default' => '#f5f5f5', 'transport' => 'postMessage', 'sanitize_callback' => 'alurra_sanitize_hex_colour' ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'alurra_post_nav_bg_colour', array( 'label' => esc_html__( 'Post Navigation Background', 'alurra' ), 'description' => esc_html__( 'Sets the colour for your post navigation background.', 'alurra' ), 'section' => 'alurra_nav_colours', ) ) ); // Post nav link $wp_customize->add_setting( 'alurra_post_nav_link_colour', array( 'default' => '#222', 'transport' => 'postMessage', 'sanitize_callback' => 'alurra_sanitize_hex_colour' ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'alurra_post_nav_link_colour', array( 'label' => esc_html__( 'Post Navigation Link Colour', 'alurra' ), 'description' => esc_html__( 'Sets the colour for your post navigation links.', 'alurra' ), 'section' => 'alurra_nav_colours', ) ) ); // Post nav link line $wp_customize->add_setting( 'alurra_post_nav_line_colour', array( 'default' => '#b38a2d', 'transport' => 'postMessage', 'sanitize_callback' => 'alurra_sanitize_hex_colour' ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'alurra_post_nav_line_colour', array( 'label' => esc_html__( 'Post Navigation Link Line', 'alurra' ), 'description' => esc_html__( 'Sets the line colour for your post navigation links.', 'alurra' ), 'section' => 'alurra_nav_colours', ) ) ); // Top Social bg $wp_customize->add_setting( 'alurra_top_social_border_colour', array( 'default' => '#777', 'transport' => 'postMessage', 'sanitize_callback' => 'alurra_sanitize_hex_colour' ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'alurra_top_social_border_colour', array( 'label' => esc_html__( 'Top Social Border', 'alurra' ), 'description' => esc_html__( 'Sets the colour for your top social menu borders.', 'alurra' ), 'section' => 'alurra_nav_colours', ) ) ); // Top Social icon $wp_customize->add_setting( 'alurra_top_social_icon_colour', array( 'default' => '#b3b3b3', 'transport' => 'postMessage', 'sanitize_callback' => 'alurra_sanitize_hex_colour' ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'alurra_top_social_icon_colour', array( 'label' => esc_html__( 'Top Social Icon', 'alurra' ), 'description' => esc_html__( 'Sets the colour for your top social icons.', 'alurra' ), 'section' => 'alurra_nav_colours', ) ) ); // Footer Social bg $wp_customize->add_setting( 'alurra_footer_social_bg_colour', array( 'default' => '#b38a2d', 'transport' => 'postMessage', 'sanitize_callback' => 'alurra_sanitize_hex_colour' ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'alurra_footer_social_bg_colour', array( 'label' => esc_html__( 'Footer Social Background', 'alurra' ), 'description' => esc_html__( 'Sets the colour for your footer social icon backgrounds.', 'alurra' ), 'section' => 'alurra_nav_colours', ) ) ); // Footer Social icon $wp_customize->add_setting( 'alurra_footer_social_icon_colour', array( 'default' => '#fff', 'transport' => 'postMessage', 'sanitize_callback' => 'alurra_sanitize_hex_colour' ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'alurra_footer_social_icon_colour', array( 'label' => esc_html__( 'Footer Social Icon', 'alurra' ), 'description' => esc_html__( 'Sets the colour for your footer social icons.', 'alurra' ), 'section' => 'alurra_nav_colours', ) ) ); // Footer Social hover bg $wp_customize->add_setting( 'alurra_footer_social_bg_hover_colour', array( 'default' => '#333', 'transport' => 'postMessage', 'sanitize_callback' => 'alurra_sanitize_hex_colour' ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'alurra_footer_social_bg_hover_colour', array( 'label' => esc_html__( 'Footer Social Hover Background', 'alurra' ), 'description' => esc_html__( 'Sets the hover colour for your footer social icon backgrounds.', 'alurra' ), 'section' => 'alurra_nav_colours', ) ) ); // Footer Social hover icon $wp_customize->add_setting( 'alurra_footer_social_icon_hover_colour', array( 'default' => '#fff', 'transport' => 'postMessage', 'sanitize_callback' => 'alurra_sanitize_hex_colour' ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'alurra_footer_social_icon_hover_colour', array( 'label' => esc_html__( 'Footer Social Hover Icon', 'alurra' ), 'description' => esc_html__( 'Sets the hover colour for your footer social icons.', 'alurra' ), 'section' => 'alurra_nav_colours', ) ) ); /* --------------------------------------------------------------------------- FORM COLOURS Settings and Controls ------------------------------------------------------------------------------ */ // Button bg $wp_customize->add_setting( 'alurra_button_bg_colour', array( 'default' => '#a9b87b', 'transport' => 'postMessage', 'sanitize_callback' => 'alurra_sanitize_hex_colour' ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'alurra_button_bg_colour', array( 'label' => esc_html__( 'Button Background', 'alurra' ), 'description' => esc_html__( 'Sets the background colour for buttons.', 'alurra' ), 'section' => 'alurra_form_colours', ) ) ); // Button text $wp_customize->add_setting( 'alurra_button_text_colour', array( 'default' => '#fff', 'transport' => 'postMessage', 'sanitize_callback' => 'alurra_sanitize_hex_colour' ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'alurra_button_text_colour', array( 'label' => esc_html__( 'Button Text', 'alurra' ), 'description' => esc_html__( 'Sets the text colour for buttons.', 'alurra' ), 'section' => 'alurra_form_colours', ) ) ); // Button hover bg $wp_customize->add_setting( 'alurra_button_bg_hover_colour', array( 'default' => '#333', 'transport' => 'postMessage', 'sanitize_callback' => 'alurra_sanitize_hex_colour' ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'alurra_button_bg_hover_colour', array( 'label' => esc_html__( 'Button Hover Background', 'alurra' ), 'description' => esc_html__( 'Sets the background hover colour for buttons.', 'alurra' ), 'section' => 'alurra_form_colours', ) ) ); // Button hover text $wp_customize->add_setting( 'alurra_button_text_hover_colour', array( 'default' => '#fff', 'transport' => 'postMessage', 'sanitize_callback' => 'alurra_sanitize_hex_colour' ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'alurra_button_text_hover_colour', array( 'label' => esc_html__( 'Button Hover Text', 'alurra' ), 'description' => esc_html__( 'Sets the text hover colour for buttons.', 'alurra' ), 'section' => 'alurra_form_colours', ) ) ); // Input field placeholder $wp_customize->add_setting( 'alurra_form_placeholder_text_colour', array( 'default' => '#bababa', 'transport' => 'postMessage', 'sanitize_callback' => 'alurra_sanitize_hex_colour' ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'alurra_form_placeholder_text_colour', array( 'label' => esc_html__( 'Input Field Placeholder Text', 'alurra' ), 'description' => esc_html__( 'Sets the colour to the form field placeholder text.', 'alurra' ), 'section' => 'alurra_form_colours', ) ) ); } add_action( 'customize_register', 'alurra_customize_register_colour' );