wp_use_widgets_block_editor example

endif;

if ( $wp_customize->is_ios() ) {
    $body_class .= ' ios';
}

if ( is_rtl() ) {
    $body_class .= ' rtl';
}
$body_class .= ' locale-' . sanitize_html_class( strtolower( str_replace( '_', '-', get_user_locale() ) ) );

if ( wp_use_widgets_block_editor() ) {
    $body_class .= ' wp-embed-responsive';
}

$admin_title = sprintf( $wp_customize->get_document_title_template()__( 'Loading…' ) );

?> <title><?php echo esc_html( $admin_title ); ?></title> <script type="text/javascript"> var ajaxurl = <?php echo wp_json_encode( admin_url( 'admin-ajax.php', 'relative' ) ); ?>, pagenow = 'customize'; </script>

}

if ( ! current_theme_supports( 'widgets' ) ) {
    wp_die( __( 'The theme you are currently using is not widget-aware, meaning that it has no sidebars that you are able to change. For information on making your theme widget-aware, please <a href="https://developer.wordpress.org/themes/functionality/widgets/">follow these instructions</a>.' ) );
}

// Used in the HTML title tag. $title       = __( 'Widgets' );
$parent_file = 'themes.php';

if ( wp_use_widgets_block_editor() ) {
    require ABSPATH . 'wp-admin/widgets-form-blocks.php';
} else {
    require ABSPATH . 'wp-admin/widgets-form.php';
}

    public function customize_register() {
        global $wp_registered_widgets$wp_registered_widget_controls$wp_registered_sidebars;

        $use_widgets_block_editor = wp_use_widgets_block_editor();

        add_filter( 'sidebars_widgets', array( $this, 'preview_sidebars_widgets' ), 1 );

        $sidebars_widgets = array_merge(
            array( 'wp_inactive_widgets' => array() ),
            array_fill_keys( array_keys( $wp_registered_sidebars ), array() ),
            wp_get_sidebars_widgets()
        );

        $new_setting_ids = array();

        
Home | Imprint | This part of the site doesn't use cookies.