// Load a plugin by type and name $plugin = JPluginHelper::getPlugin('system', 'my_plugin'); // Check if the plugin is enabled $enabled = JPluginHelper::isEnabled('system', 'my_plugin'); // Get the plugin description $description = JPluginHelper::getPlugin('system', 'my_plugin')->params->get('description');
// Register a plugin JPluginHelper::importPlugin('system', 'my_plugin'); // Get the plugin object $plugin = JPluginHelper::getPlugin('system', 'my_plugin'); // Call the plugin's onBeforeRender function $plugin->onBeforeRender();This code registers a plugin with the type "system" and the name "my_plugin". It then gets the plugin object and calls the plugin's onBeforeRender function. The JPluginHelper class is part of the Joomla Platform library, which is a set of PHP classes that can be used to develop Joomla extensions.