Make WordPress Core

Changeset 45108


Ignore:
Timestamp:
04/03/2019 11:19:53 AM (6 years ago)
Author:
SergeyBiryukov
Message:

Site Health: Use wp_get_upload_dir() instead of wp_upload_dir(), remove duplicate call.

Props m_uysl.
Fixes #46729.

File:
1 edited

Legend:

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

    r45106 r45108  
    4141        }
    4242
    43         $upload_dir = wp_upload_dir();
     43        $upload_dir = wp_get_upload_dir();
     44
    4445        if ( file_exists( ABSPATH . 'wp-config.php' ) ) {
    4546            $wp_config_path = ABSPATH . 'wp-config.php';
     
    314315        $size_db = WP_Debug_Data::get_database_size();
    315316
    316         // Go through the various installation directories and calculate their sizes.
    317         $uploads_dir = wp_upload_dir();
    318 
    319317        /*
    320318         * We will be using the PHP max execution time to prevent the size calculations
     
    339337        }
    340338
     339        // Go through the various installation directories and calculate their sizes.
    341340        $size_directories = array(
    342341            'wordpress' => array(
     
    353352            ),
    354353            'uploads'   => array(
    355                 'path' => $uploads_dir['basedir'],
     354                'path' => $upload_dir['basedir'],
    356355                'size' => 0,
    357356            ),
Note: See TracChangeset for help on using the changeset viewer.