Changeset 3248723
- Timestamp:
- 02/28/2025 08:45:52 PM (13 months ago)
- Location:
- easy-auto-reload
- Files:
-
- 20 added
- 8 edited
-
tags/2.0.2 (added)
-
tags/2.0.2/LICENSE.txt (added)
-
tags/2.0.2/assets (added)
-
tags/2.0.2/assets/index.php (added)
-
tags/2.0.2/assets/js (added)
-
tags/2.0.2/assets/js/clear-browser-cache.js (added)
-
tags/2.0.2/assets/js/clear-browser-cache.min.js (added)
-
tags/2.0.2/assets/js/index.php (added)
-
tags/2.0.2/easy-auto-reload.php (added)
-
tags/2.0.2/index.php (added)
-
tags/2.0.2/languages (added)
-
tags/2.0.2/languages/autorefresh-en_US.po (added)
-
tags/2.0.2/languages/autorefresh-hr.mo (added)
-
tags/2.0.2/languages/autorefresh-hr.po (added)
-
tags/2.0.2/languages/autorefresh-sr_RS.mo (added)
-
tags/2.0.2/languages/autorefresh-sr_RS.po (added)
-
tags/2.0.2/languages/index.php (added)
-
tags/2.0.2/readme.txt (added)
-
tags/2.0.2/uninstall.php (added)
-
trunk/assets/js/clear-browser-cache.js (modified) (1 diff)
-
trunk/assets/js/clear-browser-cache.min.js (added)
-
trunk/easy-auto-reload.php (modified) (10 diffs)
-
trunk/languages/autorefresh-en_US.po (modified) (7 diffs)
-
trunk/languages/autorefresh-hr.mo (modified) (previous)
-
trunk/languages/autorefresh-hr.po (modified) (7 diffs)
-
trunk/languages/autorefresh-sr_RS.mo (modified) (previous)
-
trunk/languages/autorefresh-sr_RS.po (modified) (5 diffs)
-
trunk/readme.txt (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
easy-auto-reload/trunk/assets/js/clear-browser-cache.js
r2598243 r3248723 1 1 (function () { 2 var process_scripts = false 3 rep = /.*\?.*/, 4 links = document.getElementsByTagName('link'), 5 images = document.getElementsByTagName('img'), 6 scripts = document.getElementsByTagName('script') 7 value = document.getElementsByName('clear-browser-cache'); 8 9 if(value) { 10 for (var i = 0; i < value.length; i++) { 11 var val = value[i], 12 outerHTML = val.outerHTML, 13 check = /.*value="true".*/; 14 if (check.test(outerHTML)) { 15 process_scripts = true; 16 } 17 } 18 } 19 20 if(links) { 21 for (var i = 0; i < links.length; i++) { 22 var link = links[i], 23 href = link.href; 24 if(href) { 25 if (rep.test(href)) { 26 link.href = href + '&' + Date.now(); 27 } else { 28 link.href = href + '?' + Date.now(); 29 } 30 } 31 } 32 } 33 34 if(images) { 35 for (var i = 0; i < images.length; i++) { 36 var image = images[i], 37 src = image.src; 38 if (src !== "") { 39 if (rep.test(src)) { 40 image.src = src + '&' + Date.now(); 41 } 42 else { 43 image.src = src + '?' + Date.now(); 44 } 45 } 46 } 47 } 48 49 if (process_scripts && scripts) { 50 for (var i = 0; i < scripts.length; i++) { 51 var script = scripts[i], 52 src = script.src; 53 if (src !== "") { 54 if (rep.test(src)) { 55 script.src = src + '&' + Date.now(); 56 } else { 57 script.src = src + '?' + Date.now(); 58 } 2 let process_scripts = false; 3 const rep = /.*\?.*/; 4 const links = document.getElementsByTagName('link'); 5 const images = document.getElementsByTagName('img'); 6 const scripts = document.getElementsByTagName('script'); 7 const values = document.getElementsByName('clear-browser-cache'); 8 9 if (values.length > 0) { 10 for (let i = 0; i < values.length; i++) { 11 if (values[i].value === "true") { 12 process_scripts = true; 13 break; 59 14 } 60 15 } 61 16 } 17 18 const updateUrl = (element, attr) => { 19 if (element[attr]) { 20 let url = new URL(element[attr], window.location.origin); 21 url.searchParams.set('t', Date.now()); 22 element[attr] = url.toString(); 23 } 24 }; 25 26 for (let i = 0; i < links.length; i++) { 27 updateUrl(links[i], 'href'); 28 } 29 30 for (let i = 0; i < images.length; i++) { 31 updateUrl(images[i], 'src'); 32 } 33 34 if (process_scripts) { 35 for (let i = 0; i < scripts.length; i++) { 36 updateUrl(scripts[i], 'src'); 37 } 38 } 62 39 })(); -
easy-auto-reload/trunk/easy-auto-reload.php
r3236217 r3248723 5 5 * Plugin URI: https://infinitumform.com 6 6 * Description: Auto refresh WordPress pages if there is no site activity after after any number of minutes. 7 * Version: 2.0. 17 * Version: 2.0.2 8 8 * Author: Ivijan-Stefan Stipic 9 9 * Author URI: https://www.linkedin.com/in/ivijanstefanstipic/ … … 35 35 36 36 final class WP_Auto_Refresh{ 37 37 38 /* 38 39 * Private cached class object … … 101 102 } 102 103 } 103 104 104 105 /* 105 106 * Nonce Life … … 117 118 $this->options = get_option('wp-autorefresh', array()); 118 119 } 119 120 // Define the text domain 121 $textdomain = 'autorefresh'; 122 120 121 // Define text domain 122 $domain = 'autorefresh'; 123 124 // First, attempt to load translations from the WordPress languages directory 125 load_plugin_textdomain($domain, false, WP_LANG_DIR . "/plugins/"); 126 123 127 // Check if the text domain is already loaded 124 if (!is_textdomain_loaded($textdomain)) { 125 // Determine the locale 126 $locale = apply_filters("{$textdomain}_locale", get_locale(), $textdomain); 127 128 // Standard .mo file format 129 $mofile = "{$textdomain}-{$locale}.mo"; 130 131 // Order of loading .mo files 132 // 1. Load from `/wp-content/languages/plugins` 133 $loaded = load_textdomain($textdomain, WP_LANG_DIR . "/plugins/{$mofile}"); 134 135 // 2. Load from `/wp-content/languages` 136 if (!$loaded) { 137 $loaded = load_textdomain($textdomain, WP_LANG_DIR . "/{$mofile}"); 138 } 139 140 // 3. Load from `/wp-content/plugins/autorefresh/languages` 141 if (!$loaded) { 142 $domain_path = __DIR__ . '/languages'; 143 $loaded = load_textdomain($textdomain, "{$domain_path}/{$mofile}"); 144 145 // 4. Load with just the locale, without the prefix 146 if (!$loaded) { 147 $loaded = load_textdomain($textdomain, "{$domain_path}/{$locale}.mo"); 128 if (!is_textdomain_loaded($domain)) { 129 $locale = apply_filters("{$domain}_locale", get_locale(), $domain); 130 $domain_path = __DIR__ . '/languages'; 131 132 // Possible .mo file locations 133 $mo_files = [ 134 "{$domain_path}/{$domain}-{$locale}.mo", 135 "{$domain_path}/{$locale}.mo" 136 ]; 137 138 // Try to load the translation file 139 foreach ($mo_files as $mo_file) { 140 if (file_exists($mo_file) && load_textdomain($domain, $mo_file)) { 141 break; 148 142 } 149 143 } 150 151 // If all else fails, use load_plugin_textdomain 152 if (!$loaded) { 153 load_plugin_textdomain($textdomain, false, "{$domain_path}"); 154 } 155 } 156 } 157 158 144 } 145 } 146 159 147 /* 160 148 * Initialize admin settings … … 240 228 } 241 229 242 /**230 /** 243 231 * Sanitize each setting field as needed 244 232 * 245 233 * @param array $input Contains all settings fields as array keys 246 234 */ 247 public function sanitize( $input ) 248 { 249 $new_input = array(); 250 251 if( isset( $input['timeout'] ) ) { 252 $new_input['timeout'] = absint( $input['timeout'] ); 253 } 254 255 if( isset( $input['clear_cache'] ) ) { 256 $new_input['clear_cache'] = absint( $input['clear_cache'] ); 257 } 258 259 if( isset( $input['wp_admin'] ) ) { 260 $new_input['wp_admin'] = absint( $input['wp_admin'] ); 261 } 262 263 if( isset( $input['global_refresh'] ) ) { 264 $new_input['global_refresh'] = absint( $input['global_refresh'] ); 265 } 266 267 if( isset( $input['post_type'] ) ) { 268 $new_input['post_type'] = array_filter( 269 is_array($input['post_type']) 270 ? array_map('sanitize_text_field', $input['post_type']) 271 : [] 272 ); 273 } 274 275 if( isset( $input['nonce_life'] ) ) { 276 $new_input['nonce_life'] = absint( $input['nonce_life'] ); 277 } 278 279 return $new_input; 280 } 235 public function sanitize($input) { 236 $fields = [ 237 'timeout', 238 'clear_cache', 239 'wp_admin', 240 'global_refresh', 241 'nonce_life' 242 ]; 243 244 $new_input = []; 245 246 // Sanitize integer fields 247 foreach ($fields as $field) { 248 if (isset($input[$field])) { 249 $new_input[$field] = absint($input[$field]); 250 } 251 } 252 253 // Sanitize post_type separately since it's an array 254 if (!empty($input['post_type']) && is_array($input['post_type'])) { 255 $new_input['post_type'] = array_map('sanitize_text_field', array_filter($input['post_type'])); 256 } 257 258 return $new_input; 259 } 260 281 261 282 262 /* … … 335 315 public function input_nonce_life__callback(){ 336 316 printf( 337 '<input type="number" min="1" step="1" id="nonce_life" name="wp-autorefresh[nonce_life]" value="%d" /><p class="description"><strong >%s</strong><br>%s</p>',317 '<input type="number" min="1" step="1" id="nonce_life" name="wp-autorefresh[nonce_life]" value="%d" /><p class="description"><strong style="color: #cc0000;">%s</strong><br>%s</p>', 338 318 esc_attr($this->get_nonce_life()), 339 319 __('WARNING: Do not change if you are not sure what it is for.','autorefresh'), … … 415 395 ?> 416 396 417 <!-- <?php printf(__('Auto-reload WordPress pages after %d minutes if there is no site activity.','autorefresh'), esc_html($this->get_timeout())); ?> --> 418 <script> 419 /* <![CDATA[ */ 420 (function() { 421 if (typeof wp == 'undefined') { 422 var wp = {}; 423 } 397 <!-- <?php printf(__('Auto-reload WordPress pages after %d minutes if there is no site activity.','autorefresh'), esc_html($this->get_timeout())); ?> --><?php ob_start(); ?> 398 <script>/* <![CDATA[ */ 399 (function () { 400 window.wp = window.wp || {}; 424 401 425 402 wp.autorefresh = { … … 436 413 'scrollstart': 'window' 437 414 }, 438 callback: function () {415 callback: function () { 439 416 if (wp.autorefresh.setTimeOutId) { 440 417 clearTimeout(wp.autorefresh.setTimeOutId); 441 418 } 442 wp.autorefresh.setTimeOutId = setTimeout(function() { 443 <?php if($this->clear_cache()) : ?> 444 var head = document.getElementsByTagName('head')[0], 445 script = document.createElement("script"); 446 447 script.src = "<?php echo rtrim(plugin_dir_url(__FILE__), '/') . '/assets/js/clear-browser-cache.js'; ?>"; 419 wp.autorefresh.setTimeOutId = setTimeout(function () { 420 <?php if ($this->clear_cache()) : ?> 421 var head = document.head || document.getElementsByTagName('head')[0]; 422 if (!head) return; 423 424 var script = document.createElement("script"); 425 script.src = "<?php echo esc_url(plugin_dir_url(__FILE__) . 'assets/js/clear-browser-cache.min.js'); ?>"; 448 426 script.type = 'text/javascript'; 449 427 script.async = true; 450 428 head.appendChild(script); 451 script.onload = function() { 452 if (typeof caches !== 'undefined') { 453 caches.keys().then((keyList) => Promise.all(keyList.map((key) => caches.delete(key)))); 454 } else { 455 // Fallback for browsers that do not support caches API 456 var cacheFallbackScript = document.createElement("script"); 457 cacheFallbackScript.text = "if('serviceWorker' in navigator){navigator.serviceWorker.getRegistrations().then(function(registrations) {for(let registration of registrations) {registration.unregister();}});}"; 458 head.appendChild(cacheFallbackScript); 429 430 script.onload = function () { 431 if (typeof caches !== 'undefined' && caches.keys) { 432 caches.keys().then(function (keyList) { 433 return Promise.all(keyList.map(function (key) { 434 return caches.delete(key); 435 })); 436 }).catch(function (err) { 437 console.warn("<?php esc_attr_e('Cache clearing failed:','autorefresh'); ?>", err); 438 }); 439 } else if ('serviceWorker' in navigator) { 440 navigator.serviceWorker.getRegistrations().then(function (registrations) { 441 for (let registration of registrations) { 442 registration.unregister(); 443 } 444 }).catch(function (err) { 445 console.warn("<?php esc_attr_e('Service Worker unregister failed:','autorefresh'); ?>", err); 446 }); 459 447 } 460 448 }; 461 449 <?php endif; ?> 450 462 451 location.reload(); 463 }, (1e3 * 60 * <?php echo esc_attr($this->get_timeout()); ?>));452 }, 1000 * 60 * <?php echo json_encode($this->get_timeout()); ?>); 464 453 } 465 454 }; 466 455 467 for (var event in wp.autorefresh.events) { 468 if (wp.autorefresh.events.hasOwnProperty(event)) { 469 if (wp.autorefresh.events[event] === 'document') { 470 document.addEventListener(event, wp.autorefresh.callback); 471 } else if (wp.autorefresh.events[event] === 'window') { 472 window.addEventListener(event, wp.autorefresh.callback); 473 } 474 } 475 } 476 }()); 477 /* ]]> */ 478 </script> 456 Object.keys(wp.autorefresh.events).forEach(function (event) { 457 var target = wp.autorefresh.events[event] === 'document' ? document : window; 458 target.addEventListener(event, wp.autorefresh.callback); 459 }); 460 })(); 461 /* ]]> */</script> 479 462 <noscript><meta http-equiv="refresh" content="<?php echo esc_attr($this->get_timeout() * 60); ?>"></noscript> 480 <?php } 463 <?php $js_code = ob_get_clean(); 464 echo preg_replace( 465 [ 466 '/\s+/', 467 '/\s*([{};,:])\s*/' 468 ], 469 [ 470 ' ', 471 '$1' 472 ], 473 $js_code 474 ); 475 } 481 476 482 477 /* … … 510 505 ?> 511 506 <p> 512 <label for="easy_auto_reload_mode"><?php esc_html_e('Refresh option:', 'autorefresh'); ?></label><br>507 <label for="easy_auto_reload_mode"><?php esc_html_e('Refresh option:', 'autorefresh'); ?></label><br> 513 508 <select name="_auto_reload_mode" id="easy_auto_reload_mode" style="width:100%; max-width:90%;"> 514 <option value="automatic" <?php selected( $select_value, 'automatic' ); ?>><?php esc_html_e('Automatic','autorefresh'); ?></option> 515 <option value="custom" <?php selected( $select_value, 'custom' ); ?>><?php esc_html_e('Custom','autorefresh'); ?></option> 516 <option value="disabled" <?php selected( $select_value, 'disabled' ); ?>><?php esc_html_e('Disabled','autorefresh'); ?></option> 509 <?php 510 $options = [ 511 'automatic' => __('Automatic', 'autorefresh'), 512 'custom' => __('Custom', 'autorefresh'), 513 'disabled' => __('Disabled', 'autorefresh') 514 ]; 515 516 // Loop kroz opcije 517 foreach ($options as $value => $label) { 518 printf( 519 '<option value="%s" %s>%s</option>', 520 esc_attr($value), 521 selected($select_value, $value, false), 522 esc_html($label) 523 ); 524 } 525 ?> 517 526 </select> 518 527 </p> 519 528 <p> 520 <label for="easy_auto_reload_time"><?php esc_html_e('Refresh interval in minutes:','autorefresh'); ?></label> 521 <input type="number" name="_auto_reload_time" id="easy_auto_reload_time" value="<?php echo esc_attr( $number_value ); ?>" min="1" step="1" style="width:100%; max-width:100px;"<?php echo (in_array($select_value, ['disabled', 'automatic']) ? ' class="disabled" disabled' : ''); ?> /> 529 <label for="easy_auto_reload_time"><?php esc_html_e('Refresh interval in minutes:', 'autorefresh'); ?></label> 530 <input 531 type="number" 532 name="_auto_reload_time" 533 id="easy_auto_reload_time" 534 value="<?php echo esc_attr($number_value); ?>" 535 min="1" 536 step="1" 537 style="width: 100%; max-width: 100px;" 538 <?php echo in_array($select_value, ['disabled', 'automatic']) ? 'class="disabled" disabled' : ''; ?> 539 /> 522 540 </p> 523 541 <?php add_action('admin_footer', function() { ?> 524 542 <script> 543 /* <![CDATA[ */ 525 544 document.addEventListener('DOMContentLoaded', function () { 526 545 var modeSelect = document.getElementById('easy_auto_reload_mode'); … … 539 558 modeSelect.addEventListener('change', toggleTimeInput); 540 559 }); 560 /* ]]> */ 541 561 </script> 542 562 <?php }, 1, 0); -
easy-auto-reload/trunk/languages/autorefresh-en_US.po
r3236217 r3248723 2 2 msgstr "" 3 3 "Project-Id-Version: Easy Auto Reload\n" 4 "POT-Creation-Date: 2025-02- 06 19:44+0100\n"5 "PO-Revision-Date: 2025-02- 06 19:44+0100\n"4 "POT-Creation-Date: 2025-02-28 21:39+0100\n" 5 "PO-Revision-Date: 2025-02-28 21:39+0100\n" 6 6 "Last-Translator: Ivijan-Stefan Stipić <infinitumform@gmail.com>\n" 7 7 "Language-Team: \n" … … 22 22 "X-Poedit-SearchPathExcluded-0: *.min.js\n" 23 23 24 #: easy-auto-reload.php:1 7124 #: easy-auto-reload.php:159 25 25 msgid "Auto-Refresh Settings" 26 26 msgstr "" 27 27 28 #: easy-auto-reload.php:1 78 easy-auto-reload.php:233 easy-auto-reload.php:23429 #: easy-auto-reload.php:2 9128 #: easy-auto-reload.php:166 easy-auto-reload.php:221 easy-auto-reload.php:222 29 #: easy-auto-reload.php:271 30 30 msgid "Auto-Refresh" 31 31 msgstr "" 32 32 33 #: easy-auto-reload.php:1 8633 #: easy-auto-reload.php:174 34 34 msgid "Auto-Refresh Timeout" 35 35 msgstr "" 36 36 37 #: easy-auto-reload.php:1 9437 #: easy-auto-reload.php:182 38 38 msgid "Browser Cache" 39 39 msgstr "" 40 40 41 #: easy-auto-reload.php: 20241 #: easy-auto-reload.php:190 42 42 msgid "WP Admin" 43 43 msgstr "" 44 44 45 #: easy-auto-reload.php: 21145 #: easy-auto-reload.php:199 46 46 msgid "Lifespan of nonces" 47 47 msgstr "" 48 48 49 #: easy-auto-reload.php:2 2049 #: easy-auto-reload.php:208 50 50 msgid "Allow custom refresh in page and post types" 51 51 msgstr "" 52 52 53 #: easy-auto-reload.php: 30853 #: easy-auto-reload.php:288 54 54 msgid "" 55 55 "Automatically reloads web pages after any number of minutes if the user or " … … 57 57 msgstr "" 58 58 59 #: easy-auto-reload.php: 31559 #: easy-auto-reload.php:295 60 60 msgid "Enable auto refresh globally on the entire site." 61 61 msgstr "" 62 62 63 #: easy-auto-reload.php: 31663 #: easy-auto-reload.php:296 64 64 msgid "INFO:" 65 65 msgstr "" 66 66 67 #: easy-auto-reload.php: 31767 #: easy-auto-reload.php:297 68 68 msgid "" 69 69 "Even if this function is disabled, you can still choose for each page " … … 71 71 msgstr "" 72 72 73 #: easy-auto-reload.php:3 2873 #: easy-auto-reload.php:308 74 74 msgid "Enter the number in minutes." 75 75 msgstr "" 76 76 77 #: easy-auto-reload.php:3 3977 #: easy-auto-reload.php:319 78 78 msgid "WARNING: Do not change if you are not sure what it is for." 79 79 msgstr "" 80 80 81 #: easy-auto-reload.php:3 4081 #: easy-auto-reload.php:320 82 82 msgid "" 83 83 "This field is used to define the lifespan of nonces in seconds. By default, " … … 89 89 msgstr "" 90 90 91 #: easy-auto-reload.php:3 5191 #: easy-auto-reload.php:331 92 92 msgid "Clear the browser cache during refresh." 93 93 msgstr "" 94 94 95 #: easy-auto-reload.php:3 6295 #: easy-auto-reload.php:342 96 96 msgid "Enable autoefresh inside WP Admin." 97 97 msgstr "" 98 98 99 #: easy-auto-reload.php:3 9199 #: easy-auto-reload.php:371 100 100 msgid "" 101 101 "Enable autorefresh settings within pages and posts to have individual " … … 103 103 msgstr "" 104 104 105 #: easy-auto-reload.php: 417105 #: easy-auto-reload.php:397 106 106 #, php-format 107 107 msgid "" … … 109 109 msgstr "" 110 110 111 #: easy-auto-reload.php:495 111 #: easy-auto-reload.php:437 112 msgid "Cache clearing failed:" 113 msgstr "" 114 115 #: easy-auto-reload.php:445 116 msgid "Service Worker unregister failed:" 117 msgstr "" 118 119 #: easy-auto-reload.php:490 112 120 msgid "Auto Reload" 113 121 msgstr "" 114 122 115 #: easy-auto-reload.php:5 12123 #: easy-auto-reload.php:507 116 124 msgid "Refresh option:" 117 125 msgstr "" 118 126 119 #: easy-auto-reload.php:51 4127 #: easy-auto-reload.php:511 120 128 msgid "Automatic" 121 129 msgstr "" 122 130 123 #: easy-auto-reload.php:51 5131 #: easy-auto-reload.php:512 124 132 msgid "Custom" 125 133 msgstr "" 126 134 127 #: easy-auto-reload.php:51 6135 #: easy-auto-reload.php:513 128 136 msgid "Disabled" 129 137 msgstr "" 130 138 131 #: easy-auto-reload.php:52 0139 #: easy-auto-reload.php:529 132 140 msgid "Refresh interval in minutes:" 133 141 msgstr "" -
easy-auto-reload/trunk/languages/autorefresh-hr.po
r3236217 r3248723 2 2 msgstr "" 3 3 "Project-Id-Version: Easy Auto Reload\n" 4 "POT-Creation-Date: 2025-02- 06 19:46+0100\n"5 "PO-Revision-Date: 2025-02- 06 19:47+0100\n"4 "POT-Creation-Date: 2025-02-28 21:38+0100\n" 5 "PO-Revision-Date: 2025-02-28 21:39+0100\n" 6 6 "Last-Translator: Ivijan-Stefan Stipić <infinitumform@gmail.com>\n" 7 7 "Language-Team: \n" … … 23 23 "X-Poedit-SearchPathExcluded-0: *.min.js\n" 24 24 25 #: easy-auto-reload.php:1 7125 #: easy-auto-reload.php:159 26 26 msgid "Auto-Refresh Settings" 27 27 msgstr "Postavke automatskog osvježavanja" 28 28 29 #: easy-auto-reload.php:1 78 easy-auto-reload.php:233 easy-auto-reload.php:23430 #: easy-auto-reload.php:2 9129 #: easy-auto-reload.php:166 easy-auto-reload.php:221 easy-auto-reload.php:222 30 #: easy-auto-reload.php:271 31 31 msgid "Auto-Refresh" 32 32 msgstr "Automatsko osvježavanje" 33 33 34 #: easy-auto-reload.php:1 8634 #: easy-auto-reload.php:174 35 35 msgid "Auto-Refresh Timeout" 36 36 msgstr "Istek automatskog osvježavanja" 37 37 38 #: easy-auto-reload.php:1 9438 #: easy-auto-reload.php:182 39 39 msgid "Browser Cache" 40 40 msgstr "Predmemorija preglednika" 41 41 42 #: easy-auto-reload.php: 20242 #: easy-auto-reload.php:190 43 43 msgid "WP Admin" 44 44 msgstr "" 45 45 46 #: easy-auto-reload.php: 21146 #: easy-auto-reload.php:199 47 47 msgid "Lifespan of nonces" 48 48 msgstr "Vrijeme isteka za \"nonces\"" 49 49 50 #: easy-auto-reload.php:2 2050 #: easy-auto-reload.php:208 51 51 msgid "Allow custom refresh in page and post types" 52 52 msgstr "Dopusti prilagođeno osvježavanje u vrstama stranica i postova" 53 53 54 #: easy-auto-reload.php: 30854 #: easy-auto-reload.php:288 55 55 msgid "" 56 56 "Automatically reloads web pages after any number of minutes if the user or " … … 60 60 "korisnik ili posjetitelj nije aktivan na stranici." 61 61 62 #: easy-auto-reload.php: 31562 #: easy-auto-reload.php:295 63 63 msgid "Enable auto refresh globally on the entire site." 64 64 msgstr "Omogućite globalno automatsko osvježavanje na cijeloj web stranici." 65 65 66 #: easy-auto-reload.php: 31666 #: easy-auto-reload.php:296 67 67 msgid "INFO:" 68 68 msgstr "INFORMACIJE:" 69 69 70 #: easy-auto-reload.php: 31770 #: easy-auto-reload.php:297 71 71 msgid "" 72 72 "Even if this function is disabled, you can still choose for each page " … … 76 76 "stranicu pojedinačno želite li da se osvježi." 77 77 78 #: easy-auto-reload.php:3 2878 #: easy-auto-reload.php:308 79 79 msgid "Enter the number in minutes." 80 80 msgstr "Unesite broj u minutama." 81 81 82 #: easy-auto-reload.php:3 3982 #: easy-auto-reload.php:319 83 83 msgid "WARNING: Do not change if you are not sure what it is for." 84 84 msgstr "UPOZORENJE: Ne mijenjajte ako niste sigurni čemu služi." 85 85 86 #: easy-auto-reload.php:3 4086 #: easy-auto-reload.php:320 87 87 msgid "" 88 88 "This field is used to define the lifespan of nonces in seconds. By default, " … … 101 101 "zahtjeve prije nego napravite promjene u ovim postavkama." 102 102 103 #: easy-auto-reload.php:3 51103 #: easy-auto-reload.php:331 104 104 msgid "Clear the browser cache during refresh." 105 105 msgstr "Izbrišite predmemoriju preglednika tijekom osvježavanja." 106 106 107 #: easy-auto-reload.php:3 62107 #: easy-auto-reload.php:342 108 108 msgid "Enable autoefresh inside WP Admin." 109 109 msgstr "Omogućite automatsko osvježavanje unutar WP Admin." 110 110 111 #: easy-auto-reload.php:3 91111 #: easy-auto-reload.php:371 112 112 msgid "" 113 113 "Enable autorefresh settings within pages and posts to have individual " … … 117 117 "biste imali individualnu kontrolu." 118 118 119 #: easy-auto-reload.php: 417119 #: easy-auto-reload.php:397 120 120 #, php-format 121 121 msgid "" … … 125 125 "aktivnosti na web-lokaciji." 126 126 127 #: easy-auto-reload.php:495 127 #: easy-auto-reload.php:437 128 msgid "Cache clearing failed:" 129 msgstr "Greška pri brisanju predmemorije:" 130 131 #: easy-auto-reload.php:445 132 msgid "Service Worker unregister failed:" 133 msgstr "Greška pri odjavi Service Workera:" 134 135 #: easy-auto-reload.php:490 128 136 msgid "Auto Reload" 129 137 msgstr "Automatsko učitavanje" 130 138 131 #: easy-auto-reload.php:5 12139 #: easy-auto-reload.php:507 132 140 msgid "Refresh option:" 133 141 msgstr "Opcija osvježavanja:" 134 142 135 #: easy-auto-reload.php:51 4143 #: easy-auto-reload.php:511 136 144 msgid "Automatic" 137 145 msgstr "Automatski" 138 146 139 #: easy-auto-reload.php:51 5147 #: easy-auto-reload.php:512 140 148 msgid "Custom" 141 149 msgstr "Uobičajeno" 142 150 143 #: easy-auto-reload.php:51 6151 #: easy-auto-reload.php:513 144 152 msgid "Disabled" 145 153 msgstr "Onesposobljeno" 146 154 147 #: easy-auto-reload.php:52 0155 #: easy-auto-reload.php:529 148 156 msgid "Refresh interval in minutes:" 149 157 msgstr "Interval osvježavanja u minutama:" -
easy-auto-reload/trunk/languages/autorefresh-sr_RS.po
r3236217 r3248723 2 2 msgstr "" 3 3 "Project-Id-Version: Easy Auto Reload\n" 4 "POT-Creation-Date: 2025-02- 06 19:45+0100\n"5 "PO-Revision-Date: 2025-02- 06 19:48+0100\n"4 "POT-Creation-Date: 2025-02-28 21:36+0100\n" 5 "PO-Revision-Date: 2025-02-28 21:44+0100\n" 6 6 "Last-Translator: Ivijan-Stefan Stipić <infinitumform@gmail.com>\n" 7 7 "Language-Team: \n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);\n" 12 "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " 13 "n%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);\n" 13 14 "X-Generator: Poedit 3.5\n" 14 15 "X-Poedit-Basepath: ..\n" … … 16 17 "X-Poedit-WPHeader: easy-auto-reload.php\n" 17 18 "X-Poedit-SourceCharset: UTF-8\n" 18 "X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;_nx_noop:3c,1,2;__ngettext_noop:1,2\n" 19 "X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;" 20 "esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;" 21 "_n_noop:1,2;_nx_noop:3c,1,2;__ngettext_noop:1,2\n" 19 22 "X-Poedit-SearchPath-0: .\n" 20 23 "X-Poedit-SearchPathExcluded-0: *.min.js\n" 21 24 22 #: easy-auto-reload.php:1 7125 #: easy-auto-reload.php:159 23 26 msgid "Auto-Refresh Settings" 24 27 msgstr "Подешавања аутоматског освежавања" 25 28 26 #: easy-auto-reload.php:1 78 easy-auto-reload.php:233 easy-auto-reload.php:23427 #: easy-auto-reload.php:2 9129 #: easy-auto-reload.php:166 easy-auto-reload.php:221 easy-auto-reload.php:222 30 #: easy-auto-reload.php:271 28 31 msgid "Auto-Refresh" 29 32 msgstr "Аутоматско освежавање" 30 33 31 #: easy-auto-reload.php:1 8634 #: easy-auto-reload.php:174 32 35 msgid "Auto-Refresh Timeout" 33 36 msgstr "Временско ограничење аутоматског освежавања" 34 37 35 #: easy-auto-reload.php:1 9438 #: easy-auto-reload.php:182 36 39 msgid "Browser Cache" 37 40 msgstr "Кеш претраживача" 38 41 39 #: easy-auto-reload.php: 20242 #: easy-auto-reload.php:190 40 43 msgid "WP Admin" 41 44 msgstr "Вордпресс администрација" 42 45 43 #: easy-auto-reload.php: 21146 #: easy-auto-reload.php:199 44 47 msgid "Lifespan of nonces" 45 48 msgstr "Време трајања за \"nonces\"" 46 49 47 #: easy-auto-reload.php:2 2050 #: easy-auto-reload.php:208 48 51 msgid "Allow custom refresh in page and post types" 49 52 msgstr "Дозволите прилагођено освежавање у страницама и постовима" 50 53 51 #: easy-auto-reload.php:308 52 msgid "Automatically reloads web pages after any number of minutes if the user or visitor is not active on the site." 53 msgstr "Аутоматски поново учитавање веб страница након било којег броја минута ако корисник или посетилац није активан на сајту." 54 #: easy-auto-reload.php:288 55 msgid "" 56 "Automatically reloads web pages after any number of minutes if the user or " 57 "visitor is not active on the site." 58 msgstr "" 59 "Аутоматски поново учитавање веб страница након било којег броја минута ако " 60 "корисник или посетилац није активан на сајту." 54 61 55 #: easy-auto-reload.php: 31562 #: easy-auto-reload.php:295 56 63 msgid "Enable auto refresh globally on the entire site." 57 64 msgstr "Омогућите глобално аутоматско освежавање на целом сајту." 58 65 59 #: easy-auto-reload.php: 31666 #: easy-auto-reload.php:296 60 67 msgid "INFO:" 61 68 msgstr "ИНФОРМАЦИЈА:" 62 69 63 #: easy-auto-reload.php:317 64 msgid "Even if this function is disabled, you can still choose for each page individually whether you want it to refresh." 65 msgstr "Чак и ако је ова функција онемогућена, и даље можете да изаберете за сваку страницу појединачно да ли желите да се освежи." 70 #: easy-auto-reload.php:297 71 msgid "" 72 "Even if this function is disabled, you can still choose for each page " 73 "individually whether you want it to refresh." 74 msgstr "" 75 "Чак и ако је ова функција онемогућена, и даље можете да изаберете за сваку " 76 "страницу појединачно да ли желите да се освежи." 66 77 67 #: easy-auto-reload.php:3 2878 #: easy-auto-reload.php:308 68 79 msgid "Enter the number in minutes." 69 80 msgstr "Унесите број у минутима." 70 81 71 #: easy-auto-reload.php:3 3982 #: easy-auto-reload.php:319 72 83 msgid "WARNING: Do not change if you are not sure what it is for." 73 84 msgstr "УПОЗОРЕЊЕ: Не мењајте ако нисте сигурни за шта служи." 74 85 75 #: easy-auto-reload.php:340 76 msgid "This field is used to define the lifespan of nonces in seconds. By default, nonces have a lifespan of 86,400 seconds, which is equivalent to one day. It's important to exercise caution when considering any extensions to this value, as longer lifespans may introduce security risks by extending the window of opportunity for potential attacks. Please ensure you carefully assess your security requirements before making changes to this setting." 77 msgstr "Ово поље се користи да се дефинише трајање \"nonce\" вредности у секундама. Подразумевано, \"nonce\" вредности имају трајање од 86.400 секунди, што је еквивалентно једном дану. Важно је да будете опрезни при разматрању продужавања ове вредности, јер дуже трајање може увести безбедносне ризике ширењем прозора прилике за потенцијалне нападе. Молимо вас да пажљиво процените своје безбедносне захтеве пре него што направите измене на овим подешавањима." 86 #: easy-auto-reload.php:320 87 msgid "" 88 "This field is used to define the lifespan of nonces in seconds. By default, " 89 "nonces have a lifespan of 86,400 seconds, which is equivalent to one day. " 90 "It's important to exercise caution when considering any extensions to this " 91 "value, as longer lifespans may introduce security risks by extending the " 92 "window of opportunity for potential attacks. Please ensure you carefully " 93 "assess your security requirements before making changes to this setting." 94 msgstr "" 95 "Ово поље се користи да се дефинише трајање \"nonce\" вредности у секундама. " 96 "Подразумевано, \"nonce\" вредности имају трајање од 86.400 секунди, што је " 97 "еквивалентно једном дану. Важно је да будете опрезни при разматрању " 98 "продужавања ове вредности, јер дуже трајање може увести безбедносне ризике " 99 "ширењем прозора прилике за потенцијалне нападе. Молимо вас да пажљиво " 100 "процените своје безбедносне захтеве пре него што направите измене на овим " 101 "подешавањима." 78 102 79 #: easy-auto-reload.php:3 51103 #: easy-auto-reload.php:331 80 104 msgid "Clear the browser cache during refresh." 81 105 msgstr "Обришите кеш претраживач током освежавања." 82 106 83 #: easy-auto-reload.php:3 62107 #: easy-auto-reload.php:342 84 108 msgid "Enable autoefresh inside WP Admin." 85 109 msgstr "Омогућите аутоматско освежавање унутар ВП Админ-а." 86 110 87 #: easy-auto-reload.php:391 88 msgid "Enable autorefresh settings within pages and posts to have individual control." 89 msgstr "Омогућите подешавања аутоматског освежавања унутар страница и постова да бисте имали индивидуалну контролу." 111 #: easy-auto-reload.php:371 112 msgid "" 113 "Enable autorefresh settings within pages and posts to have individual " 114 "control." 115 msgstr "" 116 "Омогућите подешавања аутоматског освежавања унутар страница и постова да " 117 "бисте имали индивидуалну контролу." 90 118 91 #: easy-auto-reload.php: 417119 #: easy-auto-reload.php:397 92 120 #, php-format 93 msgid "Auto-reload WordPress pages after %d minutes if there is no site activity." 94 msgstr "Аутоматски поново учитајте Вордпресс странице након %d минута ако нема активности на сајту." 121 msgid "" 122 "Auto-reload WordPress pages after %d minutes if there is no site activity." 123 msgstr "" 124 "Аутоматски поново учитајте Вордпресс странице након %d минута ако нема " 125 "активности на сајту." 95 126 96 #: easy-auto-reload.php:495 127 #: easy-auto-reload.php:437 128 msgid "Cache clearing failed:" 129 msgstr "Грешка при брисању кеша:" 130 131 #: easy-auto-reload.php:445 132 msgid "Service Worker unregister failed:" 133 msgstr "Грешка при уклањању сервисног радника:" 134 135 #: easy-auto-reload.php:490 97 136 msgid "Auto Reload" 98 137 msgstr "Аутоматско учитавање" 99 138 100 #: easy-auto-reload.php:5 12139 #: easy-auto-reload.php:507 101 140 msgid "Refresh option:" 102 141 msgstr "Opcija osvežavanja:" 103 142 104 #: easy-auto-reload.php:51 4143 #: easy-auto-reload.php:511 105 144 msgid "Automatic" 106 145 msgstr "Аутоматски" 107 146 108 #: easy-auto-reload.php:51 5147 #: easy-auto-reload.php:512 109 148 msgid "Custom" 110 149 msgstr "Прилагођено" 111 150 112 #: easy-auto-reload.php:51 6151 #: easy-auto-reload.php:513 113 152 msgid "Disabled" 114 153 msgstr "Онемогућено" 115 154 116 #: easy-auto-reload.php:52 0155 #: easy-auto-reload.php:529 117 156 msgid "Refresh interval in minutes:" 118 157 msgstr "Интервал освежавања у минутима:" … … 127 166 128 167 #. Description of the plugin/theme 129 msgid "Auto refresh WordPress pages if there is no site activity after after any number of minutes." 130 msgstr "Аутоматско освежавање Вордпресс страница ако нема активности на сајту након било којег броја минута." 168 msgid "" 169 "Auto refresh WordPress pages if there is no site activity after after any " 170 "number of minutes." 171 msgstr "" 172 "Аутоматско освежавање Вордпресс страница ако нема активности на сајту након " 173 "било којег броја минута." 131 174 132 175 #. Author of the plugin/theme … … 137 180 msgid "https://www.linkedin.com/in/ivijanstefanstipic/" 138 181 msgstr "" 139 -
easy-auto-reload/trunk/readme.txt
r3236408 r3248723 1 === Easy Auto Reload - Auto Refresh WP===1 === Easy Auto Reload - Auto Refresh === 2 2 Contributors: creativform, ivijanstefan 3 3 Donate link: … … 6 6 Tested up to: 6.7 7 7 Requires PHP: 7.0 8 Stable tag: 2.0. 18 Stable tag: 2.0.2 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html 11 11 Donate link: https://www.buymeacoffee.com/ivijanstefan 12 12 13 Auto matically refreshes your WordPress site at specified intervals to maintain session integrity and enhance user engagement.13 Auto Refresh & Reload plugin for WordPress. Keep your website fresh by refreshing page after a set interval. Perfect for nonces & abandoned pages. 14 14 15 == =Description ==15 == Description == 16 16 17 **Easy Auto Reload** is a WordPress plugin designed to automatically refresh your website pages after a specified period of inactivity. This ensures that your content remains current and that session-related functionalities, such as nonces, are properly managed.17 Welcome to the bustling world of the digital café, where visitors explore, indulge, and sometimes linger a little too long. Introducing the Easy Auto Reload plugin, your virtual barista, ensuring that your website always offers a fresh and engaging experience. 18 18 19 = Key Features = 19 ### What Does It Do? 20 20 21 - **Automatic Page Refresh**: Set a custom interval to refresh pages after user inactivity, ensuring content stays up-to-date. 22 - **Session Management**: Helps in managing session expirations and nonces by refreshing pages, reducing potential security risks. 23 - **User Engagement**: Keeps users engaged by ensuring they view the most recent content without manual reloads. 24 - **Customizable Settings**: Easily configure refresh intervals and specify pages or sections to include or exclude from automatic refresh. 21 Think of Easy Auto Reload as a continual caffeine injection for your website. It's designed to: 25 22 26 = Use Cases = 23 - Refresh the page automatically after a defined interval if there's no activity from the visitor. 24 - Keep things lively and engaging, attracting more footfall to your digital café. 25 - Avoid unnecessary reloads if the visitor is actively interacting, thus offering a seamless browsing experience. 26 - Refresh only when the café is unattended or if a new tab opens the site. 27 27 28 - **Security**: Automatically refresh pages to manage nonces and prevent unauthorized actions due to expired sessions. 29 - **Dynamic Content**: Ensure users always see the latest content on news sites, stock tickers, or live blogs. 30 - **Idle Timeout**: Redirect or refresh pages after a period of inactivity to maintain session integrity. 28 ### Why Do You Need It? 29 30 This plugin is a must-have for managing those pesky nonces that occasionally require a refresh. Its setup is as easy as pouring a cup of coffee. Just input the number of minutes between reloads, and presto! Your website will pulsate with the liveliness of a bustling café. 31 32 Treat your website to the Easy Auto Reload plugin. It's a refreshing touch that your digital space deserves. 33 34 Cheers! 31 35 32 36 = P.S. = … … 36 40 == Installation == 37 41 38 1. **Automatic Installation**: 39 - Navigate to `WP-Admin -> Plugins -> Add New`. 40 - Search for "Easy Auto Reload" and click the "Install Now" button. 41 42 2. **Manual Installation**: 43 - Upload the `autorefresh.zip` file to the `/wp-content/plugins/` directory via the WordPress admin panel or extract the contents and upload the folder via FTP. 44 45 3. **Activation**: 46 - Activate the plugin through the "Plugins" menu in WordPress. 47 48 4. **Configuration**: 49 - Go to `Settings -> Auto Refresh` to customize the plugin settings according to your requirements. 50 51 == Frequently Asked Questions == 52 53 = How do I set the refresh interval? = 54 55 After activating the plugin, navigate to `Settings -> Auto Refresh` in your WordPress dashboard. Here, you can specify the desired refresh interval in minutes. 56 57 = Will the plugin refresh pages if the user is active? = 58 59 No, the plugin is designed to detect user activity. Pages will only refresh after the specified period of inactivity to ensure a seamless user experience. 60 61 = Can I exclude certain pages from auto-refresh? = 62 63 Yes, within the plugin settings, you can specify pages or sections to exclude from automatic refreshing. 42 1. Navigate to `WP-Admin -> Plugins -> Add New`, search for "Auto Refresh," and click the "Install" button. 43 2. Alternatively, upload **autorefresh.zip** to `/wp-content/plugins` directory via the WordPress admin panel or upload the unzipped folder to your plugins folder via FTP. 44 3. Activate the plugin through the "Plugins" menu in WordPress. 45 4. Proceed to `Settings -> Auto Refresh` to update the options and customize as you like. 64 46 65 47 == Changelog == 48 49 = 2.0.2 = 50 * Fixed JavaScript errors when clearing cache 51 * Optimize JavaScript and code minification 52 * Fixed GUI and optimized PHP code 66 53 67 54 = 2.0.1 = … … 119 106 1. Admin Settings 120 107 2. Page and post settings 121 3. Disabled auto refresh
Note: See TracChangeset
for help on using the changeset viewer.