attachment_fields_to_edit is a filter. It is applied to the form fields to be displayed when editing an attachment. Called in the get_attachment_fields_to_edit function. Filter function arguments: an array of form fields, the post object.

learn more… | top users | synonyms

2
votes
1answer
333 views

Add custom Attachment Display Setting for images

I've been doing a lot of research and I've yet to work this out. Can you add in a custom option in the Attachment Display Settings (part of Insert Media dialog in post editor)? What I'm after is the ...
0
votes
1answer
72 views

What is the way to add additional fields to attachments in 3.5+?

I used to use attachment_fields_to_edit filter, but it seems that in 3.5+ it has been dropped. What is the new way of adding additional attachment fields? UPDATE: It seems that it wasn't dropped, ...
0
votes
1answer
74 views

Adding thumbnails for non-image attachments

I'm working on a site that provides Photoshop resources. I would like to create a page offering brushes for download that displays a thumbnail image and a link to a .zip file for each brush set. I was ...
1
vote
0answers
54 views

How can I append custom data to images in the editor?

I've added a custom meta field to my image details so that a client can add a number to their photos (a design choice). The data would need to show up under each image (like a caption) inserted into ...
1
vote
0answers
154 views

$form_fields from attachment_fields_to_edit returning empty array

I'm trying to remove the caption field from non-images attachments' edit page, which should be a simple matter of unset($post['post_excerpt']), but I can't unset a non-existent value... Looking at ...
0
votes
0answers
11 views

clone image sizes dropdown as custom fields to attachments

How can I clone the images sizes dropdown as a custom fields to save its value like other fields in attachments does. Here is my code but not able to save its value <?php $clone_sizes = ...
0
votes
0answers
25 views

Get media-uploader fields array

I want to modify the fields in the media-uploader. To do that I need to know what creates the fields. In the Codex, you can see a way to add new fields to the media uploader, using the ...