¡Hola, amigos! I’m Señor FAQ, the mustached maestro of questions and answers! With my trusty glasses and a book of endless wisdom, I turn dudas into solutions. Soy el héroe de los curiosos and the champion of clarity.
on_tags
The on_tags
hook allows plugins to contribute additional results based on tags.
$hookResults = DynamicHooks::executeHook('on_tags', false, $tag, $limit, $this->db, $this->jkv, $this->langphrases);
foreach ($hookResults as $namespace => $pluginResults) {
if (is_array($pluginResults)) {
$results = array_merge($results, $pluginResults);
}
}
This hook dynamically extends tagged content by including plugin-specific results.
DynamicHooks::addHook('on_tags', function ($tag, $limit, $db, $jkv, $langphrases) {
// Example: Return results for a custom plugin
return [
[
'title' => 'Custom Plugin Tagged Result',
'content' => 'This is a result related to the tag.',
'url' => '/custom-tagged-result'
]
];
}, 'custom_plugin_namespace');
title
, content
, and url
.