zaus / forms-3rdparty-integration

Wordpress Plugin - Forms 3rdparty Integration - a plugin to help integrate 3rdparty services with common WP Forms plugins like Contact Form 7 and Gravity Forms
http://wordpress.org/plugins/forms-3rdparty-integration/
47 stars 14 forks source link

Form plugins (addons) should attach themselves to singleton #28

Open zaus opened 9 years ago

zaus commented 9 years ago

As mentioned in suggestion here, the form plugin instances should

Probably as part of a base constructor in fplugin_base.php like:

function __construct() { Forms3rdpartyIntegration::$instance->attach_plugin($this); }

and back in the main plugin

private $_addons = array();
function attach_plugin($addon) {  $this->_addons[ $addon->FPLUGIN() ] = $addon; }

This would let you leverage (future) addon-agnostic functionality like field pickers in the admin ui, a la #22 .