Default image alignment setting doesn't select a default radio button. Props MtDewVirus. fixes #7574

git-svn-id: https://develop.svn.wordpress.org/trunk@8713 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2008-08-22 20:49:03 +00:00
parent 8374946003
commit 022998d2ca
1 changed files with 6 additions and 1 deletions

View File

@ -100,8 +100,13 @@ include('admin-header.php');
<td><fieldset><legend class="hidden"><?php _e('Default image alignment') ?></legend>
<?php
$alignments = array('none' => 'None', 'left' => 'Left', 'center' => 'Center', 'right' => 'Right');
$default_align = get_option('image_default_align');
if ( empty($default_align) )
$default_align = 'none';
foreach ($alignments as $align => $name) { ?>
<input type="radio" name="image_default_align" id="image_default_align_<?php echo $align; ?>" value="<?php echo $align; ?>"<?php echo (get_option('image_default_align') == $align ? ' checked="checked"' : ''); ?> />
<input type="radio" name="image_default_align" id="image_default_align_<?php echo $align; ?>" value="<?php echo $align; ?>"<?php echo ($default_align == $align ? ' checked="checked"' : ''); ?> />
<label for="image_default_align_<?php echo $align; ?>"><?php _e($name); ?></label>
<?php
}