filter

jetpack_is_holiday_snow_season

Filter whether it’s winter or not.You can use this filter if, for example, you live in the Southern Hemisphere. In that case, the dates for winter above are incorrect for your location.

Parameters

$snow
bool

True if it's snow season, false if not.

Changelog

How to use this hook

See “How to use actions and filters to customize Jetpack”.

Notes

You can use this filter to change when Snow starts falling on your site, and when it ends. In the example below, we’ll have snow falling on our site until April 1st:
/**
 * Show the Snow option until April 1st.
 *
 * By default, the option disappears on January 4th
 *
 * @return bool true|false Is it holiday season?
 */
function jeherve_snow_fools() {
    $today          = time();
    // First snow day. December 1st here.
    $first_snow_day = mktime( 0, 0, 0, 12, 1 );
    // Last Snow day. April 1st in our example.
    $last_snow_day  = mktime( 0, 0, 0, 4, 1 );
 
    // $snow will return false if we're outside holiday season.
    $snow = ( $today >= $first_snow_day || $today < $last_snow_day );
 
    return $snow;
}
add_filter( 'jetpack_is_holiday_snow_season', 'jeherve_snow_fools' );