Skip to content

Commit 56a4385

Browse files
committed
Check for safe mode constant before executing any code
1 parent 35f8f1f commit 56a4385

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

php/snippet-ops.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ function update_snippet_fields( $snippet_id, $fields, $network = null ) {
350350
*/
351351
function execute_snippet( $code, $id = 0, $catch_output = true ) {
352352

353-
if ( empty( $code ) ) {
353+
if ( empty( $code ) || defined( 'CODE_SNIPPETS_SAFE_MODE' ) && CODE_SNIPPETS_SAFE_MODE ) {
354354
return false;
355355
}
356356

0 commit comments

Comments
 (0)