fixed before_template_render hook execution

before_template_render hook  will also now take an array as a function definition
eg. hook('before_template_render', array($this, 'addParam'));