123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451 |
- <?php
- /**
- * This file adds the required CSS for 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+
- */
- add_action( 'wp_enqueue_scripts', 'captivating_css' );
- /**
- * Checks the settings for the link color color, primary color, and header
- * If any of these value are set the appropriate CSS is output
- *
- * @since 1.0.0
- */
- function captivating_css() {
- $handle = defined( 'CHILD_THEME_NAME' ) && CHILD_THEME_NAME ? sanitize_title_with_dashes( CHILD_THEME_NAME ) : 'child-theme';
- $color_text = get_theme_mod( 'captivating_text_color', captivating_customizer_get_default_text_color() );
- $color_links = get_theme_mod( 'captivating_links_color', captivating_customizer_get_default_links_color() );
- $color_linkshover = get_theme_mod( 'captivating_linkshover_color', captivating_customizer_get_default_linkshover_color() );
- $color_button = get_theme_mod( 'captivating_button_color', captivating_customizer_get_default_button_color() );
- $color_buttonborder = get_theme_mod( 'captivating_buttonborder_color', captivating_customizer_get_default_buttonborder_color() );
- $color_buttontext = get_theme_mod( 'captivating_buttontext_color', captivating_customizer_get_default_buttontext_color() );
- $color_buttonhover = get_theme_mod( 'captivating_buttonhover_color', captivating_customizer_get_default_buttonhover_color() );
- $color_buttonhoverborder = get_theme_mod( 'captivating_buttonhoverborder_color', captivating_customizer_get_default_buttonhoverborder_color() );
- $color_buttonhovertext = get_theme_mod( 'captivating_buttonhovertext_color', captivating_customizer_get_default_buttonhovertext_color() );
- $color_announcement = get_theme_mod( 'captivating_announcement_color', captivating_customizer_get_default_announcement_color() );
- $color_announcementtext = get_theme_mod( 'captivating_announcementtext_color', captivating_customizer_get_default_announcementtext_color() );
- $color_featured = get_theme_mod( 'captivating_featured_color', captivating_customizer_get_default_featured_color() );
- $color_newsletter = get_theme_mod( 'captivating_newsletter_color', captivating_customizer_get_default_newsletter_color() );
- $color_newslettertext = get_theme_mod( 'captivating_newslettertext_color', captivating_customizer_get_default_newslettertext_color() );
- $color_cta = get_theme_mod( 'captivating_cta_color', captivating_customizer_get_default_cta_color() );
- $color_ctatext = get_theme_mod( 'captivating_ctatext_color', captivating_customizer_get_default_ctatext_color() );
- $color_footer = get_theme_mod( 'captivating_footer_color', captivating_customizer_get_default_footer_color() );
- $color_footertext = get_theme_mod( 'captivating_footertext_color', captivating_customizer_get_default_footertext_color() );
- $color_readmorelink = get_theme_mod( 'captivating_readmorelink_color', captivating_customizer_get_default_readmorelink_color() );
- $color_widgettitle1 = get_theme_mod( 'captivating_widgettitle1_color', captivating_customizer_get_default_widgettitle1_color() );
- $color_widgettitle2 = get_theme_mod( 'captivating_widgettitle2_color', captivating_customizer_get_default_widgettitle2_color() );
- $color_widgettitle3 = get_theme_mod( 'captivating_widgettitle3_color', captivating_customizer_get_default_widgettitle3_color() );
- $color_sidebarwidgettitle1 = get_theme_mod( 'captivating_sidebarwidgettitle1_color', captivating_customizer_get_default_sidebarwidgettitle1_color() );
- $color_sidebarwidgettitle2 = get_theme_mod( 'captivating_sidebarwidgettitle2_color', captivating_customizer_get_default_sidebarwidgettitle2_color() );
- $color_sidebarwidgettitle3 = get_theme_mod( 'captivating_sidebarwidgettitle3_color', captivating_customizer_get_default_sidebarwidgettitle3_color() );
- $color_morecategory1 = get_theme_mod( 'captivating_morecategory1_color', captivating_customizer_get_default_morecategory1_color() );
- $color_morecategory2 = get_theme_mod( 'captivating_morecategory2_color', captivating_customizer_get_default_morecategory2_color() );
- $color_morecategory3 = get_theme_mod( 'captivating_morecategory3_color', captivating_customizer_get_default_morecategory3_color() );
- $css = '';
- $css .= ( captivating_customizer_get_default_text_color() !== $color_text ) ? sprintf( '
- body,
- .entry-title a,
- .sidebar .widget-title a,
- .widget-title,
- h1, h2, h3, h4, h5, h6,
- .site-title a,
- .site-title a:hover,
- .genesis-nav-menu a {
- color: %1$s;
- }
-
- .slick-arrow {
- color: %1$s !important;
- }
-
- *::-moz-placeholder {
- color: %1$s;
- }
-
- ', $color_text ) : '';
-
- $css .= ( captivating_customizer_get_default_links_color() !== $color_links ) ? sprintf( '
- a,
- .entry-title a:hover,
- .genesis-nav-menu a:hover,
- .genesis-nav-menu .current-menu-item > a,
- .single-post .entry-content h1, .page .entry-content h1,
- .single-post article h3, .page article h3,
- .single-post article h4, .page article h4,
- .archive-pagination li a,
- .woocommerce .product-title:hover {
- color: %1$s;
- }
-
- .archive-pagination .active a,
- .archive-pagination li a:hover,
- a.wprm-jump-to-recipe-shortcode {
- border-color: %1$s;
- }
-
- .woocommerce .woocommerce-message,
- .woocommerce .woocommerce-info {
- border-top-color: %1$s !important;
- }
-
- .woocommerce .woocommerce-message::before,
- .woocommerce .woocommerce-info::before,
- .woocommerce div.product p.price,
- .woocommerce div.product span.price,
- .woocommerce ul.products li.product .price,
- .woocommerce form .form-row .required,
- .ninja-forms-req-symbol,
- .nf-error-msg,
- .slick-arrow:hover {
- color: %1$s !important;
- }
-
- .woocommerce .site-inner #respond input#submit,
- .woocommerce .site-inner a.button,
- .woocommerce .site-inner button.button,
- .woocommerce .site-inner input.button {
- color: %1$s !important;
- }
-
- .woocommerce .site-inner #respond input#submit,
- .woocommerce .site-inner a.button,
- .woocommerce .site-inner button.button,
- .woocommerce .site-inner input.button {
- border-color: %1$s !important;
- }
-
- ', $color_links ) : '';
-
- $css .= ( captivating_customizer_get_default_linkshover_color() !== $color_linkshover ) ? sprintf( '
- a:hover {
- color: %1$s;
- }
-
- .woocommerce #respond input#submit:hover,
- .woocommerce a.button:hover,
- .woocommerce button.button:hover,
- .woocommerce input.button:hover {
- color: %1$s !important;
- }
-
- .woocommerce #respond input#submit:hover,
- .woocommerce a.button:hover,
- .woocommerce button.button:hover,
- .woocommerce input.button:hover {
- border-color: %1$s !important;
- }
-
- a.wprm-jump-to-recipe-shortcode:hover {
- border-color: %1$s;
- }
-
-
- ', $color_linkshover ) : '';
-
- $css .= ( captivating_customizer_get_default_button_color() !== $color_button ) ? sprintf( '
- button, input[type="button"],
- input[type="reset"],
- input[type="submit"], .button,
- .site-wide-cta .enews-widget input[type="submit"],
- .announcement-widget .enews-widget input[type="submit"],
- div.ck_form .ck_subscribe_button,
- .woocommerce .announcement-widget .button {
- background-color: %1$s;
- }
-
- ', $color_button ) : '';
-
- $css .= ( captivating_customizer_get_default_buttonborder_color() !== $color_buttonborder ) ? sprintf( '
- button, input[type="button"],
- input[type="reset"],
- input[type="submit"], .button,
- .site-wide-cta .enews-widget input[type="submit"],
- .announcement-widget .enews-widget input[type="submit"],
- div.ck_form .ck_subscribe_button,
- .woocommerce .announcement-widget .button {
- border-color: %1$s;
- }
-
- ', $color_buttonborder ) : '';
-
- $css .= ( captivating_customizer_get_default_buttontext_color() !== $color_buttontext ) ? sprintf( '
- button, input[type="button"],
- input[type="reset"],
- input[type="submit"], .button,
- .site-wide-cta .enews-widget input[type="submit"],
- .announcement-widget .enews-widget input[type="submit"],
- div.ck_form .ck_subscribe_button,
- .woocommerce .announcement-widget .button {
- color: %1$s;
- }
-
- ', $color_buttontext ) : '';
-
- $css .= ( captivating_customizer_get_default_buttonhover_color() !== $color_buttonhover ) ? sprintf( '
- button, input[type="button"]:hover,
- input[type="reset"]:hover,
- input[type="submit"]:hover,
- .button:hover,
- .site-wide-cta .enews-widget input[type="submit"]:hover,
- .announcement-widget .enews-widget input[type="submit"]:hover,
- .woocommerce .announcement-widget .button:hover {
- background-color: %1$s;
- }
-
- .woocommerce span.onsale {
- background-color: %1$s !important;
- }
- .nc_socialPanel.swp_d_fullColor .googlePlus,
- body .nc_socialPanel.swp_o_fullColor:hover .googlePlus,
- html body .nc_socialPanel.swp_i_fullColor .googlePlus:hover,
- .nc_socialPanel.swp_d_fullColor .twitter, body .nc_socialPanel.swp_o_fullColor:hover .twitter, html body .nc_socialPanel.swp_i_fullColor .twitter:hover,
- .nc_socialPanel.swp_d_fullColor .swp_fb, body .nc_socialPanel.swp_o_fullColor:hover .swp_fb, html body .nc_socialPanel.swp_i_fullColor .swp_fb:hover,
- .nc_socialPanel.swp_d_fullColor .linkedIn, body .nc_socialPanel.swp_o_fullColor:hover .linkedIn, html body .nc_socialPanel.swp_i_fullColor .linkedIn:hover,
- .nc_socialPanel.swp_d_fullColor .nc_pinterest, body .nc_socialPanel.swp_o_fullColor:hover .nc_pinterest, html body .nc_socialPanel.swp_i_fullColor .nc_pinterest:hover,
- .nc_socialPanel.swp_d_fullColor .swp_stumbleupon, body .nc_socialPanel.swp_o_fullColor:hover .swp_stumbleupon, html body .nc_socialPanel.swp_i_fullColor .swp_stumbleupon:hover{
- background-color: %1$s !important;
- }
-
- ', $color_buttonhover ) : '';
-
-
- $css .= ( captivating_customizer_get_default_buttonhoverborder_color() !== $color_buttonhoverborder ) ? sprintf( '
- button, input[type="button"]:hover,
- input[type="reset"]:hover,
- input[type="submit"]:hover,
- .button:hover,
- .site-wide-cta .enews-widget input[type="submit"]:hover,
- .announcement-widget .enews-widget input[type="submit"]:hover,
- .woocommerce .announcement-widget .button:hover {
- border-color: %1$s;
- }
-
- ', $color_buttonhoverborder ) : '';
-
- $css .= ( captivating_customizer_get_default_buttonhovertext_color() !== $color_buttonhovertext ) ? sprintf( '
- button, input[type="button"]:hover,
- input[type="reset"]:hover,
- input[type="submit"]:hover,
- .button:hover,
- .site-wide-cta .enews-widget input[type="submit"]:hover,
- .announcement-widget .enews-widget input[type="submit"]:hover,
- .woocommerce .announcement-widget .button:hover {
- color: %1$s;
- }
-
- ', $color_buttonhovertext ) : '';
-
- $css .= ( captivating_customizer_get_default_announcement_color() !== $color_announcement ) ? sprintf( '
- .announcement-widget {
- background-color: %1$s;
- }
- ', $color_announcement ) : '';
-
- $css .= ( captivating_customizer_get_default_announcementtext_color() !== $color_announcementtext ) ? sprintf( '
- .announcement-widget {
- color: %1$s;
- }
- ', $color_announcementtext ) : '';
-
- $css .= ( captivating_customizer_get_default_featured_color() !== $color_featured ) ? sprintf( '
- .home-featured,
- .above-blog-content {
- background-color: %1$s !important;
- }
- ', $color_featured ) : '';
-
- $css .= ( captivating_customizer_get_default_newsletter_color() !== $color_newsletter ) ? sprintf( '
- .sidebar .enews-widget,
- .category-index .widget_categories,
- div.ck_form,
- .author-box {
- background-color: %1$s;
- }
-
- ', $color_newsletter ) : '';
-
- $css .= ( captivating_customizer_get_default_newslettertext_color() !== $color_newslettertext ) ? sprintf( '
- .sidebar .enews-widget,
- .category-index .widget_categories,
- div.ck_form,
- .category-index .widget_categories .widget-title,
- .category-index ul li a,
- .sidebar-primary .enews-widget .widgettitle,
- div.ck_form_content h3, div.ck_label,
- .author-box {
- color: %1$s;
- }
-
- ', $color_newslettertext ) : '';
-
- $css .= ( captivating_customizer_get_default_cta_color() !== $color_cta ) ? sprintf( '
- .site-wide-cta {
- background-color: %1$s;
- }
-
- ', $color_cta ) : '';
-
- $css .= ( captivating_customizer_get_default_ctatext_color() !== $color_ctatext ) ? sprintf( '
- .site-wide-cta p {
- color: %1$s;
- }
-
- ', $color_ctatext ) : '';
-
- $css .= ( captivating_customizer_get_default_footer_color() !== $color_footer ) ? sprintf( '
- .site-footer,
- .genesis-nav-menu .sub-menu {
- background-color: %1$s;
- }
-
- .genesis-nav-menu .sub-menu::after {
- border-bottom-color: %1$s;
- }
-
- ', $color_footer ) : '';
-
- $css .= ( captivating_customizer_get_default_footertext_color() !== $color_footertext ) ? sprintf( '
- .site-footer,
- .site-footer a,
- .genesis-nav-menu .sub-menu a {
- color: %1$s;
- }
- ', $color_footertext ) : '';
-
- $css .= ( captivating_customizer_get_default_readmorelink_color() !== $color_readmorelink ) ? sprintf( '
- a.more-link {
- color: %1$s;
- border-color: %1$s;
- }
-
- ', $color_readmorelink ) : '';
-
- $css .= ( captivating_customizer_get_default_widgettitle1_color() !== $color_widgettitle1 ) ? sprintf( '
-
- .front-page .content .widget-title {
- border-color: %1$s !important;
- }
-
- .category-index .widget-title {
- border-color: %1$s;
- }
-
- ', $color_widgettitle1 ) : '';
-
- $css .= ( captivating_customizer_get_default_widgettitle2_color() !== $color_widgettitle2 ) ? sprintf( '
-
- .front-page .content .widget:nth-of-type(3n+2) .widget-title {
- border-color: %1$s !important;
- }
-
- .category-index .widget:nth-of-type(3n+2) .widget-title {
- border-color: %1$s;
- }
-
- ', $color_widgettitle2 ) : '';
-
- $css .= ( captivating_customizer_get_default_widgettitle3_color() !== $color_widgettitle3 ) ? sprintf( '
-
- .front-page .content .widget:nth-of-type(3n+3) .widget-title {
- border-color: %1$s !important;
- }
-
- .category-index .widget:nth-of-type(3n+3) .widget-title {
- border-color: %1$s;
- }
-
- ', $color_widgettitle3 ) : '';
-
- $css .= ( captivating_customizer_get_default_sidebarwidgettitle1_color() !== $color_sidebarwidgettitle1 ) ? sprintf( '
- .sidebar-primary .widgettitle::after {
- background: %1$s;
- }
-
- ', $color_sidebarwidgettitle1 ) : '';
-
- $css .= ( captivating_customizer_get_default_sidebarwidgettitle2_color() !== $color_sidebarwidgettitle2 ) ? sprintf( '
- .sidebar-primary .widget:nth-of-type(3n+2) .widgettitle::after,
- .wprm-recipe-print {
- background: %1$s;
- }
-
- ', $color_sidebarwidgettitle2 ) : '';
-
- $css .= ( captivating_customizer_get_default_sidebarwidgettitle3_color() !== $color_sidebarwidgettitle3 ) ? sprintf( '
- .sidebar-primary .widget:nth-of-type(3n+3) .widgettitle::after,
- .wprm-recipe-print:hover {
- background: %1$s;
- }
-
- ', $color_sidebarwidgettitle3 ) : '';
-
- $css .= ( captivating_customizer_get_default_morecategory1_color() !== $color_morecategory1 ) ? sprintf( '
- .more-from-category a,
- .posts-link a {
- color: %1$s;
- border-color: %1$s;
- }
- ', $color_morecategory1 ) : '';
-
- $css .= ( captivating_customizer_get_default_morecategory2_color() !== $color_morecategory2 ) ? sprintf( '
- .content .widget:nth-of-type(3n+2) .more-from-category a,
- .content .widget:nth-of-type(3n+2) .posts-link a {
- color: %1$s;
- border-color: %1$s;
- }
-
- ', $color_morecategory2 ) : '';
-
- $css .= ( captivating_customizer_get_default_morecategory3_color() !== $color_morecategory3 ) ? sprintf( '
- .content .widget:nth-of-type(3n+3) .more-from-category a,
- .content .widget:nth-of-type(3n+3) .posts-link a {
- color: %1$s;
- border-color: %1$s;
- }
-
- ', $color_morecategory3 ) : '';
- if( $css ){
- wp_add_inline_style( $handle, $css );
- }
- }
|