From 58d7cd099ee72d67d4450b738ec3da03319efcb0 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 27 Feb 2023 15:34:23 +0000 Subject: [PATCH] Themes: Account for a numeric theme directory in `WP_Theme::__construct()`. This ensures that if a theme with a numeric directory name is active, it is correctly identified as such, and that theme support features work as expected. Follow-up to [20029], [49925]. Props lopo, alvastar, winterpsv, hugodevos, ankit-k-gupta, jakariaistauk, mukesh27, spacedmonkey, SergeyBiryukov. Fixes #54645. Built from https://develop.svn.wordpress.org/trunk@55426 git-svn-id: http://core.svn.wordpress.org/trunk@54959 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-theme.php | 3 +++ wp-includes/version.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/wp-includes/class-wp-theme.php b/wp-includes/class-wp-theme.php index f9f93994e7..a8975457d2 100644 --- a/wp-includes/class-wp-theme.php +++ b/wp-includes/class-wp-theme.php @@ -242,6 +242,9 @@ final class WP_Theme implements ArrayAccess { } } + // Handle a numeric theme directory as a string. + $theme_dir = (string) $theme_dir; + $this->theme_root = $theme_root; $this->stylesheet = $theme_dir; diff --git a/wp-includes/version.php b/wp-includes/version.php index eeea9e5588..8adcbf1ab3 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.2-beta3-55425'; +$wp_version = '6.2-beta3-55426'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.