Skip to content

Commit c967917

Browse files
author
Marco Pereirinha
committed
Maybe make the content iterable
1 parent a7fd186 commit c967917

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

php/class-delivery.php

+7-1
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,14 @@ public function filter_out_cloudinary( $content ) {
224224
'video' => Api::generate_transformation_string( $video, 'video' ),
225225
);
226226
}
227-
$unslashed = false;
227+
$unslashed = false;
228228
$working_content = $content;
229+
if ( is_string( $working_content ) && ! is_numeric( $working_content ) ) {
230+
$maybe_encoded = json_decode( $working_content, false );
231+
if ( ! is_null( $maybe_encoded ) ) {
232+
$working_content = $maybe_encoded;
233+
}
234+
}
229235
if ( String_Replace::is_iterable( $working_content ) ) {
230236
$working_content = $this->plugin->components['replace']->flatten( $working_content );
231237
} else {

0 commit comments

Comments
 (0)