I need to add some functionality (flush some caches and such) when a Block in Drupal is added, moved, edited or deleted, is there ANY kind of hook for that (or another somewhat Drupal native way) like there is for nodes with hook_nodeapi?
I know there is hook_block but there $op is always list, so its not really any good.
Unfortunately blocks don’t have that kind of signalling mechanism. I would use the forms system to add submit callbacks wherever you need a signal for additional work.
The one downside to this method is that any alternate approach to configuring blocks won’t work. If someone builds a custom form outside the block module, or if you are using context or panels to move blocks around it won’t help. Of course, since any of those alternate configuration points would also use a form, you can use
hook_form_alter()to hack into their submit processes as well.