WordPress.org

Make WordPress Core

Changeset 8831


Ignore:
Timestamp:
09/06/08 00:03:03 (7 years ago)
Author:
westi
Message:

Use API for setting checked attribute fixes #7689 props matthewh84.

File:
1 edited

Legend:

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

    r8802 r8831  
    4141<th scope="row" colspan="2" class="th-full"> 
    4242<label for="uploads_use_yearmonth_folders"> 
    43 <input name="uploads_use_yearmonth_folders" type="checkbox" id="uploads_use_yearmonth_folders" value="1" <?php checked('1', get_option('uploads_use_yearmonth_folders')); ?> /> 
     43<input name="uploads_use_yearmonth_folders" type="checkbox" id="uploads_use_yearmonth_folders" value="1"<?php checked('1', get_option('uploads_use_yearmonth_folders')); ?> /> 
    4444<?php _e('Organize my uploads into month- and year-based folders'); ?> 
    4545</label> 
     
    8888    $size_names = array('' => 'Auto', 'thumbnail' => 'Thumbnail', 'medium' => 'Medium', 'large' => 'Large', 'full' => 'Full size'); 
    8989    foreach ($size_names as $size => $name) { ?> 
    90         <input type="radio" name="image_default_size" id="image_default_size_<?php echo $size; ?>" value="<?php echo $size; ?>"<?php echo (get_option('image_default_size') == $size ? ' checked="checked"' : ''); ?> />             
     90        <input type="radio" name="image_default_size" id="image_default_size_<?php echo $size; ?>" value="<?php echo $size; ?>"<?php checked(get_option('image_default_size'), $size); ?> />             
    9191        <label for="image_default_size_<?php echo $size; ?>"><?php _e($name); ?></label> 
    9292    <?php 
     
    108108 
    109109    foreach ($alignments as $align => $name) { ?> 
    110         <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"' : ''); ?> /> 
     110        <input type="radio" name="image_default_align" id="image_default_align_<?php echo $align; ?>" value="<?php echo $align; ?>"<?php checked($default_align, $align); ?> /> 
    111111        <label for="image_default_align_<?php echo $align; ?>"><?php _e($name); ?></label> 
    112112    <?php 
     
    123123    $link_types = array('' => 'None', 'post' => 'Post URL', 'file' => 'File'); 
    124124    foreach ($link_types as $type => $name) { ?> 
    125         <input type="radio" name="image_default_link_type" id="image_default_link_type_<?php echo $type; ?>" value="<?php echo $type; ?>"<?php echo (get_option('image_default_link_type') == $type ? ' checked="checked"' : ''); ?> />          
     125        <input type="radio" name="image_default_link_type" id="image_default_link_type_<?php echo $type; ?>" value="<?php echo $type; ?>"<?php checked(get_option('image_default_link_type'), $type); ?> />          
    126126        <label for="image_default_link_type_<?php echo $type; ?>"><?php _e($name); ?></label> 
    127127    <?php 
     
    141141<th scope="row" class="th-full"> 
    142142<label for="use_linksupdate"> 
    143 <input name="use_linksupdate" type="checkbox" id="use_linksupdate" value="1" <?php checked('1', get_option('use_linksupdate')); ?> /> 
     143<input name="use_linksupdate" type="checkbox" id="use_linksupdate" value="1"<?php checked('1', get_option('use_linksupdate')); ?> /> 
    144144<?php _e('Track Links&#8217; Update Times') ?> 
    145145</label> 
     
    150150<th scope="row" class="th-full"> 
    151151<label for="hack_file"> 
    152 <input type="checkbox" id="hack_file" name="hack_file" value="1" <?php checked('1', get_option('hack_file')); ?> /> 
     152<input type="checkbox" id="hack_file" name="hack_file" value="1"<?php checked('1', get_option('hack_file')); ?> /> 
    153153<?php _e('Use legacy <code>my-hacks.php</code> file support') ?> 
    154154</label> 
Note: See TracChangeset for help on using the changeset viewer.