=== GHL-WP Membership ===
Requires PHP: 8.3
Stable tag: 0.6.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

GHL membership plans, protected content/downloads and unified administration. Development preview.

== Author ==
Arifur Rahman
HighLevel | HubSpot | KEAP CRM Expert
Email: arif@earif.com
Website: https://earif.com
LinkedIn: https://www.linkedin.com/in/earif/
Upwork: https://www.upwork.com/freelancers/arifur

== Usage ==
All tools are under GHL-WP Membership: Dashboard, Membership Plans, Members, Content Rules, Downloads, Sync Queue, Reports, Audit Log, Settings and Help.
Configure the connection in Settings. Keep GHLM_CONTACTS_TOKEN server-only and GHLM_PRIVATE_DIR outside every public root/alias. Publish plans with tag, duration and optional suspension-tag mappings. Select any/all required plans in the content editor, optional drip days and UTC release date. Assign a required plan to private downloads.
Add [ghlm_account] for membership status and core login/logout/recovery links. Use [ghlm_restrict plans="123" mode="any" delay_days="0"]protected content[/ghlm_restrict] for partial content.

== Security and scope ==
Development preview. Multiple plans and local members are supported; multi-contact CRM scope and hourly known-contact reconciliation are opt-in. Existing email collisions fail closed. New accounts are Subscribers. Never treat a tag as proof of payment.
Access checks are local. Manual and CRM sources are independent. Expiry is enforced on access; duplicate notifications do not renew terms. Re-add after revocation restarts the term/drip clock. Account suspension blocks all member access. Editors/admins retain explicit preview privileges.
Private file bytes stay outside public directories. GET/HEAD/range requests verify membership. Prior downloaded bytes and authorized in-flight streams cannot be recalled. Migrate old uploads explicitly; purge cached copies. Public uploads and child pages are not automatically protected.
Exclude protected URLs from full-page/CDN caches. Core content/REST/query/comment/feed/embed paths are covered; third-party APIs and indexes need their own integration tests. Classic menu filtering is supported; Navigation blocks are not automatically filtered.
Retries use a durable queue, up to eight attempts with exponential delays. Optional reconciliation rereads already-known contacts older than an hour, up to 20 queued per tick and three processed per worker tick; it does not discover never-synced contacts. Configure system cron for predictable timing.
Unconverted legacy grants remain supported. Any CRM plan record transitions that user away from blanket legacy access, including after expiry/revocation. Review conversion before rollout. Identity settings cannot change after linked grants exist without migration.
Audit retention is 90 days with bounded cleanup. Audit write failures show a diagnostic; membership and audit writes are not an atomic transaction. Large-catalog performance is not benchmarked. Payment lifecycle, OAuth distribution, native Marketplace actions and LMS adapters remain planned.

== Changelog ==
= 0.6.0 =
Unified admin; multiple plans/members; independent grants; expiry; drip; any/all content rules; plan-aware files; member portal; conditional content/menus; audit/reports; configuration and known-contact reconciliation.
= 0.5.0 =
Renamed GHL-WP Membership. Added private uploads outside web root, authenticated streaming/range downloads, existing-media migration and public plugin website.
= 0.4.0 =
Durable automatic retries; page-editor membership protection; administrator sync status; author details.
= 0.3.0 =
Automatic Subscriber creation and current-tag grant/revoke/restore reconciliation.
