| @@ -104,9 +104,9 @@ | ||
| 104 | 104 | 'id' => $id, |
| 105 | 105 | 'name' => $shortcode['name'], |
| 106 | 106 | 'description' => $shortcode['description'] ?? '', |
| 107 | 107 | 'layout' => $shortcode['layout'], |
| 108 | - 'medias' => serialize( $shortcode['medias'] ), | |
| 108 | + 'medias' => serialize( Meow_MGL_Core::normalize_medias( $shortcode['medias'] ?? null ) ), | |
| 109 | 109 | 'lead_image_id' => $shortcode['lead_image_id'] ?? null, |
| 110 | 110 | 'order_by' => $shortcode['order_by'] ?? null, |
| 111 | 111 | 'is_post_mode' => ( isset( $shortcode['is_post_mode'] ) && $shortcode['is_post_mode'] ) ? 1 : 0, |
| 112 | 112 | 'is_hero_mode' => isset( $shortcode['hero'] ) && $shortcode['hero'] ? 1 : 0, |
| @@ -131,10 +131,8 @@ | ||
| 131 | 131 | 'name' => $collection['name'], |
| 132 | 132 | 'description' => $collection['description'] ?? '', |
| 133 | 133 | 'layout' => $collection['layout'], |
| 134 | 134 | 'galleries_ids' => serialize( $collection['galleries_ids'] ), |
| 135 | - 'tags' => isset( $collection['tags'] ) ? serialize( $collection['tags'] ) : null, | |
| 136 | - 'dynamic_source' => $collection['dynamic_source'] ?? null, | |
| 137 | 135 | 'updated_at' => date( 'Y-m-d H:i:s', $collection['updated'] ) |
| 138 | 136 | ) |
| 139 | 137 | ); |
| 140 | 138 | } |