Fork of WordPress plugin Forminator by WPMU DEV
This repos has been created in order to create a modification on the codebase of the original plugin. The modification is to allow to filter the notifications message body when forms are submitted.
Therefore make sure to keep this repo up to date with the original plugin but to ensure the modified code is not overriden.
$custom_form->notificationsusage inlibrary/modules/custom-forms/front/front-mail.php:168see #075b18a0747850f942568da2328a6eb3f0826bc0- Add
$original_message paraminforminator_email_messagefilter inlibrary/abstracts/abstract-class-mail.php:394see 94d193c79a5ffa9874a44269546b5e83b6b94d73 - Add
composer.json - Disable WordPress plugin updates in
forminator.php- addsdisable_plugin_update()anddisable_auto_update()methods to prevent plugin from being updated via WordPress admin, see c30f6bad9dd31a9cba67e3a3074d03890c411b77 - Replace Gutenberg blocks (forms, polls, quizzes) from Block API v1 to v3 — adds
addons/pro/gutenberg/js/blocks-v3.jsandaddons/pro/gutenberg/class-forminator-gfblock-v3.php, loaded fromgutenberg.php. Dequeues the original minified v1 scripts, transfers their localized data, and registers v3 replacements withuseBlockProps()for iframe editor compatibility (required from WordPress 7.0+)
This fork includes an automation pipeline that imports the latest WordPress.org SVN tag for Forminator and then re-applies this fork's minimal patch files.
- Patch files:
patches/*.patch - Sync script:
tools/sync-wporg-svn.sh - CI workflow:
.github/workflows/sync-upstream-forminator.yml
GitHub Actions runs the sync workflow:
- Automatically weekly (Monday 03:00 UTC)
- Manually on demand (Actions tab → "Sync upstream Forminator (WP.org SVN)" → Run workflow)
If upstream changed, CI will open a PR.
- If all patches apply (or are already present upstream), the PR is a normal PR.
- If one or more patches cannot be applied, CI will still open a draft/WIP PR clearly indicating that the patches were not applied and must be fixed manually before merging.
Requirements: git, svn, rsync
Run:
bash tools/sync-wporg-svn.sh(auto-detects latest upstream tag)FORMINATOR_SVN_TAG=1.49.1 bash tools/sync-wporg-svn.sh(pin a specific tag)
Upstream can occasionally refactor the relevant code and one or more patches may fail. When that happens:
- Update the affected code manually to restore the fork behavior described above.
- Update
patches/*.patchto match the new upstream context rungit format-patch -2 HEAD -o patcheswhere-2is the number of commits to generate a patch file from. - Re-run the sync to confirm the workflow verification passes.