feat(plugin): Add Elementor dynamic tags and product loop widget v1.7.0

WordPress Plugin:
- Add dynamic tags for all product payload fields (name, brand, price, THC, effects, etc.)
- Add Product Loop widget with filtering, sorting, and layout options
- Register CannaIQ widget category in Elementor
- Update build script to auto-upload to MinIO CDN
- Remove legacy dutchie references
- Bump version to 1.7.0

Backend:
- Redirect /downloads/* to CDN instead of serving from local filesystem

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Kelly
2025-12-13 03:10:01 -07:00
parent 9f0d68d4c9
commit 5c08135007
8 changed files with 1941 additions and 70 deletions

View File

@@ -1,6 +1,18 @@
#!/bin/bash
# WordPress Plugin Build Script
# Builds the plugin zip with the correct naming convention: cannaiq-menus-{version}.zip
# Builds the plugin zip and uploads to MinIO CDN
#
# Usage: ./build-plugin.sh
#
# This script:
# 1. Extracts version from cannaiq-menus.php
# 2. Creates ZIP file excluding legacy/dev files
# 3. Uploads to MinIO CDN (cannaiq bucket, downloads/ folder)
# 4. Uploads as both versioned and "latest" files
#
# The plugin is then available at:
# https://cdn.cannabrands.app/cannaiq/downloads/cannaiq-menus-{version}.zip
# https://cdn.cannabrands.app/cannaiq/downloads/cannaiq-menus-latest.zip
set -e
@@ -36,7 +48,7 @@ zip -r "${OUTPUT_DIR}/${OUTPUT_FILE}" . \
-x "assets/css/crawlsy-menus.css" \
-x "assets/js/crawlsy-menus.js"
# Create/update the "latest" symlink
# Create/update the "latest" symlink (for local reference)
cd "${OUTPUT_DIR}"
rm -f cannaiq-menus-latest.zip
ln -s "${OUTPUT_FILE}" cannaiq-menus-latest.zip
@@ -45,7 +57,42 @@ echo ""
echo "Build complete!"
echo " File: ${OUTPUT_DIR}/${OUTPUT_FILE}"
echo " Size: $(ls -lh "${OUTPUT_DIR}/${OUTPUT_FILE}" | awk '{print $5}')"
# Upload to MinIO CDN
echo ""
echo "Download URLs:"
echo " Versioned: https://cannaiq.co/downloads/cannaiq-menus-${VERSION}.zip"
echo " Latest: https://cannaiq.co/downloads/cannaiq-menus-latest.zip"
echo "Uploading to MinIO CDN..."
cd "${PLUGIN_DIR}/../backend"
node -e "
const Minio = require('minio');
const path = require('path');
const client = new Minio.Client({
endPoint: 'cdn.cannabrands.app',
port: 443,
useSSL: true,
accessKey: 'FLE4dpKrOS2uQM7AFQSY',
secretKey: 'wDU6qkruxoDWftIvM0OIdJgTCleTLr5vhozPuYqF',
});
const localFile = 'public/downloads/${OUTPUT_FILE}';
const version = '${VERSION}';
(async () => {
// Upload versioned file
await client.fPutObject('cannaiq', 'downloads/cannaiq-menus-' + version + '.zip', localFile, {
'Content-Type': 'application/zip',
});
console.log(' Uploaded: cannaiq-menus-' + version + '.zip');
// Upload as latest
await client.fPutObject('cannaiq', 'downloads/cannaiq-menus-latest.zip', localFile, {
'Content-Type': 'application/zip',
});
console.log(' Uploaded: cannaiq-menus-latest.zip');
})();
"
echo ""
echo "Done! Plugin is live at:"
echo " https://cdn.cannabrands.app/cannaiq/downloads/cannaiq-menus-${VERSION}.zip"
echo " https://cdn.cannabrands.app/cannaiq/downloads/cannaiq-menus-latest.zip"