Version Description
- Fixed: Fatal error in some cases when removing old option from the database.
Download this release
Release Info
Developer | Benbodhi |
Plugin | SVG Support |
Version | 2.3.14 |
Comparing to | |
See all releases |
Code changes from version 2.3.13 to 2.3.14
- functions/attachment-modal.php +3 -3
- readme.txt +10 -1
- svg-support.php +3 -3
functions/attachment-modal.php
CHANGED
@@ -14,14 +14,14 @@ function bodhi_svgs_response_for_svg( $response, $attachment, $meta ) {
|
|
14 |
|
15 |
if ( ! file_exists( $svg_path ) ) {
|
16 |
// If SVG is external, use the URL instead of the path
|
17 |
-
$svg_path = $response[
|
18 |
}
|
19 |
|
20 |
$dimensions = bodhi_svgs_get_dimensions( $svg_path );
|
21 |
|
22 |
-
$response[
|
23 |
'custom' => array(
|
24 |
-
'url' => $response[
|
25 |
'width' => $dimensions->width,
|
26 |
'height' => $dimensions->height,
|
27 |
'orientation' => $dimensions->width > $dimensions->height ? 'landscape' : 'portrait'
|
14 |
|
15 |
if ( ! file_exists( $svg_path ) ) {
|
16 |
// If SVG is external, use the URL instead of the path
|
17 |
+
$svg_path = $response['url'];
|
18 |
}
|
19 |
|
20 |
$dimensions = bodhi_svgs_get_dimensions( $svg_path );
|
21 |
|
22 |
+
$response['sizes'] = array(
|
23 |
'custom' => array(
|
24 |
+
'url' => $response['url'],
|
25 |
'width' => $dimensions->width,
|
26 |
'height' => $dimensions->height,
|
27 |
'orientation' => $dimensions->width > $dimensions->height ? 'landscape' : 'portrait'
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: svg, vector, css, style, mime, mime type, embed, img, inline, animation, a
|
|
5 |
Requires at least: 4.8
|
6 |
Tested up to: 5.0-alpha-42985
|
7 |
Requires PHP: 5.2
|
8 |
-
Stable tag: 2.3.
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -145,6 +145,9 @@ You need to add the mime type for svg and svgz to: "MLA Settings > Media Library
|
|
145 |
|
146 |
== Changelog ==
|
147 |
|
|
|
|
|
|
|
148 |
= 2.3.13 =
|
149 |
* Fixed: PHP warnings and notices from the image widget when using SVG files and wp_debug was on.
|
150 |
* Modified: Better front end CSS for displaying SVG attachments, both as images and inline.
|
@@ -299,6 +302,12 @@ You need to add the mime type for svg and svgz to: "MLA Settings > Media Library
|
|
299 |
|
300 |
== Upgrade Notice ==
|
301 |
|
|
|
|
|
|
|
|
|
|
|
|
|
302 |
= 2.3.12 =
|
303 |
* Wrapped the inline JS so you can call the inline function at will using `bodhisvgsInlineSupport();`. Added a native help tab. Removed the admin update notice. Did some general clean up of code and settings page. As always, it's best to take a full backup of your site before running any updates.
|
304 |
|
5 |
Requires at least: 4.8
|
6 |
Tested up to: 5.0-alpha-42985
|
7 |
Requires PHP: 5.2
|
8 |
+
Stable tag: 2.3.14
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
145 |
|
146 |
== Changelog ==
|
147 |
|
148 |
+
= 2.3.14 =
|
149 |
+
* Fixed: Fatal error in some cases when removing old option from the database.
|
150 |
+
|
151 |
= 2.3.13 =
|
152 |
* Fixed: PHP warnings and notices from the image widget when using SVG files and wp_debug was on.
|
153 |
* Modified: Better front end CSS for displaying SVG attachments, both as images and inline.
|
302 |
|
303 |
== Upgrade Notice ==
|
304 |
|
305 |
+
= 2.3.14 =
|
306 |
+
Fixes fatal error in some cases when removing old option from the database.
|
307 |
+
|
308 |
+
= 2.3.13 =
|
309 |
+
Update to address PHP warnings and notices on the image widget when wp_debug is enabled.
|
310 |
+
|
311 |
= 2.3.12 =
|
312 |
* Wrapped the inline JS so you can call the inline function at will using `bodhisvgsInlineSupport();`. Added a native help tab. Removed the admin update notice. Did some general clean up of code and settings page. As always, it's best to take a full backup of your site before running any updates.
|
313 |
|
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.3.
|
7 |
Author: Benbodhi
|
8 |
Author URI: http://benbodhi.com
|
9 |
Text Domain: svg-support
|
@@ -22,7 +22,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
22 |
/**
|
23 |
* Global variables
|
24 |
*/
|
25 |
-
$svgs_plugin_version = '2.3.
|
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
|
@@ -42,7 +42,7 @@ include( BODHI_SVGS_PLUGIN_PATH . 'functions/attribute-control.php' ); // auto
|
|
42 |
include( BODHI_SVGS_PLUGIN_PATH . 'functions/featured-image.php' ); // allow inline SVG for featured images
|
43 |
|
44 |
// include( BODHI_SVGS_PLUGIN_PATH . 'admin/admin-notice.php' ); // dismissable admin notice to warn users to update settings
|
45 |
-
if (
|
46 |
delete_option( 'bodhi_svgs_admin_notice_dismissed' );
|
47 |
}
|
48 |
|
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.3.14
|
7 |
Author: Benbodhi
|
8 |
Author URI: http://benbodhi.com
|
9 |
Text Domain: svg-support
|
22 |
/**
|
23 |
* Global variables
|
24 |
*/
|
25 |
+
$svgs_plugin_version = '2.3.14'; // 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
|
42 |
include( BODHI_SVGS_PLUGIN_PATH . 'functions/featured-image.php' ); // allow inline SVG for featured images
|
43 |
|
44 |
// include( BODHI_SVGS_PLUGIN_PATH . 'admin/admin-notice.php' ); // dismissable admin notice to warn users to update settings
|
45 |
+
if ( get_option( 'bodhi_svgs_admin_notice_dismissed' ) == true ) { // remove the old admin notice db entry
|
46 |
delete_option( 'bodhi_svgs_admin_notice_dismissed' );
|
47 |
}
|
48 |
|