=== BigBad Store Hours ===
Contributors: sofrustrate
Tags: store hours, business hours, woocommerce, opening hours, wordpress
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.0
Stable tag: 1.5.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Show whether your store is open or closed (and when it closes) using shortcodes, plus an optional floating status bar.

== Description ==

BigBad Store Hours adds simple, reliable "Open / Closed" output anywhere on your site with shortcodes. You can also enable an optional floating status bar and (optionally) show notices in WooCommerce cart/checkout.

**Features**
* Weekly schedule editor (Mon-Sun)
* "Closing soon" messaging (minutes before close)
* Optional floating status bar (top/bottom) with style presets
* Shortcodes for: full status, today's hours, a weekly table, and a countdown
* Optional WooCommerce cart/checkout notices (if WooCommerce is active)

== Shortcodes ==

* `[bbsh_store_hours]` - Open/closed status with messaging
* `[bbsh_store_hours_today]` - Today's hours (e.g., "Mon: 10:00-21:00")
* `[bbsh_store_hours_table]` - Weekly hours table
* `[bbsh_store_hours_countdown]` - Countdown until close (when open)

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/` or install via the Plugins screen.
2. Activate **BigBad Store Hours**.
3. Go to **BigBad Store Hours > Settings** and set your weekly schedule.
4. Add a shortcode to any page/post (see Shortcodes section).

== Frequently Asked Questions ==

= Does this require WooCommerce? =
No. WooCommerce integration is optional and only affects cart/checkout notices.

= What time format should I use for hours? =
You can use either:

* 24-hour: `10:00-21:00` or `09:30-17:15`
* 12-hour: `10am-9pm` or `9:30am-5:15pm`

Use `start-end` and separate multiple ranges with commas, e.g. `09:00-12:00,13:00-17:00`.

= Can I disable the floating bar and only use shortcodes? =
Yes - just disable the bar in settings and use shortcodes wherever you like.

== Screenshots ==

1. Settings screen (schedule + bar options)

== Changelog ==

= 1.5.0 =
* Admin: Fixed dark mode CSS - settings page card backgrounds now adapt to all WordPress admin color schemes (was hardcoded white).
* Admin: Removed misleading "ADVANCED" label from free shortcodes ([bbsh_store_hours_table], [bbsh_store_hours_countdown]).
* Admin: Order cutoff and prep buffer settings now clearly labeled as Pro-only; honest inline note added.
* Admin: Added Pro features tease card showing upcoming Pro features (disabled, single upgrade CTA).
* Admin: Rebuilt "How to Use" admin page - now includes full shortcode reference, holiday override syntax with examples, known limitations, and Free vs. Pro comparison table.
* Admin: Added "Reset to Defaults" button to settings page.
* Fix: PHP bug in per-day cutoff helper - $day variable was accidentally commented out on the same line as its doc comment.
* Fix: WooCommerce cart/checkout notices now use plain text output, resolving potential HTML stripping by wp_kses.
* Fix: Removed leftover dead-code if(true) wrappers from state calculation and shortcode functions.
* Fix: Removed duplicate float_position save in settings POST handler.
* Fix: Corrected malformed HTML in settings page (span element closed with wrong tag).
* Docs: Fixed malformed FAQ entry in readme.txt (duplicated question text).
* Docs: Cleaned up stray blank lines in Changelog and Upgrade Notice sections.

= 1.4.4 =
* Compatibility: Align text domain with currently reserved slug during review (bigbad-store-hours).
* Compatibility: Remove deprecated manual translation loading for WordPress.org hosted plugins.
* Admin: Explicitly set scripts to load in footer.

= 1.4.3 =
* Add floating widget display option and conversational messaging.
* Fix sticky placement and z-index for widget and bar.

= 1.4.2 =
* Fix: Sticky bar placement now correctly honors Top/Bottom across themes (wp_body_open hook + higher z-index).
* Fix: Prevent bar hiding behind footers/overlays (z-index + admin-bar offsets).

= 1.4.1 =
* Fix: Restore missing bbsh_oh_shortcode() renderer (prevents fatal error in admin settings and shortcode rendering).
* Fix: Rebuilt frontend renderer to ensure Top/Bottom placement and distinct styles work consistently.

= 1.4.0 =
* Fix: Sticky bar Top/Bottom placement now respects settings reliably.
* Update: Make the three bar styles visually distinct (Minimal/Pill/Banner).
* Update: Banner style now shows next close/reopen time.

= 1.3.6 =
* Readme/docs: clarified supported time format (24-hour HH:MM-HH:MM).
* Readme/docs: synchronized changelog and upgrade notice with the Stable tag.

= 1.3.5 =
* Hardened settings save logic to avoid PHP notices.
* Escaped admin attribute output for better coding-standards compliance.

= 1.3.4 =
* Renamed to BigBad Store Hours / bigbad-store-hours.
* Prefixed public shortcodes and added i18n loading.

== Upgrade Notice ==

= 1.5.0 =
Fixes dark mode CSS, PHP bug in cutoff helper, and WooCommerce notice HTML stripping. Adds reset-to-defaults button and a rebuilt How to Use page. Recommended for all users.

= 1.4.4 =
* Compatibility fixes for WordPress.org automated checks.

= 1.4.3 =
Adds a floating widget display option and improves bar/widget messaging.

= 1.4.2 =
* Fix sticky bar placement and ensure it stays above theme footers.

= 1.4.1 =
* Fix: resolves a fatal error in the admin settings page and restores correct rendering.

= 1.4.0 =
* Improves sticky bar placement and bar style clarity.

= 1.3.9 =
* Fix: sticky bar respects top/bottom setting.
* Fix: style presets apply consistently (inline previews + bar).
* Fix: label settings now apply on the frontend.

= 1.3.8 =
Fix: Sticky bar position now respects Top/Bottom setting.

= 1.3.6 =
Maintenance update: readme accuracy and version synchronization.

= 1.3.5 =
Maintenance update: improves settings handling and code standards.
