'render_block_core_legacy_widget', ) ); } add_action( 'init', 'register_block_core_legacy_widget', 20 ); /** * Intercepts any request with legacy-widget-preview in the query param and, if * set, renders a page containing a preview of the requested Legacy Widget * block. */ function handle_legacy_widget_preview_iframe() { if ( empty( $_GET['legacy-widget-preview'] ) ) { return; } if ( ! current_user_can( 'edit_theme_options' ) ) { return; } define( 'IFRAME_REQUEST', true ); ?> >
>