[eluser]wiredesignz[/eluser]
Plugins have been deprecated since CI 2.0.0
You could convert the widget plugin into a helper or library as needed.
Or you could extend the CI_Loader library with a plugin loader method.
Such as follows which is copied from CI1.7.2 but not tested in CI2.1.x or CI3.0
EDIT: Also note that the EXT constant has been deprecated now so you'll need to replace all occurrences of EXT in the widget plugin with '.php'
Code:
class MY_Loader extends CI_Loader {
public $_ci_plugins = array();
/**
* Load Plugin
*
* This function loads the specified plugin.
*
* @access public
* @param array
* @return void
*/
function plugin($plugins = array())
{
if ( ! is_array($plugins))
{
$plugins = array($plugins);
}
foreach ($plugins as $plugin)
{
$plugin = strtolower(str_replace('.php', '', str_replace('_pi', '', $plugin)).'_pi');
if (isset($this->_ci_plugins[$plugin]))
{
continue;
}
if (file_exists(APPPATH.'plugins/'.$plugin.'.php'))
{
include_once(APPPATH.'plugins/'.$plugin.'.php');
}
else
{
if (file_exists(BASEPATH.'plugins/'.$plugin.'.php'))
{
include_once(BASEPATH.'plugins/'.$plugin.'.php');
}
else
{
show_error('Unable to load the requested file: plugins/'.$plugin.'.php');
}
}
$this->_ci_plugins[$plugin] = TRUE;
log_message('debug', 'Plugin loaded: '.$plugin);
}
}
}