Currently attachments have
- title
- caption
- alt text
- description
I would like to add another attribute to that list (e.g source). How can I do this ?
Currently attachments have
I would like to add another attribute to that list (e.g source). How can I do this ?
Comments are closed.
This can be done with two filters,
attachment_fields_to_edit
andattachment_fields_to_save
, which do exactly what their names suggest. Let’s say you wan to add asource
field. First, generate the field and fill it with its current value if that exists:Then make sure the field is saved if it has content:
Read more in this extensive tutorial.