<?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>Pirenko</title>
	<atom:link href="http://www.munto.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.munto.net</link>
	<description>Fuel Your Web</description>
	<lastBuildDate>Sat, 16 Mar 2013 14:11:14 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>vt_resize.php &#8211; image_resize deprecated</title>
		<link>http://www.munto.net/blog/2013/01/22/vt_resize-php-image_resize-deprecated/</link>
		<comments>http://www.munto.net/blog/2013/01/22/vt_resize-php-image_resize-deprecated/#comments</comments>
		<pubDate>Tue, 22 Jan 2013 00:01:26 +0000</pubDate>
		<dc:creator>Pirenko</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Advanced]]></category>
		<category><![CDATA[Coding]]></category>

		<guid isPermaLink="false">http://www.munto.net/?p=313</guid>
		<description><![CDATA[WordPress 3.5 is here and those who are using the great Victor Teixeira image resize script some warnings might have appeared on your WordPress installation. The image_resize function is still working, but deprecated (in favor of the &#8220;wp_get_image_editor&#8221; function). This means that it should stop working someday. I took a look into the code and ...]]></description>
				<content:encoded><![CDATA[<p>WordPress 3.5 is here and those who are using the great Victor Teixeira image resize script some warnings might have appeared on your WordPress installation. The image_resize function is still working, but deprecated (in favor of the &#8220;wp_get_image_editor&#8221; function). This means that it should stop working someday.<br />
<span id="more-313"></span><br />
I took a look into the code and found a way to replace the old function. The first thing to do is search for the &#8220;image_resize&#8221; string and comment that line of code (just like shown on the first line of the code below). Then insert the following lines of code:</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">//$new_img_path = image_resize( $file_path, $width, $height, $crop, NULL, NULL, 100 );</span><br />
<span style="color: #000088;">$editor</span> <span style="color: #339933;">=</span> wp_get_image_editor<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$file_path</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> is_wp_error<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$editor</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #000088;">$editor</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$editor</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">set_quality</span><span style="color: #009900;">&#40;</span> <span style="color: #cc66cc;">100</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$resized</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$editor</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">resize</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$width</span><span style="color: #339933;">,</span> <span style="color: #000088;">$height</span><span style="color: #339933;">,</span> <span style="color: #000088;">$crop</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$dest_file</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$editor</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">generate_filename</span><span style="color: #009900;">&#40;</span> <span style="color: #009900; font-weight: bold;">NULL</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">NULL</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$saved</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$editor</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">save</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$dest_file</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> is_wp_error<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$saved</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #000088;">$saved</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$new_img_path</span><span style="color: #339933;">=</span><span style="color: #000088;">$dest_file</span><span style="color: #339933;">;</span></div></div>
<p>
<p>This will keep this script working perfectly for the next 30 years! Well, maybe not that long&#8230; </p>
]]></content:encoded>
			<wfw:commentRss>http://www.munto.net/blog/2013/01/22/vt_resize-php-image_resize-deprecated/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Getting Library Image Attributes</title>
		<link>http://www.munto.net/blog/2012/10/15/getting-library-image-attributes/</link>
		<comments>http://www.munto.net/blog/2012/10/15/getting-library-image-attributes/#comments</comments>
		<pubDate>Mon, 15 Oct 2012 15:40:44 +0000</pubDate>
		<dc:creator>Pirenko</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Advanced]]></category>
		<category><![CDATA[Coding]]></category>

		<guid isPermaLink="false">http://www.munto.net/?p=278</guid>
		<description><![CDATA[I ran across a small problem the last days. I needed to obtain image attributes (title and alt) from WordPress library and pass them to the img HTML tag. Once again, something that&#8217;s supposed to be simple, but took me some time. Here&#8217;s how to obtain those elements using the image source link: //FUNCTION TO ...]]></description>
				<content:encoded><![CDATA[<p>I ran across a small problem the last days. I needed to obtain image attributes (title and alt) from WordPress library and pass them to the img HTML tag. Once again, something that&#8217;s supposed to be simple, but took me some time.<br />
<span id="more-278"></span><br />
Here&#8217;s how to obtain those elements using the image source link:</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">//FUNCTION TO GET IMAGE ID FROM SOURCE</span><br />
<span style="color: #000000; font-weight: bold;">function</span> get_attachment_id_from_src <span style="color: #009900;">&#40;</span><span style="color: #000088;">$image_src</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$wpdb</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$query</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;SELECT ID FROM {<span style="color: #006699; font-weight: bold;">$wpdb</span>-&amp;gt;posts} WHERE guid='<span style="color: #006699; font-weight: bold;">$image_src</span>'&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$id</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$wpdb</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>get_var<span style="color: #009900;">&#40;</span><span style="color: #000088;">$query</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #000088;">$id</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<span style="color: #000088;">$alt_text</span> <span style="color: #339933;">=</span> get_post_meta<span style="color: #009900;">&#40;</span>get_attachment_id_from_src<span style="color: #009900;">&#40;</span><span style="color: #000088;">$image_source</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'_wp_attachment_image_alt'</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$title_text</span> <span style="color: #339933;">=</span> get_post<span style="color: #009900;">&#40;</span>get_attachment_id_from_src<span style="color: #009900;">&#40;</span><span style="color: #000088;">$image_source</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post_title</span><span style="color: #339933;">;</span><br />
<span style="color: #666666; font-style: italic;">//OUTPUT THE IMAGE</span><br />
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;img src=&quot;.$image_source.&quot; title=&quot;.$title_text.&quot; alt=&quot;.$alt_text.&quot; /&gt;'</span><span style="color: #339933;">;</span></div></div>
<p>
<p>The variable $image_source is the absolute path to the image that you want to get these attributes. This code works inside the loop and works for images that are inside your WordPress Media Library.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.munto.net/blog/2012/10/15/getting-library-image-attributes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Disabling WordPress Comments</title>
		<link>http://www.munto.net/blog/2012/10/08/disabling-wordpress-comments/</link>
		<comments>http://www.munto.net/blog/2012/10/08/disabling-wordpress-comments/#comments</comments>
		<pubDate>Mon, 08 Oct 2012 15:36:43 +0000</pubDate>
		<dc:creator>Pirenko</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.munto.net/?p=238</guid>
		<description><![CDATA[Let's start with simple stuff. Well at least apparently... It's incredible how Wordpress is such a powerful tool and sometimes you can't do the simplest things. Here's a small screencast that will show you how to disable comments on any scenario.]]></description>
				<content:encoded><![CDATA[<p>Let&#8217;s start with simple stuff. Well at least apparently&#8230; It&#8217;s incredible how WordPress is such a powerful tool and sometimes you can&#8217;t do the simplest things. Here&#8217;s a small screencast that will show you how to disable comments on any scenario.</p>
<p><span id="more-238"></span></p>
<p><iframe src="http://www.screenr.com/embed/c4M8" width="600" height="366" frameborder="0"></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://www.munto.net/blog/2012/10/08/disabling-wordpress-comments/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
