<?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>WP Engineer &#187; download</title>
	<atom:link href="http://wpengineer.com/tag/download/feed/" rel="self" type="application/rss+xml" />
	<link>http://wpengineer.com</link>
	<description>WordPress News, Hacks, Tips, Tutorials, Plugins and Themes</description>
	<lastBuildDate>Sun, 22 Jan 2012 13:32:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>WPlize &#8211; A Class For Options In WordPress</title>
		<link>http://wpengineer.com/204/wplize-a-class-for-options-in-wordpress/</link>
		<comments>http://wpengineer.com/204/wplize-a-class-for-options-in-wordpress/#comments</comments>
		<pubDate>Tue, 07 Oct 2008 06:40:29 +0000</pubDate>
		<dc:creator>Frank</dc:creator>
				<category><![CDATA[WordPress Hacks]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[Plugin]]></category>

		<guid isPermaLink="false">http://wpengineer.com/?p=204</guid>
		<description><![CDATA[So what is WPlize and what is it for? WPlize is a class, which access the options table of WordPress and makes it easier to create, edit, get and delete preferences of a Plugin or theme in the options table of WordPress. Using this class improves the performances and create a clean code in Plugins [...]]]></description>
			<content:encoded><![CDATA[<p>So what is <strong>WPlize</strong> and what is it for?</p>
<p><strong>WPlize</strong> is a class,  which access the <code>options</code> table of WordPress and makes it easier to <strong>create</strong>, <strong>edit</strong>, <strong>get</strong> and <strong>delete</strong> preferences of a Plugin or theme in the <code>options</code> table of WordPress. Using this class improves the performances and create a clean code in Plugins and themes. Only one entry will be created for each Plugin or theme, an array creates and manages the entries.<br />
<span id="more-204"></span><br />
Many Plugins creating quite a lot data, for example the popular contact Plugin <a href="http://wordpress.org/extend/plugins/cforms/">cforms</a> creates 60 entries, which worsen the performance.<br />
But that's not necessary, WordPress supports the use of arrays. Also single entries having a better performance by using an internal caching, even though it's not as good as using an array for many entries instead many entries in the database.</p>
<p>I use this solution for quite a long time already and created for this new functions in my Plugins. I didn't implement this in older Plugins yet, but if I have time I will make the changes in older Plugins too.</p>
<p>In collaboration with <a href="http://www.ebiene.de/">Sergej Müller</a> (known for his Plugin <a href="http://www.wpseo.de/">wpSEO</a>), after I recommend this variant, Sergej created an own class, which makes it even easier with less code to integrate.</p>
<p>First we thought to create a Plugin, which has access to other Plugins. But since we didn't think it is worth it because of lack of popularity, we just thought to offer the class here.</p>
<p>This class enables a simplyfied and better performed access for Plugin and theme authors. Functions like <code>add_option</code>, <code>delete_option</code>, <code>get_option</code> and <code>update_option</code> are also getting used in the functions of this class.</p>
<h3>Which possibilities has the class to offer and how can you implement them?</h3>
<p>Save the file in a sub folder of your theme or Plugin and integrate via PHP.</p>
<pre lang="php">if ( !class_exists(&#039;WPlize&#039;) ) {
	require_once(&#039;inc/WPlize.php&#039;);
}</pre>
<p>The following Syntax explains more in detail.<br />
The download file includes also a <em>readme</em>-file with some examples.</p>
<ul>
<li><strong>Initializing Multi-Option</strong>
<pre lang="php">$WPlize = new WPlize(
                     &#039;my_plugin&#039;,
                     array(
                          &#039;my_key&#039;   =&gt; &#039;my_value&#039;,
                          &#039;your_key&#039; =&gt; &#039;your_value&#039;
                          )
                    );</pre>
</li>
<li><strong>Updating option [Variant 1]</strong>
<pre lang="php">$WPlize-&gt;update_option(&#039;my_key&#039;, &#039;simple_value&#039;);</pre>
</li>
<li><strong>Updating option [Variant 2]</strong>
<pre lang="php">$WPlize-&gt;update_option(
                       array(
                             &#039;my_key&#039;   =&gt; &#039;my_value&#039;,
                             &#039;your_key&#039; =&gt; &#039;simple_value&#039;
                            )
                      );</pre>
</li>
<li><strong>Get option</strong>
<pre lang="php">$WPlize-&gt;get_option(&#039;your_key&#039;);</pre>
</li>
<li><strong>Delete Multi-Option</strong>
<pre lang="php">$WPlize-&gt;delete_option();</pre>
</li>
</ul>
<h3>Download:</h3>
<p>Please read the updatenotice an the <a href="http://bueltge.de/wplize-klasse-fuer-optionen-in-wordpress/778/#historie">download-site</a>.<br />
Download as zip-file, incl. readme: <a href="http://bueltge.de/wp-content/download/wp/class_WPlize.zip">class_WPlize.zip</a> - 3 kByte<br />
<hr /><a href="http://wpplugins.com/plugin/281/snippets" title="More informations about this plugin for WordPress"><img src="http://wpengineer.com/wp-content/themes/wpe-3/images/snippets-125-125.png" height="90" alt="WordPress Snippet Plugin" /></a> <a href="http://xtreme-theme.com"><img src="http://wpengineer.com/wp-content/uploads/feed-banner-2.jpg" alt="Xtreme One WordPress Framework"/></a><br />
&copy; <a href="http://wpengineer.com/">WP Engineer Team</a>, All rights reserved <small>(Digital Fingerprint: WPEngineer-be0254ce2b4972feb4b9cb72034a092d)</small></p>
]]></content:encoded>
			<wfw:commentRss>http://wpengineer.com/204/wplize-a-class-for-options-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>

