Version Description
- Fixed srcset warning for some premium themes.
- Fixed original IMG IDs not getting preserved on replacement.
- Removed some rogue text from featured image box.
Download this release
Release Info
Developer | Benbodhi |
Plugin | SVG Support |
Version | 2.4.2 |
Comparing to | |
See all releases |
Code changes from version 2.4.1 to 2.4.2
- functions/attachment.php +46 -37
- js/gutenberg-filters.js +2 -2
- js/min/gutenberg-filters-min.js +1 -1
- js/min/svgs-inline-min.js +1 -1
- js/svgs-inline.js +3 -3
- readme.txt +10 -1
- svg-support.php +2 -2
functions/attachment.php
CHANGED
@@ -58,7 +58,6 @@ function bodhi_svgs_get_dimensions( $svg ) {
|
|
58 |
|
59 |
/**
|
60 |
* Generate attachment metadata (Thanks @surml)
|
61 |
-
*
|
62 |
* Fixes Illegal String Offset Warning for Height & Width
|
63 |
*/
|
64 |
function bodhi_svgs_generate_svg_attachment_metadata( $metadata, $attachment_id ) {
|
@@ -87,28 +86,26 @@ function bodhi_svgs_generate_svg_attachment_metadata( $metadata, $attachment_id
|
|
87 |
// Might come in handy to create the sizes array too - But it's not needed for this workaround! Always links to original svg-file => Hey, it's a vector graphic! ;)
|
88 |
$sizes = array();
|
89 |
foreach ( get_intermediate_image_sizes() as $s ) {
|
|
|
90 |
$sizes[$s] = array( 'width' => '', 'height' => '', 'crop' => false );
|
91 |
|
92 |
-
// for svg with
|
93 |
-
if( $width !== 0 && $height !== 0 ){
|
94 |
|
95 |
// follow width of request size e.g. 150, 300 etc..
|
96 |
-
if ( isset( $_wp_additional_image_sizes[$s]['width'] ) )
|
97 |
$width_current_size = intval( $_wp_additional_image_sizes[$s]['width'] );
|
98 |
-
else
|
99 |
$width_current_size = get_option( "{$s}_size_w" );
|
|
|
100 |
|
101 |
// we have dimensions available. Use them
|
102 |
-
if( $width > $height ){
|
103 |
-
|
104 |
$ratio = round($width / $height,2);
|
105 |
$new_height = round($width_current_size / $ratio);
|
106 |
-
|
107 |
-
}else{
|
108 |
-
|
109 |
$ratio = round($height / $width,2);
|
110 |
$new_height = round($width_current_size * $ratio);
|
111 |
-
|
112 |
}
|
113 |
|
114 |
$sizes[$s]['width'] = $width_current_size;
|
@@ -117,41 +114,47 @@ function bodhi_svgs_generate_svg_attachment_metadata( $metadata, $attachment_id
|
|
117 |
// svgs can't be cropped by WP
|
118 |
$sizes[$s]['crop'] = false;
|
119 |
|
120 |
-
}else{
|
121 |
|
122 |
// no change is needed
|
123 |
-
if ( isset( $_wp_additional_image_sizes[$s]['width'] ) )
|
124 |
$sizes[$s]['width'] = intval( $_wp_additional_image_sizes[$s]['width'] ); // For theme-added sizes
|
125 |
-
else
|
126 |
$sizes[$s]['width'] = get_option( "{$s}_size_w" ); // For default sizes set in options
|
|
|
127 |
|
128 |
-
if ( isset( $_wp_additional_image_sizes[$s]['height'] ) )
|
129 |
$sizes[$s]['height'] = intval( $_wp_additional_image_sizes[$s]['height'] ); // For theme-added sizes
|
130 |
-
else
|
131 |
$sizes[$s]['height'] = get_option( "{$s}_size_h" ); // For default sizes set in options
|
|
|
132 |
|
133 |
-
if ( isset( $_wp_additional_image_sizes[$s]['crop'] ) )
|
134 |
$sizes[$s]['crop'] = intval( $_wp_additional_image_sizes[$s]['crop'] ); // For theme-added sizes
|
135 |
-
else
|
136 |
$sizes[$s]['crop'] = get_option( "{$s}_crop" ); // For default sizes set in options
|
|
|
137 |
|
138 |
}
|
139 |
|
140 |
$sizes[$s]['file'] = $filename;
|
141 |
$sizes[$s]['mime-type'] = 'image/svg+xml';
|
|
|
142 |
}
|
|
|
143 |
$metadata['sizes'] = $sizes;
|
|
|
144 |
}
|
145 |
|
146 |
return $metadata;
|
|
|
147 |
}
|
148 |
add_filter( 'wp_generate_attachment_metadata', 'bodhi_svgs_generate_svg_attachment_metadata', 10, 3 );
|
149 |
|
150 |
/*
|
151 |
-
*
|
152 |
-
*
|
153 |
-
*/
|
154 |
-
|
155 |
function bodhi_svgs_sanitize( $file ){
|
156 |
|
157 |
global $sanitizer;
|
@@ -185,7 +188,7 @@ function bodhi_svgs_sanitize( $file ){
|
|
185 |
return false;
|
186 |
}
|
187 |
|
188 |
-
//
|
189 |
if ( $is_zipped ) {
|
190 |
$clean = gzencode( $clean );
|
191 |
}
|
@@ -201,7 +204,7 @@ function bodhi_svgs_minify( ) {
|
|
201 |
global $bodhi_svgs_options;
|
202 |
global $sanitizer;
|
203 |
|
204 |
-
if( !empty($bodhi_svgs_options['minify_svg']) && $bodhi_svgs_options['minify_svg'] === 'on' ){
|
205 |
$sanitizer->minify(true);
|
206 |
}
|
207 |
|
@@ -221,7 +224,7 @@ function bodhi_svgs_sanitize_svg( $file ){
|
|
221 |
|
222 |
global $bodhi_svgs_options;
|
223 |
|
224 |
-
if( !empty($bodhi_svgs_options['sanitize_svg']) && $bodhi_svgs_options['sanitize_svg'] === 'on' ){
|
225 |
|
226 |
if ( $file['type'] === 'image/svg+xml' ) {
|
227 |
|
@@ -238,7 +241,7 @@ function bodhi_svgs_sanitize_svg( $file ){
|
|
238 |
|
239 |
}
|
240 |
|
241 |
-
//
|
242 |
add_filter( 'wp_handle_upload_prefilter', 'bodhi_svgs_sanitize_svg' );
|
243 |
|
244 |
// Fix image widget PHP warnings
|
@@ -260,17 +263,24 @@ function bodhi_svgs_get_attachment_metadata( $data ) {
|
|
260 |
function bodhi_svgs_disable_srcset( $sources ) {
|
261 |
|
262 |
$first_element = reset($sources);
|
263 |
-
if( isset($first_element) && !empty($first_element['url']) ){
|
264 |
|
265 |
$ext = pathinfo(reset($sources)['url'], PATHINFO_EXTENSION);
|
266 |
|
267 |
-
if( $ext == 'svg' ){
|
268 |
-
|
269 |
-
|
|
|
|
|
270 |
return $sources;
|
|
|
|
|
|
|
|
|
|
|
271 |
}
|
272 |
|
273 |
-
}else{
|
274 |
|
275 |
return $sources;
|
276 |
|
@@ -283,15 +293,15 @@ add_filter( 'wp_calculate_image_srcset', 'bodhi_svgs_disable_srcset' );
|
|
283 |
// proposed by starsis
|
284 |
// https://github.com/WordPress/gutenberg/issues/36603
|
285 |
|
286 |
-
function bodhi_svgs_dimension_fallback( $image, $attachment_id, $size, $icon ){
|
287 |
|
288 |
// only manipulate for svgs
|
289 |
-
if( get_post_mime_type($attachment_id) == 'image/svg+xml' ){
|
290 |
|
291 |
-
if( !isset($image[1]) or $image[1] === 0 ){
|
292 |
$image[1] = 1;
|
293 |
}
|
294 |
-
if( !isset($image[2]) or $image[2] === 0 ){
|
295 |
$image[2] = 1;
|
296 |
}
|
297 |
|
@@ -300,5 +310,4 @@ function bodhi_svgs_dimension_fallback( $image, $attachment_id, $size, $icon ){
|
|
300 |
return $image;
|
301 |
|
302 |
}
|
303 |
-
|
304 |
-
add_filter( 'wp_get_attachment_image_src', 'bodhi_svgs_dimension_fallback', 10, 4 );
|
58 |
|
59 |
/**
|
60 |
* Generate attachment metadata (Thanks @surml)
|
|
|
61 |
* Fixes Illegal String Offset Warning for Height & Width
|
62 |
*/
|
63 |
function bodhi_svgs_generate_svg_attachment_metadata( $metadata, $attachment_id ) {
|
86 |
// Might come in handy to create the sizes array too - But it's not needed for this workaround! Always links to original svg-file => Hey, it's a vector graphic! ;)
|
87 |
$sizes = array();
|
88 |
foreach ( get_intermediate_image_sizes() as $s ) {
|
89 |
+
|
90 |
$sizes[$s] = array( 'width' => '', 'height' => '', 'crop' => false );
|
91 |
|
92 |
+
// for svg with width and height set, we need to adjust the thumbnails accordingly
|
93 |
+
if ( $width !== 0 && $height !== 0 ) {
|
94 |
|
95 |
// follow width of request size e.g. 150, 300 etc..
|
96 |
+
if ( isset( $_wp_additional_image_sizes[$s]['width'] ) ) {
|
97 |
$width_current_size = intval( $_wp_additional_image_sizes[$s]['width'] );
|
98 |
+
} else {
|
99 |
$width_current_size = get_option( "{$s}_size_w" );
|
100 |
+
}
|
101 |
|
102 |
// we have dimensions available. Use them
|
103 |
+
if ( $width > $height ) {
|
|
|
104 |
$ratio = round($width / $height,2);
|
105 |
$new_height = round($width_current_size / $ratio);
|
106 |
+
} else {
|
|
|
|
|
107 |
$ratio = round($height / $width,2);
|
108 |
$new_height = round($width_current_size * $ratio);
|
|
|
109 |
}
|
110 |
|
111 |
$sizes[$s]['width'] = $width_current_size;
|
114 |
// svgs can't be cropped by WP
|
115 |
$sizes[$s]['crop'] = false;
|
116 |
|
117 |
+
} else {
|
118 |
|
119 |
// no change is needed
|
120 |
+
if ( isset( $_wp_additional_image_sizes[$s]['width'] ) ) {
|
121 |
$sizes[$s]['width'] = intval( $_wp_additional_image_sizes[$s]['width'] ); // For theme-added sizes
|
122 |
+
} else {
|
123 |
$sizes[$s]['width'] = get_option( "{$s}_size_w" ); // For default sizes set in options
|
124 |
+
}
|
125 |
|
126 |
+
if ( isset( $_wp_additional_image_sizes[$s]['height'] ) ) {
|
127 |
$sizes[$s]['height'] = intval( $_wp_additional_image_sizes[$s]['height'] ); // For theme-added sizes
|
128 |
+
} else {
|
129 |
$sizes[$s]['height'] = get_option( "{$s}_size_h" ); // For default sizes set in options
|
130 |
+
}
|
131 |
|
132 |
+
if ( isset( $_wp_additional_image_sizes[$s]['crop'] ) ) {
|
133 |
$sizes[$s]['crop'] = intval( $_wp_additional_image_sizes[$s]['crop'] ); // For theme-added sizes
|
134 |
+
} else {
|
135 |
$sizes[$s]['crop'] = get_option( "{$s}_crop" ); // For default sizes set in options
|
136 |
+
}
|
137 |
|
138 |
}
|
139 |
|
140 |
$sizes[$s]['file'] = $filename;
|
141 |
$sizes[$s]['mime-type'] = 'image/svg+xml';
|
142 |
+
|
143 |
}
|
144 |
+
|
145 |
$metadata['sizes'] = $sizes;
|
146 |
+
|
147 |
}
|
148 |
|
149 |
return $metadata;
|
150 |
+
|
151 |
}
|
152 |
add_filter( 'wp_generate_attachment_metadata', 'bodhi_svgs_generate_svg_attachment_metadata', 10, 3 );
|
153 |
|
154 |
/*
|
155 |
+
* SVG Sanitization
|
156 |
+
* Only triggers when its enabled by admin
|
157 |
+
*/
|
|
|
158 |
function bodhi_svgs_sanitize( $file ){
|
159 |
|
160 |
global $sanitizer;
|
188 |
return false;
|
189 |
}
|
190 |
|
191 |
+
// if we were gzipped, we need to re-zip
|
192 |
if ( $is_zipped ) {
|
193 |
$clean = gzencode( $clean );
|
194 |
}
|
204 |
global $bodhi_svgs_options;
|
205 |
global $sanitizer;
|
206 |
|
207 |
+
if ( !empty($bodhi_svgs_options['minify_svg']) && $bodhi_svgs_options['minify_svg'] === 'on' ) {
|
208 |
$sanitizer->minify(true);
|
209 |
}
|
210 |
|
224 |
|
225 |
global $bodhi_svgs_options;
|
226 |
|
227 |
+
if ( !empty($bodhi_svgs_options['sanitize_svg']) && $bodhi_svgs_options['sanitize_svg'] === 'on' ) {
|
228 |
|
229 |
if ( $file['type'] === 'image/svg+xml' ) {
|
230 |
|
241 |
|
242 |
}
|
243 |
|
244 |
+
// Sanitize svg if user has enabled option
|
245 |
add_filter( 'wp_handle_upload_prefilter', 'bodhi_svgs_sanitize_svg' );
|
246 |
|
247 |
// Fix image widget PHP warnings
|
263 |
function bodhi_svgs_disable_srcset( $sources ) {
|
264 |
|
265 |
$first_element = reset($sources);
|
266 |
+
if ( isset($first_element) && !empty($first_element['url']) ) {
|
267 |
|
268 |
$ext = pathinfo(reset($sources)['url'], PATHINFO_EXTENSION);
|
269 |
|
270 |
+
if ( $ext == 'svg' ) {
|
271 |
+
|
272 |
+
// return empty array
|
273 |
+
$sources = array();
|
274 |
+
|
275 |
return $sources;
|
276 |
+
|
277 |
+
} else {
|
278 |
+
|
279 |
+
return $sources;
|
280 |
+
|
281 |
}
|
282 |
|
283 |
+
} else {
|
284 |
|
285 |
return $sources;
|
286 |
|
293 |
// proposed by starsis
|
294 |
// https://github.com/WordPress/gutenberg/issues/36603
|
295 |
|
296 |
+
function bodhi_svgs_dimension_fallback( $image, $attachment_id, $size, $icon ) {
|
297 |
|
298 |
// only manipulate for svgs
|
299 |
+
if ( get_post_mime_type($attachment_id) == 'image/svg+xml' ) {
|
300 |
|
301 |
+
if ( !isset($image[1]) or $image[1] === 0 ) {
|
302 |
$image[1] = 1;
|
303 |
}
|
304 |
+
if ( !isset($image[2]) or $image[2] === 0 ) {
|
305 |
$image[2] = 1;
|
306 |
}
|
307 |
|
310 |
return $image;
|
311 |
|
312 |
}
|
313 |
+
add_filter( 'wp_get_attachment_image_src', 'bodhi_svgs_dimension_fallback', 10, 4 );
|
|
js/gutenberg-filters.js
CHANGED
@@ -17,7 +17,7 @@ function wrapPostFeaturedImage( OriginalComponent ) {
|
|
17 |
el(
|
18 |
wp.element.Fragment,
|
19 |
{},
|
20 |
-
'
|
21 |
el(
|
22 |
OriginalComponent,
|
23 |
props
|
@@ -72,4 +72,4 @@ const composedCheckBox = wp.compose.compose( [
|
|
72 |
dispatch( 'core/editor' ).editPost( { meta } );
|
73 |
},
|
74 |
} ) ),
|
75 |
-
] )( CheckBoxCustom );
|
17 |
el(
|
18 |
wp.element.Fragment,
|
19 |
{},
|
20 |
+
'',
|
21 |
el(
|
22 |
OriginalComponent,
|
23 |
props
|
72 |
dispatch( 'core/editor' ).editPost( { meta } );
|
73 |
},
|
74 |
} ) ),
|
75 |
+
] )( CheckBoxCustom );
|
js/min/gutenberg-filters-min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
"use strict";function wrapPostFeaturedImage(e){return function(t){return el(wp.element.Fragment,{},"
|
1 |
+
"use strict";function wrapPostFeaturedImage(e){return function(t){return el(wp.element.Fragment,{},"",el(e,t),el(composedCheckBox))}}const el=wp.element.createElement,withState=wp.compose.withState,withSelect=wp.data.withSelect,withDispatch=wp.data.withDispatch;wp.hooks.addFilter("editor.PostFeaturedImage","bodhi-svgs-featured-image/render-inline-image-checkbox",wrapPostFeaturedImage);class CheckBoxCustom extends React.Component{render(){const{meta:e,updateInlineFeaturedSvg:t}=this.props;return el(wp.components.CheckboxControl,{label:"Render this SVG inline (Advanced)",checked:e.inline_featured_image,onChange:o=>{this.setState({isChecked:o}),t(o,e)}})}}const composedCheckBox=wp.compose.compose([withState((e=>{})),withSelect((e=>{const t=undefined,o=undefined;return{meta:{...e("core/editor").getCurrentPostAttribute("meta"),...e("core/editor").getEditedPostAttribute("meta")}}})),withDispatch((e=>({updateInlineFeaturedSvg(t,o){o={...o,inline_featured_image:t},e("core/editor").editPost({meta:o})}})))])(CheckBoxCustom);
|
js/min/svgs-inline-min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
document.addEventListener("DOMContentLoaded",(function(e){function t(e){if("IMG"===e.nodeName){var t=e.id,
|
1 |
+
document.addEventListener("DOMContentLoaded",(function(e){function t(e){if("IMG"===e.nodeName){var t=e.id,s=e.classList,i=e.src;if(i.endsWith("svg")){var r=new XMLHttpRequest;r.onreadystatechange=function(){if(4==r.readyState&&200==r.status){let o;data=r.responseText;const d=undefined;var i=(new DOMParser).parseFromString(data,"text/html").getElementsByTagName("svg")[0],a=i.id;void 0===t?void 0===a?(t="svg-replaced-"+n,i.setAttribute("id",t)):t=a:i.setAttribute("id",t),void 0!==s&&i.setAttribute("class",s+" replaced-svg svg-replaced-"+n),i.removeAttribute("xmlns:a"),e.replaceWith(i),n++}},r.open("GET",i,!1),r.send(null)}}}function s(e){if(e.childNodes.length>0)for(var n=0;n<e.childNodes.length;n++){var i;if("IMG"==e.childNodes[n].nodeName)t(e.childNodes[n]);else s(e.childNodes[n])}}let n=0;(bodhisvgsInlineSupport=function(){if("true"===ForceInlineSVGActive)for(var e=document.getElementsByTagName("img"),n=0;n<e.length;n++)void 0!==e[n].src&&e[n].src.match(/\.(svg)/)&&(e[n].classList.contains(cssTarget.ForceInlineSVG)||e[n].classList.add(cssTarget.ForceInlineSVG));if(String.prototype.endsWith||(String.prototype.endsWith=function(e,t){var s=this.toString();("number"!=typeof t||!isFinite(t)||Math.floor(t)!==t||t>s.length)&&(t=s.length),t-=e.length;var n=s.lastIndexOf(e,t);return-1!==n&&n===t}),String.prototype.endsWith=function(e){var t=this.length-e.length;return t>=0&&this.lastIndexOf(e)===t},"true"===ForceInlineSVGActive)var i="img."!==cssTarget.Bodhi?cssTarget.ForceInlineSVG:"style-svg";else var i="img."!==cssTarget?cssTarget:"style-svg";i=i.replace("img.","");for(var e=document.getElementsByClassName(i),n=0;n<e.length;n++){var r;if(void 0===e[n].src)s(e[n]);else t(e[n])}})()}));
|
js/svgs-inline.js
CHANGED
@@ -38,12 +38,12 @@ document.addEventListener("DOMContentLoaded", function(event) {
|
|
38 |
if( typeof imgID === 'undefined' ){
|
39 |
if( typeof svgID === 'undefined' ) {
|
40 |
imgID = 'svg-replaced-'+bodhisvgsReplacements;
|
41 |
-
svg.
|
42 |
} else {
|
43 |
imgID = svgID;
|
44 |
}
|
45 |
} else {
|
46 |
-
svg.
|
47 |
}
|
48 |
|
49 |
// Add replaced image's classes to the new SVG
|
@@ -175,4 +175,4 @@ document.addEventListener("DOMContentLoaded", function(event) {
|
|
175 |
|
176 |
})(); // Execute immediately
|
177 |
|
178 |
-
});
|
38 |
if( typeof imgID === 'undefined' ){
|
39 |
if( typeof svgID === 'undefined' ) {
|
40 |
imgID = 'svg-replaced-'+bodhisvgsReplacements;
|
41 |
+
svg.setAttribute('id', imgID);
|
42 |
} else {
|
43 |
imgID = svgID;
|
44 |
}
|
45 |
} else {
|
46 |
+
svg.setAttribute('id', imgID);
|
47 |
}
|
48 |
|
49 |
// Add replaced image's classes to the new SVG
|
175 |
|
176 |
})(); // Execute immediately
|
177 |
|
178 |
+
});
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: svg, vector, safesvg, safe svg, sanitization, sanitisation, sanitizer, san
|
|
5 |
Requires at least: 4.8
|
6 |
Tested up to: 6.0
|
7 |
Requires PHP: 5.3
|
8 |
-
Stable tag: 2.4.
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -160,6 +160,12 @@ You need to add the mime type for svg and svgz to: "MLA Settings > Media Library
|
|
160 |
|
161 |
|
162 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
163 |
= 2.4.1 =
|
164 |
* Fixed issue causing WP-CLI to break.
|
165 |
|
@@ -363,6 +369,9 @@ You need to add the mime type for svg and svgz to: "MLA Settings > Media Library
|
|
363 |
|
364 |
== Upgrade Notice ==
|
365 |
|
|
|
|
|
|
|
366 |
= 2.4.1 =
|
367 |
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!
|
368 |
|
5 |
Requires at least: 4.8
|
6 |
Tested up to: 6.0
|
7 |
Requires PHP: 5.3
|
8 |
+
Stable tag: 2.4.2
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
160 |
|
161 |
|
162 |
== Changelog ==
|
163 |
+
|
164 |
+
= 2.4.2 =
|
165 |
+
* Fixed srcset warning for some premium themes.
|
166 |
+
* Fixed original IMG IDs not getting preserved on replacement.
|
167 |
+
* Removed some rogue text from featured image box.
|
168 |
+
|
169 |
= 2.4.1 =
|
170 |
* Fixed issue causing WP-CLI to break.
|
171 |
|
369 |
|
370 |
== Upgrade Notice ==
|
371 |
|
372 |
+
= 2.4.2 =
|
373 |
+
2.4.2 fixes srcset issue firing PHP warnings for some themes and original image IDs missing on replacement to inline SVG.
|
374 |
+
|
375 |
= 2.4.1 =
|
376 |
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!
|
377 |
|
svg-support.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: SVG Support
|
4 |
Plugin URI: http://wordpress.org/plugins/svg-support/
|
5 |
Description: Upload SVG files to the Media Library and render SVG files inline for direct styling/animation of an SVG's internal elements using CSS/JS.
|
6 |
-
Version: 2.4.
|
7 |
Author: Benbodhi
|
8 |
Author URI: https://benbodhi.com
|
9 |
Text Domain: svg-support
|
@@ -22,7 +22,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
22 |
/**
|
23 |
* Global variables
|
24 |
*/
|
25 |
-
$svgs_plugin_version = '2.4.
|
26 |
$plugin_file = plugin_basename(__FILE__); // plugin file for reference
|
27 |
define( 'BODHI_SVGS_PLUGIN_PATH', plugin_dir_path( __FILE__ ) ); // define the absolute plugin path for includes
|
28 |
define( 'BODHI_SVGS_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); // define the plugin url for use in enqueue
|
3 |
Plugin Name: SVG Support
|
4 |
Plugin URI: http://wordpress.org/plugins/svg-support/
|
5 |
Description: Upload SVG files to the Media Library and render SVG files inline for direct styling/animation of an SVG's internal elements using CSS/JS.
|
6 |
+
Version: 2.4.2
|
7 |
Author: Benbodhi
|
8 |
Author URI: https://benbodhi.com
|
9 |
Text Domain: svg-support
|
22 |
/**
|
23 |
* Global variables
|
24 |
*/
|
25 |
+
$svgs_plugin_version = '2.4.2'; // for use on admin pages
|
26 |
$plugin_file = plugin_basename(__FILE__); // plugin file for reference
|
27 |
define( 'BODHI_SVGS_PLUGIN_PATH', plugin_dir_path( __FILE__ ) ); // define the absolute plugin path for includes
|
28 |
define( 'BODHI_SVGS_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); // define the plugin url for use in enqueue
|