Whenever you create a new gallery in wordpress and add it to a post, it adds the appropriate shortcode. The problem I have with it is that by default the "link to" in the options before clicking "insert gallery", is set to "media file", but if you leave that as it is, and insert the gallery to the post, the shortcode doesn't actually include the link="media file" part, only when I hover on the gallery to edit it and re-save it, only then does it add link="media file".
If there is no "link" reference in the shortcode, by default the link is the image's post url, which is useless.
I want to make it so if there is no "link" set, that wordpress adds link="media file" by default.
Does anyone have any clue how can I inject that to the shortcode?