0

function get_author_before_media_update($post_ID, $post_after, $post_before) {
 global $wpdb;
    if (get_post_type($post_ID) === 'attachment') {
        $author_before_update = $post_before->post_author;
        $author_after_update = $post_after->post_author;
 echo $author_before_update.' - '.$author_after_update;
 exit();//test
    }
}
add_action('attachment_updated', 'get_author_before_media_update', 90, 3);

Jagdish Sarma Asked question 2 hours ago
Add a Comment