jetpack_show_holiday_snow_option

The WordPress Core jetpack show holiday snow option function.

Description

jetpack_show_holiday_snow_option(); 

Usage

  1. if ( !function_exists( 'jetpack_show_holiday_snow_option' ) ) { 
  2. require_once '/modules/holiday-snow.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = jetpack_show_holiday_snow_option(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/modules/holiday-snow.php  
  1. function jetpack_show_holiday_snow_option() { 
  2. // Always show snow option if a custom snow season has been set. 
  3. if ( has_filter( 'jetpack_is_holiday_snow_season' ) ) { 
  4. return true; 
  5.  
  6. $today = time(); 
  7. $first_option_day = mktime( 0, 0, 0, 11, 24 ); // Nov 24 
  8. $last_option_day = mktime( 0, 0, 0, 1, 4 ); // Jan 4 
  9.  
  10. return ( $today >= $first_option_day || $today < $last_option_day );