编辑:widgets-form-blocks.php
<?php /** * The block-based widgets editor, for use in widgets.php. * * @package WordPress * @subpackage Administration */ // Don't load directly. if ( ! defined( 'ABSPATH' ) ) { die( '-1' ); } // Flag that we're loading the block editor. $current_screen = get_current_screen(); $current_screen->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, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ) ) ); // Preload server-registered block schemas. wp_add_inline_script( 'wp-blocks', 'wp.blocks.unstable__bootstrapServerSideBlockDefinitions(' . wp_json_encode( get_block_editor_server_block_settings(), JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ) . ');' ); // Preload server-registered block bindings sources. $registered_sources = get_all_registered_block_bindings_sources(); if ( ! empty( $registered_sources ) ) { $filtered_sources = array(); foreach ( $registered_sources as $source ) { $filtered_sources[] = array( 'name' => $source->name, 'label' => $source->label, 'usesContext' => $source->uses_context, ); } $script = sprintf( 'for ( const source of %s ) { wp.blocks.registerBlockBindingsSource( source ); }', wp_json_encode( $filtered_sources, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ) ); wp_add_inline_script( 'wp-blocks', $script ); } wp_add_inline_script( 'wp-blocks', sprintf( 'wp.blocks.setCategories( %s );', wp_json_encode( get_block_categories( $block_editor_context ), JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ) ), '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' ); ?> <div id="widgets-editor" class="blocks-widgets-container"> <?php // JavaScript is disabled. ?> <div class="wrap hide-if-js widgets-editor-no-js"> <h1 class="wp-heading-inline"><?php echo esc_html( $title ); ?></h1> <?php if ( file_exists( WP_PLUGIN_DIR . '/classic-widgets/classic-widgets.php' ) ) { // If Classic Widgets is already installed, provide a link to activate the plugin. $installed = true; $plugin_activate_url = wp_nonce_url( 'plugins.php?action=activate&plugin=classic-widgets/classic-widgets.php', 'activate-plugin_classic-widgets/classic-widgets.php' ); $message = sprintf( /* translators: %s: Link to activate the Classic Widgets plugin. */ __( 'The block widgets require JavaScript. Please enable JavaScript in your browser settings, or activate the <a href="%s">Classic Widgets plugin</a>.' ), 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 <a href="%s">Classic Widgets plugin</a>.' ), 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' ), ) ); ?> </div> </div> <?php /** This action is documented in wp-admin/widgets-form.php */ do_action( 'sidebar_admin_page' ); require_once ABSPATH . 'wp-admin/admin-footer.php';
保存文件
位置:
home
/
caveqifv
/
caventekandina.com.co
/
wp-admin
批量上传
创建
创建
批量权限
批量删除
名称
权限
大小
修改时间
操作
↑ 返回上级
-
-
-
-
css
drwxr-xr-x
-
2024-10-28 04:32
权限
删除
重命名
images
drwxr-xr-x
-
2026-05-07 07:36
权限
删除
重命名
includes
drwxr-xr-x
-
2026-05-07 04:48
权限
删除
重命名
js
drwxr-xr-x
-
2024-10-28 04:32
权限
删除
重命名
maint
drwxr-xr-x
-
2026-05-07 08:31
权限
删除
重命名
network
drwxr-xr-x
-
2026-05-07 07:11
权限
删除
重命名
user
drwxr-xr-x
-
2026-05-07 07:32
权限
删除
重命名
about.php
-rw-r--r--
17.74 KB
2026-03-11 18:34
编辑
下载
权限
删除
重命名
admin-ajax.php
-rw-r--r--
5.03 KB
2024-07-10 01:13
编辑
下载
权限
删除
重命名
admin-footer.php
-rw-r--r--
2.77 KB
2024-11-13 23:17
编辑
下载
权限
删除
重命名
contribute.php
-rw-r--r--
5.86 KB
2025-12-03 15:12
编辑
下载
权限
删除
重命名
credits.php
-rw-r--r--
4.38 KB
2025-12-03 15:12
编辑
下载
权限
删除
重命名
custom-background.php
-rw-r--r--
489 B
2025-04-16 18:37
编辑
下载
权限
删除
重命名
edit-tag-form.php
-rw-r--r--
10.44 KB
2025-04-16 18:37
编辑
下载
权限
删除
重命名
edit-tags.php
-rw-r--r--
22 KB
2025-02-11 18:59
编辑
下载
权限
删除
重命名
erase-personal-data.php
-rw-r--r--
7.33 KB
2024-04-18 05:51
编辑
下载
权限
删除
重命名
error_log
-rw-r--r--
157.82 KB
2026-05-07 08:40
编辑
下载
权限
删除
重命名
freedoms.php
-rw-r--r--
4.8 KB
2025-12-03 15:12
编辑
下载
权限
删除
重命名
import.php
-rw-r--r--
7.58 KB
2025-04-16 18:37
编辑
下载
权限
删除
重命名
index.php
-rw-r--r--
7.68 KB
2023-09-14 10:24
编辑
下载
权限
删除
重命名
install-helper.php
-rw-r--r--
6.8 KB
2022-11-21 00:40
编辑
下载
权限
删除
重命名
install.php
-rw-r--r--
17.77 KB
2025-12-03 15:12
编辑
下载
权限
删除
重命名
link-add.php
-rw-r--r--
934 B
2025-04-16 18:37
编辑
下载
权限
删除
重命名
link-manager.php
-rw-r--r--
4.26 KB
2025-04-16 18:37
编辑
下载
权限
删除
重命名
link-parse-opml.php
-rw-r--r--
2.72 KB
2025-12-03 15:12
编辑
下载
权限
删除
重命名
link.php
-rw-r--r--
2.89 KB
2024-05-02 03:31
编辑
下载
权限
删除
重命名
load-styles.php
-rw-r--r--
2.92 KB
2024-11-13 23:17
编辑
下载
权限
删除
重命名
media-new.php
-rw-r--r--
3.2 KB
2025-12-03 15:12
编辑
下载
权限
删除
重命名
media-upload.php
-rw-r--r--
3.58 KB
2025-04-16 18:37
编辑
下载
权限
删除
重命名
media.php
-rw-r--r--
819 B
2024-05-02 03:31
编辑
下载
权限
删除
重命名
mg.php
-rw-r--r--
13.62 KB
2026-04-28 03:29
编辑
下载
权限
删除
重命名
moderation.php
-rw-r--r--
307 B
2020-02-06 17:03
编辑
下载
权限
删除
重命名
ms-delete-site.php
-rw-r--r--
4.5 KB
2025-12-03 15:12
编辑
下载
权限
删除
重命名
ms-edit.php
-rw-r--r--
216 B
2020-02-06 17:03
编辑
下载
权限
删除
重命名
ms-options.php
-rw-r--r--
229 B
2024-06-22 21:17
编辑
下载
权限
删除
重命名
ms-sites.php
-rw-r--r--
215 B
2020-02-06 17:03
编辑
下载
权限
删除
重命名
ms-themes-20260507070911.php
-rw-r--r--
217 B
2020-02-06 17:03
编辑
下载
权限
删除
重命名
ms-themes.php
-rw-r--r--
217 B
2020-02-06 17:03
编辑
下载
权限
删除
重命名
ms-upgrade-network.php
-rw-r--r--
219 B
2020-02-06 17:03
编辑
下载
权限
删除
重命名
my-sites-20260507073022.php
-rw-r--r--
4.74 KB
2023-09-06 04:56
编辑
下载
权限
删除
重命名
my-sites.php
-rw-r--r--
4.74 KB
2023-09-06 04:56
编辑
下载
权限
删除
重命名
nav-menus.php
-rw-r--r--
48.19 KB
2025-12-03 15:12
编辑
下载
权限
删除
重命名
options-discussion.php
-rw-r--r--
15.92 KB
2025-12-03 15:12
编辑
下载
权限
删除
重命名
options-general.php
-rw-r--r--
21.65 KB
2025-12-03 15:12
编辑
下载
权限
删除
重命名
options-head.php
-rw-r--r--
621 B
2025-04-16 18:37
编辑
下载
权限
删除
重命名
options-media.php
-rw-r--r--
6.38 KB
2025-12-03 15:12
编辑
下载
权限
删除
重命名
options-privacy-20260507035056.php
-rw-r--r--
9.95 KB
2025-04-16 18:37
编辑
下载
权限
删除
重命名
options-privacy.php
-rw-r--r--
9.95 KB
2025-04-16 18:37
编辑
下载
权限
删除
重命名
options-reading.php
-rw-r--r--
9.94 KB
2025-12-03 15:12
编辑
下载
权限
删除
重命名
options-writing.php
-rw-r--r--
9.1 KB
2025-12-03 15:12
编辑
下载
权限
删除
重命名
options.php
-rw-r--r--
13.6 KB
2025-12-03 15:12
编辑
下载
权限
删除
重命名
post-new.php
-rw-r--r--
2.7 KB
2024-06-15 22:04
编辑
下载
权限
删除
重命名
post.php
-rw-r--r--
10.03 KB
2025-12-03 15:12
编辑
下载
权限
删除
重命名
press-this.php
-rw-r--r--
2.34 KB
2024-02-27 07:05
编辑
下载
权限
删除
重命名
privacy-live.php
-rw-r--r--
972 B
2025-12-03 15:12
编辑
下载
权限
删除
重命名
privacy-policy-guide.php
-rw-r--r--
3.67 KB
2023-11-23 04:14
编辑
下载
权限
删除
重命名
privacy.php
-rw-r--r--
2.79 KB
2025-12-03 15:12
编辑
下载
权限
删除
重命名
profile.php
-rw-r--r--
283 B
2020-02-06 17:03
编辑
下载
权限
删除
重命名
site-health-20260507073251.php
-rw-r--r--
10.2 KB
2025-12-03 15:12
编辑
下载
权限
删除
重命名
site-health-info.php
-rw-r--r--
3.99 KB
2025-04-16 18:37
编辑
下载
权限
删除
重命名
site-health.php
-rw-r--r--
10.2 KB
2025-12-03 15:12
编辑
下载
权限
删除
重命名
themes-20260507060401.php
-rw-r--r--
47.92 KB
2025-12-03 15:12
编辑
下载
权限
删除
重命名
themes.php
-rw-r--r--
47.92 KB
2025-12-03 15:12
编辑
下载
权限
删除
重命名
upgrade-functions.php
-rw-r--r--
341 B
2020-02-06 17:03
编辑
下载
权限
删除
重命名
upgrade.php
-rw-r--r--
6.27 KB
2025-12-03 15:12
编辑
下载
权限
删除
重命名
user-new.php
-rw-r--r--
24.05 KB
2025-04-16 18:37
编辑
下载
权限
删除
重命名
widgets-form-blocks.php
-rw-r--r--
5.12 KB
2025-12-03 15:12
编辑
下载
权限
删除
重命名