123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771 |
- <?php
- /**
- * This file adds the Customizer to the Captivating Theme.
- *
- * @package Captivating
- * @subpackage Customizations
- * @link http://restored316designs.com/themes
- * @author Lauren Gaige // Restored 316 LLC
- * @copyright Copyright (c) 2015, Restored 316 LLC, Released 08/09/2017
- * @license GPL-2.0+
- */
-
- //* Get default primary colors for Customizer.
- function captivating_customizer_get_default_text_color() {
- return '#333333';
- }
- function captivating_customizer_get_default_links_color() {
- return '#55c7cf';
- }
- function captivating_customizer_get_default_linkshover_color() {
- return '#333333';
- }
- function captivating_customizer_get_default_button_color() {
- return '#ffffff';
- }
- function captivating_customizer_get_default_buttonborder_color() {
- return '#333333';
- }
- function captivating_customizer_get_default_buttontext_color() {
- return '#333333';
- }
- function captivating_customizer_get_default_buttonhover_color() {
- return '#55c7cf';
- }
- function captivating_customizer_get_default_buttonhoverborder_color() {
- return '#55c7cf';
- }
- function captivating_customizer_get_default_buttonhovertext_color() {
- return '#ffffff';
- }
- function captivating_customizer_get_default_announcement_color() {
- return '#f7f9fc';
- }
- function captivating_customizer_get_default_announcementtext_color() {
- return '#333333';
- }
- function captivating_customizer_get_default_featured_color() {
- return '#f7f9fc';
- }
- function captivating_customizer_get_default_newsletter_color() {
- return '#f7f9fc';
- }
- function captivating_customizer_get_default_newslettertext_color() {
- return '#333333';
- }
- function captivating_customizer_get_default_cta_color() {
- return '#f7f9fc';
- }
- function captivating_customizer_get_default_ctatext_color() {
- return '#333333';
- }
- function captivating_customizer_get_default_footer_color() {
- return '#f7f9fc';
- }
- function captivating_customizer_get_default_footertext_color() {
- return '#333333';
- }
- function captivating_customizer_get_default_readmorelink_color() {
- return '#55c7cf';
- }
- function captivating_customizer_get_default_widgettitle1_color() {
- return '#fff7e1';
- }
- function captivating_customizer_get_default_widgettitle2_color() {
- return '#fff4f0';
- }
- function captivating_customizer_get_default_widgettitle3_color() {
- return '#f7f9fc';
- }
- function captivating_customizer_get_default_sidebarwidgettitle1_color() {
- return '#fff7e1';
- }
- function captivating_customizer_get_default_sidebarwidgettitle2_color() {
- return '#fff4f0';
- }
- function captivating_customizer_get_default_sidebarwidgettitle3_color() {
- return '#f7f9fc';
- }
- function captivating_customizer_get_default_morecategory1_color() {
- return '#ffc933';
- }
- function captivating_customizer_get_default_morecategory2_color() {
- return '#f6748e';
- }
- function captivating_customizer_get_default_morecategory3_color() {
- return '#55c7cf';
- }
- //* Register settings and controls with the Customizer.
- add_action( 'customize_register', 'captivating_customizer_register' );
- function captivating_customizer_register() {
- global $wp_customize;
-
- $wp_customize->add_setting(
- 'captivating_text_color',
- array(
- 'default' => captivating_customizer_get_default_text_color(),
- 'sanitize_callback' => 'sanitize_hex_color',
- )
- );
- $wp_customize->add_setting(
- 'captivating_links_color',
- array(
- 'default' => captivating_customizer_get_default_links_color(),
- 'sanitize_callback' => 'sanitize_hex_color',
- )
- );
-
- $wp_customize->add_setting(
- 'captivating_linkshover_color',
- array(
- 'default' => captivating_customizer_get_default_linkshover_color(),
- 'sanitize_callback' => 'sanitize_hex_color',
- )
- );
-
- $wp_customize->add_setting(
- 'captivating_button_color',
- array(
- 'default' => captivating_customizer_get_default_button_color(),
- 'sanitize_callback' => 'sanitize_hex_color',
- )
- );
-
- $wp_customize->add_setting(
- 'captivating_buttonborder_color',
- array(
- 'default' => captivating_customizer_get_default_buttonborder_color(),
- 'sanitize_callback' => 'sanitize_hex_color',
- )
- );
-
- $wp_customize->add_setting(
- 'captivating_buttontext_color',
- array(
- 'default' => captivating_customizer_get_default_buttontext_color(),
- 'sanitize_callback' => 'sanitize_hex_color',
- )
- );
-
- $wp_customize->add_setting(
- 'captivating_buttonhover_color',
- array(
- 'default' => captivating_customizer_get_default_buttonhover_color(),
- 'sanitize_callback' => 'sanitize_hex_color',
- )
- );
-
- $wp_customize->add_setting(
- 'captivating_buttonhoverborder_color',
- array(
- 'default' => captivating_customizer_get_default_buttonhoverborder_color(),
- 'sanitize_callback' => 'sanitize_hex_color',
- )
- );
-
- $wp_customize->add_setting(
- 'captivating_buttonhovertext_color',
- array(
- 'default' => captivating_customizer_get_default_buttonhovertext_color(),
- 'sanitize_callback' => 'sanitize_hex_color',
- )
- );
-
- $wp_customize->add_setting(
- 'captivating_announcement_color',
- array(
- 'default' => captivating_customizer_get_default_announcement_color(),
- 'sanitize_callback' => 'sanitize_hex_color',
- )
- );
-
- $wp_customize->add_setting(
- 'captivating_announcementtext_color',
- array(
- 'default' => captivating_customizer_get_default_announcementtext_color(),
- 'sanitize_callback' => 'sanitize_hex_color',
- )
- );
-
- $wp_customize->add_setting(
- 'captivating_featured_color',
- array(
- 'default' => captivating_customizer_get_default_featured_color(),
- 'sanitize_callback' => 'sanitize_hex_color',
- )
- );
-
- $wp_customize->add_setting(
- 'captivating_newsletter_color',
- array(
- 'default' => captivating_customizer_get_default_newsletter_color(),
- 'sanitize_callback' => 'sanitize_hex_color',
- )
- );
-
- $wp_customize->add_setting(
- 'captivating_newslettertext_color',
- array(
- 'default' => captivating_customizer_get_default_newslettertext_color(),
- 'sanitize_callback' => 'sanitize_hex_color',
- )
- );
-
- $wp_customize->add_setting(
- 'captivating_cta_color',
- array(
- 'default' => captivating_customizer_get_default_cta_color(),
- 'sanitize_callback' => 'sanitize_hex_color',
- )
- );
-
- $wp_customize->add_setting(
- 'captivating_ctatext_color',
- array(
- 'default' => captivating_customizer_get_default_ctatext_color(),
- 'sanitize_callback' => 'sanitize_hex_color',
- )
- );
-
- $wp_customize->add_setting(
- 'captivating_footer_color',
- array(
- 'default' => captivating_customizer_get_default_footer_color(),
- 'sanitize_callback' => 'sanitize_hex_color',
- )
- );
-
- $wp_customize->add_setting(
- 'captivating_footertext_color',
- array(
- 'default' => captivating_customizer_get_default_footertext_color(),
- 'sanitize_callback' => 'sanitize_hex_color',
- )
- );
-
- $wp_customize->add_setting(
- 'captivating_readmorelink_color',
- array(
- 'default' => captivating_customizer_get_default_readmorelink_color(),
- 'sanitize_callback' => 'sanitize_hex_color',
- )
- );
-
- $wp_customize->add_setting(
- 'captivating_widgettitle1_color',
- array(
- 'default' => captivating_customizer_get_default_widgettitle1_color(),
- 'sanitize_callback' => 'sanitize_hex_color',
- )
- );
-
- $wp_customize->add_setting(
- 'captivating_widgettitle2_color',
- array(
- 'default' => captivating_customizer_get_default_widgettitle2_color(),
- 'sanitize_callback' => 'sanitize_hex_color',
- )
- );
-
- $wp_customize->add_setting(
- 'captivating_widgettitle3_color',
- array(
- 'default' => captivating_customizer_get_default_widgettitle3_color(),
- 'sanitize_callback' => 'sanitize_hex_color',
- )
- );
-
- $wp_customize->add_setting(
- 'captivating_sidebarwidgettitle1_color',
- array(
- 'default' => captivating_customizer_get_default_sidebarwidgettitle1_color(),
- 'sanitize_callback' => 'sanitize_hex_color',
- )
- );
-
- $wp_customize->add_setting(
- 'captivating_sidebarwidgettitle2_color',
- array(
- 'default' => captivating_customizer_get_default_sidebarwidgettitle2_color(),
- 'sanitize_callback' => 'sanitize_hex_color',
- )
- );
-
- $wp_customize->add_setting(
- 'captivating_sidebarwidgettitle3_color',
- array(
- 'default' => captivating_customizer_get_default_sidebarwidgettitle3_color(),
- 'sanitize_callback' => 'sanitize_hex_color',
- )
- );
-
- $wp_customize->add_setting(
- 'captivating_morecategory1_color',
- array(
- 'default' => captivating_customizer_get_default_morecategory1_color(),
- 'sanitize_callback' => 'sanitize_hex_color',
- )
- );
-
- $wp_customize->add_setting(
- 'captivating_morecategory2_color',
- array(
- 'default' => captivating_customizer_get_default_morecategory2_color(),
- 'sanitize_callback' => 'sanitize_hex_color',
- )
- );
-
- $wp_customize->add_setting(
- 'captivating_morecategory3_color',
- array(
- 'default' => captivating_customizer_get_default_morecategory3_color(),
- 'sanitize_callback' => 'sanitize_hex_color',
- )
- );
-
- //* Add Labels to add headings.
-
- $wp_customize->add_control(
- new WP_Customize_Color_Control(
- $wp_customize,
- 'captivating_text_color',
- array(
- 'description' => __( 'Change the default color for all the body text across the site.', 'captivating' ),
- 'label' => __( 'Main Text Color', 'captivating' ),
- 'section' => 'colors',
- 'settings' => 'captivating_text_color',
- )
- )
- );
- $wp_customize->add_control(
- new WP_Customize_Color_Control(
- $wp_customize,
- 'captivating_links_color',
- array(
- 'description' => __( 'Change the default color for all your links across the site', 'captivating' ),
- 'label' => __( 'Link Color', 'captivating' ),
- 'section' => 'colors',
- 'settings' => 'captivating_links_color',
- )
- )
- );
-
- $wp_customize->add_control(
- new WP_Customize_Color_Control(
- $wp_customize,
- 'captivating_linkshover_color',
- array(
- 'description' => __( 'Change the default color for all your links when hovered on across the site', 'captivating' ),
- 'label' => __( 'Link Color ON HOVER', 'captivating' ),
- 'section' => 'colors',
- 'settings' => 'captivating_linkshover_color',
- )
- )
- );
-
- $wp_customize->add_control(
- new WP_Customize_Color_Control(
- $wp_customize,
- 'captivating_button_color',
- array(
- 'description' => __( 'Change the default background color for all the buttons.', 'captivating' ),
- 'label' => __( 'Button Background Color', 'captivating' ),
- 'section' => 'colors',
- 'settings' => 'captivating_button_color',
- )
- )
- );
-
- $wp_customize->add_control(
- new WP_Customize_Color_Control(
- $wp_customize,
- 'captivating_buttonborder_color',
- array(
- 'description' => __( 'Change the default color for the border on all the buttons.', 'captivating' ),
- 'label' => __( 'Button Border Color', 'captivating' ),
- 'section' => 'colors',
- 'settings' => 'captivating_buttonborder_color',
- )
- )
- );
-
- $wp_customize->add_control(
- new WP_Customize_Color_Control(
- $wp_customize,
- 'captivating_buttontext_color',
- array(
- 'description' => __( 'Change the default color for the text on the buttons.', 'captivating' ),
- 'label' => __( 'Button Text Color', 'captivating' ),
- 'section' => 'colors',
- 'settings' => 'captivating_buttontext_color',
- )
- )
- );
-
- $wp_customize->add_control(
- new WP_Customize_Color_Control(
- $wp_customize,
- 'captivating_buttonhover_color',
- array(
- 'description' => __( 'Change the default background color for all the buttons when hovered.', 'captivating' ),
- 'label' => __( 'Button Background Color ON HOVER', 'captivating' ),
- 'section' => 'colors',
- 'settings' => 'captivating_buttonhover_color',
- )
- )
- );
-
- $wp_customize->add_control(
- new WP_Customize_Color_Control(
- $wp_customize,
- 'captivating_buttonhoverborder_color',
- array(
- 'description' => __( 'Change the default color for the border on all the buttons when hovered.', 'captivating' ),
- 'label' => __( 'Button Hover Border Color ON HOVER', 'captivating' ),
- 'section' => 'colors',
- 'settings' => 'captivating_buttonhoverborder_color',
- )
- )
- );
-
- $wp_customize->add_control(
- new WP_Customize_Color_Control(
- $wp_customize,
- 'captivating_buttonhovertext_color',
- array(
- 'description' => __( 'Change the default color for the text on the buttons when hovered.', 'captivating' ),
- 'label' => __( 'Button Hover Text Color ON HOVER', 'captivating' ),
- 'section' => 'colors',
- 'settings' => 'captivating_buttonhovertext_color',
- )
- )
- );
-
- $wp_customize->add_control(
- new WP_Customize_Color_Control(
- $wp_customize,
- 'captivating_announcement_color',
- array(
- 'description' => __( 'Change the default background color on the top announcement bar.', 'captivating' ),
- 'label' => __( 'Announcement Background Color', 'captivating' ),
- 'section' => 'colors',
- 'settings' => 'captivating_announcement_color',
- )
- )
- );
-
- $wp_customize->add_control(
- new WP_Customize_Color_Control(
- $wp_customize,
- 'captivating_announcementtext_color',
- array(
- 'description' => __( 'Change the default text color on the top announcement bar.', 'captivating' ),
- 'label' => __( 'Announcement Text Color', 'captivating' ),
- 'section' => 'colors',
- 'settings' => 'captivating_announcementtext_color',
- )
- )
- );
-
- $wp_customize->add_control(
- new WP_Customize_Color_Control(
- $wp_customize,
- 'captivating_featured_color',
- array(
- 'description' => __( 'Change the default background color on the featured content section at the top of the home page and top of the custom blog template.', 'captivating' ),
- 'label' => __( 'Featured Content Background', 'captivating' ),
- 'section' => 'colors',
- 'settings' => 'captivating_featured_color',
- )
- )
- );
-
- $wp_customize->add_control(
- new WP_Customize_Color_Control(
- $wp_customize,
- 'captivating_newsletter_color',
- array(
- 'description' => __( 'Change the default background color of the subscription box on the sidebar, the convert kit newsletter, as well as the background on the categories in the category index.', 'captivating' ),
- 'label' => __( 'Newsletter Background', 'captivating' ),
- 'section' => 'colors',
- 'settings' => 'captivating_newsletter_color',
- )
- )
- );
-
- $wp_customize->add_control(
- new WP_Customize_Color_Control(
- $wp_customize,
- 'captivating_newslettertext_color',
- array(
- 'description' => __( 'Change the default text color of the subscription box on the sidebar, the convert kit newsletter, as well as the background on the categories in the category index.', 'captivating' ),
- 'label' => __( 'Newsletter Text', 'captivating' ),
- 'section' => 'colors',
- 'settings' => 'captivating_newslettertext_color',
- )
- )
- );
-
- $wp_customize->add_control(
- new WP_Customize_Color_Control(
- $wp_customize,
- 'captivating_cta_color',
- array(
- 'description' => __( 'Change the default background color of the Site Wide CTA.', 'captivating' ),
- 'label' => __( 'CTA Background', 'captivating' ),
- 'section' => 'colors',
- 'settings' => 'captivating_cta_color',
- )
- )
- );
-
- $wp_customize->add_control(
- new WP_Customize_Color_Control(
- $wp_customize,
- 'captivating_ctatext_color',
- array(
- 'description' => __( 'Change the default text color of the Site Wide CTA.', 'captivating' ),
- 'label' => __( 'CTA Text', 'captivating' ),
- 'section' => 'colors',
- 'settings' => 'captivating_ctatext_color',
- )
- )
- );
-
- $wp_customize->add_control(
- new WP_Customize_Color_Control(
- $wp_customize,
- 'captivating_footer_color',
- array(
- 'description' => __( 'Change the default background color of the footer credits. This also controls the color of your drop down menus.', 'captivating' ),
- 'label' => __( 'Footer Background Color', 'captivating' ),
- 'section' => 'colors',
- 'settings' => 'captivating_footer_color',
- )
- )
- );
-
- $wp_customize->add_control(
- new WP_Customize_Color_Control(
- $wp_customize,
- 'captivating_footertext_color',
- array(
- 'description' => __( 'Change the default text color of the footer credits.', 'captivating' ),
- 'label' => __( 'Footer Text Color', 'captivating' ),
- 'section' => 'colors',
- 'settings' => 'captivating_footertext_color',
- )
- )
- );
-
- $wp_customize->add_control(
- new WP_Customize_Color_Control(
- $wp_customize,
- 'captivating_readmorelink_color',
- array(
- 'description' => __( 'Change the default color of the read more links.', 'captivating' ),
- 'label' => __( 'Read More Link', 'captivating' ),
- 'section' => 'colors',
- 'settings' => 'captivating_readmorelink_color',
- )
- )
- );
-
- $wp_customize->add_control(
- new WP_Customize_Color_Control(
- $wp_customize,
- 'captivating_widgettitle1_color',
- array(
- 'description' => __( 'Change the default border color for the widget titles.', 'captivating' ),
- 'label' => __( 'Widget Title Border 1', 'captivating' ),
- 'section' => 'colors',
- 'settings' => 'captivating_widgettitle1_color',
- )
- )
- );
-
- $wp_customize->add_control(
- new WP_Customize_Color_Control(
- $wp_customize,
- 'captivating_widgettitle2_color',
- array(
- 'description' => __( 'Change the default border color for the widget titles.', 'captivating' ),
- 'label' => __( 'Widget Title Border 2', 'captivating' ),
- 'section' => 'colors',
- 'settings' => 'captivating_widgettitle2_color',
- )
- )
- );
-
- $wp_customize->add_control(
- new WP_Customize_Color_Control(
- $wp_customize,
- 'captivating_widgettitle3_color',
- array(
- 'description' => __( 'Change the default border color for the widget titles.', 'captivating' ),
- 'label' => __( 'Widget Title Border 3', 'captivating' ),
- 'section' => 'colors',
- 'settings' => 'captivating_widgettitle3_color',
- )
- )
- );
-
- $wp_customize->add_control(
- new WP_Customize_Color_Control(
- $wp_customize,
- 'captivating_sidebarwidgettitle1_color',
- array(
- 'description' => __( 'Change the default border color for the widget titles on the primary sidebar.', 'captivating' ),
- 'label' => __( 'Sidebar Widget Title Border 1', 'captivating' ),
- 'section' => 'colors',
- 'settings' => 'captivating_sidebarwidgettitle1_color',
- )
- )
- );
-
- $wp_customize->add_control(
- new WP_Customize_Color_Control(
- $wp_customize,
- 'captivating_sidebarwidgettitle2_color',
- array(
- 'description' => __( 'Change the default border color for the widget titles on the primary sidebar.', 'captivating' ),
- 'label' => __( 'Sidebar Widget Title Border 2', 'captivating' ),
- 'section' => 'colors',
- 'settings' => 'captivating_sidebarwidgettitle2_color',
- )
- )
- );
-
- $wp_customize->add_control(
- new WP_Customize_Color_Control(
- $wp_customize,
- 'captivating_sidebarwidgettitle3_color',
- array(
- 'description' => __( 'Change the default border color for the widget titles on the primary sidebar.', 'captivating' ),
- 'label' => __( 'Sidebar Widget Title Border 3', 'captivating' ),
- 'section' => 'colors',
- 'settings' => 'captivating_sidebarwidgettitle3_color',
- )
- )
- );
-
- $wp_customize->add_control(
- new WP_Customize_Color_Control(
- $wp_customize,
- 'captivating_morecategory1_color',
- array(
- 'description' => __( 'Change the default link color of the more from category link.', 'captivating' ),
- 'label' => __( 'More from Category Link 1', 'captivating' ),
- 'section' => 'colors',
- 'settings' => 'captivating_morecategory1_color',
- )
- )
- );
-
- $wp_customize->add_control(
- new WP_Customize_Color_Control(
- $wp_customize,
- 'captivating_morecategory2_color',
- array(
- 'description' => __( 'Change the default link color of the more from category link.', 'captivating' ),
- 'label' => __( 'More from Category Link 2', 'captivating' ),
- 'section' => 'colors',
- 'settings' => 'captivating_morecategory2_color',
- )
- )
- );
-
- $wp_customize->add_control(
- new WP_Customize_Color_Control(
- $wp_customize,
- 'captivating_morecategory3_color',
- array(
- 'description' => __( 'Change the default link color of the more from category link.', 'captivating' ),
- 'label' => __( 'More from Category Link 3', 'captivating' ),
- 'section' => 'colors',
- 'settings' => 'captivating_morecategory3_color',
- )
- )
- );
-
-
- //* Add front page setting to the Customizer
- $wp_customize->add_section( 'captivating_blog_section', array(
- 'title' => __( 'Front Page Content Settings', 'captivating' ),
- 'description' => __( 'Choose if you would like to display the content section below widget sections on the front page.', 'captivating' ),
- 'priority' => 75.01,
- ));
- //* Add front page setting to the Customizer
- $wp_customize->add_setting( 'captivating_blog_setting', array(
- 'default' => 'true',
- 'capability' => 'edit_theme_options',
- 'type' => 'option',
- ));
- $wp_customize->add_control( new WP_Customize_Control(
- $wp_customize, 'captivating_blog_control', array(
- 'label' => __( 'Front Page Content Section Display', 'captivating' ),
- 'description' => __( 'Show or Hide the content section. The section will display on the front page by default.', 'captivating' ),
- 'section' => 'captivating_blog_section',
- 'settings' => 'captivating_blog_setting',
- 'type' => 'select',
- 'choices' => array(
- 'false' => __( 'Hide content section', 'captivating' ),
- 'true' => __( 'Show content section', 'captivating' ),
- ),
- ))
- );
-
- $wp_customize->add_setting( 'captivating_blog_text', array(
- 'default' => __( 'Latest from the Blog', 'captivating' ),
- 'capability' => 'edit_theme_options',
- 'sanitize_callback' => 'wp_kses_post',
- 'type' => 'option',
- ));
- $wp_customize->add_control( new WP_Customize_Control(
- $wp_customize, 'captivating_blog_text_control', array(
- 'label' => __( 'Blog Section Heading Text', 'captivating' ),
- 'description' => __( 'Choose the heading text you would like to display above posts on the front page.<br /><br />This text will show when displaying posts and using widgets on the front page.', 'captivating' ),
- 'section' => 'captivating_blog_section',
- 'settings' => 'captivating_blog_text',
- 'type' => 'text',
- ))
- );
- }
|