Hello,
I am using the great ACF JavaScript API documentation successfully. Except when using following location.
[...]
'location' => array (
array (
array (
'param' => 'attachment',
'operator' => '==',
'value' => 'image/jpeg',
),
),
),
[...]
The ACF are shown correctly but it seems impossible to run additional JavaScript Code here.
How to add ACF JavaScript API to wp.media? I couldn’t find out how to trigger the modal window where the ACF are shown. I want to run the ACF JavaScript code example:
acf.addAction('enable_field/name=image-description', function() {
console.log('image description trigger activated');
});
Is there a listener or something like that for attachment modal window available to trigger the code when the following modal is shown (see image)?
Thanks for your help!
Greetings
Andre
I would try using the ready_field action