WidgetCoreWidgetCore Documentation

Changelog

What changed in every released version of the WidgetCore plugin, newest first.

v0.1.2Nine new widgets, richer Tabs, dynamic tags and hover fixesLatest

Release date:

Adds nine new Elementor widgets on the shared control trait — accessible Tabs (each tab now holds visual text, a saved Elementor template or raw custom HTML), Counter, Progress Bar, Alert, Icon Box, Price Table, Social Icons, a Breadcrumb trail bridging to Yoast/Rank Math with BreadcrumbList schema, and Share buttons for Iranian networks and custom URLs — plus dynamic tags on every URL control and hover-state fixes. Widgets reach 12: version 0.1.2 absorbs the unpublished 0.1.0 and 0.1.1.

  • Tabs (wgcr-tabs): horizontal or vertical tabs with full ARIA (tablist/tab/tabpanel), roving TabIndex, Arrow/Home/End keyboard navigation, optional wrap into multiple rows, empty tabs skipped safely and a tiny dependency-free script that loads only on pages using the widget.
  • Counter (wgcr-counter): animated number with start, end, duration, prefix and suffix that runs once when scrolled into view, respects reduced-motion, shows the end number without JavaScript and never re-animates on tab switches.
  • Progress Bar (wgcr-progress): one or more percentage bars with per-bar color, progressbar ARIA, animated fill and RTL-safe origin — no JavaScript.
  • Alert (wgcr-alert): info/success/warning/danger boxes with automatic icons, role="status" or role="alert" and an accessible dismiss button; the dismissal script loads only where the widget is used.
  • Icon Box (wgcr-iconbox): icon above or beside title and description, optional title link with noopener noreferrer nofollow, hover colors and safe inline SVG output — no JavaScript.
  • Price Table (wgcr-pricetable): plan card with featured state and badge, currency symbol, period, included/excluded feature list and a call-to-action button — pure CSS.
  • Social Icons (wgcr-social): link row in an accessible nav landmark with SVG icons, optional labels, new-tab and nofollow switches — no JavaScript.
  • Every new widget is built on the shared WGCR_Size_Controls trait, so all size controls are responsive with Normal and Hover tabs like the existing widgets; CSS and JS load only on pages that use each widget.
  • Breadcrumb (wgcr-breadcrumb): automatic mode prints the Yoast SEO or Rank Math breadcrumb when either plugin is active and otherwise builds an accessible trail (home, page ancestors, primary category of single posts, archive/author/search/404 labels) with optional BreadcrumbList JSON-LD, eight separators or a custom one — no JavaScript.
  • Share (wgcr-share): server-rendered share buttons for Telegram, WhatsApp, Eitaa, X, Facebook, LinkedIn and email from the current permalink and title, a copy-link button with Clipboard API plus legacy fallback and aria-live feedback, and unlimited custom networks (Bale, Rubika, Soroush, …) defined by a share URL pattern with {url}/{title} placeholders — icon-only or labeled, three shapes, Normal/Hover color controls and one tiny script loaded only where used.
  • Tabs content types: every tab chooses between visual-editor text, a saved Elementor template printed through the new [wgcr_template] shortcode, or raw custom HTML printed unfiltered exactly like Elementor's HTML widget (scripts run; the editor previews the code live).
  • Dynamic tags: every URL control (Icon Box link, Price Table button, each Social Icons profile URL) now offers Elementor's dynamic-tags picker like Elementor's own widgets.
  • Hover fixes: the Alert close button, the Social Icons links and the Price Table button keep their hover styles when Normal-state colors are set — hover styling now runs through dedicated CSS variables with Normal/Hover control tabs, new hover controls were added (Alert close hover color; Price Table hover background/text, which also disables the default brightness effect) and the Price Table button gained a reduced-motion-friendly transition.
  • All new strings translated to Persian and English (POT regenerated); the plugin version becomes 0.1.2 with 12 registered widgets, merging the never-published 0.1.0 and 0.1.1 numbers into this single release.

v0.0.9Shared control library and widget-count versioning

