| @@ -697,21 +697,8 @@ | ||
| 697 | 697 | <li><strong><?php esc_html_e('On User Interaction:', 'mxchat'); ?></strong> <?php esc_html_e('Script loads when user scrolls, moves mouse, or touches screen. Best for Core Web Vitals but chat appears with slight delay.', 'mxchat'); ?></li> |
| 698 | 698 | </ul> |
| 699 | 699 | </div> |
| 700 | 700 | </div> |
| 701 | - | |
| 702 | - <?php | |
| 703 | - // Plan b76ed6 (Support Ticket 468): the floating launcher is rendered hidden | |
| 704 | - // and revealed by chat-script.js, so a cache plugin's "Delay JavaScript" | |
| 705 | - // that holds the script until the visitor interacts shows no chatbot at all. | |
| 706 | - ?> | |
| 707 | - <div class="mxch-notice mxch-notice-warning" style="margin-top: 16px;"> | |
| 708 | - <svg class="mxch-notice-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"/><line x1="12" y1="9" x2="12" y2="13"/><line x1="12" y1="17" x2="12.01" y2="17"/></svg> | |
| 709 | - <div> | |
| 710 | - <strong><?php esc_html_e('Using Delay JavaScript in a cache or performance plugin?', 'mxchat'); ?></strong> | |
| 711 | - <?php esc_html_e('Leave chat-script.js out of the delay (FlyingPress, WP Rocket, LiteSpeed Cache and Perfmatters all have an exclusion list). The chat launcher stays hidden until that script runs, so a page that holds it back until the visitor interacts shows no chatbot. If you want the script delayed, pick a strategy above instead: MxChat then loads it on interaction or after a short wait.', 'mxchat'); ?> | |
| 712 | - </div> | |
| 713 | - </div> | |
| 714 | 701 | </div> |
| 715 | 702 | </div> |
| 716 | 703 | |
| 717 | 704 | <!-- Page Cache Compatibility Card --> |
| @@ -721,19 +708,9 @@ | ||
| 721 | 708 | <svg class="mxch-card-title-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"/><polyline points="3.27 6.96 12 12.01 20.73 6.96"/><line x1="12" y1="22.08" x2="12" y2="12"/></svg> |
| 722 | 709 | <?php esc_html_e('Page Cache Compatibility', 'mxchat'); ?> |
| 723 | 710 | </h3> |
| 724 | 711 | </div> |
| 725 | - <div class="mxch-card-body mxchat-autosave-section"> | |
| 726 | - <?php | |
| 727 | - // Page-cache purge on settings save (plan b76ed6, Support Ticket 468). | |
| 728 | - // Standalone option, default ON — never part of mxchat_options, so | |
| 729 | - // mxchat_sanitize() cannot strip it. Read by MxChat_Cache_Purge. | |
| 730 | - mxchat_render_field_wrapper('mxchat_cache_purge_enabled', __('Clear page cache when MxChat settings change', 'mxchat'), function() use ($admin_instance) { | |
| 731 | - $admin_instance->mxchat_cache_purge_toggle_callback(); | |
| 732 | - }, __('On, MxChat clears the page caches it can reach (WP Rocket, LiteSpeed Cache, W3 Total Cache, WP Super Cache, FlyingPress) after its settings are saved, at most once every 30 seconds, so visitors do not keep seeing the old chatbot. Off, nothing is cleared: clear your page cache yourself after changing the chatbot. Turn it off on a large site where every save would throw away the whole cache.', 'mxchat'), | |
| 733 | - __('Developers can narrow which settings trigger the clear with the mxchat_cache_purge_watched_options filter.', 'mxchat')); | |
| 734 | - ?> | |
| 735 | - | |
| 712 | + <div class="mxch-card-body"> | |
| 736 | 713 | <p class="mxch-field-description" style="margin-top: 0;"><?php esc_html_e('MxChat\'s chat send (and stream send, plus PDF / Word upload) all POST to /wp-admin/admin-ajax.php. Page-cache plugins occasionally cache those responses, which breaks the per-session nonce flow on the first message. MxChat auto-tells the five most common cache plugins to never cache chat AJAX via their own filter APIs — no setup needed for those. For other cache plugins (or Cloudflare APO), copy the manual exclusion string into your cache plugin\'s exclusion list.', 'mxchat'); ?></p> |
| 737 | 714 | |
| 738 | 715 | <?php |
| 739 | 716 | $mxch_cache_rows = array( |