Hi guys! Thank you for your attantion!
How I can make this fields *required?
https://disk.yandex.ru/i/x2PAscwBLVFNfg
Hey mischael1,
These fields are part of the WordPress core nad there are no settings to achieve this, I did find this solution on stackexchange but it is 4 years old and doesn’t seem well-reviewed, I would recommend looking for a plugin.
I assume that you want this so your clients will use these fields, but your best option would be to explain this to them.
Best regards,
Mike
This is not good solution, but it works. Possible it will be usefull for somebody.
In this code script every second checking fields alt and copyright and if one of them empty it disabling Insert button.
Put it into \wp-admin\admin-footer.php
<script>
$(function(){
setInterval(function(){
var a = $('.compat-field-av_copyright_field input')
var b = $('#attachment-details-alt-text')
if(a[0].value === '' || b[0].value === '')
$('.media-toolbar-primary button').attr("disabled",true);
else if(a[0].value !== '' && b[0].value !== '')
$('.media-toolbar-primary button').attr("disabled",false);
}, 1000
)
}
)
</script>