WordPress.org

Make WordPress Core

Changeset 48801


Ignore:
Timestamp:
08/16/2020 05:52:25 PM (10 months ago)
Author:
SergeyBiryukov
Message:

Site Health: Rename the $upload_max_size variable to $upload_max_filesize, for consistency with the PHP setting name.

Follow-up to [48535], [48538], [48539], [48544], [48800].

See #50945.

Location:
trunk/src/wp-admin/includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-debug-data.php

    r48750 r48801  
    532532        } else {
    533533            // Get the PHP ini directive values.
    534             $post_max_size    = ini_get( 'post_max_size' );
    535             $upload_max_size = ini_get( 'upload_max_filesize' );
    536             $max_file_uploads = ini_get( 'max_file_uploads' );
    537             $effective        = min( wp_convert_hr_to_bytes( $post_max_size ), wp_convert_hr_to_bytes( $upload_max_size ) );
     534            $post_max_size       = ini_get( 'post_max_size' );
     535            $upload_max_filesize = ini_get( 'upload_max_filesize' );
     536            $max_file_uploads    = ini_get( 'max_file_uploads' );
     537            $effective           = min( wp_convert_hr_to_bytes( $post_max_size ), wp_convert_hr_to_bytes( $upload_max_filesize ) );
    538538
    539539            // Add info in Media section.
     
    549549            $info['wp-media']['fields']['upload_max_filesize'] = array(
    550550                'label' => __( 'Max size of an uploaded file' ),
    551                 'value' => $upload_max_size,
     551                'value' => $upload_max_filesize,
    552552            );
    553553            $info['wp-media']['fields']['max_effective_size']  = array(
     
    712712            }
    713713
    714             $info['wp-server']['fields']['max_input_time']    = array(
     714            $info['wp-server']['fields']['max_input_time']      = array(
    715715                'label' => __( 'Max input time' ),
    716716                'value' => ini_get( 'max_input_time' ),
    717717            );
    718             $info['wp-server']['fields']['upload_max_size']  = array(
     718            $info['wp-server']['fields']['upload_max_filesize'] = array(
    719719                'label' => __( 'Upload max filesize' ),
    720720                'value' => ini_get( 'upload_max_filesize' ),
    721721            );
    722             $info['wp-server']['fields']['php_post_max_size'] = array(
     722            $info['wp-server']['fields']['php_post_max_size']   = array(
    723723                'label' => __( 'PHP post max size' ),
    724724                'value' => ini_get( 'post_max_size' ),
  • trunk/src/wp-admin/includes/class-wp-site-health.php

    r48800 r48801  
    20472047        }
    20482048
    2049         $post_max_size   = ini_get( 'post_max_size' );
    2050         $upload_max_size = ini_get( 'upload_max_filesize' );
    2051 
    2052         if ( wp_convert_hr_to_bytes( $post_max_size ) < wp_convert_hr_to_bytes( $upload_max_size ) ) {
     2049        $post_max_size       = ini_get( 'post_max_size' );
     2050        $upload_max_filesize = ini_get( 'upload_max_filesize' );
     2051
     2052        if ( wp_convert_hr_to_bytes( $post_max_size ) < wp_convert_hr_to_bytes( $upload_max_filesize ) ) {
    20532053            $result['label'] = sprintf(
    20542054                /* translators: 1: post_max_size, 2: upload_max_filesize */
Note: See TracChangeset for help on using the changeset viewer.