Changeset 2276451
- Timestamp:
- 04/05/2020 04:12:45 PM (6 years ago)
- Location:
- loader/trunk
- Files:
-
- 5 edited
-
inc/controls.php (modified) (5 diffs)
-
inc/preloader/functions.php (modified) (4 diffs)
-
inc/preloader/styles.php (modified) (1 diff)
-
loader.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
loader/trunk/inc/controls.php
r2262313 r2276451 93 93 $wp_customize->add_setting( 'enable_preloader', 94 94 array( 95 'default' => '1',95 'default' => true, 96 96 'transport' => 'refresh', 97 97 'sanitize_callback' => 'loader_sanitize_checkbox' … … 115 115 $wp_customize->add_setting( 'enable_quotes', 116 116 array( 117 'default' => '1',117 'default' => true, 118 118 'transport' => 'refresh', 119 119 'sanitize_callback' => 'loader_sanitize_checkbox' … … 137 137 $wp_customize->add_setting( 'enable_preload', 138 138 array( 139 'default' => '1',139 'default' => true, 140 140 'transport' => 'refresh', 141 141 'sanitize_callback' => 'loader_sanitize_checkbox' … … 327 327 $wp_customize->add_setting( 'loader_style_image', 328 328 array( 329 'default' => ' 1',329 'default' => 'none', 330 330 'transport' => 'refresh', 331 331 'sanitize_callback' => 'loader_sanitize_select' … … 368 368 $wp_customize->add_setting( 'only_home', 369 369 array( 370 'default' => '0',370 'default' => false, 371 371 'transport' => 'refresh', 372 372 'sanitize_callback' => 'loader_sanitize_checkbox' -
loader/trunk/inc/preloader/functions.php
r2265313 r2276451 24 24 wp_enqueue_script( 'hover_loader_script', plugin_dir_url( __FILE__ ) . 'assets/js/hover-loader.min.js'); 25 25 } 26 if ( get_theme_mod('enable_preload' , 1) == 1) {26 if ( get_theme_mod('enable_preload' , true) == true ) { 27 27 add_action('wp_enqueue_scripts', 'loader_preload_script'); 28 28 } 29 29 30 function loader_load_jquery( $value=''){30 function loader_load_jquery(){ 31 31 wp_enqueue_script("jquery"); 32 32 } 33 33 add_action('wp_enqueue_scripts', 'loader_load_jquery'); 34 34 35 if ( get_theme_mod('enable_preloader', 1 ) == 1 ) { 35 36 36 37 37 … … 189 189 190 190 // Add script to footer 191 if ( get_theme_mod('only_home' , 0) == 1) {191 if ( get_theme_mod('only_home' , 0) == true && get_theme_mod('enable_preloader', true ) == true ) { 192 192 add_action('wp_head', 'loader_home_script'); 193 193 } else{ … … 198 198 199 199 // Call the quote on preloader if enabled. 200 if ( get_theme_mod('enable_quotes' , 1) == 1) {200 if ( get_theme_mod('enable_quotes' , true) == true && get_theme_mod('enable_preloader', true ) == true ) { 201 201 add_action( 'loader_quote', 'loader_print_one_quote' ); 202 202 } … … 212 212 */ 213 213 214 if ( get_theme_mod('loader_style_select' , 1) == 1) { 215 216 // Check if the wp_body_open is available 217 if(has_action('wp_body_open')) { 218 219 // If avaibale add html after body tag 220 add_action('wp_body_open', 'loader_html'); 221 222 } else { 223 224 // Else add html to head 214 if ( get_theme_mod('loader_style_select' , '1') == '1' && get_theme_mod('enable_preloader', true ) == true ) { 215 225 216 add_action('wp_head', 'loader_html'); 226 } 227 } 228 229 230 if ( get_theme_mod('loader_style_select') == 2) { 231 232 // Check if the wp_body_open is available 233 if(has_action('wp_body_open')) { 234 235 // If avaibale add html after body tag 236 add_action('wp_body_open', 'loader_html'); 237 238 } else { 239 240 // Else add html to head 217 218 } 219 220 221 if ( get_theme_mod('loader_style_select') == 2 && get_theme_mod('enable_preloader', true ) == true ) { 222 241 223 add_action('wp_head', 'loader_html'); 242 } 243 } 244 245 246 if ( get_theme_mod('loader_style_select') == 3) { 247 248 // Check if the wp_body_open is available 249 if(has_action('wp_body_open')) { 250 251 // If avaibale add html after body tag 252 add_action('wp_body_open', 'loader_3_html'); 253 254 } else { 255 256 // Else add html to head 224 225 } 226 227 228 if ( get_theme_mod('loader_style_select') == 3 && get_theme_mod('enable_preloader', true ) == true ) { 229 257 230 add_action('wp_head', 'loader_3_html'); 258 } 259 } 260 261 262 if ( get_theme_mod('loader_style_select') == 4) { 263 264 // Check if the wp_body_open is available 265 if(has_action('wp_body_open')) { 266 267 // If avaibale add html after body tag 268 add_action('wp_body_open', 'loader_4_html'); 269 270 } else { 271 272 // Else add html to head 231 232 } 233 234 235 if ( get_theme_mod('loader_style_select') == 4 && get_theme_mod('enable_preloader', true ) == true ) { 236 273 237 add_action('wp_head', 'loader_4_html'); 274 } 275 } 276 277 278 if ( get_theme_mod('loader_style_select') == 5) { 279 280 // Check if the wp_body_open is available 281 if(has_action('wp_body_open')) { 282 283 // If avaibale add html after body tag 284 add_action('wp_body_open', 'loader_html'); 285 286 } else { 287 288 // Else add html to head 238 239 } 240 241 242 if ( get_theme_mod('loader_style_select') == 5 && get_theme_mod('enable_preloader', true ) == true ) { 243 289 244 add_action('wp_head', 'loader_html'); 290 } 291 } 292 293 if ( get_theme_mod('loader_style_select') == 6) { 294 295 // Check if the wp_body_open is available 296 if(has_action('wp_body_open')) { 297 298 // If avaibale add html after body tag 299 add_action('wp_body_open', 'loader_6_html'); 300 301 } else { 302 303 // Else add html to head 245 246 } 247 248 if ( get_theme_mod('loader_style_select') == 6 && get_theme_mod('enable_preloader', true ) == true ) { 249 304 250 add_action('wp_head', 'loader_6_html'); 305 } 306 } 307 308 309 if ( get_theme_mod('loader_style_select') == 'image') { 310 311 // Check if the wp_body_open is available 312 if(has_action('wp_body_open')) { 313 314 // If avaibale add html after body tag 315 add_action('wp_body_open', 'loader_image_html'); 316 317 } else { 318 319 // Else add html to head 251 252 } 253 254 255 if ( get_theme_mod('loader_style_select') == 'image' && get_theme_mod('enable_preloader', true ) == true ) { 256 320 257 add_action('wp_head', 'loader_image_html'); 321 } 322 } 323 324 if ( get_theme_mod('loader_style_select') == 'custom') { 325 326 // Check if the wp_body_open is available 327 if(has_action('wp_body_open')) { 328 329 // If avaibale add html after body tag 330 add_action('wp_body_open', 'loader_custom_html'); 331 332 } else { 333 334 // Else add html to head 258 259 } 260 261 if ( get_theme_mod('loader_style_select') == 'custom' && get_theme_mod('enable_preloader', true ) == true ) { 262 335 263 add_action('wp_head', 'loader_custom_html'); 336 } 337 } 338 } 264 265 } -
loader/trunk/inc/preloader/styles.php
r2262313 r2276451 71 71 72 72 }?> 73 74 75 73 76 74 -
loader/trunk/loader.php
r2265313 r2276451 4 4 * Plugin URI: https://wordpress.org/plugins/loader 5 5 * Description: Loader is a lightweight plugin to show preloader and prefetch on mouse hover to load pages faster. 6 * Version: 1. 2.46 * Version: 1.3.0 7 7 * Author: BroadBrander 8 8 * Author URI: https://broadbrander.com -
loader/trunk/readme.txt
r2265313 r2276451 1 1 === Loader: Preloader and User Experience Booster === 2 2 Contributors: broadbrander 3 Version: 1. 2.43 Version: 1.3.0 4 4 Plugin Name: Loader: Preloader and User Experience Booster 5 5 Tags: wordpress, preloader, preload, prefetch, speed optimize 6 6 Requires at least: 4.9 7 7 Tested up to: 5.4.0 8 Stable tag: 1. 2.48 Stable tag: 1.3.0 9 9 Requires PHP: 5.2.4 10 10 License: GPLv2 or later … … 86 86 * Fixed: Minor bug. 87 87 88 = 1.2. 3=88 = 1.2.4 = 89 89 90 90 * Fixed: Preloader not showing on some websites. 91 91 * Added: SVG support. 92 92 * Updated: Deprecated jQuery code. 93 94 = 1.3.0 = 95 96 * Fixed: Compatibility issue with WordPress 5.4.0
Note: See TracChangeset
for help on using the changeset viewer.