=== We’re Open! === Contributors: designextreme Donate link: https://paypal.me/designextreme Tags: opening hours, open hours, business hours, google business, open times, opening times, structured data, coronavirus, covid-19 Requires at least: 4.6 Tested up to: 5.4 Stable tag: trunk Requires PHP: 5.2.4 License: GPLv3 or later License URI: https://www.gnu.org/licenses/gpl-3.0.html Opening hours for your business, everything is very easy to manage and customize. Fetch Google Business hours, plus Structured Data for SEO. == Description == Control all aspects of your business’ opening hours with this very easy management tool with multiple display options and conditional text while open or closed with renewed content upon status changes. This plugin offers a high degree of customization and can be placed almost anywhere using a shortcode or widget. = Features: = * **Shortcode and Widget** to display your opening hours in a wide variety of formats * Responsive interface to quickly set regular opening hours separate from special opening hours for public holidays * **Covid-19 Update** - Set a date range for a temporary closure of your business * Set up to 3 groups of opening times per day * Set 24 hour opening times * Consolidation of hours with options for: * Just weekdays, * Just the weekend, * Separate weekdays and weekend, * Full consolidation * Very high level of customization such as: * Separator characters, * Extensive day and time formatting, * Prefix and suffix for each group of times, * Local language day names with option to overwrite, * Consolidation words, * Hiding of closed days, * Start of week to any day including the current day, * Regular or special opening hours only, * Separate day/date formatting for regular and special opening hours, * Date ranges, and much more… * Option to refresh opening hours or reload the page at the start of each day * HTML classes to give high-level of design customization (e.g. *past*, *today*, *tomorrow*, *future*, *special*) * Conditional shortcode to show content only when open or closed with automatic data refreshing or page reload * Conditional text with variables (e.g. show text or HTML relevant to current open status) * **Structured Data** ([Schema.org](http://schema.org)) support to give accurate information about opening hours to search engines and assist with SEO * Populate current opening hours from Google Business (Google API and Place ID are required) * A comprehensive and *free* plugin with no upgrades for additional functionality = Recommendations: = * If populating from Google, I would recommend [setting your business in Google](https://business.google.com) and finding your [Place ID](https://developers.google.com/places/place-id). * And optionally, create a [Google Billing Account](https://console.cloud.google.com/billing) to receive your substantial free API Request allocation. *This is just my second public plugin and [all comments](https://designextreme.com/wordpress/) are very welcome. It is a sister plugin to [Reviews and Rating – Google Business](https://wordpress.org/plugins/g-business-reviews-rating).* == Installation == 1. Upload the plugin files to the `/wp-content/plugins/opening-hours` directory, or install the plugin through the WordPress plugins screen directly. 2. Activate the plugin through the ‘Plugins’ screen in WordPress 3. Use the **Settings**->**We’re Open!** screen to configure the plugin (and optionally, with your Google API Key and the business’ Place ID) 4. Insert a shortcode into any page, post or use the widget to place throughout your website == Frequently Asked Questions == = Nothing is showing up, what is wrong? = You’ll need to go to **Settings->We’re Open!** to set some required settings before you can start using this plugin on the front end. = How do I get a Google API Key if I want to populate from my Google Business listing? = All the details for collecting your Google API Key can be found at: [Google API Key Guidelines](https://developers.google.com/maps/documentation/javascript/get-api-key). Once your *Project* is set, you will need a new *API Key* with access to the **Places API**. As a restriction, set your host’s **IP Address** (not your website’s URL). Details of this value are listed in the Settings->We’re Open! page. The Google API is required for this plugin to load the data from the Google API. = How do I find my Place ID? = You can location your unique *Place ID* using Google’s: [Place ID Finder](https://developers.google.com/places/place-id) == Screenshots == 1. Various examples of opening hours in table format, different consolidation of days and conditional text 2. Easy and fast editing of both regular and special opening hours all in one place 3. Comprehensive settings to get your opening hours displayed exactly as you want 4. Customize all separators and text for closed or consolidated days 5. Shortcodes for opening hours, conditional content for open/closed (with content refresh) and replacement codes in text 6. Extensive parameters are available to specify your perfect preferences as you desire 7. Set your custom styling and other additional actions 8. Simple Widget to apply your opening hours to a sidebar or footer section == Changelog == = 1.2 = * Covid-19 relevant functionality: you can now set a temporary closure date range * Improvements to 12 hour/24 hour selection in Settings * Added a list of pre-defined HTML classes to Shortcode tab = 1.1 = * Improved day separation with consolidated days in continuous text version * Added new styles to shortcode and widget * Added shortcode parameter value for yesterday as a starting day = 1.0 = * Launch version * Fixed consolidation when separate and all days have the same opening hours * Added consolidation logic to Widget * Added new table layouts to Widget * Improved non-English language support for Widget * Improved user interface to clearly show leading and trailing spaces in separator text = 0.98 = * Extending update and page reload functionality to main shortcode * Fixed existing value for Custom Style that did not appear * Improved open_change method to only check for specific number of days * Added new replacement codes for today_start and tomorrow_end * Added wrap, no-wrap classes = 0.97 = * Fixed some discrepancies of times with replacement codes * Improved Structured Data formatting = 0.96 = * Fixed replacement day names (Thanks to @frepho) = 0.95 = * Improving reliability of web server’s current IP address * Replacement code references corrected * Restored IP address guide in the Google Credentials section = 0.94 = * Fixed dates assigned to each day * Fixed day names for non-English languages * Added shortcode parameter for day names * Added shortcode parameter for time group prefix * Added shortcode parameter for time group suffix * Corrected some spelling errors = 0.93 = * Improved internationalization * Added day formatting for Special Days * Fixed accepted day format regular expression = 0.92 = * Improved storage of new setting input data * Added style for dark background * Added style for past days * Added style for line separating past and today = 0.91 = * Improved conditional open or closed shortcode = 0.9 = * Pre-launch version == Upgrade Notice == == Getting started with Google API == In order to synchronize your opening hours with Google, you will need a Google API Key and to locate your Place ID * [Google API Key Guidelines](https://developers.google.com/maps/documentation/javascript/get-api-key) * [Place ID Finder](https://developers.google.com/maps/documentation/javascript/examples/places-placeid-finder)