gallery - Custom icons in media library

I'm trying to replace some icons for files in the media library based on the file-namefile-path. I want to give

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';
} ?>

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745608997a4635838.html

相关推荐

  • gallery - Custom icons in media library

    I'm trying to replace some icons for files in the media library based on the file-namefile-path. I want to give

    10小时前
    40

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信