{"id":411223,"date":"2026-11-30T23:57:22","date_gmt":"2026-11-30T23:57:22","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/holiday-hours-opening-hours-with-automatic-public-holidays\/"},"modified":"2026-11-30T23:56:48","modified_gmt":"2026-11-30T23:56:48","slug":"afterdone-holiday-hours","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/afterdone-holiday-hours\/","author":23611300,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.0.3","stable_tag":"1.0.3","tested":"7.1.5","requires":"6.4","requires_php":"7.4","requires_plugins":null,"header_name":"AfterDone Holiday Hours \u2013 Opening Hours with Automatic Public Holidays","header_author":"AfterDone","header_description":"Opening hours and business hours with a live open\/closed badge and upcoming closures. Public holidays for your country are added automatically.","last_updated":"2026-11-30 23:56:48","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"","header_author_uri":"","rating":0,"author_block_rating":0,"active_installs":0,"downloads":50,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.3":{"tag":"1.0.3","author":"afterdone","date":"2026-11-30 23:56:48","revision":3836361}},"upgrade_notice":{"1.0.3":"<p>Renames the plugin for the directory listing. Saved hours, holidays, and the shortcode stay as they were.<\/p>","1.0.2":"<p>Some holidays, including US Columbus Day and Veterans Day, and an observed date next to the holiday itself, now follow your weekly hours. Open Holiday Hours settings to close any you want shut, or to turn off the JSON-LD block.<\/p>","1.0.1":"<p>Adds an extension point for a separate add-on. Existing schedules, badges, and blocks render as before.<\/p>","1.0.0":"<p>Initial release.<\/p>"},"ratings":[],"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":{"afterdone-holiday-hours\/hours":{"$schema":"https:\/\/schemas.wp.org\/trunk\/block.json","apiVersion":3,"name":"afterdone-holiday-hours\/hours","title":"AfterDone Holiday Hours","category":"widgets","description":"Opening hours, a live open or closed badge, and upcoming closures with public holidays.","keywords":["hours","holiday","open"],"textdomain":"afterdone-holiday-hours","attributes":{"view":{"type":"string","default":"all","enum":["badge","week","closures","all"]},"days":{"type":"number","default":60},"showHolidayNames":{"type":"boolean","default":true},"location":{"type":"string","default":""}},"supports":{"html":false,"multiple":true},"editorScript":"file:.\/index.js"}},"tagged_versions":["1.0.3"],"block_files":[],"assets_screenshots":[],"screenshots":{"1":"Settings for weekly hours, country, and region. A Friday close of 02:00 continues past midnight.","2":"A holiday override and a manual closure.","3":"The open or closed badge, the weekly table, and upcoming closures on the front end.","4":"The AfterDone Holiday Hours block in the editor, with the same choices as the shortcode."}},"plugin_section":[],"plugin_tags":[12431,13422,1122,15082,200749],"plugin_category":[],"plugin_contributors":[296728],"plugin_business_model":[],"class_list":["post-411223","plugin","type-plugin","status-publish","hentry","plugin_tags-business-hours","plugin_tags-holidays","plugin_tags-local-seo","plugin_tags-opening-hours","plugin_tags-store-hours","plugin_contributors-afterdone","plugin_committers-afterdone"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/afterdone-holiday-hours.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>AfterDone Holiday Hours shows a business\u2019s weekly opening hours (store hours, office hours, or business hours), a live \u201cOpen now\u201d or \u201cClosed \u2013 Thanksgiving Day\u201d badge, and a list of upcoming closures. Public holidays for the country you choose, and for a region when the calendar has one, are applied automatically. You do not have to type in Christmas, Easter Monday, or a bank holiday every year.<\/p>\n\n<p>Bundled holiday tables list 248 countries and territories for 2026 through 2031 (a few have no dates in this release, see the FAQ), with regions for 34 of them (for example US states, Canadian provinces, German states, and the four nations of the United Kingdom). The tables are files inside the plugin. Nothing is downloaded and no API key is needed.<\/p>\n\n<p>The badge is calculated in the visitor\u2019s browser from the embedded schedule and the visitor\u2019s clock. It is checked again about once a minute from that same schedule, in the business time zone. A full-page cache can store the page, and it still will not freeze yesterday\u2019s open or closed state. Browsers without JavaScript get the same calculation from PHP at request time. The page also includes <code>OpeningHoursSpecification<\/code> and <code>specialOpeningHoursSpecification<\/code> JSON-LD. Special hours are the days that differ from the weekly schedule, such as a holiday that closes a normally open day.<\/p>\n\n<h4>Who it is for<\/h4>\n\n<p>Shops, restaurants, caf\u00e9s, clinics, salons, offices, libraries, and any site that needs to answer \u201care you open today?\u201d and \u201care you open on the holiday?\u201d on its own website.<\/p>\n\n<h4>What you can set<\/h4>\n\n<ul>\n<li>Weekly hours, with a second interval for a lunch break. A closing time earlier than the opening time stays open past midnight.<\/li>\n<li>A country and, where the bundled calendar has them, a region. Countries with no bundled dates are left out of the list.<\/li>\n<li>Per-holiday \u201cOpen on this holiday\u201d checkboxes. Checked holidays use the weekly schedule. Some holidays start checked: days when shops usually stay open, and an observed date within three days of the same holiday, so the business is not closed on both dates.<\/li>\n<li>Per-holiday overrides: stay closed, use regular hours, or set custom hours. An override replaces the checkbox for that holiday name.<\/li>\n<li>Manual closures for a vacation or a one-off date, including custom hours.<\/li>\n<li>A named time zone. The badge uses that zone, not the visitor\u2019s zone.<\/li>\n<li>Optional LocalBusiness JSON-LD. It is on until you turn it off.<\/li>\n<\/ul>\n\n<h4>Shortcode<\/h4>\n\n<pre><code>[holiday_hours view=\"all\" days=\"60\" show_holiday_names=\"1\" location=\"\"]\n<\/code><\/pre>\n\n<ul>\n<li><code>view<\/code> is <code>badge<\/code>, <code>week<\/code>, <code>closures<\/code>, or <code>all<\/code>.<\/li>\n<li><code>days<\/code> is how many days ahead the closures list looks (1\u2013180).<\/li>\n<li><code>show_holiday_names<\/code> hides public-holiday names when set to <code>0<\/code>. Labels you wrote for manual closures stay visible.<\/li>\n<li><code>location<\/code> is accepted and ignored. Every value uses the schedule from this plugin\u2019s settings screen. A separate add-on can read the attribute.<\/li>\n<\/ul>\n\n<p>The AfterDone Holiday Hours block has the same choices, including an optional location attribute with the same meaning.<\/p>\n\n<h4>Holidays<\/h4>\n\n<p>Dates for 2026 through 2031 are bundled. They are generated from python-holidays 0.82 (MIT). The plugin does not ship that library\u2019s code, and it does not use the date-holidays dataset. See <code>THIRD-PARTY-NOTICES.txt<\/code> for the copyright and license. Names are in English when python-holidays provides an English catalog. Otherwise the library\u2019s default language is used, so Italy\u2019s names are Italian.<\/p>\n\n<p>A normal public holiday is closed. A holiday flagged as usually open for shops, and an observed date within three days of the same holiday, uses the weekly schedule until you change it. If several holidays fall on one day, every one of them must be open on the weekly schedule, or all of them must be set to the same custom hours. Otherwise the day stays closed. A manual closure on that date wins.<\/p>\n\n<h4>Privacy<\/h4>\n\n<p>AfterDone Holiday Hours does not phone home, load a CDN, or send analytics. CSS and JavaScript are files in the plugin. There is no Freemius SDK. A separate add-on is its own plugin. The hooks it can use are listed in the FAQ.<\/p>\n\n<h3>Source code and build<\/h3>\n\n<p>Unminified block source is in <code>src\/<\/code> (<code>index.js<\/code>, <code>edit.js<\/code>, and <code>block.json<\/code>). <code>build\/index.js<\/code> is the unminified webpack build of those files. This copy of the plugin also includes <code>package.json<\/code>, <code>package-lock.json<\/code>, <code>webpack.config.js<\/code>, <code>babel.config.js<\/code>, and <code>scripts\/finalize-build.mjs<\/code>. From the plugin directory, run <code>npm ci &amp;&amp; npm run build<\/code>.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload the <code>afterdone-holiday-hours<\/code> folder to <code>\/wp-content\/plugins\/<\/code>, or install the zip from the Plugins screen.<\/li>\n<li>Activate AfterDone Holiday Hours.<\/li>\n<li>Open Settings, then Holiday Hours. Enter the weekly hours, time zone, and country.<\/li>\n<li>Add the AfterDone Holiday Hours block, or the <code>[holiday_hours]<\/code> shortcode, to a page.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"why%20does%20the%20badge%20say%20%E2%80%9Copening%20hours%E2%80%9D%20for%20a%20moment%3F\"><h3>Why does the badge say \u201cOpening hours\u201d for a moment?<\/h3><\/dt>\n<dd><p>That placeholder is what a cached page is allowed to store. The browser replaces it with \u201cOpen now\u201d or \u201cClosed\u201d as soon as the script runs. The status is not saved into the HTML, so a page cache cannot show a stale one.<\/p><\/dd>\n<dt id=\"what%20do%20visitors%20without%20javascript%20see%3F\"><h3>What do visitors without JavaScript see?<\/h3><\/dt>\n<dd><p>PHP calculates the same status and puts it in a noscript block. A full-page cache can freeze that fallback. The scripted badge is the cache-safe one.<\/p><\/dd>\n<dt id=\"how%20do%20i%20stay%20open%20on%20a%20holiday%3F\"><h3>How do I stay open on a holiday?<\/h3><\/dt>\n<dd><p>On the settings screen, check \u201cOpen on this holiday\u201d, or add the holiday\u2019s name and choose \u201cRegular hours\u201d or \u201cCustom hours\u201d. The name has to match the bundled calendar. Save the country first if the list is empty.<\/p><\/dd>\n<dt id=\"my%20business%20is%20open%20on%20some%20public%20holidays.%20what%20should%20i%20do%3F\"><h3>My business is open on some public holidays. What should I do?<\/h3><\/dt>\n<dd><p>Some bundled holidays start open, on your weekly hours. In the United States that includes Columbus Day, Veterans Day, Indigenous Peoples\u2019 Day where that is the name of the Columbus Day holiday, Native Americans\u2019 Day, and the day after Thanksgiving (including \u201cFriday After Thanksgiving\u201d and Maryland\u2019s American Indian Heritage Day). An observed date also starts open when the same holiday is already listed within three days, so the badge does not close both days. Independence Day (observed) on Friday 3 July 2026 starts open. Independence Day on Saturday 4 July 2026 stays closed. Uncheck \u201cOpen on this holiday\u201d to close any of these. Other public holidays, including Thanksgiving Day and Christmas Day, stay closed until you check the box or add an override.<\/p><\/dd>\n<dt id=\"which%20countries%20are%20included%3F\"><h3>Which countries are included?<\/h3><\/dt>\n<dd><p>The bundled tables cover 248 countries and territories, generated from python-holidays 0.82. The settings screen lists every one that has at least one date in 2026 through 2031. Ukraine, Sri Lanka, Bouvet Island, Heard Island and McDonald Islands, and the British Indian Ocean Territory have no dates in that release, so they are not listed. Use manual closures for those places.<\/p><\/dd>\n<dt id=\"does%20it%20work%20with%20page%20caching%3F\"><h3>Does it work with page caching?<\/h3><\/dt>\n<dd><p>Yes. The open or closed badge and the closures list are worked out in the visitor\u2019s browser from the schedule embedded in the page, so a cached page does not freeze yesterday\u2019s status. While the page stays open, the badge reads that same schedule again about once a minute, in the business time zone, without another request to your site. If a performance plugin delays JavaScript until the visitor interacts with the page, the open or closed text waits until that script runs. Exclude <code>afterdone-holiday-hours\/assets\/js\/<\/code> from that delay setting.<\/p><\/dd>\n<dt id=\"which%20day%20wins%20when%20rules%20overlap%3F\"><h3>Which day wins when rules overlap?<\/h3><\/dt>\n<dd><p>A manual closure is used first. Then holiday overrides. Then the public holiday, which is closed. Then the weekly hours. If two manual rows cover the same date, the first one wins. The closing time is already closed: 17:00 means 17:00 is not open.<\/p><\/dd>\n<dt id=\"can%20hours%20run%20past%20midnight%3F\"><h3>Can hours run past midnight?<\/h3><\/dt>\n<dd><p>Yes. Set the closing time earlier than the opening time, for example 18:00 to 02:00. The business stays open until 02:00 the next day. A closing time of 00:00 ends at midnight and does not continue. The open and closed result uses the business time zone\u2019s wall clock, including on the mornings when clocks change for daylight saving.<\/p><\/dd>\n<dt id=\"what%20if%20a%20holiday%20falls%20on%20only%20one%20side%20of%20an%20overnight%20interval%3F\"><h3>What if a holiday falls on only one side of an overnight interval?<\/h3><\/dt>\n<dd><p>The interval belongs to the day it opens.<\/p>\n\n<ul>\n<li>A public holiday or manual closure on that start day removes the interval, including the part after midnight. The next morning is not open because of it.<\/li>\n<li>A public holiday or manual closure on the next day changes only that next day\u2019s own hours. The business stays open until the interval\u2019s closing time, then follows the next day.<\/li>\n<\/ul>\n\n<p>JSON-LD records the after-midnight time on the start day\u2019s <code>OpeningHoursSpecification<\/code>, with <code>closes<\/code> earlier than <code>opens<\/code>. A special of 00:00\u201300:00 closes that date\u2019s own intervals. It does not delete a tail that belongs to the previous day.<\/p><\/dd>\n<dt id=\"why%20were%20some%20hours%20left%20out%20when%20i%20saved%3F\"><h3>Why were some hours left out when I saved?<\/h3><\/dt>\n<dd><p>Overlapping intervals are removed. That includes two ranges on the same day, and an overnight interval that runs into the next day\u2019s hours. On one day, the later start time is the one removed. The overnight interval is kept instead of the next day\u2019s overlapping hours. The settings screen shows an error when this happens. A close of 02:00 and a next-day open of 02:00 do not overlap, because 02:00 is already closed.<\/p><\/dd>\n<dt id=\"do%20ordinary%20closed%20weekdays%20show%20in%20the%20closures%20list%3F\"><h3>Do ordinary closed weekdays show in the closures list?<\/h3><\/dt>\n<dd><p>No. The weekly table shows those. The closures list is public holidays and manual closures that are shut all day.<\/p><\/dd>\n<dt id=\"how%20far%20ahead%20do%20the%20holiday%20tables%20go%3F\"><h3>How far ahead do the holiday tables go?<\/h3><\/dt>\n<dd><p>2026 through 2031. After that, weekly hours and manual closures still work, and public holidays are not filled in until a plugin update ships new tables.<\/p><\/dd>\n<dt id=\"does%20it%20add%20structured%20data%20for%20search%20engines%3F\"><h3>Does it add structured data for search engines?<\/h3><\/dt>\n<dd><p>By default, yes. The first Holiday Hours widget on a page prints a Schema.org <code>LocalBusiness<\/code> JSON-LD block with <code>openingHoursSpecification<\/code> and <code>specialOpeningHoursSpecification<\/code> for holidays and closures. It includes the business name if you set one, and no address. Settings, then Holiday Hours, then \u201cOutput structured data (JSON-LD)\u201d turns the block off. Turn it off when Yoast, Rank Math, or another SEO plugin already prints your business. A developer can also remove it with the <code>hhours_jsonld<\/code> filter by returning false or an empty array. Any other value that is not an array leaves the block as it was. When the block is on, the filter can still change it, for example to add your address.<\/p><\/dd>\n<dt id=\"does%20the%20plugin%20track%20visitors%20or%20load%20anything%20from%20another%20site%3F\"><h3>Does the plugin track visitors or load anything from another site?<\/h3><\/dt>\n<dd><p>No. It makes no runtime HTTP requests.<\/p><\/dd>\n<dt id=\"where%20is%20the%20source%20for%20the%20block%20editor%20script%3F\"><h3>Where is the source for the block editor script?<\/h3><\/dt>\n<dd><p>src\/index.js and <code>src\/edit.js<\/code> are the files that were written for the block. <code>build\/index.js<\/code> is the unminified build of those files. Packages such as <code>@wordpress\/blocks<\/code> are loaded from WordPress and are not copied into the build. Rebuild steps are in Source code and build.<\/p><\/dd>\n<dt id=\"can%20a%20separate%20add-on%20extend%20this%20plugin%3F\"><h3>Can a separate add-on extend this plugin?<\/h3><\/dt>\n<dd><p>Yes. A separate plugin can use these hooks. This plugin does not include a license check.<\/p>\n\n<ul>\n<li><code>hhours_loaded<\/code> runs when this plugin has loaded.<\/li>\n<li><code>hhours_settings<\/code> filters the sanitized settings. The result is sanitized again.<\/li>\n<li><code>hhours_settings_saved<\/code> runs as settings are saved.<\/li>\n<li><code>hhours_render_settings<\/code> filters the settings for one shortcode or block, after they have been sanitized. The <code>location<\/code> attribute is passed through. The result is not sanitized again.<\/li>\n<li><code>hhours_holidays<\/code> filters the holiday rows embedded in the page. The browser badge uses that list.<\/li>\n<li><code>hhours_now<\/code> filters the UTC instant used for the no-JS fallback.<\/li>\n<li><code>hhours_status<\/code> filters that no-JS status. It does not change the browser badge.<\/li>\n<li><code>hhours_jsonld<\/code> filters the JSON-LD.<\/li>\n<li><p><code>hhours_markup<\/code> filters the HTML.<\/p>\n\n<p>HHours_Renderer::config_from_settings() builds the engine config, including the holiday list, for an add-on that needs to ask \u201copen or closed?\u201d outside the widget.<\/p><\/li>\n<\/ul><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.3<\/h4>\n\n<ul>\n<li>Plugin name is AfterDone Holiday Hours \u2013 Opening Hours with Automatic Public Holidays. Text domain is afterdone-holiday-hours.<\/li>\n<li>The no-JavaScript badge fallback no longer prints a style tag. An enqueued inline script adds the hhours-js class, and the stylesheet hides the placeholder when that class is absent.<\/li>\n<li>Block source and the build tools are included in the plugin. See Source code and build.<\/li>\n<\/ul>\n\n<h4>1.0.2<\/h4>\n\n<ul>\n<li>Holidays where shops usually stay open, including United States Columbus Day and Veterans Day, use regular weekly hours until you change them. An observed date within three days of the same holiday is not closed as well.<\/li>\n<li>Settings lists the selected country\u2019s holidays with an \u201cOpen on this holiday\u201d checkbox. Schedules saved in 1.0.1 keep the overrides you already set.<\/li>\n<li>\u201cOutput structured data (JSON-LD)\u201d turns off the LocalBusiness block. The <code>hhours_jsonld<\/code> filter turns it off when it returns false or an empty array.<\/li>\n<li>The open or closed badge refreshes about once a minute from the schedule already on the page, in the business time zone.<\/li>\n<li>Ukraine, Sri Lanka, Bouvet Island, Heard Island and McDonald Islands, and the British Indian Ocean Territory are left out of the country list because those tables have no dates for 2026 through 2031.<\/li>\n<li>Readme name, tags, and description.<\/li>\n<\/ul>\n\n<h4>1.0.1<\/h4>\n\n<ul>\n<li>The shortcode and block accept a <code>location<\/code> attribute. This plugin still renders the one schedule from its settings screen for every value.<\/li>\n<li><code>hhours_render_settings<\/code> lets a separate add-on supply the settings for one shortcode or block.<\/li>\n<li><code>HHours_Renderer::config_from_settings()<\/code> is public so an add-on can evaluate a schedule with the same holiday list as the badge.<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial release.<\/li>\n<li>Weekly hours may cross midnight. The badge stays open until that closing time on the next day, including across daylight-saving changes and the new year.<\/li>\n<li>A holiday or manual closure on the day an overnight interval opens removes the next morning as well. A holiday on the next day does not cut that tail short.<\/li>\n<li>Overlapping intervals are rejected on the settings screen.<\/li>\n<li>JSON-LD keeps a past-midnight interval on the day it opens.<\/li>\n<li>Tested with WordPress 7.1.5.<\/li>\n<\/ul>","raw_excerpt":"Opening hours and business hours with a live open\/closed badge and upcoming closures. Public holidays for your country are added automatically.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/411223","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=411223"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/afterdone"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=411223"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=411223"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=411223"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=411223"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=411223"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=411223"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}