Linux 软件免费装
Banner图

SVG Support

开发者 Benbodhi
更新时间 2024年8月11日 23:15
捐献地址: 去捐款
PHP版本: 7.2 及以上
WordPress版本: 6.6.2
版权: GPLv2 or later
版权网址: 版权信息

标签

svg vector sanitization mime type safe svg

下载

2.5.3 2.4 2.5.8 2.5.4 2.1.1 2.2.3.1 2.5.5 2.1 2.1.2 2.1.4 2.1.5 2.1.6 2.1.7 2.2 2.2.1 2.2.2 2.2.3 2.2.3.2 2.3 2.3.1 2.3.10 2.3.11 2.3.12 2.3.13 2.3.14 2.3.16 2.3.17 2.3.18 2.3.2 2.3.3 2.3.4 2.3.5 2.3.6 2.3.7 2.3.21 2.3.9 1.0 2.4.1 2.3.19 2.3.20 2.3.8 2.4.2 2.5.2 2.1.3 2.5.1 2.3.15 2.5 2.5.6 2.5.7 2.0 2.2.4 2.2.5

详情介绍:

Upload SVG files to your media library securely, with built-in sanitization and advanced features for styling and animation. SVG Support goes beyond just enabling SVG uploads. It offers powerful features that make working with SVGs easier and more flexible. Scalable Vector Graphics (SVG) are a staple in modern web design, allowing you to embed images with small file sizes that scale perfectly at any size without losing quality. However, styling and animating SVGs can be challenging when using standard methods. SVG Support simplifies this by allowing you to render your SVGs inline, enabling direct styling and animation using CSS and JavaScript. This plugin provides: Features

屏幕截图:

  • Advanced Settings
  • Featured Image checkbox to render SVG inline
  • SVG used in WP native Image Widget (since 4.9)
  • Inline SVG in the front end markup
  • Help tab - Overview
  • Help tab - The Settings
  • Help tab - Standard Usage
  • Help tab - Render SVG Inline (advanced usage)
  • Help tab - Featured Images
  • Help tab - Animation

升级注意事项:

2.5.8 Improved security, enhanced SVG processing, and updated admin interface. Includes better sanitization and escaping practices. Please take a backup before updating! 2.5.7 This update addresses issues with newer PHP versions. 2.5.6 This update addresses some security concerns. 2.5.5 Updating to 2.5+ Adds new features and addresses a number of earlier issues raised. Please take a backup before updating! 2.5.5 fixes more reported errors in the 2.5 series of updates. 2.5.4 Updating to 2.5+ Adds new features and addresses a number of earlier issues raised. Please take a backup before updating! 2.5.4 fixes errors in the 2.5 series of updates. 2.5.3 Updating to 2.5+ Adds new features and addresses a number of earlier issues raised. Please take a backup before updating! 2.5.3 fixes fatal error in 2.5.2. 2.5.2 Updating to 2.5+ Adds new features and addresses a number of earlier issues raised. Please take a backup before updating! 2.5.2 introduces some defaults for better security. 2.5.1 2.5 Adds new features and addresses a number of recent issues raised. Please take a backup before updating! 2.5.1 fixes the uninstall file. 2.5 Adds new features and addresses a number of recent issues raised. Please take a backup before updating! 2.4.2 2.4.2 fixes srcset issue firing PHP warnings for some themes and original image IDs missing on replacement to inline SVG. 2.4.1 2.4.1 fixes broken WP-CLI. Now featuring optional SVG sanitization and ability to target nested SVGs! This update contains a lot, please BACKUP YOUR DATABASE AND FILES BEFORE UPDATING! 2.4 Now featuring optional SVG sanitization and ability to target nested SVGs! This update contains a lot, please BACKUP YOUR DATABASE AND FILES BEFORE UPDATING! 2.3.21 Fixes featured image display on edit post screen. 2.3.20 Added more security. 2.3.19 Quick update to address PHP warnings from localize_script and to add a SRC check. 2.3.18 General clean up of plugin, testing on latest nightly build plus fixed issue with metadata being removed from non SVG attachments. 2.3.17 Added a setting to choose whether to load the frontend CSS file or not. It was previously enabled by default, so you may want to flick that on after the update. This allows you to leave it out so your site has one less file to load :) 2.3.16 This update addresses upload issues, PHP warnings and some frontend CSS changes with attachment display. 2.3.15 Had to roll back a recent PHP warnings fix due to it breaking some theme compatibility. 2.3.14 Fixes fatal error in some cases when removing old option from the database. 2.3.13 Update to address PHP warnings and notices on the image widget when wp_debug is enabled. 2.3.12
  • Inline JS can now be called using bodhisvgsInlineSupport();. Added a native help tab and removed the admin update notice. General cleanup of code and settings page. Remember to back up your site before updating.
2.3.11
  • New Features and Fixes: Added "Force Inline SVG" to render all SVG files inline with one click. Option to use an expanded JS version for separate minification with a caching plugin.
2.3.10
  • Fixed missing links in settings page.
2.3.9
  • Cleaned up some code and language, now stores less meta when not needed and added a plugin recommendation for Image Optimization.
