Changeset 13661
- Timestamp:
- 03/11/2010 05:12:23 PM (15 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/file.php
r13577 r13661 915 915 <tr valign="top"> 916 916 <th scope="row"><label for="hostname"><?php _e('Hostname') ?></label></th> 917 <td><input name="hostname" type="text" id="hostname" value="<?php echo esc_attr($hostname); if ( !empty($port) ) echo ":$port"; ?>"<?php if ( defined('FTP_HOST') ) echo ' disabled="disabled"'?> size="40" /></td>917 <td><input name="hostname" type="text" id="hostname" value="<?php echo esc_attr($hostname); if ( !empty($port) ) echo ":$port"; ?>"<?php disabled( defined('FTP_HOST') ); ?> size="40" /></td> 918 918 </tr> 919 919 920 920 <tr valign="top"> 921 921 <th scope="row"><label for="username"><?php _e('Username') ?></label></th> 922 <td><input name="username" type="text" id="username" value="<?php echo esc_attr($username) ?>"<?php if ( defined('FTP_USER') ) echo ' disabled="disabled"'?> size="40" /></td>922 <td><input name="username" type="text" id="username" value="<?php echo esc_attr($username) ?>"<?php disabled( defined('FTP_USER') ); ?> size="40" /></td> 923 923 </tr> 924 924 925 925 <tr valign="top"> 926 926 <th scope="row"><label for="password"><?php _e('Password') ?></label></th> 927 <td><input name="password" type="password" id="password" value="<?php if ( defined('FTP_PASS') ) echo '*****'; ?>"<?php if ( defined('FTP_PASS') ) echo ' disabled="disabled"'?> size="40" /></td>927 <td><input name="password" type="password" id="password" value="<?php if ( defined('FTP_PASS') ) echo '*****'; ?>"<?php disabled( defined('FTP_PASS') ); ?> size="40" /></td> 928 928 </tr> 929 929 … … 935 935 <label for="private_key"><?php _e('Private Key:') ?></label> 936 936 </div></th> 937 <td><br /><input name="public_key" type="text" id="public_key" value="<?php echo esc_attr($public_key) ?>"<?php if ( defined('FTP_PUBKEY') ) echo ' disabled="disabled"' ?> size="40" /><br /><input name="private_key" type="text" id="private_key" value="<?php echo esc_attr($private_key) ?>"<?php if ( defined('FTP_PRIKEY') ) echo ' disabled="disabled"'?> size="40" />937 <td><br /><input name="public_key" type="text" id="public_key" value="<?php echo esc_attr($public_key) ?>"<?php disabled( defined('FTP_PUBKEY') ); ?> size="40" /><br /><input name="private_key" type="text" id="private_key" value="<?php echo esc_attr($private_key) ?>"<?php disabled( defined('FTP_PRIKEY') ); ?> size="40" /> 938 938 <div><?php _e('Enter the location on the server where the keys are located. If a passphrase is needed, enter that in the password field above.') ?></div></td> 939 939 </tr> … … 944 944 <td> 945 945 <fieldset><legend class="screen-reader-text"><span><?php _e('Connection Type') ?></span></legend> 946 <?php 947 948 $disabled = (defined('FTP_SSL') && FTP_SSL) || (defined('FTP_SSH') && FTP_SSH) ? ' disabled="disabled"' : ''; 949 950 foreach ( $types as $name => $text ) : ?> 946 <?php foreach ( $types as $name => $text ) : ?> 951 947 <label for="<?php echo esc_attr($name) ?>"> 952 <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; ?>/>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) ); ?> /> 953 949 <?php echo $text ?> 954 950 </label> -
trunk/wp-admin/includes/media.php
r13612 r13661 859 859 } 860 860 861 $html = "<div class='image-size-item'><input type='radio' " . ( $enabled ? '' : "disabled='disabled' ") . "name='attachments[$post->ID][image-size]' id='{$css_id}' value='{$size}'$checked />";861 $html = "<div class='image-size-item'><input type='radio' " . disabled( $enabled, false, false ) . "name='attachments[$post->ID][image-size]' id='{$css_id}' value='{$size}'$checked />"; 862 862 863 863 $html .= "<label for='{$css_id}'>$label</label>"; -
trunk/wp-admin/includes/template.php
r13659 r13661 207 207 208 208 $class = in_array( $category->term_id, $popular_cats ) ? ' class="popular-category"' : ''; 209 $output .= "\n<li id='{$taxonomy}-{$category->term_id}'$class>" . '<label class="selectit"><input value="' . $category->term_id . '" type="checkbox" name="'.$name.'[]" id="in-'.$taxonomy.'-' . $category->term_id . '"' . (in_array( $category->term_id, $selected_cats ) ? ' checked="checked"' : "" ) . (!empty($args['disabled']) ? 'disabled="disabled"' : '') . '/> ' . esc_html( apply_filters('the_category', $category->name )) . '</label>';209 $output .= "\n<li id='{$taxonomy}-{$category->term_id}'$class>" . '<label class="selectit"><input value="' . $category->term_id . '" type="checkbox" name="'.$name.'[]" id="in-'.$taxonomy.'-' . $category->term_id . '"' . checked( in_array( $category->term_id, $selected_cats ), true, false ) . disabled( empty( $args['disabled'] ), false, false ) . ' /> ' . esc_html( apply_filters('the_category', $category->name )) . '</label>'; 210 210 } 211 211 -
trunk/wp-admin/ms-sites.php
r13609 r13661 166 166 if ( $option->option_name == 'default_role' ) 167 167 $editblog_default_role = $option->option_value; 168 $disabled = '';168 $disabled = false; 169 169 if ( is_serialized($option->option_value) ) { 170 170 if ( is_serialized_string($option->option_value) ) { … … 172 172 } else { 173 173 $option->option_value = "SERIALIZED DATA"; 174 $disabled = ' disabled="disabled"';174 $disabled = true; 175 175 } 176 176 } … … 179 179 <tr class="form-field"> 180 180 <th scope="row"><?php echo ucwords( str_replace( "_", " ", $option->option_name ) ) ?></th> 181 <td><textarea rows="5" cols="40" name="option[<?php echo esc_attr($option->option_name) ?>]" id="<?php echo esc_attr($option->option_name) ?>"<?php echo $disabled?>><?php echo esc_html( $option->option_value ) ?></textarea></td>181 <td><textarea rows="5" cols="40" name="option[<?php echo esc_attr($option->option_name) ?>]" id="<?php echo esc_attr($option->option_name) ?>"<?php disabled( $disabled ) ?>><?php echo esc_html( $option->option_value ) ?></textarea></td> 182 182 </tr> 183 183 <?php … … 189 189 <td><?php echo esc_attr( $option->option_value ) ?></td> 190 190 <?php } else { ?> 191 <td><input name="option[<?php echo esc_attr($option->option_name) ?>]" type="text" id="<?php echo esc_attr($option->option_name) ?>" value="<?php echo esc_attr( $option->option_value ) ?>" size="40" <?php echo $disabled?> /></td>191 <td><input name="option[<?php echo esc_attr($option->option_name) ?>]" type="text" id="<?php echo esc_attr($option->option_name) ?>" value="<?php echo esc_attr( $option->option_value ) ?>" size="40" <?php disabled( $disabled ) ?> /></td> 192 192 <?php } ?> 193 193 </tr> -
trunk/wp-admin/options-general.php
r13606 r13661 76 76 <tr valign="top"> 77 77 <th scope="row"><label for="siteurl"><?php _e('WordPress address (URL)') ?></label></th> 78 <td><input name="siteurl" type="text" id="siteurl" value="<?php form_option('siteurl'); ?>" class="regular-text code<?php if ( defined( 'WP_SITEURL' ) ) : ?> disabled" disabled="disabled"<?php else: ?>"<?php endif; ?>/></td>78 <td><input name="siteurl" type="text" id="siteurl" value="<?php form_option('siteurl'); ?>"<?php $disabled = disabled( defined( 'WP_SITEURL' ) ); ?> class="regular-text code<?php if ( $disabled ) echo ' disabled' ?>" /></td> 79 79 </tr> 80 80 <tr valign="top"> 81 81 <th scope="row"><label for="home"><?php _e('Blog address (URL)') ?></label></th> 82 <td><input name="home" type="text" id="home" value="<?php form_option('home'); ?>" class="regular-text code<?php if ( defined( 'WP_HOME' ) ) : ?> disabled" disabled="disabled"<?php else: ?>"<?php endif; ?>/>82 <td><input name="home" type="text" id="home" value="<?php form_option('home'); ?>"<?php $disabled = disabled( defined( 'WP_HOME' ) ); ?> class="regular-text code<?php if ( $disabled ) echo ' disabled' ?>" /> 83 83 <span class="description"><?php _e('Enter the address here if you want your blog homepage <a href="http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory">to be different from the directory</a> you installed WordPress.'); ?></span></td> 84 84 </tr> -
trunk/wp-admin/options.php
r13646 r13661 174 174 175 175 foreach ( (array) $options as $option ) : 176 $disabled = '';176 $disabled = false; 177 177 if ( $option->option_name == '' ) 178 178 continue; … … 185 185 } else { 186 186 $value = 'SERIALIZED DATA'; 187 $disabled = ' disabled="disabled"';187 $disabled = true; 188 188 $class = 'all-options disabled'; 189 189 } … … 201 201 echo "<textarea class='$class' name='$name' id='$name' cols='30' rows='5'>" . wp_htmledit_pre( $value ) . "</textarea>"; 202 202 else 203 echo "<input class='regular-text $class' type='text' name='$name' id='$name' value='" . esc_attr( $value ) . "' $disabled/>";203 echo "<input class='regular-text $class' type='text' name='$name' id='$name' value='" . esc_attr( $value ) . "'" . disabled( $disabled, true, false ) . " />"; 204 204 echo "</td> 205 205 </tr>";
Note: See TracChangeset
for help on using the changeset viewer.