Browse Source

:recycle: double blocks in api return

tags/1.0.1^2^2
J 3 years ago
parent
commit
8abdb31057
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      plugins/cia-endpoints/includes/reformat-blocks.php

+ 2
- 1
plugins/cia-endpoints/includes/reformat-blocks.php View File

@@ -2,8 +2,9 @@
2 2
     function get_ids_from_gallery_block($blocks){
3 3
         $parsed_blocks = array();
4 4
         foreach ($blocks as $block) {
5
+            array_push($parsed_blocks, $block[attrs]);
5 6
             if($block[blockName] === "core/gallery") {
6
-                array_push($parsed_blocks, $block);
7
+                array_push($parsed_bl, $block[attrs]);
7 8
             } elseif ($block[blockName] === "core/image") {
8 9
                 $ids = [];
9 10
                 $galleryFormat = [];

Loading…
Cancel
Save