Do not redirect for WP-CLI (#1891)

This commit is contained in:
Toby Schrapel
2017-05-19 16:22:23 -05:00
committed by QWp6t
parent 62bba1bd23
commit 74b485be95

View File

@@ -86,6 +86,9 @@ add_filter('stylesheet_directory_uri', function ($uri) {
});
if ($sage_views !== get_option('stylesheet')) {
update_option('stylesheet', $sage_views);
if (php_sapi_name() === 'cli') {
return;
}
wp_redirect($_SERVER['REQUEST_URI']);
exit();
}