considbrs-webdev / eslov-customisation
DB migration CLI and runtime shims for Eslöv Municipio deployment
Package info
github.com/Considbrs-Webdev/eslov-customisation
Type:wordpress-plugin
pkg:composer/considbrs-webdev/eslov-customisation
Requires
- php: >=8.0
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
- dev-main
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
- dev-event-sync/force-pending
- dev-fix/font-src-current-host
- dev-fix/municipio-cli-upgrade-before-tokens
- dev-fix/legacy-color-primary-alias
- dev-fix/header-text-color-tokens
- dev-feat/mod-timeline-LTS-appearance
- dev-fix/section-text-autop
- dev-fix/section-module-spacing
- dev-feat/section-palettes
- dev-feat/singular-taxonomy-tags
- dev-language
- dev-feat/split-section-wysiwyg
- dev-fix/section-module-wysiwyg
- dev-fix/nested-shortcode-wpautop
- dev-migrate/native-font-library
- dev-btn-color-mig-test
- dev-feat/manual-input-data-repair
- dev-port/hide-title
- dev-feat/back-to-section-start
This package is auto-updated.
Last update: 2026-09-30 11:23:59 UTC
README
Site-specific WordPress plugin for the Eslöv municipio-deployment migration. All Eslöv-specific DB transforms and runtime shims live here — not in the theme or LTS plugin ports.
Fix types
| Type | Purpose | Lifecycle |
|---|---|---|
| One-time migration | Rewrite DB: meta keys, module JSON, options | wp eslov migrate … — idempotent, --dry-run |
| Runtime shim | Bridge unmigrated rows or permanent site preference | Hook/filter in Customisations/ |
Log every fix in .cursor/plans/db-migration.md.
Installation
cd wp-content/plugins/eslov-customisation
composer install
ddev wp plugin activate eslov-customisation
WP-CLI
ddev wp eslov migrate status ddev wp eslov migrate all --dry-run ddev wp eslov migrate all
Individual commands (also run by migrate all when status is ready):
ddev wp eslov migrate meta-keys --dry-run ddev wp eslov migrate modules --post-id=123 ddev wp eslov migrate options ddev wp eslov migrate fonts --dry-run ddev wp eslov migrate fonts --network ddev wp eslov migrate design-tokens --export --network ddev wp eslov migrate section-spacing --dry-run --network ddev wp eslov migrate section-text-autop --dry-run --network
Adding a migration
- Add transform logic in
source/php/Migration/(pure PHP, no WP-CLI coupling). - Add
source/php/Cli/Migrate/YourCommand.phpextendingAbstractMigrateCommand. - Register in
CliBootstrap::register(). - Add an entry to
Migration/MigrationRegistry.php(setrun_orderwhen status isready).
Adding a runtime shim
- Create a class in
source/php/Customisations/. - Register hooks in
__construct(). - Add the class to
App::registerInstances().
SMTP
Customisations\Smtp routes outgoing mail through SMTP (via phpmailer_init). It is a no-op
until all six constants below are defined.
Add a config/smtp.php (there's no built-in one), following the pattern of
config-example/sentry-example.php
in municipio-deployment:
<?php // config/smtp.php define('SMTP_HOST', '(#smtp_host#)'); define('SMTP_PORT', '(#smtp_port#)'); define('SMTP_USERNAME', '(#smtp_username#)'); define('SMTP_PASSWORD', '(#smtp_password#)'); define('SMTP_FROM', '(#smtp_from#)'); define('SMTP_FROM_NAME', '(#smtp_from_name#)');
...and register it in wp-config.php's $configFiles list, alongside sentry.php etc. The
(#token#) placeholders are filled in per environment by the deploy pipeline, same as
DB_PASSWORD and the other secrets in config-example/.
This replaces the old web/app/mu-plugins/smtp.php mu-plugin — no mu-plugin changes are needed.
Plugin layout (Piteå-style)
source/
sass/ # Site-wide CSS overrides (enqueued globally)
site-overrides.scss
components/ # Per-component override partials
js/ # Site-wide JS (enqueued globally)
site.js # Vite entry
components/ # Per-feature modules imported by site.js
php/
AcfFields/ # ACF field groups (e.g. ModNavigationFields)
Cli/ # WP-CLI migration commands
Customisations/ # Runtime hooks and core module tweaks
Migration/ # Pure transform logic for CLI
Modules/ # Custom Modularity modules
Navigation/ # mod-navigation (LTS fork)
Navigation.php
sass/ # Module SCSS source
assets/dist/ # Module built CSS + manifest.json
views/ # mod-navigation.blade.php + navigation/*
views/
partials/ # Theme blade overrides (taglist, child buttons)
assets/dist/ # Site CSS + JS build output + manifest.json (gitignored)
Custom Modularity modules register in eslov-customisation.php (init priority 5), same pattern as Piteå AccButtons.
Blade view overrides
- Theme:
views/partials/— registered onMunicipio/viewPathsviaCustomisations\Templates. - Modules:
source/php/Modules/{Name}/views/— registered on/Modularity/externalViewPath. - Components:
views/components/— registered onComponentLibrary/ViewPathsviaCustomisations\TimelineActiveStep(dated@timelineuses sequential layout + cardmetafor dates).
Assets (Vite)
Site CSS/JS and module styles use separate Vite builds and manifests.
Built files land in assets/dist/ (gitignored) — run npm run build locally or via build.php.
cd wp-content/plugins/eslov-customisation
npm install
npm run build
| Build | Config | Output | Enqueued by |
|---|---|---|---|
| Site CSS + JS | vite.config.mjs |
assets/dist/ |
SiteStyles + SiteScripts (global) |
| mod-navigation | vite.navigation.config.mjs |
Modules/Navigation/assets/dist/ |
Navigation::style() (on-page only) |
- Site CSS:
source/sass/site-overrides.scss→ importscomponents/* - Site JS:
source/js/site.js→ importscomponents/*(depends onjs-styleguidejs) - Module SCSS: beside the module (
Modules/Navigation/sass/mod-navigation.scss), scoped under.modularity-mod-navigation
License
MIT
Imported-event review is disabled
Events are reviewed at the source site. The registrations for
SubsiteImportReview, SubsiteImportReviewList and SubsiteImportReviewChanges
are commented out in source/php/App.php. External Content follows its normal
publication behavior, with no additional review buttons or change-review metabox.
The handler code remains available for future reuse. There is no site option to switch these handlers on or off; restoring them requires a code change. This applies wherever this plugin runs. Existing pending posts are not automatically published, and checksum-based synchronization may skip unchanged source events.