/** * get Plugins listing, filter by $type: engine, adapter, processor * */ function getAddons($type = '', $show_desc = false) { global $wpdb; require_once PIPES_PATH . DS . 'helpers' . DS . 'plugins.php'; $addons = PIPES_Helper_Plugins::getPlugins(true, $type); // Get Addon Description $ILove = array(); foreach ($addons as $addon) { $You = new stdClass(); $You->value = $addon['element']; /*if ( isset( $addon['description'] ) && $show_desc ) { $You->text = $addon['name'] . ' (' . $addon['description'] . ')'; } else { $You->text = $addon['name']; }*/ $You->text = $addon['name']; $ILove[] = $You; } if (isset($_GET['x'])) { echo "\n\n<br /><i><b>File:</b>" . __FILE__ . ' <b>Line:</b>' . __LINE__ . "</i><br />\n\n"; echo '<pre>'; print_r($ILove); echo '</pre>'; } // $ILove = $addons; return $ILove; }
public function check_exist_plugin($key, $type) { require_once dirname(dirname(__FILE__)) . DS . 'helpers' . DS . 'plugins.php'; $plugins = PIPES_Helper_Plugins::getPlugins(true, $type); if (array_key_exists($key, $plugins)) { return true; } else { return false; } }
public function getPlugins() { require_once dirname(dirname(__FILE__)) . DS . 'helpers' . DS . 'plugins.php'; return PIPES_Helper_Plugins::getPlugins(true); }