PluginProbe
MxChat – AI Chatbot & Content Generation for WordPress / 3.2.23
MxChat – AI Chatbot & Content Generation for WordPress v3.2.23
3.2.25 3.2.24 3.2.23 3.2.22 3.2.21 3.2.20 3.2.19 3.2.18 3.2.17 3.2.16 3.2.15 3.2.14 3.2.12 3.2.13 3.2.11 3.2.10 3.2.9 3.2.8 3.2.7 3.2.6 3.2.5 3.2.4 3.2.3 3.2.2 3.2.1 All 156 releases
← All changes | includes/class-mxchat-cache-purge.php +11 -2 3.2.9 → 3.2.23 View file →
@@ -59,13 +59,22 @@
59 59
60 60 /**
61 61 * Option names whose writes trigger a page-cache purge.
62 62 *
63 + * Defaults cover every option whose values reach the cached page's inline
64 + * widget payload: mxchat_options (settings/behavior gates),
65 + * mxchat_theme_options (active AI theme CSS + bot theme assignments —
66 + * written only by the MxChat Theme add-on's admin AJAX actions), and
67 + * mxchat_prompts_options (Pinecone toggle — written only by the prompts
68 + * autosave). All write sites are admin-action-driven; the debounce
69 + * absorbs back-to-back writes like apply-and-save.
70 + *
63 71 * @return string[]
64 72 */
65 73 private function watched_options() {
66 - $options = apply_filters('mxchat_cache_purge_watched_options', array('mxchat_options'));
67 - return is_array($options) ? array_filter(array_map('strval', $options)) : array('mxchat_options');
74 + $defaults = array('mxchat_options', 'mxchat_theme_options', 'mxchat_prompts_options');
75 + $options = apply_filters('mxchat_cache_purge_watched_options', $defaults);
76 + return is_array($options) ? array_filter(array_map('strval', $options)) : $defaults;
68 77 }
69 78
70 79 /**
71 80 * Coalesce all option writes in this request into one shutdown purge.