Default image alignment setting doesn't select a default radio button. Props MtDewVirus. fixes #7574
git-svn-id: http://svn.automattic.com/wordpress/trunk@8713 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
b314e60f74
commit
ff403dd4bc
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue