Minimal skeleton for a Lightroom Classic plugin that will eventually:
- Link a collection to a WordPress object
- Auto‑export newly added photos in linked collections
- Upload exports to WordPress and attach to the linked object
Current functionality includes:
- Verify Setup command and robust logging
- Link/Unlink the active collection to a WordPress object (string ID)
- Manage Linked Collections (edit/unlink), with uniqueness enforced across the catalog
- Windows 11
- Lightroom Classic 14.4+
- This repo checked out locally
You can load the plugin directly from this repo folder.
Option A — Add via Plug‑in Manager (recommended):
- In Lightroom Classic: File → Plug‑in Manager… → Add
- Select
site-publisher.lrplugin
- Ensure it loads without errors and is Enabled
- Library → Plug‑in Extras → Verify Setup
- Library → Plug‑in Extras → Link Current Collection…
- Select exactly one regular collection in Library
- Enter WordPress Base URL, Object Type, and Object ID (string)
- On save, the link is persisted to the catalog
- Library → Plug‑in Extras → Unlink Current Collection
- Library → Plug‑in Extras → Manage Linked Collections…
- View all linked collections
- Edit a link (opens prefilled dialog) or Unlink
- Plugin log file (custom):
site-publisher.lrplugin\logs\site-publisher.log
- Errors are handled and logged throughout the plugin (see
.cursorrules
)
site-publisher.lrplugin/Info.lua
: plugin metadata and menu wiringsite-publisher.lrplugin/Init.lua
: initialization and logger setupsite-publisher.lrplugin/Log.lua
: shared logging helpersite-publisher.lrplugin/LinkedCollectionsCore.lua
: pure logic (JSON helpers, uniqueness)site-publisher.lrplugin/LinkedCollections.lua
: catalog storage and helperssite-publisher.lrplugin/commands/LinkCollection.lua
: link UI/flowsite-publisher.lrplugin/commands/UnlinkCollection.lua
: unlink flowsite-publisher.lrplugin/commands/ManageLinkedCollections.lua
: manage UI/flowsite-publisher.lrplugin/VerifySetup.lua
: simple verification command.resources/
: Lightroom SDK, API Reference, and manuals
- Step 4: Authentication and WordPress HTTP (use
LrPasswords
for secure storage) - Auto‑export newly added photos in linked collections to a temp folder
- Upload to WordPress and attach to the linked object