Home › Forums › General Issues › ACF fields assigned to show on attachments, Media (Edit) but not on (Upload) › Reply To: ACF fields assigned to show on attachments, Media (Edit) but not on (Upload)
The attachment_fields_to_edit method in the acf_everything_fields class doesn’t add custom fields if $screen is not empty.
if( !empty($screen) )
{
return $form_fields;
}
After uploading a file the attachment_fields_to_edit method is called but WordPress returns a WP_screen object for get_current_screen(). The screen object has an id of ‘async-upload’. I think ACF should probably continue (i.e. add the custom fields that have been configured) for this screen
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.