"hooked-block-{$relative_position}-" . str_replace( 'core/', '', $anchor_block['blockName'] ), ); $hooked_block['innerContent'] = array( sprintf( '

This block was inserted by the Block Hooks API in the %2$s position next to the %3$s anchor block.

', $hooked_block['attrs']['className'], $relative_position, $anchor_block['blockName'] ), ); } return $hooked_block; } add_filter( 'hooked_block_core/paragraph', 'gutenberg_test_set_hooked_block_inner_html', 10, 4 ); function gutenberg_register_wp_ignored_hooked_blocks_meta() { register_post_meta( 'post', '_wp_ignored_hooked_blocks', array( 'show_in_rest' => true, 'single' => true, 'type' => 'string', 'auth_callback' => function () { return current_user_can( 'edit_posts' ); }, ) ); } add_action( 'rest_api_init', 'gutenberg_register_wp_ignored_hooked_blocks_meta' );