<?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>Logicfire</title>
	<atom:link href="http://logicfire.in/feed/" rel="self" type="application/rss+xml" />
	<link>http://logicfire.in</link>
	<description>Web Programming and Designing</description>
	<lastBuildDate>Tue, 22 Nov 2011 21:17:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>PHP Get Remote File Size</title>
		<link>http://logicfire.in/php-get-remote-file-size/</link>
		<comments>http://logicfire.in/php-get-remote-file-size/#comments</comments>
		<pubDate>Tue, 22 Nov 2011 13:49:39 +0000</pubDate>
		<dc:creator>Fire</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://logicfire.in/?p=135</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[]]></content:encoded>
			<wfw:commentRss>http://logicfire.in/php-get-remote-file-size/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Get File Extension</title>
		<link>http://logicfire.in/php-get-file-extension/</link>
		<comments>http://logicfire.in/php-get-file-extension/#comments</comments>
		<pubDate>Tue, 22 Nov 2011 13:47:37 +0000</pubDate>
		<dc:creator>Fire</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://logicfire.in/?p=132</guid>
		<description><![CDATA[Pathinfo does a number of things, depending on what we ask of it, but put simply it returns (path) information about a filepath. Full details can be found on the handy dandy pathinfo page in the PHP manual. Explore the PHP manual page when you get time, but for the purpose of this blog post [...]]]></description>
			<content:encoded><![CDATA[<p><code>Pathinfo</code> does a number of things, depending on what we ask of it, but put simply it returns (path) information about a filepath. Full details can be found on the handy dandy <a href="http://php.net/pathinfo">pathinfo page</a> in the <strong>PHP</strong> manual. Explore the <strong>PHP</strong> manual page when you get time, but for the purpose of this blog post I’ll hone in to one specific use of the function: getting the file extension. In order to do that, we simply call the function passing along the full filename and a ‘flag’ (a constant which dictates the behaviour of the function) asking for the extension only.</p>
<pre class="qoate-code">
$filename = 'mypic.gif';
$ext = pathinfo($filename, PATHINFO_EXTENSION);
</pre>
<p>That’s all there is to it! In my opinion, this approach ‘reads’ much more easily than the mess of nested function calls and playing around with string positions, regular expressions, etc.. It is concise and to the point: call pathinfo and only give me back the extension. Simple.</p>
<p>Now for the icing on the cake. When pitched against the other methods detailed above, this call to pathinfo beats all of the others into submission. At least in my testing, it is the fastest method of all (though in random hiccups strrchr does win in around 1% of tests) being on average 1/10<sup>th</sup> faster than even the strrchr approach.</p>
]]></content:encoded>
			<wfw:commentRss>http://logicfire.in/php-get-file-extension/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress wp_nav_menu Seperator And First Last Classes</title>
		<link>http://logicfire.in/wordpress-wp_nav_menu-seperator-and-first-last-classes/</link>
		<comments>http://logicfire.in/wordpress-wp_nav_menu-seperator-and-first-last-classes/#comments</comments>
		<pubDate>Wed, 10 Nov 2010 19:42:23 +0000</pubDate>
		<dc:creator>Fire</dc:creator>
				<category><![CDATA[Code Snippets]]></category>

		<guid isPermaLink="false">http://logicfire.in/?p=36</guid>
		<description><![CDATA[Using WordPress wp_nav_menu function you can display navigation menus on your site nicely.  You can even add the separators between each navigation menu.  It can be done by passing these arguments either “link_before, link_after” or “before, after” to your wp_nav_menu funtion.  However, you might face the problem with adding separators between each navigation menu. Let’s [...]]]></description>
			<content:encoded><![CDATA[<p>Using WordPress <em><strong>wp_nav_menu</strong></em> function you  can display navigation menus on your site nicely.  You can even add the  separators between each navigation menu.  It can be done by passing  these arguments either “link_before, link_after” or “before, after” to  your <em><strong>wp_nav_menu</strong></em> funtion.  However, you might face the problem with adding separators between each navigation menu.</p>
<p>Let’s say you would like to add “<strong>|</strong>” between navigation menu links but do not want to show it after the last menu.</p>
<p>e.g.<br />
Home | About Us | FAQs | Blog | <strong>&lt;– you do not want this</strong></p>
<p>So far <em><strong>wp_nav_menu</strong></em> function does not add  any additional classes to the first and last of the navigation menus.   But don’t  worry to much about that because there is a trick to fix it.   Just copy and paste below code to your <em><strong>functions.php</strong></em></p>
<p>Put this into your <strong><em>functions.php</em></strong></p>
<pre class="qoate-code">function nav_menu_first_last( $items ) { $position = strrpos($items, 'class="menu-item', -1);&lt;br /&gt;
$items=substr_replace($items, 'menu-item-last ', $position+7, 0);&lt;br /&gt;
$position = strpos($items, 'class="menu-item');&lt;br /&gt;
$items=substr_replace($items, 'menu-item-first ', $position+7, 0);&lt;br /&gt;
return $items;&lt;br /&gt;
}&lt;br /&gt;
add_filter( 'wp_nav_menu_items', 'nav_menu_first_last' );</pre>
<p>Put this into your <em><strong>style.css </strong></em>or any css file you using.</p>
<pre class="qoate-code">.menu-item-last {&lt;br /&gt;
display: none;&lt;br /&gt;
}</pre></p>
]]></content:encoded>
			<wfw:commentRss>http://logicfire.in/wordpress-wp_nav_menu-seperator-and-first-last-classes/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Get WordPress User Id Displayed On Your Post/Page</title>
		<link>http://logicfire.in/get-wordpress-user-id-displayed-on-your-postpage/</link>
		<comments>http://logicfire.in/get-wordpress-user-id-displayed-on-your-postpage/#comments</comments>
		<pubDate>Sat, 28 Aug 2010 12:04:13 +0000</pubDate>
		<dc:creator>Fire</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[ID]]></category>

		<guid isPermaLink="false">http://logicfire.in/?p=15</guid>
		<description><![CDATA[This  code snippet let you display you wordpress user&#8217;s ID number on Post or Page. How  To Use: 1. Copy and Paste this code in functions.php file of your wordpress theme. 2. Use  [DisplayUserID] this shortcode the display User's ID number on Post or Page.]]></description>
			<content:encoded><![CDATA[<p>This  code snippet let you display you wordpress user&#8217;s ID number on Post or Page.</p>
<pre class="qoate-code">&lt;?php function Display_user_ID_for_Me() {
&lt;pre&gt;global $current_user;
$current_user = wp_get_current_user();
return $current_user-&gt;ID;
}
add_shortcode('DisplayUserID', 'Display_user_ID_for_Me');
?&gt;</pre>
</pre>
<p>How  To Use:</p>
<p>1. Copy and Paste this code in functions.php file of your wordpress theme.</p>
<p>2. Use  [DisplayUserID] this shortcode the display User&#8217;s ID number on Post or Page.</p>
]]></content:encoded>
			<wfw:commentRss>http://logicfire.in/get-wordpress-user-id-displayed-on-your-postpage/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>

