<!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>[12555] trunk/wp-admin/includes/image-edit.php:
  Show disabled image rotation buttons when imagerotate() is missing,
  props husky and hakre, fixes #11536</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/12555">12555</a></dd>
<dt>Author</dt> <dd>azaozz</dd>
<dt>Date</dt> <dd>2009-12-27 21:24:39 +0000 (Sun, 27 Dec 2009)</dd>
</dl>

<h3>Log Message</h3>
<pre>Show disabled image rotation buttons when imagerotate() is missing, props husky and hakre, fixes <a href="http://trac.wordpress.org/ticket/11536">#11536</a></pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadminincludesimageeditphp">trunk/wp-admin/includes/image-edit.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadminincludesimageeditphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/image-edit.php (12554 => 12555)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/image-edit.php        2009-12-27 21:03:54 UTC (rev 12554)
+++ trunk/wp-admin/includes/image-edit.php        2009-12-27 21:24:39 UTC (rev 12555)
</span><span class="lines">@@ -39,13 +39,17 @@
</span><span class="cx">         &lt;div class=&quot;imgedit-menu&quot;&gt;
</span><span class="cx">                 &lt;div onclick=&quot;imageEdit.crop(&lt;?php echo &quot;$post_id, '$nonce'&quot;; ?&gt;, this)&quot; class=&quot;imgedit-crop disabled&quot; title=&quot;&lt;?php esc_attr_e( 'Crop' ); ?&gt;&quot;&gt;&lt;/div&gt;&lt;?php
</span><span class="cx"> 
</span><ins>+        // On some setups GD library does not provide imagerotate() - Ticket #11536   
</ins><span class="cx">         if ( function_exists('imagerotate') ) { ?&gt;
</span><ins>+                &lt;div class=&quot;imgedit-rleft&quot;  onclick=&quot;imageEdit.rotate( 90, &lt;?php echo &quot;$post_id, '$nonce'&quot;; ?&gt;, this)&quot; title=&quot;&lt;?php esc_attr_e( 'Rotate counter-clockwise' ); ?&gt;&quot;&gt;&lt;/div&gt;
+                &lt;div class=&quot;imgedit-rright&quot; onclick=&quot;imageEdit.rotate(-90, &lt;?php echo &quot;$post_id, '$nonce'&quot;; ?&gt;, this)&quot; title=&quot;&lt;?php esc_attr_e( 'Rotate clockwise' ); ?&gt;&quot;&gt;&lt;/div&gt;
+&lt;?php } else {
+                $note_gdlib = esc_attr__('Image rotation is not supported by your web host (function imagerotate() is missing)');
+?&gt;
+            &lt;div class=&quot;imgedit-rleft disabled&quot;  title=&quot;&lt;?php echo $note_gdlib; ?&gt;&quot;&gt;&lt;/div&gt;
+            &lt;div class=&quot;imgedit-rright disabled&quot; title=&quot;&lt;?php echo $note_gdlib; ?&gt;&quot;&gt;&lt;/div&gt;
+&lt;?php } ?&gt;
</ins><span class="cx"> 
</span><del>-                &lt;div onclick=&quot;imageEdit.rotate(90, &lt;?php echo &quot;$post_id, '$nonce'&quot;; ?&gt;, this)&quot; class=&quot;imgedit-rleft&quot; title=&quot;&lt;?php esc_attr_e( 'Rotate counter-clockwise' ); ?&gt;&quot;&gt;&lt;/div&gt;
-                &lt;div onclick=&quot;imageEdit.rotate(-90, &lt;?php echo &quot;$post_id, '$nonce'&quot;; ?&gt;, this)&quot; class=&quot;imgedit-rright&quot; title=&quot;&lt;?php esc_attr_e( 'Rotate clockwise' ); ?&gt;&quot;&gt;&lt;/div&gt;&lt;?php
-
-        } ?&gt;
-
</del><span class="cx">                 &lt;div onclick=&quot;imageEdit.flip(1, &lt;?php echo &quot;$post_id, '$nonce'&quot;; ?&gt;, this)&quot; class=&quot;imgedit-flipv&quot; title=&quot;&lt;?php esc_attr_e( 'Flip vertically' ); ?&gt;&quot;&gt;&lt;/div&gt;
</span><span class="cx">                 &lt;div onclick=&quot;imageEdit.flip(2, &lt;?php echo &quot;$post_id, '$nonce'&quot;; ?&gt;, this)&quot; class=&quot;imgedit-fliph&quot; title=&quot;&lt;?php esc_attr_e( 'Flip horizontally' ); ?&gt;&quot;&gt;&lt;/div&gt;
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>