Jetpack_Holiday_Snow_Settings

Holiday Snow Adds falling snow to a blog starting December 1 and ending January 3.

Defined (1)

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

/modules/holiday-snow.php  
  1. class Jetpack_Holiday_Snow_Settings { 
  2. function __construct() { 
  3. add_filter( 'admin_init' , array( &$this , 'register_fields' ) ); 
  4.  
  5. public function register_fields() { 
  6. register_setting( 'general', jetpack_holiday_snow_option_name(), 'esc_attr' ); 
  7. add_settings_field( jetpack_holiday_snow_option_name(), '<label for="' . esc_attr( jetpack_holiday_snow_option_name() ) . '">' . __( 'Snow' , 'jetpack') . '</label>' , array( &$this, 'blog_field_html' ) , 'general' ); 
  8. add_action( 'update_option_' . jetpack_holiday_snow_option_name(), array( &$this, 'holiday_snow_option_updated' ) ); 
  9.  
  10. public function blog_field_html() { 
  11. $id = esc_attr( jetpack_holiday_snow_option_name() ); 
  12. ?> 
  13. <label for="<?php echo $id; ?>"> 
  14. <input type="checkbox" name="<?php echo $id; ?>" id="<?php echo $id; ?>" value="letitsnow"<?php checked( get_option( jetpack_holiday_snow_option_name() ), 'letitsnow' ); ?> /> 
  15. <span><?php _e( 'Show falling snow on my blog until January 4<sup>th</sup>.' , 'jetpack'); ?></span> 
  16. </label> 
  17. <?php 
  18.  
  19. public function holiday_snow_option_updated() { 
  20.  
  21. /** 
  22. * Fires when the holiday snow option is updated. 
  23. * @module theme-tools 
  24. * @since 2.0.3 
  25. */ 
  26. do_action( 'jetpack_holiday_snow_option_updated' );