Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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, 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? –  t f Aug 17 '13 at 15:50
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.