Changeset 3761969
- Timestamp:
- 10/23/2026 03:48:30 PM (3 days ago)
- Location:
- 1001web-maintenance-launch-pages
- Files:
-
- 24 edited
- 1 copied
-
tags/2.9.181 (copied) (copied from 1001web-maintenance-launch-pages/trunk )
-
tags/2.9.181/1001web-maintenance-launch-pages.php (modified) (2 diffs)
-
tags/2.9.181/assets/css/admin.css (modified) (3 diffs)
-
tags/2.9.181/assets/js/admin.js (modified) (3 diffs)
-
tags/2.9.181/includes/class-admin.php (modified) (1 diff)
-
tags/2.9.181/includes/class-ajax.php (modified) (2 diffs)
-
tags/2.9.181/includes/class-diagnostic.php (modified) (3 diffs)
-
tags/2.9.181/includes/class-frontend.php (modified) (1 diff)
-
tags/2.9.181/includes/class-healthcheck.php (modified) (1 diff)
-
tags/2.9.181/includes/class-settings.php (modified) (1 diff)
-
tags/2.9.181/readme.txt (modified) (3 diffs)
-
tags/2.9.181/templates/admin-page.php (modified) (4 diffs)
-
tags/2.9.181/templates/health-card.php (modified) (1 diff)
-
trunk/1001web-maintenance-launch-pages.php (modified) (2 diffs)
-
trunk/assets/css/admin.css (modified) (3 diffs)
-
trunk/assets/js/admin.js (modified) (3 diffs)
-
trunk/includes/class-admin.php (modified) (1 diff)
-
trunk/includes/class-ajax.php (modified) (2 diffs)
-
trunk/includes/class-diagnostic.php (modified) (3 diffs)
-
trunk/includes/class-frontend.php (modified) (1 diff)
-
trunk/includes/class-healthcheck.php (modified) (1 diff)
-
trunk/includes/class-settings.php (modified) (1 diff)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/templates/admin-page.php (modified) (4 diffs)
-
trunk/templates/health-card.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
1001web-maintenance-launch-pages/tags/2.9.181/1001web-maintenance-launch-pages.php
r3759890 r3761969 4 4 * Plugin URI: https://maintenancegenius.ca 5 5 * Description: Maintenance and coming soon pages for safe updates: suspends cache plugins, checks the 503 visitors get, flags pages that broke. 6 * Version: 2.9.18 06 * Version: 2.9.181 7 7 * Author: 1001Web.ca 8 8 * Author URI: https://www.1001web.ca … … 39 39 // CONSTANTES 40 40 // ============================================ 41 define('MGENIUS_VERSION', '2.9.18 0');41 define('MGENIUS_VERSION', '2.9.181'); 42 42 define('MGENIUS_PLUGIN_DIR', plugin_dir_path(__FILE__)); 43 43 define('MGENIUS_PLUGIN_URL', plugin_dir_url(__FILE__)); -
1001web-maintenance-launch-pages/tags/2.9.181/assets/css/admin.css
r3759890 r3761969 1783 1783 font-weight: 500; 1784 1784 transition: all 0.3s ease; 1785 } 1786 1787 /* v2.9.181 — bouton « Rouvrir l'assistant » au même aspect que les liens */ 1788 button.mg-help-link { 1789 border: 0; 1790 font: inherit; 1791 font-weight: 500; 1792 cursor: pointer; 1785 1793 } 1786 1794 … … 2541 2549 font-size: 13px; 2542 2550 color: #6b4e00; 2551 } 2552 2553 /* v2.9.181 — résultat enregistré dans une autre langue */ 2554 .mg-diag-lang-note { 2555 margin: 12px 0 0; 2556 padding: 8px 10px; 2557 background: #eef4ff; 2558 border-radius: 4px; 2559 font-size: 13px; 2560 color: #1d3a7a; 2543 2561 } 2544 2562 … … 2923 2941 .mg-health-card-date{font-size:12px;color:#6b7280} 2924 2942 .mg-health-card-verdict{margin:8px 0 0;font-size:13px;line-height:1.5;color:#374151} 2943 .mg-health-card-lang{margin:6px 0 0;font-size:12px;color:#1d3a7a} 2925 2944 .mg-health-card-list{margin:8px 0 0;padding:0;list-style:none} 2926 2945 .mg-health-card-list li{display:flex;gap:10px;flex-wrap:wrap;padding:4px 0;border-top:1px solid #f1f5f9;font-size:12px} -
1001web-maintenance-launch-pages/tags/2.9.181/assets/js/admin.js
r3759890 r3761969 312 312 var i18n = mgeniusAdmin.i18n || {}; 313 313 $card.attr('class', 'mg-health-card is-' + health.status); 314 $('#mg-health-card-lang').remove(); // v2.9.181 — résultat neuf, dans la langue de l'utilisateur 314 315 $('#mg-health-card-date').text(i18n.hc_just_now || ''); 315 316 var $v = $('#mg-health-card-verdict').empty(); … … 2840 2841 }); 2841 2842 2843 // v2.9.181 — rouvrir l'assistant de configuration (rien n'est modifié avant sa dernière étape). 2844 $(document).on('click', '#mg-wizard-relaunch', function() { 2845 if (!window.mgConfirmGate(this, mgeniusAdmin.i18n.wizard_relaunch_confirm)) { 2846 return; 2847 } 2848 var $btn = $(this).prop('disabled', true); 2849 $.post(mgeniusAdmin.ajaxurl, { action: 'mgenius_wizard_reset', nonce: mgeniusAdmin.nonce }) 2850 .done(function(response) { 2851 if (response && response.success) { 2852 window.location.reload(); 2853 } else { 2854 showNotice((response && response.data && response.data.message) || mgeniusAdmin.i18n.error_generic, 'error'); 2855 $btn.prop('disabled', false); 2856 } 2857 }) 2858 .fail(function() { 2859 showNotice(mgeniusAdmin.i18n.connection_error, 'error'); 2860 $btn.prop('disabled', false); 2861 }); 2862 }); 2863 2842 2864 $(document).on('click', '#mg-reset-stats', function() { 2843 2865 if (!window.mgConfirmGate(this, mgeniusAdmin.i18n.confirm_reset_stats)) { … … 3359 3381 } 3360 3382 var results = response.data.results; 3383 $('#mg-diag-lang-note').remove(); // v2.9.181 — résultat neuf, dans la langue de l'utilisateur 3361 3384 var $container = $('#mg-diag-results').empty(); 3362 3385 $.each(results.checks, function(id, check) { -
1001web-maintenance-launch-pages/tags/2.9.181/includes/class-admin.php
r3759890 r3761969 471 471 'cancel' => __('Cancel', '1001web-maintenance-launch-pages'), 472 472 'confirm_ok' => __('Continue', '1001web-maintenance-launch-pages'), 473 'wizard_relaunch_confirm' => __('Open the setup wizard again? Nothing changes until its last step: "Launch maintenance!" and "Save without activating" replace your title, message and style. "Skip wizard" changes nothing.', '1001web-maintenance-launch-pages'), 473 474 'confirm_enable' => __('Turn on maintenance mode? Your visitors will no longer see your normal site until you turn it off.', '1001web-maintenance-launch-pages'), 474 475 'expert_badge' => __('Expert setting', '1001web-maintenance-launch-pages'), -
1001web-maintenance-launch-pages/tags/2.9.181/includes/class-ajax.php
r3759890 r3761969 58 58 59 59 add_action('wp_ajax_mgenius_wizard_save', [__CLASS__, 'wizard_save']); 60 add_action('wp_ajax_mgenius_wizard_reset', [__CLASS__, 'wizard_reset']); 60 61 add_action('wp_ajax_mgenius_health_recheck', [__CLASS__, 'health_recheck']); 61 62 … … 2127 2128 } 2128 2129 2130 /** 2131 * v2.9.181 — Rouvre l'assistant au prochain chargement de la page. 2132 * Ne touche à aucun réglage : seul l'assistant terminé (« Launch » ou 2133 * « Save without activating ») enregistre ses choix. 2134 */ 2135 public static function wizard_reset() { 2136 check_ajax_referer('mgenius_nonce', 'nonce'); 2137 2138 if (!current_user_can('manage_options')) { 2139 wp_send_json_error(['message' => __('Permission denied', '1001web-maintenance-launch-pages')]); 2140 } 2141 2142 delete_option('mgenius_wizard_completed'); 2143 wp_send_json_success(); 2144 } 2145 2129 2146 // WIZARD — Configuration initiale 2130 2147 public static function wizard_save() { -
1001web-maintenance-launch-pages/tags/2.9.181/includes/class-diagnostic.php
r3759890 r3761969 64 64 65 65 /** 66 * v2.9.181 — Le résultat enregistré a-t-il été rédigé dans une autre langue 67 * que celle de l'utilisateur ? Avant la 2.9.181, la langue n'était pas 68 * enregistrée : un résultat sans langue est présumé anglais. 69 * 70 * @param array|null $results 71 * @return bool 72 */ 73 public static function results_in_other_language($results) { 74 if (!is_array($results)) { 75 return false; 76 } 77 $current = (string) get_user_locale(); 78 if (!empty($results['locale'])) { 79 return (string) $results['locale'] !== $current; 80 } 81 return 0 !== strpos($current, 'en'); 82 } 83 84 /** 66 85 * Statut d'un check individuel depuis le dernier scan. 67 86 * @param string $check_id … … 168 187 $results = [ 169 188 'timestamp' => time(), 189 // v2.9.181 — langue des textes enregistrés : un résultat lu dans 190 // une autre langue est signalé au lieu d'être affiché tel quel. 191 'locale' => get_user_locale(), 170 192 'checks' => $checks, 171 193 'fails' => $fails, … … 563 585 private static function check_cron() { 564 586 if (defined('DISABLE_WP_CRON') && DISABLE_WP_CRON) { 565 // Cron système possible — on ne peut pas le prouver d'ici : warn informatif. 587 // v2.9.181 — preuve par la file d'attente : si aucune tâche n'est 588 // en retard de plus de 30 minutes, une tâche cron du serveur appelle 589 // wp-cron.php. Sinon, avertissement (rien ne prouve qu'elle existe). 590 $mgenius_queue = _get_cron_array(); 591 if (is_array($mgenius_queue) && !empty($mgenius_queue)) { 592 $mgenius_oldest = (int) min(array_keys($mgenius_queue)); 593 if ($mgenius_oldest >= time() - 30 * MINUTE_IN_SECONDS) { 594 return self::result('ok', 595 __('Scheduled tasks run through a server cron job', '1001web-maintenance-launch-pages'), 596 __('WP-Cron is disabled in wp-config.php, and no scheduled task is more than 30 minutes late: a cron job on your server runs them.', '1001web-maintenance-launch-pages'), 597 '', 598 __('DISABLE_WP_CRON is true and the task queue is up to date.', '1001web-maintenance-launch-pages') 599 ); 600 } 601 } 566 602 return self::result('warn', 567 603 __('WP-Cron is disabled in wp-config.php', '1001web-maintenance-launch-pages'), 568 __('S cheduled tasks rely on a server-side cron job. If none is configured, the background page comparison after a scheduled or countdown end will not run.', '1001web-maintenance-launch-pages'),604 __('Some scheduled tasks are more than 30 minutes late, so no server cron job seems to call wp-cron.php. Without one, the background page comparison after a scheduled or countdown end will not run.', '1001web-maintenance-launch-pages'), 569 605 __('Confirm a real cron job calls wp-cron.php every few minutes, or remove DISABLE_WP_CRON.', '1001web-maintenance-launch-pages'), 570 606 __('DISABLE_WP_CRON is true — WordPress will not trigger cron on page loads.', '1001web-maintenance-launch-pages') -
1001web-maintenance-launch-pages/tags/2.9.181/includes/class-frontend.php
r3759890 r3761969 58 58 $mgenius_mode = isset( $this->settings['page_mode'] ) ? $this->settings['page_mode'] : 'maintenance'; 59 59 $mgenius_title = isset( $this->settings['title'] ) ? (string) $this->settings['title'] : ''; 60 if ( '' === $mgenius_title || in_array( $mgenius_title, array( MGENIUS_Settings::default_title_for( 'maintenance' ), MGENIUS_Settings::default_title_for( 'coming_soon' ) ), true ) ) { 60 $mgenius_en = MGENIUS_Settings::untouched_english_defaults(); 61 if ( '' === $mgenius_title || in_array( $mgenius_title, array( MGENIUS_Settings::default_title_for( 'maintenance' ), MGENIUS_Settings::default_title_for( 'coming_soon' ) ), true ) || in_array( trim( $mgenius_title ), $mgenius_en['title'], true ) ) { 61 62 $this->settings['title'] = MGENIUS_Settings::default_title_for( $mgenius_mode ); 63 } 64 // v2.9.181 — message par défaut anglais jamais modifié : texte traduit. 65 $mgenius_msg = isset( $this->settings['message'] ) ? trim( wp_strip_all_tags( (string) $this->settings['message'] ) ) : ''; 66 if ( in_array( $mgenius_msg, $mgenius_en['message'], true ) ) { 67 $this->settings['message'] = __( 'We are updating our website. We will be back very soon.', '1001web-maintenance-launch-pages' ); 62 68 } 63 69 } -
1001web-maintenance-launch-pages/tags/2.9.181/includes/class-healthcheck.php
r3759890 r3761969 683 683 global $wpdb; 684 684 685 // v2.9.181 — langue des messages enregistrés (voir health-card.php). 686 if (self::RESULT_OPTION === $key && is_array($value) && !empty($value)) { 687 $value['locale'] = get_user_locale(); 688 } 689 685 690 $serialized = maybe_serialize($value); 686 691 -
1001web-maintenance-launch-pages/tags/2.9.181/includes/class-settings.php
r3759890 r3761969 45 45 /* translators: %s: site name */ 46 46 return sprintf( __( '%s is coming soon', '1001web-maintenance-launch-pages' ), $name ); 47 } 48 49 /** 50 * v2.9.181 — Titres et messages par défaut ENGLISH, jamais modifiés. 51 * Enregistrés avant que la traduction du site soit installée (ou par les 52 * versions antérieures), ils restaient en anglais sur un site français. 53 * La page visiteur les remplace par le texte par défaut traduit ; un 54 * texte écrit par l'administrateur n'est jamais touché. 55 * 56 * @return array{title:string[], message:string[]} 57 */ 58 public static function untouched_english_defaults() { 59 $name = trim( wp_specialchars_decode( (string) get_bloginfo( 'name' ), ENT_QUOTES ) ); 60 return array( 61 'title' => array( 62 'Site Under Maintenance', 63 'Coming soon', 64 $name . ' will be back shortly', 65 $name . ' is coming soon', 66 ), 67 'message' => array( 68 'We are currently performing maintenance. We will be back soon.', 69 'We are updating our website. We will be back very soon.', 70 ), 71 ); 47 72 } 48 73 -
1001web-maintenance-launch-pages/tags/2.9.181/readme.txt
r3759890 r3761969 5 5 Tested up to: 7.1 6 6 Requires PHP: 7.4 7 Stable tag: 2.9.18 07 Stable tag: 2.9.181 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 170 170 171 171 **7. 1001Web support** (optional, only when you send a support request) 172 - How: an email is sent to assistance@1001web.cawith your own site's mail configuration. No HTTP request is made to a 1001Web server. The screen also links to client.1001web.ca, our support desk; that is a plain link.172 - How: an email is sent to the 1001Web support team with your own site's mail configuration. No HTTP request is made to a 1001Web server. The screen also links to client.1001web.ca, our support desk; that is a plain link. 173 173 - When: only when you fill in the Request assistance form, confirm your consent and click send. 174 174 - Data sent: your message, the email address you enter, and a technical report (site address, WordPress, PHP and MySQL versions, server software and limits, language and time zone, theme, active and must-use plugins, detected cache plugins, plugin settings state, diagnostic results). The report can be read in full before sending. … … 207 207 == Changelog == 208 208 209 = 2.9.181 = 210 * Support tab, Useful Links: a new button opens the setup wizard again. Nothing changes until its last step, and "Skip wizard" changes nothing. 211 * Diagnostic and "Last update check": a result saved in another language is now flagged, with a prompt to run the check again, instead of being shown as is. 212 * Visitor page: a title or message still equal to an English default (never edited) now shows the default text in the site language. 213 * Diagnostic: with WP-Cron disabled, the check now looks at the task queue. If no task is more than 30 minutes late, it confirms that a server cron job runs them, instead of always warning. 214 * Visitor statistics: the numbers no longer overlap their labels, and the "Since" date follows the site date format. 215 * Readme: the support request section no longer shows an internal email address. 216 209 217 = 2.9.180 = 210 218 * In Coming Soon mode (and in maintenance without the 503 option), robots.txt now returns a plain "Disallow: /" file and XML sitemaps return 404, instead of the HTML page with a 200 that crawlers read as an invalid file. The 503 maintenance page is unchanged. -
1001web-maintenance-launch-pages/tags/2.9.181/templates/admin-page.php
r3759890 r3761969 2219 2219 <div style="display: flex; gap: 20px; flex-wrap: wrap;"> 2220 2220 <div style="background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); border-radius: 12px; padding: 20px 30px; text-align: center; flex: 1; min-width: 150px;"> 2221 <div style="font-size: 36px; font-weight: bold; color: #fff;" id="mg-stats-visits-count"><?php echo esc_html(number_format_i18n($stats_visits)); ?></div>2221 <div style="font-size: 36px; line-height: 1.2; margin-bottom: 4px; font-weight: bold; color: #fff;" id="mg-stats-visits-count"><?php echo esc_html(number_format_i18n($stats_visits)); ?></div> 2222 2222 <div style="font-size: 14px; color: rgba(255,255,255,0.8);"><?php esc_html_e('Total visits', '1001web-maintenance-launch-pages'); ?></div> 2223 2223 </div> 2224 2224 <div style="background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%); border-radius: 12px; padding: 20px 30px; text-align: center; flex: 1; min-width: 150px;"> 2225 <div style="font-size: 36px; font-weight: bold; color: #fff;" id="mg-stats-unique-count"><?php echo esc_html(number_format_i18n($stats_unique)); ?></div>2225 <div style="font-size: 36px; line-height: 1.2; margin-bottom: 4px; font-weight: bold; color: #fff;" id="mg-stats-unique-count"><?php echo esc_html(number_format_i18n($stats_unique)); ?></div> 2226 2226 <div style="font-size: 14px; color: rgba(255,255,255,0.8);"><?php esc_html_e('Unique visitors', '1001web-maintenance-launch-pages'); ?></div> 2227 2227 </div> … … 2230 2230 <?php if ($stats_start): ?> 2231 2231 <p style="margin-top: 15px; color: #666; font-size: 13px; text-align: center;"> 2232 📅 <?php esc_html_e('Since', '1001web-maintenance-launch-pages'); ?> <?php echo esc_html( date_i18n('F j, Y H:i', strtotime($stats_start)) ); ?> 2232 📅 <?php esc_html_e('Since', '1001web-maintenance-launch-pages'); ?> <?php 2233 // v2.9.181 — format de date du site ; date locale lue dans le fuseau du site. 2234 $mgenius_stats_ts = MGENIUS_Settings::local_to_timestamp($stats_start); 2235 echo esc_html( $mgenius_stats_ts ? wp_date( get_option('date_format') . ' ' . get_option('time_format'), $mgenius_stats_ts ) : $stats_start ); 2236 ?> 2233 2237 </p> 2234 2238 <?php endif; ?> … … 2670 2674 </div> 2671 2675 2676 <?php if (class_exists('MGENIUS_Diagnostic') && MGENIUS_Diagnostic::results_in_other_language($mgenius_diag_results)) : ?> 2677 <p class="mg-diag-lang-note" id="mg-diag-lang-note">ℹ️ <?php esc_html_e('These results come from an analysis run in another language. Click Run analysis to see them in your language.', '1001web-maintenance-launch-pages'); ?></p> 2678 <?php endif; ?> 2672 2679 <div class="mg-diag-results" id="mg-diag-results"> 2673 2680 <?php … … 3005 3012 <span><?php esc_html_e('1001Web™ Website', '1001web-maintenance-launch-pages'); ?></span> 3006 3013 </a> 3014 <button type="button" class="mg-help-link" id="mg-wizard-relaunch"> 3015 <span class="mg-help-icon">🧭</span> 3016 <span><?php esc_html_e('Open the setup wizard again', '1001web-maintenance-launch-pages'); ?></span> 3017 </button> 3007 3018 </div> 3008 3019 </div> -
1001web-maintenance-launch-pages/tags/2.9.181/templates/health-card.php
r3759890 r3761969 45 45 } 46 46 ?></p> 47 <?php 48 // v2.9.181 — message enregistré dans une autre langue (avant la 2.9.181 : présumé anglais). 49 $mgenius_hc_locale = ! empty( $mgenius_hc_result['locale'] ) ? (string) $mgenius_hc_result['locale'] : ''; 50 $mgenius_hc_other = $mgenius_hc_status && ( '' !== $mgenius_hc_locale ? $mgenius_hc_locale !== get_user_locale() : 0 !== strpos( get_user_locale(), 'en' ) ); 51 if ( $mgenius_hc_other ) : 52 ?> 53 <p class="mg-health-card-lang" id="mg-health-card-lang">ℹ️ <?php esc_html_e( 'This result was recorded in another language. Check again to see it in your language.', '1001web-maintenance-launch-pages' ); ?></p> 54 <?php endif; ?> 47 55 <ul class="mg-health-card-list" id="mg-health-card-list"> 48 56 <?php -
1001web-maintenance-launch-pages/trunk/1001web-maintenance-launch-pages.php
r3759890 r3761969 4 4 * Plugin URI: https://maintenancegenius.ca 5 5 * Description: Maintenance and coming soon pages for safe updates: suspends cache plugins, checks the 503 visitors get, flags pages that broke. 6 * Version: 2.9.18 06 * Version: 2.9.181 7 7 * Author: 1001Web.ca 8 8 * Author URI: https://www.1001web.ca … … 39 39 // CONSTANTES 40 40 // ============================================ 41 define('MGENIUS_VERSION', '2.9.18 0');41 define('MGENIUS_VERSION', '2.9.181'); 42 42 define('MGENIUS_PLUGIN_DIR', plugin_dir_path(__FILE__)); 43 43 define('MGENIUS_PLUGIN_URL', plugin_dir_url(__FILE__)); -
1001web-maintenance-launch-pages/trunk/assets/css/admin.css
r3759890 r3761969 1783 1783 font-weight: 500; 1784 1784 transition: all 0.3s ease; 1785 } 1786 1787 /* v2.9.181 — bouton « Rouvrir l'assistant » au même aspect que les liens */ 1788 button.mg-help-link { 1789 border: 0; 1790 font: inherit; 1791 font-weight: 500; 1792 cursor: pointer; 1785 1793 } 1786 1794 … … 2541 2549 font-size: 13px; 2542 2550 color: #6b4e00; 2551 } 2552 2553 /* v2.9.181 — résultat enregistré dans une autre langue */ 2554 .mg-diag-lang-note { 2555 margin: 12px 0 0; 2556 padding: 8px 10px; 2557 background: #eef4ff; 2558 border-radius: 4px; 2559 font-size: 13px; 2560 color: #1d3a7a; 2543 2561 } 2544 2562 … … 2923 2941 .mg-health-card-date{font-size:12px;color:#6b7280} 2924 2942 .mg-health-card-verdict{margin:8px 0 0;font-size:13px;line-height:1.5;color:#374151} 2943 .mg-health-card-lang{margin:6px 0 0;font-size:12px;color:#1d3a7a} 2925 2944 .mg-health-card-list{margin:8px 0 0;padding:0;list-style:none} 2926 2945 .mg-health-card-list li{display:flex;gap:10px;flex-wrap:wrap;padding:4px 0;border-top:1px solid #f1f5f9;font-size:12px} -
1001web-maintenance-launch-pages/trunk/assets/js/admin.js
r3759890 r3761969 312 312 var i18n = mgeniusAdmin.i18n || {}; 313 313 $card.attr('class', 'mg-health-card is-' + health.status); 314 $('#mg-health-card-lang').remove(); // v2.9.181 — résultat neuf, dans la langue de l'utilisateur 314 315 $('#mg-health-card-date').text(i18n.hc_just_now || ''); 315 316 var $v = $('#mg-health-card-verdict').empty(); … … 2840 2841 }); 2841 2842 2843 // v2.9.181 — rouvrir l'assistant de configuration (rien n'est modifié avant sa dernière étape). 2844 $(document).on('click', '#mg-wizard-relaunch', function() { 2845 if (!window.mgConfirmGate(this, mgeniusAdmin.i18n.wizard_relaunch_confirm)) { 2846 return; 2847 } 2848 var $btn = $(this).prop('disabled', true); 2849 $.post(mgeniusAdmin.ajaxurl, { action: 'mgenius_wizard_reset', nonce: mgeniusAdmin.nonce }) 2850 .done(function(response) { 2851 if (response && response.success) { 2852 window.location.reload(); 2853 } else { 2854 showNotice((response && response.data && response.data.message) || mgeniusAdmin.i18n.error_generic, 'error'); 2855 $btn.prop('disabled', false); 2856 } 2857 }) 2858 .fail(function() { 2859 showNotice(mgeniusAdmin.i18n.connection_error, 'error'); 2860 $btn.prop('disabled', false); 2861 }); 2862 }); 2863 2842 2864 $(document).on('click', '#mg-reset-stats', function() { 2843 2865 if (!window.mgConfirmGate(this, mgeniusAdmin.i18n.confirm_reset_stats)) { … … 3359 3381 } 3360 3382 var results = response.data.results; 3383 $('#mg-diag-lang-note').remove(); // v2.9.181 — résultat neuf, dans la langue de l'utilisateur 3361 3384 var $container = $('#mg-diag-results').empty(); 3362 3385 $.each(results.checks, function(id, check) { -
1001web-maintenance-launch-pages/trunk/includes/class-admin.php
r3759890 r3761969 471 471 'cancel' => __('Cancel', '1001web-maintenance-launch-pages'), 472 472 'confirm_ok' => __('Continue', '1001web-maintenance-launch-pages'), 473 'wizard_relaunch_confirm' => __('Open the setup wizard again? Nothing changes until its last step: "Launch maintenance!" and "Save without activating" replace your title, message and style. "Skip wizard" changes nothing.', '1001web-maintenance-launch-pages'), 473 474 'confirm_enable' => __('Turn on maintenance mode? Your visitors will no longer see your normal site until you turn it off.', '1001web-maintenance-launch-pages'), 474 475 'expert_badge' => __('Expert setting', '1001web-maintenance-launch-pages'), -
1001web-maintenance-launch-pages/trunk/includes/class-ajax.php
r3759890 r3761969 58 58 59 59 add_action('wp_ajax_mgenius_wizard_save', [__CLASS__, 'wizard_save']); 60 add_action('wp_ajax_mgenius_wizard_reset', [__CLASS__, 'wizard_reset']); 60 61 add_action('wp_ajax_mgenius_health_recheck', [__CLASS__, 'health_recheck']); 61 62 … … 2127 2128 } 2128 2129 2130 /** 2131 * v2.9.181 — Rouvre l'assistant au prochain chargement de la page. 2132 * Ne touche à aucun réglage : seul l'assistant terminé (« Launch » ou 2133 * « Save without activating ») enregistre ses choix. 2134 */ 2135 public static function wizard_reset() { 2136 check_ajax_referer('mgenius_nonce', 'nonce'); 2137 2138 if (!current_user_can('manage_options')) { 2139 wp_send_json_error(['message' => __('Permission denied', '1001web-maintenance-launch-pages')]); 2140 } 2141 2142 delete_option('mgenius_wizard_completed'); 2143 wp_send_json_success(); 2144 } 2145 2129 2146 // WIZARD — Configuration initiale 2130 2147 public static function wizard_save() { -
1001web-maintenance-launch-pages/trunk/includes/class-diagnostic.php
r3759890 r3761969 64 64 65 65 /** 66 * v2.9.181 — Le résultat enregistré a-t-il été rédigé dans une autre langue 67 * que celle de l'utilisateur ? Avant la 2.9.181, la langue n'était pas 68 * enregistrée : un résultat sans langue est présumé anglais. 69 * 70 * @param array|null $results 71 * @return bool 72 */ 73 public static function results_in_other_language($results) { 74 if (!is_array($results)) { 75 return false; 76 } 77 $current = (string) get_user_locale(); 78 if (!empty($results['locale'])) { 79 return (string) $results['locale'] !== $current; 80 } 81 return 0 !== strpos($current, 'en'); 82 } 83 84 /** 66 85 * Statut d'un check individuel depuis le dernier scan. 67 86 * @param string $check_id … … 168 187 $results = [ 169 188 'timestamp' => time(), 189 // v2.9.181 — langue des textes enregistrés : un résultat lu dans 190 // une autre langue est signalé au lieu d'être affiché tel quel. 191 'locale' => get_user_locale(), 170 192 'checks' => $checks, 171 193 'fails' => $fails, … … 563 585 private static function check_cron() { 564 586 if (defined('DISABLE_WP_CRON') && DISABLE_WP_CRON) { 565 // Cron système possible — on ne peut pas le prouver d'ici : warn informatif. 587 // v2.9.181 — preuve par la file d'attente : si aucune tâche n'est 588 // en retard de plus de 30 minutes, une tâche cron du serveur appelle 589 // wp-cron.php. Sinon, avertissement (rien ne prouve qu'elle existe). 590 $mgenius_queue = _get_cron_array(); 591 if (is_array($mgenius_queue) && !empty($mgenius_queue)) { 592 $mgenius_oldest = (int) min(array_keys($mgenius_queue)); 593 if ($mgenius_oldest >= time() - 30 * MINUTE_IN_SECONDS) { 594 return self::result('ok', 595 __('Scheduled tasks run through a server cron job', '1001web-maintenance-launch-pages'), 596 __('WP-Cron is disabled in wp-config.php, and no scheduled task is more than 30 minutes late: a cron job on your server runs them.', '1001web-maintenance-launch-pages'), 597 '', 598 __('DISABLE_WP_CRON is true and the task queue is up to date.', '1001web-maintenance-launch-pages') 599 ); 600 } 601 } 566 602 return self::result('warn', 567 603 __('WP-Cron is disabled in wp-config.php', '1001web-maintenance-launch-pages'), 568 __('S cheduled tasks rely on a server-side cron job. If none is configured, the background page comparison after a scheduled or countdown end will not run.', '1001web-maintenance-launch-pages'),604 __('Some scheduled tasks are more than 30 minutes late, so no server cron job seems to call wp-cron.php. Without one, the background page comparison after a scheduled or countdown end will not run.', '1001web-maintenance-launch-pages'), 569 605 __('Confirm a real cron job calls wp-cron.php every few minutes, or remove DISABLE_WP_CRON.', '1001web-maintenance-launch-pages'), 570 606 __('DISABLE_WP_CRON is true — WordPress will not trigger cron on page loads.', '1001web-maintenance-launch-pages') -
1001web-maintenance-launch-pages/trunk/includes/class-frontend.php
r3759890 r3761969 58 58 $mgenius_mode = isset( $this->settings['page_mode'] ) ? $this->settings['page_mode'] : 'maintenance'; 59 59 $mgenius_title = isset( $this->settings['title'] ) ? (string) $this->settings['title'] : ''; 60 if ( '' === $mgenius_title || in_array( $mgenius_title, array( MGENIUS_Settings::default_title_for( 'maintenance' ), MGENIUS_Settings::default_title_for( 'coming_soon' ) ), true ) ) { 60 $mgenius_en = MGENIUS_Settings::untouched_english_defaults(); 61 if ( '' === $mgenius_title || in_array( $mgenius_title, array( MGENIUS_Settings::default_title_for( 'maintenance' ), MGENIUS_Settings::default_title_for( 'coming_soon' ) ), true ) || in_array( trim( $mgenius_title ), $mgenius_en['title'], true ) ) { 61 62 $this->settings['title'] = MGENIUS_Settings::default_title_for( $mgenius_mode ); 63 } 64 // v2.9.181 — message par défaut anglais jamais modifié : texte traduit. 65 $mgenius_msg = isset( $this->settings['message'] ) ? trim( wp_strip_all_tags( (string) $this->settings['message'] ) ) : ''; 66 if ( in_array( $mgenius_msg, $mgenius_en['message'], true ) ) { 67 $this->settings['message'] = __( 'We are updating our website. We will be back very soon.', '1001web-maintenance-launch-pages' ); 62 68 } 63 69 } -
1001web-maintenance-launch-pages/trunk/includes/class-healthcheck.php
r3759890 r3761969 683 683 global $wpdb; 684 684 685 // v2.9.181 — langue des messages enregistrés (voir health-card.php). 686 if (self::RESULT_OPTION === $key && is_array($value) && !empty($value)) { 687 $value['locale'] = get_user_locale(); 688 } 689 685 690 $serialized = maybe_serialize($value); 686 691 -
1001web-maintenance-launch-pages/trunk/includes/class-settings.php
r3759890 r3761969 45 45 /* translators: %s: site name */ 46 46 return sprintf( __( '%s is coming soon', '1001web-maintenance-launch-pages' ), $name ); 47 } 48 49 /** 50 * v2.9.181 — Titres et messages par défaut ENGLISH, jamais modifiés. 51 * Enregistrés avant que la traduction du site soit installée (ou par les 52 * versions antérieures), ils restaient en anglais sur un site français. 53 * La page visiteur les remplace par le texte par défaut traduit ; un 54 * texte écrit par l'administrateur n'est jamais touché. 55 * 56 * @return array{title:string[], message:string[]} 57 */ 58 public static function untouched_english_defaults() { 59 $name = trim( wp_specialchars_decode( (string) get_bloginfo( 'name' ), ENT_QUOTES ) ); 60 return array( 61 'title' => array( 62 'Site Under Maintenance', 63 'Coming soon', 64 $name . ' will be back shortly', 65 $name . ' is coming soon', 66 ), 67 'message' => array( 68 'We are currently performing maintenance. We will be back soon.', 69 'We are updating our website. We will be back very soon.', 70 ), 71 ); 47 72 } 48 73 -
1001web-maintenance-launch-pages/trunk/readme.txt
r3759890 r3761969 5 5 Tested up to: 7.1 6 6 Requires PHP: 7.4 7 Stable tag: 2.9.18 07 Stable tag: 2.9.181 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 170 170 171 171 **7. 1001Web support** (optional, only when you send a support request) 172 - How: an email is sent to assistance@1001web.cawith your own site's mail configuration. No HTTP request is made to a 1001Web server. The screen also links to client.1001web.ca, our support desk; that is a plain link.172 - How: an email is sent to the 1001Web support team with your own site's mail configuration. No HTTP request is made to a 1001Web server. The screen also links to client.1001web.ca, our support desk; that is a plain link. 173 173 - When: only when you fill in the Request assistance form, confirm your consent and click send. 174 174 - Data sent: your message, the email address you enter, and a technical report (site address, WordPress, PHP and MySQL versions, server software and limits, language and time zone, theme, active and must-use plugins, detected cache plugins, plugin settings state, diagnostic results). The report can be read in full before sending. … … 207 207 == Changelog == 208 208 209 = 2.9.181 = 210 * Support tab, Useful Links: a new button opens the setup wizard again. Nothing changes until its last step, and "Skip wizard" changes nothing. 211 * Diagnostic and "Last update check": a result saved in another language is now flagged, with a prompt to run the check again, instead of being shown as is. 212 * Visitor page: a title or message still equal to an English default (never edited) now shows the default text in the site language. 213 * Diagnostic: with WP-Cron disabled, the check now looks at the task queue. If no task is more than 30 minutes late, it confirms that a server cron job runs them, instead of always warning. 214 * Visitor statistics: the numbers no longer overlap their labels, and the "Since" date follows the site date format. 215 * Readme: the support request section no longer shows an internal email address. 216 209 217 = 2.9.180 = 210 218 * In Coming Soon mode (and in maintenance without the 503 option), robots.txt now returns a plain "Disallow: /" file and XML sitemaps return 404, instead of the HTML page with a 200 that crawlers read as an invalid file. The 503 maintenance page is unchanged. -
1001web-maintenance-launch-pages/trunk/templates/admin-page.php
r3759890 r3761969 2219 2219 <div style="display: flex; gap: 20px; flex-wrap: wrap;"> 2220 2220 <div style="background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); border-radius: 12px; padding: 20px 30px; text-align: center; flex: 1; min-width: 150px;"> 2221 <div style="font-size: 36px; font-weight: bold; color: #fff;" id="mg-stats-visits-count"><?php echo esc_html(number_format_i18n($stats_visits)); ?></div>2221 <div style="font-size: 36px; line-height: 1.2; margin-bottom: 4px; font-weight: bold; color: #fff;" id="mg-stats-visits-count"><?php echo esc_html(number_format_i18n($stats_visits)); ?></div> 2222 2222 <div style="font-size: 14px; color: rgba(255,255,255,0.8);"><?php esc_html_e('Total visits', '1001web-maintenance-launch-pages'); ?></div> 2223 2223 </div> 2224 2224 <div style="background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%); border-radius: 12px; padding: 20px 30px; text-align: center; flex: 1; min-width: 150px;"> 2225 <div style="font-size: 36px; font-weight: bold; color: #fff;" id="mg-stats-unique-count"><?php echo esc_html(number_format_i18n($stats_unique)); ?></div>2225 <div style="font-size: 36px; line-height: 1.2; margin-bottom: 4px; font-weight: bold; color: #fff;" id="mg-stats-unique-count"><?php echo esc_html(number_format_i18n($stats_unique)); ?></div> 2226 2226 <div style="font-size: 14px; color: rgba(255,255,255,0.8);"><?php esc_html_e('Unique visitors', '1001web-maintenance-launch-pages'); ?></div> 2227 2227 </div> … … 2230 2230 <?php if ($stats_start): ?> 2231 2231 <p style="margin-top: 15px; color: #666; font-size: 13px; text-align: center;"> 2232 📅 <?php esc_html_e('Since', '1001web-maintenance-launch-pages'); ?> <?php echo esc_html( date_i18n('F j, Y H:i', strtotime($stats_start)) ); ?> 2232 📅 <?php esc_html_e('Since', '1001web-maintenance-launch-pages'); ?> <?php 2233 // v2.9.181 — format de date du site ; date locale lue dans le fuseau du site. 2234 $mgenius_stats_ts = MGENIUS_Settings::local_to_timestamp($stats_start); 2235 echo esc_html( $mgenius_stats_ts ? wp_date( get_option('date_format') . ' ' . get_option('time_format'), $mgenius_stats_ts ) : $stats_start ); 2236 ?> 2233 2237 </p> 2234 2238 <?php endif; ?> … … 2670 2674 </div> 2671 2675 2676 <?php if (class_exists('MGENIUS_Diagnostic') && MGENIUS_Diagnostic::results_in_other_language($mgenius_diag_results)) : ?> 2677 <p class="mg-diag-lang-note" id="mg-diag-lang-note">ℹ️ <?php esc_html_e('These results come from an analysis run in another language. Click Run analysis to see them in your language.', '1001web-maintenance-launch-pages'); ?></p> 2678 <?php endif; ?> 2672 2679 <div class="mg-diag-results" id="mg-diag-results"> 2673 2680 <?php … … 3005 3012 <span><?php esc_html_e('1001Web™ Website', '1001web-maintenance-launch-pages'); ?></span> 3006 3013 </a> 3014 <button type="button" class="mg-help-link" id="mg-wizard-relaunch"> 3015 <span class="mg-help-icon">🧭</span> 3016 <span><?php esc_html_e('Open the setup wizard again', '1001web-maintenance-launch-pages'); ?></span> 3017 </button> 3007 3018 </div> 3008 3019 </div> -
1001web-maintenance-launch-pages/trunk/templates/health-card.php
r3759890 r3761969 45 45 } 46 46 ?></p> 47 <?php 48 // v2.9.181 — message enregistré dans une autre langue (avant la 2.9.181 : présumé anglais). 49 $mgenius_hc_locale = ! empty( $mgenius_hc_result['locale'] ) ? (string) $mgenius_hc_result['locale'] : ''; 50 $mgenius_hc_other = $mgenius_hc_status && ( '' !== $mgenius_hc_locale ? $mgenius_hc_locale !== get_user_locale() : 0 !== strpos( get_user_locale(), 'en' ) ); 51 if ( $mgenius_hc_other ) : 52 ?> 53 <p class="mg-health-card-lang" id="mg-health-card-lang">ℹ️ <?php esc_html_e( 'This result was recorded in another language. Check again to see it in your language.', '1001web-maintenance-launch-pages' ); ?></p> 54 <?php endif; ?> 47 55 <ul class="mg-health-card-list" id="mg-health-card-list"> 48 56 <?php
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)