PluginProbe
LoftLoader / 2.4.0
LoftLoader v2.4.0
trunk 1.0.0 1.0.1 1.0.2 2.0.0 2.1.0 2.1.1 2.1.10 2.1.11 2.1.12 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 2.2.0 2.2.1 2.2.2 2.3 2.3.1 2.3.2 2.3.3 All 34 releases
← All changes | loftloader.php +48 -2 2.32.4.0 View file →
@@ -2,9 +2,11 @@
2 2 /*
3 3 Plugin Name: LoftLoader
4 4 Plugin URI: http://www.loftocean.com/
5 5 Description: An easy to use plugin to add an animated preloader to your website with fully customisations.
6 -Version: 2.3
6 +Version: 2.4.0
7 +Requires PHP: 5.6
8 +Requires at least: 5.0
7 9 Author: Loft.Ocean
8 10 Author URI: http://www.loftocean.com/
9 11 Text Domain: loftloader
10 12 License: GPLv2
@@ -31,9 +33,9 @@
31 33 */
32 34 define( 'LOFTLOADER_ROOT', dirname( __FILE__ ) . '/' );
33 35 define( 'LOFTLOADER_NAME', plugin_basename( __FILE__ ) );
34 36 define( 'LOFTLOADER_URI', plugin_dir_url( __FILE__ ) );
35 - define( 'LOFTLOADER_ASSET_VERSION', '2020072001' );
37 + define( 'LOFTLOADER_ASSET_VERSION', '2022112601' );
36 38
37 39 class LoftLoader {
38 40 public function __construct() {
39 41 load_plugin_textdomain( 'loftloader' );
@@ -138,4 +140,48 @@
138 140 global $wp_customize;
139 141 return ( isset($_GET['plugin'] ) && ( $_GET['plugin'] === 'loftloader-lite') ) || ( isset( $wp_customize ) && $wp_customize->is_preview() && ! is_admin() ) || defined( 'DOING_AJAX' );
140 142 }
141 143 }
144 +
145 +/**
146 + * Deletes saved data for the plugin unless setting to preserve
147 + * settings is enabled
148 + *
149 + * @since 2.0 custom tables, custom images, and image directory deleted
150 + * @since 1.0
151 + */
152 +function loftloader_plugin_uninstall() {
153 + if ( ! current_user_can( 'activate_plugins' ) ) {
154 + return;
155 + }
156 +
157 + if ( 'on' != get_option( 'loftloader_remove_settings', '' ) ) {
158 + return;
159 + }
160 +
161 + global $wpdb;
162 + $table_name = esc_sql( $wpdb->prefix . "postmeta" );
163 + $result = $wpdb->query("
164 + DELETE
165 + FROM $table_name
166 + WHERE meta_key = 'loftloader_page_shortcode';"
167 + );
168 +
169 + delete_option( 'loftloader_lite_version' );
170 + delete_option( 'loftloader_main_switch' );
171 + delete_option( 'loftloader_show_range' );
172 + delete_option( 'loftloader_bg_color' );
173 + delete_option( 'loftloader_bg_opacity' );
174 + delete_option( 'loftloader_bg_animation' );
175 + delete_option( 'loftloader_loader_type' );
176 + delete_option( 'loftloader_loader_color' );
177 + delete_option( 'loftloader_custom_img' );
178 + delete_option( 'loftloader_img_width' );
179 + delete_option( 'loftloader_show_close_timer' );
180 + delete_option( 'loftloader_show_close_tip' );
181 + delete_option( 'loftloader_max_load_time' );
182 + delete_option( 'loftloader_inline_js' );
183 + delete_option( 'loftloader_enable_any_page' );
184 + delete_option( 'loftloader_remove_settings' );
185 +}
186 +
187 +register_deactivation_hook( __FILE__, 'loftloader_plugin_uninstall' );