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
404 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
0answers
14 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
1answer
495 views

How can I remove the image attachment ALT field?

I've been using the technique described in this post to remove the caption and description fields in the uploads modal window, thus eliminating unused clutter for users. Since the title field is ...
0
votes
0answers
30 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 ...
0
votes
1answer
61 views

Automatically add image caption with values from a post parent field?

i have a custom dropdown field on post and i would to get the value from that custom field and insert it on each image caption field uploaded to the current post. I have been looking for a way to do ...
1
vote
0answers
58 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 ...
0
votes
1answer
104 views

Custom classes for attachments

I'm trying to create a custom field in ATTACHMENT DETAILS section. I want to add in this field multiply words separated by space which will be than added as a classes to particular images. This is ...
0
votes
1answer
63 views

Custom attachment field dissapearing

I'm adding a custom attachment field to the media uploader using WordPress' "attachment_fields_to_edit" and "attachment_fields_to_save" filters, which works fine initially after uploading an image ...
0
votes
1answer
77 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
78 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 ...
5
votes
2answers
1k views

Expanding new Media Uploader in WordPress 3.5

In current version of WordPress it is quite easy to expand the attachments fields using attachment_fields_to_edit filter, but in latest WordPress 3.5 RC2 it's not working. We can expand it using ...
1
vote
0answers
160 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 ...
2
votes
1answer
919 views

Saving Custom Field in Attachment Window in WordPress 3.5

I'm using the code below to add a custom text field in WP 3.5 Attachment Window (from this question # Expanding new Media Uploader in WordPress 3.5) ... add_filter( 'attachment_fields_to_edit', ...
3
votes
1answer
235 views

Looking for a hook to add attachment information to the media library tab

I would like to be able to determine if an image has been attached to a post by looking at the collapsed viewmedia library tab. Is there's a hook I can use to add that data to this view of the Media ...
0
votes
1answer
176 views

Loop issues when creating custom query for media uploader

I'm working on a theme for a magazine publisher who routinely deals with a large number of images. I need them to be able to associate each image with a contributor (photographer, illustrator, artist, ...
0
votes
1answer
129 views

How to set order for attachment form field?

I'm adding some fields to attachment edit form by add filter to "attachment_fields_to_edit". The added fields work fine but they are not rendered as the order I added them. Is there a way to order the ...
1
vote
1answer
245 views

Saving attachment custom fields

I want to establish a relationship between individual post attachments and Users. So far I've got my users listing just fine, but it isn't saving/updating. add_filter("attachment_fields_to_edit", ...
4
votes
1answer
781 views

Thickbox hacking - removing fields

Default (big and ugly) Thickbox I don't like how this Thickbox's page looks at all, I almost never use all these settings fields so decided to get rid off them, at least on pages where I'm uploading ...