<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[13661] trunk/wp-admin: Use disabled() form helper.</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/13661">13661</a></dd>
<dt>Author</dt> <dd>nacin</dd>
<dt>Date</dt> <dd>2010-03-11 17:12:23 +0000 (Thu, 11 Mar 2010)</dd>
</dl>

<h3>Log Message</h3>
<pre>Use disabled() form helper. fixes <a href="http://trac.wordpress.org/ticket/12581">#12581</a></pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadminincludesfilephp">trunk/wp-admin/includes/file.php</a></li>
<li><a href="#trunkwpadminincludesmediaphp">trunk/wp-admin/includes/media.php</a></li>
<li><a href="#trunkwpadminincludestemplatephp">trunk/wp-admin/includes/template.php</a></li>
<li><a href="#trunkwpadminmssitesphp">trunk/wp-admin/ms-sites.php</a></li>
<li><a href="#trunkwpadminoptionsgeneralphp">trunk/wp-admin/options-general.php</a></li>
<li><a href="#trunkwpadminoptionsphp">trunk/wp-admin/options.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadminincludesfilephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/file.php (13660 => 13661)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/file.php        2010-03-11 17:05:16 UTC (rev 13660)
+++ trunk/wp-admin/includes/file.php        2010-03-11 17:12:23 UTC (rev 13661)
</span><span class="lines">@@ -914,17 +914,17 @@
</span><span class="cx"> &lt;table class=&quot;form-table&quot;&gt;
</span><span class="cx"> &lt;tr valign=&quot;top&quot;&gt;
</span><span class="cx"> &lt;th scope=&quot;row&quot;&gt;&lt;label for=&quot;hostname&quot;&gt;&lt;?php _e('Hostname') ?&gt;&lt;/label&gt;&lt;/th&gt;
</span><del>-&lt;td&gt;&lt;input name=&quot;hostname&quot; type=&quot;text&quot; id=&quot;hostname&quot; value=&quot;&lt;?php echo esc_attr($hostname); if ( !empty($port) ) echo &quot;:$port&quot;; ?&gt;&quot;&lt;?php if ( defined('FTP_HOST') ) echo ' disabled=&quot;disabled&quot;' ?&gt; size=&quot;40&quot; /&gt;&lt;/td&gt;
</del><ins>+&lt;td&gt;&lt;input name=&quot;hostname&quot; type=&quot;text&quot; id=&quot;hostname&quot; value=&quot;&lt;?php echo esc_attr($hostname); if ( !empty($port) ) echo &quot;:$port&quot;; ?&gt;&quot;&lt;?php disabled( defined('FTP_HOST') ); ?&gt; size=&quot;40&quot; /&gt;&lt;/td&gt;
</ins><span class="cx"> &lt;/tr&gt;
</span><span class="cx"> 
</span><span class="cx"> &lt;tr valign=&quot;top&quot;&gt;
</span><span class="cx"> &lt;th scope=&quot;row&quot;&gt;&lt;label for=&quot;username&quot;&gt;&lt;?php _e('Username') ?&gt;&lt;/label&gt;&lt;/th&gt;
</span><del>-&lt;td&gt;&lt;input name=&quot;username&quot; type=&quot;text&quot; id=&quot;username&quot; value=&quot;&lt;?php echo esc_attr($username) ?&gt;&quot;&lt;?php if ( defined('FTP_USER') ) echo ' disabled=&quot;disabled&quot;' ?&gt; size=&quot;40&quot; /&gt;&lt;/td&gt;
</del><ins>+&lt;td&gt;&lt;input name=&quot;username&quot; type=&quot;text&quot; id=&quot;username&quot; value=&quot;&lt;?php echo esc_attr($username) ?&gt;&quot;&lt;?php disabled( defined('FTP_USER') ); ?&gt; size=&quot;40&quot; /&gt;&lt;/td&gt;
</ins><span class="cx"> &lt;/tr&gt;
</span><span class="cx"> 
</span><span class="cx"> &lt;tr valign=&quot;top&quot;&gt;
</span><span class="cx"> &lt;th scope=&quot;row&quot;&gt;&lt;label for=&quot;password&quot;&gt;&lt;?php _e('Password') ?&gt;&lt;/label&gt;&lt;/th&gt;
</span><del>-&lt;td&gt;&lt;input name=&quot;password&quot; type=&quot;password&quot; id=&quot;password&quot; value=&quot;&lt;?php if ( defined('FTP_PASS') ) echo '*****'; ?&gt;&quot;&lt;?php if ( defined('FTP_PASS') ) echo ' disabled=&quot;disabled&quot;' ?&gt; size=&quot;40&quot; /&gt;&lt;/td&gt;
</del><ins>+&lt;td&gt;&lt;input name=&quot;password&quot; type=&quot;password&quot; id=&quot;password&quot; value=&quot;&lt;?php if ( defined('FTP_PASS') ) echo '*****'; ?&gt;&quot;&lt;?php disabled( defined('FTP_PASS') ); ?&gt; size=&quot;40&quot; /&gt;&lt;/td&gt;
</ins><span class="cx"> &lt;/tr&gt;
</span><span class="cx"> 
</span><span class="cx"> &lt;?php if ( isset($types['ssh']) ) : ?&gt;
</span><span class="lines">@@ -934,7 +934,7 @@
</span><span class="cx"> &lt;label for=&quot;public_key&quot;&gt;&lt;?php _e('Public Key:') ?&gt;&lt;/label &gt;&lt;br /&gt;
</span><span class="cx"> &lt;label for=&quot;private_key&quot;&gt;&lt;?php _e('Private Key:') ?&gt;&lt;/label&gt;
</span><span class="cx"> &lt;/div&gt;&lt;/th&gt;
</span><del>-&lt;td&gt;&lt;br /&gt;&lt;input name=&quot;public_key&quot; type=&quot;text&quot; id=&quot;public_key&quot; value=&quot;&lt;?php echo esc_attr($public_key) ?&gt;&quot;&lt;?php if ( defined('FTP_PUBKEY') ) echo ' disabled=&quot;disabled&quot;' ?&gt; size=&quot;40&quot; /&gt;&lt;br /&gt;&lt;input name=&quot;private_key&quot; type=&quot;text&quot; id=&quot;private_key&quot; value=&quot;&lt;?php echo esc_attr($private_key) ?&gt;&quot;&lt;?php if ( defined('FTP_PRIKEY') ) echo ' disabled=&quot;disabled&quot;' ?&gt; size=&quot;40&quot; /&gt;
</del><ins>+&lt;td&gt;&lt;br /&gt;&lt;input name=&quot;public_key&quot; type=&quot;text&quot; id=&quot;public_key&quot; value=&quot;&lt;?php echo esc_attr($public_key) ?&gt;&quot;&lt;?php disabled( defined('FTP_PUBKEY') ); ?&gt; size=&quot;40&quot; /&gt;&lt;br /&gt;&lt;input name=&quot;private_key&quot; type=&quot;text&quot; id=&quot;private_key&quot; value=&quot;&lt;?php echo esc_attr($private_key) ?&gt;&quot;&lt;?php disabled( defined('FTP_PRIKEY') ); ?&gt; size=&quot;40&quot; /&gt;
</ins><span class="cx"> &lt;div&gt;&lt;?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.') ?&gt;&lt;/div&gt;&lt;/td&gt;
</span><span class="cx"> &lt;/tr&gt;
</span><span class="cx"> &lt;?php endif; ?&gt;
</span><span class="lines">@@ -943,13 +943,9 @@
</span><span class="cx"> &lt;th scope=&quot;row&quot;&gt;&lt;?php _e('Connection Type') ?&gt;&lt;/th&gt;
</span><span class="cx"> &lt;td&gt;
</span><span class="cx"> &lt;fieldset&gt;&lt;legend class=&quot;screen-reader-text&quot;&gt;&lt;span&gt;&lt;?php _e('Connection Type') ?&gt;&lt;/span&gt;&lt;/legend&gt;
</span><del>-&lt;?php
-
-        $disabled = (defined('FTP_SSL') &amp;&amp; FTP_SSL) || (defined('FTP_SSH') &amp;&amp; FTP_SSH) ? ' disabled=&quot;disabled&quot;' : '';
-
-        foreach ( $types as $name =&gt; $text ) : ?&gt;
</del><ins>+&lt;?php foreach ( $types as $name =&gt; $text ) : ?&gt;
</ins><span class="cx">         &lt;label for=&quot;&lt;?php echo esc_attr($name) ?&gt;&quot;&gt;
</span><del>-                &lt;input type=&quot;radio&quot; name=&quot;connection_type&quot; id=&quot;&lt;?php echo esc_attr($name) ?&gt;&quot; value=&quot;&lt;?php echo esc_attr($name) ?&gt;&quot; &lt;?php checked($name, $connection_type); echo $disabled; ?&gt;/&gt;
</del><ins>+                &lt;input type=&quot;radio&quot; name=&quot;connection_type&quot; id=&quot;&lt;?php echo esc_attr($name) ?&gt;&quot; value=&quot;&lt;?php echo esc_attr($name) ?&gt;&quot;&lt;?php checked($name, $connection_type); disabled( $disabled, (defined('FTP_SSL') &amp;&amp; FTP_SSL) || (defined('FTP_SSH') &amp;&amp; FTP_SSH) ); ?&gt; /&gt;
</ins><span class="cx">                 &lt;?php echo $text ?&gt;
</span><span class="cx">         &lt;/label&gt;
</span><span class="cx">         &lt;?php endforeach; ?&gt;
</span></span></pre></div>
<a id="trunkwpadminincludesmediaphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/media.php (13660 => 13661)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/media.php        2010-03-11 17:05:16 UTC (rev 13660)
+++ trunk/wp-admin/includes/media.php        2010-03-11 17:12:23 UTC (rev 13661)
</span><span class="lines">@@ -858,7 +858,7 @@
</span><span class="cx">                                 $checked = &quot; checked='checked'&quot;;
</span><span class="cx">                         }
</span><span class="cx"> 
</span><del>-                        $html = &quot;&lt;div class='image-size-item'&gt;&lt;input type='radio' &quot; . ( $enabled ? '' : &quot;disabled='disabled' &quot; ) . &quot;name='attachments[$post-&gt;ID][image-size]' id='{$css_id}' value='{$size}'$checked /&gt;&quot;;
</del><ins>+                        $html = &quot;&lt;div class='image-size-item'&gt;&lt;input type='radio' &quot; . disabled( $enabled, false, false ) . &quot;name='attachments[$post-&gt;ID][image-size]' id='{$css_id}' value='{$size}'$checked /&gt;&quot;;
</ins><span class="cx"> 
</span><span class="cx">                         $html .= &quot;&lt;label for='{$css_id}'&gt;$label&lt;/label&gt;&quot;;
</span><span class="cx">                         // only show the dimensions if that choice is available
</span></span></pre></div>
<a id="trunkwpadminincludestemplatephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/template.php (13660 => 13661)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/template.php        2010-03-11 17:05:16 UTC (rev 13660)
+++ trunk/wp-admin/includes/template.php        2010-03-11 17:12:23 UTC (rev 13661)
</span><span class="lines">@@ -206,7 +206,7 @@
</span><span class="cx">                         $name = 'tax_input['.$taxonomy.']';
</span><span class="cx"> 
</span><span class="cx">                 $class = in_array( $category-&gt;term_id, $popular_cats ) ? ' class=&quot;popular-category&quot;' : '';
</span><del>-                $output .= &quot;\n&lt;li id='{$taxonomy}-{$category-&gt;term_id}'$class&gt;&quot; . '&lt;label class=&quot;selectit&quot;&gt;&lt;input value=&quot;' . $category-&gt;term_id . '&quot; type=&quot;checkbox&quot; name=&quot;'.$name.'[]&quot; id=&quot;in-'.$taxonomy.'-' . $category-&gt;term_id . '&quot;' . (in_array( $category-&gt;term_id, $selected_cats ) ? ' checked=&quot;checked&quot;' : &quot;&quot; ) . (!empty($args['disabled']) ? 'disabled=&quot;disabled&quot;' : '') . '/&gt; ' . esc_html( apply_filters('the_category', $category-&gt;name )) . '&lt;/label&gt;';
</del><ins>+                $output .= &quot;\n&lt;li id='{$taxonomy}-{$category-&gt;term_id}'$class&gt;&quot; . '&lt;label class=&quot;selectit&quot;&gt;&lt;input value=&quot;' . $category-&gt;term_id . '&quot; type=&quot;checkbox&quot; name=&quot;'.$name.'[]&quot; id=&quot;in-'.$taxonomy.'-' . $category-&gt;term_id . '&quot;' . checked( in_array( $category-&gt;term_id, $selected_cats ), true, false ) . disabled( empty( $args['disabled'] ), false, false ) . ' /&gt; ' . esc_html( apply_filters('the_category', $category-&gt;name )) . '&lt;/label&gt;';
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         function end_el(&amp;$output, $category, $depth, $args) {
</span></span></pre></div>
<a id="trunkwpadminmssitesphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/ms-sites.php (13660 => 13661)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/ms-sites.php        2010-03-11 17:05:16 UTC (rev 13660)
+++ trunk/wp-admin/ms-sites.php        2010-03-11 17:12:23 UTC (rev 13661)
</span><span class="lines">@@ -165,20 +165,20 @@
</span><span class="cx">                                                         foreach ( $options as $option ) {
</span><span class="cx">                                                                 if ( $option-&gt;option_name == 'default_role' )
</span><span class="cx">                                                                         $editblog_default_role = $option-&gt;option_value;
</span><del>-                                                                $disabled = '';
</del><ins>+                                                                $disabled = false;
</ins><span class="cx">                                                                 if ( is_serialized($option-&gt;option_value) ) {
</span><span class="cx">                                                                         if ( is_serialized_string($option-&gt;option_value) ) {
</span><span class="cx">                                                                                 $option-&gt;option_value = esc_html(maybe_unserialize($option-&gt;option_value), 'single');
</span><span class="cx">                                                                         } else {
</span><span class="cx">                                                                                 $option-&gt;option_value = &quot;SERIALIZED DATA&quot;;
</span><del>-                                                                                $disabled = ' disabled=&quot;disabled&quot;';
</del><ins>+                                                                                $disabled = true;
</ins><span class="cx">                                                                         }
</span><span class="cx">                                                                 }
</span><span class="cx">                                                                 if ( stristr($option-&gt;option_value, &quot;\r&quot;) || stristr($option-&gt;option_value, &quot;\n&quot;) || stristr($option-&gt;option_value, &quot;\r\n&quot;) ) {
</span><span class="cx">                                                                 ?&gt;
</span><span class="cx">                                                                         &lt;tr class=&quot;form-field&quot;&gt;
</span><span class="cx">                                                                                 &lt;th scope=&quot;row&quot;&gt;&lt;?php echo ucwords( str_replace( &quot;_&quot;, &quot; &quot;, $option-&gt;option_name ) ) ?&gt;&lt;/th&gt;
</span><del>-                                                                                &lt;td&gt;&lt;textarea rows=&quot;5&quot; cols=&quot;40&quot; name=&quot;option[&lt;?php echo esc_attr($option-&gt;option_name) ?&gt;]&quot; id=&quot;&lt;?php echo esc_attr($option-&gt;option_name) ?&gt;&quot;&lt;?php echo $disabled ?&gt;&gt;&lt;?php echo esc_html( $option-&gt;option_value ) ?&gt;&lt;/textarea&gt;&lt;/td&gt;
</del><ins>+                                                                                &lt;td&gt;&lt;textarea rows=&quot;5&quot; cols=&quot;40&quot; name=&quot;option[&lt;?php echo esc_attr($option-&gt;option_name) ?&gt;]&quot; id=&quot;&lt;?php echo esc_attr($option-&gt;option_name) ?&gt;&quot;&lt;?php disabled( $disabled ) ?&gt;&gt;&lt;?php echo esc_html( $option-&gt;option_value ) ?&gt;&lt;/textarea&gt;&lt;/td&gt;
</ins><span class="cx">                                                                         &lt;/tr&gt;
</span><span class="cx">                                                                 &lt;?php
</span><span class="cx">                                                                 } else {
</span><span class="lines">@@ -188,7 +188,7 @@
</span><span class="cx"> &lt;?php if ( $is_main_site &amp;&amp; in_array( $option-&gt;option_name, array( 'siteurl', 'home' ) ) ) { ?&gt;
</span><span class="cx">                                                                                 &lt;td&gt;&lt;?php echo esc_attr( $option-&gt;option_value ) ?&gt;&lt;/td&gt;
</span><span class="cx"> &lt;?php } else { ?&gt;
</span><del>-                                                                                &lt;td&gt;&lt;input name=&quot;option[&lt;?php echo esc_attr($option-&gt;option_name) ?&gt;]&quot; type=&quot;text&quot; id=&quot;&lt;?php echo esc_attr($option-&gt;option_name) ?&gt;&quot; value=&quot;&lt;?php echo esc_attr( $option-&gt;option_value ) ?&gt;&quot; size=&quot;40&quot; &lt;?php echo $disabled ?&gt; /&gt;&lt;/td&gt;
</del><ins>+                                                                                &lt;td&gt;&lt;input name=&quot;option[&lt;?php echo esc_attr($option-&gt;option_name) ?&gt;]&quot; type=&quot;text&quot; id=&quot;&lt;?php echo esc_attr($option-&gt;option_name) ?&gt;&quot; value=&quot;&lt;?php echo esc_attr( $option-&gt;option_value ) ?&gt;&quot; size=&quot;40&quot; &lt;?php disabled( $disabled ) ?&gt; /&gt;&lt;/td&gt;
</ins><span class="cx"> &lt;?php } ?&gt;
</span><span class="cx">                                                                         &lt;/tr&gt;
</span><span class="cx">                                                                 &lt;?php
</span></span></pre></div>
<a id="trunkwpadminoptionsgeneralphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/options-general.php (13660 => 13661)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/options-general.php        2010-03-11 17:05:16 UTC (rev 13660)
+++ trunk/wp-admin/options-general.php        2010-03-11 17:12:23 UTC (rev 13661)
</span><span class="lines">@@ -75,11 +75,11 @@
</span><span class="cx"> &lt;?php if ( !is_multisite() ) { ?&gt;
</span><span class="cx"> &lt;tr valign=&quot;top&quot;&gt;
</span><span class="cx"> &lt;th scope=&quot;row&quot;&gt;&lt;label for=&quot;siteurl&quot;&gt;&lt;?php _e('WordPress address (URL)') ?&gt;&lt;/label&gt;&lt;/th&gt;
</span><del>-&lt;td&gt;&lt;input name=&quot;siteurl&quot; type=&quot;text&quot; id=&quot;siteurl&quot; value=&quot;&lt;?php form_option('siteurl'); ?&gt;&quot; class=&quot;regular-text code&lt;?php if ( defined( 'WP_SITEURL' ) ) : ?&gt; disabled&quot; disabled=&quot;disabled&quot;&lt;?php else: ?&gt;&quot;&lt;?php endif; ?&gt; /&gt;&lt;/td&gt;
</del><ins>+&lt;td&gt;&lt;input name=&quot;siteurl&quot; type=&quot;text&quot; id=&quot;siteurl&quot; value=&quot;&lt;?php form_option('siteurl'); ?&gt;&quot;&lt;?php $disabled = disabled( defined( 'WP_SITEURL' ) ); ?&gt; class=&quot;regular-text code&lt;?php if ( $disabled ) echo ' disabled' ?&gt;&quot; /&gt;&lt;/td&gt;
</ins><span class="cx"> &lt;/tr&gt;
</span><span class="cx"> &lt;tr valign=&quot;top&quot;&gt;
</span><span class="cx"> &lt;th scope=&quot;row&quot;&gt;&lt;label for=&quot;home&quot;&gt;&lt;?php _e('Blog address (URL)') ?&gt;&lt;/label&gt;&lt;/th&gt;
</span><del>-&lt;td&gt;&lt;input name=&quot;home&quot; type=&quot;text&quot; id=&quot;home&quot; value=&quot;&lt;?php form_option('home'); ?&gt;&quot; class=&quot;regular-text code&lt;?php if ( defined( 'WP_HOME' ) ) : ?&gt; disabled&quot; disabled=&quot;disabled&quot;&lt;?php else: ?&gt;&quot;&lt;?php endif; ?&gt; /&gt;
</del><ins>+&lt;td&gt;&lt;input name=&quot;home&quot; type=&quot;text&quot; id=&quot;home&quot; value=&quot;&lt;?php form_option('home'); ?&gt;&quot;&lt;?php $disabled = disabled( defined( 'WP_HOME' ) ); ?&gt; class=&quot;regular-text code&lt;?php if ( $disabled ) echo ' disabled' ?&gt;&quot; /&gt;
</ins><span class="cx"> &lt;span class=&quot;description&quot;&gt;&lt;?php _e('Enter the address here if you want your blog homepage &lt;a href=&quot;http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory&quot;&gt;to be different from the directory&lt;/a&gt; you installed WordPress.'); ?&gt;&lt;/span&gt;&lt;/td&gt;
</span><span class="cx"> &lt;/tr&gt;
</span><span class="cx"> &lt;tr valign=&quot;top&quot;&gt;
</span></span></pre></div>
<a id="trunkwpadminoptionsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/options.php (13660 => 13661)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/options.php        2010-03-11 17:05:16 UTC (rev 13660)
+++ trunk/wp-admin/options.php        2010-03-11 17:12:23 UTC (rev 13661)
</span><span class="lines">@@ -173,7 +173,7 @@
</span><span class="cx"> $options = $wpdb-&gt;get_results( &quot;SELECT * FROM $wpdb-&gt;options ORDER BY option_name&quot; );
</span><span class="cx"> 
</span><span class="cx"> foreach ( (array) $options as $option ) :
</span><del>-        $disabled = '';
</del><ins>+        $disabled = false;
</ins><span class="cx">         if ( $option-&gt;option_name == '' )
</span><span class="cx">                 continue;
</span><span class="cx">         if ( is_serialized( $option-&gt;option_value ) ) {
</span><span class="lines">@@ -184,7 +184,7 @@
</span><span class="cx">                         $class = 'all-options';
</span><span class="cx">                 } else {
</span><span class="cx">                         $value = 'SERIALIZED DATA';
</span><del>-                        $disabled = ' disabled=&quot;disabled&quot;';
</del><ins>+                        $disabled = true;
</ins><span class="cx">                         $class = 'all-options disabled';
</span><span class="cx">                 }
</span><span class="cx">         } else {
</span><span class="lines">@@ -200,7 +200,7 @@
</span><span class="cx">         if ( strpos( $value, &quot;\n&quot; ) !== false )
</span><span class="cx">                 echo &quot;&lt;textarea class='$class' name='$name' id='$name' cols='30' rows='5'&gt;&quot; . wp_htmledit_pre( $value ) . &quot;&lt;/textarea&gt;&quot;;
</span><span class="cx">         else
</span><del>-                echo &quot;&lt;input class='regular-text $class' type='text' name='$name' id='$name' value='&quot; . esc_attr( $value ) . &quot;'$disabled /&gt;&quot;;
</del><ins>+                echo &quot;&lt;input class='regular-text $class' type='text' name='$name' id='$name' value='&quot; . esc_attr( $value ) . &quot;'&quot; . disabled( $disabled, true, false ) . &quot; /&gt;&quot;;
</ins><span class="cx">         echo &quot;&lt;/td&gt;
</span><span class="cx"> &lt;/tr&gt;&quot;;
</span><span class="cx"> endforeach;
</span></span></pre>
</div>
</div>

</body>
</html>