Make WordPress Core


Ignore:
Timestamp:
08/07/2020 03:24:10 PM (4 years ago)
Author:
SergeyBiryukov
Message:

Accessibility: Themes: Only unlink custom logo on the home page if the theme declares support for that.

To accommodate for the change, the custom-logo theme feature now accepts the unlink-homepage-logo parameter.

If and when the logo is linked on the home page, the link has the aria-current attribute for better accessibility.

Follow-up to [48039], [48283].

Props sabernhardt, audrasjb, johnstonphilip, demetris.
Fixes #37011.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/theme.php

    r48612 r48749  
    24732473 *              by adding it to the function signature.
    24742474 * @since 5.5.0 The `core-block-patterns` feature was added and is enabled by default.
     2475 * @since 5.5.0 The `custom-logo` feature now also accepts 'unlink-homepage-logo'.
    24752476 *
    24762477 * @global array $_wp_theme_features
     
    25392540            }
    25402541            $defaults = array(
    2541                 'width'       => null,
    2542                 'height'      => null,
    2543                 'flex-width'  => false,
    2544                 'flex-height' => false,
    2545                 'header-text' => '',
     2542                'width'                => null,
     2543                'height'               => null,
     2544                'flex-width'           => false,
     2545                'flex-height'          => false,
     2546                'header-text'          => '',
     2547                'unlink-homepage-logo' => false,
    25462548            );
    25472549            $args[0]  = wp_parse_args( array_intersect_key( $args[0], $defaults ), $defaults );
Note: See TracChangeset for help on using the changeset viewer.