|
@@ 122-137 (lines=16) @@
|
| 119 |
|
/** |
| 120 |
|
* Enqueues front-end CSS for the button. |
| 121 |
|
*/ |
| 122 |
|
function lsx_customizer_colour__button_css() { |
| 123 |
|
$styles_from_theme_mod = get_theme_mod( 'lsx_customizer_colour__button_theme_mod' ); |
| 124 |
|
|
| 125 |
|
if ( is_customize_preview() || false === $styles_from_theme_mod ) { |
| 126 |
|
$theme_mods = lsx_customizer_colour__button_get_theme_mods(); |
| 127 |
|
$styles = lsx_customizer_colour__button_get_css( $theme_mods ); |
| 128 |
|
|
| 129 |
|
if ( false === $styles_from_theme_mod ) { |
| 130 |
|
set_theme_mod( 'lsx_customizer_colour__button_theme_mod', $styles ); |
| 131 |
|
} |
| 132 |
|
} else { |
| 133 |
|
$styles = $styles_from_theme_mod; |
| 134 |
|
} |
| 135 |
|
|
| 136 |
|
wp_add_inline_style( 'lsx_customizer_colour', $styles ); |
| 137 |
|
} |
| 138 |
|
add_action( 'wp_enqueue_scripts', 'lsx_customizer_colour__button_css', 9999 ); |
| 139 |
|
|
| 140 |
|
/** |
|
@@ 388-403 (lines=16) @@
|
| 385 |
|
/** |
| 386 |
|
* Enqueues front-end CSS for the button cta. |
| 387 |
|
*/ |
| 388 |
|
function lsx_customizer_colour__button_cta_css() { |
| 389 |
|
$styles_from_theme_mod = get_theme_mod( 'lsx_customizer_colour__button_cta_theme_mod' ); |
| 390 |
|
|
| 391 |
|
if ( is_customize_preview() || false === $styles_from_theme_mod ) { |
| 392 |
|
$theme_mods = lsx_customizer_colour__button_cta_get_theme_mods(); |
| 393 |
|
$styles = lsx_customizer_colour__button_cta_get_css( $theme_mods ); |
| 394 |
|
|
| 395 |
|
if ( false === $styles_from_theme_mod ) { |
| 396 |
|
set_theme_mod( 'lsx_customizer_colour__button_cta_theme_mod', $styles ); |
| 397 |
|
} |
| 398 |
|
} else { |
| 399 |
|
$styles = $styles_from_theme_mod; |
| 400 |
|
} |
| 401 |
|
|
| 402 |
|
wp_add_inline_style( 'lsx_customizer_colour', $styles ); |
| 403 |
|
} |
| 404 |
|
add_action( 'wp_enqueue_scripts', 'lsx_customizer_colour__button_cta_css', 9999 ); |
| 405 |
|
|
| 406 |
|
/** |
|
@@ 591-606 (lines=16) @@
|
| 588 |
|
/** |
| 589 |
|
* Enqueues front-end CSS for the top menu. |
| 590 |
|
*/ |
| 591 |
|
function lsx_customizer_colour__top_menu_css() { |
| 592 |
|
$styles_from_theme_mod = get_theme_mod( 'lsx_customizer_colour__top_menu_theme_mod' ); |
| 593 |
|
|
| 594 |
|
if ( is_customize_preview() || false === $styles_from_theme_mod ) { |
| 595 |
|
$theme_mods = lsx_customizer_colour__top_menu_get_theme_mods(); |
| 596 |
|
$styles = lsx_customizer_colour__top_menu_get_css( $theme_mods ); |
| 597 |
|
|
| 598 |
|
if ( false === $styles_from_theme_mod ) { |
| 599 |
|
set_theme_mod( 'lsx_customizer_colour__top_menu_theme_mod', $styles ); |
| 600 |
|
} |
| 601 |
|
} else { |
| 602 |
|
$styles = $styles_from_theme_mod; |
| 603 |
|
} |
| 604 |
|
|
| 605 |
|
wp_add_inline_style( 'lsx_customizer_colour', $styles ); |
| 606 |
|
} |
| 607 |
|
add_action( 'wp_enqueue_scripts', 'lsx_customizer_colour__top_menu_css', 9999 ); |
| 608 |
|
|
| 609 |
|
/** |
|
@@ 717-732 (lines=16) @@
|
| 714 |
|
/** |
| 715 |
|
* Enqueues front-end CSS for the header. |
| 716 |
|
*/ |
| 717 |
|
function lsx_customizer_colour__header_css() { |
| 718 |
|
$styles_from_theme_mod = get_theme_mod( 'lsx_customizer_colour__header_theme_mod' ); |
| 719 |
|
|
| 720 |
|
if ( is_customize_preview() || false === $styles_from_theme_mod ) { |
| 721 |
|
$theme_mods = lsx_customizer_colour__header_get_theme_mods(); |
| 722 |
|
$styles = lsx_customizer_colour__header_get_css( $theme_mods ); |
| 723 |
|
|
| 724 |
|
if ( false === $styles_from_theme_mod ) { |
| 725 |
|
set_theme_mod( 'lsx_customizer_colour__header_theme_mod', $styles ); |
| 726 |
|
} |
| 727 |
|
} else { |
| 728 |
|
$styles = $styles_from_theme_mod; |
| 729 |
|
} |
| 730 |
|
|
| 731 |
|
wp_add_inline_style( 'lsx_customizer_colour', $styles ); |
| 732 |
|
} |
| 733 |
|
add_action( 'wp_enqueue_scripts', 'lsx_customizer_colour__header_css', 9999 ); |
| 734 |
|
|
| 735 |
|
/** |
|
@@ 822-837 (lines=16) @@
|
| 819 |
|
/** |
| 820 |
|
* Enqueues front-end CSS for the main menu. |
| 821 |
|
*/ |
| 822 |
|
function lsx_customizer_colour__main_menu_css() { |
| 823 |
|
$styles_from_theme_mod = get_theme_mod( 'lsx_customizer_colour__main_menu_theme_mod' ); |
| 824 |
|
|
| 825 |
|
if ( is_customize_preview() || false === $styles_from_theme_mod ) { |
| 826 |
|
$theme_mods = lsx_customizer_colour__main_menu_get_theme_mods(); |
| 827 |
|
$styles = lsx_customizer_colour__main_menu_get_css( $theme_mods ); |
| 828 |
|
|
| 829 |
|
if ( false === $styles_from_theme_mod ) { |
| 830 |
|
set_theme_mod( 'lsx_customizer_colour__main_menu_theme_mod', $styles ); |
| 831 |
|
} |
| 832 |
|
} else { |
| 833 |
|
$styles = $styles_from_theme_mod; |
| 834 |
|
} |
| 835 |
|
|
| 836 |
|
wp_add_inline_style( 'lsx_customizer_colour', $styles ); |
| 837 |
|
} |
| 838 |
|
add_action( 'wp_enqueue_scripts', 'lsx_customizer_colour__main_menu_css', 9999 ); |
| 839 |
|
|
| 840 |
|
/** |
|
@@ 981-996 (lines=16) @@
|
| 978 |
|
/** |
| 979 |
|
* Enqueues front-end CSS for the banner. |
| 980 |
|
*/ |
| 981 |
|
function lsx_customizer_colour__banner_css() { |
| 982 |
|
$styles_from_theme_mod = get_theme_mod( 'lsx_customizer_colour__banner_theme_mod' ); |
| 983 |
|
|
| 984 |
|
if ( is_customize_preview() || false === $styles_from_theme_mod ) { |
| 985 |
|
$theme_mods = lsx_customizer_colour__banner_get_theme_mods(); |
| 986 |
|
$styles = lsx_customizer_colour__banner_get_css( $theme_mods ); |
| 987 |
|
|
| 988 |
|
if ( false === $styles_from_theme_mod ) { |
| 989 |
|
set_theme_mod( 'lsx_customizer_colour__banner_theme_mod', $styles ); |
| 990 |
|
} |
| 991 |
|
} else { |
| 992 |
|
$styles = $styles_from_theme_mod; |
| 993 |
|
} |
| 994 |
|
|
| 995 |
|
wp_add_inline_style( 'lsx_customizer_colour', $styles ); |
| 996 |
|
} |
| 997 |
|
add_action( 'wp_enqueue_scripts', 'lsx_customizer_colour__banner_css', 9999 ); |
| 998 |
|
|
| 999 |
|
/** |
|
@@ 1077-1092 (lines=16) @@
|
| 1074 |
|
/** |
| 1075 |
|
* Enqueues front-end CSS for the body. |
| 1076 |
|
*/ |
| 1077 |
|
function lsx_customizer_colour__body_css() { |
| 1078 |
|
$styles_from_theme_mod = get_theme_mod( 'lsx_customizer_colour__body_theme_mod' ); |
| 1079 |
|
|
| 1080 |
|
if ( is_customize_preview() || false === $styles_from_theme_mod ) { |
| 1081 |
|
$theme_mods = lsx_customizer_colour__body_get_theme_mods(); |
| 1082 |
|
$styles = lsx_customizer_colour__body_get_css( $theme_mods ); |
| 1083 |
|
|
| 1084 |
|
if ( false === $styles_from_theme_mod ) { |
| 1085 |
|
set_theme_mod( 'lsx_customizer_colour__body_theme_mod', $styles ); |
| 1086 |
|
} |
| 1087 |
|
} else { |
| 1088 |
|
$styles = $styles_from_theme_mod; |
| 1089 |
|
} |
| 1090 |
|
|
| 1091 |
|
wp_add_inline_style( 'lsx_customizer_colour', $styles ); |
| 1092 |
|
} |
| 1093 |
|
add_action( 'wp_enqueue_scripts', 'lsx_customizer_colour__body_css', 9999 ); |
| 1094 |
|
|
| 1095 |
|
/** |
|
@@ 1438-1453 (lines=16) @@
|
| 1435 |
|
/** |
| 1436 |
|
* Enqueues front-end CSS for the footer cta. |
| 1437 |
|
*/ |
| 1438 |
|
function lsx_customizer_colour__footer_cta_css() { |
| 1439 |
|
$styles_from_theme_mod = get_theme_mod( 'lsx_customizer_colour__footer_cta_theme_mod' ); |
| 1440 |
|
|
| 1441 |
|
if ( is_customize_preview() || false === $styles_from_theme_mod ) { |
| 1442 |
|
$theme_mods = lsx_customizer_colour__footer_cta_get_theme_mods(); |
| 1443 |
|
$styles = lsx_customizer_colour__footer_cta_get_css( $theme_mods ); |
| 1444 |
|
|
| 1445 |
|
if ( false === $styles_from_theme_mod ) { |
| 1446 |
|
set_theme_mod( 'lsx_customizer_colour__footer_cta_theme_mod', $styles ); |
| 1447 |
|
} |
| 1448 |
|
} else { |
| 1449 |
|
$styles = $styles_from_theme_mod; |
| 1450 |
|
} |
| 1451 |
|
|
| 1452 |
|
wp_add_inline_style( 'lsx_customizer_colour', $styles ); |
| 1453 |
|
} |
| 1454 |
|
add_action( 'wp_enqueue_scripts', 'lsx_customizer_colour__footer_cta_css', 9999 ); |
| 1455 |
|
|
| 1456 |
|
/** |
|
@@ 1540-1555 (lines=16) @@
|
| 1537 |
|
/** |
| 1538 |
|
* Enqueues front-end CSS for the footer widgets. |
| 1539 |
|
*/ |
| 1540 |
|
function lsx_customizer_colour__footer_widgets_css() { |
| 1541 |
|
$styles_from_theme_mod = get_theme_mod( 'lsx_customizer_colour__footer_widgets_theme_mod' ); |
| 1542 |
|
|
| 1543 |
|
if ( is_customize_preview() || false === $styles_from_theme_mod ) { |
| 1544 |
|
$theme_mods = lsx_customizer_colour__footer_widgets_get_theme_mods(); |
| 1545 |
|
$styles = lsx_customizer_colour__footer_widgets_get_css( $theme_mods ); |
| 1546 |
|
|
| 1547 |
|
if ( false === $styles_from_theme_mod ) { |
| 1548 |
|
set_theme_mod( 'lsx_customizer_colour__footer_widgets_theme_mod', $styles ); |
| 1549 |
|
} |
| 1550 |
|
} else { |
| 1551 |
|
$styles = $styles_from_theme_mod; |
| 1552 |
|
} |
| 1553 |
|
|
| 1554 |
|
wp_add_inline_style( 'lsx_customizer_colour', $styles ); |
| 1555 |
|
} |
| 1556 |
|
add_action( 'wp_enqueue_scripts', 'lsx_customizer_colour__footer_widgets_css', 9999 ); |
| 1557 |
|
|
| 1558 |
|
/** |
|
@@ 1646-1661 (lines=16) @@
|
| 1643 |
|
/** |
| 1644 |
|
* Enqueues front-end CSS for the footer. |
| 1645 |
|
*/ |
| 1646 |
|
function lsx_customizer_colour__footer_css() { |
| 1647 |
|
$styles_from_theme_mod = get_theme_mod( 'lsx_customizer_colour__footer_theme_mod' ); |
| 1648 |
|
|
| 1649 |
|
if ( is_customize_preview() || false === $styles_from_theme_mod ) { |
| 1650 |
|
$theme_mods = lsx_customizer_colour__footer_get_theme_mods(); |
| 1651 |
|
$styles = lsx_customizer_colour__footer_get_css( $theme_mods ); |
| 1652 |
|
|
| 1653 |
|
if ( false === $styles_from_theme_mod ) { |
| 1654 |
|
set_theme_mod( 'lsx_customizer_colour__footer_theme_mod', $styles ); |
| 1655 |
|
} |
| 1656 |
|
} else { |
| 1657 |
|
$styles = $styles_from_theme_mod; |
| 1658 |
|
} |
| 1659 |
|
|
| 1660 |
|
wp_add_inline_style( 'lsx_customizer_colour', $styles ); |
| 1661 |
|
} |
| 1662 |
|
add_action( 'wp_enqueue_scripts', 'lsx_customizer_colour__footer_css', 9999 ); |
| 1663 |
|
|
| 1664 |
|
/** |