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

5
votes
2answers
2k 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 ...
4
votes
1answer
818 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 ...
4
votes
1answer
676 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 ...
3
votes
1answer
246 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 ...
2
votes
1answer
1k 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', ...
1
vote
1answer
562 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 ...
1
vote
0answers
65 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
178 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 ...
1
vote
1answer
260 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", ...
0
votes
1answer
88 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 ...
0
votes
1answer
132 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 ...
0
votes
0answers
22 views

attachment custom values are'nt inserted to database

I have created attachment custom field. After I uploading image and inserting to new-post.php (post creating window) no meta values are saved in database. Even that I have set a default value for ...
0
votes
0answers
15 views

Media uploader edit image direct in edit-psot view

I want to make available to edit custom fields (its gallery) direct in edit-post view. Im using ACF plugin so I have this view: http://grabilla.com/04906-95db6a64-4c3f-497a-b312-67fff32ab21f.html I ...
0
votes
0answers
13 views

How can I show errors in the “Add Media” iframe?

I've added a custom field to the "Add Media" form using add_filter('attachment_fields_to_edit', ...) and I'm validating the existence of it when saving the attachment fields using ...
0
votes
0answers
24 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
41 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
118 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
66 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
86 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
98 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 ...
0
votes
1answer
186 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, ...