Make WordPress Core

Changeset 13662


Ignore:
Timestamp:
03/11/2010 05:21:18 PM (15 years ago)
Author:
nacin
Message:

Fix logic and pull static code out of a loop. fixes #12581

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/file.php

    r13661 r13662  
    944944<td>
    945945<fieldset><legend class="screen-reader-text"><span><?php _e('Connection Type') ?></span></legend>
    946 <?php foreach ( $types as $name => $text ) : ?>
     946<?php
     947    $disabled = disabled( (defined('FTP_SSL') && FTP_SSL) || (defined('FTP_SSH') && FTP_SSH), true, false );
     948    foreach ( $types as $name => $text ) : ?>
    947949    <label for="<?php echo esc_attr($name) ?>">
    948         <input type="radio" name="connection_type" id="<?php echo esc_attr($name) ?>" value="<?php echo esc_attr($name) ?>"<?php checked($name, $connection_type); disabled( $disabled, (defined('FTP_SSL') && FTP_SSL) || (defined('FTP_SSH') && FTP_SSH) ); ?> />
     950        <input type="radio" name="connection_type" id="<?php echo esc_attr($name) ?>" value="<?php echo esc_attr($name) ?>"<?php checked($name, $connection_type); echo $disabled; ?> />
    949951        <?php echo $text ?>
    950952    </label>
Note: See TracChangeset for help on using the changeset viewer.