Skip to content

Instantly share code, notes, and snippets.

@krogsgard
Created July 1, 2013 11:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save krogsgard/5900139 to your computer and use it in GitHub Desktop.
Save krogsgard/5900139 to your computer and use it in GitHub Desktop.
Mondays.
<?php
add_action( 'pre_new_day', 'krogs_alter_new_day' );
/**
* krogs_alter_new_day function.
*
* @access public
* @param mixed $day
* @return void
*/
function krogs_alter_new_day( $day ) {
if ( ! is_weekend() && $day->is_busy() ) {
$day->set( 'to_do_list', -1 );
$day->set( 'hours_of_sleep', 3 );
$day->set( 'distractions', false );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment