Skip to content

Commit 37646e3

Browse files
authored
Refactor wrap_code to apply filters before concatenation
1 parent d4c350c commit 37646e3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/php/flat-files/handlers/php-snippet-handler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public function get_dir_name(): string {
1212
}
1313

1414
public function wrap_code( string $code ): string {
15-
$code = "<?php\n\n" . $code;
16-
return apply_filters( 'code_snippets_php_snippet_file_code', $code );
15+
$output = "<?php\n\n" . apply_filters( 'code_snippets_php_snippet_file_code', $code );
16+
return $output;
1717
}
1818
}

0 commit comments

Comments
 (0)