/** * Callback triggered on post delete, used to initiate an outbound sync * * $post_id - (int) the post to delete */ function delete_post_callback($post_id) { $post = get_post($post_id); // Right now CPTs are not supported if ($post->post_type != "page" && $post->post_type != "post") { return; } $post = new WordPress_GitHub_Sync_Post($post_id); $post->delete(); }