Conditions | 3 |
Paths | 3 |
Total Lines | 19 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
18 | public function handle($request, \Closure $next) |
||
19 | { |
||
20 | /** @var Response $response */ |
||
21 | $response = $next($request); |
||
22 | |||
23 | // do not render galleries on backend |
||
24 | if (app('asgard.onBackend') === true) { |
||
25 | return $response; |
||
26 | } |
||
27 | |||
28 | // if this is not a standard Response, return right away |
||
29 | if(!$response instanceof Response) { |
||
30 | return $response; |
||
31 | } |
||
32 | |||
33 | $response->setContent($this->replaceShortcodes($response->getContent())); |
||
34 | |||
35 | return $response; |
||
36 | } |
||
37 | |||
60 |