WordPress Gutenberg react make import of __experimentalUseInnerBlocksProps which is no more experimetal

Ok, this is probably the easiest workaround I was able to find, but if someone has better idea, then feel free to post it here 😉 import { __experimentalUseInnerBlocksProps, useInnerBlocksProps, } from ‘@wordpress/block-editor’; if( typeof useInnerBlocksProps == ‘undefined’ ){ var compatibleUseInnerBlocksProps = __experimentalUseInnerBlocksProps; }else{ var compatibleUseInnerBlocksProps = useInnerBlocksProps; } so basically I can import both … Read more

Gutenberg: how to hide server side render output in the editor but keep it in frontend?

This can be down in the php render_function. Check if it is an API REST request: function create_block() { register_block_type( __DIR__ ,[ ‘render_callback’ => ‘render_php’ ] ); } function render_php(){ if ( defined( ‘REST_REQUEST’ ) && REST_REQUEST ) { return “<p>Backend says hello from php</p>”; } else { return “<p>Frontend says hello from php</p>”; }; … Read more