<!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>[14930] trunk/wp-admin: Hide Flash uploader and theme/
 plugin editor documentation feature, if no JS.</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/14930">14930</a></dd>
<dt>Author</dt> <dd>nacin</dd>
<dt>Date</dt> <dd>2010-05-26 03:57:55 +0000 (Wed, 26 May 2010)</dd>
</dl>

<h3>Log Message</h3>
<pre>Hide Flash uploader and theme/plugin editor documentation feature, if no JS. Also some validation fixes in the theme editor. props ocean90. see <a href="http://trac.wordpress.org/ticket/13383">#13383</a>.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadminincludesmediaphp">trunk/wp-admin/includes/media.php</a></li>
<li><a href="#trunkwpadminmediauploadphp">trunk/wp-admin/media-upload.php</a></li>
<li><a href="#trunkwpadminplugineditorphp">trunk/wp-admin/plugin-editor.php</a></li>
<li><a href="#trunkwpadminthemeeditorphp">trunk/wp-admin/theme-editor.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadminincludesmediaphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/media.php (14929 => 14930)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/media.php        2010-05-26 03:36:04 UTC (rev 14929)
+++ trunk/wp-admin/includes/media.php        2010-05-26 03:57:55 UTC (rev 14930)
</span><span class="lines">@@ -1489,7 +1489,7 @@
</span><span class="cx"> //]]&gt;
</span><span class="cx"> &lt;/script&gt;
</span><span class="cx"> 
</span><del>-&lt;div id=&quot;flash-upload-ui&quot;&gt;
</del><ins>+&lt;div id=&quot;flash-upload-ui&quot; class=&quot;hide-if-no-js&quot;&gt;
</ins><span class="cx"> &lt;?php do_action('pre-flash-upload-ui'); ?&gt;
</span><span class="cx"> 
</span><span class="cx">         &lt;div&gt;
</span><span class="lines">@@ -2231,7 +2231,7 @@
</span><span class="cx">  * @since unknown
</span><span class="cx">  */
</span><span class="cx"> function media_upload_html_bypass($flash = true) {
</span><del>-        echo '&lt;p class=&quot;upload-html-bypass&quot;&gt;';
</del><ins>+        echo '&lt;p class=&quot;upload-html-bypass hide-if-no-js&quot;&gt;';
</ins><span class="cx">         _e('You are using the Browser uploader.');
</span><span class="cx">         if ( $flash ) {
</span><span class="cx">                 // the user manually selected the browser uploader, so let them switch back to Flash
</span></span></pre></div>
<a id="trunkwpadminmediauploadphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/media-upload.php (14929 => 14930)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/media-upload.php        2010-05-26 03:36:04 UTC (rev 14929)
+++ trunk/wp-admin/media-upload.php        2010-05-26 03:57:55 UTC (rev 14930)
</span><span class="lines">@@ -88,9 +88,9 @@
</span><span class="cx">         &lt;/script&gt;
</span><span class="cx">         &lt;input type=&quot;hidden&quot; name=&quot;post_id&quot; id=&quot;post_id&quot; value=&quot;0&quot; /&gt;
</span><span class="cx">         &lt;?php wp_nonce_field('media-form'); ?&gt;
</span><del>-        &lt;div id=&quot;media-items&quot;&gt; &lt;/div&gt;
</del><ins>+        &lt;div id=&quot;media-items&quot; class=&quot;hide-if-no-js&quot;&gt; &lt;/div&gt;
</ins><span class="cx">         &lt;p&gt;
</span><del>-        &lt;input type=&quot;submit&quot; class=&quot;button savebutton&quot; name=&quot;save&quot; value=&quot;&lt;?php esc_attr_e( 'Save all changes' ); ?&gt;&quot; /&gt;
</del><ins>+        &lt;input type=&quot;submit&quot; class=&quot;button savebutton hide-if-no-js&quot; name=&quot;save&quot; value=&quot;&lt;?php esc_attr_e( 'Save all changes' ); ?&gt;&quot; /&gt;
</ins><span class="cx">         &lt;/p&gt;
</span><span class="cx">         &lt;/form&gt;
</span><span class="cx">         &lt;/div&gt;
</span></span></pre></div>
<a id="trunkwpadminplugineditorphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/plugin-editor.php (14929 => 14930)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/plugin-editor.php        2010-05-26 03:36:04 UTC (rev 14929)
+++ trunk/wp-admin/plugin-editor.php        2010-05-26 03:57:55 UTC (rev 14930)
</span><span class="lines">@@ -211,7 +211,7 @@
</span><span class="cx">                 &lt;input type=&quot;hidden&quot; name=&quot;scrollto&quot; id=&quot;scrollto&quot; value=&quot;&lt;?php echo $scrollto; ?&gt;&quot; /&gt;
</span><span class="cx">                 &lt;/div&gt;
</span><span class="cx">                 &lt;?php if ( !empty( $docs_select ) ) : ?&gt;
</span><del>-                &lt;div id=&quot;documentation&quot;&gt;&lt;label for=&quot;docs-list&quot;&gt;&lt;?php _e('Documentation:') ?&gt;&lt;/label&gt; &lt;?php echo $docs_select ?&gt; &lt;input type=&quot;button&quot; class=&quot;button&quot; value=&quot;&lt;?php esc_attr_e( 'Lookup' ) ?&gt; &quot; onclick=&quot;if ( '' != jQuery('#docs-list').val() ) { window.open( 'http://api.wordpress.org/core/handbook/1.0/?function=' + escape( jQuery( '#docs-list' ).val() ) + '&amp;amp;locale=&lt;?php echo urlencode( get_locale() ) ?&gt;&amp;amp;version=&lt;?php echo urlencode( $wp_version ) ?&gt;&amp;amp;redirect=true'); }&quot; /&gt;&lt;/div&gt;
</del><ins>+                &lt;div id=&quot;documentation&quot; class=&quot;hide-if-no-js&quot;&gt;&lt;label for=&quot;docs-list&quot;&gt;&lt;?php _e('Documentation:') ?&gt;&lt;/label&gt; &lt;?php echo $docs_select ?&gt; &lt;input type=&quot;button&quot; class=&quot;button&quot; value=&quot;&lt;?php esc_attr_e( 'Lookup' ) ?&gt; &quot; onclick=&quot;if ( '' != jQuery('#docs-list').val() ) { window.open( 'http://api.wordpress.org/core/handbook/1.0/?function=' + escape( jQuery( '#docs-list' ).val() ) + '&amp;amp;locale=&lt;?php echo urlencode( get_locale() ) ?&gt;&amp;amp;version=&lt;?php echo urlencode( $wp_version ) ?&gt;&amp;amp;redirect=true'); }&quot; /&gt;&lt;/div&gt;
</ins><span class="cx">                 &lt;?php endif; ?&gt;
</span><span class="cx"> &lt;?php if ( is_writeable($real_file) ) : ?&gt;
</span><span class="cx">         &lt;?php if ( in_array( $file, (array) get_option( 'active_plugins', array() ) ) ) { ?&gt;
</span></span></pre></div>
<a id="trunkwpadminthemeeditorphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/theme-editor.php (14929 => 14930)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/theme-editor.php        2010-05-26 03:36:04 UTC (rev 14929)
+++ trunk/wp-admin/theme-editor.php        2010-05-26 03:57:55 UTC (rev 14930)
</span><span class="lines">@@ -201,10 +201,10 @@
</span><span class="cx">                  &lt;input type=&quot;hidden&quot; name=&quot;scrollto&quot; id=&quot;scrollto&quot; value=&quot;&lt;?php echo $scrollto; ?&gt;&quot; /&gt;
</span><span class="cx">                  &lt;/div&gt;
</span><span class="cx">         &lt;?php if ( isset($functions ) &amp;&amp; count($functions) ) { ?&gt;
</span><del>-                &lt;div id=&quot;documentation&quot;&gt;
</del><ins>+                &lt;div id=&quot;documentation&quot; class=&quot;hide-if-no-js&quot;&gt;
</ins><span class="cx">                 &lt;label for=&quot;docs-list&quot;&gt;&lt;?php _e('Documentation:') ?&gt;&lt;/label&gt;
</span><span class="cx">                 &lt;?php echo $docs_select; ?&gt;
</span><del>-                &lt;input type=&quot;button&quot; class=&quot;button&quot; value=&quot; &lt;?php esc_attr_e( 'Lookup' ); ?&gt; &quot; onclick=&quot;if ( '' != jQuery('#docs-list').val() ) { window.open( 'http://api.wordpress.org/core/handbook/1.0/?function=' + escape( jQuery( '#docs-list' ).val() ) + '&amp;locale=&lt;?php echo urlencode( get_locale() ) ?&gt;&amp;version=&lt;?php echo urlencode( $wp_version ) ?&gt;&amp;redirect=true'); }&quot; /&gt;
</del><ins>+                &lt;input type=&quot;button&quot; class=&quot;button&quot; value=&quot; &lt;?php esc_attr_e( 'Lookup' ); ?&gt; &quot; onclick=&quot;if ( '' != jQuery('#docs-list').val() ) { window.open( 'http://api.wordpress.org/core/handbook/1.0/?function=' + escape( jQuery( '#docs-list' ).val() ) + '&amp;amp;locale=&lt;?php echo urlencode( get_locale() ) ?&gt;&amp;amp;version=&lt;?php echo urlencode( $wp_version ) ?&gt;&amp;amp;redirect=true'); }&quot; /&gt;
</ins><span class="cx">                 &lt;/div&gt;
</span><span class="cx">         &lt;?php } ?&gt;
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>