From 903b1fe840d4232bbc249d32d8981824e5fa71de Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sat, 8 Mar 2025 12:49:25 +0000 Subject: [PATCH] Coding Standards: Correct conditional formatting in `get_calendar()`. Follow-up to [59947]. See #62279. git-svn-id: https://develop.svn.wordpress.org/trunk@59953 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/general-template.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/wp-includes/general-template.php b/src/wp-includes/general-template.php index 78a3d76aac..a7bd0a47dd 100644 --- a/src/wp-includes/general-template.php +++ b/src/wp-includes/general-template.php @@ -2310,9 +2310,9 @@ function get_calendar( $args = array() ) { * from generating a different key from the same values in the reverse order. * * `display` is excluded from the cache key as the cache contains the same - * HTML regardless of this functions need to echo or return the output. + * HTML regardless of this function's need to echo or return the output. * - * The global values contain data generated by the URL querystring variables. + * The global values contain data generated by the URL query string variables. */ $cache_args = $args; unset( $cache_args['display'] ); @@ -2497,11 +2497,13 @@ function get_calendar( $args = array() ) { if ( isset( $newrow ) && $newrow ) { $calendar_output .= "\n\t\n\t\n\t\t"; } + $newrow = false; - if ( (int) current_time( 'j' ) === $day && - (int) current_time( 'm' ) === $thismonth && - (int) current_time( 'Y' ) === $thisyear ) { + if ( (int) current_time( 'j' ) === $day + && (int) current_time( 'm' ) === $thismonth + && (int) current_time( 'Y' ) === $thisyear + ) { $calendar_output .= ''; } else { $calendar_output .= '';