I’m trying to add a custom field to image and gallery edit screen.
I’m aware there are similar questions here, although answers either don’t work with the current version or they add field only to upload screen while I need a field to be visible in all edit screens (see below).
For this, I believe, you’ll have to mess with backbone.js as attachment_fields_to_edit
only adds to upload screen.
Adding field with attachment_fields_to_edit
↑ This is upload image screeen. Here Style is added with attachment_fields_to_edit
filter, and my_field is added with ACF plugin.
But they are missing in edit screen in the post
↑ Click edit on the actual post
↑ No style & my_field fields!
The question
How to add fields to still have them on the edit screen? Ideally answer will include adding fields to gallery edit screen if it’s a similar process
This question is really important for me so I’ll be adding a 100 rep bounty when it’s available.
Thanks!
attachment_fields_to_edit
worked.