wp-includes/blocks/legacy-widget.php


Lines:

1 to 23 of 23
<?php

/**
 * Server-side rendering of the `core/legacy-widget` block.
 *
 * @package WordPress
 */

/* function render_block_core_legacy_widget() – Renders the ‘core/legacy-widget’ block. */

/* function register_block_core_legacy_widget() – Registers the ‘core/legacy-widget’ block. */

add_action( 'init', 'register_block_core_legacy_widget' );

/* function handle_legacy_widget_preview_iframe() – 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. */

// Use admin_init instead of init to ensure get_current_screen function is already available.
// This isn't strictly required, but enables better compatibility with existing plugins.
// See: https://github.com/WordPress/gutenberg/issues/32624.
add_action( 'admin_init', 'handle_legacy_widget_preview_iframe', 20 );
 

 View on GitHub View on Trac

Called by

    Invoked by

      Calls

      Call hooks

      API Letters: ,,,