From c531947f3b14f0161cdc5dcc5d8641d5ac690b9b Mon Sep 17 00:00:00 2001 From: Felix Arntz Date: Thu, 21 Sep 2023 01:25:38 +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. git-svn-id: https://develop.svn.wordpress.org/trunk@56641 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/noop.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/wp-admin/includes/noop.php b/src/wp-admin/includes/noop.php index b29f6044d8..39dc9702c1 100644 --- a/src/wp-admin/includes/noop.php +++ b/src/wp-admin/includes/noop.php @@ -22,6 +22,13 @@ function _x() {} */ function add_filter() {} +/** + * @ignore + */ +function has_filter() { + return false; +} + /** * @ignore */