Coding Standards: Correct conditional formatting in get_calendar().

Follow-up to [59947].

See #62279.
Built from https://develop.svn.wordpress.org/trunk@59953


git-svn-id: http://core.svn.wordpress.org/trunk@59295 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2025-03-08 12:51:20 +00:00
parent 9ca8dd6909
commit 216f337a2a
2 changed files with 8 additions and 6 deletions

View File

@ -2310,9 +2310,9 @@ function get_calendar( $args = array() ) {
* from generating a different key from the same values in the reverse order. * 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 * `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; $cache_args = $args;
unset( $cache_args['display'] ); unset( $cache_args['display'] );
@ -2497,11 +2497,13 @@ function get_calendar( $args = array() ) {
if ( isset( $newrow ) && $newrow ) { if ( isset( $newrow ) && $newrow ) {
$calendar_output .= "\n\t</tr>\n\t<tr>\n\t\t"; $calendar_output .= "\n\t</tr>\n\t<tr>\n\t\t";
} }
$newrow = false; $newrow = false;
if ( (int) current_time( 'j' ) === $day && if ( (int) current_time( 'j' ) === $day
(int) current_time( 'm' ) === $thismonth && && (int) current_time( 'm' ) === $thismonth
(int) current_time( 'Y' ) === $thisyear ) { && (int) current_time( 'Y' ) === $thisyear
) {
$calendar_output .= '<td id="today">'; $calendar_output .= '<td id="today">';
} else { } else {
$calendar_output .= '<td>'; $calendar_output .= '<td>';

View File

@ -16,7 +16,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '6.8-beta1-59952'; $wp_version = '6.8-beta1-59953';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.