Outsourcing code from lib.php

Outsourcing code from lib.php

by Kathrin Osswald -
Number of replies: 0

As I found out that local plugins cannot override renderers, I need some hints how I could solve my problem.


I'm writing a local plugin that adds metatags to the <head> section of the moodle page to enable webapp style and so on. At the moment my code lies in the lib.php and it's adding the metatags by using the $CFG->additionalhtmlhead.

The lib.php is called at least on every site call. But the code of my plugin does not have to be called that often So I wonder if it's possible to outsource my code in a function that only will be called when the site is assembled (and the standard_html_head() is called) and of course when the settings of my plugin were changed.


Further information: I have no access to the theme and the plugin should work with every theme, therefore changes / additions within a specific theme would probably not serve.  


Thanks for your help in advance!

Best regards,

Kathrin

Average of ratings: -