WordPress.org

Make WordPress Core

Ticket #17851: 17851.2.diff

File 17851.2.diff, 1.2 KB (added by scribu, 3 years ago)

Added settings-field class

  • wp-admin/includes/template.php

     
    11631163                return; 
    11641164 
    11651165        foreach ( (array) $wp_settings_sections[$page] as $section ) { 
     1166                echo '<div id="section-' . sanitize_html_class( $section['id'] ) . '" class="settings-section">'; 
    11661167                echo "<h3>{$section['title']}</h3>\n"; 
    11671168                call_user_func($section['callback'], $section); 
    11681169                if ( !isset($wp_settings_fields) || !isset($wp_settings_fields[$page]) || !isset($wp_settings_fields[$page][$section['id']]) ) 
     
    11701171                echo '<table class="form-table">'; 
    11711172                do_settings_fields($page, $section['id']); 
    11721173                echo '</table>'; 
     1174                echo '</div>'; 
    11731175        } 
    11741176} 
    11751177 
     
    11941196                return; 
    11951197 
    11961198        foreach ( (array) $wp_settings_fields[$page][$section] as $field ) { 
    1197                 echo '<tr valign="top">'; 
     1199                echo '<tr id="setting-' . sanitize_html_class( $field['id'] ) . '" class="settings-field" valign="top">'; 
    11981200                if ( !empty($field['args']['label_for']) ) 
    11991201                        echo '<th scope="row"><label for="' . $field['args']['label_for'] . '">' . $field['title'] . '</label></th>'; 
    12001202                else