Reassigns sequence numbers to all photos attached to a vehicle post.
Designed to run after a photo is deleted from the middle.
Saves an MD5 hash checksum of the attachment file bytes in the attachment post meta. This 32 character string can be used for file comparisons while not taxing the server as much as other methods.
Saves a sequence number like 1, 2, or 99 in attachment post meta. This number dictates the order in which the photos will be disabled in sliders and galleries.
Saves the vehicle VIN in attachment meta when an attachment is uploaded to a vehicle post.
If a user uploads a photo to a vehicle in the dashboard, it needs meta data that tells this plugin how to order that photo among the others during display. This class sets that and other meta values, including the VIN, and md5 hash checksum of the photo file. If it determines a photo upload is the first photo to be attached to a vehicle, that photo is set as the featured image for the vehicle post.
Filter callback on add_attachment. Decides whether to write meta values on attachments if they are uploaded to vehicles. If this method determines the photo sequence number to be 1, the attachment is also set as the featured image.