Commit d88ac61c9a for wordpress.org
commit d88ac61c9adf63291f7f3f6578b151b24a13d14d
Author: Sergey Biryukov <sergeybiryukov.ru@gmail.com>
Date: Thu Jan 15 00:00:00 2026 +0000
Administration: Ensure `get_current_screen()` returns `WP_Screen` or `null`.
This adds a check that the `$current_screen` global is not only defined, but also has the correct type.
Follow-up to [15746].
Props marian1, mayanktripathi32, abcd95, im3dabasia1, SergeyBiryukov.
Fixes #62562.
Built from https://develop.svn.wordpress.org/trunk@61484
git-svn-id: http://core.svn.wordpress.org/trunk@60796 1a063a9b-81f0-0310-95a4-ce76da25c4cd
diff --git a/wp-admin/includes/screen.php b/wp-admin/includes/screen.php
index a3a41a6554..3388ced49a 100644
--- a/wp-admin/includes/screen.php
+++ b/wp-admin/includes/screen.php
@@ -224,7 +224,7 @@ function add_screen_option( $option, $args = array() ) {
function get_current_screen() {
global $current_screen;
- if ( ! isset( $current_screen ) ) {
+ if ( ! $current_screen instanceof WP_Screen ) {
return null;
}
diff --git a/wp-includes/css/dist/index.php b/wp-includes/css/dist/index.php
index ff76719326..9886e44eb7 100644
--- a/wp-includes/css/dist/index.php
+++ b/wp-includes/css/dist/index.php
@@ -32,6 +32,11 @@ return array(
'path' => 'reusable-blocks/style',
'dependencies' => array('wp-block-editor', 'wp-components'),
),
+ array(
+ 'handle' => 'wp-patterns',
+ 'path' => 'patterns/style',
+ 'dependencies' => array('wp-block-editor', 'wp-components'),
+ ),
array(
'handle' => 'wp-widgets',
'path' => 'widgets/style',
@@ -42,21 +47,11 @@ return array(
'path' => 'components/style',
'dependencies' => array(),
),
- array(
- 'handle' => 'wp-patterns',
- 'path' => 'patterns/style',
- 'dependencies' => array('wp-block-editor', 'wp-components'),
- ),
array(
'handle' => 'wp-format-library',
'path' => 'format-library/style',
'dependencies' => array('wp-block-editor', 'wp-components'),
),
- array(
- 'handle' => 'wp-media-utils',
- 'path' => 'media-utils/style',
- 'dependencies' => array('wp-components'),
- ),
array(
'handle' => 'wp-block-directory',
'path' => 'block-directory/style',
@@ -68,9 +63,14 @@ return array(
'dependencies' => array('wp-block-editor', 'wp-block-library', 'wp-components', 'wp-media-utils', 'wp-preferences', 'wp-widgets'),
),
array(
- 'handle' => 'wp-edit-widgets',
- 'path' => 'edit-widgets/style',
- 'dependencies' => array('wp-block-editor', 'wp-block-library', 'wp-components', 'wp-media-utils', 'wp-patterns', 'wp-preferences', 'wp-widgets'),
+ 'handle' => 'wp-media-utils',
+ 'path' => 'media-utils/style',
+ 'dependencies' => array('wp-components'),
+ ),
+ array(
+ 'handle' => 'wp-block-library',
+ 'path' => 'block-library/style',
+ 'dependencies' => array('wp-block-editor', 'wp-components', 'wp-patterns'),
),
array(
'handle' => 'wp-edit-post',
@@ -78,9 +78,9 @@ return array(
'dependencies' => array('wp-block-editor', 'wp-block-library', 'wp-commands', 'wp-components', 'wp-editor', 'wp-preferences', 'wp-widgets'),
),
array(
- 'handle' => 'wp-block-library',
- 'path' => 'block-library/style',
- 'dependencies' => array('wp-block-editor', 'wp-components', 'wp-patterns'),
+ 'handle' => 'wp-edit-widgets',
+ 'path' => 'edit-widgets/style',
+ 'dependencies' => array('wp-block-editor', 'wp-block-library', 'wp-components', 'wp-media-utils', 'wp-patterns', 'wp-preferences', 'wp-widgets'),
),
array(
'handle' => 'wp-editor',
diff --git a/wp-includes/js/dist/script-modules/index.php b/wp-includes/js/dist/script-modules/index.php
index 387ff8c19e..2b7732924a 100644
--- a/wp-includes/js/dist/script-modules/index.php
+++ b/wp-includes/js/dist/script-modules/index.php
@@ -13,9 +13,9 @@ return array(
'asset' => 'core-abilities/index.min.asset.php',
),
array(
- 'id' => '@wordpress/interactivity',
- 'path' => 'interactivity/index',
- 'asset' => 'interactivity/index.min.asset.php',
+ 'id' => '@wordpress/a11y',
+ 'path' => 'a11y/index',
+ 'asset' => 'a11y/index.min.asset.php',
),
array(
'id' => '@wordpress/interactivity-router',
@@ -28,14 +28,9 @@ return array(
'asset' => 'interactivity-router/full-page.min.asset.php',
),
array(
- 'id' => '@wordpress/a11y',
- 'path' => 'a11y/index',
- 'asset' => 'a11y/index.min.asset.php',
- ),
- array(
- 'id' => '@wordpress/abilities',
- 'path' => 'abilities/index',
- 'asset' => 'abilities/index.min.asset.php',
+ 'id' => '@wordpress/interactivity',
+ 'path' => 'interactivity/index',
+ 'asset' => 'interactivity/index.min.asset.php',
),
array(
'id' => '@wordpress/latex-to-mathml',
@@ -47,6 +42,11 @@ return array(
'path' => 'latex-to-mathml/loader',
'asset' => 'latex-to-mathml/loader.min.asset.php',
),
+ array(
+ 'id' => '@wordpress/abilities',
+ 'path' => 'abilities/index',
+ 'asset' => 'abilities/index.min.asset.php',
+ ),
array(
'id' => '@wordpress/route',
'path' => 'route/index',
diff --git a/wp-includes/version.php b/wp-includes/version.php
index a2c3016a8c..a2560f6461 100644
--- a/wp-includes/version.php
+++ b/wp-includes/version.php
@@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
-$wp_version = '7.0-alpha-61483';
+$wp_version = '7.0-alpha-61484';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.