From f53b215bfe64acfffed7121835f1d61d70d078df Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 18 Apr 2022 10:33:09 +0000 Subject: [PATCH] Code Modernization: Rename parameters that use reserved keywords in `wp-admin/includes/ms.php`. While using reserved PHP keywords as parameter name labels is allowed, in the context of function calls using named parameters in PHP 8.0+, this will easily lead to confusion. To avoid that, it is recommended not to use reserved keywords as function parameter names. This commit renames the `$echo` parameter to `$display_message` in `upload_is_user_over_quota()`. Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198]. Props jrf, aristath, poena, justinahinon, SergeyBiryukov. See #55327. Built from https://develop.svn.wordpress.org/trunk@53203 git-svn-id: http://core.svn.wordpress.org/trunk@52792 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/ms.php | 7 ++++--- wp-includes/version.php | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/wp-admin/includes/ms.php b/wp-admin/includes/ms.php index 42ff3f21d2..af5bd1abd4 100644 --- a/wp-admin/includes/ms.php +++ b/wp-admin/includes/ms.php @@ -217,10 +217,11 @@ function wpmu_delete_user( $id ) { * * @since MU (3.0.0) * - * @param bool $echo Optional. If $echo is set and the quota is exceeded, a warning message is echoed. Default is true. + * @param bool $display_message Optional. If set to true and the quota is exceeded, + * a warning message is displayed. Default true. * @return bool True if user is over upload space quota, otherwise false. */ -function upload_is_user_over_quota( $echo = true ) { +function upload_is_user_over_quota( $display_message = true ) { if ( get_site_option( 'upload_space_check_disabled' ) ) { return false; } @@ -232,7 +233,7 @@ function upload_is_user_over_quota( $echo = true ) { $space_used = get_space_used(); if ( ( $space_allowed - $space_used ) < 0 ) { - if ( $echo ) { + if ( $display_message ) { printf( /* translators: %s: Allowed space allocation. */ __( 'Sorry, you have used your space allocation of %s. Please delete some files to upload more files.' ), diff --git a/wp-includes/version.php b/wp-includes/version.php index 0fd2693526..c3021355c0 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.0-beta1-53202'; +$wp_version = '6.0-beta1-53203'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.