diff --git a/src/wp-admin/includes/ms.php b/src/wp-admin/includes/ms.php
index 741d02e9c9..926a452018 100644
a
|
b
|
function check_upload_size( $file ) { |
30 | 30 | |
31 | 31 | $space_left = get_upload_space_available(); |
32 | 32 | |
33 | | $file_size = filesize( $file['tmp_name'] ); |
| 33 | $file_size = wp_filesize( $file['tmp_name'] ); |
34 | 34 | if ( $space_left < $file_size ) { |
35 | 35 | /* translators: %s: Required disk space in kilobytes. */ |
36 | 36 | $file['error'] = sprintf( __( 'Not enough space to upload. %s KB needed.' ), number_format( ( $file_size - $space_left ) / KB_IN_BYTES ) ); |
diff --git a/src/wp-admin/includes/plugin.php b/src/wp-admin/includes/plugin.php
index 3084312da5..894d161737 100644
a
|
b
|
function get_mu_plugins() { |
400 | 400 | $wp_plugins[ $plugin_file ] = $plugin_data; |
401 | 401 | } |
402 | 402 | |
403 | | if ( isset( $wp_plugins['index.php'] ) && filesize( WPMU_PLUGIN_DIR . '/index.php' ) <= 30 ) { |
| 403 | if ( isset( $wp_plugins['index.php'] ) && wp_filesize( WPMU_PLUGIN_DIR . '/index.php' ) <= 30 ) { |
404 | 404 | // Silence is golden. |
405 | 405 | unset( $wp_plugins['index.php'] ); |
406 | 406 | } |
diff --git a/src/wp-includes/class-wp-customize-manager.php b/src/wp-includes/class-wp-customize-manager.php
index fe03a93c1e..0a55fd0c18 100644
a
|
b
|
final class WP_Customize_Manager { |
6046 | 6046 | public function _validate_header_video( $validity, $value ) { |
6047 | 6047 | $video = get_attached_file( absint( $value ) ); |
6048 | 6048 | if ( $video ) { |
6049 | | $size = filesize( $video ); |
| 6049 | $size = wp_filesize( $video ); |
6050 | 6050 | if ( $size > 8 * MB_IN_BYTES ) { |
6051 | 6051 | $validity->add( |
6052 | 6052 | 'size_too_large', |
diff --git a/src/wp-includes/ms-files.php b/src/wp-includes/ms-files.php
index 6fb7e4d276..7695c28c84 100644
a
|
b
|
if ( $mime['type'] ) { |
42 | 42 | |
43 | 43 | header( 'Content-Type: ' . $mimetype ); // Always send this. |
44 | 44 | if ( false === strpos( $_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS' ) ) { |
45 | | header( 'Content-Length: ' . filesize( $file ) ); |
| 45 | header( 'Content-Length: ' . wp_filesize( $file ) ); |
46 | 46 | } |
47 | 47 | |
48 | 48 | // Optional support for X-Sendfile and X-Accel-Redirect. |
diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php
index 423347a721..fc3ffd8f10 100644
a
|
b
|
class WP_REST_Attachments_Controller extends WP_REST_Posts_Controller { |
1284 | 1284 | |
1285 | 1285 | $space_left = get_upload_space_available(); |
1286 | 1286 | |
1287 | | $file_size = filesize( $file['tmp_name'] ); |
| 1287 | $file_size = wp_filesize( $file['tmp_name'] ); |
1288 | 1288 | |
1289 | 1289 | if ( $space_left < $file_size ) { |
1290 | 1290 | return new WP_Error( |
diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-edit-site-export-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-edit-site-export-controller.php
index 691760812b..ddfc421cb2 100644
a
|
b
|
class WP_REST_Edit_Site_Export_Controller extends WP_REST_Controller { |
85 | 85 | $theme_name = basename( get_stylesheet() ); |
86 | 86 | header( 'Content-Type: application/zip' ); |
87 | 87 | header( 'Content-Disposition: attachment; filename=' . $theme_name . '.zip' ); |
88 | | header( 'Content-Length: ' . filesize( $filename ) ); |
| 88 | header( 'Content-Length: ' . wp_filesize( $filename ) ); |
89 | 89 | flush(); |
90 | 90 | readfile( $filename ); |
91 | 91 | unlink( $filename ); |
diff --git a/src/wp-includes/script-loader.php b/src/wp-includes/script-loader.php
index 1c1d12a367..bb9e39cb50 100644
a
|
b
|
function wp_maybe_inline_styles() { |
2828 | 2828 | 'handle' => $handle, |
2829 | 2829 | 'src' => $wp_styles->registered[ $handle ]->src, |
2830 | 2830 | 'path' => $wp_styles->registered[ $handle ]->extra['path'], |
2831 | | 'size' => filesize( $wp_styles->registered[ $handle ]->extra['path'] ), |
| 2831 | 'size' => wp_filesize( $wp_styles->registered[ $handle ]->extra['path'] ), |
2832 | 2832 | ); |
2833 | 2833 | } |
2834 | 2834 | } |