WordPress.org

Make WordPress Core

Changeset 22010


Ignore:
Timestamp:
09/26/2012 06:44:26 AM (8 years ago)
Author:
nacin
Message:

Make 'Show Avatars' a checkbox rather than a yes/no radio button. props tmoorewp, fixes #20889.

File:
1 edited

Legend:

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

    r21746 r22010  
    175175<th scope="row"><?php _e('Avatar Display'); ?></th>
    176176<td><fieldset><legend class="screen-reader-text"><span><?php _e('Avatar Display'); ?></span></legend>
    177 <?php
    178     $yesorno = array( 0 => __( 'Don&#8217;t show Avatars' ), 1 => __( 'Show Avatars' ) );
    179     foreach ( $yesorno as $key => $value) {
    180         $selected = (get_option('show_avatars') == $key) ? 'checked="checked"' : '';
    181         echo "\n\t<label><input type='radio' name='show_avatars' value='" . esc_attr($key) . "' $selected/> $value</label><br />";
    182     }
    183 ?>
     177    <label for="show_avatars">
     178        <input type="checkbox" id="show_avatars" name="show_avatars" value="1" <?php checked( get_option('show_avatars'), 1 ); ?> />
     179        <?php _e( 'Show Avatars' ); ?>
     180    </label>
    184181</fieldset></td>
    185182</tr>
Note: See TracChangeset for help on using the changeset viewer.