Skip to content

Commit

Permalink
Do not redirect for WP-CLI (#1891)
Browse files Browse the repository at this point in the history
  • Loading branch information
tobeycodes authored and QWp6t committed May 19, 2017
1 parent 62bba1b commit 74b485b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions resources/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@
});
if ($sage_views !== get_option('stylesheet')) {
update_option('stylesheet', $sage_views);
if (php_sapi_name() === 'cli') {
return;
}
wp_redirect($_SERVER['REQUEST_URI']);
exit();
}

0 comments on commit 74b485b

Please sign in to comment.