This week contributors on the TGM Plugin Activation (TGMPA) library published a roadmap for the future of the project. TGMPA is widely used by WordPress developers to require and recommend plugins for themes (and other plugins). The library is recommended by Themeforest, CodeCanyon, and the WordPress.org Theme Review Team as an alternative to bundling everything in one theme/plugin.
Gary Jones is leading the upcoming 2.5 release, expected in May, with help from fellow lead developer Juliette Reinders Folmer, to whom he credits most of the recent activity on the project. This release will add support for installing from a GitHub repo source, separate menu items out from under the Appearance menu, add Travis CI support, improve accessibility, and fix a number of bugs.
The Future of the TGM Plugin Activation Library
The project’s contributors are also planning ahead for this summer’s 3.0 release, which Folmer will lead. This release will be a major turning point for TGMPA and will essentially constitute a complete rewrite.
The roadmap for 3.0 includes several ambitious items that will likely affect the way developers integrate TGMPA into their projects:
- Multisite compatibility
- Fix conflicting UI messages for usage in themes / plugins
- Improved UI by having the admin page always in the same location
- Updatability of TGMPA independently of the plugin/theme which ships it
- Show dependencies more clearly
This plan includes an architectural change that would allow for the integration of the Plugin Dependencies (PD) plugin to provide UI for dependency management and cascading deactivation if dependencies are not met.
According to Jones, the eventual goal is to turn TGMPA into a plugin that can be added to the WordPress.org repository for easier updating:
Some of the logic in the rewrite will be handled by the Plugin Dependencies plugin, and TGMPA itself will be turned into a plugin and added to the WPORG repo so that it can be updated automatically. The TGMPA library will then consist of a bootstrap file, the TGMPA plugin (as a zip) and the PD plugin (as a zip). The bootstrap file will then check if the TGMPA + PD plugins are installed, and if not, install them from the embedded zips.
TGMPA contributors are currently in discussion with representatives from WordPress.org about the possibility of allowing their planned plugin in the official directory. As the plugin has not yet been produced and submitted, it’s still too early to know the outcome of the decision.
“If we can’t go onto the WordPress.org repo, then we’ll be looking at simply hosting the plugin version on GitHub, and use some (if needed) of the GitHub Updater plugin (or similar) code within the bootstrap file to pull the latest tag from GitHub instead,” Jones said.
One of the main focuses for version 3.0 is to allow different plugins and themes to use TGMPA without the concern of compatibilities resulting from plugin A including 2.4.1, for example, and plugin B including 2.5.0.
“The v3 setup should also be able to handle instances of v2 gracefully, and the v2 branch may have a 2.6 release to make the logic for that easier,” Jones said.
After version 3.0 is released, the project will contain multiple repositories – one for the standard plugin, and one that uses Grunt to pull in files from the plugin repository and zips them up next to the bootstrap file. In anticipation of these changes, contributors have moved the current repository into a new GitHub organization at: https://github.com/TGMPA.
As TGMPA does not currently track its usage, it’s difficult to nail down exact numbers for how many theme/plugin developers these changes will impact.
“I have no idea what sort of numbers of products this entails,” Jones said. “But there is a non-trivial amount of usage that requires us to step up the game in order to provide the exceptional functionality other developers can rely on.”
TGMPA is a critical tool that many developers in the WordPress ecosystem depend on for managing plugin requirements and recommendations. As theme development continues to move in the direction of separating theme and plugin functionality, TGMPA will play an important role in serving developers who want to structure their projects according to WordPress best practices.
Getting the new TGMPA plugin included in the WordPress.org plugin directory would be a big win for the project, as it would allow users to update more easily in the future. You can follow TGMPA on Twitter for all the latest news as the team moves into development for version 3.0.
Source: WP Tavern