Changeset 58448
- Timestamp:
- 06/20/2024 04:28:55 PM (7 weeks ago)
- Location:
- branches/6.5
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/6.5
-
branches/6.5/src/wp-includes/fonts.php
r57907 r58448 229 229 230 230 $font_files = get_post_meta( $post_id, '_wp_font_face_file', false ); 231 $font_dir = wp_get_font_dir()['path'];231 $font_dir = ; 232 232 233 233 foreach ( $font_files as $font_file ) { -
branches/6.5/src/wp-includes/rest-api/endpoints/class-wp-rest-font-faces-controller.php
r57879 r58448 917 917 918 918 $fonts_dir = wp_get_font_dir(); 919 if ( str_starts_with( $new_path, $fonts_dir[' path'] ) ) {920 $new_path = str_replace( $fonts_dir , '', $new_path );919 if ( str_starts_with( $new_path, $fonts_dir[''] ) ) { 920 $new_path = str_replace( $fonts_dir, '', $new_path ); 921 921 $new_path = ltrim( $new_path, '/' ); 922 922 } -
branches/6.5/tests/phpunit/tests/fonts/font-library/wpRestFontFacesController.php
r57548 r58448 395 395 396 396 $this->assertSame( self::$font_family_id, $data['parent'], 'The returned parent id should match the font family id.' ); 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 397 464 } 398 465 … … 1049 1116 $file_meta = get_post_meta( $font_face_id, '_wp_font_face_file' ); 1050 1117 1051 foreach ( $ src_attributes as $src_attribute ) {1052 $ file_name = basename( $src_attribute );1053 $this->assert Contains( $file_name, $file_meta, 'The uploaded font file path should be saved in the post meta.' );1118 foreach ( $e ) { 1119 $; 1120 $this->asserted in the post meta.' ); 1054 1121 } 1055 1122 }
Note: See TracChangeset
for help on using the changeset viewer.