<?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>Abban Dunne &#187; Plugins</title>
	<atom:link href="http://abandon.ie/category/plugins/feed/" rel="self" type="application/rss+xml" />
	<link>http://abandon.ie</link>
	<description>WordPress design &#38; development in Dublin, Ireland.</description>
	<lastBuildDate>Sat, 27 Apr 2013 07:04:19 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5</generator>
		<item>
		<title>Stop Sopa Ireland</title>
		<link>http://abandon.ie/stop-sopa-ireland/</link>
		<comments>http://abandon.ie/stop-sopa-ireland/#comments</comments>
		<pubDate>Wed, 25 Jan 2012 15:48:40 +0000</pubDate>
		<dc:creator>Abban</dc:creator>
				<category><![CDATA[Plugins]]></category>
		<category><![CDATA[Stop SOPA]]></category>

		<guid isPermaLink="false">http://abandon.ie/?p=828</guid>
		<description><![CDATA[I created a small plugin to help support the opposition to the SOPA style law that the government is trying to pass here.]]></description>
				<content:encoded><![CDATA[<p><a class="button" href="http://wordpress.org/extend/plugins/stop-sopa-ireland/">Download the plugin.</a></p>
<p>Sean Sherlock, Minister for Enterprise, Jobs and Innovation, has announced he intends to enact a radical new law curtailing access to websites in Ireland, without a vote in the Oireachtas. Your civil rights and free access to the internet are under threat. Stop Minister Sherlock.</p>
<p>You can sign the petition <a href="http://stopsopaireland.com/">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://abandon.ie/stop-sopa-ireland/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Abandon WordPress Admin Options Plugin &amp; Starter Theme.</title>
		<link>http://abandon.ie/abandon-options-plugin/</link>
		<comments>http://abandon.ie/abandon-options-plugin/#comments</comments>
		<pubDate>Tue, 12 Jul 2011 09:06:15 +0000</pubDate>
		<dc:creator>Abban</dc:creator>
				<category><![CDATA[Plugins]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://abandon.ie/?p=517</guid>
		<description><![CDATA[This is a WordPress plugin and theme aimed at template designers who have mid range experience of PHP and theme development or experienced designers who want to speed up their workflow. What it does is let you quickly build a theme with an options page and a host of various options to improve its functionality. The theme is HTML5 and has included functions for most WordPress custom options.]]></description>
				<content:encoded><![CDATA[<p><a class="button" href="http://wordpress.org/extend/plugins/abandon-theme-options/installation/">Download the plugin.</a><a class="button-alt" href="http://abandon.ie/wp-content/uploads/2011/07/theme.zip">Download the theme.</a></p>
<h3>Usage Guide</h3>
<p>OK, what does is it lets you easily add the most common template options you use when designing and developing a new theme. The current options provided for are:</p>
<ol id="doc_toc">
<li><a href="#style">Theme Style Options</a><strong><a href="#style"><br />
</a></strong><em><span class="quiet">What I mean by this is you might want to give the user a choice of multiple colour schemes for the theme. This lets you add as many or as few as you like.</span></em></li>
<li><a href="#layout">Theme Layout Options</a><strong><a href="#layout"><br />
</a></strong><em><span class="quiet">You might want to let the user choose between a few different layouts such as the sidebar on the left or the sidebar on the right. As with the colour options you can add as many as you like.</span></em></li>
<li><a href="#editor">Custom Editor Styles</a><strong><a href="#editor"><br />
</a></strong><em class="quiet">This is pretty smart, it adds a style dropdown on the WordPress text editor that you can add custom styles to. When the user selects some text and then selects the style they want from the dropdown it wraps that text in a span with the class you specified. NO MORE SHORTCODES!</em></li>
<li><a href="#social">Adding &amp; Removing Social Networks</a><strong><a href="#social"><br />
</a></strong><em class="quiet">On the WordPress user profile page there are a few social network text boxes that let the user enter their details, for some reason they don&#8217;t include Twitter or facebook in there&#8230; what this option does is let you remove the useless ones like AIM and add in new ones. You can add any new ones you want and then you can print them out in as social network icons in your theme.</em></li>
<li><a href="#tracking">Site Tracking Code</a><strong><a href="#tracking"><br />
</a></strong><em><span class="quiet">This is just a textbox to let the user enter their Google Analytics code or whatever.</span></em></li>
<li><a href="#favicon">Favicon, Apple Icon &amp; Logo</a><strong><a href="#favicon"><br />
</a></strong><em><span class="quiet">This lets the user upload a custom favicon, an Apple touch icon and a custom logo to the site.</span></em></li>
<li><a href="#boxes">Checkboxes, Input Boxes and Textareas</a><strong><a href="#boxes"><br />
</a></strong><em><span class="quiet">These features let you add as many checkboxes, input boxes or textareas as you like. You can use it to add various other options that this plugin doesn&#8217;t cover.</span></em></li>
<li><a href="#ptypes">Custom Post Types &amp; Taxonomies</a><strong><a href="#ptypes"><br />
</a></strong><em><span class="quiet">This lets you add as many custom post types and taxonomies as you want to.</span></em></li>
<li><a href="#docs">Custom Documentation</a><strong><a href="#docs"><br />
</a></strong><em><span class="quiet">This lets you add custom documentation that will add a documentation page on the users site.</span></em></li>
</ol>
<p>To get this plugin to work with your theme all you have to do is create a function in your functions.php file like this:</p>
<pre class="brush: php; title: ; notranslate">
//set up the options for Abbans theme options plugin
function ab_set_options(){
	global $ab_options_set;
    $ab_options_set = array();
}
add_filter('init','ab_set_options',9,1);
</pre>
<p>You can call this function anything you like but make sure you hook it to the WordPress init function and give it priority 9. You must declare the variable as a global and call it &#8216;$ab_options_set&#8217; though as this is how you turn on the options you want to use. I&#8217;m going to go through exactly how you set up each type of option in detail adding the code bit by bit. You will then be able to see exactly how it works. Its very easy.</p>
<p><a name="style"></a></p>
<h3>1. Theme Style Options</h3>
<p>To add your theme style options you simply add this to your function:</p>
<pre class="brush: php; title: ; notranslate">
$styles = array('lightgreen'=&gt;'Light Green', 'darkblue'=&gt;'Dark Blue');
</pre>
<p>You can see it has 2 styles in there, Light Green and Dark Blue. You can add as many as you like. Then you add this snippet into the $ab_options_set array, like this:</p>
<pre class="brush: php; title: ; notranslate">
$ab_options_set = array('template_styles'=&gt;$styles);
</pre>
<p>So your whole function should now look like this:</p>
<pre class="brush: php; title: ; notranslate">
//set up the options for Abbans theme options plugin
function ab_set_options(){
	$styles = array('lightgreen'=&gt;'Light Green', 'darkblue'=&gt;'Dark Blue');

    $ab_options_set = array('template_styles'=&gt;$styles);
}
add_filter('init','ab_set_options',9,1);
</pre>
<p>This is more or less the method you need to use to add every option. They do change a little depending on the type of option though. A good way to use this option in your theme would be to attach a different stylesheet to it depending on the option picked. You then need to put this into the header:</p>
<pre class="brush: php; title: ; notranslate">
&lt;!--?php if(get_option('ab_template_styles')=='lightgreen'){ ?--&gt;
	//YOUR LIGHT GREEN STYLESHEET CODE
&lt;!--?php }elseif(get_option('ab_template_styles')=='darkblue'){ ?--&gt;
	//YOUR DARK BLUE STYLESHEET CODE
&lt;!--?php } ?--&gt;
</pre>
<p><a name="layout"></a></p>
<h3>2. Theme Layout Options</h3>
<p>This works in almost the same way as the Theme Style Options. You need to add the following array with the options you want into the function:</p>
<pre class="brush: php; title: ; notranslate">
$layout = array('sidebarleft'=&gt;'Sidebar on the left', 'sidebarright'=&gt;'Sidebar on the right');
</pre>
<p>And into the ab_options_set array:</p>
<pre class="brush: php; title: ; notranslate">
$ab_options_set = array('layout'=&gt;$layout);
</pre>
<p>Your full function with both the Theme Style Options and the Theme Layout Options would look like this:</p>
<pre class="brush: php; title: ; notranslate">
//set up the options for Abbans theme options plugin
function ab_set_options(){
    $styles = array('lightgreen'=&gt;'Light Green', 'darkblue'=&gt;'Dark Blue');
    $layout = array('sidebarleft'=&gt;'Sidebar on the left', 'sidebarright'=&gt;'Sidebar on the right');

    $ab_options_set = array('template_styles'=&gt;$styles,
                            'layout'=&gt;$layout);
}
add_filter('init','ab_set_options',9,1);
</pre>
<p>And to use it in your template you would do this:</p>
<pre class="brush: php; title: ; notranslate">
&lt;!--?php if(get_option('ab_layout')=='sidebarleft'){ ?--&gt;
	//CODE FOR SIDEBAR LEFT
&lt;!--?php }elseif(get_option('ab_layout')=='sidebarright'){ ?--&gt;
	//CODE FOR SIDEBAR RIGHT
&lt;!--?php } ?--&gt;
</pre>
<p><a name="editor"></a></p>
<h3>3. Custom Editor Styles</h3>
<p>The Custom Editor Styles are also easy to set up. What you need to to is declare a variable like this:</p>
<pre class="brush: php; title: ; notranslate">
$mce_styles='DROPDOWN_NAME=CLASS_NAME';
</pre>
<p>DROPDOWN_NAME is the name you want displayed in the WordPress text editor and CLASS_NAME is the name it will give the class. So:</p>
<pre class="brush: php; title: ; notranslate">
$mce_styles='Tooltip=tooltip';
</pre>
<p>Would show Tooltip in the dropdown menu and then wrap a span class tooltip around what was selected. To add multiple classes to it you simply declare it like:</p>
<pre class="brush: php; title: ; notranslate">
$mce_styles='Tooltip=tooltip&amp;Second Style=secondstyle';
</pre>
<p>You then need to add it to your ab_option_set array like this:</p>
<pre class="brush: php; title: ; notranslate">
$ab_options_set = array('mce_styles'=&gt;$mce_styles);
</pre>
<p>Then all you have to do is write css classes for the custom styles and add them to the themes stylesheet.</p>
<p><a name="social"></a></p>
<h3>4. Add &amp; Remove Social Networking Widgets</h3>
<p>This lets you control what social networking fields are on the user profile page for them to enter. You need to add 2 new variables to the function to get this to work, one for adding new networks, one for removing ones you don&#8217;t want. You add it like this:</p>
<pre class="brush: php; title: ; notranslate">
$custom_contact = array('twitter'=&gt;'Twitter','facebook'=&gt;'Facebook');
$contact_remove = array('yim','aim','jabber');
</pre>
<p>And the following to the array:</p>
<pre class="brush: php; title: ; notranslate">
$ab_options_set = array('custom_contact'=&gt;$custom_contact,
                        'contact_remove'=&gt;$contact_remove);
</pre>
<p>To add new ones you need to provide an array key for them and a display name. To remove them you just need to specify the WP name for them. You will then see that the extra fields are in the profile page and the ones you wanted to remove are gone. You can print them out in your theme like this:</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php if(get_the_author_meta('twitter')): ?&gt;
	//SOME TEXT OR A LINK TO AN IMAGE
&lt;?php } ?&gt;
</pre>
<p><a name="tracking"></a></p>
<h3>5. Site Tracking Code</h3>
<p>Site tracking code is easy to add. All you need to do is add this to the ab_options_set array:</p>
<pre class="brush: php; title: ; notranslate">
$ab_options_set = array('tracking'=&gt;true);
</pre>
<p>And it will add a textarea into your custom options page. It then hooks whatever is put in there to the wp_footer() function.</p>
<p><a name="favicon"></a></p>
<h3>6. Favicon, Apple Icon &amp; Logo</h3>
<p>Favicon works similar to the tracking code except it gives you a custom image upload field on the options page. You turn it on like this:</p>
<pre class="brush: php; title: ; notranslate">
$ab_options_set = array('favicon'=&gt;true, 'apple_icon'=&gt;true, 'logo'=&gt;true);
</pre>
<p>And apply them to the header and body of your theme by adding something like this:</p>
<pre class="brush: php; title: ; notranslate">
&lt;head&gt;
    &lt;?php if(get_option('ab_favicon')): ?&gt;
        &lt;link rel=&quot;shortcut icon&quot; href=&quot;&lt;?php echo get_option('ab_favicon'); ?&gt;&quot;&gt;
    &lt;?php endif; ?&gt;
    &lt;?php if(get_option('ab_apple_icon')): ?&gt;
        &lt;link rel=&quot;apple-touch-icon&quot; href=&quot;&lt;?php echo get_option('ab_apple_icon'); ?&gt;&quot;&gt;
    &lt;?php endif; ?&gt;
&lt;/head&gt;
&lt;/body&gt;
    &lt;?php if(get_option('ab_logo')): ?&gt;&lt;/pre&gt;
        &lt;img src=&quot;&lt;?php echo get_option('ab_logo'); ?&gt;&quot; alt=&quot;&quot; /&gt;
    &lt;?php endif; ?&gt;
</pre>
<p><a name="boxes"></a></p>
<h3>7. Checkboxes, Input Boxes and Textareas</h3>
<p>There is functionality built in for allowing you to add as many checkboxes, input boxes and textareas as you like. This will allow you to add the majority of miscellaneous options you need. Checkboxes to turn stuff on and off and inputs and textareas for any bits of text that you can&#8217;t fit in using built in WordPress functionality. To turn these features on you need to add this to the ab_options_set variable:</p>
<pre class="brush: php; title: ; notranslate">
$checkboxes = array('show_photos'=&gt;'Show Photos on front', 'option_2'=&gt;'Option 2');
$inputs = array('copyright'=&gt;'Copyright text for footer', 'option_3'=&gt;'Option 3');
$textareas = array('footer_copy'=&gt;'Footer Copy', 'option_4'=&gt;'Option 4');
$ab_options_set = array('checkboxes'=&gt;$checkboxes,
                        'inputs'=&gt;$inputs,
                        'textareas'=&gt;$textareas);
</pre>
<p>The keys array being set in the checkboxes, inputs and textareas variables is the input name and the values are what appears as the label when they&#8217;re printed. To print them in your theme you need to add &#8216;ab_&#8217; to the key for example the &#8216;show_photos&#8217; checkbox one would be printed as:</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php if(get_option('ab_show_photos')): ?&gt;
    //DO SOME SHOW PHOTOS STUFF
&lt;?php endif; ?&gt;
</pre>
<p>And the inputs and textareas such as copyright would be printed as:</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php if(get_option('ab_copyright')): ?&gt;
    &lt;?php echo get_option('ab_copyright'); ?&gt;
&lt;?php endif; ?&gt;
</pre>
<p><a name="ptypes"></a></p>
<h3>8. Custom Post Types &amp; Taxonomies</h3>
<p>This is probably the most difficult feature of the plugin to set up. This lets you set up as many custom post types as you like. What you need to do is save an array with the post type name as the key into the ab_otions_set variable. In this array you set up the various options. I&#8217;m going to set up a portfolio post type by adding the following code:</p>
<pre class="brush: php; title: ; notranslate">
$supports = array('title', 'editor', 'custom-fields', 'revisions', 'excerpt', 'thumbnail', 'comments');
$post_types['Portfolio'] = array('singular'=&gt;'Portfolio','plural'=&gt;'Portfolio Items', 'supports'=&gt;$supports, 'categories'=&gt;TRUE, 'tags'=&gt;TRUE);
</pre>
<p>What you need to set up is the singular name, the plural name, the options that the post type supports and if you want it to have its own categories and tags taxonomies. You can find out what options the post type supports <a href="http://codex.wordpress.org/Function_Reference/add_post_type_support">here</a>. You can add multiple post types by adding more items to the $post_types array. Adding both a portfolio post type and a skill feed post type would look like this:</p>
<pre class="brush: php; title: ; notranslate">
$supports = array('title', 'editor', 'custom-fields', 'revisions', 'excerpt', 'thumbnail', 'comments');
$post_types['Portfolio'] = array('singular'=&gt;'Portfolio','plural'=&gt;'Portfolio Items', 'supports'=&gt;$supports, 'categories'=&gt;TRUE, 'tags'=&gt;TRUE);
$supports = array('title', 'editor');
$post_types['Skill Feed'] = array('singular'=&gt;'Skill Feed','plural'=&gt;'Feed Items', 'supports'=&gt;$supports, 'categories'=&gt;TRUE, 'tags'=&gt;TRUE);
</pre>
<p>You can see that the skill feed only supports the title and editor options. The all you have to do is add it to he ab_options_set array:</p>
<pre class="brush: php; title: ; notranslate">
$ab_options_set = array('post_types'=&gt;$post_types);
</pre>
<p>To add templates into you theme for these post types you need to add taxonomy-feed-items.php, taxonomy-portfolio-items.php, single-portfolio.php and single-feed-item.php into you theme folder. Take a look at the <a href="http://codex.wordpress.org/Template_Hierarchy">WordPress Template Hierarchy</a> for more info.</p>
<p><a name="docs"></a></p>
<h3>9. Adding Your Custom Documentation</h3>
<p>Adding your own documentation is also easy. You just create a page called documentation.html and save it into your theme. It will then appear in the documentation tab of the admin panel instead of the setup guide.</p>
<h3>Full Function Printout</h3>
<p>If you were to add every single feature I&#8217;ve documented above your function should look something like this:</p>
<pre class="brush: php; title: ; notranslate">
//set up the options for Abbans theme options plugin
function ab_set_options(){
    global $ab_options_set;
    $styles = array('lightgreen'=&gt;'Light Green', 'darkblue'=&gt;'Dark Blue');
    $layout = array('sidebarleft'=&gt;'Sidebar on the left', 'sidebarright'=&gt;'Sidebar on the right');
    $mce_styles='Tooltip=tooltip';
    $custom_contact = array('twitter'=&gt;'Twitter','facebook'=&gt;'Facebook');
    $contact_remove = array('yim','aim','jabber');
    $checkboxes = array('show_photos'=&gt;'Show Photos on front', 'option_2'=&gt;'Option 2');
    $inputs = array('copyright'=&gt;'Copyright text for footer', 'option_3'=&gt;'Option 3');
    $textareas = array('footer_copy'=&gt;'Footer Copy', 'option_4'=&gt;'Option 4');
    $supports = array('title', 'editor', 'custom-fields', 'revisions', 'excerpt', 'thumbnail', 'comments');
    $post_types['Portfolio'] = array('singular'=&gt;'Portfolio','plural'=&gt;'Portfolio Items', 'supports'=&gt;$supports, 'categories'=&gt;TRUE, 'tags'=&gt;TRUE);
    $supports = array('title', 'editor');
    $post_types['Skill Feed'] = array('singular'=&gt;'Skill Feed','plural'=&gt;'Feed Items', 'supports'=&gt;$supports, 'categories'=&gt;TRUE, 'tags'=&gt;TRUE);
    $ab_options_set = array('template_styles'=&gt;$styles,
                            'layout'=&gt;$layout,
                            'tracking'=&gt;true,
                            'favicon'=&gt;true,
                            'logo'=&gt;true,
                            'apple_icon'=&gt;true,
                            'checkboxes'=&gt;$checkboxes,
                            'inputs'=&gt;$inputs,
                            'textareas'=&gt;$textareas,
                            'mce_styles'=&gt;$mce_styles,
                            'custom_contact'=&gt;$custom_contact,
                            'contact_remove'=&gt;$contact_remove,
                            'post_types'=&gt;$post_types);
}
add_filter('init','ab_set_options',9,1);
</pre>
<p>There you have it, that code above is everything you need to set up your own awesome WordPress admin pages. Oh, one last thing, as I&#8217;m giving this plugin away for free I&#8217;ve added a donate button. If your theme is a free theme I&#8217;d appreciate if you would leave it turned on. But if it&#8217;s a premium theme or one for a client you can easily hide the box with:</p>
<pre class="brush: php; title: ; notranslate">
$ab_options_set = array('remove_donation'=&gt;true);
</pre>
<h3>Feedback &amp; Suggestions</h3>
<p>This plugin is currently in beta so there may be a couple of bugs I&#8217;ve missed. If you find one or have any feedback or would like to suggest a new feature please drop me a mail to plugins[at]abandon[dot]ie or tweet me at <a href="http://twitter.com/abbandunne">@abbandunne</a>.</p>
<p>I will be adding this to the WordPress plugin repo when I have it tested and then I will be adding new features over time. All the current features will be 100% backwards compatible though.</p>
]]></content:encoded>
			<wfw:commentRss>http://abandon.ie/abandon-options-plugin/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
