From 84f037a1298431a8feaff283dd7006958c0181f0 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 1 Jul 2024 20:08:43 +0200 Subject: Merging upstream version 6.5.5+dfsg1. Signed-off-by: Daniel Baumann --- .../rest-api/endpoints/class-wp-rest-font-faces-controller.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'wp-includes/rest-api/endpoints') diff --git a/wp-includes/rest-api/endpoints/class-wp-rest-font-faces-controller.php b/wp-includes/rest-api/endpoints/class-wp-rest-font-faces-controller.php index c7f72d4..c448787 100644 --- a/wp-includes/rest-api/endpoints/class-wp-rest-font-faces-controller.php +++ b/wp-includes/rest-api/endpoints/class-wp-rest-font-faces-controller.php @@ -916,8 +916,8 @@ class WP_REST_Font_Faces_Controller extends WP_REST_Posts_Controller { $new_path = $path; $fonts_dir = wp_get_font_dir(); - if ( str_starts_with( $new_path, $fonts_dir['path'] ) ) { - $new_path = str_replace( $fonts_dir, '', $new_path ); + if ( str_starts_with( $new_path, $fonts_dir['basedir'] ) ) { + $new_path = str_replace( $fonts_dir['basedir'], '', $new_path ); $new_path = ltrim( $new_path, '/' ); } -- cgit v1.2.3