thank you for your response.
I can get it through jquery (with my low level, something I can do) and it looks good depending on the css applied to it.
I don’t know too much about php, so I don’t know how I could do it.
with jQuery, as the library seems to be loaded via ajax, I have to do a settimeout and execute the function every time you scroll…
<script>
function name_in_media() {
jQuery('ul.attachments > li').each(function(){
var img = jQuery(this);
var nm = img.attr('aria-label');
var divnm = '<div class="name">' + nm + '</div>';
if (img.find('.name').length > 0) {
// nothing
} else { img.append(divnm); }
});
}
setTimeout(name_in_media,2000);
jQuery(window).scroll(function(e){ name_in_media(); });
</script>
<style>
.name{line-height:1.2;min-height:42px;overflow-wrap:break-word;margin-top:5px}
</style>
I know this is not very usefull… besides, when replace an image in image wp-block in gutenberg it doesn’t work…
-
This reply was modified 3 years, 8 months ago by kaquna.