How do you render_callback for register_block_type to a method in another class?
Option 1 is the solution, here’s a smaller example: $obj = new Obj(); …. register_block_type( ‘my-plugin/my-block’, [ ‘editor_script’ => ‘editor-script-handle’, ‘render_callback’ => [ $obj, ‘block_save_function’ ] ] ); In that code [ $obj, ‘block_save_function’ ] is equivalent to $obj->block_save_function(…. The important thing to note, is that render_callback‘s value is a PHP callable type. You need … Read more