Function Reference: geodir_action_post_updated
Summary
Updates custom table when post get updated.
Package
GeoDirectory
Parameters
- $post_ID
- (int) (required) The post ID.
- Default: None
- $post_after
- (object) (required) Post object after the update.
- Default: None
- $post_before
- (object) (required) Post object before the update.
- Default: None
Change Log
Since: 1.0.0
Source File
geodir_action_post_updated() is located in geodirectory-admin/admin_functions.php [Line: 1836]
Source Code
function geodir_action_post_updated($post_ID, $post_after, $post_before) { $post_type = get_post_type($post_ID); if (isset($_POST['action']) && $_POST['action'] == 'inline-save') { if ($post_type != '' && in_array($post_type, geodir_get_posttypes()) && !wp_is_post_revision($post_ID) && !empty($post_after->post_title) && $post_after->post_title != $post_before->post_title) { geodir_save_post_meta($post_ID, 'post_title', $post_after->post_title); } } }