esedic
4/29/2015 - 11:23 AM

Access Joomla plugin parameters from anywhere

Access Joomla plugin parameters from anywhere

<?php
// Get plugin 'my_plugin' of plugin type 'my_plugin_type'
$plugin = JPluginHelper::getPlugin('my_plugin_type', 'my_plugin');
 
// Check if plugin is enabled
if ($plugin)
{
    // Get plugin params
    $pluginParams = new JRegistry($plugin->params);
 
    $param1 = $pluginParams->get('param1');
    $param2 = $pluginParams->get('param2');
    $param3 = $pluginParams->get('param3');
}