cPanel provides action hooks to trigger functions for cPanel events. As far as I understand, the data the system passes to the hook is essentially read-only as the hook has no way to modify values and return them to the system.
I'm looking for filter hook functionality akin to wordpress filter hooks that will allow me to intercept and modify data as it is processed—for example to automatically append a string to a domain name when creating a zone record, before the zone is actually created.
I suppose the alternative is to use a post action hook to go back and manually update the record through the api. But this is essentially twice the work. It would be so much easier to just hand a modified value back and let cpanel complete the task it was already doing.
Any suggestions for accomplishing something like this are much appreciated.
I'm looking for filter hook functionality akin to wordpress filter hooks that will allow me to intercept and modify data as it is processed—for example to automatically append a string to a domain name when creating a zone record, before the zone is actually created.
I suppose the alternative is to use a post action hook to go back and manually update the record through the api. But this is essentially twice the work. It would be so much easier to just hand a modified value back and let cpanel complete the task it was already doing.
Any suggestions for accomplishing something like this are much appreciated.