Add custom_hook support