Make WordPress Core

Ticket #28975: 28975.3.diff

File 28975.3.diff, 903 bytes (added by valendesigns, 9 years ago)
  • src/wp-admin/includes/template.php

    diff --git src/wp-admin/includes/template.php src/wp-admin/includes/template.php
    index c1e362b..b1b4cfe 100644
    function do_settings_fields($page, $section) { 
    12891289                return;
    12901290
    12911291        foreach ( (array) $wp_settings_fields[$page][$section] as $field ) {
    1292                 echo '<tr>';
    1293                 if ( !empty($field['args']['label_for']) )
     1292                if ( ! empty( $field['args']['class'] ) ) {
     1293                        echo '<tr class="' . esc_attr( $field['args']['class'] ) . '">';
     1294                } else {
     1295                        echo '<tr>';
     1296                }
     1297                if ( ! empty( $field['args']['label_for'] ) ) {
    12941298                        echo '<th scope="row"><label for="' . esc_attr( $field['args']['label_for'] ) . '">' . $field['title'] . '</label></th>';
    1295                 else
     1299                } else {
    12961300                        echo '<th scope="row">' . $field['title'] . '</th>';
     1301                }
    12971302                echo '<td>';
    12981303                call_user_func($field['callback'], $field['args']);
    12991304                echo '</td>';