=== WP DACdb Connect LITE ===
Contributors: garryheath
Requires at least: 5.5
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.4.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Free, no-authentication Rotary calendar, club leadership and member list shortcodes powered by the DACdb / iMembersDB API.

== Description ==

WP DACdb Connect LITE is a free, no-authentication Rotary calendar, club
leadership and member list display powered by the DACdb / iMembersDB API. Enter your Account
(District) number, Club number, and default event category IDs in
Settings -> DACdb Connect LITE, then drop the shortcode anywhere on your site.

No DACdb login, subscription key, or API credential is required - just a
valid public AccountID / ClubID, the same way the DACdb-hosted calendar
widgets work.

= Shortcodes =

`[rotary_connect show="calendar"]`
`[rotary_connect show="calendar" view="list" limit="5"]`
`[rotary_connect show="calendar" view="page" catid="3,5,4"]`
`[rotary_connect show="calendar" account="5110" club="0"]`
`[rotary_connect show="calendar" club="28663"]`
`[rotary_connect show="calendar" subscribe="above"]`

The `account` / `club` shortcode attributes override the Account # and Club #
set on the settings screen, so one site can display a district calendar in
one place and a specific club's calendar in another. The `subscribe`
attribute (or the "Subscribe Links Position" setting) controls whether the
Google/Apple/.ics links appear above the calendar, below it, or not at all.
Page view (the full month grid) automatically falls back to the compact list
view for visitors on mobile phones.

= Club leadership shortcodes =

`[rotary_connect show="clubleaders"]`
`[rotary_connect show="clubleaders" rolekeys="P,PE,S,T"]`
`[rotary_connect show="clubleaders" account="5320" club="852" cols="3"]`
`[rotary_connect show="clubleaders" club="0" rolekeys="P"]`

Shows club officers as photo cards. `rolekeys` chooses which roles appear
(P = President, PE = President-Elect, S = Secretary, T = Treasurer; default
P,S). Using `club="0"` lists every club in the district, grouped under each
club's name. Other attributes: `cols` (1-4 cards per row), `pics` (1/0),
`contact` (1/0 - adds a Contact link), and `group` (1/0 - club-name headings).

= Member list shortcodes =

`[rotary_connect show="members"]`
`[rotary_connect show="members" cols="3" perpage="12"]`
`[rotary_connect show="members" account="5320" club="852" position="1" contact="1"]`
`[rotary_connect show="members" business="0" perpage="0"]`

Lists every member of one club as photo cards with page numbers. A specific
Club # is required. Attributes: `cols` (1-4), `perpage` (0 = everyone on one
page), `membertypes` (member type IDs), and 1/0 toggles `pics`, `position`,
`business`, `class`, `since` and `contact`. Defaults come from the "Member
List Settings" section of the settings screen.

This is a stripped-down companion to the full WP Connect plugin, which adds
speakers, newsletters, maps, district leadership, and more. See
https://garryheath.com/wp-connect/ for details.

== Changelog ==

= 1.4.1 =
* Fixed oversized images (and other wide embeds/tables) in event popups: content in the popup is now constrained to the popup's width and images scale proportionally.

= 1.4.0 =
* New: member list - `[rotary_connect show="members"]` - with a "Member List Settings" section (cards per row, members per page, member type IDs, which fields to show, cache duration) and per-shortcode overrides (`account`, `club`, `cols`, `perpage`, `membertypes`, `pics`, `position`, `business`, `class`, `since`, `contact`).
* Pagination is a small built-in script with no extra libraries; visitors without JavaScript see the full list.

= 1.3.0 =
* New: club leadership display - `[rotary_connect show="clubleaders"]` - with a "Club Leadership Settings" section on the settings screen (roles to show, cards per row, photos, contact link, cache duration) and per-shortcode overrides (`account`, `club`, `rolekeys`, `cols`, `pics`, `contact`, `group`).
* `club="0"` lists every club in the account/district, each under its own club-name heading.
* Handles multi-role officers (for example "President / Club Director / iPast President") by splitting the line-break-separated positions into separate lines.

= 1.2.1 =
* Code quality/compliance pass (Plugin Check): escape output values inline at the point of echo in the settings screen; sanitize the `cat` query parameter with `sanitize_text_field()` ahead of the custom category-ID sanitizer; documented the public, nonce-free nature of the read-only calendar JSON/iCal AJAX endpoints; documented the direct-query cache-flush routine; dropped the manual `load_plugin_textdomain()` call (WordPress 4.6+ loads translations automatically); bumped "Tested up to" and added GPLv2 license info to readme.txt.

= 1.2.0 =
* Fixed a bug where DACdb's double-encoded text fields (e.g. speaker/topic containing entities like &#xa0;) could show as raw, corrupted text in the event popup. Popup content is now built and sanitized entirely server-side.
* List view was restyled to match the full WP Connect plugin: boxed date cards, click-to-expand event titles/descriptions, and a proper detail popup - it no longer looks unstyled compared to Pro.
* Added a "Subscribe Links Position" setting and matching `subscribe="above|below|none"` shortcode attribute.
* Replaced the placeholder subscribe-button icons with the actual Google/Apple/.ics icons from the full WP Connect plugin.

= 1.1.0 =
* Added a "Load Available Categories" picker on the settings screen - fetches category names/IDs live from DACdb so you don't have to guess Category IDs.
* Shortcode now accepts `account` / `accountid` and `club` / `clubid` attributes, letting one site show a district calendar and a club calendar side by side.
* Page view (month grid) now automatically switches to list view for mobile visitors.

= 1.0.0 =
* Initial release: calendar shortcode (list + page views), iCal/Google/Apple subscription links, event data caching, and a dedicated settings screen.

== Upgrade Notice ==

= 1.0.0 =
Initial release.
