From 091e385f8de05b1aef697298e1021b7058eef0be Mon Sep 17 00:00:00 2001 From: Felix Arntz Date: Thu, 21 Sep 2023 01:27:26 +0000 Subject: [PATCH] Themes: Fix fatal error in `load-styles.php`. Following [56635], a fatal error occurred in `load-styles.php` leading to admin styles not working, because of a `has_filter()` call being added to `get_stylesheet_director()` and `get_template_directory()`. This changeset adds `has_filter()` to `wp-admin/includes/noop.php` to prevent such errors. The lack of loading the function does not cause any unintended side effects itself. Props iandunn, adamsilverstein. Fixes #59417. See #18298. Built from https://develop.svn.wordpress.org/trunk@56641 git-svn-id: http://core.svn.wordpress.org/trunk@56153 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/noop.php | 7 +++++++ wp-includes/version.php | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/wp-admin/includes/noop.php b/wp-admin/includes/noop.php index b29f6044d8..39dc9702c1 100644 --- a/wp-admin/includes/noop.php +++ b/wp-admin/includes/noop.php @@ -22,6 +22,13 @@ function _x() {} */ function add_filter() {} +/** + * @ignore + */ +function has_filter() { + return false; +} + /** * @ignore */ diff --git a/wp-includes/version.php b/wp-includes/version.php index 999fada65f..c4e4c5fbdb 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.4-alpha-56640'; +$wp_version = '6.4-alpha-56641'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.