Do not redirect for WP-CLI (#1891)
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user