IP : 52.14.162.200Hostname : server86.web-hosting.comKernel : Linux server86.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64Disable Function : None :) OS : Linux
PATH:
/
home/
servlmvm/
public_html/
wp-includes/
blocks/
./
legacy-widget.php/
/
<?php /** * Server-side rendering of the `core/legacy-widget` block. * * @package WordPress */
/** * Renders the 'core/legacy-widget' block. * * @since 5.8.0 * * @global int $wp_widget_factory. * * @param array $attributes The block attributes. * * @return string Rendered block. */ function render_block_core_legacy_widget( $attributes ) { global $wp_widget_factory;
/** * 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. * * @since 5.8.0 */ function handle_legacy_widget_preview_iframe() { if ( empty( $_GET['legacy-widget-preview'] ) ) { return; }
if ( ! current_user_can( 'edit_theme_options' ) ) { return; }
// 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 );