<?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>Paul Cracknell &#187; Wordpress Developer</title>
	<atom:link href="http://paulcracknell.net/category/wordpress-developer/feed/" rel="self" type="application/rss+xml" />
	<link>http://paulcracknell.net</link>
	<description>Website development</description>
	<lastBuildDate>Wed, 08 May 2013 23:27:13 +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>How to check you WordPress theme before sumitting it to WordPress Themes</title>
		<link>http://paulcracknell.net/784/how-to-check-you-wordpress-theme-before-sumitting-it-to-wordpress-themes/</link>
		<comments>http://paulcracknell.net/784/how-to-check-you-wordpress-theme-before-sumitting-it-to-wordpress-themes/#comments</comments>
		<pubDate>Sat, 17 Sep 2011 06:02:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Wordpress Developer]]></category>

		<guid isPermaLink="false">http://www.paulcracknell.net/?p=784</guid>
		<description><![CDATA[If you have had the urge to deveolp a WordPress theme and to submit it to the WordPress theme depository you should do some automated checking so that your chances of approval are increased.  I can admit that it is a little bit denting to an ego if you think it is awesome and then [...]]]></description>
				<content:encoded><![CDATA[<p>If you have had the urge to deveolp a WordPress theme and to submit it to the WordPress theme depository you should do some automated checking so that your chances of approval are increased.  I can admit that it is a little bit denting to an ego if you think it is awesome and then you get back a rejection email with a bunch of stuff to fix.  Well to maintain the standard of the thems in the repository there are rules and &#8220;Rules is Rules Jacko&#8221;  so you need to fix it.</p>
<p>The easiest way to avoid dissapointment is to do the checks that the moderators do.</p>
<p>First download test data from <a title="https://wpcom-themes.svn.automattic.com/demo/test-data.2011-01-17.xml" href="https://wpcom-themes.svn.automattic.com/demo/test-data.2011-01-17.xml">https://wpcom-themes.svn.automattic.com/demo/test-data.2011-01-17.xml<br />
</a> Import this into your theme and check that all the little things are fixed display correctly e.g.  Really long titles.</p>
<p>Once that is done check your compliance with W3C for html and css compliance.  You can do this with a neat little WordPress Plugin called <a title="Deblogger" href="http://http://wordpress.org/extend/plugins/debogger/" target="_blank">Deblogger</a>.</p>
<p>Next you will need to do checks to see if you have all the required standards for a theme.  The <a title="Theme-Check" href="http://wordpress.org/extend/plugins/theme-check/" target="_blank">Theme-Check</a> plugin will sort  this out for your.  After you run this you will find out if you have included all the required css and updated not depreciated calles in your PHP code.</p>
<p>Lastly get the <a href="http://wordpress.org/extend/plugins/log-deprecated-notices/" target="_blank">Log Depreciated Notices</a> plugin which logs the usage of deprecated files, functions, and function arguments, and identifies where the deprecated functionality is being used in your theme.</p>
<p>For the full guide on theme testing you should visit the <a href="http://codex.wordpress.org/Theme_Development#Theme_Testing_Process" target="_blank">Theme Development</a> page in the WordPress codex to guide you further.</p>
]]></content:encoded>
			<wfw:commentRss>http://paulcracknell.net/784/how-to-check-you-wordpress-theme-before-sumitting-it-to-wordpress-themes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Notice: Undefined index: page in &#8230;</title>
		<link>http://paulcracknell.net/434/notice-undefined-index-page-in/</link>
		<comments>http://paulcracknell.net/434/notice-undefined-index-page-in/#comments</comments>
		<pubDate>Thu, 20 Jan 2011 04:00:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Theme Options]]></category>
		<category><![CDATA[Wordpress Developer]]></category>
		<category><![CDATA[theme option]]></category>
		<category><![CDATA[wordpress theme]]></category>

		<guid isPermaLink="false">http://www.paulcracknell.net/?p=434</guid>
		<description><![CDATA[If you are developing a WordPress theme and have the debug feature activated and you have the following error in the Admin Area of your WordPress&#8230; Notice: Undefined index: page in C:Users\Mysql folderrootwordpresswp-contentthemesbreathefunctions.php on line 298 The offending line of code is most likely this&#8230; 1 if &#40; $_GET&#91;'page'&#93; == basename&#40;__FILE__&#41; &#41; &#123; replace with [...]]]></description>
				<content:encoded><![CDATA[<p>If you are developing a WordPress theme and have the debug feature activated and you have the following error in the Admin Area of your WordPress&#8230;</p>
<p><strong>Notice</strong>:  Undefined index:  page in <strong>C:Users\Mysql folderrootwordpresswp-contentthemesbreathefunctions.php</strong> on line <strong>298</strong></p>
<p>The offending line of code is most likely this&#8230;</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'page'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> <span style="color: #990000;">basename</span><span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">__FILE__</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span></pre></td></tr></table></div>

<p>replace with this&#8230;</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'page'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'page'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> <span style="color: #990000;">basename</span><span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">__FILE__</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://paulcracknell.net/434/notice-undefined-index-page-in/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Notice: Undefined index: id in…</title>
		<link>http://paulcracknell.net/419/notice-undefined-index-id-in/</link>
		<comments>http://paulcracknell.net/419/notice-undefined-index-id-in/#comments</comments>
		<pubDate>Thu, 20 Jan 2011 02:05:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Theme Options]]></category>
		<category><![CDATA[Wordpress Developer]]></category>
		<category><![CDATA[errors]]></category>
		<category><![CDATA[theme options]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.paulcracknell.net/?p=419</guid>
		<description><![CDATA[If you are developing a WordPress Theme Option Page via some tutorials on the web, the php that is used to call the options will create these errors when the WordPress debug feature is activated. Notice: Undefined index: id in C:UsersMysql folderrootwordpresswp-contentthemesbreatheindex.php on line 4 Notice: Undefined index: std in C:UsersMysql folderrootwordpresswp-contentthemesbreatheindex.php on line 4 [...]]]></description>
				<content:encoded><![CDATA[<p>If you are developing a WordPress Theme Option Page via some tutorials on the web, the php that is used to call the options will create these errors when the WordPress debug feature is activated.<br />
<strong>Notice: Undefined index: id in C:UsersMysql folderrootwordpresswp-contentthemesbreatheindex.php on line 4</strong></p>
<p><strong>Notice: Undefined index: std in C:UsersMysql folderrootwordpresswp-contentthemesbreatheindex.php on line 4</strong></p>
<p>The code that is generally outlined and is the culprit for the errors is&#8230;</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> 
<span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$options</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$options</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>get_option<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">===</span> <span style="color: #009900; font-weight: bold;">FALSE</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000088;">$$value</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'std'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span> 
	<span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span> <span style="color: #000088;">$$value</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> get_option<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>To fix the problem I have found that this piece of code will eliminate the errors.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #666666; font-style: italic;">//allows the theme to get info from the theme options page</span>
<span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$options</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$options</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>get_option<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">===</span> <span style="color: #009900; font-weight: bold;">FALSE</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$$value</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'std'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$$value</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> get_option<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://paulcracknell.net/419/notice-undefined-index-id-in/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Debug your WordPress Theme</title>
		<link>http://paulcracknell.net/415/debug-your-wordpress-theme/</link>
		<comments>http://paulcracknell.net/415/debug-your-wordpress-theme/#comments</comments>
		<pubDate>Thu, 13 Jan 2011 06:35:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Theme Options]]></category>
		<category><![CDATA[Wordpress Developer]]></category>
		<category><![CDATA[errors]]></category>
		<category><![CDATA[theme option]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.paulcracknell.net/?p=415</guid>
		<description><![CDATA[So you have finished your WordPress theme and now you want to check that everything that you have done is right.  Debugging the php is just one of the steps that you should take to check that your theme is ready to unleash on the world.  It is very simple to activate the de-bugging feature [...]]]></description>
				<content:encoded><![CDATA[<p>So you have finished your WordPress theme and now you want to check that everything that you have done is right.  Debugging the php is just one of the steps that you should take to check that your theme is ready to unleash on the world.  It is very simple to activate the de-bugging feature for WordPress. In the root directory of your theme find wp-config.php.  Open the file and locate this code.</p>
<p><code>/**<br />
* For developers: WordPress debugging mode.<br />
*<br />
* Change this to true to enable the display of notices during development.<br />
* It is strongly recommended that plugin and theme developers use WP_DEBUG<br />
* in their development environments.<br />
*/<br />
define('WP_DEBUG', false);</code></p>
<p>See it even tells you that this is for debugging.  As advised make sure that plugin&#8217;s are deactivated.   Change <strong>false </strong>to <strong>true </strong>and save the file. Upload it to the theme and any errors will be displayed where the errors are detected.  When you are finished and before you publish your theme turn the debug off.</p>
<p>It is also good practice to check your html (xhtml) and css with a validator service, these can be located at  <a href="http://validator.w3.org/">http://validator.w3.org/</a> or<a href="http://jigsaw.w3.org/css-validator/">http://jigsaw.w3.org/css-validator/</a> respectively.</p>
]]></content:encoded>
			<wfw:commentRss>http://paulcracknell.net/415/debug-your-wordpress-theme/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
