Make WordPress Core


Ignore:
Timestamp:
05/19/2014 05:09:42 PM (12 years ago)
Author:
wonderboymusic
Message:

hackificator doesn't like mixed single/double-quoted attributes. These were 2 lingering instances in the admin.

See #27881.

File:
1 edited

Legend:

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

    r28500 r28530  
    231231        }
    232232        $name = esc_attr( $option->option_name );
    233         echo "
     233        ?>
    234234<tr>
    235         <th scope='row'><label for='$name'>" . esc_html( $option->option_name ) . "</label></th>
    236 <td>";
    237         if ( strpos( $value, "\n" ) !== false )
    238                 echo "<textarea class='$class' name='$name' id='$name' cols='30' rows='5'>" . esc_textarea( $value ) . "</textarea>";
    239         else
    240                 echo "<input class='regular-text $class' type='text' name='$name' id='$name' value='" . esc_attr( $value ) . "'" . disabled( $disabled, true, false ) . " />";
    241         echo "</td>
    242 </tr>";
    243 endforeach;
    244 ?>
     235        <th scope="row"><label for="<?php echo $name ?>"><?php echo esc_html( $option->option_name ); ?></label></th>
     236<td>
     237<?php if ( strpos( $value, "\n" ) !== false ) : ?>
     238        <textarea class="<?php echo $class ?>" name="<?php echo $name ?>" id="<?php echo $name ?>" cols="30" rows="5"><?php
     239                echo esc_textarea( $value );
     240        ?></textarea>
     241        <?php else: ?>
     242                <input class="regular-text <?php echo $class ?>" type="text" name="<?php echo $name ?>" id="<?php echo $name ?>" value="<?php echo esc_attr( $value ) ?>"<?php disabled( $disabled, true ) ?> />
     243        <?php endif ?></td>
     244</tr>
     245<?php endforeach; ?>
    245246  </table>
    246247
Note: See TracChangeset for help on using the changeset viewer.