Linux 软件免费装
Banner图

Safe SVG

开发者 enshrined
10up
jeffpaul
更新时间 2024年12月6日 00:58
PHP版本: 6.5 及以上
WordPress版本: 6.7
版权: GPL-2.0-or-later
版权网址: 版权信息

标签

security media svg vector mime

下载

1.3.4 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.5.0 1.5.1 1.5.2 1.5.3 1.6.1 1.7.1 1.8.0 1.8.1 1.9.0 1.9.1 1.9.2 1.9.3 1.9.4 1.9.5 1.9.7 1.9.8 1.9.9 2.2.2 2.0.3 1.2.0 1.1.0 1.6.0 2.0.0 2.0.1 2.0.2 1.4.0 2.3.1 1.3.0 1.9.10 1.3.2 1.9.6 2.1.1 2.2.3 2.2.4 2.2.5 1.0.0 1.1.1 1.3.1 2.1.0 2.2.0 2.2.6 1.3.3 2.2.1 2.3.0

详情介绍:

Safe SVG is the best way to Allow SVG Uploads in WordPress! It gives you the ability to allow SVG uploads whilst making sure that they're sanitized to stop SVG/XML vulnerabilities affecting your site. It also gives you the ability to preview your uploaded SVGs in the media library in all views. Current Features SVG Sanitization is done through the following library: https://github.com/darylldoyle/svg-sanitizer. SVG Optimization is done through the following library: https://github.com/svg/svgo.

安装:

Install through the WordPress directory or download, unzip and upload the files to your /wp-content/plugins/ directory

升级注意事项:

2.3.0 Note that this release bumps the WordPress minimum version from 6.4 to 6.5. 2.2.6 Note that this release bumps the WordPress minimum version from 5.7 to 6.4. 1.9.10 Important: bumped the WordPress minimum version from 4.0 to 4.7 and the PHP minimum version from 5.6 to 7.0.

常见问题:

Can we change the allowed attributes and tags?

Yes, this can be done using the svg_allowed_attributes and svg_allowed_tags filters. They take one argument that must be returned. See below for examples: add_filter( 'svg_allowed_attributes', function ( $attributes ) { // Do what you want here... // This should return an array so add your attributes to // to the $attributes array before returning it. E.G. $attributes[] = 'target'; // This would allow the target="" attribute. return $attributes; } ); add_filter( 'svg_allowed_tags', function ( $tags ) { // Do what you want here... // This should return an array so add your tags to // to the $tags array before returning it. E.G. $tags[] = 'use'; // This would allow the element. return $tags; } );

更新日志:

2.3.1 - 2024-12-05 2.3.0 - 2024-11-25 2.2.6 - 2024-08-28 2.2.5 - 2024-06-27 2.2.4 - 2024-03-28 2.2.3 - 2024-03-20 2.2.2 - 2023-11-21 2.2.1 - 2023-10-23 2.2.0 - 2023-08-21