<?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>Sean Hayes - professional WordPress consulting &#187; sean</title>
	<atom:link href="http://www.seanhayes.biz/author/sean/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.seanhayes.biz</link>
	<description></description>
	<lastBuildDate>Mon, 12 Jul 2010 18:55:20 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>WordPress 3.0 and flush_rewrite_rules</title>
		<link>http://www.seanhayes.biz/2010/wordpress-3-0-and-flush_rewrite_rules/</link>
		<comments>http://www.seanhayes.biz/2010/wordpress-3-0-and-flush_rewrite_rules/#comments</comments>
		<pubDate>Mon, 12 Jul 2010 18:55:20 +0000</pubDate>
		<dc:creator>sean</dc:creator>
				<category><![CDATA[wordpress]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[upgrade]]></category>

		<guid isPermaLink="false">http://www.seanhayes.biz/?p=376</guid>
		<description><![CDATA[
			
				
			
		
I thought I would document this experience I had when upgrading some sites to WordPress 3.0.
After WordPress 3.0 came out I took some time to upgrade blogs I manage and was impressed how well the upgrades fared. No issues, fair warnings and ultimately upgraded sites. However, on one of my development sites, after the upgrade, [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.seanhayes.biz%2F2010%2Fwordpress-3-0-and-flush_rewrite_rules%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.seanhayes.biz%2F2010%2Fwordpress-3-0-and-flush_rewrite_rules%2F&amp;source=seanchayes&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>I thought I would document this experience I had when upgrading some sites to WordPress 3.0.</p>
<p>After WordPress 3.0 came out I took some time to upgrade blogs I manage and was impressed how well the upgrades fared. No issues, fair warnings and ultimately upgraded sites. However, on one of my development sites, after the upgrade, I noted an error about &#8220;error re-declaring the function flush_rewrite_rules()&#8221;. I knew, for this site in particular, that I had written some custom code to rewrite the urls and in this case I had innocently included a function called &#8220;flush_rewrite_rules()&#8221;. Coincidentally, in WordPress 3.0 a new core function has been created called &#8220;flush_rewrite_rules()&#8221; and because that now exists my function is interfering with this and required fixing. The fix, in this case was to rename my custom function and test and I thought nothing more of it. (I know &#8211; I should have participated in the beta test).</p>
<p>I didn&#8217;t think anything of it after that until I was asked to assist with another clients site. This time the client had innocently upgraded their site to WordPress 3.0 and encountered a white screen with the long PHP error referencing &#8220;error re-declaring the function  flush_rewrite_rules()&#8221;. The difference this time was that it was in a plugin causing the issue and as such the site was rendered inaccessible.</p>
<p>For this client I connected via FTP and downloaded the plugin code, searched for the function named  &#8221;flush_rewrite_rules()&#8221; (along with any references to it) and renamed it through the code. After uploading the change the site was restored back to normal.</p>
<p>A simple fix for this site but also a simple lesson in heeding the warnings / suggestions given by the WordPress upgrade tool when upgrading to WordPress 3.0</p>
]]></content:encoded>
			<wfw:commentRss>http://www.seanhayes.biz/2010/wordpress-3-0-and-flush_rewrite_rules/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress, breadcrumbs and wp_reset_query</title>
		<link>http://www.seanhayes.biz/2010/wordpress-breadcrumbs-and-wp_reset_query/</link>
		<comments>http://www.seanhayes.biz/2010/wordpress-breadcrumbs-and-wp_reset_query/#comments</comments>
		<pubDate>Thu, 17 Jun 2010 14:36:44 +0000</pubDate>
		<dc:creator>sean</dc:creator>
				<category><![CDATA[wordpress]]></category>
		<category><![CDATA[breadcrumbs]]></category>
		<category><![CDATA[wp_query]]></category>
		<category><![CDATA[wp_reset_query]]></category>

		<guid isPermaLink="false">http://www.seanhayes.biz/?p=371</guid>
		<description><![CDATA[
			
				
			
		
I came across weird behaviour recently relating to breadcrumbs. In a site I was working on the breadcrumb functionality (provided by a plugin) was not consistent &#8211; it was incorrect on single post pages but correct on category pages. It didn&#8217;t make sense. There are not many options for the breadcrumb plugin so it was [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.seanhayes.biz%2F2010%2Fwordpress-breadcrumbs-and-wp_reset_query%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.seanhayes.biz%2F2010%2Fwordpress-breadcrumbs-and-wp_reset_query%2F&amp;source=seanchayes&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>I came across weird behaviour recently relating to breadcrumbs. In a site I was working on the breadcrumb functionality (provided by a plugin) was not consistent &#8211; it was incorrect on single post pages but correct on category pages. It didn&#8217;t make sense. There are not many options for the breadcrumb plugin so it was difficult to see the fault lying there. I did notice that the site used a custom menu and that code was used on all pages. So, my troubleshooting took to dissecting the header and then menu code.</p>
<p>In the header was a call to the custom menu and in that file each menu element was created with a new WP_Query to get a subset of links / pages. I saw that the syntax to fire off each query was as I would expect  but I did notice that the $wp_query object wasn&#8217;t saved before these additional queries and subsequently restored afterwards. So, I figured that was messing things up and added that code in. No change. Now, I went a little deeper and added code in the menu to display the current categories after each menu (the categories are used in the breadcrumbs). Now, it was making sense. So, the categories were being messed up after each query in the menu code and that affected the single post pages.</p>
<p>The fix was simple and one line of code at the end of the custom menu code before returning to finish the header code:</p>
<pre class="brush: php;">wp_reset_query();</pre>
<p>And, as per the <a rel="nofollow" title="wp_reset_query - WordPress codex" href="http://www.seanhayes.biz/goto/codex_for_wp_reset_query_/371/1" target="_blank">codex for wp_reset_query()</a> it is recommended to be used after a custom query. The breadcrumbs were now working as expected.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.seanhayes.biz/2010/wordpress-breadcrumbs-and-wp_reset_query/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What to do if your blog has been hacked</title>
		<link>http://www.seanhayes.biz/2010/what-to-do-if-your-blog-has-been-hacked/</link>
		<comments>http://www.seanhayes.biz/2010/what-to-do-if-your-blog-has-been-hacked/#comments</comments>
		<pubDate>Wed, 24 Feb 2010 00:03:41 +0000</pubDate>
		<dc:creator>sean</dc:creator>
				<category><![CDATA[wordpress]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://www.seanhayes.biz/?p=351</guid>
		<description><![CDATA[
			
				
			
		
I&#8217;ve recently worked on a couple of blog sites that had been victim to malicious activity. The evidence was different in both cases and for one consisted of search results that promoted drugs that enhance performance. And we&#8217;re not talking about blog performance   For both sites there was hidden text and html code [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.seanhayes.biz%2F2010%2Fwhat-to-do-if-your-blog-has-been-hacked%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.seanhayes.biz%2F2010%2Fwhat-to-do-if-your-blog-has-been-hacked%2F&amp;source=seanchayes&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>I&#8217;ve recently worked on a couple of blog sites that had been victim to malicious activity. The evidence was different in both cases and for one consisted of search results that promoted drugs that enhance performance. And we&#8217;re not talking about blog performance <img src='http://www.seanhayes.biz/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  For both sites there was hidden text and html code in all the posts containing offsite links to seeming random and unrelated websites. The job I had was to remove any sign of malicious code and sanitize the sites. Additionally I was getting browser warnings indicating malware was present on the page I was navigating to. The warnings suggested I don&#8217;t continue lest my PC be infected further.</p>
<h3>Investigating a hacked WordPress site</h3>
<p>With WordPress there are a few good ways to speed up the job of troubleshooting a hacked site and speed may be of essence with something like this. I asked the client when there were first signs of the malicious content or behavior &#8211; believe me it&#8217;s actually very useful to know the exact date &amp; time you first experience the issue as you&#8217;ll see later. So, if that time information is not available or cannot be remembered viewing the server error logs promptly could give you some more information. Armed with that information and presuming you can get into the site&#8217;s admin dashboard you try the following fairly standard actions to help uncover the culprit and mitigate further issues:</p>
<ul>
<li>Disable all plugins</li>
<li>Switch to default theme</li>
<li>Use Theme Authenticity Checker</li>
</ul>
<p>The Theme Authenticity Checker plugin does a quick scan of all installed themes for unnecessary code &#8211; typically this code consists of statements or functions like &#8220;eval( blah blah);&#8221; code injected somewhere in any of a themes files. Pay attention to anything TAC highlights &#8211; perhaps removing un-needed themes. For any theme that is highlighted as containing potentially malicious code you&#8217;ll need to edit the affected file or remove and re-install the theme files from the originals. That&#8217;s a drag if you&#8217;ve made theme modifications but it means you can revert to being back online. In one of the cases here I was re-enabling the plugins one at a time and I found that a plugin was causing one issue (preventing the blog from displaying) and by removing it from the plugins folder I could continue.</p>
<p>However, perhaps your blog site is non-functioning and you can&#8217;t get into your site&#8217;s admin dashboard? Well, now&#8217;s the time you use FTP or SSH connect to the server hosting the website. Remember I said how useful it is to remember the date &amp; time you first noticed the hacking / issue? Well, here&#8217;s where you can navigate to the following folders and look for files that have been changed around the same date/time:</p>
<ul>
<li>wp-content</li>
<li>wp-admin</li>
<li>wp-includes</li>
<li>wp-content/themes/*</li>
<li>wp-content/plugins/*</li>
<li>the folder above wp-content &#8211; sometimes public_html or public</li>
</ul>
<p>* The above folder list is not exhaustive but typically this is where the malicious code is to reside</p>
<p>In each of these folders look for other folders or files that have recently been created. These are sure indications that modifications have been made and you need to target those files or folders.</p>
<h3>Fixing a hacked site</h3>
<p>After searching in the above folders on the clients sites here&#8217;s what I found:</p>
<ul>
<li>A folder called &#8220;backup&#8221; and in there was malicious file  &#8221;backup-loader&#8221; that had code to display an authentic looking message on the WordPress dashboard.</li>
<li>An include statement at the top or within the index.php</li>
<li>A file/folder combination called &#8220;__notes/notes&#8221; that was included in index.php</li>
<li>Malicious code in wp-includes/theme.php</li>
<li>Malicious code in functions.php &#8211; an eval statement that referred to a setting in the wp_options database</li>
<li>Malicious javascript code in the wp_options database</li>
</ul>
<p>With FTP you can download, use a code editor, and then upload fixed files. With SSH using a code editor directly to removing the malicious code in the php files. Identifying the code to remove was pretty easy as often the code segments looked out of place and therefore easy to remove and test. The wp_options code required the use of a MySQL database client like PHPMyAdmin to manually edit the table and remove the code and the related entry / record to prevent re-infection.</p>
<p><strong>Cleanse and Sanitize</strong></p>
<p>I said before that one of the effects of this hacking was that all the posts and pages had been injected with additional HTML code. Again with a MySQL client I looked through the blog database tables and found that also infected were the &#8220;revision&#8221; records for each affected post or page. Each malicious link was hidden from view with a CSS &#8220;style display:none&#8221; command and each link was injected in random locations within the post content. This made cleansing a labor intensive job (I could have possibly written some code to scan and remove but time didn&#8217;t permit) as I had to manually edit each post in the database &#8211; copying and pasting to a code editor and then pasting it back into the database, view the page or post, view the source to ensure the malicious code was gone.</p>
<p>Check in with Google Webmaster Tools as well to see if Google has identified malware on your site. If it has then follow it&#8217;s suggestions as to how to get the information Google stores about the site updated to reflect the current, non-malware, site.</p>
<h3>WordPress Security Review</h3>
<p>Once your site is cleansed and working you might take a look at further locking down access to reduce the chances of this happening again. Changing your admin and FTP passwords regularly is always good practice but there are more hints and tips in my <a title="WordPress Security" href="http://www.seanhayes.biz/2010/wordpress-security/">WordPress Security</a> post.</p>
<p>I successfully managed to fix these sites using the techniques described above &#8211; if you ever experience similar incidents then this short guide will help you. I do recommend now after all of this, taking a database backup and upgrading to the latest version of plugins and WordPress as soon as possible.</p>
<p>Thoughts, ideas always welcome in the comments.</p>
<p>*Update* After I completed this project I came across an updated version of Exploit Scanner &#8211; more information <a rel="nofollow" title="Exploit Scanner" href="http://www.seanhayes.biz/goto/here/351/2" target="_blank">here</a>. A useful tool to assist in fixing a compromised WordPress installation.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.seanhayes.biz/2010/what-to-do-if-your-blog-has-been-hacked/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What is the best way to speed up my blog?</title>
		<link>http://www.seanhayes.biz/2010/what-is-the-best-way-to-speed-up-my-blog/</link>
		<comments>http://www.seanhayes.biz/2010/what-is-the-best-way-to-speed-up-my-blog/#comments</comments>
		<pubDate>Mon, 25 Jan 2010 12:00:15 +0000</pubDate>
		<dc:creator>sean</dc:creator>
				<category><![CDATA[wordpress]]></category>
		<category><![CDATA[caching]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[themes]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[website]]></category>

		<guid isPermaLink="false">http://www.seanhayes.biz/?p=322</guid>
		<description><![CDATA[
			
				
			
		
There are times when you see your blog fly and other times it seems like it&#8217;s taking to an age to load. In your email you&#8217;ve got mail from users saying that the blog performance is degrading and not as good as it used to be. You keep checking that your blog cache program is [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.seanhayes.biz%2F2010%2Fwhat-is-the-best-way-to-speed-up-my-blog%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.seanhayes.biz%2F2010%2Fwhat-is-the-best-way-to-speed-up-my-blog%2F&amp;source=seanchayes&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>There are times when you see your blog fly and other times it seems like it&#8217;s taking to an age to load. In your email you&#8217;ve got mail from users saying that the blog performance is degrading and not as good as it used to be. You keep checking that your blog cache program is enabled and wonder what else you can do. Well, you can wonder no more as I&#8217;ve collected the best tips on how to review your site configuration and restore the performance you and your users are used to.</p>
<p>Let&#8217;s take a look at the options you can explore to better improve the performance of your blog.</p>
<div id="attachment_328" class="wp-caption alignright" style="width: 160px"><a href="http://www.seanhayes.biz/wp-content/uploads/2010/01/performance-speed-limit.png"><img class="size-thumbnail wp-image-328" title="performance-speed-limit" src="http://www.seanhayes.biz/wp-content/uploads/2010/01/performance-speed-limit-150x150.png" alt="Blog performance break the speed limit" width="150" height="150" /></a><p class="wp-caption-text">Blog performance break the speed limit</p></div>
<h3>Blog Theme</h3>
<p>Review your theme options, widgets and settings. Use firebug to see if all your theme images are loading correctly especially if you&#8217;ve experienced issues during a theme upgrade. Review your themes CSS files to see if there are references to images or other files that are no longer required or perhaps are missing. Disable any unnecessary widgets in your blogs dashboard. You may also check out your theme is generating valid code using the <a rel="nofollow" title="W3C Validation Service" href="http://www.seanhayes.biz/goto/W3C_Markup_Validation_Service/322/2" target="_blank">W3C Markup Validation Service</a> or check with your theme developer or the support forum for your theme.</p>
<h3>Blog Plugins</h3>
<p>Simply put &#8211; do you need all the plugins activated on your site? Perform a quick plugin audit, comparing what you see on your home page and blog pages with your active plugins. If there are plugins that are active but not used then deactivate them one by one and refresh your blog page to see that it&#8217;s still all working. Sometimes going back to basics and deactivating all plugins is the only way to go. Also make sure you have the latest versions of the plugins you decide on keeping.</p>
<h3>Blog Hosting</h3>
<p>This can play a big part in the performance of your blog. With the big shift from shared (cheap) hosting to still cost effective and high performance VPS offerings like <a rel="nofollow" title="Slicehost VPS Hosting" href="http://www.seanhayes.biz/goto/Slicehost/322/3" target="_blank">Slicehost</a> (the host I use) and many others, there are more opportunities to gain improved performance by picking the right host. Look at your hosting package and compare the next one up with your existing host.</p>
<h3>Blog Optimization</h3>
<p>This can offer up some simple and not so simple tips to help you speed up the responsiveness of your blog. There are many tools you can use &#8211; <a rel="nofollow" title="Firebug" href="http://www.seanhayes.biz/goto/Firebug/322/4" target="_blank">Firebug</a> add on in Firefox, <a rel="nofollow" title="Pingdom Tools" href="http://www.seanhayes.biz/goto/Pingdom/322/5" target="_blank">Pingdom</a>, <a rel="nofollow" title="Yahoo YSlow" href="http://www.seanhayes.biz/goto/YSlow/322/6" target="_blank">YSlow</a> another addon for Firefox and even Google has a <a rel="nofollow" title="Google Page Speed" href="http://www.seanhayes.biz/goto/performance_tool_/322/7" target="_blank">performance tool </a>for Firefox. You can even try <a rel="nofollow" title="Is My Blog Working?" href="http://www.seanhayes.biz/goto/Is_My_Blog_Working/322/8" target="_blank">Is My Blog Working</a> which, along with Pingdom can give you an idea of the time it takes to load your site. You can compare the load time before and after any of the changes you make.</p>
<h3>View the server log</h3>
<p>This is probably the most technical tip in this post and varies wildly from host to host. I have found that sometimes it can lead you straight to a bottleneck because you see lots of errors being reported and at other times you are swimming through the log struggling to find what&#8217;s occurring. Perhaps with this one work with your hosting tech support or a <a title="WordPress Consultant" href="http://www.seanhayes.biz/wordpress-consulting/" target="_blank">WordPress consultant</a> if you feel you are still struggling with blog speed.</p>
<h3>Blog Caching</h3>
<p>This is typically performed by a plugin but there are lower level server options available if you&#8217;re running on a VPS or non-shared server. Such options include APC &#8211; <a rel="nofollow" title="Caching your blog with APC cache" href="http://www.seanhayes.biz/goto/Alternative_PHP_Cache/322/10" target="_blank">Alternative PHP Cache</a> &#8211; and these can improve the server performance and that blends through to your WordPress performance.</p>
<p>Within WordPress there are a number of caching plugins that you can choose to use &#8211; <a rel="nofollow" title="WP Super Cache" href="http://www.seanhayes.biz/goto/WP_Super_Cache/322/11" target="_blank">WP-Super-Cache</a> and <a rel="nofollow" title="W3 Total Cache" href="http://www.seanhayes.biz/goto/W3_Total_Cache/322/12" target="_blank">W3-Total Cache</a>. I&#8217;ve used both and both can benefit from tuning of their options so be sure to review the options carefully. The basis of these WordPress caching tools is that they generate a single html page of your posts / home page that the web server can deliver to a browser much more efficiently than processing the page on each request. Most of the caching plugins have multiple options for tuning how it should work on your blog &#8211; try changing the available options to see if the performance improves.</p>
<h3>Blog Security</h3>
<div id="attachment_337" class="wp-caption alignright" style="width: 160px"><a href="http://www.seanhayes.biz/wp-content/uploads/2010/01/security-lock.png"><img class="size-thumbnail wp-image-337" title="blog-security-lock" src="http://www.seanhayes.biz/wp-content/uploads/2010/01/security-lock-150x150.png" alt="Blog Security" width="150" height="150" /></a><p class="wp-caption-text">Blog Security</p></div>
<p>Securing your blog is important and there are many options that will help you. Now, there&#8217;s no substitute for good security but you might not want to put too many locks on the blog such that it takes too much time to do something simple. And each security layer can add a level of performance sapping complexity. Review your blogs security options and pare them down to the minimum necessary or within your security comfort level.</p>
<h3>Blog Advertising</h3>
<p>Advertising makes the blog world go around (along with B2B opportunities of course) and I&#8217;ve worked on one or two sites that have multiple advertising sections and there have been times where the site won&#8217;t completely load because it&#8217;s waiting for a piece of advertising to load. Review with your advertising contacts/services to see that you have the most optimal code for your advertising sections on your blog.</p>
<p>So, you can see there are many ways you can speed up your blog or at least tweak it for performance in some areas. If there&#8217;s a tip I&#8217;ve missed but you&#8217;ve used and benefited from then please leave a comment!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.seanhayes.biz/2010/what-is-the-best-way-to-speed-up-my-blog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Integrating WordPress and Google-hosted jQuery 1.4</title>
		<link>http://www.seanhayes.biz/2010/integrating-wordpress-and-google-hosted-jquery-1-4/</link>
		<comments>http://www.seanhayes.biz/2010/integrating-wordpress-and-google-hosted-jquery-1-4/#comments</comments>
		<pubDate>Sat, 16 Jan 2010 19:15:04 +0000</pubDate>
		<dc:creator>sean</dc:creator>
				<category><![CDATA[wordpress]]></category>
		<category><![CDATA[1.4]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://www.seanhayes.biz/?p=312</guid>
		<description><![CDATA[
			
				
			
		
The release of jQuery 1.4 brings many javascript improvements in performance, better handling of attributes, manipulation of DOM events and many more. Head over to the jQuery site for more details and a breakdown of the new features and improvements.
That&#8217;s great and we all like speed and flexibility improvements. Now, how would you like these [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.seanhayes.biz%2F2010%2Fintegrating-wordpress-and-google-hosted-jquery-1-4%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.seanhayes.biz%2F2010%2Fintegrating-wordpress-and-google-hosted-jquery-1-4%2F&amp;source=seanchayes&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<div id="attachment_317" class="wp-caption alignright" style="width: 160px"><a href="http://www.seanhayes.biz/wp-content/uploads/2010/01/wordpress-heart-jquery.png"><img class="size-thumbnail wp-image-317" title="wordpress-heart-jquery" src="http://www.seanhayes.biz/wp-content/uploads/2010/01/wordpress-heart-jquery-150x150.png" alt="WordPress &amp; jQuery" width="150" height="150" /></a><p class="wp-caption-text">WordPress &amp; jQuery</p></div>
<p>The release of jQuery 1.4 brings many javascript improvements in performance, better handling of attributes, manipulation of DOM events and many more. Head over to the<a rel="nofollow" title="jQuery 1.4 New features and more information" href="http://www.seanhayes.biz/goto/_jQuery/312/2" target="_blank"> jQuery</a> site for more details and a breakdown of the new features and improvements.</p>
<p>That&#8217;s great and we all like speed and flexibility improvements. Now, how would you like these in your blog from today? Well a very quick and easy modification to your theme can have you utilizing the latest version of jQuery from Google&#8217;s CDN servers. I took the code block from the source site below, inserted it in my functions.php but replaced the jQuery version number. Check out the adjusted code block below:</p>
<pre class="brush: php; highlight: [3];">
if( !is_admin()){
   wp_deregister_script('jquery');
   wp_register_script('jquery', (&quot;http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js&quot;), false, '');
   wp_enqueue_script('jquery');
}
</pre>
<p>See where I just put &#8220;..jquery/1/jquery&#8230;&#8221; &#8211; by referencing the &#8220;1&#8243; instead of &#8220;1.3.2&#8243; we will get the latest version of jQuery loaded on the site. A quick look at the source code and we can see that the inserted javascript source is indeed via Google&#8217;s CDN and by clicking on the source code we see it&#8217;s version 1.4. To use simple terms in this code we are telling WordPress to &#8220;forget&#8221; it&#8217;s usual jQuery source / script setting, then preparing WordPress for the new settings (please load jQuery from Google&#8217;s CDN) and then serving up the new information for WordPress to use.</p>
<p>A quick and easy way to give your blog / site the benefits of the recent jQuery updates and improvements. If you encounter an issue with your site or  jQuery after this change you can easily revert to the previous version (1.3.2) by either removing the code block you added or, to keep jQuery hosted by Google&#8217;s CDN, adjusting the version number from &#8220;1&#8243; to &#8220;1.3.2&#8243;. For those more familiar with jQuery coding <a rel="nofollow" title="jQuery backwards incompatible changes" href="http://www.seanhayes.biz/goto/there_s_a_list_of_backwards_incompatible_changes/312/3" target="_blank">there&#8217;s a list of &#8220;backwards incompatible&#8221; changes</a> settings on the jQuery site.</p>
<p>If you&#8217;ve changed your site over to jQuery 1.4 how did it work out? As smoothly as mine did? Leave me a comment.</p>
<p>Source: <a rel="nofollow" href="http://www.seanhayes.biz/goto/http_digwp_com_2009_06_use_google_hosted_javascript_libraries_still_the_right_way_/312/4">http://digwp.com/2009/06/use-google-hosted-javascript-libraries-still-the-right-way/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.seanhayes.biz/2010/integrating-wordpress-and-google-hosted-jquery-1-4/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using apc (user agent is rejected)
Database Caching 1/16 queries in 0.012 seconds using apc

Served from: www.seanhayes.biz @ 2010-09-10 08:51:37 -->