2.3.8
  • Adds better support for WooCommerce and Sensei. Fixes issue with featured images not showing up when auto insert class setting is on.
2.3.7
  • Fixes issues with media library not loading for some, attachment-modal errors and adds some wider compatibility.
2.3.6
  • Adds support for older browsers, fixes a couple of seemingly isolated errors reported, removes some redundant code.
2.3.5
  • Modifications to thumbnail display code to prevent output buffer clash with another plugin.
2.3.4
  • Fixes fatal error for some because a function wasn't prefixed.
2.3.3
  • This update fixes some PHP warnings introduced in 2.3.2 and also has updated settings page text.
2.3.2
  • Changes to the way the auto class insert works.
2.3.1
  • Fixes fatal error in some cases due to admin notice in V2.3.
2.3 IMPORTANT, MAJOR CHANGES, BACKUP BEFORE UPDATING: Users that are inlining SVG will need to make sure "Advanced Mode" is active under "Settings > SVG Support". Your settings should all still be there. Make sure you run a backup before updating just in case!!! 2.2.5
  • Fix to display SVG thumbnails in attachment modals. (NOTE: You can not edit SVG files like other images in WordPress)
2.2.4
  • IMPORTANT: Fixes upload ability in WP 4.7.1
2.2.32
  • Changed text domain to match plugin slug for localization.
2.2.31
  • This release attempts to fix translation issues.
2.2.3
  • Feature - Changed code to allow JS detection if SVG has loaded and ability to control SVG using JS.
  • Fix - Thumbnail display in media library list view.
  • Added Spanish translation and cleaned up code/comments a bit.
2.2.2
  • Fix - Another change from anonymous function that was triggering errors for some.
2.2.1
  • Minor change to remove anonymous function that triggered a fatal error in older PHP versions.
2.2
  • Significant changes, added functionality, please BACKUP BEFORE UPDATING just in case.
2.1.7
  • Tested in WordPress 4.0 and added plugin icons for the new interface.
2.1.6
  • Important update! Added missing jQuery dependency in /functions/enqueue.php - was loading SVG Support JS before jQuery.
2.1.5
  • Added Serbian translation, submitted by Ogi Djuraskovic.
2.1.4
  • Some more re-arranging, added a few helpful links, updated language files, tended to my OCD a bit.
2.1.3
  • Added a link on the plugins page to the plugin settings page for easy access after install.
2.1.2
  • A little bit of house cleaning, updates to changelog and readme.txt for correct output with current version.
2.1.1
  • Update to conditional in JS file.
2.1
  • Updated language files for localization that were missed in version 2.0.
2.0
  • SVG Support has been completely re-written and re-structured. It now includes an admin settings page with instructions, plus options for restricting to admin use only and setting a custom CSS target class.
1.0
  • Initial Release.

常见问题:

SVG not rendering inline since 2.3 update

SVG Support 2.3 includes a new settings section called "Advanced Mode". Users that were inlining SVG files need to make sure this setting is checked. Go to your dashboard > Settings > SVG Support and check "Advanced Mode". All of your original settings should still be there.

How do I disable the Javascript on the front end if I am not using inline SVG?

If you go to Settings > SVG Support in your admin dashboard, you can choose to enable "Advanced Mode" or not. If you leave it disabled, the advanced functionality and extraneous script is removed.

I'm trying to use SVG in the customizer but it's not working.

To allow SVG to work in the customizer, you will need to modify/add some code in your child theme's function file. Here is a great tutorial on how to do that. The important part is: 'flex-width' => true 'flex-height' => true

How do I add animation to my SVG?

You will need to edit your SVG file in a code editor so you can add CSS classes to each element you need to target within the SVG. Make sure that your IMG tag is being swapped out for your inline SVG and then you can use CSS or JS to apply animations to elements within your SVG file.

Why is SVG Support not working in multisite?

If you installed multisite prior to WordPress 3.5, then you will need to remove your ms-files. Here is a couple of resources to help you: Dumping ms-files Removing ms-files after 3.5.

Why is my SVG not working in Visual Composer?

If you are using SVG Support with Visual Composer or any other page builders, you will need to make sure that you can add your own class to the image. The easiest way to do this is by using a simple text or code block in the builder to put your image code in to. Additionally, there is now a setting to force all SVG files to be rendered inline.

How do I get this to work with the Media Library Assistant plugin?

You need to add the mime type for svg and svgz to: "MLA Settings > Media Library Assistant > Uploads (tab)" and then it works.

更新日志:

2.5.8 2.5.7 2.5.6 2.5.5 2.5.4 2.5.3 2.5.2 2.5.1 2.5 2.4.2 2.4.1 2.4 2.3.21 2.3.20 2.3.19 2.3.18 2.3.17 2.3.16 2.3.15 2.3.14 2.3.13 2.3.12 2.3.11 2.3.10 2.3.9 2.3.8 2.3.7 2.3.6 2.3.5 2.3.4 2.3.3 2.3.2 2.3.1 2.3 2.2.5 2.2.4 2.2.32 2.2.31 2.2.3 2.2.2 2.2.1 2.2 2.1.7 2.1.6 2.1.5 2.1.4 2.1.3 2.1.2 2.1.1 2.1 2.0 1.0