Make WordPress Core


Ignore:
Timestamp:
07/13/2026 01:45:16 PM (5 weeks ago)
Author:
afercia
Message:

Administration: Add IDs to the headings of the settings sections.

Add IDs to the headings of the settings sections generated by the Settings API. Additionally, adds IDs to the headings of the settings sections in the Core admin settings pages that are not generated by the Settings API.

This allows to reference specific sections by the means of links with a page fragment identifier, useful for documentation and support purposes.

Props wetah, rakeshfalke, reneyap, joedolson, afercia.
Fixes #65027.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/network/settings.php

    r60805 r62710  
    154154        <form method="post" action="settings.php" novalidate="novalidate">
    155155                <?php wp_nonce_field( 'siteoptions' ); ?>
    156                 <h2><?php _e( 'Operational Settings' ); ?></h2>
     156                <h2 id="wp-settings-section-operational-settings"><?php _e( 'Operational Settings' ); ?></h2>
    157157                <table class="form-table" role="presentation">
    158158                        <tr>
     
    198198                        </tr>
    199199                </table>
    200                 <h2><?php _e( 'Registration Settings' ); ?></h2>
     200                <h2 id="wp-settings-section-registration-settings"><?php _e( 'Registration Settings' ); ?></h2>
    201201                <table class="form-table" role="presentation">
    202202                        <?php $new_registrations_settings_title = __( 'Allow new registrations' ); ?>
     
    316316
    317317                </table>
    318                 <h2><?php _e( 'New Site Settings' ); ?></h2>
     318                <h2 id="wp-settings-section-new-site-settings"><?php _e( 'New Site Settings' ); ?></h2>
    319319                <table class="form-table" role="presentation">
    320320
     
    397397                        </tr>
    398398                </table>
    399                 <h2><?php _e( 'Upload Settings' ); ?></h2>
     399                <h2 id="wp-settings-section-upload-settings"><?php _e( 'Upload Settings' ); ?></h2>
    400400                <table class="form-table" role="presentation">
    401401                        <tr>
     
    455455                if ( ! empty( $languages ) || ! empty( $translations ) ) {
    456456                        ?>
    457                         <h2><?php _e( 'Language Settings' ); ?></h2>
     457                        <h2 id="wp-settings-section-language-settings"><?php _e( 'Language Settings' ); ?></h2>
    458458                        <table class="form-table" role="presentation">
    459459                                <tr>
     
    505505                if ( $menu_items ) :
    506506                        ?>
    507                         <h2><?php _e( 'Menu Settings' ); ?></h2>
     507                        <h2 id="wp-settings-section-menu-settings"><?php _e( 'Menu Settings' ); ?></h2>
    508508                        <table id="menu" class="form-table">
    509509                                <?php $enable_administration_menus_title = __( 'Enable administration menus' ); ?>
Note: See TracChangeset for help on using the changeset viewer.