1

I’m creating an ExpressionEngine extension. I want to get the IDs of any records that are deleted. I’m aware of the delete_entries_end() and delete_entries_loop() hooks, but they both return void which isn’t much use.

Is this possible out of the box with ExpressionEngine? I wanted to steer away from editing core files to make any future core upgrades seamless.

0

delete_entries_loop passes two arguments: $val (which is the entry_id of the entry which has just been deleted) and $channel_id. So, your entry_id is there for the taking.

But if you want to get this data before each entry is deleted, then you are out of luck, as the hook is triggered right after each entry is deleted.

3

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.