/** * Registers older plugins that did not use this class * * @TODO Consider removing this in 5.0 */ private function add_legacy_plugins() { // Version 4.2 and under of the plugins do not register themselves here, so we'll register them $tribe_plugins = new Tribe__Plugins(); foreach ($tribe_plugins->get_list() as $plugin) { if (!class_exists($plugin['class'])) { continue; } $ver_const = $plugin['class'] . '::VERSION'; $version = defined($ver_const) ? constant($ver_const) : null; $this->add_active_plugin($plugin['class'], $version); } }
/** * Registers older plugins that did not implement this class * * @TODO Consider removing this in 5.0 */ public function add_legacy_plugins() { $tribe_plugins = new Tribe__Plugins(); foreach ($tribe_plugins->get_list() as $plugin) { // Only add plugin if it's present and not already added if (!class_exists($plugin['class']) || array_key_exists($plugin['class'], $this->active_plugins)) { continue; } $ver_const = $plugin['class'] . '::VERSION'; $version = defined($ver_const) ? constant($ver_const) : null; $this->add_active_plugin($plugin['class'], $version); } }