<?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>Alex Mansfield &#187; Plugins</title>
	<atom:link href="http://alexmansfield.com/category/plugins/feed" rel="self" type="application/rss+xml" />
	<link>http://alexmansfield.com</link>
	<description>WordPress Developer</description>
	<lastBuildDate>Tue, 28 Feb 2012 23:24:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>WordPress Plugin Template</title>
		<link>http://alexmansfield.com/plugins/wordpress-plugin-template</link>
		<comments>http://alexmansfield.com/plugins/wordpress-plugin-template#comments</comments>
		<pubDate>Wed, 15 Jun 2011 02:10:35 +0000</pubDate>
		<dc:creator>alexmansfield</dc:creator>
				<category><![CDATA[Plugins]]></category>

		<guid isPermaLink="false">http://alexmansfield.com/?p=575</guid>
		<description><![CDATA[I&#8217;ve started developing WordPress plugins from scratch too many times. I don&#8217;t enjoy repeating the setup process for every plugin I develop, so I&#8217;ve created a default plugin template that has all the basics included. Enjoy! Download Plugin Template 1.1]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve started developing WordPress plugins from scratch too many times. I don&#8217;t enjoy repeating the setup process for every plugin I develop, so I&#8217;ve created a default plugin template that has all the basics included. Enjoy!</p>
<p><a href='http://alexmansfield.com/wpress/wp-content/uploads/2011/06/plugin-template-1.1.zip'>Download Plugin Template 1.1</a></p>
]]></content:encoded>
			<wfw:commentRss>http://alexmansfield.com/plugins/wordpress-plugin-template/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Easy Embed WordPress Plugin</title>
		<link>http://alexmansfield.com/plugins/easy-embed</link>
		<comments>http://alexmansfield.com/plugins/easy-embed#comments</comments>
		<pubDate>Thu, 29 Jul 2010 18:30:09 +0000</pubDate>
		<dc:creator>alexmansfield</dc:creator>
				<category><![CDATA[Plugins]]></category>

		<guid isPermaLink="false">http://alexmansfield.com/?p=453</guid>
		<description><![CDATA[The WordPress editor doesn&#8217;t always play nice with HTML (especially if you switch back and forth between the Visual and HTML editor). This problem has bugged me for a while, and I finally sat down and built a simple plugin to solve it. There are other solutions out there, but I find this method to [...]]]></description>
			<content:encoded><![CDATA[<p>The WordPress editor doesn&#8217;t always play nice with HTML (especially if you switch back and forth between the Visual and HTML editor). This problem has bugged me for a while, and I finally sat down and built a simple plugin to solve it. There are other solutions out there, but I find this method to be the easiest to use. After installing the plugin, all that is required is to create a custom field (you can name it anything), place your code in the new custom field. This could be HTML, video embed codes, Paypal forms, etc. Then place the following shortcode into your post where you want your special code to go:</p>
<p>[easyembed field="name-of-custom-field"]</p>
<p>The field property should be the name of the custom field you created. The shortcode above would display the contents of a custom field with the name &#8220;easy&#8221;</p>
<p><a title="Easy Embed" href="http://wordpress.org/extend/plugins/easy-embed/">Download Easy Embed</a> from the WordPress plugin directory.</p>
<p>View the code below:</p>
<pre class="brush: php; title: ; notranslate">&lt;?php

/*
Plugin Name: Easy Embed
Plugin URI: http://wordpress.org/#
Description: Allows the embedding of any code and protects it from being modified by the WordPress editor
Author: Alex Mansfield
Version: 1.0
Author URI: http://alexmansfield.com/
*/

function am_easy_embed($array) {
extract(shortcode_atts(array('field' =&gt; 'custom'), $array));
global $post;
$html = get_post_meta($post-&gt;ID, $field, true);
return $html;
}
add_shortcode('easyembed', 'am_easy_embed');

?&gt;</pre>
]]></content:encoded>
			<wfw:commentRss>http://alexmansfield.com/plugins/easy-embed/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>WordPress Plugin: Latest Posts by Author</title>
		<link>http://alexmansfield.com/plugins/latest-posts-by-author</link>
		<comments>http://alexmansfield.com/plugins/latest-posts-by-author#comments</comments>
		<pubDate>Tue, 11 Aug 2009 23:52:59 +0000</pubDate>
		<dc:creator>alexmansfield</dc:creator>
				<category><![CDATA[Plugins]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://alexmansfield.com/?p=377</guid>
		<description><![CDATA[Update: The plugin has gone through a number of revisions since I first published this post. See: http://wordpress.org/extend/plugins/latest-posts-by-author/ for the latest versions. The code posted below is from version 0.6. I just posted my first plugin to wordpress.org. It creates an unordered list of the most recent posts by a given author. It can be [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Update</strong>: The plugin has gone through a number of revisions since I first published this post. See: <a href="http://wordpress.org/extend/plugins/latest-posts-by-author/">http://wordpress.org/extend/plugins/latest-posts-by-author/</a> for the latest versions. The code posted below is from version 0.6.</p>
<p>I just posted my first plugin to <a href="http://wordpress.org/">wordpress.org</a>. It creates an unordered list of the most recent posts by a given author. It can be called both from within a post using a shortcode or from within a theme file. Check out <a href="http://wordpress.org/extend/plugins/latest-posts-by-author/">Latest Posts by Author</a> at wordpress.org for more details.</p>
<p>To demonstrate just how easy it is to create a plugin for WordPress, I&#8217;m posting the plugin code below.</p>
<pre class="brush: php; title: ; notranslate">&lt;?php

/*
Plugin Name: Latest Posts by Author
Plugin URI: http://wordpress.org/#
Description: Displays a list of recent posts by the specified author
Author: Alex Mansfield
Version: 0.6
Author URI: http://alexmansfield.com/
*/

function latest_posts_by_author($array) {
 extract(shortcode_atts(array('author' =&gt; 'admin', 'show' =&gt; 5, 'excerpt' =&gt; 'false'), $array));

 global $wpdb;
 $table = $wpdb-&gt;prefix . 'users';
 $result = $wpdb-&gt;get_results('SELECT ID FROM '.$table.' WHERE user_login = &quot;'.$author.'&quot;');
 $id = $result[0]-&gt;ID;
 $table = $wpdb-&gt;prefix . 'posts';
 $result = $wpdb-&gt;get_results('SELECT * FROM '.$table.' WHERE post_author = '.$id.' AND post_status = &quot;publish&quot; AND post_type = &quot;post&quot; ORDER BY post_date DESC');
 $i = 0;
 $html = '&lt;ul&gt;';
 foreach ($result as $numpost) {
 $html .= '&lt;li&gt;&lt;a href=&quot;'.get_permalink($numpost-&gt;ID).'&quot;&gt;'.$numpost-&gt;post_title.'&lt;/a&gt;';
 if($excerpt == 'true'){
 $html .= '&lt;p&gt;'.$numpost-&gt;post_excerpt.'&lt;/p&gt;';
 }
 $html .= '&lt;/li&gt;';
 $i++;
 if($i == $show){
 break;
 }
 }
 $html .= '&lt;/ul&gt;';

 return $html;
}

add_shortcode('latestbyauthor', 'latest_posts_by_author');

?&gt;</pre>
]]></content:encoded>
			<wfw:commentRss>http://alexmansfield.com/plugins/latest-posts-by-author/feed</wfw:commentRss>
		<slash:comments>46</slash:comments>
		</item>
	</channel>
</rss>

