PluginProbe
Gutenberg / 24.1.0
Gutenberg v24.1.0
24.1.0 24.0.0 23.9.1 23.9.0 23.8.0 23.7.2 23.7.1 23.7.0 23.6.1 23.6.2 23.6.0 23.5.3 23.5.2 23.5.1 23.5.0 23.4.0 23.3.2 23.3.1 23.3.0 23.2.0 23.2.1 23.2.2 23.1.1 23.1.0 23.0.1 All 404 releases
← All changes | build/pages/experiments/page-wp-admin.php +24 -7 23.7.2 → 24.1.0 View file →
@@ -145,10 +145,14 @@
145 145
146 146 // Get all registered routes
147 147 $routes = gutenberg_get_experiments_wp_admin_routes();
148 148
149 - // Get boot module asset file for dependencies
149 + // Get boot module asset file for dependencies. Plugins that build their own
150 + // boot module use it; everyone else falls back to the copy bundled with Core.
150 151 $asset_file = __DIR__ . '/../../modules/boot/index.min.asset.php';
152 + if ( ! file_exists( $asset_file ) ) {
153 + $asset_file = ABSPATH . WPINC . '/js/dist/script-modules/boot/index.min.asset.php';
154 + }
151 155 if ( file_exists( $asset_file ) ) {
152 156 $asset = require $asset_file;
153 157
154 158 // This script serves two purposes:
@@ -269,25 +273,25 @@
269 273
270 274 #wpwrap {
271 275 overflow-y: auto;
272 276 }
273 - body {
277 + body.js {
274 278 background: #fff;
275 279 }
276 280
277 281 /* Reset wp-admin padding */
278 - #wpcontent {
282 + body.js #wpcontent {
279 283 padding-inline-start: 0;
280 284 }
281 - #wpbody-content {
285 + body.js #wpbody-content {
282 286 padding-bottom: 0;
283 287 }
284 288
285 289 /* Hide legacy admin elements */
286 - #wpbody-content > div:not(.boot-layout-container):not(#screen-meta) {
290 + body.js #wpbody-content > div:not(#experiments-wp-admin-app):not(#screen-meta) {
287 291 display: none;
288 292 }
289 - #wpfooter {
293 + body.js #wpfooter {
290 294 display: none;
291 295 }
292 296
293 297 /* Accessibility regions */
@@ -314,8 +318,22 @@
314 318 overflow-y: initial;
315 319 }
316 320 }
317 321 </style>
322 + <div class="wrap hide-if-js">
323 + <h1 class="wp-heading-inline"><?php echo esc_html( get_admin_page_title() ); ?></h1>
324 + <?php
325 + wp_admin_notice(
326 + __( 'This screen requires JavaScript. Enable JavaScript in your browser settings and reload the page.' ),
327 + array( 'type' => 'error' )
328 + );
329 + ?>
330 + </div>
331 + <?php
332 + // Core's pre-CSS Modules Boot layout uses this class for viewport sizing.
333 + // Remove it when the minimum supported WordPress version includes the Boot
334 + // changes from Gutenberg #81756.
335 + ?>
318 336 <div id="experiments-wp-admin-app" class="boot-layout-container"></div>
319 337 <?php
320 338 }
321 339
@@ -320,5 +338,4 @@
320 338 }
321 339
322 340 // Hook the enqueue function to admin_enqueue_scripts
323 341 add_action( 'admin_enqueue_scripts', 'gutenberg_experiments_wp_admin_enqueue_scripts' );
324 -