Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

Commit

Permalink
Merge pull request #236 from Twansparant/ajax-relative-urls
Browse files Browse the repository at this point in the history
Add ajax support for relative urls module
  • Loading branch information
retlehs authored Dec 7, 2019
2 parents 794226e + e60e1b0 commit 4e60b4e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion modules/relative-urls.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
4 changes: 2 additions & 2 deletions soil.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 4e60b4e

Please sign in to comment.