-
-
Save joshfeck/abfbfb34dbb1019c37f96e31a1330e9d to your computer and use it in GitHub Desktop.
Bump the default start and end dates for Event Espresso 4's datetimes to this month
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 | |
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file | |
function ee_test_get_dtt_edit_row_args( $template_args, $dttrow, $dtt, $default, $all_dtts, $creating_event ) { | |
if ( $template_args['DTT_ID'] == 0 ) { | |
$template_args['DTT_EVT_start'] = date('Y-m-d h:i a'); | |
$end = time() + HOUR_IN_SECONDS; | |
$template_args['DTT_EVT_end'] = date('Y-m-d h:i a', $end); | |
} | |
return $template_args; | |
} | |
add_filter( 'FHEE__espresso_events_Pricing_Hooks___get_dtt_edit_row__template_args', 'ee_test_get_dtt_edit_row_args', 10, 6 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment