WP SVG Icons - Version 3.1.8

Version Description

  • May 5th, 2015 =
  • Hide 10 icon notice for users not using 10 or more icons
  • Update tested to 4.2.1
  • Repair custom icon pack upload issue
  • Add multi-site error checking
Download this release

Release Info

Developer eherman24
Plugin Icon 128x128 WP SVG Icons
Version 3.1.8
Comparing to
See all releases

Code changes from version 3.1.7 to 3.1.8

admin/partials/wp-svg-icons-custom-icons-page.php CHANGED
@@ -40,7 +40,7 @@ if( file_exists( '../../../../../wp-load.php' ) ) {
40
  if( $file_extension != 'zip' ) {
41
  ?>
42
  <style>
43
- #social-icons { display: none; }
44
  </style>
45
  <div class="error">
46
  <p><?php _e( "There was a problem importing the file. Ensure that you are uploading a .zip file.", "wp-svg-icons" ); ?></p>
@@ -56,6 +56,10 @@ if( file_exists( '../../../../../wp-load.php' ) ) {
56
 
57
  // move the file to the custom upload path set above on line 63
58
  $movefile = wp_handle_upload( $uploadedfile, $upload_overrides );
 
 
 
 
59
 
60
  // if upload was successful
61
  if ( $movefile ) {
@@ -79,15 +83,30 @@ if( file_exists( '../../../../../wp-load.php' ) ) {
79
  $fileNameNoSpaces = str_replace(' ', '-',$uploadedfile['name']);
80
 
81
  $unzipfile = unzip_file( $dest_path.'/'.$fileNameNoSpaces, $dest_path );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
82
 
83
  if ( $unzipfile ) {
84
 
85
  // check for the json file
86
  // to ensure we've got a icomoon .zip
87
- if( !file_exists( $dest_path.'/'.'selection.json' ) ) {
 
88
  ?>
89
  <style>
90
- #social-icons { display: none; }
91
  </style>
92
  <div class="error">
93
  <p><?php _e( "There was a problem with the file you uploaded. Make sure that you're uploading a .zip file from","wp-svg-icons"); echo " <a href='https://icomoon.io/app/#/select' target='_blank'>icomoon</a>. "; _e( "If you're still having issues, please contact support.", "wp-svg-icons" ); ?></p>
@@ -198,7 +217,7 @@ if( file_exists( '../../../../../wp-load.php' ) ) {
198
 
199
  // check if the pack has loaded
200
  run_interval = setInterval(function() {
201
- if( jQuery( '.current-font-pack' ).children().length <= 1 ) {
202
  return;
203
  // re-run the interval
204
  } else {
@@ -327,7 +346,7 @@ if( file_exists( '../../../../../wp-load.php' ) ) {
327
  </p>
328
  </form>
329
 
330
- <section class="ten-icon-limit-reached" style="display:block;margin:2em 0;text-align:center;font-size:15px;color:rgb(238, 110, 81);padding:10px;">
331
  <span class="dashicons dashicons-welcome-comments"></span> <?php _e( "It looks like you're trying to install and use more than 10 icons. Unfortunately the free version limits the number of custom icons to 10. If you'd like to access more than 10 custom icons, please consider upgrading to the", 'wp-svg-icons' ); ?> <a href="http://www.evan-herman.com/wp-svg-icons-pro/" target="_blank" title="<?php _e( 'Upgrade to pro' , 'wp-svg-icons' ); ?>"><?php _e( 'Pro Version' , 'wp-svg-icons' ); ?></a>
332
  </section>
333
 
40
  if( $file_extension != 'zip' ) {
41
  ?>
42
  <style>
43
+ #social-icons, #review-wp-svg-icons { display: none; }
44
  </style>
45
  <div class="error">
46
  <p><?php _e( "There was a problem importing the file. Ensure that you are uploading a .zip file.", "wp-svg-icons" ); ?></p>
56
 
57
  // move the file to the custom upload path set above on line 63
58
  $movefile = wp_handle_upload( $uploadedfile, $upload_overrides );
59
+ if( is_wp_error( $movefile ) ) {
60
+ $error_string = $movefile->get_error_message();
61
+ wp_die( '<div id="message" class="error"><p>' . $error_string . '</p></div>' );
62
+ }
63
 
64
  // if upload was successful
65
  if ( $movefile ) {
83
  $fileNameNoSpaces = str_replace(' ', '-',$uploadedfile['name']);
84
 
85
  $unzipfile = unzip_file( $dest_path.'/'.$fileNameNoSpaces, $dest_path );
86
+ if( is_wp_error( $unzipfile ) ) {
87
+ ?>
88
+ <style>
89
+ #social-icons, #review-wp-svg-icons { display: none; }
90
+ </style>
91
+ <?php
92
+ $error_string = $unzipfile->get_error_message();
93
+ if( $error_string = 'Incompatible Archive.' ) {
94
+ if (function_exists('is_multisite') && is_multisite()) {
95
+ $error_string .= " This looks like a multi-site install. You'll want to head into the <a href='" . admin_url( 'network/settings.php#upload_filetypes' ) . "' title='Network Admin Settings'>network settings</a> page and add 'zip' to the list of acceptable upload file types.";
96
+ }
97
+ }
98
+ wp_die( '<div id="message" class="error"><p>' . $error_string . '</p></div>' );
99
+ }
100
 
101
  if ( $unzipfile ) {
102
 
103
  // check for the json file
104
  // to ensure we've got a icomoon .zip
105
+ if( !file_exists( $dest_path.'/'.'selection.json' ) ) {
106
+ echo $dest_path.'/'.'selection.json';
107
  ?>
108
  <style>
109
+ #social-icons, #review-wp-svg-icons { display: none; }
110
  </style>
111
  <div class="error">
112
  <p><?php _e( "There was a problem with the file you uploaded. Make sure that you're uploading a .zip file from","wp-svg-icons"); echo " <a href='https://icomoon.io/app/#/select' target='_blank'>icomoon</a>. "; _e( "If you're still having issues, please contact support.", "wp-svg-icons" ); ?></p>
217
 
218
  // check if the pack has loaded
219
  run_interval = setInterval(function() {
220
+ if( jQuery( '.current-font-pack' ).children().length <= 10 ) {
221
  return;
222
  // re-run the interval
223
  } else {
346
  </p>
347
  </form>
348
 
349
+ <section class="ten-icon-limit-reached" style="display:none;margin:2em 0;text-align:center;font-size:15px;color:rgb(238, 110, 81);padding:10px;">
350
  <span class="dashicons dashicons-welcome-comments"></span> <?php _e( "It looks like you're trying to install and use more than 10 icons. Unfortunately the free version limits the number of custom icons to 10. If you'd like to access more than 10 custom icons, please consider upgrading to the", 'wp-svg-icons' ); ?> <a href="http://www.evan-herman.com/wp-svg-icons-pro/" target="_blank" title="<?php _e( 'Upgrade to pro' , 'wp-svg-icons' ); ?>"><?php _e( 'Pro Version' , 'wp-svg-icons' ); ?></a>
351
  </section>
352
 
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: eherman24
3
  Donate link: https://www.evan-herman.com/contact/?contact-reason=I%20want%20to%20make%20a%20donation%20for%20all%20your%20hard%20work
4
  Tags: wordpress, bootstrap, font icon, font awesome more, fontstrap, icons, ui, ux, design, free, boot, strap, menus, menu, custom, nav, navigation, navicons, icons, evan, herman, icon, set, svg, wp, icomoon, ico, moon, wp, zoom, wp-zoom, wpzoom, broccolidry, metoicons, iconic, plugin, responsive, bootstrap, font, awesome, font awesome, twitter, glyphicons, glyph, web, font, webfont, custom, icons, import, upload, zip, font, icon, svg font icon, fonticon, iconfont, fontello, css3, svg animation, free, genericons, genericon, icon stack, stack, icons stack, menu icons, menu, customizable, customize, customizer, bootstrap, dropdown, navigation, scale, vector, icons
5
  Requires at least: 3.5
6
- Tested up to: 4.2
7
- Stable tag: 3.1.7
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -143,6 +143,12 @@ If you buy the pro version you will also receive support and updates for one yea
143
 
144
  == Changelog ==
145
 
 
 
 
 
 
 
146
  = 3.1.7 - April 23rd, 2015 =
147
  * Ensure WordPress v4.2 compatibility
148
 
@@ -232,6 +238,12 @@ If you buy the pro version you will also receive support and updates for one yea
232
 
233
  == Upgrade Notice ==
234
 
 
 
 
 
 
 
235
  = 3.1.7 - April 23rd, 2015 =
236
  * Ensure WordPress v4.2 compatibility
237
 
3
  Donate link: https://www.evan-herman.com/contact/?contact-reason=I%20want%20to%20make%20a%20donation%20for%20all%20your%20hard%20work
4
  Tags: wordpress, bootstrap, font icon, font awesome more, fontstrap, icons, ui, ux, design, free, boot, strap, menus, menu, custom, nav, navigation, navicons, icons, evan, herman, icon, set, svg, wp, icomoon, ico, moon, wp, zoom, wp-zoom, wpzoom, broccolidry, metoicons, iconic, plugin, responsive, bootstrap, font, awesome, font awesome, twitter, glyphicons, glyph, web, font, webfont, custom, icons, import, upload, zip, font, icon, svg font icon, fonticon, iconfont, fontello, css3, svg animation, free, genericons, genericon, icon stack, stack, icons stack, menu icons, menu, customizable, customize, customizer, bootstrap, dropdown, navigation, scale, vector, icons
5
  Requires at least: 3.5
6
+ Tested up to: 4.2.2
7
+ Stable tag: 3.1.8
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
143
 
144
  == Changelog ==
145
 
146
+ = 3.1.8 - May 5th, 2015 =
147
+ * Hide 10 icon notice for users not using 10 or more icons
148
+ * Update tested to 4.2.1
149
+ * Repair custom icon pack upload issue
150
+ * Add multi-site error checking
151
+
152
  = 3.1.7 - April 23rd, 2015 =
153
  * Ensure WordPress v4.2 compatibility
154
 
238
 
239
  == Upgrade Notice ==
240
 
241
+ = 3.1.8 - May 5th, 2015 =
242
+ * Hide 10 icon notice for users not using 10 or more icons
243
+ * Update tested to 4.2.1
244
+ * Repair custom icon pack upload issue
245
+ * Add multi-site error checking
246
+
247
  = 3.1.7 - April 23rd, 2015 =
248
  * Ensure WordPress v4.2 compatibility
249
 
wp-svg-icons.php CHANGED
@@ -8,7 +8,7 @@
8
  * Plugin Name: WP SVG Icons
9
  * Plugin URI: http://www.evan-herman.com/wordpress-plugin/wp-svg-icons/
10
  * Description: Quickly and effortlessly gain access to 492 beautifully designed SVG font icons, available on the frontend and backend of your site.
11
- * Version: 3.1.7
12
  * Author: EH Dev Shop
13
  * Author URI: http://evan-herman.com
14
  * License: GPL-3.0+
8
  * Plugin Name: WP SVG Icons
9
  * Plugin URI: http://www.evan-herman.com/wordpress-plugin/wp-svg-icons/
10
  * Description: Quickly and effortlessly gain access to 492 beautifully designed SVG font icons, available on the frontend and backend of your site.
11
+ * Version: 3.1.8
12
  * Author: EH Dev Shop
13
  * Author URI: http://evan-herman.com
14
  * License: GPL-3.0+