Moves every repeated Elementor control pattern into the shared WGCR_Size_Controls trait, refactors all three widgets onto it with identical controls and defaults, and derives the plugin version from the number of registered widgets (10 → 0.1.0, 17 → 0.1.7) with 0.0.9 as the bridge release.

  • Shared control library: the WGCR_Size_Controls trait now carries every repeated Elementor control pattern — sections, switcher, text, number, select, heading, color, typography (font weight/size/line-height shorthand), border (type/width/color shorthand), box shadow, dimensions, slider and ready-made style box/text/state groups.
  • All three widgets (FAQ, Live Search, Comments) are refactored onto the shared trait with identical control ids, defaults and selectors; a new widget is now a short, uniform class instead of hundreds of copied control lines.
  • New versioning rule: the plugin version derives from the number of registered widgets — 0.(N div 10).(N mod 10), so 10 widgets → 0.1.0, 17 → 0.1.7, 34 → 0.3.4. Released counter versions (up to 0.0.8) are never downgraded, so 0.0.9 is the bridge release and the formula takes over at 10 widgets.
  • The static test derives the expected version from wgcr_widget_map(), keeps the map in sync with the src/widgets/ folder and requires every widget class to use the shared trait.

v0.0.8Comments widget and responsive size controls

Release date:

Adds the Comments widget and the [wgcr_comments] shortcode, makes every size control in the Style tab of all three widgets responsive with Normal and Hover tabs, and removes the theme's duplicate comment list and form when the widget is used.

  • New Comments widget (wgcr-comments): the approved comments of the current post with replies, optional pagination and avatars, plus a configurable comment form — choose the fields, labels, required state and notes, with a full Style tab.
  • New [wgcr_comments] shortcode for the same list and form outside Elementor; it accepts every widget control as an attribute and falls back to the default for invalid values.
  • Comments are sent to WordPress' own comment handler, so moderation, spam checks, flood protection and the login requirement from Settings → Discussion keep working; the widget can make name and email optional, and can only make login stricter, never looser.
  • The widget stores nothing of its own (no option, table or cookie) and loads no script; its stylesheet is enqueued only on pages that print it. Avatars come from Gravatar through WordPress and can be hidden.
  • When the widget or shortcode prints for a post, the theme's own comment list and form are no longer printed next to it (classic themes and block themes), so each post shows a single list and a single form.
  • Comments Style tab: new avatar width, avatar distance from the comment card, per-corner avatar radius, and author-name and date distance from the avatar controls.
  • Comments Style and Content: a reply now lives inside its parent comment's card, and "Reply indent and spacing" is a four-side margin relative to that card (top spacing plus indent, per device). The logged-in user text ("Logged in as …") has its own Messages controls — text with a {name} placeholder, optional profile and log-out links — and its own Style section. The avatar radius, distance and position now apply even when the theme styles #comments .comment .avatar.
  • All widgets (FAQ, Live Search, Comments): every size control in the Style tab — widths, heights, padding, margins, gaps, radius, icon and avatar sizes — is now responsive (desktop, tablet, mobile) and has Normal and Hover tabs.
  • Live Search: the shortcode and the widget now read their defaults from a single place, so they can no longer drift apart.

v0.0.7Updates from GitHub

Release date:

WidgetCore now updates itself from its GitHub releases through WordPress' own update system, with release notes in the plugin details screen.

  • Updates straight from the GitHub repository — the Update URI header plus WordPress core hooks, with no extra library: the latest release of WidgetCore/Plugin and its widgetcore.zip asset.
  • The release notes of each version are shown in the plugin's “View details” screen, and the native per-plugin auto-update toggle works for WidgetCore.
  • A “Check for updates” action link in the plugins list, with a notice reporting the result.
  • An optional WGCR_GITHUB_TOKEN constant for private repositories. If the header is removed later, updates switch back to the official WordPress plugin directory.

v0.0.6Cleaner Live Search template results

Live Search results built with an Elementor template now come entirely from your template, and Page-mode result lists grow with their results.

  • Live Search: results rendered with an Elementor template no longer receive the widget's card wrapper or styles — no nested links, no padding, hover or selection styles, and mouse hover never marks a result (keyboard navigation keeps an outline-only indicator).
  • Live Search: in Page display mode the results panel is unstyled as well, so everything comes from your template.
  • Live Search: Page-mode result lists now grow with their results (the container max-height control scrolls the panel), and infinite scroll observes the viewport.
  • Every published package carries its own version number, so browsers never reuse a cached search.css or search.js from an older build.

v0.0.5Live Search queries, pagination and columns; keyboard-friendly FAQ

