Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Managing Dependencies the WordPress Way

Managing Dependencies the WordPress Way

Presented on June 13 2017 at the WordPress Enschede meetup, Enschede, The Netherlands.
https://www.meetup.com/WordPress-Meetup-Enschede/
---------------------------------------------------------------
Say you've build a beautiful theme specifically for WooCommerce, how do you ensure the user has the WooCommerce plugin activated ?Or you've build an add-on plugin for Gravity Forms which needs Gravity Forms to work.

In this talk we’ll explore what tooling is available to make plugin dependency management in ‎WordPress easier, how to use it and what could potentially be ahead in the future.‎

Related links:
http://tgmpluginactivation.com/
https://github.com/jrfnl/TGM-Plugin-Activation
https://wordpress.org/plugins/plugin-dependencies/
https://github.com/jrfnl/wp-plugin-dependencies

More Decks by Juliette Reinders Folmer

Other Decks in Programming

Transcript

  1. Plugin Dependencies Reality Theme / Plugin Requires: - parent theme

    - library / framework - plugin A Supports: - plugin B - plugin C BBPress theme Requires: - Non-bbpress parent theme - BBPress Supports: - BBPress Info Widgets - BBPress Members Only - BBPress Quotes BBPress add-on plugin Requires: - BBPress - CMB2
  2. Unmanaged • White screen of death Verified • Admin notice

    • Self-deactivate Managed • Auto-install • Guided install
  3. IT DOESN'T WORK!!!! Maybe I should read the readme.txt file...

    Now where can I find that other plugin ? Download Unzip Upload Activate YES! Got it working! Now, how do I get that hour of my life back ? Ryan McGuire
  4. Developer's perspective  Frameworks not allowed in repo  Tags

    will be limited  Version conflicts  Update responsibility
  5. Summing up: User interface & Update mechanism • Improves security

    • Prevents conflicts Relaxed users & Happier developers Unsplash
  6. Composer  Industry Standard  Not in line with WP

    philosophy  WP end-users skills  PHP 5.2  Hosting issues ?
  7. Plugin Dependencies  Pro-active  User-interface  Multisite compatible 

    Simplicity  Cascading de-activate  PD plugin needs to be installed and active  Limited config  User guidance  No support for themes
  8. TGM Plugin Activation  Supports install & update  Configurability

     User friendly action overview  Reactive  Needs PHP config function  Multisite  Out of date versions, conflicts
  9. Basic Usage Depends: plugin-slug - Only required plugins Advanced Usage

    Json file - Required and Recommended/Supports - Minimum version - Better is active detection - Alternative download source - Update URL
  10. Road Map TGMPA v3 (alpha) Testing, testing, testing... Convert current

    userbase Feature project Core merge proposal 01 02 03 04 05