Changeset 57813
- Timestamp:
- 03/12/2024 01:33:26 PM (8 months ago)
- Location:
- branches/6.5
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/6.5
-
branches/6.5/src/wp-includes/rest-api/endpoints/class-wp-rest-font-faces-controller.php
r57740 r57813 875 875 $overrides = array( 876 876 'upload_error_handler' => array( $this, 'handle_font_file_upload_error' ), 877 // Arbitrary string to avoid the is_uploaded_file() check applied878 // when using 'wp_handle_upload'.879 'action' => 'wp_handle_font_upload',880 877 // Not testing a form submission. 881 878 'test_form' => false, 882 // Seems mime type for files that are not images cannot be tested.883 // See wp_check_filetype_and_ext().884 'test_type' => true,885 879 // Only allow uploading font files for this request. 886 880 'mimes' => WP_Font_Utils::get_allowed_font_mime_types(), 887 881 ); 882 883 // Bypasses is_uploaded_file() when running unit tests. 884 if ( defined( 'DIR_TESTDATA' ) && DIR_TESTDATA ) { 885 $overrides['action'] = 'wp_handle_mock_upload'; 886 } 888 887 889 888 $uploaded_file = wp_handle_upload( $file, $overrides );
Note: See TracChangeset
for help on using the changeset viewer.