Skip to content

Instantly share code, notes, and snippets.

@martinbean

martinbean/create_hook.php Secret

Created Jan 16, 2015
Embed
What would you like to do?
ExpressionEngine extension—listening on delete_entries_loop hook
<?php
$data = array(
'class' => __CLASS__,
'method' => 'on_delete_entries',
'hook' => 'delete_entries_loop',
'settings' => serialize($this->settings),
'priority' => 10,
'version' => $this->version,
'enabled' => 'y',
);
$this->EE->db->insert('extensions', $data);
<?php
/**
* Called on delete_entries_loop hook.
*
* @param int $entry_id
* @param int $channel_id
* @return void
*/
public function on_delete_entries($entry_id, $channel_id)
{
// Do something when an entry is removed.
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment