public static function getExtensions($opt_name = "", $key = "") { if (empty($opt_name)) { Redux::getAllExtensions(); if (empty($key)) { return self::$extension_paths; } else { if (isset(self::$extension_paths[$key])) { return self::$extension_paths[$key]; } } } else { if (empty(self::$uses_extensions[$opt_name])) { Redux::getInstanceExtensions($opt_name); } if (empty(self::$uses_extensions[$opt_name])) { return false; } $instanceExtensions = array(); foreach (self::$uses_extensions[$opt_name] as $extension) { $class_file = end(self::$extensions[$extension]); $name = str_replace('.php', '', basename($extension)); $extension_class = 'ReduxFramework_Extension_' . $name; $instanceExtensions[$extension] = array('path' => $class_file, 'class' => $extension_class, 'version' => Redux_Helpers::get_template_version($class_file)); } return $instanceExtensions; } return false; }