Make WordPress Core

Ticket #39763: 39763.5.diff

File 39763.5.diff, 1.8 KB (added by audrasjb, 2 years ago)

Widgets: Add CSS classes to calendar widget navigation

  • src/wp-includes/general-template.php

    diff --git a/src/wp-includes/general-template.php b/src/wp-includes/general-template.php
    index 8c86ed7f92..aa8ef9e422 100644
    a b function get_calendar( $initial = true, $echo = true ) { 
    22382238
    22392239        $calendar_output .= "\n\t</table>";
    22402240
    2241         $calendar_output .= '<nav aria-label="' . __( 'Previous and next months' ) . '">';
     2241        $calendar_output .= '<nav aria-label="' . __( 'Previous and next months' ) . '" class="wp-calendar-nav">';
    22422242
    22432243        if ( $previous ) {
    2244                 $calendar_output .= "\n\t\t" . '<span id="prev"><a href="' . get_month_link( $previous->year, $previous->month ) . '">&laquo; ' .
     2244                $calendar_output .= "\n\t\t" . '<span id="prev" class="wp-calendar-nav-prev"><a href="' . get_month_link( $previous->year, $previous->month ) . '">&laquo; ' .
    22452245                        $wp_locale->get_month_abbrev( $wp_locale->get_month( $previous->month ) ) .
    22462246                '</a></span>';
    22472247        } else {
    2248                 $calendar_output .= "\n\t\t" . '<span id="prev">&nbsp;</span>';
     2248                $calendar_output .= "\n\t\t" . '<span id="prev" class="wp-calendar-nav-prev">&nbsp;</span>';
    22492249        }
    22502250
    22512251        $calendar_output .= "\n\t\t" . '<span class="pad">&nbsp;</span>';
    22522252
    22532253        if ( $next ) {
    2254                 $calendar_output .= "\n\t\t" . '<span id="next"><a href="' . get_month_link( $next->year, $next->month ) . '">' .
     2254                $calendar_output .= "\n\t\t" . '<span id="next" class="wp-calendar-nav-next"><a href="' . get_month_link( $next->year, $next->month ) . '">' .
    22552255                        $wp_locale->get_month_abbrev( $wp_locale->get_month( $next->month ) ) .
    22562256                ' &raquo;</a></span>';
    22572257        } else {
    2258                 $calendar_output .= "\n\t\t" . '<span id="next" class="pad">&nbsp;</span>';
     2258                $calendar_output .= "\n\t\t" . '<span id="next" class="wp-calendar-nav-next">&nbsp;</span>';
    22592259        }
    22602260
    22612261        $calendar_output .= '