From 34d73cbcf687579111cb8cf895de13c1e9300333 Mon Sep 17 00:00:00 2001 From: Joe Dolson Date: Fri, 22 Sep 2023 18:12:12 +0000 Subject: [PATCH] Code Modernization: Rename reserved keyword used as variable. Change the `$echo` parameter added to `wp_update_php_annnotation()` to `$display` to avoid using reserved PHP keywords as parameters. Follow up to [56570]. Props kebbet, mukesh27. See #57791. git-svn-id: https://develop.svn.wordpress.org/trunk@56662 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/functions.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/wp-includes/functions.php b/src/wp-includes/functions.php index d2c02abedd..ab49f8f405 100644 --- a/src/wp-includes/functions.php +++ b/src/wp-includes/functions.php @@ -8318,19 +8318,19 @@ function wp_get_default_update_php_url() { * * @since 5.1.0 * @since 5.2.0 Added the `$before` and `$after` parameters. - * @since 6.4.0 Added the `$echo` parameter. + * @since 6.4.0 Added the `$display` parameter. * - * @param string $before Markup to output before the annotation. Default `

`. - * @param string $after Markup to output after the annotation. Default `

`. - * @param bool $echo Markup should echo if true. Default `true`. + * @param string $before Markup to output before the annotation. Default `

`. + * @param string $after Markup to output after the annotation. Default `

`. + * @param bool $display Whether to echo or return the markup. Default `true` for echo. * * @return string|void */ -function wp_update_php_annotation( $before = '

', $after = '

', $echo = true ) { +function wp_update_php_annotation( $before = '

', $after = '

', $display = true ) { $annotation = wp_get_update_php_annotation(); if ( $annotation ) { - if ( $echo ) { + if ( $display ) { echo $before . $annotation . $after; } else { return $before . $annotation . $after;