-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Here is the documentation page about how to upgrade a plugin to the new common setup including the framework.
It's comprehensive but not complete yet.
Here's a Markdown checklist for the upgrade steps. This can be copied for each plugin, for example in a GitHub issue or pull request description.
- [ ] Create GitHub repository
- [ ] Basic setup: Copy common files from example plugin
- [ ] Local development site
- [ ] Unit tests with PHPUnit
- [ ] End-to-end tests with Playwright
- [ ] Upgrade Framework
- [ ] Upgrade Build Pipeline
- [ ] Upgrade Assets Bundler
- [ ] Code formatter using Roller (CSS, Sass, JavaScript, TypeScript) and PHP Beautify
Previously..
This document tracks the progress of upgrading to the new modules in the Framework and Template System, from the deprecated Interface module and Plugin Framework v2.
See documentation pages for:
This is relevant for Loops & Logic, Tangible Blocks, and all plugins as they transition to using the new framework.
Rationale
Here are some reasons why the Plugin Framework and Interface modules were deprecated.
- A lot of unused code, such as legacy plugin updater and licenser based on EDD server
- Monolithic build setup that builds all internal modules at once
- Written in old code design pattern (See framework/object)
The new modules are individual packages that can be documented, tested, built and published on their own.
How to upgrade
Open pull request for each plugin and perform the upgrade.
Replace Interface module
- Replace methods under
tangible_interface()with namespaced functions
Replace Plugin Framework
- Update
composer.json
Use the new Template System, or the Framework module by itself - Replace methods under
tangible()ortangible_plugin_framework()with namespaced functions undertangible\framework
Interface module
Here are the features that were in the Interface module. These are now consolidated with other Template System modules.
- Chart →
modules/chart - Date picker →
modules/date-picker - Embed →
modules/embed - Glider →
modules/glider - Prism →
modules/prism - Select →
modules/select - Slider →
modules/slider - Sortable →
modules/sortable - Table →
modules/table
Plugin framework
Here are the features that were in the old plugin framework. They're being moved and rewritten into new modules.
- AJAX →
framework/ajax - Date module →
framework/date - HJSON module →
framework/hjson - HTML →
framework/html - Preact →
framework/preact - Utilities
- Format →
framework/format - Log →
framework/log
- Format →
Server-side utilities
- Async Action
- Background Queue
- File System
Plugin features
- Plugin updater → Plugin Updater module
- Settings page with tabs
- Support page
- Plugin dependency check
- Licensing - Was using EDD license server
Post type extensions
- Sortable post type →
admin/post-types/sortable-post-type - Duplicate posts →
admin/post-types/duplicate-post