admin管理员组文章数量:1024680
I'm trying to replace some icons for files in the media library based on the file-name / file-path. I want to give each file that contains the filename "example-name" a different icon in the media library.
I have no idea where to start, if someone can help me on track I'll happilly post the finished solution here, cause on the whole internet I couldn't find any.
pseudo-code
<?php foreach ($mediaFiles as $mediaFile) {
if (strstr($mediaFile['path'], 'example-name')) $mediaFile['icon'] = 'custom-icon.jpg';
} ?>
I'm trying to replace some icons for files in the media library based on the file-name / file-path. I want to give each file that contains the filename "example-name" a different icon in the media library.
I have no idea where to start, if someone can help me on track I'll happilly post the finished solution here, cause on the whole internet I couldn't find any.
pseudo-code
<?php foreach ($mediaFiles as $mediaFile) {
if (strstr($mediaFile['path'], 'example-name')) $mediaFile['icon'] = 'custom-icon.jpg';
} ?>
本文标签: galleryCustom icons in media library
版权声明:本文标题:gallery - Custom icons in media library 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745608995a2158893.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论