<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Hack: Wordpress cancel reply button</title>
	<atom:link href="http://www.chromakode.com/2009/02/wordpress-cancel-reply-button/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.chromakode.com/2009/02/wordpress-cancel-reply-button/</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Sat, 01 May 2010 10:44:05 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: daniel</title>
		<link>http://www.chromakode.com/2009/02/wordpress-cancel-reply-button/comment-page-1/#comment-1055</link>
		<dc:creator>daniel</dc:creator>
		<pubDate>Fri, 02 Apr 2010 00:35:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.chromakode.com/?p=783#comment-1055</guid>
		<description>There&#039;s actually a good reason for the cancel button to not be a button, see this Coding Horror post:

http://www.codinghorror.com/blog/2010/03/the-opposite-of-fitts-law.html

Basically the reason might be that they don&#039;t want you hitting the &#039;cancel&#039; button by mistake, when you&#039;re looking to hit a similarly styled &#039;submit&#039; or &#039;ok&#039; button.</description>
		<content:encoded><![CDATA[<p>There&#8217;s actually a good reason for the cancel button to not be a button, see this Coding Horror post:</p>
<p><a href="http://www.codinghorror.com/blog/2010/03/the-opposite-of-fitts-law.html" rel="nofollow">http://www.codinghorror.com/blog/2010/03/the-opposite-of-fitts-law.html</a></p>
<p>Basically the reason might be that they don&#8217;t want you hitting the &#8216;cancel&#8217; button by mistake, when you&#8217;re looking to hit a similarly styled &#8217;submit&#8217; or &#8216;ok&#8217; button.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Felix</title>
		<link>http://www.chromakode.com/2009/02/wordpress-cancel-reply-button/comment-page-1/#comment-1054</link>
		<dc:creator>Felix</dc:creator>
		<pubDate>Fri, 02 Apr 2010 00:13:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.chromakode.com/?p=783#comment-1054</guid>
		<description>The normal link for cancel makes sense to denote that this is not the primary action. The latter in turn has a real button. So from a usability and persuasive design standpoint, everything had been well.</description>
		<content:encoded><![CDATA[<p>The normal link for cancel makes sense to denote that this is not the primary action. The latter in turn has a real button. So from a usability and persuasive design standpoint, everything had been well.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: fool</title>
		<link>http://www.chromakode.com/2009/02/wordpress-cancel-reply-button/comment-page-1/#comment-1052</link>
		<dc:creator>fool</dc:creator>
		<pubDate>Thu, 01 Apr 2010 14:22:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.chromakode.com/?p=783#comment-1052</guid>
		<description>Here&#039;s a reason to do it the way WP does: http://www.codinghorror.com/blog/2010/03/the-opposite-of-fitts-law.html

Nice that you can change it if you don&#039;t like it of course, thanks for figuring out that hack. Could do the same thing to make it a button but move it out of the way or style it a bit differently or whatever.

You have to decide about the role and importance of cancel for a particular site and commenting community I guess.  It&#039;s always worth thinking about whether a post you&#039;re making is a good contribution and cancelling it if not.</description>
		<content:encoded><![CDATA[<p>Here&#8217;s a reason to do it the way WP does: <a href="http://www.codinghorror.com/blog/2010/03/the-opposite-of-fitts-law.html" rel="nofollow">http://www.codinghorror.com/blog/2010/03/the-opposite-of-fitts-law.html</a></p>
<p>Nice that you can change it if you don&#8217;t like it of course, thanks for figuring out that hack. Could do the same thing to make it a button but move it out of the way or style it a bit differently or whatever.</p>
<p>You have to decide about the role and importance of cancel for a particular site and commenting community I guess.  It&#8217;s always worth thinking about whether a post you&#8217;re making is a good contribution and cancelling it if not.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: creative</title>
		<link>http://www.chromakode.com/2009/02/wordpress-cancel-reply-button/comment-page-1/#comment-512</link>
		<dc:creator>creative</dc:creator>
		<pubDate>Fri, 13 Nov 2009 02:34:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.chromakode.com/?p=783#comment-512</guid>
		<description>Thanks! I was just coming back here to comment that I figured it out and saw your post. And you filled in the blanks for me too. I found the &lt;code&gt;cancel_comment_reply_link()&lt;/code&gt; and moved into the &lt;code&gt;&lt;/code&gt; next to the &lt;b&gt;Submit&lt;/b&gt; button. Now it all looks fantastic! I don&#039;t understand what made the WP team lay this form out so oddly to begin with. :-P Anyway, your code puts order back into the WP Comments GUI! 

Thanks for pointing out a better way of labeling the button. Gettin&#039; it out of the functions.php file right now. :-)

Thanks again</description>
		<content:encoded><![CDATA[<p>Thanks! I was just coming back here to comment that I figured it out and saw your post. And you filled in the blanks for me too. I found the <code>cancel_comment_reply_link()</code> and moved into the <code></code> next to the <b>Submit</b> button. Now it all looks fantastic! I don&#8217;t understand what made the WP team lay this form out so oddly to begin with. <img src='http://www.chromakode.com/wordpress/wp-includes/images/smilies/icon_razz.gif' alt=':-P' class='wp-smiley' />  Anyway, your code puts order back into the WP Comments GUI! </p>
<p>Thanks for pointing out a better way of labeling the button. Gettin&#8217; it out of the functions.php file right now. <img src='http://www.chromakode.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Thanks again</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: chromakode</title>
		<link>http://www.chromakode.com/2009/02/wordpress-cancel-reply-button/comment-page-1/#comment-511</link>
		<dc:creator>chromakode</dc:creator>
		<pubDate>Fri, 13 Nov 2009 02:08:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.chromakode.com/?p=783#comment-511</guid>
		<description>Check the location of the call to &lt;code&gt;cancel_comment_reply_link()&lt;/code&gt; in your &lt;code&gt;comments.php&lt;/code&gt; file. I moved it to be inside a paragraph with the submit button, like this:

&lt;pre lang=&quot;xml&quot;&gt;
&lt;p&gt;
  &lt;button name=&quot;submit&quot; type=&quot;submit&quot; id=&quot;submit&quot; tabindex=&quot;5&quot;&gt;
    &lt;?php echo attribute_escape(__(&#039;Submit Comment&#039;)); ?&gt;
  &lt;/button&gt;
  &lt;?php cancel_comment_reply_link(&#039;Cancel&#039;) ?&gt;
&lt;/p&gt;
&lt;/pre&gt;

You might also consider setting the label for the button as a parameter here, rather than hard-coding it into your &lt;code&gt;functions.php&lt;/code&gt;. :)</description>
		<content:encoded><![CDATA[<p>Check the location of the call to <code>cancel_comment_reply_link()</code> in your <code>comments.php</code> file. I moved it to be inside a paragraph with the submit button, like this:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span class="sc3"><span class="re1">&lt;p<span class="re2">&gt;</span></span></span>
  <span class="sc3"><span class="re1">&lt;button</span> <span class="re0">name</span>=<span class="st0">&quot;submit&quot;</span> <span class="re0">type</span>=<span class="st0">&quot;submit&quot;</span> <span class="re0">id</span>=<span class="st0">&quot;submit&quot;</span> <span class="re0">tabindex</span>=<span class="st0">&quot;5&quot;</span><span class="re2">&gt;</span></span>
    <span class="sc3"><span class="re1">&lt;?php</span> echo attribute_escape<span class="br0">&#40;</span>__<span class="br0">&#40;</span><span class="st0">'Submit Comment'</span><span class="br0">&#41;</span><span class="br0">&#41;</span>; <span class="re2">?&gt;</span></span>
  <span class="sc3"><span class="re1">&lt;/button<span class="re2">&gt;</span></span></span>
  <span class="sc3"><span class="re1">&lt;?php</span> cancel_comment_reply_link<span class="br0">&#40;</span><span class="st0">'Cancel'</span><span class="br0">&#41;</span> <span class="re2">?&gt;</span></span>
<span class="sc3"><span class="re1">&lt;/p<span class="re2">&gt;</span></span></span></pre></div></div>

<p>You might also consider setting the label for the button as a parameter here, rather than hard-coding it into your <code>functions.php</code>. <img src='http://www.chromakode.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: creative</title>
		<link>http://www.chromakode.com/2009/02/wordpress-cancel-reply-button/comment-page-1/#comment-510</link>
		<dc:creator>creative</dc:creator>
		<pubDate>Fri, 13 Nov 2009 01:32:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.chromakode.com/?p=783#comment-510</guid>
		<description>BTW... What code did you use to get the Cancel button down next to the Submit Comment button? My button still hangs under the form title where the link used to be. Did you use CSS?

Any help would be appreciated. :-)</description>
		<content:encoded><![CDATA[<p>BTW&#8230; What code did you use to get the Cancel button down next to the Submit Comment button? My button still hangs under the form title where the link used to be. Did you use CSS?</p>
<p>Any help would be appreciated. <img src='http://www.chromakode.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: creative</title>
		<link>http://www.chromakode.com/2009/02/wordpress-cancel-reply-button/comment-page-1/#comment-508</link>
		<dc:creator>creative</dc:creator>
		<pubDate>Fri, 13 Nov 2009 01:22:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.chromakode.com/?p=783#comment-508</guid>
		<description>Awesome! It works like a charm! Hey...thanks for fixing this so fast! 

Keep up the excellent work! :-)</description>
		<content:encoded><![CDATA[<p>Awesome! It works like a charm! Hey&#8230;thanks for fixing this so fast! </p>
<p>Keep up the excellent work! <img src='http://www.chromakode.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: chromakode</title>
		<link>http://www.chromakode.com/2009/02/wordpress-cancel-reply-button/comment-page-1/#comment-506</link>
		<dc:creator>chromakode</dc:creator>
		<pubDate>Fri, 13 Nov 2009 00:34:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.chromakode.com/?p=783#comment-506</guid>
		<description>Oops! You are correct. There was something missing. The second line of &lt;code&gt;cancel_comment_reply_button&lt;/code&gt; originally read:

&lt;pre lang=&quot;php&quot;&gt;$button = &#039;&lt;button id=&quot;cancel-comment-reply-link&quot;&#039;;&lt;/pre&gt;

Note that this doesn&#039;t make use of the &lt;code&gt;$style&lt;/code&gt; variable that was set on the first line. The &lt;code&gt;$style&lt;/code&gt; variable contains CSS that hides the button if it is not a comment reply -- the behavior you were missing!

I checked my &lt;code&gt;functions.php&lt;/code&gt; file, and sure enough, here was the correct line:

&lt;pre lang=&quot;php&quot;&gt;$button = &#039;&lt;button id=&quot;cancel-comment-reply-link&quot;&#039; . $style . &#039;&gt;&#039;;&lt;/pre&gt;

Good eye. Thanks for pointing this out. I&#039;ve amended the original post.</description>
		<content:encoded><![CDATA[<p>Oops! You are correct. There was something missing. The second line of <code>cancel_comment_reply_button</code> originally read:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span class="re0">$button</span> <span class="sy0">=</span> <span class="st_h">'&lt;button id=&quot;cancel-comment-reply-link&quot;'</span><span class="sy0">;</span></pre></div></div>

<p>Note that this doesn&#8217;t make use of the <code>$style</code> variable that was set on the first line. The <code>$style</code> variable contains CSS that hides the button if it is not a comment reply &#8212; the behavior you were missing!</p>
<p>I checked my <code>functions.php</code> file, and sure enough, here was the correct line:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span class="re0">$button</span> <span class="sy0">=</span> <span class="st_h">'&lt;button id=&quot;cancel-comment-reply-link&quot;'</span> <span class="sy0">.</span> <span class="re0">$style</span> <span class="sy0">.</span> <span class="st_h">'&gt;'</span><span class="sy0">;</span></pre></div></div>

<p>Good eye. Thanks for pointing this out. I&#8217;ve amended the original post.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: creative</title>
		<link>http://www.chromakode.com/2009/02/wordpress-cancel-reply-button/comment-page-1/#comment-505</link>
		<dc:creator>creative</dc:creator>
		<pubDate>Thu, 12 Nov 2009 23:53:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.chromakode.com/?p=783#comment-505</guid>
		<description>Thanks for posting this. I tried it out on my template (editing the Default Kubrick in 2.8.4) and it worked. I hacked your code further to change the button label name:

    return $button . $text= &#039;Cancel Comment&#039; . &#039;&#039;;

The only glitch with this code is that the button appears in a post all the time. It only disappears when you click on a threaded reply and then cancel.

I&#039;m not a PHP or WP expert but somewhere there&#039;s something missing in the code. The Cancel button should only appear when replying to a threaded comment right?

Anyway, great work!</description>
		<content:encoded><![CDATA[<p>Thanks for posting this. I tried it out on my template (editing the Default Kubrick in 2.8.4) and it worked. I hacked your code further to change the button label name:</p>
<p>    return $button . $text= &#8216;Cancel Comment&#8217; . &#8221;;</p>
<p>The only glitch with this code is that the button appears in a post all the time. It only disappears when you click on a threaded reply and then cancel.</p>
<p>I&#8217;m not a PHP or WP expert but somewhere there&#8217;s something missing in the code. The Cancel button should only appear when replying to a threaded comment right?</p>
<p>Anyway, great work!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
