This is a simple and lightweight WordPress plugin for generating business hours.
I started with the WordPress Plugin Boilerplate to build this project with an object-oriented approach and followed the WordPress PHP Coding Standards throughout the build with PHPCS. The settings pages are generating using the Settings API along with some custom CSS/JS. I also used the Plugin API by including a couple of filter hooks to modify the output. These are dbh_hours_day to modify the days and dbh_hours_content to modify the rest.
If you want to try the plugin out for yourself, use the download button below! Once you activate it, there will be a General Settings tab and a Daily Settings tab. In General Settings you can choose the typical hours for your business. It also provides the shortcode to use to embed your office hours as well as a CSS class that is applied to the current day of the week. The plugin uses your WordPress date/time settings to determine the starting day of the week, timezone, etc. In the Daily Settings tab, you can choose different hours for each day of the week or choose to be closed completely on that day.
How to install a plugin from a zip file
I’ve thought about adding more features to this plugin (holidays, lunch hours, display templates, etc.), but I discovered that several other plugins already exist that fill this need and decided to stop development.