<?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>seanklein.org &#187; Things I&#8217;ve Learned</title>
	<atom:link href="http://seanklein.org/category/things-ive-learned/feed/" rel="self" type="application/rss+xml" />
	<link>http://seanklein.org</link>
	<description></description>
	<lastBuildDate>Sat, 19 May 2012 14:08:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Remove the Admin Bar</title>
		<link>http://seanklein.org/2011/03/remove-the-admin-bar/</link>
		<comments>http://seanklein.org/2011/03/remove-the-admin-bar/#comments</comments>
		<pubDate>Thu, 10 Mar 2011 00:31:28 +0000</pubDate>
		<dc:creator>Sean Klein</dc:creator>
				<category><![CDATA[Things I've Learned]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[admin bar]]></category>
		<category><![CDATA[kill it]]></category>

		<guid isPermaLink="false">http://seanklein.org/?p=94</guid>
		<description><![CDATA[For those of us who do not like the new admin bar in WordPress 3.1, here is a quick 1 line (2 with a comment) fix for removing it: // Remove the admin bar from displaying&#8230;everywhere add_filter(&#8216;show_admin_bar&#8217;, &#8216;__return_false&#8217;);]]></description>
			<content:encoded><![CDATA[<p>For those of us who do not like the new admin bar in WordPress 3.1, here is a quick 1 line (2 with a comment) fix for removing it:</p>
<p>// Remove the admin bar from displaying&#8230;everywhere<br />
add_filter(&#8216;show_admin_bar&#8217;, &#8216;__return_false&#8217;);</p>
]]></content:encoded>
			<wfw:commentRss>http://seanklein.org/2011/03/remove-the-admin-bar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress Autosave</title>
		<link>http://seanklein.org/2010/11/wordpress-autosave/</link>
		<comments>http://seanklein.org/2010/11/wordpress-autosave/#comments</comments>
		<pubDate>Wed, 10 Nov 2010 17:14:12 +0000</pubDate>
		<dc:creator>Sean Klein</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[Things I've Learned]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[autosave]]></category>
		<category><![CDATA[TIL]]></category>
		<category><![CDATA[wordpress plugins]]></category>

		<guid isPermaLink="false">http://seanklein.org/?p=75</guid>
		<description><![CDATA[Recently I was having an issue with the WordPress autosave running on my posts in a custom post type.  I am running a lot of scripts in the &#8220;save_post&#8221; action and couldn&#8217;t find a good way to exclude autosaves from running this code. Note that I looked at the info being passed to the functions&#8230;]]></description>
			<content:encoded><![CDATA[<p>Recently I was having an issue with the WordPress autosave running on my posts in a custom post type.  I am running a lot of scripts in the &#8220;save_post&#8221; action and couldn&#8217;t find a good way to exclude autosaves from running this code.</p>
<p>Note that I looked at the info being passed to the functions and the usual suspects for looking at wether it was an autosave or not weren&#8217;t helping.</p>
<p>My biggest problem came when typing a title in the custom post type, then clicking outside of the title field.  Normally this kicks off the autosave feature automatically so the post permalink can be established and displayed below the post title.  Since I wasn&#8217;t using this custom post type on the front of end of the site, I really didn&#8217;t care about that.</p>
<p>So now for the easiest way to disable autosave for the custom post type:</p>
<pre class="prettyprint">
function seans_admin_init() {
	if (!empty($_GET['post']) || (!empty($_GET['post_type']) &#038;&#038; $_GET['post_type'] == '[custom_post_type]')) {
		$post_type = '';

		if (!empty($_GET['post'])) {
			$post_type = get_post_type(intval($_GET['post']));
		}
		else if (!empty($_GET['post_type'])) {
			$post_type = $_GET['post_type'];
		}

		if (!empty($post_type) &#038;&#038; $post_type == '[custom_post_type]') {
			// Hi, I block Autosave from running on posts
			wp_deregister_script('autosave');
		}
	}

}
add_action('admin_init', 'seans_admin_init');
</pre>
]]></content:encoded>
			<wfw:commentRss>http://seanklein.org/2010/11/wordpress-autosave/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>TIL: Adding Admin Menu Pages</title>
		<link>http://seanklein.org/2009/07/til-adding-admin-menu-pages/</link>
		<comments>http://seanklein.org/2009/07/til-adding-admin-menu-pages/#comments</comments>
		<pubDate>Tue, 21 Jul 2009 16:29:56 +0000</pubDate>
		<dc:creator>Sean Klein</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[Themes]]></category>
		<category><![CDATA[Things I've Learned]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[admin pages]]></category>

		<guid isPermaLink="false">http://seanklein.org/?p=32</guid>
		<description><![CDATA[When using functions like add_submenu_page etc, make sure that you add them at the admin_menu action. If you try to add them any place other than that you will get &#8220;Insufficient Privileges&#8221; errors when trying to go to the page. NOTE: If you are in WP 2.8 WordPress allows you to run those functions at&#8230;]]></description>
			<content:encoded><![CDATA[<p>When using functions like add_submenu_page etc, make sure that you add them at the admin_menu action.  If you try to add them any place other than that you will get &#8220;Insufficient Privileges&#8221; errors when trying to go to the page.</p>
<p>NOTE: If you are in WP 2.8 WordPress allows you to run those functions at admin_init, but don&#8217;t be fooled they will break again in WP 2.8.1.</p>
]]></content:encoded>
			<wfw:commentRss>http://seanklein.org/2009/07/til-adding-admin-menu-pages/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WordPress Media Gallery</title>
		<link>http://seanklein.org/2009/07/wordpress-media-gallery/</link>
		<comments>http://seanklein.org/2009/07/wordpress-media-gallery/#comments</comments>
		<pubDate>Wed, 08 Jul 2009 19:45:45 +0000</pubDate>
		<dc:creator>Sean Klein</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Things I've Learned]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[authentication]]></category>
		<category><![CDATA[media gallery]]></category>
		<category><![CDATA[uploading]]></category>

		<guid isPermaLink="false">http://seanklein.org/?p=29</guid>
		<description><![CDATA[For the WordPress Media Gallery to work properly on a server, PHP Safe Mode must be turned off.  From what I am told when PHP Safe mode is on, PHP runs as a different user than apache and this causes folder creation/modification problems.  So for the uploader to work it must be turned off. Also&#8230;]]></description>
			<content:encoded><![CDATA[<p>For the WordPress Media Gallery to work properly on a server, PHP Safe Mode must be turned off.  From what I am told when PHP Safe mode is on, PHP runs as a different user than apache and this causes folder creation/modification problems.  So for the uploader to work it must be turned off.</p>
<p>Also I have noticed some issue in the past with the flash uploader and it displaying HTTP Errors.  I have found that if the server is protected by 401 Authentication this happens.  I am sure that there are other problems that cause this, but this is the first fix I have found in my troubleshooting.</p>
]]></content:encoded>
			<wfw:commentRss>http://seanklein.org/2009/07/wordpress-media-gallery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress PHP Upload Information</title>
		<link>http://seanklein.org/2009/06/wordpress-php-upload-information/</link>
		<comments>http://seanklein.org/2009/06/wordpress-php-upload-information/#comments</comments>
		<pubDate>Tue, 30 Jun 2009 17:38:49 +0000</pubDate>
		<dc:creator>Sean Klein</dc:creator>
				<category><![CDATA[Things I've Learned]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[file uploads]]></category>
		<category><![CDATA[fileupload_maxk]]></category>
		<category><![CDATA[post_max_size]]></category>
		<category><![CDATA[upload_max_filesize]]></category>
		<category><![CDATA[wordpress file uploads]]></category>

		<guid isPermaLink="false">http://seanklein.org/?p=25</guid>
		<description><![CDATA[WordPress has a very distinct way of doing things when it comes to file uploads.  There is the restriction that PHP puts into place with file uploads (ie upload_max_filesize and post_max_size), and restrictions that WP puts in via values in the database. With the PHP values, if you need to upload large files you will&#8230;]]></description>
			<content:encoded><![CDATA[<p>WordPress has a very distinct way of doing things when it comes to file uploads.  There is the restriction that PHP puts into place with file uploads (ie upload_max_filesize and post_max_size), and restrictions that WP puts in via values in the database.</p>
<p>With the PHP values, if you need to upload large files you will either need to edit the php.ini file, or edit the .htaccess file to get the values high enough so PHP doesn&#8217;t run out of memory with the upload.</p>
<p>To set the PHP values in .htaccess:</p>
<ol>
<li>Add the following:
<ul>
<li>php_value upload_max_filesize #M</li>
<li>php_value post_max_size #+1M</li>
</ul>
</li>
</ol>
<p>With post_max_size, the number of M&#8217;s needs to be higher than the upload_max_filesize, and from my testing adding 1 to the upload_max_filesize is enough to suffice.</p>
<p>WordPress restricts uploads in a different way.  In WPMU in the wp_sitemeta table there are 3 fields that need to be updated when large files need to be uploaded.</p>
<p>They are:</p>
<ol>
<li>blog_upload_space &#8211; The amount of space a single blog has to upload files to</li>
<li>fileupload_maxk &#8211; The largest file that may be uploaded (I believe this is in bytes)</li>
<li>upload_filetypes &#8211; This restricts the MIME type that can be uploaded I believe through the Flash uploader</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://seanklein.org/2009/06/wordpress-php-upload-information/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Things I&#8217;ve Learned</title>
		<link>http://seanklein.org/2009/06/things-ive-learned/</link>
		<comments>http://seanklein.org/2009/06/things-ive-learned/#comments</comments>
		<pubDate>Tue, 30 Jun 2009 17:28:31 +0000</pubDate>
		<dc:creator>Sean Klein</dc:creator>
				<category><![CDATA[Things I've Learned]]></category>

		<guid isPermaLink="false">http://seanklein.org/?p=23</guid>
		<description><![CDATA[Today I decided that I am going to write up a things I&#8217;ve learned section to my blog.  It probably won&#8217;t be much, and most likely no one will read it, but I need a place that I can write down these things so I can find them in the future.  Leaving it up to&#8230;]]></description>
			<content:encoded><![CDATA[<p>Today I decided that I am going to write up a things I&#8217;ve learned section to my blog.  It probably won&#8217;t be much, and most likely no one will read it, but I need a place that I can write down these things so I can find them in the future.  Leaving it up to my brain to store things is becoming more and more difficult as I get older, so the blog is a fine place to store this info.</p>
]]></content:encoded>
			<wfw:commentRss>http://seanklein.org/2009/06/things-ive-learned/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

