2020-01-19, 04:56 PM
I createing plugin for getting 5 latest post for each category and show it in own forumbit. I define variable in function which added to functions_forumlist.php with add_hook("build_forumbits_forum", "functionname"); but i can't use it in forumbit templates.
Example code;
When i use it such example forumbit_depth1_cat it doesn't showing on forumlist.
Example code;
$plugins->add_hook('build_forumbits_forum', 'example');
function example($forum)
{
global $myvar;
$myvar = "Hello World!";
}
When i use it such example forumbit_depth1_cat it doesn't showing on forumlist.