* @license GNU General Public License, version 2 * @link http://addthis.com AddThis website */ class AddThisMinimumPlugin extends AddThisPlugin { protected $version = '1.1.0'; protected $name = 'Website Tools by AddThis'; protected $productPrefix = 'wpwt'; protected $pluginSlug = 'addthis-all'; protected $settingsLinkObject = 'globalOptionsObject'; /** * This must be public as it's called from bootstrap.php * * This bootstraps this plugin into WordPress, including adding our * JavaScript and CSS onto relevant pages and calling the bootstrap * function for every enabled feature * * This calls the parent, then registers the content and excerpt filters * of disabled features (if they're enabled, then that parent function * would have taken care of this already). * * @return null */ public function bootstrap() { parent::bootstrap(); foreach ($this->features as $feature => $info) { $objectVariable = $feature . 'Object'; $enabledVariable = $feature . 'Status'; $enabledByPlugin = $this->$enabledVariable; if (!$enabledByPlugin) { $this->$objectVariable->registerContentFilters(); $this->$objectVariable->registerExcerptFilters(); $this->$objectVariable->addShortCodes(); add_action('widgets_init', array($this->$objectVariable, 'registerWidgets')); } } } } }