mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@49629 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -219,16 +219,16 @@ if ( is_multisite() ) :
|
||||
*
|
||||
* @ticket 19879
|
||||
*/
|
||||
function test_recurse_dirsize_calculate_current_dirsize_filter() {
|
||||
add_filter( 'calculate_current_dirsize', array( $this, '_filter_calculate_current_dirsize' ) );
|
||||
function test_pre_recurse_dirsize_filter() {
|
||||
add_filter( 'pre_recurse_dirsize', array( $this, '_filter_pre_recurse_dirsize' ) );
|
||||
|
||||
$upload_dir = wp_upload_dir();
|
||||
$this->assertSame( 1042, recurse_dirsize( $upload_dir['path'] ) );
|
||||
|
||||
remove_filter( 'calculate_current_dirsize', array( $this, '_filter_calculate_current_dirsize' ) );
|
||||
remove_filter( 'pre_recurse_dirsize', array( $this, '_filter_pre_recurse_dirsize' ) );
|
||||
}
|
||||
|
||||
function _filter_calculate_current_dirsize() {
|
||||
function _filter_pre_recurse_dirsize() {
|
||||
return 1042;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user