Add plugins.hook method to apply hook functions to value