Makes the Live Search Query, Pagination and Columns controls work, adds Masonry and Equal height in Page mode, improves keyboard support in the FAQ widget, and switches the plugin to a per-release version counter.

  • Versioning: the plugin now uses a per-release counter (0.0.1 → 0.0.2 … 0.0.9 → 0.1.0 … 0.9.9 → 1.0.0); earlier entries were renumbered accordingly.
  • Live Search: the results count is driven by “Items per page” in the Layout section (1–50, default 12); the old “Results count” control in General was removed. Widgets that saved the old value keep it until “Items per page” is set once.
  • Live Search: the “Columns” control now works — in Page display mode results render as a responsive CSS grid (desktop / tablet / mobile, defaults 3 / 2 / 1). List mode stays single-column and hides the control.
  • Live Search: “Custom post type” moved from the Query list into the Source select; choosing it there reveals the slug field, and the slug no longer overrides an explicitly selected source.
  • Live Search: Page-mode “Results container” style controls now live inside the “Results panel” section and appear only in Page display mode; horizontal alignment no longer overrides the margin control.
  • Live Search: the Query controls are applied — include/exclude terms from any public taxonomy, date range, order by (relevance, date, title, author, random, menu order) and order, sticky posts first, plus a Query ID for the wgcr_search_query_args/{query_id} filter. Matching REST parameters and shortcode attributes were added.
  • Live Search: the Pagination controls are applied — page numbers, previous/next, a “load more” button (text, icon, ID) and infinite scroll inside the results panel, with alignment, spacer and a custom “no more posts” message.
  • Live Search: “Masonry” and “Equal height” now work in Page display mode.
  • Live Search: template <link> stylesheets load as real stylesheets (once per page) instead of being inlined as text; the “view all” arrow, hover shift and selection bar follow the text direction, and motion is reduced for prefers-reduced-motion.
  • Live Search: template and term option lists are queried only inside the Elementor editor, not on every front-end render.
  • Live Search: the shortcode limit accepts 1–50 and a new columns attribute (page mode); the REST limit cap was raised to 50 (WGCR_SEARCH_MAX_RESULTS).
  • FAQ: closed answers leave the tab order, Arrow Up/Down, Home and End move between questions, inline editing works in the editor preview, and reduced motion is respected.
  • Shared SVG icons (wgcr_svg_icon()) replace the duplicated icon helpers of both widgets.
  • Verified against WordPress 7.1.2 with Elementor 4.3.2, and WordPress 6.7.4 with Elementor 4.0.8.

v0.0.4Live Search Elementor template results

Live Search results built from an Elementor template now keep the template's own CSS and animations, and the results-container width and alignment controls were fixed.

  • Live Search: results built from an Elementor template now carry the template's own CSS (inlined once per response), so custom templates render styled in both display modes.
  • Live Search: injected template results are initialized with Elementor's front-end handlers and elementor-invisible entrance-animation placeholders are resolved, so animated templates no longer appear empty.
  • Live Search: a template that renders without visible content falls back to the default result card instead of returning empty items.
  • Live Search: the results-container width and alignment controls were fixed — both now apply to the results box itself instead of the whole widget, with the field gap preserved in Page mode.

v0.0.3Rebuilt Live Search settings

Live Search settings were rebuilt into General, Layout, Query and Pagination sections, and Page display mode and template rendering were hardened.

  • Live Search: content settings were rebuilt into General (display mode first), Layout, Query and Pagination sections, matching Elementor's own loop widgets. Layout adds a template-type selector with custom post type support, a searchable Elementor template picker with an edit link, columns, items per page, masonry, equal height and an alternate template. Query adds include/exclude terms, date range, orderby/order, a sticky control and a query ID. Pagination adds type, alignment, a load-more button and custom messages. Style adds a results-container section (width, height and more) for Page mode.
  • Live Search: Page display mode (results container styling) was fixed and REST template rendering was hardened, so a broken Elementor template can no longer fail the whole search request.

v0.0.2Live Search Page display mode

Live Search gains a Page display mode that shows the results in a permanently visible region, also available in the shortcode.

  • Live Search: added a display_mode option (Modal / Page). In Page mode results render in a permanently visible region inside the widget container instead of the dropdown panel.
  • The [wgcr_search] shortcode accepts a mode="page" attribute.

v0.0.1Initial release: FAQ and Live Search

First public version of WidgetCore with the FAQ widget, the Live Search widget and its shortcode, bundled Persian and English translations.

  • Initial release: the FAQ widget (wgcr-faq) with FAQPage schema, and the Live Search widget (wgcr-search) with the [wgcr_search] shortcode.
  • Full internationalisation support, with Persian (fa_IR) and English (en_US) translations bundled in the plugin.
  • Built to the WordPress plugin coding standards (late escaping, no heredoc, prefixed globals).
  • Licensed under GPL-2.0-or-later.
  • Compatibility with the latest WordPress and Elementor releases is checked before every release build.