Make WordPress Core


Ignore:
Timestamp:
02/11/2026 09:09:12 PM (9 months ago)
Author:
audrasjb
Message:

Site Health: Allow direct linking to site health check result.

This changeset does the following changes:

  • Add an ID to each accordion button
  • Update the URL hash each time an accordion button is clicked
  • On page load, open the related accordion when provided

This way, people can use the URL of the page to share a direct link to the site health info section they want.

Props sippis, kabir93, audrasjb, saratheonline, pratiklondhe, vgnavada, SirLouen, nikunj8866, pmbaldha, sajjad67, huzaifaalmesbah, westonruter.
Fixes #62846.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/site-health-info.php

    r59859 r61614  
    7474                        ?>
    7575                        <h3 class="health-check-accordion-heading">
    76                                 <button aria-expanded="false" class="health-check-accordion-trigger" aria-controls="health-check-accordion-block-<?php echo esc_attr( $section ); ?>" type="button">
     76                                <button id="health-check-section-<?php echo esc_attr( $section ); ?>" aria-expanded="false" class="health-check-accordion-trigger" aria-controls="health-check-accordion-block-<?php echo esc_attr( $section ); ?>" type="button">
    7777                                        <span class="title">
    7878                                                <?php echo esc_html( $details['label'] ); ?>
Note: See TracChangeset for help on using the changeset viewer.