芝麻web文件管理V1.00
编辑当前文件:/home2/sdektunc/cepali.edu.mx/wp-admin/network/widgets-form-blocks.php
is_block_editor( true ); $block_editor_context = new WP_Block_Editor_Context( array( 'name' => 'core/edit-widgets' ) ); $preload_paths = array( array( rest_get_route_for_post_type_items( 'attachment' ), 'OPTIONS' ), '/wp/v2/widget-types?context=edit&per_page=-1', '/wp/v2/sidebars?context=edit&per_page=-1', '/wp/v2/widgets?context=edit&per_page=-1&_embed=about', ); block_editor_rest_api_preload( $preload_paths, $block_editor_context ); $editor_settings = get_block_editor_settings( array_merge( get_legacy_widget_block_editor_settings(), array( 'styles' => get_block_editor_theme_styles() ) ), $block_editor_context ); // The widgets editor does not support the Block Directory, so don't load any of // its assets. This also prevents 'wp-editor' from being enqueued which we // cannot load in the widgets screen because many widget scripts rely on `wp.editor`. remove_action( 'enqueue_block_editor_assets', 'wp_enqueue_editor_block_directory_assets' ); wp_add_inline_script( 'wp-edit-widgets', sprintf( 'wp.domReady( function() { wp.editWidgets.initialize( "widgets-editor", %s ); } );', wp_json_encode( $editor_settings ) ) ); // Preload server-registered block schemas. wp_add_inline_script( 'wp-blocks', 'wp.blocks.unstable__bootstrapServerSideBlockDefinitions(' . wp_json_encode( get_block_editor_server_block_settings() ) . ');' ); wp_add_inline_script( 'wp-blocks', sprintf( 'wp.blocks.setCategories( %s );', wp_json_encode( get_block_categories( $block_editor_context ) ) ), 'after' ); wp_enqueue_script( 'wp-edit-widgets' ); wp_enqueue_script( 'admin-widgets' ); wp_enqueue_style( 'wp-edit-widgets' ); /** This action is documented in wp-admin/edit-form-blocks.php */ do_action( 'enqueue_block_editor_assets' ); /** This action is documented in wp-admin/widgets-form.php */ do_action( 'sidebar_admin_setup' ); require_once ABSPATH . 'wp-admin/admin-header.php'; /** This action is documented in wp-admin/widgets-form.php */ do_action( 'widgets_admin_page' ); ?>
Classic Widgets plugin.' ), esc_url( $plugin_activate_url ) ); } else { // If Classic Widgets is not installed, provide a link to install it. $installed = false; $plugin_install_url = wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=classic-widgets' ), 'install-plugin_classic-widgets' ); $message = sprintf( /* translators: %s: A link to install the Classic Widgets plugin. */ __( 'The block widgets require JavaScript. Please enable JavaScript in your browser settings, or install the
Classic Widgets plugin
.' ), esc_url( $plugin_install_url ) ); } /** * Filters the message displayed in the block widget interface when JavaScript is * not enabled in the browser. * * @since 6.4.0 * * @param string $message The message being displayed. * @param bool $installed Whether the Classic Widget plugin is installed. */ $message = apply_filters( 'block_widgets_no_javascript_message', $message, $installed ); wp_admin_notice( $message, array( 'type' => 'error', 'additional_classes' => array( 'hide-if-js' ), ) ); ?>