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
This commit is contained in:
parent
b6c2df9325
commit
f53b215bfe
|
@ -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.' ),
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue