public function do_delete($id)
{
if (!current_user_can(apply_filters('apple_news_delete_capability', 'manage_options'))) {
return;
}
// If it does not have a remote API ID just ignore
if (!get_post_meta($id, 'apple_news_api_id', true)) {
return;
}
$action = new Apple_Actions\Index\Delete($this->settings, $id);
try {
$action->perform();
} catch (Apple_Actions\Action_Exception $e) {
Admin_Apple_Notice::error($e->getMessage());
}
}