=== EZ-Updater ===
Contributors: shorecraft
Tags: status, business hours, availability, open closed, widget
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.2.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Display open / closed status, business hours, or short announcements on your WordPress site. Update it instantly from the WordPress admin.

== Description ==

EZ-Updater adds a small, customizable status widget to your WordPress site so visitors can see at a glance whether you're open, what today's hours are, or what's currently happening. You change the displayed value from the WordPress admin — no theme edits, no page rebuild.

Built-in widget templates:

**Status templates** (state-based badge, editable labels/colors/emoji):

* **Open / Closed** — two-state badge for daily availability, weather closures, on/off signals.
* **Availability List** — a list of labeled rows (e.g. Jumbos, X-Large, Large), each with its own selected status (Available / Selling Fast / Sold Out / Call Ahead). Ideal for size charts, daily availability, sections, or varieties.
* **Item Status** — three-state stock indicator (In Stock / Low / Sold Out) for a single product or menu item.
* **Announcement Banner** — toggle-on banner for live music, weather closures, or special events, with optional message and call-to-action.

**Value templates** (short free-form text):

* **Today's Value** — any single value you update daily.
* **Today's Hours** — compact inline stat for the day's open/close window.
* **Simple Notice** — one-line announcement.

Each widget supports:

* Custom labels, colors, and emoji per status
* Adjustable background, text color, padding, alignment, and border radius
* An optional last-updated timestamp shown beneath the widget
* Five display styles for Open / Closed widgets: Card, Banner (with optional message + CTA), Pill (inline), Hero (XXL halo block), Live (pulsing-dot streaming indicator)
* Two display styles for value widgets: Card and Inline (compact, sentence-friendly)

Two ways to embed a widget on any page or post:

* The `[sez widget="your-widget-slug"]` shortcode
* The "Status Widget" block in the Gutenberg editor

The free plugin lets you create as many widgets as you need and includes an admin activity log of recent updates.

= Looking for more? =

EZ-Updater Pro is an optional add-on plugin (sold separately from ez-updater.ai) that adds an Elementor widget and smarter Telegram updates such as natural-language messages and group chats. It is not required to use this plugin.

== Installation ==

1. In WordPress admin, go to **Plugins → Add New** and search for "EZ-Updater". Click **Install Now**, then **Activate**.
   * Or upload the plugin ZIP via **Plugins → Add New → Upload Plugin**.
2. Open **EZ Updater → Dashboard** from the admin menu and click **+ New Widget**.
3. Pick a template, give the widget a name, and save.
4. Copy the shortcode shown on the widget's edit screen (e.g. `[sez widget="todays-hours"]`) and paste it into any page, post, or text widget. Or insert the "Status Widget" block in the Gutenberg editor and pick the widget from the sidebar.
5. Update the widget any time from **EZ Updater → Dashboard**.

== Frequently Asked Questions ==

= How do I display a widget on my site? =

Either paste the shortcode (e.g. `[sez widget="todays-hours"]`) into a page or post, or insert the "Status Widget" block in the Gutenberg editor and pick the widget from the sidebar dropdown. The shortcode also works in any text-style sidebar widget.

= Can I change the colors and styling? =

Yes. Every widget has its own background, text color, padding, alignment, border radius, and per-status colors and emoji. Open / Closed widgets also support a "Banner" display style with an optional message and call-to-action button.

= How many widgets can I create? =

As many as you need. The free plugin does not cap the number of widgets.

= Does the plugin send my data anywhere? =

Only if you turn on Telegram updates. Out of the box the plugin contacts no external service; your widgets, settings, and activity log stay in your WordPress database and render from your own server. If you enable Telegram updates under EZ Updater and then Settings, the plugin connects to the EZ-Updater bridge and Telegram to relay your messages. See the External services section for exactly what is sent.

= Where can I place a widget? =

Anywhere you can use a shortcode or block — pages, posts, custom post types, text widgets in sidebars or footers, and most block-enabled theme areas.

= Can I update widgets without logging into WordPress? =

