From c647007a82735a117be5f6ab2ed001780047ff0f Mon Sep 17 00:00:00 2001 From: Aaron Jorbin Date: Sun, 9 Feb 2020 20:42:26 +0000 Subject: [PATCH] General: Fix HTML for get_calendar() The element was allowed to precede the element in HTML 5. However, that was changed in HTML 5.1 and must now follow . This removes the tfooot and instead uses a nav element for navigation between months. Fixes: #39763 Props: isabel_brison, Harry Milatz, audrasjb, abhijitrakas, SergeyBiryukov git-svn-id: https://develop.svn.wordpress.org/trunk@47223 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/general-template.php | 53 ++++++++++++++-------------- 1 file changed, 26 insertions(+), 27 deletions(-) diff --git a/src/wp-includes/general-template.php b/src/wp-includes/general-template.php index 40eb84342b..53fe900cd5 100644 --- a/src/wp-includes/general-template.php +++ b/src/wp-includes/general-template.php @@ -2167,32 +2167,6 @@ function get_calendar( $initial = true, $echo = true ) { $calendar_output .= ' - - - '; - - if ( $previous ) { - $calendar_output .= "\n\t\t" . '« ' . - $wp_locale->get_month_abbrev( $wp_locale->get_month( $previous->month ) ) . - ''; - } else { - $calendar_output .= "\n\t\t" . ' '; - } - - $calendar_output .= "\n\t\t" . ' '; - - if ( $next ) { - $calendar_output .= "\n\t\t" . '' . - $wp_locale->get_month_abbrev( $wp_locale->get_month( $next->month ) ) . - ' »'; - } else { - $calendar_output .= "\n\t\t" . ' '; - } - - $calendar_output .= ' - - - '; @@ -2260,7 +2234,32 @@ function get_calendar( $initial = true, $echo = true ) { if ( 0 != $pad && 7 != $pad ) { $calendar_output .= "\n\t\t" . ' '; } - $calendar_output .= "\n\t\n\t\n\t"; + $calendar_output .= "\n\t\n\t"; + + $calendar_output .= "\n\t"; + + $calendar_output .= ''; $cache[ $key ] = $calendar_output; wp_cache_set( 'get_calendar', $cache, 'calendar' );