Linux 软件免费装
Banner图

SVG Enabler

开发者 fatih-toprak
optimisthub
更新时间 2023年2月8日 01:03
PHP版本: 7.1 及以上
WordPress版本: 6.1.1
版权: GPLv2 or later
版权网址: 版权信息

标签

svg support svg upload allow svg upload svg upload enabler

下载

1.0.0 1.0.2 1.0.1 1.0.3

详情介绍:

This plugin gives you the ability to allow SVG uploads whilst making sure that they’re sanitized to stop SVG/XML vulnerabilities affecting your site.

安装:

INSTALL "SVG Enabler" FROM WITHIN WORDPRESS
  1. Visit the plugins page within your dashboard and select ‘Add New’;
  2. Search for ‘SVG Enabler’;
  3. Activate SVG Enabler from your Plugins page;
  4. Go to ‘after activation’ below.
INSTALL "SVG Enabler" MANUALLY
  1. Upload the ‘svg-enabler’ folder to the /wp-content/plugins/ directory;
  2. Activate the SVG Enabler through the ‘Plugins’ menu in WordPress;
  3. Go to ‘after activation’ below.
AFTER ACTIVATION
  1. SVG Enabler is a 'set and forget' plugin. There are no settings fields as your site's scheduled posts will be automatically checked when the plugin is installed and activated.
  2. You’re done!

常见问题:

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. ` add_filter( 'optimisthub_svg_enabler_allowed_attributes', function ( $attributes ) { $attributes[] = 'target'; // This would allow the target="" attribute. return $attributes; } ); add_filter( 'optimisthub_svg_enabler_allowed_tags', function ( $tags ) { $tags[] = 'use'; // This would allow the element. return $tags; } ); `

更新日志:

1.0.3 1.0.2 - 1.0.1 1.0.0