<!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"> //]]>
</span><span class="cx"> </script>
</span><span class="cx">
</span><del>-<div id="flash-upload-ui">
</del><ins>+<div id="flash-upload-ui" class="hide-if-no-js">
</ins><span class="cx"> <?php do_action('pre-flash-upload-ui'); ?>
</span><span class="cx">
</span><span class="cx">         <div>
</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 '<p class="upload-html-bypass">';
</del><ins>+        echo '<p class="upload-html-bypass hide-if-no-js">';
</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">         </script>
</span><span class="cx">         <input type="hidden" name="post_id" id="post_id" value="0" />
</span><span class="cx">         <?php wp_nonce_field('media-form'); ?>
</span><del>-        <div id="media-items"> </div>
</del><ins>+        <div id="media-items" class="hide-if-no-js"> </div>
</ins><span class="cx">         <p>
</span><del>-        <input type="submit" class="button savebutton" name="save" value="<?php esc_attr_e( 'Save all changes' ); ?>" />
</del><ins>+        <input type="submit" class="button savebutton hide-if-no-js" name="save" value="<?php esc_attr_e( 'Save all changes' ); ?>" />
</ins><span class="cx">         </p>
</span><span class="cx">         </form>
</span><span class="cx">         </div>
</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">                 <input type="hidden" name="scrollto" id="scrollto" value="<?php echo $scrollto; ?>" />
</span><span class="cx">                 </div>
</span><span class="cx">                 <?php if ( !empty( $docs_select ) ) : ?>
</span><del>-                <div id="documentation"><label for="docs-list"><?php _e('Documentation:') ?></label> <?php echo $docs_select ?> <input type="button" class="button" value="<?php esc_attr_e( 'Lookup' ) ?> " onclick="if ( '' != jQuery('#docs-list').val() ) { window.open( 'http://api.wordpress.org/core/handbook/1.0/?function=' + escape( jQuery( '#docs-list' ).val() ) + '&amp;locale=<?php echo urlencode( get_locale() ) ?>&amp;version=<?php echo urlencode( $wp_version ) ?>&amp;redirect=true'); }" /></div>
</del><ins>+                <div id="documentation" class="hide-if-no-js"><label for="docs-list"><?php _e('Documentation:') ?></label> <?php echo $docs_select ?> <input type="button" class="button" value="<?php esc_attr_e( 'Lookup' ) ?> " onclick="if ( '' != jQuery('#docs-list').val() ) { window.open( 'http://api.wordpress.org/core/handbook/1.0/?function=' + escape( jQuery( '#docs-list' ).val() ) + '&amp;locale=<?php echo urlencode( get_locale() ) ?>&amp;version=<?php echo urlencode( $wp_version ) ?>&amp;redirect=true'); }" /></div>
</ins><span class="cx">                 <?php endif; ?>
</span><span class="cx"> <?php if ( is_writeable($real_file) ) : ?>
</span><span class="cx">         <?php if ( in_array( $file, (array) get_option( 'active_plugins', array() ) ) ) { ?>
</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">                  <input type="hidden" name="scrollto" id="scrollto" value="<?php echo $scrollto; ?>" />
</span><span class="cx">                  </div>
</span><span class="cx">         <?php if ( isset($functions ) && count($functions) ) { ?>
</span><del>-                <div id="documentation">
</del><ins>+                <div id="documentation" class="hide-if-no-js">
</ins><span class="cx">                 <label for="docs-list"><?php _e('Documentation:') ?></label>
</span><span class="cx">                 <?php echo $docs_select; ?>
</span><del>-                <input type="button" class="button" value=" <?php esc_attr_e( 'Lookup' ); ?> " onclick="if ( '' != jQuery('#docs-list').val() ) { window.open( 'http://api.wordpress.org/core/handbook/1.0/?function=' + escape( jQuery( '#docs-list' ).val() ) + '&locale=<?php echo urlencode( get_locale() ) ?>&version=<?php echo urlencode( $wp_version ) ?>&redirect=true'); }" />
</del><ins>+                <input type="button" class="button" value=" <?php esc_attr_e( 'Lookup' ); ?> " onclick="if ( '' != jQuery('#docs-list').val() ) { window.open( 'http://api.wordpress.org/core/handbook/1.0/?function=' + escape( jQuery( '#docs-list' ).val() ) + '&amp;locale=<?php echo urlencode( get_locale() ) ?>&amp;version=<?php echo urlencode( $wp_version ) ?>&amp;redirect=true'); }" />
</ins><span class="cx">                 </div>
</span><span class="cx">         <?php } ?>
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>