Skip to content

Instantly share code, notes, and snippets.

@plugin-republic
Created November 20, 2019 07:30
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 plugin-republic/a74ea7cce25094f16f87602015c201bd to your computer and use it in GitHub Desktop.
Save plugin-republic/a74ea7cce25094f16f87602015c201bd to your computer and use it in GitHub Desktop.
<?php
/**
* Filter date parameters to disable Sundays
*/
function prefix_filter_date_field_params( $params, $item ) {
$params[] = 'beforeShowDay : function( date ) {
var day = date.getDay();
return [ ( day != 0 ), false ];
}';
return $params;
}
add_filter( 'pewc_filter_date_field_params', 'prefix_filter_date_field_params', 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment