Code

Business Hours Pro WordPress Plugin

Business Hours Pro WordPress Plugin

Business Hours Pro is a light weight WordPress Plugin which allows you to display office hours or business hours timings for the working days of the seven successive days (week). You can display anywhere in your theme using widget or having a shortcode. For more features see below.

Features

  • Easy Installation in 2 Steps
  • WordPress Default Time Format
  • WordPress Default Weekdays Label
  • Display Closed Day
  • Opening Time and Closing Time
  • Add Unlimited periods
  • Custom time separator
  • Custom closed text
  • A Short Description for the widget / shortcode. can be prefixed or suffixed.
  • Highlight Current Day
  • Holidays Shortcode
  • Holidays Widget
  • Custom CSS in settings
  • Late Night Hours option if you have diff opening hours
  • Import/Export business hours backup option
  • Option for selecting timezone
  • Holiday Name display in hours
  • Shortnames for Days in Shortcode
  • Shortnames for Days in Widget
  • Short Names for the Weekdays
  • Centered text align option for the hours display.
  • Single day presentation on topbar or other places
  • Closed days hide/show option.
  • Open and Closed Text option
  • dot option which displays if its opened and closed.
  • Start Text option instead of time.
  • Open Text Background Color
  • Open Text Field
  • Grouping Hours for closed days
  • Business Hours Addon for Visual Composer Plugin
  • Holidays Addon for Visual Composer Plugin
  • Anchor link option for the description in holidays
  • Localization for Today Text string
  • Localization for show more Text string
  • Add Holiday(s) and display/enable in a widget.
  • Displays an image based on the open and close hours
  • Additional Text / End Time (e.g: 9:00 – Late Night)
  • Current Day Color Option
  • Grouping Hours for business hours
  • Enable or disable grouping hours.
  • Settings for the time format.
  • Display currently day and toggle other week days
  • Manual Plugin Update option from 1.1.0
  • Widget & Shortcode
  • Localization for Today Text string
  • Localization for show more Text string
  • Select Different Date format for display
  • Add Holiday(s) and display that as a widget.
  • Add Holiday(s) and display/enable in a widget.
  • We’re Open Image Option
  • We’re Closed Image Option
  • Displays an image based on the open and closed hours
  • Additional Text / End Time (e.g: 9:00 – Late Night)
  • Current Day Color Option
  • Group Hours if all the timings are same.
  • Enable or disable grouping hours.
  • Settings for the Time Format.
  • Toggle option for the time display
  • Display currently day and toggle other week days
  • Manual Plugin Update Option since v1.1.0

Shortcode

  • Shortcode with Parameters.
    • title = Displays the title before the shortcode
    • width = Holds the shortcode in the specified width
    • close_days = ‘on’ Hides the days which are closed
    • openclose_text = ‘on’ Displays the open/close text
    • single_day = ‘on’ Displays the currently day only.
    • grouping_hrs = ‘on’ Groups the hours if all the hours are same.
    • toggle_enable = ‘on’ Displays the hours shortcode with toggle option with ‘Show More +’ text
    • current_day_color = Highlight the current day color for the shortcode but make sure the option is enabled from settings in the business hours.

    Updates and Changelog

    v5.5.0 - 2018-04-02
    ----------------------------------------------------------------
    ### Added
    Late night hours option to morning 7AM for European Cities
    Option for shortcode to display After Text before the time
    
    ### Fixed
    Late night hours issue with European Timings
    
    v5.4.0 - 2018-03-28
    ----------------------------------------------------------------
    ### Added
    - Excluding holidays in the holiday shortcode
    - Display all the holidays with the shortcode
    - [iva_bhrs_holidays exclude_id="" show="all"]
    
    ### Removed
    - Commented coding.
    
    ### Fixed
    - Settings page not working when update
    - Popup alert when saving settings in the settings page.
    
    v5.3.0 - 2018-03-08
    ----------------------------------------------------------------
    ### Added
    - Recurring Option for Holidays Weekly / Monthly / Yearly.
    
    ### Removed
    - Commented coding.
    
    ### Fixed
    - Holidays not working with the recent update.
    - Line height issue with the custom text fields in the shortcode.
    
    v5.2 - 2018-01-09
    ----------------------------------------------------------------
    ### Added
    - New Holidays Hours Style 3 Shortcode.
    - New Holidays Hours Style 3 VC Addon Shortcode.
    
    ### Changed
    - Translation pro and mo files.
    
    ### Fixed
    - Red dot not displaying issue with different time zones.
    
    v5.1 - 2017-12-04
    ----------------------------------------------------------------
    ### Fixed
    - An issue with removing trailing Zeros from time.
    - Closed Image not showing when hours closed.
    
    v5.0 - 2017-12-04
    ----------------------------------------------------------------
    ### Added
    - Open Closed Text Hide from today hours.
    - Remove trailing zeros from time.
    - Hide time on holiday.
    - Individual Today text.
    - Individual See more.
    - Individual Single Day Off Text.
    - Individual Multiple Days Off Text.
    - Individual Weekdays Shortname.
    - Green Dots not working properly with multiple business hours I mean split hours.
    - Hide time on holiday.
    
    ### Removed
    - Cancel Button.
    - The red dot from the upcoming hours in split hours.
    
    ### Fixed
    - Split hours not working when late night.
    - An issue with late night hours.
    - Fresh Installation in WordPress 4.9 is not working in creating hours.
    - Weekday min not working (short name).
    - Color picker issue in add new holiday settings.
    - Open image close image uploading issue.
    - Green dot issue when hours are empty.
    
    v4.3.1 - 2017-07-06
    ----------------------------------------------------------------
    ### Added
    - Option to disable time for holidays display in hours shortcode.
    
    ### Fixed
    - An issue with holidays displaying.
    - associative array issue with weekdays.
    - An issue with PHP7+ compatibility.
    
    v4.3.0 - 2017-05-30
    ----------------------------------------------------------------
    ### Added
    - New handler for the jquery UI time picker addon script.
    - Missing jquery UI Images.
    
    ### Fixed
    - Parse error: syntax error, unexpected.
    - An issue with activating while time picker exists in other themes.
    
    :warning: *After Installing and updating the plugin deactivate and activate the plugin again to work.*
    
    v4.0.0 - 2017-02-21
    ----------------------------------------------------------------
    ### Added
    - Consecutive display of holidays/ upcoming holidays in the current week.
    - Dot indicators fixed for holidays list in a current week.
    - Fourth coming holidays display in the shortcode.
    - Fetching holidays in the Business Hours VC Addon.
    - Fetching holidays in the Business Hours Widget.
    - Fetching holidays in the Business Hours Shortcode.
    - Holiday widget display 2 styles.
    - Holiday shortcodes display 2 styles.
    - Multiple Holidays Grouping for the shortcode.
    - Multiple Holidays Grouping for the widget.
    - Multiple Holidays Grouping for VC Addon.
    
    ### changed
    - POT Translations for Spanish.
    - POT Translations for English.
    - New UI for the settings page.
    - New UI for the Holidays page.
    - New UI for the shortcodes page.
    - New background color for close and open dots.
    
    ### Removed
    - Unwanted fontello Icons files.
    - Unwanted UI icons and images.
    - Unwanted holidays file.
    
    ### Fixed
    - Conflict with the foodpress plugin time picker.
    - Holiday widget background color not working.
    - Import business hours not loading while fresh installation.
    - Open close text background color missing.
    
    :warning:*Kindly please take a backup of your existing hours and Update the plugin*
    
    v3.6.3 - 2016-07-14
    ----------------------------------------------------------------
    ### Added
    - Action to work with the shortcode and load CSS for text widget as well.
    
    ### Changed
    - Re-Edited CSS width for the admin settings.
    
    ### Removed
    - Conditional code for shortcode enqueue of css in $post_content.
    
    v3.6.2 - 2016-07-14
    ----------------------------------------------------------------
    ### Added
    - Opacity for the hours to display light when time passed.
    - Features in widgets to display hours with the holiday when arrives
    - Option multiple days holidays description before the date
    - Option to display a description and a text with dates in before hours display
    
    ### Changed
    - Modified the hour's display opacity.
    - Settings Title Area Expanded.
    
    ### Fixed
    - An issue with VC Addon shortcode display for the holidays.
    - Color picker issue with the holiday background color while adding a new holiday
    - Closed and Opened Image responsive Issue
    
    v3.6.1 - 2016-06-30
    ----------------------------------------------------------------
    ### Added
    - Background Color option for Holiday Name.
    - Text Color option for Holiday Name.
    - Message info box for setting UTC Timezone.
    
    ### Fixed
    - An issue with Today Hours open/close times.
    - Holiday Name display after all split hours.
    - Empty columns import issue with business hours.
    
    v3.6.0 - 2016-06-24
    ----------------------------------------------------------------
    ### Added
    - Slovak and Serbian language option in the datepicker.
    - Shortcode in the documentation section in the plugin.
    - Past Time Disable in Split Hours with the dot.
    - Holidays Widget.
    - Holidays Shortcode.
    
    ### Changed
    - i18n js files for the date picker in Holidays Widget.
    
    ### Fixed
    - wrong parameter name in VC Addon.
    - An issue with visual composer not loading.
    - Split Hours green dot on VC Addons.
    - Split Hour's green dot on the same day different times.
    
    v3.5.2 - 2016-05-25
    ----------------------------------------------------------------
    ### Added
    - Custom CSS in settings.
    - Late Night Hours option.
    - Import Export Option for Business Hours.
    
    ### Fixed
    - line length issues with date_i18N jquery files.
    
    v3.5.1 - 2016-04-15
    ----------------------------------------------------------------
    ### Changed
    - span element for today hours to block element.
    
    ### Fixed
    - time format am pm issue in all languages.
    - An issue with Toggle enabled by default in the widget.
    - Single Day display alignment issue.
    
    v3.5.0 - 2016-04-13
    ----------------------------------------------------------------
    ### Added
    - Import/Export business hours backup option.
    - Nonce verification for the hour's forms.
    
    ### Removed
    - Figure element from the open-close image.
    - German Date Format dd.mm.yy
    
    ### Fixed
    - Escape strings for the documentation.
    - Consecutive days hyphenation and comma if not in sequence.
    - Issue with unexpected output error while plugin activation.
    - An issue with open close image responsive.
    
    v3.1.0 - 2016-03-23
    ----------------------------------------------------------------
    ### Changed
    - Naming Convention for the Classes.
    - Changelog file.
    
    ### Fixed
    - Holiday Name displays for the past days as well.
    - Backslash issue for the Today's Text.
    - Backslash issue for the Seemore Text.
    
    v3.0.0 - 2016-03-14
    ----------------------------------------------------------------
    ### Added
    - Option for selecting timezone.
    - Holiday Name display in hours.
    - Shortnames for Days in Shortcode.
    - Shortnames for Days in Widget.
    
    ### Fixed
    - Shortcode not loading CSS file for the business hours.
    - WordPress Coding Standards.
    - Cleaned Coding Indentation.
    - missing string localizations.
    
    v2.6.1 - 2016-02-19
    ----------------------------------------------------------------
    ### Fixed
    - Shortcode not loading CSS file for the business hours.
    
    v2.6.0 - 2016-01-28
    ----------------------------------------------------------------
    ### Added
    - Short Names for the Weekdays.
    - German Date Format dd.mm.yy
    
    ### changed
    - Description of all the fields.
    - Time formats text updated to 24 hours, am/pm and AM/PM
    - Header UI for all the business hours pages.
    - Strings changed from real-time data to formats.
    
    ### Fixed
    - Holidays Start date is supporting past values for future days.
    - Background color for the closed text string in grouping hours.
    - Split hours issue while Grouping is checked for hours widget.
    - Grouping hours & split hours combining issue.
    
    v2.5.4 - 2015-11-23
    ----------------------------------------------------------------
    ### Fixed
    - Business Hours Image open still if the day is closed.
    
    v2.5.3 - 2015-11-18
    ----------------------------------------------------------------
    ### Added
    - Option to add late night hours for shortcode
    - Option to add late night hours for widgets
    - Option to add late night hours for VC Addons
    
    v2.5.2 - 2015-11-11
    ----------------------------------------------------------------
    ### Removed
    - Default background color for the closed text.
    
    ### Fixed
    - An issue with toggle display on both hours.
    - An issue with dots on the widget for today hours.
    
    v2.5.0 - 2015-10-27
    ----------------------------------------------------------------
    ### Added
    - Centered text-align option for the hour's display.
    
    ### Fixed
    - Undefined index issue with Sunday and weekday for the different timezone.
    - An issue with weekday starts option not working.
    
    v2.4.0 - 19th October 2015-10-19
    ----------------------------------------------------------------
    ### Added
    - Single day presentation on topbar or other places.
    - Closed days hide/show option.
    - The open and Closed Text option.
    - dot option which displays if it opened and closed.
    - Retrieve the date in the localized format, based on timestamp selected in your WordPress admin.
    
    ### Fixed
    - Title parameter value changed from 'true/false' to 'on'
    - Weekday issues with few localized date formats.
    
    v2.3.0 - 2015-08-26
    ----------------------------------------------------------------
    ### Added
    - Start Text option instead of time.
    - Open Text Background Color.
    - Open Text Field.
    - Class for additional texts Starts and End.
    - Open text in frontend for the Toggle Section.
    
    ### Changed
    - User Interface in Backend for Shortcode Settings Pane
    - User Interface modified for Text fields beside times.
    
    ### Fixed
    - An issue with the admin layout in small screens.
    - Renamed Visual Composer Addon Shortcode.
    - A current Day color issue with the widget.
    
    v2.2.0 - 2015-08-20
    ----------------------------------------------------------------
    ### Added
    - Grouping Hours for closed days.
    - Toggle open for shortcode as well.
    - Business Hours Addon for Visual Composer Plugin.
    - Holidays Addon for Visual Composer Plugin
    - Spanish Translation .pO and .mo file
    - English Translation .po and .mo file
    
    ### changed
    - Grouping_hrs attribute values changed from 'true' to 'on'
    
    ### Removed
    - Unwanted ID for the business hours shortcode.
    
    ### Fixed
    - Width issue with the shortcode.
    - Current Day Color for shortcode.
    - Deprecated Constructors in WordPress 4.3.
    - Slug issue with Alias Exists.
    - Spellings mistakes in English strings.
    
    v2.1.0 - 2015-08-19
    ----------------------------------------------------------------
    ### Added
    - Anchor link option for the description of holidays.
    
    ### Changed
    - User Interface for the jQuery UI Calendar.
    - User Interface for the Time Picker.
    
    ### Fixed
    - Typo issues with dialog boxes on deleting business hours.
    - Padding issue with notice messages in the admin area.
    
    v2.0.0 - 2015-08-18
    ----------------------------------------------------------------
    ### Added
    - Localization for Today Text string.
    - Localization for show more Text string.
    - One more Date format.
    - Add Holiday(s) and display that as a widget.
    - Add Holiday(s) and display/enable in a widget.
    - Hours Opening Image option.
    - Hours Closing Image option.
    - Displays an image based on the open and close hours.
    - Additional Text / End Time (e.g: 9:00 - Late Night).
    - Current Day Color Option.
    
    ### Changed
    - Toggle now replaced with Style only text in admin.
    - The user interfaces for the update of the plugin.
    
    ### Fixed
    - Backslash issue with few hosting servers.
    - Time period issues with overlapping.
    - Changes to the date formats issue with hours selection.
    - Responsive issues on few devices.
    - Time Selection issue on adding a new period.
    - Description displaying twice if used as the prefix.
    
    :warning: *Once the plugin is uploaded via FTP/Manually then kindly please deactivate and activate
    it back again to get database updated with additional required fields*
    
    v1.2.0 - 2015-03-24
    ----------------------------------------------------------------
    ### Removed
    - Unwanted width for the shortcode removed.
    
    ### Fixed
    - Time period issues with overlapping.
    
    v1.1.0 - 2015-03-18
    ----------------------------------------------------------------
    ### Added
    - Grouping Hours of business hours.
    - Enable or disable grouping hours.
    - Settings for the time format.
    - Toggle option for the time display.
    - Display current day and toggle other weekdays
    - Manual Plugin Update option from 1.1.0 from the next update only select the iva-business-hours-pro.zip file from the package and then upload from the plugins page. No need of using FTP or any file manager to update the plugin.
    
    ### Fixed
    - Localization for the translation of text Closed.
    
    v1.0 Initial Release - 2014-11-04
    ----------------------------------------------------------------
    

    Note: Not Caching Friendly

    Credits:
    TimePicker : http://trentrichardson.com/examples/timepicker/ Fontello: http://fontello.com/
  • by
    by
    by
    by
    by
    by