WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?


It seems that it wasn't dropped, but - deprecated. In 3.6 it operates in compatibility mode. To make a new field appear in media popup, one should set additional param - show_in_modal to true (helpful post here):

$form_fields['thumb-url'] = array(
    'label' => __('Thumbnail Url'),
    'input' => 'html',
    'html'  => <p> ... some html here ... </p>,
    'show_in_modal' => true // <- this one

But - still, the whole thing is deprecated and doomed to be dropped sooner or later. There should be a new way of doing things. Anyone knows what that'd be?

share|improve this question
The filter is still there. What makes you think the opposite? – tfrommen Aug 17 '13 at 15:50

attachment_fields_to_edit is still there in 3.6. It is in /wp-admin/includes/media.php in a couple of places. Perhaps usage has changed, or something has changed that has broken your code but without that code it is impossible to tell.

share|improve this answer
It stopped working, but now I know that it requires additional params to show up. However as I see it operates in compatibility mode and is deprecated in general. Should I assume that there is no way to extend this updated part of WordPress anymore? – jayarjo Aug 18 '13 at 7:10

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.