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 #178 from DrewAPicture/skip-admin
Browse files Browse the repository at this point in the history
Skip loading modules in the admin to prevent unintended breakage.
  • Loading branch information
retlehs authored Mar 12, 2017
2 parents 76c9ecf + 4c0f3cd commit 0384c6b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions soil.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ public function set($options) {

function load_modules() {
global $_wp_theme_features;

// Skip loading modules in the admin.
if (is_admin()) {
return;
}

foreach (glob(__DIR__ . '/modules/*.php') as $file) {
$feature = 'soil-' . basename($file, '.php');
if (isset($_wp_theme_features[$feature])) {
Expand Down

0 comments on commit 0384c6b

Please sign in to comment.