diff --git a/wp-content/themes/Parallax-One/customizer_defaults.php b/wp-content/themes/Parallax-One/customizer_defaults.php index 1278f8d..5f029cb 100644 --- a/wp-content/themes/Parallax-One/customizer_defaults.php +++ b/wp-content/themes/Parallax-One/customizer_defaults.php @@ -329,6 +329,7 @@ class DefCalendar { public static $mode = 'condensed'; public static $this_week = 'This week'; public static $next_week = 'Next week'; + public static $fallback = false; }; /********************************************************/ diff --git a/wp-content/themes/Parallax-One/inc/customizer.php b/wp-content/themes/Parallax-One/inc/customizer.php index 47a55a5..1a50e4d 100644 --- a/wp-content/themes/Parallax-One/inc/customizer.php +++ b/wp-content/themes/Parallax-One/inc/customizer.php @@ -1849,6 +1849,20 @@ function parallax_one_customize_register( $wp_customize ) { 'priority' => 1 )); + /* Calendar fallback */ + + $wp_customize->add_setting('parallax_one_calendar_fallback', array( + 'default' => DefCalendar::$fallback, + 'sanitize_callback' => 'parallax_one_sanitize_text' + )); + $wp_customize->add_control( + 'parallax_one_calendar_fallback', array( + 'type' => 'checkbox', + 'label' => __('Use fallback image from Image section (if calendar cannot be loaded, e.g. on Internet Explorer)?', 'parallax-one'), + 'section' => 'calendar_section', + 'priority' => 4, + )); + /* Calendar show/hide */ $wp_customize->add_setting('parallax_one_calendar_show', array('sanitize_callback' => 'parallax_one_sanitize_text')); diff --git a/wp-content/themes/Parallax-One/sections/parallax_one_calendar_section.php b/wp-content/themes/Parallax-One/sections/parallax_one_calendar_section.php index d8925bc..fb87cf7 100644 --- a/wp-content/themes/Parallax-One/sections/parallax_one_calendar_section.php +++ b/wp-content/themes/Parallax-One/sections/parallax_one_calendar_section.php @@ -7,7 +7,7 @@ $calendar_mode = get_theme_mod('calendar_mode', DefCalendar::$mode); $calendar_this_week = get_theme_mod('calendar_this_week', DefCalendar::$this_week); $calendar_next_week = get_theme_mod('calendar_next_week', DefCalendar::$next_week); - +$calendar_fallback = get_theme_mod('parallax_one_calendar_fallback', DefCalendar::$fallback); ?> @@ -59,6 +59,18 @@ ng-repeat="calendar in calendars" ng-show="calendar.weekIndex === weekIndex"> +
'; + } else { +?> +