Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
How to access Joomla plugin parameters anywhere in Joomla
<?php
// no direct access
defined('_JEXEC') or die('Restricted access');
// === How to access Joomla plugin parameters anywhere in Joomla ===
// Get plugin with name 'plugin_name' of type 'plugin_type' (e.g. "content")
$plugin = JPluginHelper::getPlugin('plugin_type', 'plugin_name');
// Check if the plugin exists and is enabled
if ($plugin) {
// Call plugin params
$pluginParams = new JRegistry($plugin->params);
// Retrieve plugin params
$param1 = $pluginParams->get('param1');
$param2 = $pluginParams->get('param2');
$param3 = $pluginParams->get('param3');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.