Post-save helpers
(Since 1.8.1) -- run code right after a pod item is saved to the database
An After Helper lets you run code RIGHT AFTER a record is successfully saved to the database. These helpers are especially useful for doing any sort of post-processing, such as sending confirmation emails, running update scripts, etc.
How to Assign
When editing a Pod, there is a “Post-save Helper” drop-down
Usage
- Use $params->datatype for the Pod name
- Use $params->tbl_row_id for the Pod Item ID
- Use $columns['field_name']['value'] to call the field values
Examples
Here's a Post-save helper in action!
<?php
// let's send an e-mail letting someone know something has been done
wp_mail('someone@somewhere.com','Something new, something true!','Something just changed on your site, fantastic!');
?>
