considbrs-webdev / modularity-latest-events
Modularity Latest Events Module
Package info
github.com/Considbrs-Webdev/modularity-latest-events
Type:wordpress-plugin
pkg:composer/considbrs-webdev/modularity-latest-events
Requires
None
Requires (Dev)
- phpunit/phpunit: ^11.5
Suggests
- helsingborg-stad/municipio: ^6.0.0
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-10-22 13:32:27 UTC
README
WordPress plugin that registers a Modularity module for the latest Visit Piteå events. The public page loads the list through an admin-ajax proxy. The block editor shows a short preview.
Requirements
- PHP and Composer
- Node.js and npm
- A WordPress site with Municipio, Modularity, ACF, and AcfExportManager.
composer.jsonsuggestshelsingborg-stad/municipio^6.
This working copy lives in the pitea-se site at https://pitea-se.ddev.site.
Getting Started
- Clone this repository into
wp-content/plugins/ - Run
composer installto generate the PHP autoloader (there are no Composer packages) - Run
npm installto install Node dependencies - Copy
.env.exampleto.envand setVISITPITEA_API_TOKEN, or set the WordPress optionsmodularity_latest_events_api_urlandmodularity_latest_events_api_token - Run
npm run buildto build assets - Activate Modularity Latest Events in WordPress
Development
npm run dev— Vite dev servernpm run watch— rebuild on changenpm run build— production build intoassets/dist/(gitignored)npm run build:dev— development Vite buildcomposer test— PHPUnit. The suite stubs WordPress and does not read.env.
npm run lint and npm run format are not usable yet: they call npx biome without a Biome config or the @biomejs/biome dependency.
Release
Integration branch is dev. Release branch is main. The version is 1.0.0 in the plugin header and package.json. Tags use a v prefix, so the first tag is v1.0.0. GitVersion.yml calculates the next number from Conventional Commits on main. See AGENTS.md before cutting a release.
php build.php dumps the autoloader, runs npm ci, and builds assets. Do not pass --cleanup in a working tree.
Structure
├── modularity-latest-events.php # Plugin bootstrap
├── source/
│ ├── php/
│ │ ├── App.php # Hooks and editor stylesheet
│ │ ├── Api/EventProxy.php # Visit Piteå API proxy
│ │ ├── AcfFields/ # ACF field export
│ │ ├── Helper/CacheBust.php # Vite manifest lookup
│ │ └── Module/ # LatestEvents module, icon, Blade views
│ ├── js/simpleview-events.ts # Public event list
│ └── sass/ # Module SCSS
├── tests/ # PHPUnit suite
├── languages/ # Translations (text domain modularity-latest-events)
├── assets/dist/ # Compiled assets (generated, not committed)
└── build.php # Deploy build
AI assistants
Instructions for AI tools are in AGENTS.md.
License
MIT