Trouble with WordPress Gallery since update using has_block(‘gallery’
There are 2 core problems here: has_block(‘gallery’, $post->post_content) should never have worked as there is no block named gallery, the core block is named core/gallery While the gallery block used an attribute similar to the shortcodes in the past, modern gallery blocks are containers that contain image blocks As a bonus, the code in your … Read more