add_panel( 'arche_theme_options', array( 'title' => __( 'Arche Theme', 'arche' ), 'capability' => 'edit_theme_options', 'description' => 'The core settings that let you customise the Arche theme easily.', 'priority' => 10 )); $wp_customize->add_section( 'arche_theme_settings', array( 'title' => __( 'Core Settings', 'arche' ), 'capability' => 'edit_theme_options', 'description' => __( 'Fundamental settings that allow you to customise the Arche theme just the way you want.', 'arche' ), 'priority' => 101, 'panel' => 'arche_theme_options' )); $wp_customize->add_section( 'arche_theme_meta', array( 'title' => __( 'Meta Data', 'arche' ), 'capability' => 'edit_theme_options', 'description' => __( 'Meta Data options that let you control the meta data in the HTML head of the page.', 'arche' ), 'priority' => 201, 'panel' => 'arche_theme_options' )); $wp_customize->add_section( 'arche_theme_style', array( 'title' => __( 'Style Options', 'arche' ), 'capability' => 'edit_theme_options', 'description' => __( 'Style Options that let you customise the design of the theme to match your branding.', 'arche' ), 'priority' => 301, 'panel' => 'arche_theme_options' )); $wp_customize->add_section( 'arche_theme_icons', array( 'title' => __( 'Touch Icons', 'arche' ), 'capability' => 'edit_theme_options', 'description' => __( 'Touch icons that can be used for bookmarks and favourite lists.', 'arche' ), 'priority' => 401, 'panel' => 'arche_theme_options' )); $wp_customize->add_section( 'arche_theme_socials', array( 'title' => __( 'Social Links', 'arche' ), 'capability' => 'edit_theme_options', 'description' => __( 'Social media settings that let you customise your social links within the theme.', 'arche' ), 'priority' => 501, 'panel' => 'arche_theme_options' )); // ONE - Core Settings // Creates an option that lets the user enable or disable the (grey) helper bar $wp_customize->add_setting( 'arche_theme_setting_helper', 'theme_helper', array( 'default' => true, 'type' => 'option', 'transport' => 'postMessage', 'sanitize_callback' == 'esc_url_raw' )); $wp_customize->add_control( new WP_Customize_Control ( $wp_customize, 'arche_theme_setting_helper', array( 'label' => __( 'Hide the Themes Top Bar', 'arche' ), 'section' => 'arche_theme_settings', 'settings' => 'arche_theme_setting_helper', 'type' => 'checkbox' ) )); // Creates an option that lets the user enable or disable sidebars $wp_customize->add_setting( 'arche_theme_setting_sidebars', 'theme_sidebars', array( 'default' => true, 'type' => 'option', 'transport' => 'postMessage', 'sanitize_callback' == 'esc_url_raw' )); $wp_customize->add_control( new WP_Customize_Control ( $wp_customize, 'arche_theme_setting_sidebars', array( 'label' => __( 'Show Sidebars on Website', 'arche' ), 'section' => 'arche_theme_settings', 'settings' => 'arche_theme_setting_sidebars', 'type' => 'checkbox' ) )); // Create an option that lets the user show or hide the EU Cookie Law notice $wp_customize->add_setting( 'arche_theme_setting_cookies', 'theme_cookies', array( 'default' => true, 'type' => 'option', 'transport' => 'postMessage', 'sanitize_callback' == 'esc_url_raw' )); $wp_customize->add_control( new WP_Customize_Control ( $wp_customize, 'arche_theme_setting_cookies', array( 'label' => __( 'Show EU Cookie Notice', 'arche' ), 'description' => 'If enabled, will show a notice in the bottom left warning users of cookies.', 'section' => 'arche_theme_settings', 'settings' => 'arche_theme_setting_cookies', 'type' => 'checkbox' ) )); // Create an option that lets the user show or hide the 'powered by' link in the footer $wp_customize->add_setting( 'arche_theme_setting_support', 'theme_support', array( 'default' => false, 'type' => 'option', 'transport' => 'postMessage', 'sanitize_callback' == 'esc_url_raw' )); $wp_customize->add_control( new WP_Customize_Control ( $wp_customize, 'arche_theme_setting_support', array( 'label' => __( 'Hide WordPress Footer Link', 'arche' ), 'section' => 'arche_theme_settings', 'settings' => 'arche_theme_setting_support', 'type' => 'checkbox' ) )); // Create an option that lets the user enable hooks for use within the theme $wp_customize->add_setting( 'arche_theme_setting_hooks', 'theme_hooks', array( 'default' => false, 'type' => 'option', 'transport' => 'postMessage', 'sanitize_callback' == 'esc_url_raw' )); $wp_customize->add_control( new WP_Customize_Control ( $wp_customize, 'arche_theme_setting_hooks', array( 'label' => __( 'Enable Theme Hooks', 'arche' ), 'description' => 'Setting to enable hooks within the theme to include or overwrite content.', 'section' => 'arche_theme_settings', 'settings' => 'arche_theme_setting_hooks', 'type' => 'checkbox' ) )); // Create an option that lets the user enter text for the secondary menu title $wp_customize->add_setting( 'arche_theme_setting_footer_menu_title_one', 'theme_footer_menu_one', array( 'default' => false, 'type' => 'option', 'transport' => 'postMessage', 'sanitize_callback' == 'esc_url_raw' )); $wp_customize->add_control( new WP_Customize_Control ( $wp_customize, 'arche_theme_setting_footer_menu_title_one', array( 'label' => __( 'Secondary Footer Menu Title', 'arche' ), 'description' => 'This field is for providing a custom title for the secondary menu. Defaults to Quick Links if nothing is entered.', 'section' => 'arche_theme_settings', 'settings' => 'arche_theme_setting_footer_menu_title_one' ) )); // Create an option that lets the user enter text for the tertiary menu title $wp_customize->add_setting( 'arche_theme_setting_footer_menu_title_two', 'theme_footer_menu_two', array( 'default' => false, 'type' => 'option', 'transport' => 'postMessage', 'sanitize_callback' == 'esc_url_raw' )); $wp_customize->add_control( new WP_Customize_Control ( $wp_customize, 'arche_theme_setting_footer_menu_title_two', array( 'label' => __( 'Tertiary Footer Menu Title', 'arche' ), 'description' => 'This field is for providing a custom title for the tertiary menu. Defaults to Quick Links if nothing is entered.', 'section' => 'arche_theme_settings', 'settings' => 'arche_theme_setting_footer_menu_title_two' ) )); // Create an option that lets the user enter text below the footer logo in the footer $wp_customize->add_setting( 'arche_theme_setting_biography', 'theme_biography', array( 'default' => false, 'type' => 'option', 'transport' => 'postMessage', 'sanitize_callback' == 'esc_url_raw' )); $wp_customize->add_control( new WP_Customize_Control ( $wp_customize, 'arche_theme_setting_biography', array( 'label' => __( 'Biography Footer Text', 'arche' ), 'description' => 'This lets you customise the small biography text in the footer below the logo.', 'section' => 'arche_theme_settings', 'settings' => 'arche_theme_setting_biography' ) )); /* TWO - Meta Data */ // Create an option that lets the user enable or disable meta author and descriptions $wp_customize->add_setting( 'arche_theme_meta_content', 'theme_content', array( 'default' => false, 'type' => 'option', 'transport' => 'postMessage', 'sanitize_callback' == 'esc_url_raw' )); $wp_customize->add_control( new WP_Customize_Control ( $wp_customize, 'arche_theme_meta_content', array( 'label' => __( 'Enable Extra Meta Data', 'arche' ), 'description' => 'An option that when enabled will insert meta tags for author and description data in the HTML head of the website.', 'section' => 'arche_theme_meta', 'settings' => 'arche_theme_meta_content', 'type' => 'checkbox' ) )); // Create an option that lets the user enable or disable pinch to zoom for mobiles $wp_customize->add_setting( 'arche_theme_meta_pinch', 'theme_pinch', array( 'default' => false, 'type' => 'option', 'transport' => 'postMessage', 'sanitize_callback' == 'esc_url_raw' )); $wp_customize->add_control( new WP_Customize_Control ( $wp_customize, 'arche_theme_meta_pinch', array( 'label' => __( 'Enable Pinch to Zoom (Mobile Only)', 'arche' ), 'description' => 'Enabling this will let your vistors using mobiles pinch to zoom into your content, this is recommended for user experience purposes.', 'section' => 'arche_theme_meta', 'settings' => 'arche_theme_meta_pinch', 'type' => 'checkbox' ) )); // Create an option that lets the user show a sitemap link in the (grey) helper bar $wp_customize->add_setting( 'arche_theme_meta_sitemap_opts', 'theme_sitemap_opts', array( 'default' => false, 'type' => 'option', 'transport' => 'postMessage', 'sanitize_callback' == 'esc_url_raw' )); $wp_customize->add_control( new WP_Customize_Control ( $wp_customize, 'arche_theme_meta_sitemap_opts', array( 'label' => __( 'Show the Sitemap Link', 'arche' ), 'description' => 'When enabled this option will display a link to the sitemap in the (grey) helper bar above the header.', 'section' => 'arche_theme_meta', 'settings' => 'arche_theme_meta_sitemap_opts', 'type' => 'checkbox' ) )); // Create an option that lets the user specify a URL to the sitemap $wp_customize->add_setting( 'arche_theme_meta_sitemap_url', 'theme_sitemap_url', array( 'default' => false, 'type' => 'option', 'transport' => 'postMessage', 'sanitize_callback' == 'esc_url_raw' )); $wp_customize->add_control( new WP_Customize_Control ( $wp_customize, 'arche_theme_meta_sitemap_url', array( 'label' => __( 'Link to Sitemap', 'arche' ), 'description' => 'Providing the above option is enabled, this will let you specify a URL to your Sitemap. Either a standard page or XML is recommended. Note: you MUST specify a full URL to an existing page (for example; http://www.example.com).', 'section' => 'arche_theme_meta', 'settings' => 'arche_theme_meta_sitemap_url', ) )); /* THREE - Style Options */ // Create an option that lets the user upload a custom logo for the theme $wp_customize->add_setting( 'arche_theme_style_logo', 'theme_logo', array( 'default' => false, 'type' => 'option', 'transport' => 'postMessage', 'sanitize_callback' == 'esc_url_raw' )); $wp_customize->add_control( new WP_Customize_Image_Control ( $wp_customize, 'arche_theme_style_logo', array( 'label' => __( 'Custom Logo', 'arche' ), 'description' => 'By default Arche uses your site name as a logo, but you can upload a custom image to overwrite that. For best results your logo should be no bigger than 152 x 72 pixels in png or jpg format.', 'section' => 'arche_theme_style', 'settings' => 'arche_theme_style_logo' ) )); // Create an option that lets the user enable a custom login screen design $wp_customize->add_setting( 'arche_theme_style_login', 'theme_login', array( 'default' => false, 'type' => 'option', 'transport' => 'postMessage', 'sanitize_callback' == 'esc_url_raw' )); $wp_customize->add_control( new WP_Customize_Control ( $wp_customize, 'arche_theme_style_login', array( 'label' => __( 'Enable Custom Arche Login Page', 'arche' ), 'description' => 'If enabled, will overwrite the default WordPress wp-login page with a more Arche appropriate design', 'section' => 'arche_theme_style', 'settings' => 'arche_theme_style_login', 'type' => 'checkbox' ) )); /* FOUR - Touch Icons */ // Create an option that lets the user upload a custom favicon (16) $wp_customize->add_setting( 'arche_theme_icons_favicon16', 'theme_favicon16', array( 'default' => false, 'type' => 'option', 'transport' => 'postMessage', 'sanitize_callback' == 'esc_url_raw' )); $wp_customize->add_control( new WP_Customize_Image_Control ( $wp_customize, 'arche_theme_icons_favicon16', array( 'label' => __( 'Favicon 16', 'arche' ), 'description' => 'Upload a custom favicon 16 x 16 in size, the default favicon used.', 'section' => 'arche_theme_icons', 'settings' => 'arche_theme_icons_favicon16' ) )); // Create an option that lets the user upload a custom favicon (32) $wp_customize->add_setting( 'arche_theme_icons_favicon32', 'theme_favicon32', array( 'default' => false, 'type' => 'option', 'transport' => 'postMessage', 'sanitize_callback' == 'esc_url_raw' )); $wp_customize->add_control( new WP_Customize_Image_Control ( $wp_customize, 'arche_theme_icons_favicon32', array( 'label' => __( 'Favicon 32', 'arche' ), 'description' => 'Upload a custom favicon 32 x 32 in size, the default favicon used.', 'section' => 'arche_theme_icons', 'settings' => 'arche_theme_icons_favicon32' ) )); // Create an option that lets the user upload a custom apple touch icon for 57 x 57 $wp_customize->add_setting( 'arche_theme_icons_touch57', 'theme_touch57', array( 'default' => false, 'type' => 'option', 'transport' => 'postMessage', 'sanitize_callback' == 'esc_url_raw' )); $wp_customize->add_control( new WP_Customize_Image_Control ( $wp_customize, 'arche_theme_icons_touch57', array( 'label' => __( 'Apple Touch Icon (57)', 'arche' ), 'description' => 'Upload a custom Apple Touch icon at 57 x 57 pixels.', 'section' => 'arche_theme_icons', 'settings' => 'arche_theme_icons_touch57' ) )); // Create an option that lets the user upload a custom apple touch icon for 60 x 60 $wp_customize->add_setting( 'arche_theme_icons_touch60', 'theme_touch60', array( 'default' => false, 'type' => 'option', 'transport' => 'postMessage', 'sanitize_callback' == 'esc_url_raw' )); $wp_customize->add_control( new WP_Customize_Image_Control ( $wp_customize, 'arche_theme_icons_touch60', array( 'label' => __( 'Apple Touch Icon (60)', 'arche' ), 'description' => 'Upload a custom Apple Touch icon at 60 x 60 pixels.', 'section' => 'arche_theme_icons', 'settings' => 'arche_theme_icons_touch60' ) )); // Create an option that lets the user upload a custom apple touch icon for 72 x 72 $wp_customize->add_setting( 'arche_theme_icons_touch72', 'theme_touch72', array( 'default' => false, 'type' => 'option', 'transport' => 'postMessage', 'sanitize_callback' == 'esc_url_raw' )); $wp_customize->add_control( new WP_Customize_Image_Control ( $wp_customize, 'arche_theme_icons_touch72', array( 'label' => __( 'Apple Touch Icon (72)', 'arche' ), 'description' => 'Upload a custom Apple Touch icon at 72 x 72 pixels.', 'section' => 'arche_theme_icons', 'settings' => 'arche_theme_icons_touch72' ) )); // Create an option that lets the user upload a custom apple touch icon for 76 x 76 $wp_customize->add_setting( 'arche_theme_icons_touch76', 'theme_touch76', array( 'default' => false, 'type' => 'option', 'transport' => 'postMessage', 'sanitize_callback' == 'esc_url_raw' )); $wp_customize->add_control( new WP_Customize_Image_Control ( $wp_customize, 'arche_theme_icons_touch76', array( 'label' => __( 'Apple Touch Icon (76)', 'arche' ), 'description' => 'Upload a custom Apple Touch icon at 76 x 76 pixels.', 'section' => 'arche_theme_icons', 'settings' => 'arche_theme_icons_touch76' ) )); // Create an option that lets the user upload a custom apple touch icon for 114 x 114 $wp_customize->add_setting( 'arche_theme_icons_touch114', 'theme_touch114', array( 'default' => false, 'type' => 'option', 'transport' => 'postMessage', 'sanitize_callback' == 'esc_url_raw' )); $wp_customize->add_control( new WP_Customize_Image_Control ( $wp_customize, 'arche_theme_icons_touch114', array( 'label' => __( 'Apple Touch Icon (114)', 'arche' ), 'description' => 'Upload a custom Apple Touch icon at 114 x 114 pixels.', 'section' => 'arche_theme_icons', 'settings' => 'arche_theme_icons_touch114' ) )); // Create an option that lets the user upload a custom apple touch icon for 120 x 120 $wp_customize->add_setting( 'arche_theme_icons_touch120', 'theme_touch120', array( 'default' => false, 'type' => 'option', 'transport' => 'postMessage', 'sanitize_callback' == 'esc_url_raw' )); $wp_customize->add_control( new WP_Customize_Image_Control ( $wp_customize, 'arche_theme_icons_touch120', array( 'label' => __( 'Apple Touch Icon (120)', 'arche' ), 'description' => 'Upload a custom Apple Touch icon at 120 x 120 pixels.', 'section' => 'arche_theme_icons', 'settings' => 'arche_theme_icons_touch120' ) )); // Create an option that lets the user upload a custom apple touch icon for 144 x 144 $wp_customize->add_setting( 'arche_theme_icons_touch144', 'theme_touch144', array( 'default' => false, 'type' => 'option', 'transport' => 'postMessage', 'sanitize_callback' == 'esc_url_raw' )); $wp_customize->add_control( new WP_Customize_Image_Control ( $wp_customize, 'arche_theme_icons_touch144', array( 'label' => __( 'Apple Touch Icon (144)', 'arche' ), 'description' => 'Upload a custom Apple Touch icon at 144 x 144 pixels.', 'section' => 'arche_theme_icons', 'settings' => 'arche_theme_icons_touch144' ) )); // Create an option that lets the user upload a custom apple touch icon for 180 x 180 $wp_customize->add_setting( 'arche_theme_icons_touch180', 'theme_touch180', array( 'default' => false, 'type' => 'option', 'transport' => 'postMessage', 'sanitize_callback' == 'esc_url_raw' )); $wp_customize->add_control( new WP_Customize_Image_Control ( $wp_customize, 'arche_theme_icons_touch180', array( 'label' => __( 'Apple Touch Icon (180)', 'arche' ), 'description' => 'Upload a custom Apple Touch icon at 180 x 180 pixels.', 'section' => 'arche_theme_icons', 'settings' => 'arche_theme_icons_touch180' ) )); // Create an option that lets the user upload a custom android / chrome icon $wp_customize->add_setting( 'arche_theme_icons_chrome', 'theme_chrome', array( 'default' => false, 'type' => 'option', 'transport' => 'postMessage', 'sanitize_callback' == 'esc_url_raw' )); $wp_customize->add_control( new WP_Customize_Image_Control ( $wp_customize, 'arche_theme_icons_chrome', array( 'label' => __( 'Android/Chrome Touch Icon', 'arche' ), 'description' => 'Upload a custom Android and Chrome icon at 192 x 192 pixels.', 'section' => 'arche_theme_icons', 'settings' => 'arche_theme_icons_chrome' ) )); // Create an option that lets the user upload a custom ms metro icon $wp_customize->add_setting( 'arche_theme_icons_msmetro', 'theme_msmetro', array( 'default' => false, 'type' => 'option', 'transport' => 'postMessage', 'sanitize_callback' == 'esc_url_raw' )); $wp_customize->add_control( new WP_Customize_Image_Control ( $wp_customize, 'arche_theme_icons_msmetro', array( 'label' => __( 'Windows Metro Icon', 'arche' ), 'description' => 'Upload a custom Windows Metro Icon at 144 x 144 pixels.', 'section' => 'arche_theme_icons', 'settings' => 'arche_theme_icons_msmetro' ) )); /* FIVE - Social Links */ // Create an option that lets the user enable social media share buttons on posts $wp_customize->add_setting( 'arche_theme_social_share', 'theme_share', array( 'default' => false, 'type' => 'option', 'transport' => 'postMessage', 'sanitize_callback' == 'esc_url_raw' )); $wp_customize->add_control( new WP_Customize_Control ( $wp_customize, 'arche_theme_social_share', array( 'label' => __( 'Enable Social Share Buttons', 'arche' ), 'description' => 'If enabled, this will display social media sharing buttons (only Facebook, Twitter and Google+) on posts.', 'section' => 'arche_theme_socials', 'settings' => 'arche_theme_social_share', 'type' => 'checkbox' ) )); // Create an option that lets the user enter a URL for their Facebook page $wp_customize->add_setting( 'arche_theme_social_facebook', 'theme_facebook', array( 'default' => false, 'type' => 'option', 'transport' => 'postMessage', 'sanitize_callback' == 'esc_url_raw' )); $wp_customize->add_control( new WP_Customize_Control ( $wp_customize, 'arche_theme_social_facebook', array( 'label' => __( 'Facebook Page URL', 'arche' ), 'description' => 'The full URL to your social media page/account.', 'section' => 'arche_theme_socials', 'settings' => 'arche_theme_social_facebook' ) )); // Create an option that lets the user enter a URL for their Twitter page $wp_customize->add_setting( 'arche_theme_social_twitter', 'theme_twitter', array( 'default' => false, 'type' => 'option', 'transport' => 'postMessage', 'sanitize_callback' == 'esc_url_raw' )); $wp_customize->add_control( new WP_Customize_Control ( $wp_customize, 'arche_theme_social_twitter', array( 'label' => __( 'Twitter Page URL', 'arche' ), 'description' => 'The full URL to your social media page/account.', 'section' => 'arche_theme_socials', 'settings' => 'arche_theme_social_twitter' ) )); // Create an option that lets the user enter a URL for their Instagram page $wp_customize->add_setting( 'arche_theme_social_instagram', 'theme_instagram', array( 'default' => false, 'type' => 'option', 'transport' => 'postMessage', 'sanitize_callback' == 'esc_url_raw' )); $wp_customize->add_control( new WP_Customize_Control ( $wp_customize, 'arche_theme_social_instagram', array( 'label' => __( 'Instagram Page URL', 'arche' ), 'description' => 'The full URL to your social media page/account.', 'section' => 'arche_theme_socials', 'settings' => 'arche_theme_social_instagram' ) )); // Create an option that lets the user enter a URL for their Google+ page $wp_customize->add_setting( 'arche_theme_social_google', 'theme_google', array( 'default' => false, 'type' => 'option', 'transport' => 'postMessage', 'sanitize_callback' == 'esc_url_raw' )); $wp_customize->add_control( new WP_Customize_Control ( $wp_customize, 'arche_theme_social_google', array( 'label' => __( 'Google+ Page URL', 'arche' ), 'description' => 'The full URL to your social media page/account.', 'section' => 'arche_theme_socials', 'settings' => 'arche_theme_social_google' ) )); // Create an option that lets the user enter a URL for their Pinterest page $wp_customize->add_setting( 'arche_theme_social_pinterest', 'theme_pinterest', array( 'default' => false, 'type' => 'option', 'transport' => 'postMessage', 'sanitize_callback' == 'esc_url_raw' )); $wp_customize->add_control( new WP_Customize_Control ( $wp_customize, 'arche_theme_social_pinterest', array( 'label' => __( 'Pinterest Page URL', 'arche' ), 'description' => 'The full URL to your social media page/account.', 'section' => 'arche_theme_socials', 'settings' => 'arche_theme_social_pinterest' ) )); // Create an option that lets the user enter a URL for their YouTube page $wp_customize->add_setting( 'arche_theme_social_youtube', 'theme_youtube', array( 'default' => false, 'type' => 'option', 'transport' => 'postMessage', 'sanitize_callback' == 'esc_url_raw' )); $wp_customize->add_control( new WP_Customize_Control ( $wp_customize, 'arche_theme_social_youtube', array( 'label' => __( 'YouTube Page URL', 'arche' ), 'description' => 'The full URL to your social media page/account.', 'section' => 'arche_theme_socials', 'settings' => 'arche_theme_social_youtube' ) )); // Create an option that lets the user enter a URL for their LinkedIn page $wp_customize->add_setting( 'arche_theme_social_linkedin', 'theme_linkedin', array( 'default' => false, 'type' => 'option', 'transport' => 'postMessage', 'sanitize_callback' == 'esc_url_raw' )); $wp_customize->add_control( new WP_Customize_Control ( $wp_customize, 'arche_theme_social_linkedin', array( 'label' => __( 'LinkedIn Page URL', 'arche' ), 'description' => 'The full URL to your social media page/account.', 'section' => 'arche_theme_socials', 'settings' => 'arche_theme_social_linkedin' ) )); // Create an option that lets the user enter an email address $wp_customize->add_setting( 'arche_theme_social_email', 'theme_email', array( 'default' => false, 'type' => 'option', 'transport' => 'postMessage', 'sanitize_callback' == 'esc_url_raw' )); $wp_customize->add_control( new WP_Customize_Control ( $wp_customize, 'arche_theme_social_email', array( 'label' => __( 'Email Address', 'arche' ), 'description' => 'This must be a valid Email Address and will create an active MailTo link for visitors.', 'section' => 'arche_theme_socials', 'settings' => 'arche_theme_social_email' ) )); // Finish the declarations of customisations. // We just need to add the action now... } // Add the action for our theme customisations! add_action( 'customize_register', 'arche_customisation' ); // Done!