SVG Support - Version 2.3.1

Version Description

  • Fix: Fatal error in some cases due to admin notice.
Download this release

Release Info

Developer Benbodhi
Plugin Icon 128x128 SVG Support
Version 2.3.1
Comparing to
See all releases

Code changes from version 2.3 to 2.3.1

admin/admin-notice.php CHANGED
@@ -12,17 +12,19 @@ if ( ! defined( 'ABSPATH' ) ) {
12
  * Admin notice markup
13
  */
14
  function bodhi_svgs_admin_notice_upgrade() {
15
- ?>
16
- <div class="notice notice-warning is-dismissible svgs-upgrade-notice">
17
- <p><?php _e( 'If you updated SVG Support from any version prior to 2.3 and you use the inline SVG features, please ', 'svg-support' ); ?><a href="<?php echo get_admin_url( null, 'options-general.php?page=svg-support' ); ?>"><?php _e( 'Enable Advanced Mode', 'svg-support' ); ?></a></p>
18
- </div>
19
- <?php
 
 
20
  }
21
 
22
  /**
23
  * Check if notice has been dismissed before
24
  */
25
- if ( empty( get_option( 'bodhi_svgs_admin_notice_dismissed' ) ) ) {
26
  add_action( 'admin_notices', 'bodhi_svgs_admin_notice_upgrade' );
27
  }
28
 
12
  * Admin notice markup
13
  */
14
  function bodhi_svgs_admin_notice_upgrade() {
15
+ ?>
16
+ <div class="notice notice-warning is-dismissible svgs-upgrade-notice">
17
+ <p><?php _e( 'If you updated SVG Support from any version prior to 2.3 and you use the inline SVG features, please ', 'svg-support' ); ?><a href="<?php echo get_admin_url( null, 'options-general.php?page=svg-support' ); ?>"><?php _e( 'Enable Advanced Mode', 'svg-support' ); ?></a></p>
18
+ </div>
19
+ <?php
20
+
21
+ update_option( 'bodhi_svgs_admin_notice_dismissed', 0 );
22
  }
23
 
24
  /**
25
  * Check if notice has been dismissed before
26
  */
27
+ if ( get_option( 'bodhi_svgs_admin_notice_dismissed' ) == 0 ) {
28
  add_action( 'admin_notices', 'bodhi_svgs_admin_notice_upgrade' );
29
  }
30
 
admin/svgs-settings-page.php CHANGED
@@ -114,11 +114,11 @@
114
 
115
  if ( empty( $bodhi_svgs_options['advanced_mode'] ) ) {
116
  echo '<h3><span>';
117
- _e( 'Advanced Usage', 'svg-support' );
118
  echo '</span></h3>';
119
  } else {
120
  echo '<h3><span>';
121
- _e( 'Usage', 'svg-support' );
122
  echo '</span></h3>';
123
  }
124
 
114
 
115
  if ( empty( $bodhi_svgs_options['advanced_mode'] ) ) {
116
  echo '<h3><span>';
117
+ _e( 'Usage', 'svg-support' );
118
  echo '</span></h3>';
119
  } else {
120
  echo '<h3><span>';
121
+ _e( 'Advanced Usage', 'svg-support' );
122
  echo '</span></h3>';
123
  }
124
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
4
  Tags: svg, vector, css, style, mime, mime type, embed, img, inline, animation
5
  Requires at least: 4.0
6
  Tested up to: 4.8-alpha-39901
7
- Stable tag: 2.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -138,6 +138,10 @@ If you are using SVG Support with Visual Composer or any other page builders, yo
138
 
139
  == Changelog ==
140
 
 
 
 
 
141
  = 2.3 =
142
 
143
  * New Feature - Advanced Mode: allows you to turn off the advanced features and simply upload SVG files like normal images. This addition also enables users to turn off the script added on front end by leaving Advanced Mode unchecked.
@@ -247,6 +251,10 @@ If you are using SVG Support with Visual Composer or any other page builders, yo
247
 
248
  == Upgrade Notice ==
249
 
 
 
 
 
250
  = 2.3 =
251
 
252
  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!!!
4
  Tags: svg, vector, css, style, mime, mime type, embed, img, inline, animation
5
  Requires at least: 4.0
6
  Tested up to: 4.8-alpha-39901
7
+ Stable tag: 2.3.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
138
 
139
  == Changelog ==
140
 
141
+ = 2.3.1 =
142
+
143
+ * Fix: Fatal error in some cases due to admin notice.
144
+
145
  = 2.3 =
146
 
147
  * New Feature - Advanced Mode: allows you to turn off the advanced features and simply upload SVG files like normal images. This addition also enables users to turn off the script added on front end by leaving Advanced Mode unchecked.
251
 
252
  == Upgrade Notice ==
253
 
254
+ = 2.3.1 =
255
+
256
+ * Fixes fatal error in some cases due to admin notice in V2.3.
257
+
258
  = 2.3 =
259
 
260
  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!!!
svg-support.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: SVG Support
4
  Plugin URI: http://wordpress.org/plugins/svg-support/
5
  Description: Allow SVG file uploads using the WordPress Media Library uploader plus the ability to inline SVG files for direct targeting of SVG elements for CSS and 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'; // 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
3
  Plugin Name: SVG Support
4
  Plugin URI: http://wordpress.org/plugins/svg-support/
5
  Description: Allow SVG file uploads using the WordPress Media Library uploader plus the ability to inline SVG files for direct targeting of SVG elements for CSS and JS.
6
+ Version: 2.3.1
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.1'; // 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