ACF Timer & Punch Clock
I have been on the look out for a sensible time-keeping plugin for about a year.
The closest I have found is Dynamic Time by Rhett Ermis. While Dynamic Time has a great time card system, it lacked a simple punch clock. Something that I could use to start tracking time and stop, as well as assigning the time to a task ( via post ID ) and include some notes. I was looking for a user experience close to time trackers provided by FreshBooks or TimeCamp.
Since Dynamic Time was halfway there, I decided to tackle the punch clock myself. I started by creating an Advanced Custom Field which would allow me to create a counter. You can download the ACF Timer field from my GitHub repo.
Next, I worked with Rhett to add some filter’s and hooks so that I could extend the original Dynamic Time plugin without changing any of its original functionality. Specifically, I needed to edit the js file which generated the time card page and the $wpdb queries.
The plugin I developed is dependent on ACF Pro, the ACF Timer field, and Dynamic Time. However, when all four plugins are working together, the user has a very handy WP widget with the ability to record time entries without having to go the time sheet view. Also, it works across multisite, recording which site and post id you are working on when you create the time entry.
Below, you will find a very simplified version of the time punch widget. This one is not dependent on Dynamic Time and simple saves new entries to the database table ‘portfolio_timer’. Feel free to test it out! You can start and stop your time tracking, add a note, and even save the time entry. Once the save is completed via AJAX, the page will reload and your new time entry will show in the table below.
Review The 10 Most Recent Time Entries
|Entry ID||User||Date||Start Time||End Time||# of Hours||Note|
|31||Be Our Guest||09-02-2020||01:04:34||01:04:44||0|
|30||Be Our Guest||09-02-2020||11:50:41||11:50:47||0|
|29||Be Our Guest||05-21-2020||07:45:49||07:45:59||0||Test|
|27||Be Our Guest||10-23-2018||03:55:17||03:56:39||0.02|
|24||RimohtCS||10-23-2018||03:50:18||03:50:20||0||Testing the timer.|
|23||Be Our Guest||10-22-2018||12:50:27||12:50:29||0|
|21||Be Our Guest||10-22-2018||12:48:12||12:48:15||0||Test|