<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Serafini Studios &#187; How to / Tutorials</title>
	<atom:link href="http://serafinistudios.com/blog/archives/category/blog/how-to-tutorials/feed/" rel="self" type="application/rss+xml" />
	<link>http://serafinistudios.com</link>
	<description>Web design, development and marketing since 1996</description>
	<lastBuildDate>Sat, 12 Jun 2010 02:58:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>How to: Add an &quot;Edit&quot; link to each post in WordPress</title>
		<link>http://serafinistudios.com/blog/archives/2003/10/30/how-to-add-an-edit-link-to-each-post-in-wordpress/</link>
		<comments>http://serafinistudios.com/blog/archives/2003/10/30/how-to-add-an-edit-link-to-each-post-in-wordpress/#comments</comments>
		<pubDate>Thu, 30 Oct 2003 09:16:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[How to / Tutorials]]></category>

		<guid isPermaLink="false">/?p=24</guid>
		<description><![CDATA[This hack adds an &#8220;Edit&#8221; link next to each entry if you&#8217;ve logged in and the cookie still exists on your computer. This is not the ultimate security, since the real security functions are still provided by b2verifauth.php, but it &#8230; <a href="http://serafinistudios.com/blog/archives/2003/10/30/how-to-add-an-edit-link-to-each-post-in-wordpress/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>This hack adds an &#8220;Edit&#8221; link next to each entry if you&#8217;ve logged in and the cookie still exists on your computer.  This is not the ultimate security, since the real security functions are still provided by <b>b2verifauth.php</b>, but it does hide the link from users who are not logged in.</p>
<p>To add this to your WordPress site:</p>
<p><b>1.  Add the following code to your </b><b>b2template.functions.php</b> in the <i>Post tags</i> section:</p>
<div class="indent">
<code><br />
/* Hack by Gabriel Serafini to add an "Edit" tag by */<br />
/* each post if you're logged in */<br />
function edit_this(){<br />
&nbsp;&nbsp;&nbsp;&nbsp;global $id, $HTTP_COOKIE_VARS;<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (!empty($HTTP_COOKIE_VARS["wordpressuser"])) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$output = '- &lt;a href="/blog/wp-admin/wp-post.php?action=edit&amp;post='.$id.'" title="Edit this post"&gt;Edit&lt;/a&gt;';<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo $output;<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
}<br />
</code>
</div>
<p><b>2.  Add the following code to your blog index page (usually </b><b>index.php</b>) where you want your edit tag to live:</p>
<div class="indent">
<code><br />
&lt;?php edit_this() ?&gt;<br />
</code>
</div>
<p>I&#8217;ve placed mine next to the &#8230;posted in Category by Gabriel at &#8230; links at the bottom of each post.</p>
<p>The final result is a nice link that lets you instantly edit any post on your site, which is very nice if you tend to like to edit your posts on a regular basis.<!--c601f8b852bb5c59b5e43a65410c1053--><!--d166ba54de6b7c06c5d5f0a2785e3cc6--><!--f9c22a67329821a1626765c009d2ae42--></p>
]]></content:encoded>
			<wfw:commentRss>http://serafinistudios.com/blog/archives/2003/10/30/how-to-add-an-edit-link-to-each-post-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
