LoftLoader - Version 2.3.8

Version Description

  • New: Option to remove plugin data after deactivating the plugin
  • Improved: Compatibility with WordPress 5.9
Download this release

Release Info

Developer loftocean
Plugin Icon 128x128 LoftLoader
Version 2.3.8
Comparing to
See all releases

Code changes from version 2.3.7 to 2.3.8

assets/css/loftloader-settings.css CHANGED
@@ -6,7 +6,7 @@
6
  * Author: The Loft.Ocean Team
7
  * Author URI: https://www.loftocean.com
8
  * Description: LoftLoader (Lite Version) is a plugin for adding beautiful and smooth preload animation to your WordPress website. With setting options, you can choose from preset animations, add custom logo image, choose colours to match your branding, and amuse and impress your visitors while loading site content.
9
- * Version: 2.3.7
10
  */
11
  @import url(https://fonts.googleapis.com/css?family=Lato:400,600);
12
  #customize-theme-controls.loftloader-controls-wrapper {
6
  * Author: The Loft.Ocean Team
7
  * Author URI: https://www.loftocean.com
8
  * Description: LoftLoader (Lite Version) is a plugin for adding beautiful and smooth preload animation to your WordPress website. With setting options, you can choose from preset animations, add custom logo image, choose colours to match your branding, and amuse and impress your visitors while loading site content.
9
+ * Version: 2.3.8
10
  */
11
  @import url(https://fonts.googleapis.com/css?family=Lato:400,600);
12
  #customize-theme-controls.loftloader-controls-wrapper {
assets/css/loftloader.css CHANGED
@@ -6,7 +6,7 @@
6
  * Author: The Loft.Ocean Team
7
  * Author URI: https://www.loftocean.com
8
  * Description: LoftLoader (Lite Version) is a plugin for adding beautiful and smooth preload animation to your WordPress website. With setting options, you can choose from preset animations, add custom logo image, choose colours to match your branding, and amuse and impress your visitors while loading site content.
9
- * Version: 2.3.7
10
  */
11
  @-webkit-keyframes spinReturn {
12
  0% {
6
  * Author: The Loft.Ocean Team
7
  * Author URI: https://www.loftocean.com
8
  * Description: LoftLoader (Lite Version) is a plugin for adding beautiful and smooth preload animation to your WordPress website. With setting options, you can choose from preset animations, add custom logo image, choose colours to match your branding, and amuse and impress your visitors while loading site content.
9
+ * Version: 2.3.8
10
  */
11
  @-webkit-keyframes spinReturn {
12
  0% {
assets/scss/loftloader.scss CHANGED
@@ -6,7 +6,7 @@
6
  * Author: The Loft.Ocean Team
7
  * Author URI: https://www.loftocean.com
8
  * Description: LoftLoader (Lite Version) is a plugin for adding beautiful and smooth preload animation to your WordPress website. With setting options, you can choose from preset animations, add custom logo image, choose colours to match your branding, and amuse and impress your visitors while loading site content.
9
- * Version: 2.3.7
10
  */
11
 
12
  $primary-color: #248acc;
6
  * Author: The Loft.Ocean Team
7
  * Author URI: https://www.loftocean.com
8
  * Description: LoftLoader (Lite Version) is a plugin for adding beautiful and smooth preload animation to your WordPress website. With setting options, you can choose from preset animations, add custom logo image, choose colours to match your branding, and amuse and impress your visitors while loading site content.
9
+ * Version: 2.3.8
10
  */
11
 
12
  $primary-color: #248acc;
inc/class-loftloader-customize.php CHANGED
@@ -183,13 +183,14 @@ if ( class_exists( 'WP_Customize_Setting' ) ) {
183
  <label> <?php
184
  if ( ! empty( $this->label ) ) : ?>
185
  <span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span> <?php
186
- endif;
187
- if ( ! empty( $this->description ) ) : ?>
188
- <span class="description customize-control-description"><?php echo wp_kses_post( $this->description ); ?></span> <?php
189
  endif; ?>
190
  <input class="loftlader-checkbox" type="checkbox" value="on" name="<?php echo esc_attr( $this->id ); ?>" <?php checked( 'on', $this->value() ); ?> />
191
  <input style="display:none;" type="checkbox" value="on" <?php $this->link(); ?> <?php checked( 'on', $this->value() ); ?> />
192
- </label> <?php break;
 
 
 
 
193
  default:
194
  parent::render_content();
195
  if ( ! empty( $this->text ) ) {
183
  <label> <?php
184
  if ( ! empty( $this->label ) ) : ?>
185
  <span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span> <?php
 
 
 
186
  endif; ?>
187
  <input class="loftlader-checkbox" type="checkbox" value="on" name="<?php echo esc_attr( $this->id ); ?>" <?php checked( 'on', $this->value() ); ?> />
188
  <input style="display:none;" type="checkbox" value="on" <?php $this->link(); ?> <?php checked( 'on', $this->value() ); ?> />
189
+ </label> <?php
190
+ if ( ! empty( $this->description ) ) : ?>
191
+ <span class="description customize-control-description"><?php echo wp_kses_post( $this->description ); ?></span> <?php
192
+ endif;
193
+ break;
194
  default:
195
  parent::render_content();
196
  if ( ! empty( $this->text ) ) {
inc/class-loftloader-upgrade.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  if ( ! class_exists( 'LoftLoader_Upgrade' ) ) {
3
  class LoftLoader_Upgrade {
4
- private $version ='2.1.9';
5
  function __construct(){
6
  $old_version = get_option('loftloader_lite_version', '1.0');
7
  if(version_compare($old_version, $this->version, '<')){
1
  <?php
2
  if ( ! class_exists( 'LoftLoader_Upgrade' ) ) {
3
  class LoftLoader_Upgrade {
4
+ private $version ='2.3.8';
5
  function __construct(){
6
  $old_version = get_option('loftloader_lite_version', '1.0');
7
  if(version_compare($old_version, $this->version, '<')){
inc/configs/customize-more.php CHANGED
@@ -21,6 +21,10 @@ function loftloader_customize_more( $wp_customize ) {
21
  'title' => esc_html__( 'Close Button', 'loftloader' ),
22
  'panel' => 'loftloader_panel_more'
23
  ) ) );
 
 
 
 
24
 
25
  $wp_customize->add_setting( new WP_Customize_Setting( $wp_customize, 'loftloader_max_load_time', array(
26
  'default' => $loftloader_default_settings['loftloader_max_load_time'],
@@ -41,6 +45,13 @@ function loftloader_customize_more( $wp_customize ) {
41
  'sanitize_callback' => 'sanitize_text_field'
42
  ) ) );
43
 
 
 
 
 
 
 
 
44
  $wp_customize->add_control( new LoftLoader_Customize_Control( $wp_customize, 'loftloader_max_load_time', array(
45
  'type' => 'number',
46
  'label' => esc_html__( 'Maximum Load Time', 'loftloader' ),
@@ -70,4 +81,13 @@ function loftloader_customize_more( $wp_customize ) {
70
  'section' => 'loftloader_section_close_button',
71
  'settings' => 'loftloader_show_close_tip'
72
  ) ) );
 
 
 
 
 
 
 
 
 
73
  }
21
  'title' => esc_html__( 'Close Button', 'loftloader' ),
22
  'panel' => 'loftloader_panel_more'
23
  ) ) );
24
+ $wp_customize->add_section( new LoftLoader_Customize_Section( $wp_customize, 'loftloader_section_remove_settings', array(
25
+ 'title' => esc_html__( 'Plugin Data', 'loftloader' ),
26
+ 'panel' => 'loftloader_panel_more'
27
+ ) ) );
28
 
29
  $wp_customize->add_setting( new WP_Customize_Setting( $wp_customize, 'loftloader_max_load_time', array(
30
  'default' => $loftloader_default_settings['loftloader_max_load_time'],
45
  'sanitize_callback' => 'sanitize_text_field'
46
  ) ) );
47
 
48
+ $wp_customize->add_setting( new WP_Customize_Setting( $wp_customize, 'loftloader_remove_settings', array(
49
+ 'default' => $loftloader_default_settings['loftloader_remove_settings'],
50
+ 'transport' => 'postMessage',
51
+ 'type' => 'option',
52
+ 'sanitize_callback' => 'loftloader_sanitize_checkbox'
53
+ ) ) );
54
+
55
  $wp_customize->add_control( new LoftLoader_Customize_Control( $wp_customize, 'loftloader_max_load_time', array(
56
  'type' => 'number',
57
  'label' => esc_html__( 'Maximum Load Time', 'loftloader' ),
81
  'section' => 'loftloader_section_close_button',
82
  'settings' => 'loftloader_show_close_tip'
83
  ) ) );
84
+
85
+ $wp_customize->add_control( new LoftLoader_Customize_Control( $wp_customize, 'loftloader_remove_settings', array(
86
+ 'type' => 'check',
87
+ 'label' => esc_html__( 'Remove Plugin Data after Deactivating Plugin', 'loftloader' ),
88
+ 'description' => esc_html__( 'If checked, all settings will be removed after deactivating this plugin.', 'loftocean' ),
89
+ 'choices' => array( 'on' => '' ),
90
+ 'section' => 'loftloader_section_remove_settings',
91
+ 'settings' => 'loftloader_remove_settings'
92
+ ) ) );
93
  }
inc/configs/default-settings.php CHANGED
@@ -26,5 +26,7 @@ $loftloader_default_settings = array(
26
  'loftloader_max_load_time' => 0,
27
 
28
  'loftloader_inline_js' => '',
29
- 'loftloader_enable_any_page' => ''
 
 
30
  );
26
  'loftloader_max_load_time' => 0,
27
 
28
  'loftloader_inline_js' => '',
29
+ 'loftloader_enable_any_page' => '',
30
+
31
+ 'loftloader_remove_settings' => ''
32
  );
languages/loftloader.pot CHANGED
@@ -1,15 +1,15 @@
1
- # Copyright (C) 2020 Loft.Ocean
2
  # This file is distributed under the same license as the LoftLoader plugin.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: LoftLoader 2.3.4\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/loftloader\n"
7
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
  "Language-Team: LANGUAGE <LL@li.org>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "POT-Creation-Date: 2020-11-20T00:48:33+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.4.0\n"
15
  "X-Domain: loftloader\n"
@@ -58,14 +58,18 @@ msgstr ""
58
  msgid "Generate"
59
  msgstr ""
60
 
61
- #: inc/class-loftloader-customize.php:267
62
  msgid "More info"
63
  msgstr ""
64
 
65
- #: inc/class-loftloader-front.php:220
66
  msgid "Close"
67
  msgstr ""
68
 
 
 
 
 
69
  #: inc/configs/customize-advanced.php:31
70
  msgid "Advanced"
71
  msgstr ""
@@ -185,7 +189,7 @@ msgid "More"
185
  msgstr ""
186
 
187
  #: inc/configs/customize-more.php:17
188
- #: inc/configs/customize-more.php:46
189
  msgid "Maximum Load Time"
190
  msgstr ""
191
 
@@ -193,22 +197,30 @@ msgstr ""
193
  msgid "Close Button"
194
  msgstr ""
195
 
196
- #: inc/configs/customize-more.php:47
 
 
 
 
197
  msgid "Please enter any number greater than 0 to enable this feature."
198
  msgstr ""
199
 
200
- #: inc/configs/customize-more.php:50
201
  msgid " second(s)"
202
  msgstr ""
203
 
204
- #: inc/configs/customize-more.php:55
205
  msgid "Show Close Button after"
206
  msgstr ""
207
 
208
- #: inc/configs/customize-more.php:69
209
  msgid "Description for Close Button"
210
  msgstr ""
211
 
 
 
 
 
212
  #: inc/configs/customize-promo.php:17
213
  msgid "Upgrade to Pro"
214
  msgstr ""
1
+ # Copyright (C) 2022 Loft.Ocean
2
  # This file is distributed under the same license as the LoftLoader plugin.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: LoftLoader 2.3.8\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/loftloader\n"
7
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
  "Language-Team: LANGUAGE <LL@li.org>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "POT-Creation-Date: 2022-02-25T08:37:02+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.4.0\n"
15
  "X-Domain: loftloader\n"
58
  msgid "Generate"
59
  msgstr ""
60
 
61
+ #: inc/class-loftloader-customize.php:268
62
  msgid "More info"
63
  msgstr ""
64
 
65
+ #: inc/class-loftloader-front.php:217
66
  msgid "Close"
67
  msgstr ""
68
 
69
+ #: inc/class-loftloader-front.php:359
70
+ msgid "loader image"
71
+ msgstr ""
72
+
73
  #: inc/configs/customize-advanced.php:31
74
  msgid "Advanced"
75
  msgstr ""
189
  msgstr ""
190
 
191
  #: inc/configs/customize-more.php:17
192
+ #: inc/configs/customize-more.php:57
193
  msgid "Maximum Load Time"
194
  msgstr ""
195
 
197
  msgid "Close Button"
198
  msgstr ""
199
 
200
+ #: inc/configs/customize-more.php:25
201
+ msgid "Plugin Data"
202
+ msgstr ""
203
+
204
+ #: inc/configs/customize-more.php:58
205
  msgid "Please enter any number greater than 0 to enable this feature."
206
  msgstr ""
207
 
208
+ #: inc/configs/customize-more.php:61
209
  msgid " second(s)"
210
  msgstr ""
211
 
212
+ #: inc/configs/customize-more.php:66
213
  msgid "Show Close Button after"
214
  msgstr ""
215
 
216
+ #: inc/configs/customize-more.php:80
217
  msgid "Description for Close Button"
218
  msgstr ""
219
 
220
+ #: inc/configs/customize-more.php:87
221
+ msgid "Remove Plugin Data after Deactivating Plugin"
222
+ msgstr ""
223
+
224
  #: inc/configs/customize-promo.php:17
225
  msgid "Upgrade to Pro"
226
  msgstr ""
loftloader.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: LoftLoader
4
  Plugin URI: http://www.loftocean.com/
5
  Description: An easy to use plugin to add an animated preloader to your website with fully customisations.
6
- Version: 2.3.7
7
  Author: Loft.Ocean
8
  Author URI: http://www.loftocean.com/
9
  Text Domain: loftloader
@@ -32,7 +32,7 @@ if ( ! class_exists( 'LoftLoader' ) ) {
32
  define( 'LOFTLOADER_ROOT', dirname( __FILE__ ) . '/' );
33
  define( 'LOFTLOADER_NAME', plugin_basename( __FILE__ ) );
34
  define( 'LOFTLOADER_URI', plugin_dir_url( __FILE__ ) );
35
- define( 'LOFTLOADER_ASSET_VERSION', '2021102001' );
36
 
37
  class LoftLoader {
38
  public function __construct() {
@@ -139,3 +139,47 @@ if ( ! class_exists( 'LoftLoader' ) ) {
139
  return ( isset($_GET['plugin'] ) && ( $_GET['plugin'] === 'loftloader-lite') ) || ( isset( $wp_customize ) && $wp_customize->is_preview() && ! is_admin() ) || defined( 'DOING_AJAX' );
140
  }
141
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  Plugin Name: LoftLoader
4
  Plugin URI: http://www.loftocean.com/
5
  Description: An easy to use plugin to add an animated preloader to your website with fully customisations.
6
+ Version: 2.3.8
7
  Author: Loft.Ocean
8
  Author URI: http://www.loftocean.com/
9
  Text Domain: loftloader
32
  define( 'LOFTLOADER_ROOT', dirname( __FILE__ ) . '/' );
33
  define( 'LOFTLOADER_NAME', plugin_basename( __FILE__ ) );
34
  define( 'LOFTLOADER_URI', plugin_dir_url( __FILE__ ) );
35
+ define( 'LOFTLOADER_ASSET_VERSION', '2022022501' );
36
 
37
  class LoftLoader {
38
  public function __construct() {
139
  return ( isset($_GET['plugin'] ) && ( $_GET['plugin'] === 'loftloader-lite') ) || ( isset( $wp_customize ) && $wp_customize->is_preview() && ! is_admin() ) || defined( 'DOING_AJAX' );
140
  }
141
  }
142
+
143
+ /**
144
+ * Deletes saved data for the plugin unless setting to preserve
145
+ * settings is enabled
146
+ *
147
+ * @since 2.0 custom tables, custom images, and image directory deleted
148
+ * @since 1.0
149
+ */
150
+ function loftloader_plugin_uninstall() {
151
+ if ( ! current_user_can( 'activate_plugins' ) ) {
152
+ return;
153
+ }
154
+
155
+ if ( 'on' != get_option( 'loftloader_remove_settings', '' ) ) {
156
+ return;
157
+ }
158
+
159
+ global $wpdb;
160
+ $table_name = esc_sql( $wpdb->prefix . "postmeta" );
161
+ $result = $wpdb->query("
162
+ DELETE
163
+ FROM $table_name
164
+ WHERE meta_key = 'loftloader_page_shortcode';"
165
+ );
166
+
167
+ delete_option( 'loftloader_lite_version' );
168
+ delete_option( 'loftloader_main_switch' );
169
+ delete_option( 'loftloader_show_range' );
170
+ delete_option( 'loftloader_bg_color' );
171
+ delete_option( 'loftloader_bg_opacity' );
172
+ delete_option( 'loftloader_bg_animation' );
173
+ delete_option( 'loftloader_loader_type' );
174
+ delete_option( 'loftloader_loader_color' );
175
+ delete_option( 'loftloader_custom_img' );
176
+ delete_option( 'loftloader_img_width' );
177
+ delete_option( 'loftloader_show_close_timer' );
178
+ delete_option( 'loftloader_show_close_tip' );
179
+ delete_option( 'loftloader_max_load_time' );
180
+ delete_option( 'loftloader_inline_js' );
181
+ delete_option( 'loftloader_enable_any_page' );
182
+ delete_option( 'loftloader_remove_settings' );
183
+ }
184
+
185
+ register_deactivation_hook( __FILE__, 'loftloader_plugin_uninstall' );
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: loftocean
3
  Tags: loader, load, preloader, page preloader, prelader spinner, preloader with custom logo, animated preloader, CSS3 preloader, customize
4
  Donate link:
5
  Requires at least: 5.0
6
- Tested up to: 5.8
7
- Stable tag: 2.3.7
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -96,6 +96,10 @@ Check some [examples](http://www.loftocean.com/loftloader/example-13/) created b
96
  8. Pro version: Load Time, Device Control & Smooth Page Transition
97
 
98
  == Changelog ==
 
 
 
 
99
  = 2.3.7 =
100
  * Improved: Compatibility with WordPress 5.8
101
 
3
  Tags: loader, load, preloader, page preloader, prelader spinner, preloader with custom logo, animated preloader, CSS3 preloader, customize
4
  Donate link:
5
  Requires at least: 5.0
6
+ Tested up to: 5.9
7
+ Stable tag: 2.3.8
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
96
  8. Pro version: Load Time, Device Control & Smooth Page Transition
97
 
98
  == Changelog ==
99
+ = 2.3.8 =
100
+ * New: Option to remove plugin data after deactivating the plugin
101
+ * Improved: Compatibility with WordPress 5.9
102
+
103
  = 2.3.7 =
104
  * Improved: Compatibility with WordPress 5.8
105