Reset a cmb2 option after x amount of time?
-
I am trying to reset a meta check box to “unchecked” after the date changes to the next date from the time the box was checked. – Example, I check the meta box option today, March 26th 9:51pm. But when the time/date changes to 12:00am March 27 it resets to unchecked.
I don’t want to have to create a start end time (which I have done using the other meta box options). I just want to check the box, and it will only be active for that current date.
This function will return the same data when checked for a reoccurring weekly message.
<?php $practice = jm_get_option('checkbox'); if ($practice == TRUE): ?> <div class="practice-message"> <h3><?php the_time('F j, Y'); ?> - JM Racing will be at night practice!</h3> </div> <?php endif ?>
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Reset a cmb2 option after x amount of time?’ is closed to new replies.