Created
November 20, 2019 07:30
-
-
Save plugin-republic/a74ea7cce25094f16f87602015c201bd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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