[wordpress插件] Clean Image Filenames清理映像文件名

wordpress 插件 文章 2020-03-24 10:00 649 0 全屏看文

AI助手支持GPT4.0

评分
94
描述

Filenames with special characters or language accent characters, like Château de Ferrières.jpg and smörgåsbord.png, can sometimes be a problem for browsers or servers.

带有特殊字符或语言重音字符的文件名,例如ChâteaudeFerrières.jpg和smörgåsbord.png,有时对于浏览器或服务器来说是一个问题。

This plugin takes care of that and cleans the filenames of files uploaded to the WordPress media library.

该插件可以解决此问题,并清除上传到WordPress媒体库的文件的文件名。

This plugin cleans the filenames from special characters like exclamation marks, periods, and commas and accent characters like Swedish and German umlauts.

此插件可清除文件名中的特殊字符,例如感叹号,句号和逗号,以及带有重音符号的字符,例如瑞典和德国变音符号。

Special characters are remove, accent characters are converted to their non-accent equivalent, and blank spaces are converted into dashes.

删除特殊字符,将重音符号转换为非重音符号,并将空格转换为破折号。

Easily set the plugin to clean the filenames of images only or all files uploaded to the media library.

轻松设置插件以仅清除图像文件名或所有上传到媒体库的文件的文件名。

Developers can take advantage of the built in filter to get really specific about what file types to clean the filenames of.

开发人员可以利用内置的过滤器来真正确定要清除其文件名的文件类型。

Features

功能

    • Can be used for all file types, not only images
    • 不仅可以用于图像,还可以用于所有文件类型

    • Multisite compatible
    • 兼容多站点

    • Works with custom upload_dir setups
    • 使用自定义的upload_dir设置

    • Doesn’t alter your database or uploads settings
    • 不更改数据库或上传设置

    • Gutenberg ready
    • 古腾堡准备好了

    Plugin filter for developers

    开发人员插件过滤器

    Developers can get really specific about what file types to clean by using the clean_image_filenames_mime_types filter in their plugins or themes.

    开发人员可以通过在其插件或主题中使用 clean_image_filenames_mime_types 过滤器来真正确定要清除哪些文件类型。

    When using this filter, settings saved through the settings page are overridden. For a complete list of mime types, see

    使用此过滤器时,将覆盖通过设置页面保存的设置。有关mime类型的完整列表,请参见

    ="nofollow">Wikipedia.

    =“ nofollow”>维基百科。

    The following example would make the plugin clean the filenames for PDF, JPEG and PNG files only.

    以下示例将使插件仅清除PDF,JPEG和PNG文件的文件名。

    function my_clean_image_filenames_mime_types() {    

      function my_clean_image_filenames_mime_types(){    

    $mime_types = array(        

    $ mime_types =数组(        

    'application/pdf',        

    “应用程序/ pdf”,        

    'image/jpeg',        

    '图像/ JPEG',        

    'image/png',    

    'image / png',    

    );    

    );    

    return $mime_types;

    返回$ mime_types;

    }

    }

    add_filter('clean_image_filenames_mime_types', 'my_clean_image_filenames_mime_types');

    add_filter('clean_image_filenames_mime_types','my_clean_image_filenames_mime_types');

安装步骤

    1. Upload the clean-image-filenames directory to the /wp-content/plugins/ directory.
    2. clean-image-filenames 目录上传到 / wp-content / plugins / 目录。

    3. Activate the plugin through the ‘Plugins’ menu in WordPress.
    4. 通过WordPress中的“插件”菜单激活插件。

下载地址
https://downloads.wordpress.org/plugin/clean-image-filenames.1.2.1.zip
-EOF-

AI助手支持GPT4.0


国内超级便宜服务器

摸鱼人热门新闻聚合

钻级赞助商 我要加入

开发者在线工具

第三方支付技术请加QQ群

相关文章
[wordpress插件] ConveYour for WordPressConveYour for WordPress
[wordpress插件] CM FAQCM常见问题
[wordpress插件] Contact Form vCard Generator联系表格电子名片生成器
[wordpress插件] WP ComposerWP作曲家
[wordpress插件] Better Adjacent Post Links更好的相邻帖子链接
随便看看
微信公众号免300认证教程 5892
小程序已经上线,作为管理员无法在小程序数据助手查看数据? 5299
小程序广告组件通过审核,但是小程序内没有显示广告? 5067
企业微信通讯录账号被管理员误/恶意删除,怎么办? 9568
问题? 9047
如何快速搭建抽奖助手小程序(无需代码知识) 6177
许涛 大哥在吗, 要解冻小程序的时候提示信息主体不一致, 能帮忙看下吗? 7471
小程序搜一搜全称搜索不显示 麻烦解决一下!谢谢 6793
我的小程序广告收款主体是个体工商户,每个月邮寄两次发票很是麻烦,我年底的时候打包邮寄一次可以么? 6127
如何解决渲染层网络错误Failed to load media? 17393