{"id":12184817,"date":"2019-11-28T11:06:36","date_gmt":"2019-11-28T11:06:36","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/ids-missing-from-render-callback\/"},"modified":"2019-11-28T11:06:36","modified_gmt":"2019-11-28T11:06:36","slug":"ids-missing-from-render-callback","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/ids-missing-from-render-callback\/","title":{"rendered":"[ids] missing from render callback"},"content":{"rendered":"<p>i hook into gallery render callback and noticed when i enable your plugin, the ids of each image is missing in the callback function. <\/p>\n<pre><code>function foo_check_block() {\n    register_block_type( &#039;core\/gallery&#039;, array(\n        &#039;render_callback&#039; =&gt; &#039;foo_block_gallery_render&#039;,\n    ) );\n}\nadd_action( &#039;init&#039;, &#039;foo_check_block&#039; );\nfunction foo_block_gallery_render( $attributes, $content ) {\n    write_log($attributes);    \n    return $content;\n}<\/code><\/pre>\n<p>print_r:<\/p>\n<pre><code>[28-Nov-2019 11:01:54 UTC] Array\n(\n    [ids] =&gt; Array\n        (\n            [0] =&gt; 1317\n            [1] =&gt; 1316\n            [2] =&gt; 1315\n            [3] =&gt; 1314\n            [4] =&gt; 1313\n            [5] =&gt; 1312\n        )\n\n    [imageCrop] =&gt; \n    [linkTo] =&gt; media\n)<\/code><\/pre>\n<p>with your plugin:<\/p>\n<pre><code>[28-Nov-2019 11:01:54 UTC] Array\n(\n    [imageCrop] =&gt; \n    [linkTo] =&gt; media\n)<\/code><\/pre>\n<p>why? can you please insert ids. thank you<\/p>\n","protected":false},"template":"","class_list":["post-12184817","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/12184817","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/12184817\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=12184817"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}