summaryrefslogtreecommitdiffstats
path: root/wp-includes/rest-api/endpoints/class-wp-rest-font-faces-controller.php
diff options
context:
space:
mode:
Diffstat (limited to 'wp-includes/rest-api/endpoints/class-wp-rest-font-faces-controller.php')
-rw-r--r--wp-includes/rest-api/endpoints/class-wp-rest-font-faces-controller.php4
1 files changed, 2 insertions, 2 deletions
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, '/' );
}