Not in the free plugin. The free plugin updates widgets from the WordPress admin only. The optional EZ-Updater Pro add-on (sold separately from ez-updater.ai) adds remote update workflows.

= How do I remove all plugin data? =

Deactivating and deleting the plugin from **Plugins → Installed Plugins** removes it. The settings page also has a "Reset everything" button that wipes widgets, settings, and the activity log without uninstalling the plugin itself.

== Screenshots ==

1. The dashboard, showing live widgets with quick status toggles and an activity log.
2. Creating a new widget — pick from seven preset templates grouped into Status and Value.
3. Editing a widget — labels, colors, emoji, and per-status styling.
4. The Status Widget block in the Gutenberg editor.
5. An Open / Closed widget rendered on the front end (Card display style).
6. An Open / Closed widget rendered as a Banner, with a message and call-to-action button.

== Changelog ==

= 1.2.1 =
* Fix: the Telegram panel linked to an incorrect bot username. It now points to the correct @ShorecraftEZUpdaterBot.

= 1.2.0 =
* New: **Telegram updates** for the free plugin. Connect your site under EZ Updater and then Settings, pair an open/closed or availability widget, and update it by sending a message to the EZ-Updater bot. Covers one site.
* Telegram updates are opt-in and off by default. Value widgets (Today's Value, Today's Hours, Simple Notice) continue to update from the WordPress admin only.
* Privacy: the plugin makes no external requests unless you enable Telegram updates. See the "External services" section below for exactly what is sent and to whom.

= 1.1.2 =
* New: **Advanced Styling** section on every widget edit screen — a collapsed panel that exposes typography and layout controls without overloading the main UI. Existing widgets render unchanged because every new field defaults to the previous CSS value.
* Availability List gets the full set: title font size & weight, item label font size & weight, status pill font size / weight / horizontal padding / vertical padding / border radius, row spacing, label-to-pill gap, max width, and an optional **Compact mode** for tight restaurant-style layouts.
* Single (Open / Closed, Item Status, Announcement) and Value (Today's Hours, Notice) widgets get the relevant subset: title size, title weight, max width.
* Frontend rendering: every advanced field is emitted as a CSS variable on the widget wrapper (e.g. `--sez-pill-pad-x`, `--sez-row-gap`, `--sez-max-width`), so themes and Elementor's typography controls can still override them. Mobile styles for the list widget continue to read the same variables for consistency.
* Backward compatible: each field stores `0` for "use default", and `inline_style()` only emits a CSS variable when the user has explicitly set a non-default value.

= 1.1.1 =
* UX: merged the standalone "New Widget" page into the dashboard. Every template is now visible the moment users open EZ Updater — no extra click. Existing widgets render as cards above the template chooser; the "+ New Widget" header button scrolls to the create form. Old `?action=new` URLs still resolve to the merged dashboard.

= 1.1.0 =
* New widget type: **Availability List**. A repeatable-rows widget where each row has its own selected status — perfect for size charts, daily availability, varieties, sections. Default rows seed with Jumbos / X-Large / Large; defaults are fully editable.
* New: preset template chooser. The "New widget" screen now offers seven starting templates grouped into Status (Open / Closed, Availability List, Item Status, Announcement Banner) and Value (Today's Value, Today's Hours, Simple Notice). Each preset pre-fills statuses, colors, the display style — and for Availability List, starter rows.
* New frontend rendering for Availability List: clean list layout with status pills on the right, transparent-background mode for hero-area placement, mobile-responsive.
* New: `EZU_Widget::presets()`, `create_from_preset()`, and `EZU_List` data layer. Paid add-ons can register additional presets via the `ezu_widget_presets` filter.
* Compatibility: existing widgets are unchanged. Existing single/value renderers and shortcodes/Gutenberg block work identically. The new Availability List type uses a new post-meta key (`_sez_avail_items`) so it never collides with the EZ-Updater Pro add-on's own `list` type.

= 1.0.8 =
* Fix: fatal parse error on activation. A docblock in `class-ezu-admin.php` contained the literal sequence `*/` mid-comment (inside an example WP-core path), which terminated the comment early and made the parser hit class-body code where it expected a method. Rewrote the path with `{scheme}` instead of `*` so the docblock closes only at its real end.

= 1.0.7 =
* Hardening: every conditional class/attribute echo in the admin and front-end templates is now wrapped in `esc_attr()`. No behavioral change — both branches were already hardcoded literal strings, but this satisfies static analysis (Plugin Check / PHPCS WordPress.Security.EscapeOutput) and removes false positives for reviewers.

= 1.0.6 =
* Fix: admin menu icon rendered near-black instead of matching the WP admin color scheme. CSS background-image data URIs don't inherit `currentColor`, so the SVG is now tinted at render time with per-scheme idle/active colors that mirror WP core's built-in Dashicons.

= 1.0.5 =
* Author URI now points to the /about page on ez-updater.ai.
* Settings page: added a discreet Documentation link to ez-updater.ai/docs.
* Internal: synced the `EZU_VERSION` constant with the plugin header version (was out of sync in 1.0.4).

= 1.0.4 =
* Branding: plugin URI, author URI, and the "Learn about Pro" button now point to ez-updater.ai. No functional changes.

= 1.0.3 =
* Fix: widget edit page "Save changes" button became unresponsive when paid add-ons (EZ-Updater Pro) injected forms into the extra-panels hook. Cause: nested forms are invalid HTML, so browsers auto-closed the outer form and orphaned the Save button. The extra-panels hook now renders outside the parent form so add-on forms can coexist.

= 1.0.2 =
* Display styles: four new options for Open / Closed widgets — Pill (inline status), Hero (XXL halo display block for hero sections), Live (pulsing-dot streaming-style indicator), in addition to the existing Card and Banner.
* Display styles: Inline option for value widgets (today's hours, free text) — renders as a compact accent-tinted stat that flows inline with running copy.
* No breaking changes — existing widgets continue to render with their saved style.

= 1.0.1 =
* Add `ezu_render_template_candidates` filter so add-on plugins can register custom widget-type templates.

= 1.0.0 =
* Initial public release.

== Upgrade Notice ==

= 1.2.0 =
Adds optional Telegram updates: pair an open/closed or availability widget and change it from your phone. Off by default; nothing is sent externally unless you connect.

= 1.1.2 =
Adds an Advanced Styling panel on every widget edit screen — typography, pill sizing, row spacing, max width, and a Compact mode for the Availability List. Existing widgets are not affected.

= 1.1.1 =
The dashboard and "New Widget" pages are now one screen, so every starting template is visible the moment you open EZ Updater.

= 1.1.0 =
Adds the new Availability List widget (repeatable rows, each with its own status) plus a richer New Widget chooser with seven preset templates. Existing widgets render unchanged.

= 1.0.2 =
Adds five new display styles (Pill, Hero, Live, Inline, plus refreshed Card). Pick a new style on any widget's edit screen.

= 1.0.1 =
Adds an extension point for add-on plugins. No user-facing changes.

= 1.0.0 =
Initial public release of EZ-Updater.

== External services ==

Out of the box this plugin makes no external requests: your widgets, settings, and activity log are stored in your WordPress database and rendered from your own server.

It connects to external services only if you turn on Telegram updates on the EZ Updater Settings screen. That feature is off until you click "Connect to Telegram".

**EZ-Updater bridge**

Telegram updates are relayed through the EZ-Updater bridge, a service operated by EZ-Updater. When you connect, the plugin sends the bridge your site URL, your site name, a generated site identifier, a generated shared secret (used to sign requests between the bridge and your site), and the plugin version. While the feature is in use, the bridge sends your site the text of Telegram messages paired to it plus the sender name and chat details, and your site returns a short confirmation message.

Service: https://ez-updater.ai
Terms of service: https://ez-updater.ai/terms
Privacy policy: https://ez-updater.ai/privacy

**Telegram**

Messages are delivered to and from Telegram through the Telegram Bot API, operated by Telegram FZ-LLC. Your Telegram message text, sender name, and chat details pass through Telegram to deliver updates to your site.

Terms of service: https://telegram.org/tos
Privacy policy: https://telegram.org/privacy
