Make WordPress Core


Ignore:
Timestamp:
03/21/2025 01:54:38 PM (3 months ago)
Author:
audrasjb
Message:

General: Improve aria-current management in get_custom_logo().

This changeset fixes a edge case in get_custom_logo() where a page was set for the homepage without any front page in Settings > Reading and the aria-current attribute wasn't present on the logo link.

Props bschneidewind, audrasjb, siliconforks, sabernhardt, faisal03, shailu25, peterwilsoncc.
Fixes #62879.

File:
1 edited

Legend:

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

    r59966 r60062  
    11191119                );
    11201120            } else {
    1121                 $aria_current = is_front_page() && ! is_paged() ? ' aria-current="page"' : '';
     1121                $aria_current = ! is_paged() && ( is_front_page() || is_home() && ( (int) get_option( 'page_for_posts' ) !== get_queried_object_id() ) ) ? ' aria-current="page"' : '';
    11221122
    11231123                $html = sprintf(
Note: See TracChangeset for help on using the changeset viewer.