Title: TS Business Hours
Author: Zack Philipps
Published: <strong>19 December 2013</strong>
Last modified: 13 January 2014

---

Search plugins

This plugin **hasn’t been tested with the latest three major releases of WordPress**.
It may no longer be maintained or supported and may have compatibility issues when
used with more recent versions of WordPress.

![](https://s.w.org/plugins/geopattern-icon/ts-business-hours.svg)

# TS Business Hours

 By [Zack Philipps](https://profiles.wordpress.org/zackphilipps/)

[Download](https://downloads.wordpress.org/plugin/ts-business-hours.0.1.1.zip)

 * [Details](https://en-gb.wordpress.org/plugins/ts-business-hours/#description)
 * [Reviews](https://en-gb.wordpress.org/plugins/ts-business-hours/#reviews)
 *  [Installation](https://en-gb.wordpress.org/plugins/ts-business-hours/#installation)
 * [Development](https://en-gb.wordpress.org/plugins/ts-business-hours/#developers)

 [Support](https://wordpress.org/support/plugin/ts-business-hours/)

## Description

TSBusinessDay class with functions used for restricting content based on hours of
operation. Supports hours that run past midnight. Will eventually develop into full-
fledged plugin, but thanks to Elliot Condon, I don’t have to just yet!

#### Dependencies

This function requires the Advanced Custom Fields plugin and some of its add-ons.
They are as follows:

 * Repeater Field
 * Options Page
 * Date & Time Picker Field

The Repeater Field and Options page are premium add-ons. If you are already using
them, you understand how invaluable they are. If not, there’s no better time to 
start!

#### Installation

 1. Make sure you have all of the required dependencies.
 2. Download the ts-business-hours directory and copy it to wp-content/plugins.
 3. Activate the plugin on the Plugins page.
 4. Navigate to the Options page. Configure days and hours. You must have both opening
    and closing times.
 5. You must start the week on Sunday and end it on Saturday for the plugin to work
    correctly. This is because the plugin uses the date(‘w’) function.
 6. See example.php and use accordingly.

#### Notes

I ran into an issue when working locally, which was that I had to wait until the
turn of a minute to see my changes to the template file reflected live. I’m not 
sure why that is and would love to hear suggestions!

#### What does ‘TS’ stand for, anyway?

Tribeswell is an interactive marketing company specializing in high quality responsive
website design. We are students of great design and useability. Choosing to work
with Tribeswell means your organization will get the absolute best in modern design.
We are headquartered in Bloomington, Indiana and work with clients all across the
midwest.

#### About the Author

Originally from Bedford, Indiana, Zack is currently working full-time at Tribeswell.
Zack is passionate about front-end design and UX. He is instrumental in ensuring
that every Tribeswell website contains a flawless level of fit and finish, providing
an excellent experience for visitors.

## Installation

 1. Make sure you have all of the required dependencies.
 2. Download the ts-business-hours directory and copy it to wp-content/plugins.
 3. Activate the plugin on the Plugins page.
 4. Navigate to the Options page. Configure days and hours. You must have both opening
    and closing times.
 5. You must start the week on Sunday and end it on Saturday for the plugin to work
    correctly. This is because the plugin uses the date(‘w’) function.
 6. See example.php and use accordingly.

## FAQ

  Can I use isOpen() to restrict content within a blog post?

You cannot use a PHP function in a WYSIWYG editor. Shortcodes provide this functionality.
Shortcode support for this plugin is on the way!

## Reviews

There are no reviews for this plugin.

## Contributors and Developers

“TS Business Hours” is open source software. The following people have contributed
to this plugin.

Contributors

 *   [ Zack Philipps ](https://profiles.wordpress.org/zackphilipps/)

[Translate “TS Business Hours” into your language.](https://translate.wordpress.org/projects/wp-plugins/ts-business-hours)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/ts-business-hours/),
check out the [SVN repository](https://plugins.svn.wordpress.org/ts-business-hours/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/ts-business-hours/)
by [RSS](https://plugins.trac.wordpress.org/log/ts-business-hours/?limit=100&mode=stop_on_copy&format=rss).

## Change Log

#### 0.1.1

 * Created TSBusinessDay class with several utility functions including isOpen().
   All functions can be accessed like so: $this->theFunction().

## Meta

 *  Version **0.1.1**
 *  Last updated **13 years ago**
 *  Active installations **10+**
 *  WordPress version ** 3.0.1 or higher **
 *  Tested up to **3.7.41**
 *  Language
 * [English (US)](https://wordpress.org/plugins/ts-business-hours/)
 * Tags
 * [business](https://en-gb.wordpress.org/plugins/tags/business/)[content](https://en-gb.wordpress.org/plugins/tags/content/)
   [hours](https://en-gb.wordpress.org/plugins/tags/hours/)[operation](https://en-gb.wordpress.org/plugins/tags/operation/)
   [restrict](https://en-gb.wordpress.org/plugins/tags/restrict/)
 *  [Advanced View](https://en-gb.wordpress.org/plugins/ts-business-hours/advanced/)

## Ratings

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/ts-business-hours/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/ts-business-hours/reviews/)

## Contributors

 *   [ Zack Philipps ](https://profiles.wordpress.org/zackphilipps/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/ts-business-hours/)

## Donate

Would you like to support the advancement of this plugin?

 [ Donate to this plugin ](http://n/a)