summaryrefslogtreecommitdiffstats
path: root/wp-includes/rest-api/endpoints/class-wp-rest-font-faces-controller.php
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-07-01 18:08:41 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-07-01 18:08:41 +0000
commit3ce72ee99bc230c3df10841a69d0ff243eb1a0bb (patch)
tree035fdbe0ae826e1c990c61f5cecc91ba12545f27 /wp-includes/rest-api/endpoints/class-wp-rest-font-faces-controller.php
parentAdding upstream version 6.5.3+dfsg1. (diff)
downloadwordpress-3ce72ee99bc230c3df10841a69d0ff243eb1a0bb.tar.xz
wordpress-3ce72ee99bc230c3df10841a69d0ff243eb1a0bb.zip
Adding upstream version 6.5.5+dfsg1.upstream/6.5.5+dfsg1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
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, '/' );
}