Make WordPress Core


Ignore:
Timestamp:
11/17/2020 03:42:57 PM (4 years ago)
Author:
SergeyBiryukov
Message:

Multisite: Rename the calculate_current_dirsize filter to pre_recurse_dirsize.

Set the default value to false. This brings some consistency with the pre_get_space_used filter.

Follow-up to [49212], [49616], [49628].

See #19879.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/multisite/cleanDirsizeCache.php

    r49628 r49629  
    220220         * @ticket 19879
    221221         */
    222         function test_recurse_dirsize_calculate_current_dirsize_filter() {
    223             add_filter( 'calculate_current_dirsize', array( $this, '_filter_calculate_current_dirsize' ) );
     222        function test_pre_recurse_dirsize_filter() {
     223            add_filter( 'pre_recurse_dirsize', array( $this, '_filter_pre_recurse_dirsize' ) );
    224224
    225225            $upload_dir = wp_upload_dir();
    226226            $this->assertSame( 1042, recurse_dirsize( $upload_dir['path'] ) );
    227227
    228             remove_filter( 'calculate_current_dirsize', array( $this, '_filter_calculate_current_dirsize' ) );
    229         }
    230 
    231         function _filter_calculate_current_dirsize() {
     228            remove_filter( 'pre_recurse_dirsize', array( $this, '_filter_pre_recurse_dirsize' ) );
     229        }
     230
     231        function _filter_pre_recurse_dirsize() {
    232232            return 1042;
    233233        }
Note: See TracChangeset for help on using the changeset viewer.