Theme callback for the default batch page.
function _system_batch_theme() {
// Retrieve the current state of the batch.
$batch =& batch_get();
if (!$batch && isset($_REQUEST['id'])) {
$batch = Drupal::service('batch.storage')
->load($_REQUEST['id']);
}
// Use the same theme as the page that started the batch.
if (!empty($batch['theme'])) {
return $batch['theme'];
}
}