Version Description
- March 5th, 2015 =
- Fixed bug where clicking custom icon didn't load it into the preview container
- Added new setting to delete custom icon pack on plugin uninstall
- Re-wrote uninstall function to remove all plugin created options
- Added 2 week upgrade/review notification
- Minor style enhancements and bug fixes
Download this release
Release Info
Developer | eherman24 |
Plugin | WP SVG Icons |
Version | 3.1.1 |
Comparing to | |
See all releases |
Code changes from version 3.1 to 3.1.1
- admin/class-wp-svg-icons-admin.php +86 -8
- admin/css/wp-svg-icons-admin.css +20 -2
- admin/css/wp-svg-icons-admin.min.css +1 -1
- admin/js/wordpress-svg-icon-plugin-scripts.js +1 -1
- admin/partials/wp-svg-icons-default-icons-page.php +1 -76
- admin/partials/wp-svg-icons-icon-page.php +28 -0
- includes/class-wp-svg-icons-uninstall.php +63 -0
- readme.txt +15 -2
- uninstall.php +0 -18
- wp-svg-icons.php +11 -1
admin/class-wp-svg-icons-admin.php
CHANGED
@@ -53,7 +53,19 @@ class WP_SVG_Icons_Admin {
|
|
53 |
add_action( 'wp_update_nav_menu_item', array( $this, 'wp_svg_icons_update_custom_nav_fields'), 10, 3 );
|
54 |
|
55 |
// action hook which handles the ajax request of deleting files
|
56 |
-
add_action('wp_ajax_svg_delete_custom_pack', array( &$this , 'svg_delete_custom_pack_ajax' ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
}
|
58 |
|
59 |
/**
|
@@ -116,13 +128,7 @@ class WP_SVG_Icons_Admin {
|
|
116 |
|
117 |
// enqueue our nav scripts/styles
|
118 |
$this->enqueue_custom_nav_scripts_on_nav_menu_page();
|
119 |
-
|
120 |
-
// custom font pack found error
|
121 |
-
add_action('admin_notices', array( &$this , 'wp_svg_customPack_installed_error' ) );
|
122 |
-
|
123 |
-
// set the custom upload directory
|
124 |
-
add_action( 'admin_head', array( &$this , 'wp_svg_change_downloads_upload_dir' ) , 999 );
|
125 |
-
|
126 |
}
|
127 |
|
128 |
// ajax delete our .zip and entire directory for the custom pack!
|
@@ -338,6 +344,78 @@ class WP_SVG_Icons_Admin {
|
|
338 |
}
|
339 |
}
|
340 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
341 |
|
342 |
|
343 |
} // end Class
|
53 |
add_action( 'wp_update_nav_menu_item', array( $this, 'wp_svg_icons_update_custom_nav_fields'), 10, 3 );
|
54 |
|
55 |
// action hook which handles the ajax request of deleting files
|
56 |
+
add_action('wp_ajax_svg_delete_custom_pack', array( &$this , 'svg_delete_custom_pack_ajax' ) );
|
57 |
+
|
58 |
+
// custom font pack found error
|
59 |
+
add_action('admin_notices', array( &$this , 'wp_svg_customPack_installed_error' ) );
|
60 |
+
|
61 |
+
// set the custom upload directory
|
62 |
+
add_action( 'admin_head', array( &$this , 'wp_svg_change_downloads_upload_dir' ) , 999 );
|
63 |
+
|
64 |
+
// check the users plugin installation date
|
65 |
+
add_action( 'admin_init', array( &$this , 'wp_svg_icons_check_installation_date' ) );
|
66 |
+
|
67 |
+
// dismissable notice admin side
|
68 |
+
add_action( 'admin_init', array( &$this , 'wp_svg_icons_stop_bugging_me' ), 5 );
|
69 |
}
|
70 |
|
71 |
/**
|
128 |
|
129 |
// enqueue our nav scripts/styles
|
130 |
$this->enqueue_custom_nav_scripts_on_nav_menu_page();
|
131 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
132 |
}
|
133 |
|
134 |
// ajax delete our .zip and entire directory for the custom pack!
|
344 |
}
|
345 |
}
|
346 |
|
347 |
+
/*
|
348 |
+
wp_svg_icons_stop_bugging_me()
|
349 |
+
Remove the Review us notification when user clicks 'Dismiss'
|
350 |
+
@since v3.1.1
|
351 |
+
*/
|
352 |
+
public function wp_svg_icons_stop_bugging_me() {
|
353 |
+
$nobug = "";
|
354 |
+
if ( isset( $_GET['wp_svg_icons_nobug'] ) ) {
|
355 |
+
$nobug = esc_attr( $_GET['wp_svg_icons_nobug'] );
|
356 |
+
}
|
357 |
+
if ( 1 == $nobug ) {
|
358 |
+
add_option( 'wp_svg_icons_review_stop_bugging_me', TRUE );
|
359 |
+
}
|
360 |
+
}
|
361 |
+
|
362 |
+
/*
|
363 |
+
wp_svg_icons_check_installation_date()
|
364 |
+
checks the user installation date, and adds our action
|
365 |
+
- if it's past 2 weeks we ask the user for a review :)
|
366 |
+
@since v3.1.1
|
367 |
+
*/
|
368 |
+
public function wp_svg_icons_check_installation_date() {
|
369 |
+
|
370 |
+
// add a new option to store the plugin activation date/time
|
371 |
+
// @since v3.1.1
|
372 |
+
// this is used to notify the user that they should review after 2 weeks
|
373 |
+
if ( !get_option( 'wp_svg_icons_activation_date' ) ) {
|
374 |
+
add_option( 'wp_svg_icons_activation_date', strtotime( "now" ) );
|
375 |
+
}
|
376 |
+
|
377 |
+
$stop_bugging_me = get_option( 'wp_svg_icons_review_stop_bugging_me' );
|
378 |
+
|
379 |
+
if( !$stop_bugging_me ) {
|
380 |
+
$install_date = get_option( 'wp_svg_icons_activation_date' );
|
381 |
+
$past_date = strtotime( '-14 days' );
|
382 |
+
if ( $past_date >= $install_date && current_user_can( 'install_plugins' ) ) {
|
383 |
+
add_action( 'admin_notices', array( &$this , 'wp_svg_icons_display_review_us_notice' ) );
|
384 |
+
}
|
385 |
+
}
|
386 |
+
|
387 |
+
}
|
388 |
+
|
389 |
+
/*
|
390 |
+
Display our admin notification
|
391 |
+
asking for a review, and for user feedback
|
392 |
+
@since v3.1.1
|
393 |
+
*/
|
394 |
+
public function wp_svg_icons_display_review_us_notice() {
|
395 |
+
/* Lets only display our admin notice on YT4WP pages to not annoy the hell out of people :) */
|
396 |
+
if ( in_array( get_current_screen()->base , array( 'dashboard' , 'toplevel_page_wp-svg-icons' , 'wp-svg-icons_page_wp-svg-icons-custom-set' , 'wp-svg-icons_page_wp_svg_icons' , 'wp-svg-icons_page_wp-svg-icons-upgrade' , 'post' ) ) ) {
|
397 |
+
// Review URL - Change to the URL of your plugin on WordPress.org
|
398 |
+
$reviewurl = 'https://wordpress.org/support/view/plugin-reviews/svg-vector-icon-plugin';
|
399 |
+
$go_pro_url = 'http://www.evan-herman.com/wordpress-plugin/wp-svg-icons/';
|
400 |
+
$http_https = isset($_SERVER['HTTPS']) ? 'https://' : 'http://';
|
401 |
+
$current_url = "$http_https$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
|
402 |
+
$nobugurl = add_query_arg( 'wp_svg_icons_nobug', '1', $current_url );
|
403 |
+
global $current_user;
|
404 |
+
get_currentuserinfo();
|
405 |
+
if ( '' != $current_user->user_firstname ) {
|
406 |
+
$review_message = '<p>' . sprintf( __( "Hey" , "wp-svg-icons" ) . " " . $current_user->user_firstname . __( ", You've been using" , "wp-svg-icons" ) . " <strong>WP SVG Icons</strong> " . __( "for 2 weeks now. We certainly hope you're enjoying the power and all the features packed into the free version. If so, leave us a review, we'd love to hear what you have to say. If you're really enjoying the plugin, consider upgrading to the pro version for some added features and premium support." , "wp-svg-icons" ) . "<br /><br /> <span class='button-container'> <a href='%s' target='_blank' class='button-secondary'>" . __( "Leave A Review" , "wp-svg-icons" ) . "</a> <a href='%s?utm_source=wps-svg-icons-2week-notice&utm_medium=button&utm_campaign=wp-svg-icons-2week-notice' target='_blank' class='button-secondary'>" . __( "Upgrade to Pro" , "wp-svg-icons" ) . "</a> <a href='%s' class='button-secondary'>" . __( "Dismiss" , "wp-svg-icons" ) . "</a> </span>", $reviewurl, $go_pro_url, $nobugurl ) . '</p>';
|
407 |
+
} else {
|
408 |
+
$review_message = '<p>' . sprintf( __( "Hey there, it looks like you've been using" , "wp-svg-icons" ) . " <strong>WP SVG Icons</strong> " . __( "for 2 weeks now. We certainly hope you're enjoying the power and all the features packed into the free version. If so, leave us a review, we'd love to hear what you have to say. If you're really enjoying the plugin, consider upgrading to the pro version for some added features and premium support." , "wp-svg-icons" ) . "<br /><br /> <span class='button-container'> <a href='%s' target='_blank' class='button-secondary'>" . __( "Leave A Review" , "wp-svg-icons" ) . "</a> <a href='%s?utm_source=wps-svg-icons-2week-notice&utm_medium=button&utm_campaign=wp-svg-icons-2week-notice' target='_blank' class='button-secondary'>" . __( "Upgrade to Pro" , "wp-svg-icons" ) . "</a> <a href='%s' class='button-secondary'>" . __( "Dismiss" , "wp-svg-icons" ) . "</a> </span>", $reviewurl, $go_pro_url, $nobugurl ) . '</p>';
|
409 |
+
}
|
410 |
+
?>
|
411 |
+
<style>#review-wp-svg-icons,#social-icons{display:none;}</style>
|
412 |
+
<div id="review-wp-svg-icons-notice">
|
413 |
+
<?php echo $review_message; ?>
|
414 |
+
</div>
|
415 |
+
<?php
|
416 |
+
}
|
417 |
+
}
|
418 |
+
|
419 |
|
420 |
|
421 |
} // end Class
|
admin/css/wp-svg-icons-admin.css
CHANGED
@@ -122,6 +122,24 @@
|
|
122 |
/* ...and now for the proper property */
|
123 |
transition:.5s;
|
124 |
}
|
125 |
-
|
126 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
127 |
}
|
122 |
/* ...and now for the proper property */
|
123 |
transition:.5s;
|
124 |
}
|
125 |
+
.wp-svg-happy:hover {
|
126 |
+
color: #FF8000;
|
127 |
+
}
|
128 |
+
|
129 |
+
#review-wp-svg-icons-notice {
|
130 |
+
display: block;
|
131 |
+
border-left: 4px solid #FF8000;
|
132 |
+
margin:5px 20px 2px 0px;
|
133 |
+
margin-top: 1.5em;
|
134 |
+
padding: 2px 10px;
|
135 |
+
background: #fff url( '../images/evan-herman-mascot.png' );
|
136 |
+
background-size: 120px;
|
137 |
+
background-position: right bottom;
|
138 |
+
background-repeat: no-repeat;
|
139 |
+
background-position-y: 29px;
|
140 |
+
}
|
141 |
+
|
142 |
+
#review-wp-svg-icons-notice .button-container {
|
143 |
+
display: block;
|
144 |
+
text-align: center;
|
145 |
}
|
admin/css/wp-svg-icons-admin.min.css
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
/** WP SVG Icons - Compiled by Evan Herman // http://www.Evan-Herman.com **/
|
2 |
-
.custom-pack-container-ajax{width:100%}.custom-pack-container-ajax [class*=" wp-svg-custom-"],.custom-pack-container-ajax [class^=wp-svg-custom-]{font-size:2.75em!important}.bgc1>.mhl,.glyph .fs0,.glyph fieldset,.mbl,.mhl>h1:first-child{display:none}.glyph span:first-child{display:block;width:100%;font-size:1.5em}.glyph span:last-child{line-height:.9;font-size:15px;display:none}.glyph{color:#333}.selected{color:#F80;background:#d8d8d8}.selected span:last-child{color:#666}.custom-pack-container-ajax .glyph{width:29px}.wp-svg-icon-preview .previewIcon{font-size:90px;display:block;margin:10px auto 0}.wp-svg-icons-wrap .custom-pack-container-ajax .glyph{padding:10px 7px 0!important}.bgc1>.mhl,.mbl,.wrap .current-font-pack .mhl>h1:first-child{display:none}.wrap .current-font-pack .glyph{background:0 0;margin:.25em .35em .25em 0;width:1.5em;padding:.35em;box-shadow:none;-o-transition:.15s;-ms-transition:.15s;-moz-transition:.15s;-webkit-transition:.15s;transition:.15s;font-size:1.75em}.wrap .current-font-pack .glyph:hover{cursor:pointer;color:#ff8000}.glyph .fs0,.wrap .current-font-pack .glyph fieldset{display:none}.wrap .current-font-pack .glyph span:first-child{display:block;width:100%;font-size:1.5em}.wrap .current-font-pack .glyph span:last-child{line-height:.9;font-size:15px;display:none}.wrap .current-font-pack .glyph{color:#333}.wrap .current-font-pack .selected{color:#F80;background:#d8d8d8}.wrap .current-font-pack .selected span:last-child{color:#666}.wrap .current-font-pack .wp-svg-icon-preview-box{margin-top:-6em}.wrap .current-font-pack .wp-svg-icon-preview{font-size:8em}.wrap .current-font-pack .wp-svg-icon-preview-box i{display:block;margin-top:-.5em;padding-top:5px}.wrap .current-font-pack .wp-svg-icon-preview div{margin-top:10px}.wp-svg-icons_page_wp-svg-icons-custom-set ::selection{background:#FF8000}.toplevel_page_wp-svg-icons .wp-menu-image img{margin-top:-3px}.dashicons-wp-svg-gift:before{content:"\e099"!important;font-size:18px}#advanced-shortcode-attr-list{display:none;margin:0 35px}#advanced-shortcode-attr-list li{width:46.5%;float:left}.shortcode-attr-right-column{float:right!important}.wp-svg-advanced-shortcode-attr-row strong{display:block;margin-bottom:.25em}.wp-svg-advanced-shortcode-attr-row .shortcode-attr-right-column .wp-picker-container{width:100%}.wp-svg-advanced-shortcode-attr-row{display:block;width:100%;float:left}.wp-svg-advanced-shortcode-attr-row:nth-child(2){margin-top:1em}#advanced-shortcode-attr-toggle{font-size:11px}#icon-size-input{max-width:75px;margin-top:1em;text-align:center}.wp-svg-happy{-o-transition:.15s;-ms-transition:.15s;-moz-transition:.15s;-webkit-transition:.15s;transition:.15s}.wp-svg-happy:hover{color:#FF8000}
|
1 |
/** WP SVG Icons - Compiled by Evan Herman // http://www.Evan-Herman.com **/
|
2 |
+
.custom-pack-container-ajax{width:100%}.custom-pack-container-ajax [class*=" wp-svg-custom-"],.custom-pack-container-ajax [class^=wp-svg-custom-]{font-size:2.75em!important}.bgc1>.mhl,.glyph .fs0,.glyph fieldset,.mbl,.mhl>h1:first-child{display:none}.glyph span:first-child{display:block;width:100%;font-size:1.5em}.glyph span:last-child{line-height:.9;font-size:15px;display:none}.glyph{color:#333}.selected{color:#F80;background:#d8d8d8}.selected span:last-child{color:#666}.custom-pack-container-ajax .glyph{width:29px}.wp-svg-icon-preview .previewIcon{font-size:90px;display:block;margin:10px auto 0}.wp-svg-icons-wrap .custom-pack-container-ajax .glyph{padding:10px 7px 0!important}.bgc1>.mhl,.mbl,.wrap .current-font-pack .mhl>h1:first-child{display:none}.wrap .current-font-pack .glyph{background:0 0;margin:.25em .35em .25em 0;width:1.5em;padding:.35em;box-shadow:none;-o-transition:.15s;-ms-transition:.15s;-moz-transition:.15s;-webkit-transition:.15s;transition:.15s;font-size:1.75em}.wrap .current-font-pack .glyph:hover{cursor:pointer;color:#ff8000}.glyph .fs0,.wrap .current-font-pack .glyph fieldset{display:none}.wrap .current-font-pack .glyph span:first-child{display:block;width:100%;font-size:1.5em}.wrap .current-font-pack .glyph span:last-child{line-height:.9;font-size:15px;display:none}.wrap .current-font-pack .glyph{color:#333}.wrap .current-font-pack .selected{color:#F80;background:#d8d8d8}.wrap .current-font-pack .selected span:last-child{color:#666}.wrap .current-font-pack .wp-svg-icon-preview-box{margin-top:-6em}.wrap .current-font-pack .wp-svg-icon-preview{font-size:8em}.wrap .current-font-pack .wp-svg-icon-preview-box i{display:block;margin-top:-.5em;padding-top:5px}.wrap .current-font-pack .wp-svg-icon-preview div{margin-top:10px}.wp-svg-icons_page_wp-svg-icons-custom-set ::selection{background:#FF8000}.toplevel_page_wp-svg-icons .wp-menu-image img{margin-top:-3px}.dashicons-wp-svg-gift:before{content:"\e099"!important;font-size:18px}#advanced-shortcode-attr-list{display:none;margin:0 35px}#advanced-shortcode-attr-list li{width:46.5%;float:left}.shortcode-attr-right-column{float:right!important}.wp-svg-advanced-shortcode-attr-row strong{display:block;margin-bottom:.25em}.wp-svg-advanced-shortcode-attr-row .shortcode-attr-right-column .wp-picker-container{width:100%}.wp-svg-advanced-shortcode-attr-row{display:block;width:100%;float:left}.wp-svg-advanced-shortcode-attr-row:nth-child(2){margin-top:1em}#advanced-shortcode-attr-toggle{font-size:11px}#icon-size-input{max-width:75px;margin-top:1em;text-align:center}.wp-svg-happy{-o-transition:.15s;-ms-transition:.15s;-moz-transition:.15s;-webkit-transition:.15s;transition:.15s}.wp-svg-happy:hover{color:#FF8000}#review-wp-svg-icons-notice{display:block;margin:5px 20px 2px 0px;border-left:4px solid #FF8000;margin-top:1.5em;padding:2px 10px;background:url(../images/evan-herman-mascot.png) right bottom no-repeat #fff;background-size:120px;background-position-y:29px}#review-wp-svg-icons-notice .button-container{display:block;text-align:center}
|
admin/js/wordpress-svg-icon-plugin-scripts.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
/*
|
1 |
+
/*
|
admin/partials/wp-svg-icons-default-icons-page.php
CHANGED
@@ -47,40 +47,7 @@ jQuery( document ).ready( function() {
|
|
47 |
<?php if( !file_exists( '../../../../../wp-load.php' ) ) { ?> <h4><?php _e( "These icons are scaleable vector graphics, meaning you can set them to whatever size you want with out any loss in quality." , "wp-svg-icons" ); ?> <span style="color:#FF8000;"><?php _e( "Enjoy!" , "wp-svg-icons" ); ?></span></h3> <?php } ?>
|
48 |
|
49 |
<div class="help-boxes" >
|
50 |
-
|
51 |
-
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/themes/smoothness/jquery-ui.css" />
|
52 |
-
<!-- initialize the slider -->
|
53 |
-
<script type="text/javascript">
|
54 |
-
jQuery( document ).ready( function() {
|
55 |
-
// Advanced Shortcode Attr.
|
56 |
-
var aFontsSizeArray = new Array('5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '24', '26', '28', '30', '33', '36', '39', '42', '45', '48', '55', '65', '75', '85', '95', '110', '130', '150');
|
57 |
-
|
58 |
-
jQuery('#icon-size-slider').slider({
|
59 |
-
value: 7,
|
60 |
-
min: 1,
|
61 |
-
max: 35,
|
62 |
-
step: 1,
|
63 |
-
slide: function( event, ui ) {
|
64 |
-
var sFontSizeArray = aFontsSizeArray[ui.value];
|
65 |
-
jQuery('#icon-size-input').val(sFontSizeArray + 'px');
|
66 |
-
build_the_icon_shortcode( jQuery( '#advanced-shortcode-attr-toggle' ) );
|
67 |
-
}
|
68 |
-
});
|
69 |
-
|
70 |
-
// initialize the color picker
|
71 |
-
jQuery('.wp-svg-icons-custom-color-picker').wpColorPicker({
|
72 |
-
change: function( event, ui ){
|
73 |
-
// delay the update or the shortcode uses
|
74 |
-
// the previous color
|
75 |
-
setTimeout(function() {
|
76 |
-
build_the_icon_shortcode( jQuery( '#advanced-shortcode-attr-toggle' ) );
|
77 |
-
}, 50);
|
78 |
-
}
|
79 |
-
});
|
80 |
-
|
81 |
-
});
|
82 |
-
</script>
|
83 |
-
|
84 |
<div class="how-to-use">
|
85 |
|
86 |
<section class="wp-svg-how-to-use-container">
|
@@ -117,48 +84,6 @@ jQuery( document ).ready( function() {
|
|
117 |
|
118 |
<section style="float:left;width:100%;">
|
119 |
|
120 |
-
<ul id="advanced-shortcode-attr-list">
|
121 |
-
<section class="wp-svg-advanced-shortcode-attr-row">
|
122 |
-
<!-- Icon Size Attr -->
|
123 |
-
<li>
|
124 |
-
<strong><?php _e( "Icon Size" , "wp-svg-icons" ); ?></strong>
|
125 |
-
<label for="icon-size-slider">
|
126 |
-
<div id="icon-size-slider"></div>
|
127 |
-
<input type="text" id="icon-size-input" value="12px">
|
128 |
-
<?php _e( "Icon Size" , "wp-svg-icons" ); ?>
|
129 |
-
</label>
|
130 |
-
</li>
|
131 |
-
<!-- Class Names Attr -->
|
132 |
-
<li class="shortcode-attr-right-column">
|
133 |
-
<strong><?php _e( "Class Names" , "wp-svg-icons" ); ?></strong>
|
134 |
-
<label for="icon-class-name">
|
135 |
-
<input type="text" id="icon-class-names-input" class="widefat" value="">
|
136 |
-
<span class="description"><?php _e( "add additional class names above." , "wp-svg-icons" ); ?></span>
|
137 |
-
</label>
|
138 |
-
</li>
|
139 |
-
</section>
|
140 |
-
|
141 |
-
<section class="wp-svg-advanced-shortcode-attr-row" style="margin-bottom:1em;">
|
142 |
-
<!-- Icon Link Attr -->
|
143 |
-
<li>
|
144 |
-
<strong><?php _e( "Icon Link" , "wp-svg-icons" ); ?></strong>
|
145 |
-
<label for="icon-link">
|
146 |
-
<input type="text" id="icon-link" class="widefat" placeholder="http://">
|
147 |
-
<span class="description"><?php _e( "open link in new tab" , "wp-svg-icons" ); ?></span>
|
148 |
-
</label>
|
149 |
-
<input type="checkbox" id="open-icon-link-in-new-tab" value="1" style="margin-top:2px;">
|
150 |
-
</li>
|
151 |
-
<!-- Custom Icon Color Attr -->
|
152 |
-
<li class="shortcode-attr-right-column">
|
153 |
-
<strong><?php _e( "Icon Color" , "wp-svg-icons" ); ?></strong>
|
154 |
-
<label for="icon-color">
|
155 |
-
<input type="text" value="#4C4C4C" class="wp-svg-icons-custom-color-picker" data-default-color="#bada55" />
|
156 |
-
<span class="description"><?php _e( "select a custom icon color." , "wp-svg-icons" ); ?></span>
|
157 |
-
</label>
|
158 |
-
</li>
|
159 |
-
</section>
|
160 |
-
</ul>
|
161 |
-
|
162 |
<!-- insert the code into a post or page -->
|
163 |
<a href="#" onclick="insert_wp_SVG_icon_to_editor();" class="button-primary insert-wp-svg-icon" style="display: none;"><?php _e( 'Insert Icon' , 'wp-svg-icons' ); ?></a>
|
164 |
|
47 |
<?php if( !file_exists( '../../../../../wp-load.php' ) ) { ?> <h4><?php _e( "These icons are scaleable vector graphics, meaning you can set them to whatever size you want with out any loss in quality." , "wp-svg-icons" ); ?> <span style="color:#FF8000;"><?php _e( "Enjoy!" , "wp-svg-icons" ); ?></span></h3> <?php } ?>
|
48 |
|
49 |
<div class="help-boxes" >
|
50 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
<div class="how-to-use">
|
52 |
|
53 |
<section class="wp-svg-how-to-use-container">
|
84 |
|
85 |
<section style="float:left;width:100%;">
|
86 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
87 |
<!-- insert the code into a post or page -->
|
88 |
<a href="#" onclick="insert_wp_SVG_icon_to_editor();" class="button-primary insert-wp-svg-icon" style="display: none;"><?php _e( 'Insert Icon' , 'wp-svg-icons' ); ?></a>
|
89 |
|
admin/partials/wp-svg-icons-icon-page.php
CHANGED
@@ -81,6 +81,7 @@
|
|
81 |
|
82 |
register_setting( 'wp_svg_icons_settings_page', 'wp_svg_icons_enqueue_defualt_icon_pack' );
|
83 |
register_setting( 'wp_svg_icons_settings_page', 'wp_svg_icons_defualt_icon_container' );
|
|
|
84 |
|
85 |
/* Register settings section */
|
86 |
add_settings_section(
|
@@ -107,6 +108,15 @@
|
|
107 |
'wp_svg_icons_settings_page',
|
108 |
'wp_svg_icons_plugin_section'
|
109 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
110 |
|
111 |
}
|
112 |
add_action( 'admin_init', 'wp_svg_icons_settings_init' );
|
@@ -149,6 +159,24 @@
|
|
149 |
<?php
|
150 |
|
151 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
152 |
|
153 |
// description of the settings page
|
154 |
function wp_svg_icons_settings_section_callback( ) {
|
81 |
|
82 |
register_setting( 'wp_svg_icons_settings_page', 'wp_svg_icons_enqueue_defualt_icon_pack' );
|
83 |
register_setting( 'wp_svg_icons_settings_page', 'wp_svg_icons_defualt_icon_container' );
|
84 |
+
register_setting( 'wp_svg_icons_settings_page', 'wp_svg_icons_clear_all_data_on_uninstall' );
|
85 |
|
86 |
/* Register settings section */
|
87 |
add_settings_section(
|
108 |
'wp_svg_icons_settings_page',
|
109 |
'wp_svg_icons_plugin_section'
|
110 |
);
|
111 |
+
|
112 |
+
/* Delete Custom Icon Pack On Uninstall Setting */
|
113 |
+
add_settings_field(
|
114 |
+
'wp_svg_icons_clear_all_data_on_uninstall',
|
115 |
+
__( 'Clear Data on Uninstall', 'wp-svg-icons' ),
|
116 |
+
'wp_svg_icons_clear_all_data_on_uninstall_callback',
|
117 |
+
'wp_svg_icons_settings_page',
|
118 |
+
'wp_svg_icons_plugin_section'
|
119 |
+
);
|
120 |
|
121 |
}
|
122 |
add_action( 'admin_init', 'wp_svg_icons_settings_init' );
|
159 |
<?php
|
160 |
|
161 |
}
|
162 |
+
|
163 |
+
// Clear all data on plugin uninstall - checkbox - callback
|
164 |
+
function wp_svg_icons_clear_all_data_on_uninstall_callback( ) {
|
165 |
+
|
166 |
+
$clear_all_data_on_uninstall = get_option( 'wp_svg_icons_clear_all_data_on_uninstall' , '1' );
|
167 |
+
|
168 |
+
if( $clear_all_data_on_uninstall == '1' ) {
|
169 |
+
$selected = 'checked="checked"';
|
170 |
+
$delete_data_message = __( 'your custom pack and all associated and enqueued files will be deleted on uninstall.' , 'wp-svg-icons' );
|
171 |
+
} else {
|
172 |
+
$selected = '';
|
173 |
+
$delete_data_message = __( 'your custom pack and all associated and enqueued files will ' , 'wp-svg-icons' ) . '<strong>' . __( 'not' , 'wp-svg-icons' ) . '</strong> ' . __( 'be deleted on uninstall.' , 'wp-svg-icons' );
|
174 |
+
}
|
175 |
+
?>
|
176 |
+
<input type='checkbox' name='wp_svg_icons_clear_all_data_on_uninstall' <?php echo $selected; ?> value='1'><span style="font-size:small"><?php echo $delete_data_message; ?></span>
|
177 |
+
<?php
|
178 |
+
|
179 |
+
}
|
180 |
|
181 |
// description of the settings page
|
182 |
function wp_svg_icons_settings_section_callback( ) {
|
includes/class-wp-svg-icons-uninstall.php
ADDED
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Fired during plugin uninstall.
|
4 |
+
*
|
5 |
+
* This class defines all code necessary to run during the plugin's uninstall.
|
6 |
+
*
|
7 |
+
* @since 3.1.1
|
8 |
+
* @package svg-vector-icon-plugin
|
9 |
+
* @subpackage svg-vector-icon-plugin/includes
|
10 |
+
* @author Evan Herman <Evan.M.Herman@gmail.com>
|
11 |
+
* @link http://www.evan-herman.com/wordpress-plugin/wp-svg-icons/
|
12 |
+
*/
|
13 |
+
|
14 |
+
class WP_SVG_Icons_Uninstall {
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Clean up our plugin options so we leave no orphan settings
|
18 |
+
* in the users database. No one likes useless data floating around.
|
19 |
+
*
|
20 |
+
* @since 3.1.1
|
21 |
+
*/
|
22 |
+
public static function uninstall() {
|
23 |
+
|
24 |
+
$clear_all_data_on_uninstall = get_option( 'wp_svg_icons_clear_all_data_on_uninstall' , '1' );
|
25 |
+
|
26 |
+
// Step #1
|
27 |
+
// clean up our plugin settings
|
28 |
+
delete_options( 'wp_svg_icons_enqueue_defualt_icon_pack' );
|
29 |
+
delete_options( 'wp_svg_icons_defualt_icon_container' );
|
30 |
+
delete_options( 'wp_svg_icons_clear_all_data_on_uninstall' );
|
31 |
+
delete_options( 'wp_svg_icons_review_stop_bugging_me' );
|
32 |
+
delete_options( 'wp_svg_icons_activation_date' );
|
33 |
+
|
34 |
+
// Step #2
|
35 |
+
// check if the user wants to remove the custom icon pack installed
|
36 |
+
// and do so, if set
|
37 |
+
if ( $clear_all_data_on_uninstall == '1' ) {
|
38 |
+
$dest = wp_upload_dir();
|
39 |
+
$dest_path = $dest['path'];
|
40 |
+
$split_path = explode( 'uploads/' , $dest_path );
|
41 |
+
$custom_pack_dir = $split_path[0] . 'uploads/wp-svg-icons/';
|
42 |
+
if ( is_dir( $custom_pack_dir ) ) {
|
43 |
+
WP_SVG_Icons_Uninstall::wp_svg_icons_delete_entire_directory( $custom_pack_dir );
|
44 |
+
}
|
45 |
+
}
|
46 |
+
|
47 |
+
}
|
48 |
+
|
49 |
+
// recursive delete directory
|
50 |
+
public function wp_svg_icons_delete_entire_directory( $dir ) {
|
51 |
+
if ( is_dir( $dir ) ) {
|
52 |
+
$objects = scandir( $dir );
|
53 |
+
foreach ($objects as $object ) {
|
54 |
+
if ( $object != "." && $object != ".." ) {
|
55 |
+
if ( filetype( $dir."/".$object) == "dir" ) WP_SVG_Icons_Uninstall::wp_svg_icons_delete_entire_directory( $dir."/".$object); else unlink( $dir."/".$object );
|
56 |
+
}
|
57 |
+
}
|
58 |
+
reset( $objects );
|
59 |
+
rmdir( $dir );
|
60 |
+
}
|
61 |
+
}
|
62 |
+
|
63 |
+
}
|
readme.txt
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
=== WP SVG Icons ===
|
2 |
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, 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
|
5 |
Requires at least: 3.5
|
6 |
Tested up to: 4.1.1
|
7 |
-
Stable tag: 3.1
|
8 |
License: GPLv3 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
@@ -127,6 +127,13 @@ If you buy the pro version you will also receive support and updates for one yea
|
|
127 |
|
128 |
== Changelog ==
|
129 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
130 |
= 3.1 - March 3rd, 2015 =
|
131 |
* Fix link styles overriding WordPress defaults
|
132 |
* Minified default icon styles, added appropriate element classes and enqueued across dashboard
|
@@ -189,6 +196,12 @@ If you buy the pro version you will also receive support and updates for one yea
|
|
189 |
|
190 |
== Upgrade Notice ==
|
191 |
|
|
|
|
|
|
|
|
|
|
|
|
|
192 |
= 3.1 - March 3rd, 2015 =
|
193 |
* Fix link styles overriding WordPress defaults
|
194 |
* Minified default icon styles, added appropriate element classes and enqueued across dashboard
|
1 |
=== WP SVG Icons ===
|
2 |
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, 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.1.1
|
7 |
+
Stable tag: 3.1.1
|
8 |
License: GPLv3 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
127 |
|
128 |
== Changelog ==
|
129 |
|
130 |
+
= 3.1.1 - March 5th, 2015 =
|
131 |
+
* Fixed bug where clicking custom icon didn't load it into the preview container
|
132 |
+
* Added new setting to delete custom icon pack on plugin uninstall
|
133 |
+
* Re-wrote uninstall function to remove all plugin created options
|
134 |
+
* Added 2 week upgrade/review notification
|
135 |
+
* Minor style enhancements and bug fixes
|
136 |
+
|
137 |
= 3.1 - March 3rd, 2015 =
|
138 |
* Fix link styles overriding WordPress defaults
|
139 |
* Minified default icon styles, added appropriate element classes and enqueued across dashboard
|
196 |
|
197 |
== Upgrade Notice ==
|
198 |
|
199 |
+
= 3.1.1 - March 5th, 2015 =
|
200 |
+
* Fixed bug where clicking custom icon didn't load it into the preview container
|
201 |
+
* Added new setting to delete custom icon pack on plugin uninstall
|
202 |
+
* Re-wrote uninstall function to remove all plugin created options
|
203 |
+
* Added 2 week upgrade/review notification
|
204 |
+
|
205 |
= 3.1 - March 3rd, 2015 =
|
206 |
* Fix link styles overriding WordPress defaults
|
207 |
* Minified default icon styles, added appropriate element classes and enqueued across dashboard
|
uninstall.php
DELETED
@@ -1,18 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Fired when the plugin is uninstalled.
|
4 |
-
*
|
5 |
-
* @link http://www.evan-herman.com/wordpress-plugin/wp-svg-icons/
|
6 |
-
* @since 3.0.0
|
7 |
-
*
|
8 |
-
* @package WP_SVG_Icons
|
9 |
-
*/
|
10 |
-
|
11 |
-
// If uninstall not called from WordPress, then exit.
|
12 |
-
if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
|
13 |
-
|
14 |
-
delete_option( 'wp_svg_icons_license_status' );
|
15 |
-
delete_option( 'wp_svg_icons_license_key' );
|
16 |
-
|
17 |
-
exit;
|
18 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|
12 |
* Author: EH Dev Shop
|
13 |
* Author URI: http://evan-herman.com
|
14 |
* License: GPL-3.0+
|
@@ -40,8 +40,18 @@ function deactivate_wp_svg_icons() {
|
|
40 |
WP_SVG_Icons_Deactivator::deactivate();
|
41 |
}
|
42 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
register_activation_hook( __FILE__, 'activate_wp_svg_icons' );
|
44 |
register_deactivation_hook( __FILE__, 'deactivate_wp_svg_icons' );
|
|
|
45 |
|
46 |
/**
|
47 |
* The core plugin class that is used to define internationalization,
|
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.1
|
12 |
* Author: EH Dev Shop
|
13 |
* Author URI: http://evan-herman.com
|
14 |
* License: GPL-3.0+
|
40 |
WP_SVG_Icons_Deactivator::deactivate();
|
41 |
}
|
42 |
|
43 |
+
/**
|
44 |
+
* The code that runs during plugin uninstall.
|
45 |
+
* This action is documented in includes/class-wp-svg-icons-uninstall.php
|
46 |
+
*/
|
47 |
+
function uninstall_wp_svg_icons() {
|
48 |
+
require_once plugin_dir_path( __FILE__ ) . 'includes/class-wp-svg-icons-uninstall.php';
|
49 |
+
WP_SVG_Icons_Uninstall::uninstall();
|
50 |
+
}
|
51 |
+
|
52 |
register_activation_hook( __FILE__, 'activate_wp_svg_icons' );
|
53 |
register_deactivation_hook( __FILE__, 'deactivate_wp_svg_icons' );
|
54 |
+
register_uninstall_hook( __FILE__ , 'uninstall_wp_svg_icons' );
|
55 |
|
56 |
/**
|
57 |
* The core plugin class that is used to define internationalization,
|