jetpack_holiday_snow_script

The Jetpack by WordPress.com jetpack holiday snow script function.

Description

jetpack_holiday_snow_script(); 

Usage

  1. if ( !function_exists( 'jetpack_holiday_snow_script' ) ) { 
  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_holiday_snow_script(); 
  7.  

Defined (1)

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

/modules/holiday-snow.php  
  1. function jetpack_holiday_snow_script() { 
  2.  
  3. /** 
  4. * Allow holiday snow. 
  5. * Note: there's no actual randomness involved in whether it snows 
  6. * or not, despite the filter mentioning a "chance of snow." 
  7. * @module theme-tools 
  8. * @since 2.0.3 
  9. * @param bool True to allow snow, false to disable it. 
  10. */ 
  11. if ( ! apply_filters( 'jetpack_holiday_chance_of_snow', true ) ) 
  12. return; 
  13.  
  14. /** 
  15. * Fires when it's snowing. 
  16. * @module theme-tools 
  17. * @since 2.0.3 
  18. */ 
  19. do_action( 'jetpack_holiday_snowing' ); 
  20.  
  21. /** 
  22. * Filter the holiday snow JavaScript URL. 
  23. * @module theme-tools 
  24. * @since 2.0.3 
  25. * @param str URL to the holiday snow JavaScript file. 
  26. */ 
  27. $snowstorm_url = apply_filters( 'jetpack_holiday_snow_js_url', plugins_url( 'holiday-snow/snowstorm.js', __FILE__ ) ); 
  28. wp_enqueue_script( 'snowstorm', $snowstorm_url, array(), '1.43.20111201' );