jetpack_is_holiday_snow_season

The Jetpack by WordPress.com jetpack is holiday snow season function.

Description

jetpack_is_holiday_snow_season(); 

Usage

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

Defined (1)

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

/modules/holiday-snow.php  
  1. function jetpack_is_holiday_snow_season() { 
  2. $today = time(); 
  3. $first_snow_day = mktime( 0, 0, 0, 12, 1 ); 
  4. $last_snow_day = mktime( 0, 0, 0, 1, 4 ); 
  5.  
  6. $snow = ( $today >= $first_snow_day || $today < $last_snow_day ); 
  7.  
  8. /** 
  9. * Filter whether it's winter or not. 
  10. * You can use this filter if, for example, you live in the 
  11. * Southern Hemisphere. In that case, the dates for winter 
  12. * above are incorrect for your location. 
  13. * @module theme-tools 
  14. * @since 2.1.0 
  15. * @param bool $snow True if it's snow season, false if not. 
  16. */ 
  17. return apply_filters( 'jetpack_is_holiday_snow_season', $snow );