The caption "lock" icon has always been there, but perhaps you have not noticed it earlier (for example if you have been browsing from mobile devices).
trey wrote:Pressing the lock icon toggles it between being locked and not being locked, but doesn't seem to do anything else.
It definitely has a function:
When UNlocked
The caption will automatically hide after 3 seconds of mouse inactivity when you move cursor away from the caption.
When locked
The caption will remain locked visible on screen, even when you move mouse cursor away and/or mouse is idle.
trey wrote:What is this and how can I get rid of it?
I don't see much point in removing it. It only becomes visible in the first place, if the user specifically hovers the mouse over the caption, in which case it will appear as useful option to the user. As soon as they move the mouse cursor away from the caption area, it will disappear, regardless of if it's set to locked or not.
If you really need to hide it for some reason, then you can assign this in Settings > Custom CSS:
.pswp__button--lock-caption {
display: none !important;
}