I have been following the following guide: step by step guide to wp list table however i can't figure out where should i define my action: duplicate in the code. I want to add a link to simply duplicate the according row, any idea ?
$actions = array(
'edit' => sprintf('<a href="?page=cruises_form&id=%s">%s</a>', $item['id'], __('Edit', 'cruise_list_manager')),
'delete' => sprintf('<a href="?page=%s&action=delete&id=%s">%s</a>', $_REQUEST['page'], $item['id'], __('Delete', 'cruise_list_manager')),
'duplicate' => sprintf('<a href="?page=%s&action=duplicate&id=%s">%s</a>', $_REQUEST['page'], $item['id'], __('Duplicate', 'cruise_list_manager')),
);
return sprintf('%s %s',
$item['name'],
$this->row_actions($actions)
);
}
Thank you very much.