considbrs-webdev / modularity-simpleview-events
Modularity Simpleview Events Module
Package info
github.com/Considbrs-Webdev/modularity-simpleview-events
Type:wordpress-plugin
pkg:composer/considbrs-webdev/modularity-simpleview-events
Requires
- php: >=8.3
Requires (Dev)
None
Suggests
- helsingborg-stad/municipio: ^6.0.0
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-11-04 14:58:57 UTC
README
A WordPress plugin for integrating events from the Simpleview API into WordPress.
Features
- Dynamically create post types and taxonomies from the Simpleview API
- Automatic synchronization via WP Cron
- Manual sync trigger from admin settings
- Configurable API credentials and sync frequency
Requirements
- PHP 8.3 or later
- WordPress with the Municipio theme and the Modularity plugin
- Advanced Custom Fields
- Composer and Node.js/npm for building
Installation
- Place the plugin in
wp-content/plugins/modularity-simpleview-events/ - Run
composer install(orcomposer dump-autoloadto only regenerate the autoloader) - Run
npm ci && npm run buildto build assets (orphp build.phpto do all build steps) - Activate the plugin through the WordPress admin
Configuration
- Navigate to Simpleview Events > Settings
- Configure your API credentials:
- API Base URL
- API Key
- Set your preferred sync frequency (hourly, twice daily, or daily)
- Use the "Sync Now" button to perform an initial manual sync
CLI Commands
The plugin provides WP-CLI commands for managing Simpleview events data:
Sync Events
Sync events from the Simpleview API:
wp simpleview-events sync
Options:
--wipe- Wipe all existing data before syncing (requires confirmation)
Examples:
# Run sync wp simpleview-events sync # Wipe all existing data and sync fresh wp simpleview-events sync --wipe
Wipe Data
Delete all synced Simpleview events data (posts, terms, and options):
wp simpleview-events wipe
Options:
--confirm- Skip confirmation prompt (use with caution)
Examples:
# Wipe all data (with confirmation prompt) wp simpleview-events wipe # Wipe all data (skip confirmation) wp simpleview-events wipe --confirm
Show Statistics
Display sync statistics including total events, post types, and last sync time:
wp simpleview-events stats
This command shows:
- Total events count
- Draft events count
- Number of post types
- Last sync timestamp
- Post type breakdown with media channel information
Development
Source layout:
source/php/- PHP source files (PSR-4, namespaceModularitySimpleviewEvents\)source/php/AcfFields/- ACF fields (auto-exported/imported)source/php/Admin/- Admin functionalitysource/php/Api/- API client for Simpleviewsource/php/Cache/- Cache purging for event modulessource/php/Cli/- WP-CLI commandssource/php/Cron/- WP Cron schedulingsource/php/Module/- Upcoming events modulesource/php/PostType/,source/php/Taxonomy/- Dynamic post type and taxonomy registrationsource/php/Query/- Archive and upcoming events queriessource/php/Sync/- Synchronization and archiving logicsource/js,source/sass- Frontend assets built with Vite
Build commands: npm run build, npm run build:dev, npm run watch.
See HOW_IT_WORKS.md for the architecture and sync flow.
Tests
There is no automated test setup yet.
Roadmap
- Automated tests (PHPUnit)
- Linting/formatting (PHP_CodeSniffer, PSR-12)
Release
Development happens on dev. When done, dev is merged into main and a release is tagged from main. The version is set in the plugin header in modularity-simpleview-events.php.
Working with AI
See AGENTS.md for instructions to AI tools working in this repository.
License
MIT