forked from pods-framework/pods
-
Notifications
You must be signed in to change notification settings - Fork 0
Delete()
bonsak edited this page Nov 20, 2012
·
1 revision
Delete the current item or a specific item by ID.
public function delete ( $id = null )
Parameter | Type | Details |
---|---|---|
$id | int | ID of the Pod item to delete |
(bool) Whether the item was successfully deleted
<?php
// Get the book item with an ID of 5
$pod = pods( 'book', 5 );
// Delete the current pod item
$pod->delete();
// Delete a book pod item with the ID of 2
$pod->delete( 2 );
Hooking into the Save / Delete process in the Pods API Contributed by owi See examples on how to use filters and actions to hook into the Save / Delete process in Pods API.
2.0+