Hello I was wondering if it is possible to hide Performance info from users and make these information only available to admins.
Is there an option like that or I should mess with the code to achieve this?
Kind regards
Christos
Hello I was wondering if it is possible to hide Performance info from users and make these information only available to admins.
Is there an option like that or I should mess with the code to achieve this?
Kind regards
Christos
I don't think there is an option for that.
If you want to mess with the code - well, here is how we did it in one OU theme. At the top of the layout file for our theme (theme/ou/layout/general.php - our theme only has one. Other themes might have more, in which case there might be a better place to do this) we added this code.
// Turn perf info on for admins
if (is_siteadmin()) {
$CFG->perfdebug = 8;
}
I *think* that is all that is required.
Worked like a charm on a child theme based on boost!
Thank you!
Just one comment,
I put 15 instead of 8
$CFG->perfdebug = 15;
8 was not showing all info dont know how it works, but I enabled Performance and saw that in the DB the value was 15. So I applied it to the code as well