diff --git a/modules/relative-urls.php b/modules/relative-urls.php index 755ab2d5..bfaf15bf 100644 --- a/modules/relative-urls.php +++ b/modules/relative-urls.php @@ -14,7 +14,7 @@ * add_theme_support('soil-relative-urls'); */ -if (is_admin() || isset($_GET['sitemap']) || in_array($GLOBALS['pagenow'], ['wp-login.php', 'wp-register.php'])) { +if ((is_admin() && !wp_doing_ajax()) || isset($_GET['sitemap']) || in_array($GLOBALS['pagenow'], ['wp-login.php', 'wp-register.php'])) { return; } diff --git a/soil.php b/soil.php index 39992ac1..ef3ca016 100644 --- a/soil.php +++ b/soil.php @@ -55,8 +55,8 @@ public function set($options) { function load_modules() { global $_wp_theme_features; - // Skip loading modules in the admin. - if (is_admin()) { + // Skip loading modules in the admin but allow in ajax actions. + if ((is_admin() && !wp_doing_ajax())) { return; }