<?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; WordPress Tutorials</title>
	<atom:link href="http://wpengineer.com/category/wordpress-tutorials/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>Best Practice for Multilanguage WordPress Content? New Plugin!</title>
		<link>http://wpengineer.com/2389/best-practice-for-multilanguage-wordpress-content-new-plugin/</link>
		<comments>http://wpengineer.com/2389/best-practice-for-multilanguage-wordpress-content-new-plugin/#comments</comments>
		<pubDate>Sat, 24 Dec 2011 07:00:20 +0000</pubDate>
		<dc:creator>Frank</dc:creator>
				<category><![CDATA[WordPress Tutorials]]></category>
		<category><![CDATA[Advent Calendar]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[language]]></category>
		<category><![CDATA[language plugin]]></category>
		<category><![CDATA[Multilanguage]]></category>
		<category><![CDATA[multilnual]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress Plugins]]></category>
		<category><![CDATA[WP]]></category>

		<guid isPermaLink="false">http://wpengineer.com/?p=2389</guid>
		<description><![CDATA[Since the beginning of WordPress the desire to publish the content in different languages is huge. But the topic can quickly become complex, because not only the rendering of content in the form of text in different languages ​​is an issue, we also have to take care of the meta data for content, for images [...]]]></description>
			<content:encoded><![CDATA[<p>Since the beginning of WordPress the desire to publish the content in different languages is huge. But the topic can quickly become complex, because not only the rendering of content in the form of text in different languages ​​is an issue, we also have to take care of the meta data for content, for images that can be different depending on the language and the use of the admin interface in the preferred language. Thus, only a part would be covered depending on the requirements (<a href="http://wordpress.stackexchange.com/questions/1552/best-practices-for-localizing-wordpress-content">a example on StackExchange</a>) it would quickly become an project and WordPress would be just a "small" framework behind it. There are already many <a href="http://codex.wordpress.org/Multilingual_WordPress">Plugins available</a>, the different approaches - new tables in the system or separation of content for each language in a table entry to post, or other solutions.</p>
<p>All these solutions have their limitations, are inflexible and you go into a dependency that will be hard to get out and with each update of WordPress you have to check if the Plugin is still working or has any bugs with the new version. Therefore, I would suggest a solution that we use in our <a title="Inpsyde photo" href="http://inpsyde.com">Inpsyde Team</a> frequently for customers and maintained their strength in the flexibility, in extensibility and in its capacity to use the WordPress standard without changing the core or anything else. You can deactivate the Plugin at any time, you won't lose anything, your website remains the same.</p>
<p><span id="more-2389"></span><br />
<img class="aligncenter size-medium wp-image-2390" title="banner-772x250" src="http://wpengineer.com/wp-content/uploads/banner-772x250-300x97.png" alt="" width="300" height="97" /></p>
<h3>Why multilanuage?</h3>
<ul>
<li>2/3, if not even more, of the worldwide population speak another language</li>
<li>Globale Aufstellung von Unternehmen</li>
<li>Better distribution of content</li>
<li>Service for the client</li>
<li>Search Engine Optimization</li>
</ul>
<h3>The solution</h3>
<p>WordPress Multi-site provides the solution already.<br />
This makes the management of different instances, with similarities and differences, with the help of an installation possible. The exchange of data is possible via core functions, which get united and simplified via Plugin.</p>
<h3>Advantages</h3>
<ul>
<li>WordPress Core Functions</li>
<li>No dependency to Plugins</li>
<li>Independent to WordPress development*</li>
<li>Control Themes, Plugins at a central place, use them decentralized</li>
<li>Low maintenance</li>
<li>Seperating languages in Backend/Frontend (user dependent)</li>
<li>Complete mirrored or in every content form seperated</li>
<li>Subdomains or Subdirectories</li>
<li>de.example.com, example.com/de</li>
<li>Seperate Domains via Domainmapping</li>
<li>example.de, example.com</li>
<li>Free in development in design and usability</li>
<li>Optimization not only on frontend, also lang-attributes, SEO</li>
</ul>
<h3>Plugin</h3>
<p>With all these requirements and benefits, we use a base that is available as a Plugin in the official repository of WordPress: <a href="http://wordpress.org/extend/plugins/multilingual-press/"> Multilingual Press </a>. The plugin provides several convenient tools to use Multisite for the implementation of multilingualism.</p>
<p>
<a href='http://wpengineer.com/2389/best-practice-for-multilanguage-wordpress-content-new-plugin/banner-772x250/' title='banner-772x250'><img width="150" height="150" src="http://wpengineer.com/wp-content/uploads/banner-772x250-150x150.png" class="attachment-thumbnail" alt="banner-772x250" title="banner-772x250" /></a>
<a href='http://wpengineer.com/2389/best-practice-for-multilanguage-wordpress-content-new-plugin/screenshot-1-3/' title='screenshot-1'><img width="150" height="150" src="http://wpengineer.com/wp-content/uploads/screenshot-12-150x150.png" class="attachment-thumbnail" alt="screenshot-1" title="screenshot-1" /></a>
<a href='http://wpengineer.com/2389/best-practice-for-multilanguage-wordpress-content-new-plugin/screenshot-2-3/' title='screenshot-2'><img width="150" height="150" src="http://wpengineer.com/wp-content/uploads/screenshot-22-150x150.png" class="attachment-thumbnail" alt="screenshot-2" title="screenshot-2" /></a>
<a href='http://wpengineer.com/2389/best-practice-for-multilanguage-wordpress-content-new-plugin/screenshot-3/' title='screenshot-3'><img width="150" height="150" src="http://wpengineer.com/wp-content/uploads/screenshot-3-150x150.png" class="attachment-thumbnail" alt="screenshot-3" title="screenshot-3" /></a>
<a href='http://wpengineer.com/2389/best-practice-for-multilanguage-wordpress-content-new-plugin/screenshot-4/' title='screenshot-4'><img width="150" height="150" src="http://wpengineer.com/wp-content/uploads/screenshot-4-150x150.png" class="attachment-thumbnail" alt="screenshot-4" title="screenshot-4" /></a>
<a href='http://wpengineer.com/2389/best-practice-for-multilanguage-wordpress-content-new-plugin/wordpress-christmas-2010-24-2/' title='WordPress-Christmas-2010-24'><img width="150" height="150" src="http://wpengineer.com/wp-content/uploads/WordPress-Christmas-2010-241-150x150.jpg" class="attachment-thumbnail" alt="WordPress-Christmas-2010-24" title="WordPress-Christmas-2010-24" /></a>
</p>
<p>This plugin simplifies the identification of different blogs in the network to a language and linking to other blogs, so that when you publish the content in blog A, it will create a post as draft in blog B. Thus, the articles are in relation, the system knows this and with the help of some functions, it may be used in the frontend and backend.<br />
The Plugin provides in the article or page the ability to see a meta box with the content of the linked data, in the simplest case as a translation aid. Similarly, there is a widget that simplifies the frontend to change. In each blog you can be make ​​some adjustments, assigning a flag and language.</p>
<h3>An outlook</h3>
<p>We are in the midst of the development, which adds the extra help. For example a dashboard widget with the overview of article and all links, an extension of the mediathek to seperate global content across all blogs and independent content per blog. Similarly, there are helpers for updating existing installations. In addition there is the possibility to directly load the language in the backend, without the need of FTP/SSH and assign the languages accordingly​​. We will also add the function to copy existing blogs with all the content and options if you want to.</p>
<h3>Summary</h3>
<p>WordPress Multisite provides the basis and with some adjustments, a clean, controlled solution exists for the use of WordPress in a multilingual environment. Now it's up to you - use Multisite, Test the Plugin and give us a feedback, preferable on <a href="https://github.com/inpsyde/multilingual-press">our repo on Github</a>.</h3>
<p>.</p>
<p>This was our last door of our Advent Calendar. We hope you enjoyed it! </p>
<p>We wish you a Merry Christmas and thanks a lot for reading our posts!<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/2389/best-practice-for-multilanguage-wordpress-content-new-plugin/feed/</wfw:commentRss>
		<slash:comments>26</slash:comments>
		</item>
		<item>
		<title>Separate Logic From Output</title>
		<link>http://wpengineer.com/2355/separate-logic-from-output/</link>
		<comments>http://wpengineer.com/2355/separate-logic-from-output/#comments</comments>
		<pubDate>Fri, 23 Dec 2011 06:58:57 +0000</pubDate>
		<dc:creator>Frank</dc:creator>
				<category><![CDATA[WordPress Tutorials]]></category>
		<category><![CDATA[Advent Calendar]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WP]]></category>

		<guid isPermaLink="false">http://wpengineer.com/?p=2355</guid>
		<description><![CDATA[Once HTML is defined within a function for output, the HTML will be separated from the logic! In this case the function is defined twice. A function contains only logic and values ​​are returned only as return. The second function will contain HTML, test logic, loops or hooks and outputs values ​​as echo. Ok, the [...]]]></description>
			<content:encoded><![CDATA[<p>Once HTML is defined within a function for output, the HTML will be separated from the logic! In this case the function is defined twice. A function contains only logic and values ​​are returned only as return. The second function will contain HTML, test logic, loops or hooks and outputs values ​​as echo. Ok, the smart asses will say <a href="http://de.wikipedia.org/wiki/Model_View_Controller">MVC</a>, yeah you right, but WordPress does not pursue a Consistent MVC pattern!</p>
<p><span id="more-2355"></span></p>
<h4>Why WordPress doesn't follow MVC pattern consistently?</h4>
<p>If we have a close look on WordPress, we can detect an MVC pattern. By separating the Themes (view) from the core (model) it gives the impression WordPress pursues an MVC pattern. But this patternn is found only in the frontend. Let's take a closer look and we see that there is no such logic for the admin area. So, the view for the admin area has to be anchored somewhere in the core. We can also notice that in the core itself are lose SQL queries within PHP. Well, a general separation of view and logic is not equal MVC. An MVC-Pattern is principally composed of a sort of object-oriented programming paradigm, in WordPress, these can also be found occasionally, but we find much more procedural than object-oriented programming paradigms. Conclusion WordPress itself does not pursue a MVC pattern, but it is quite possible MVC principles, as we used in the following.</p>
<pre>
function get_some_foo() {
	$my_foo = &#039;This is Foo!&#039;;
	return $my_foo;
}

function some_foo() {
	$foo = get_some_foo();
	echo $foo;
}
</pre>
<p>Why is this useful? We want the function <code>some_foo()</code> returns a predefined output. In another template we want to change the default behavior of the function <code>some_foo()</code>. In order to effectively reflect both requirements, two functions are defined. The first function consists only the elementary logic and is only returned as return values​​, it is always preceded by a <code>get_...</code>. The second function includes predefined information, which in turn can be HTML, test logic, loops, or a hook.</p>
<pre>
function get_some_foo() {
	$foo_bar_array = array( &#039;Foo&#039;, &#039;Bar&#039;, &#039;FooBar&#039;, &#039;BarFoo&#039; );
	$foo_bar_array = apply_filters( &#039;some_foo_array&#039;, $foo_bar_array );

	return $foo_bar_array ;
}

function some_foo() {
    $foo_list = &#039;&lt;ul&gt;&#039;; 

    foreach( get_some_foo() as $foo_key =&gt; $foo_value ){
		$foo_list .= &#039;&lt;li&gt;&#039; . $foo_value . &#039;&lt;/li&gt;&#039;;
    }

    $foo_list .= &#039;&lt;/ul&gt;&#039;;

    echo apply_filters( &#039;some_foo&#039;, $foo_list );
}
</pre>
<p>In the previous example in each of the two functions with the function <a href="http://codex.wordpress.org/Function_Reference/apply_filter"> <code>apply_filters()</code></a> the possibility will be created, to change returned values later as you desired. A manipulation can take place via the so-defined hooks <code>some_foo_array</code> or <code>some_foo</code>. Here is an example of how a possible manipulation can look with the two defined hooks.</p>
<p>In the next code example, we change an array <code>$foo_bar_array</code> and the HTML output. This involves the two hooks <code>some_foo_array</code> and <code>some_foo</code>, which were set with <code>apply_filters('some_foo' ...</code>. With the function <a href="http://codex.wordpress.org/Function_Reference/add_filter"><code>add_filter()</code></a> filter functions for further processing in the global variable <code>$wp_filter</code> will be registered.</p>
<pre>
function get_my_some_foo( $foo_bar_array ) {
	$foo_bar_array&#091; count( $foo_bar_array ) + 1 &#093; = &#039;FuuBoo&#039;;

	return $foo_bar_array ;
}

function my_some_foo( $foo_list ) {
    $foo_list = str_replace( &#039;ul&#039;, &#039;ol&#039;, $foo_list ); 

    return $foo_list;
}

add_filter( &#039;some_foo_array&#039;, &#039;get_my_some_foo&#039;);
add_filter( &#039;some_foo&#039;, &#039;my_some_foo&#039;);

// do not forget, call some_foo()
some_foo();
</pre>
<p>Let's look briefly what's happening. What outputs <code>some_foo()</code> has without manipulation we see in the following example.</p>
<pre>
function get_some_foo() {
	$foo_bar_array = array( &#039;Foo&#039;, &#039;Bar&#039;, &#039;FooBar&#039;, &#039;BarFoo&#039; );
	$foo_bar_array = apply_filters( &#039;some_foo_array&#039;, $foo_bar_array );

	return $foo_bar_array ;
}

function some_foo() {
    $foo_list = &#039;&lt;ul&gt;&#039;; 

    foreach(get_some_foo() as $foo_key =&gt; $foo_value){
		$foo_list .= &#039;&lt;li&gt;&#039; . $foo_value . &#039;&lt;/li&gt;&#039;;
    }

    $foo_list .= &#039;&lt;/ul&gt;&#039;;

    echo apply_filters( &#039;some_foo&#039;, $foo_list );
}
?&gt; 

// output
&lt;ul&gt;
	&lt;li&gt;Foo&lt;/li&gt;
	&lt;li&gt;Bar&lt;/li&gt;
	&lt;li&gt;FooBar&lt;/li&gt;
	&lt;li&gt;BarFoo&lt;/li&gt;
&lt;/ul&gt;
</pre>
<p>In the next example we use the functions defined in the hooks <code>some_foo_array</code> and <code>some_foo</code> to add the array another element to make the unordered list, an ordered list.</p>
<pre>
function get_my_some_foo( $foo_bar_array ) {
	$foo_bar_array&#091; count( $foo_bar_array ) + 1 &#093; = &#039;FuuBoo&#039;;

	return $foo_bar_array ;
}

function my_some_foo( $foo_list ) {
    $foo_list = str_replace( &#039;ul&#039;, &#039;ol&#039;, $foo_list ); 

    return $foo_list;
}

// register Hooks in the stack ($wp_filter)
add_filter( &#039;some_foo_array&#039;, &#039;get_my_some_foo&#039;);
add_filter( &#039;some_foo&#039;, &#039;my_some_foo&#039;);
?&gt;

//output
&lt;ol&gt;
	&lt;li&gt;Foo&lt;/li&gt;
	&lt;li&gt;Bar&lt;/li&gt;
	&lt;li&gt;FooBar&lt;/li&gt;
	&lt;li&gt;BarFoo&lt;/li&gt;
	&lt;li&gt;FuuBoo&lt;/li&gt;
&lt;/ol&gt;
</pre>
<p>How does <code>add_filter</code> and <code>apply_filters</code> work in the program flow?<br />
Each hook which should be executed is registered with <code>add_filter</code> or <code>add_action</code> in the global variable <code>$wp_filter</code>. If the function <code>apply_filters()</code> is called, an appropriate filter function based on the transmitted variables will be searched in the <code>$wp_filter</code>, if this is registered with <code>add_filter</code>, the appropriate function will execute. Now values will be manipulated now and then passed back to <code>apply_filters</code>.</p>
<p>Let's take our example from above, it looks like this.</p>
<pre>
&lt;?php
// the default function
function get_some_foo() {
	$foo_bar_array = array( &#039;Foo&#039;, &#039;Bar&#039;, &#039;FooBar&#039;, &#039;BarFoo&#039; );
	$foo_bar_array = apply_filters( &#039;some_foo_array&#039;, $foo_bar_array );

	return $foo_bar_array ;
}

// the filter function
function get_my_some_foo( $foo_bar_array ) {
	$foo_bar_array&#091; count( $foo_bar_array ) + 1 &#093; = &#039;FuuBoo&#039;;

	return $foo_bar_array ;
}

// register function in $wp_filter
add_filter( &#039;some_foo_array&#039;, &#039;get_my_some_foo&#039; );
?&gt;
</pre>
<p>Without hook functionality the whole thing would look like the following. Although we have much less code, but this is not reusable.</p>
<pre>
&lt;?php
//Das ist unsere default Funktion
function get_some_foo() {
	$foo_bar_array = array( &#039;Foo&#039;, &#039;Bar&#039;, &#039;FooBar&#039;, &#039;BarFoo&#039; );
	$foo_bar_array&#091; count( $foo_bar_array ) + 1 &#093; = &#039;FuuBoo&#039;;

	return $foo_bar_array ;
}
?&gt;
</pre>
<div class="incontent">
<h4>Guest Post</h4>
<p><img src="http://wpengineer.com/wp-content/uploads/rene-reimann-150x150.jpg" alt="Rene Reimann Avatar" title="Rene Reimann" width="150" height="150" class="alignleft size-thumbnail wp-image-2356" /><a href="http://www.rene-reimann.de/" title="rene-reimann.de">René</a> lives in Halle at Saale, he is married, has a daughter (8) and a dog (12). He is a professional media designer for digital and print media, with a flair for design and color combinations. He is a creative WordPress developer, designer and media consultant who always has a suitable solution. <a href="https://plus.google.com/u/0/116520935691953756105/posts" title="Is G+ profile"> René </a> is an instructor and member of the Examination Board of the Chamber of Halle/Dessau for the education of media designer for digital and print media.
</div>
<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/2355/separate-logic-from-output/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WordPress constants overview</title>
		<link>http://wpengineer.com/2382/wordpress-constants-overview/</link>
		<comments>http://wpengineer.com/2382/wordpress-constants-overview/#comments</comments>
		<pubDate>Tue, 20 Dec 2011 07:12:10 +0000</pubDate>
		<dc:creator>Frank</dc:creator>
				<category><![CDATA[WordPress Tutorials]]></category>

		<guid isPermaLink="false">http://wpengineer.com/?p=2382</guid>
		<description><![CDATA[In the backend of WordPress you don't have an input field for each possible modification. Some are only available via an action or a filter and for some changes you need to define or change a PHP constant. In this article I have listed all constants which WordPress has by nature (except the deprecated ones). [...]]]></description>
			<content:encoded><![CDATA[<p>In the backend of WordPress you don't have an input field for each possible modification. Some are only available via an action or a filter and for some changes you need to define or change a PHP constant.<br />
In this article I have listed all constants which WordPress has by nature (except the deprecated ones).<br />
<span id="more-2382"></span></p>
<blockquote><p>
	A constant is an identifier (name) for a simple value. As the name suggests, that value cannot change during the execution of the script. A constant is case-sensitive by default. By convention, constant identifiers are always uppercase.<br />
	<cite><a href="http://php.net/manual/en/language.constants.php">PHP docs</a></cite></li>
</blockquote>
<h5>Content</h5>
<ul>
<li><a href="#general">General</a></li>
<li><a href="#status">Status</a></li>
<li><a href="#paths">Paths, dirs and links</a></li>
<li><a href="#database">Database</a></li>
<li><a href="#multisite">Multisite</a></li>
<li><a href="#cache">Cache and script compressing</a></li>
<li><a href="#filesystem">Filesystem and connections</a></li>
<li><a href="#themes">Themes</a></li>
<li><a href="#debug">Debug</a></li>
<li><a href="#security">Security and cookies</a></li>
</ul>
<h3 id="general">General</h3>
<ul>
<li id="AUTOSAVE_INTERVAL"><code class="constant">AUTOSAVE_INTERVAL</code> <a href="#AUTOSAVE_INTERVAL">#</a><br />
Defines an interval, in which WordPress should do an autosave.<br />
Value: <code class="int"><em>time in seconds</em></code> (Default: <code class="int">60</code>)</li>
<li id="CORE_UPGRADE_SKIP_NEW_BUNDLED"><code class="constant">CORE_UPGRADE_SKIP_NEW_BUNDLED</code> <a href="#CORE_UPGRADE_SKIP_NEW_BUNDLED">#</a><br />
Allows you to skip new bundles files like plugins and/or themes on upgrades.<br />
Values: <code class="bool">true</code>|<code class="bool">false</code></li>
<li id="DISABLE_WP_CRON"><code class="constant">DISABLE_WP_CRON</code> <a href="#DISABLE_WP_CRON">#</a><br />
Deactivates the cron function of WordPress.<br />
Value: <code class="bool">true</code></li>
<li id="EMPTY_TRASH_DAYS"><code class="constant">EMPTY_TRASH_DAYS</code> <a href="#EMPTY_TRASH_DAYS">#</a><br />
Controls the number of days before WordPress permanently deletes posts, pages, attachments, and comments, from the trash bin.<br />
Value: <code class="int"><em>time in days</em></code> (Default: <code class="int">30</code>)</li>
<li id="IMAGE_EDIT_OVERWRITE"><code class="constant">IMAGE_EDIT_OVERWRITE</code> <a href="#IMAGE_EDIT_OVERWRITE">#</a><br />
Allows WordPress to override an image after editing or to save the image as a copy.<br />
Values: <code class="bool">true</code>|<code class="bool">false</code></li>
<li id="MEDIA_TRASH"><code class="constant">MEDIA_TRASH</code> <a href="#MEDIA_TRASH">#</a><br />
(De)activates the trash bin function for media.<br />
Values: <code class="bool">true</code>|<code class="bool">false</code> (Default: <code class="bool">false</code>)</li>
<li id="WPLANG"><code class="constant">WPLANG</code> <a href="#WPLANG">#</a><br />
Defines the language which WordPress should use.<br />
Values: For German <code class="string">de_DE</code></li>
<li id="WP_DEFAULT_THEME"><code class="constant">WP_DEFAULT_THEME</code> <a href="#WP_DEFAULT_THEME">#</a><br />
Defines a default theme for new sites, also used as fallback for a broken theme.<br />
Value: <code class="string"><em>template name</em></code> (Default: <code class="string">twentyeleven</code>)</li>
<li id="WP_CRON_LOCK_TIMEOUT"><code class="constant">WP_CRON_LOCK_TIMEOUT</code> <a href="#WP_CRON_LOCK_TIMEOUT">#</a><br />
Defines a period of time in which only one cronjob will be fired. <a href="http://core.trac.wordpress.org/ticket/17462" title="Trac Ticket">Since WordPress 3.3</a>.<br />
Value: <code class="int"><em>time in seconds</em></code> (Default: <code class="int">60</code>)</li>
<li id="WP_MAIL_INTERVAL"><code class="constant">WP_MAIL_INTERVAL</code> <a href="#WP_MAIL_INTERVAL">#</a><br />
Defines a period of time in which only one mail request can be done.<br />
Value: <code class="int"><em>time in seconds</em></code> (Default: <code class="int">300</code>)</li>
<li id="WP_POST_REVISIONS"><code class="constant">WP_POST_REVISIONS</code> <a href="#WP_POST_REVISIONS">#</a><br />
(De)activates the revision function for posts. A number greater than 0 defines the number of revisions for one post.<br />
Values: <code class="bool">true</code>|<code class="bool">false</code>|<code class="int"><em>number</em></code> (Default: <code class="bool">true</code>)</li>
<li id="WP_MAX_MEMORY_LIMIT"><code class="constant">WP_MAX_MEMORY_LIMIT</code> <a href="#WP_MAX_MEMORY_LIMIT">#</a><br />
Allows you to change the maximum memory limit for some WordPress functions.<br />
Values: See <a href="http://php.net/manual/en/faq.using.php#faq.using.shorthandbytes">PHP docs</a> (Default: <code class="int">256M</code>)</li>
<li id="WP_MEMORY_LIMIT"><code class="constant">WP_MEMORY_LIMIT</code> <a href="#WP_MEMORY_LIMIT">#</a><br />
Defines the memory limit for WordPress.<br />
Values: See <a href="http://php.net/manual/en/faq.using.php#faq.using.shorthandbytes">PHP docs</a> (Default: <code class="int">32M</code>, for Multisite <code class="int">64M</code>)</li>
</ul>
<h3 id="status">Status</h3>
<ul>
<li id="APP_REQUEST"><code class="constant">APP_REQUEST</code> <a href="#APP_REQUEST">#</a><br />
Will be defined if it's an <em>Atom Publishing Protocol</em> request.<br />
Value: <code class="bool">true</code></li>
<li id="COMMENTS_TEMPLATE"><code class="constant">COMMENTS_TEMPLATE</code> <a href="#COMMENTS_TEMPLATE">#</a><br />
Will be defined if the comments template is loaded.<br />
Value: <code class="bool">true</code></li>
<li id="DOING_AJAX"><code class="constant">DOING_AJAX</code> <a href="#DOING_AJAX">#</a><br />
Will be defined if it's an <abbr title="Asynchronous JavaScript and XML">AJAX</abbr> request.<br />
Value: <code class="bool">true</code></li>
<li id="DOING_AUTOSAVE"><code class="constant">DOING_AUTOSAVE</code> <a href="#DOING_AUTOSAVE">#</a><br />
Will be defined if WordPress is doing an autosave for posts.<br />
Value: <code class="bool">true</code></li>
<li id="DOING_CRON"><code class="constant">DOING_CRON</code> <a href="#DOING_CRON">#</a><br />
Will be defined if WordPress is doing a cronjob.<br />
Value: <code class="bool">true</code></li>
<li id="IFRAME_REQUEST"><code class="constant">IFRAME_REQUEST</code> <a href="#IFRAME_REQUEST">#</a><br />
Will be defined if it's an <em>inlineframe</em> request.<br />
Value: <code class="bool">true</code></li>
<li id="IS_PROFILE_PAGE"><code class="constant">IS_PROFILE_PAGE</code> <a href="#IS_PROFILE_PAGE">#</a><br />
Will be defined if a user change his profile settings.<br />
Value: <code class="bool">true</code></li>
<li id="SHORTINIT"><code class="constant">SHORTINIT</code> <a href="#SHORTINIT">#</a><br />
Can be defined to load only the half of WordPress.<br />
Value: <code class="bool">true</code></li>
<li id="WP_ADMIN"><code class="constant">WP_ADMIN</code> <a href="#WP_ADMIN">#</a><br />
Will be defined if it's a request in backend of WordPress.<br />
Value: <code class="bool">true</code></li>
<li id="WP_BLOG_ADMIN"><code class="constant">WP_BLOG_ADMIN</code> <a href="#WP_BLOG_ADMIN">#</a><br />
Will be defined if it's a request in <code class="path">/wp-admin/</code>.<br />
Value: <code class="bool">true</code></li>
<li id="WP_IMPORTING"><code class="constant">WP_IMPORTING</code> <a href="#WP_IMPORTING">#</a><br />
Will be defined if WordPress is importing data.<br />
Value: <code class="bool">true</code></li>
<li id="WP_INSTALLING"><code class="constant">WP_INSTALLING</code> <a href="#WP_INSTALLING">#</a><br />
Will be defined on an new installation or on an upgrade.<br />
Value: <code class="bool">true</code></li>
<li id="#WP_INSTALLING_NETWORK"><code class="constant">#WP_INSTALLING_NETWORK</code> <a href="#WP_INSTALLING_NETWORK">#</a><br />
Will be defined if it's a request in network admin or on installing a network. <a href="http://core.trac.wordpress.org/ticket/12028" title="Trac Ticket">Since WordPress 3.3</a>, previous</strong> <code class="constant">WP_NETWORK_ADMIN_PAGE</code>.<br />
Value: <code class="bool">true</code></li>
<li id="WP_LOAD_IMPORTERS"><code class="constant">WP_LOAD_IMPORTERS</code> <a href="#WP_LOAD_IMPORTERS">#</a><br />
Will be defined if you visit the importer overview (Tools &#8594; Importer).<br />
Value: <code class="bool">true</code></li>
<li id="WP_NETWORK_ADMIN"><code class="constant">WP_NETWORK_ADMIN</code> <a href="#WP_NETWORK_ADMIN">#</a><br />
Will be defined if it's a request in <code class="path">/wp-admin/network/</code>.<br />
Value: <code class="bool">true</code></li>
<li id="WP_REPAIRING"><code class="constant">WP_REPAIRING</code> <a href="#WP_REPAIRING">#</a><br />
Will be defined if it's a request to <code class="path">/wp-admin/maint/repair.php</code>.<br />
Value: <code class="bool">true</code></li>
<li id="WP_SETUP_CONFIG"><code class="constant">WP_SETUP_CONFIG</code> <a href="#WP_SETUP_CONFIG">#</a><br />
Will be defined if WordPress will be installed or configured.<br />
Value: <code class="bool">true</code></li>
<li id="WP_UNINSTALL_PLUGIN"><code class="constant">WP_UNINSTALL_PLUGIN</code> <a href="#WP_UNINSTALL_PLUGIN">#</a><br />
Will be defined if a plugin wil be uninstalled (for <code class="path">uninstall.php</code>).<br />
Value: <code class="bool">true</code></li>
<li id="WP_USER_ADMIN"><code class="constant">WP_USER_ADMIN</code> <a href="#WP_USER_ADMIN">#</a><br />
Will be defined if it's a request in <code class="path">/wp-admin/user/</code>.<br />
Value: <code class="bool">true</code></li>
<li id="XMLRPC_REQUEST"><code class="constant">XMLRPC_REQUEST</code> <a href="#XMLRPC_REQUEST">#</a><br />
Will be defined if it's a request over the <abbr title="Extensible Markup Language Remote Procedure Call">XML-RPC</abbr> API.<br />
Value: <code class="bool">true</code></li>
</ul>
<h3 id="paths">Paths, dirs and links</h3>
<ul>
<li id="ABSPATH"><code class="constant">ABSPATH</code> <a href="#ABSPATH">#</a><br />
Absolute path to the WordPress root dir.<br />
Default: <code class="string"><em>path to wp-load.php</em></code></li>
<li id="WPINC"><code class="constant">WPINC</code> <a href="#WPINC">#</a><br />
Relative path to the <code class="path">/wp-includes/</code>. <strong>You can't change it.</strong><br />
Default: <code class="string">wp-includes</code></li>
<li id="WP_LANG_DIR"><code class="constant">WP_LANG_DIR</code> <a href="#WP_LANG_DIR">#</a><br />
Absolute path to the folder with lanugage files.<br />
Default: <code class="constant">WP_CONTENT_DIR</code> <code class="string">/languages</code> or <code class="constant">WP_CONTENT_DIR</code> <code class="constant">WPINC</code> <code class="string">/languages</code></li>
<li id="WP_PLUGIN_DIR"><code class="constant">WP_PLUGIN_DIR</code> <a href="#WP_PLUGIN_DIR">#</a><br />
Absolute path to the plugins dir.<br />
Default: <code class="constant">WP_CONTENT_DIR</code> <code class="string">/plugins</code></li>
<li id="WP_PLUGIN_URL"><code class="constant">WP_PLUGIN_URL</code> <a href="#WP_PLUGIN_URL">#</a><br />
URL to the plugins dir.<br />
Default: <code class="constant">WP_CONTENT_URL</code> <code class="string">/plugins</code></li>
<li id="WP_CONTENT_DIR"><code class="constant">WP_CONTENT_DIR</code> <a href="#WP_CONTENT_DIR">#</a><br />
Absolute path to the<code class="path">wp-content</code> dir.<br />
Default: <code class="constant">ABSPATH</code> <code class="string">wp-content</code></li>
<li id="WP_CONTENT_URL"><code class="constant">WP_CONTENT_URL</code> <a href="#WP_CONTENT_URL">#</a><br />
URL to the <code class="path">wp-content</code> dir.<br />
Default: <code class="string"><em>{Site URL}</em>/wp-content</code></li>
<li id="WP_HOME"><code class="constant">WP_HOME</code> <a href="#WP_HOME">#</a><br />
Home URL of your WordPress.</li>
<li id="WP_SITEURL"><code class="constant">WP_SITEURL</code> <a href="#WP_SITEURL">#</a><br />
URL to the WordPress root dir.</li>
<li id="WP_TEMP_DIR"><code class="constant">WP_TEMP_DIR</code> <a href="#WP_TEMP_DIR">#</a><br />
Absolute path to a dir, where temporary files can be saved.</li>
<li id="WPMU_PLUGIN_DIR"><code class="constant">WPMU_PLUGIN_DIR</code> <a href="#WPMU_PLUGIN_DIR">#</a><br />
Absolute path to the must use plugin dir.<br />
Default: <code class="constant">WP_CONTENT_DIR</code> <code class="string">/mu-plugins</code></li>
<li id="WPMU_PLUGIN_URL"><code class="constant">WPMU_PLUGIN_URL</code> <a href="#WPMU_PLUGIN_URL">#</a><br />
URL to the must use plugin dir.<br />
Default: <code class="constant">WP_CONTENT_URL</code> <code class="string">/mu-plugins</code></li>
</ul>
<h3 id="database">Database</h3>
<ul>
<li id="DB_CHARSET"><code class="constant">DB_CHARSET</code> <a href="#DB_CHARSET">#</a><br />
Defines the database charset.<br />
Values: See <a href="http://dev.mysql.com/doc/refman/5.0/en/charset.html">MySQL docs</a> (Default: <code class="string">utf8</code>)</li>
<li id="DB_COLLATE"><code class="constant">DB_COLLATE</code> <a href="#DB_COLLATE">#</a><br />
Defines the database collation.<br />
Values: See <a href="http://dev.mysql.com/doc/refman/5.0/en/charset.html">MySQL docs</a> (Default: <code class="string">utf8_general_ci</code>)</li>
<li id="DB_HOST"><code class="constant">DB_HOST</code> <a href="#DB_HOST">#</a><br />
Defines the database host.<br />
Values: <code class="string"><em>IP address, domain and/or port</em></code> (Default: <code class="string">localhost</code>)</li>
<li id="DB_NAME"><code class="constant">DB_NAME</code> <a href="#DB_NAME">#</a><br />
Defines the database name.<br />
Value: <code class="string"><em>database name</em></code></li>
<li id="DB_PASSWORD"><code class="constant">DB_PASSWORD</code> <a href="#DB_PASSWORD">#</a><br />
Defines the database password.</li>
<li id="DB_USER"><code class="constant">DB_USER</code> <a href="#DB_USER">#</a><br />
Defines the database user.</li>
<li id="WP_ALLOW_REPAIR"><code class="constant">WP_ALLOW_REPAIR</code> <a href="#WP_ALLOW_REPAIR">#</a><br />
Allows you to automatically repair and optimize the database tables via <code class="path">/wp-admin/maint/repair.php</code>.<br />
Value: <code class="bool">true</code></li>
<li id="CUSTOM_USER_TABLE"><code class="constant">CUSTOM_USER_TABLE</code> <a href="#CUSTOM_USER_TABLE">#</a><br />
Allows you to define a custom user table.<br />
Value: <code class="string"><em>table name</em></code></li>
<li id="CUSTOM_USER_META_TABLE"><code class="constant">CUSTOM_USER_META_TABLE</code> <a href="#CUSTOM_USER_META_TABLE">#</a><br />
Allows you to define a custom user meta table.<br />
Value: <code class="string"><em>table name</em></code></li>
</ul>
<h3 id="multisite">Multisite</h3>
<ul>
<li id="ALLOW_SUBDIRECTORY_INSTALL"><code class="constant">ALLOW_SUBDIRECTORY_INSTALL</code> <a href="#ALLOW_SUBDIRECTORY_INSTALL">#</a><br />
Allows you to install Multisite in a subdirectory.<br />
Value: <code class="bool">true</code></li>
<li id="BLOGUPLOADDIR"><code class="constant">BLOGUPLOADDIR</code> <a href="#BLOGUPLOADDIR">#</a><br />
Absolute path to the site specific upload dir.<br />
Default: <code class="constant">WP_CONTENT_DIR</code> <code class="string">/blogs.dir/<em>{Blog ID}</em>/files/</code></li>
<li id="BLOG_ID_CURRENT_SITE"><code class="constant">BLOG_ID_CURRENT_SITE</code> <a href="#BLOG_ID_CURRENT_SITE">#</a><br />
Blog ID of the main site.<br />
Default: <code class="int">1</code></li>
<li id="DOMAIN_CURRENT_SITE"><code class="constant">DOMAIN_CURRENT_SITE</code> <a href="#DOMAIN_CURRENT_SITE">#</a><br />
Domain of the main site.<br />
Default: <code class="string"><em>domain</em></code></li>
<li id="DIEONDBERROR"><code class="constant">DIEONDBERROR</code> <a href="#DIEONDBERROR">#</a><br />
When defined database errors will be displayed on screen.<br />
Value: <code class="bool">true</code></li>
<li id="ERRORLOGFILE"><code class="constant">ERRORLOGFILE</code> <a href="#ERRORLOGFILE">#</a><br />
When defined database erros will be logged into a file.<br />
Value: <code class="string">absolute path to a writeable file</code></li>
<li id="MULTISITE"><code class="constant">MULTISITE</code> <a href="#MULTISITE">#</a><br />
Will be defined if Multisite is used.<br />
Value: <code class="bool">true</code></li>
<li id="NOBLOGREDIRECT"><code class="constant">NOBLOGREDIRECT</code> <a href="#NOBLOGREDIRECT">#</a><br />
Defines an URL of a site on which WordPress should redirect, if registration is closed or a site doesn't exists.<br />
Values: <code class="string">%siteurl%</code> for mainsite or <code class="string"><em>custom URL</em></code></li>
<li id="PATH_CURRENT_SITE"><code class="constant">PATH_CURRENT_SITE</code> <a href="#PATH_CURRENT_SITE">#</a><br />
Path to the main site.</li>
<li id="UPLOADBLOGSDIR"><code class="constant">UPLOADBLOGSDIR</code> <a href="#UPLOADBLOGSDIR">#</a><br />
Path to the upload base dir, relative to <code class="constant">ABSPATH</code>.<br />
Default: <code class="string">wp-content/blogs.dir</code></li>
<li id="SITE_ID_CURRENT_SITE"><code class="constant">SITE_ID_CURRENT_SITE</code> <a href="#SITE_ID_CURRENT_SITE">#</a><br />
Network ID of the main site.<br />
Default: <code class="int">1</code></li>
<li id="SUBDOMAIN_INSTALL"><code class="constant">SUBDOMAIN_INSTALL</code> <a href="#SUBDOMAIN_INSTALL">#</a><br />
Defines if it's a subdomain install or not.<br />
Values: <code class="bool">true</code>|<code class="bool">false</code></li>
<li id="SUNRISE"><code class="constant">SUNRISE</code> <a href="#SUNRISE">#</a><br />
When defined WordPres will load the <code class="path">/wp-content/sunrise.php</code> file.<br />
Value: <code class="bool">true</code></li>
<li id="UPLOADS"><code class="constant">UPLOADS</code> <a href="#UPLOADS">#</a><br />
Path to site specific upload dir, relative to <code class="constant">ABSPATH</code>.<br />
Default: <code class="constant">UPLOADBLOGSDIR</code> <code class="string">/<em>{blogid}</em>/files/</code></li>
<li id="WPMU_ACCEL_REDIRECT"><code class="constant">WPMU_ACCEL_REDIRECT</code> <a href="#WPMU_ACCEL_REDIRECT">#</a><br />
(De)activates support for <em>X-Sendfile Header</em>.<br />
Values: <code class="bool">true</code>|<code class="bool">false</code> (Default: <code class="bool">false</code>)</li>
<li id="WPMU_SENDFILE"><code class="constant">WPMU_SENDFILE</code> <a href="#WPMU_SENDFILE">#</a><br />
(De)activates support for <em>X-Accel-Redirect Header</em>.<br />
Values: <code class="bool">true</code>|<code class="bool">false</code> (Default: <code class="bool">false</code>)</li>
<li id="WP_ALLOW_MULTISITE"><code class="constant">WP_ALLOW_MULTISITE</code> <a href="#WP_ALLOW_MULTISITE">#</a><br />
When defined the multisite function will be accessible (Tools &#8594; Network Setup).<br />
Value: <code class="bool">true</code></li>
</ul>
<h3 id="cache">Cache and script compressing</h3>
<ul>
<li id="WP_CACHE"><code class="constant">WP_CACHE</code> <a href="#WP_CACHE">#</a><br />
When defined WordPres will load the <code class="path">/wp-content/advanced-cache.php</code> file.<br />
Values: <code class="bool">true</code>|<code class="bool">false</code> (Default: <code class="bool">false</code>)</li>
<li id="COMPRESS_CSS"><code class="constant">COMPRESS_CSS</code> <a href="#COMPRESS_CSS">#</a><br />
(De)activates the compressing of stylesheets.<br />
Values: <code class="bool">true</code>|<code class="bool">false</code></li>
<li id="COMPRESS_SCRIPTS"><code class="constant">COMPRESS_SCRIPTS</code> <a href="#COMPRESS_SCRIPTS">#</a><br />
(De)activates the compressing of Javascript files.<br />
Values: <code class="bool">true</code>|<code class="bool">false</code></li>
<li id="CONCATENATE_SCRIPTS"><code class="constant">CONCATENATE_SCRIPTS</code> <a href="#CONCATENATE_SCRIPTS">#</a><br />
(De)activates the consolidation of Javascript or CSS files before compressing.<br />
Values: <code class="bool">true</code>|<code class="bool">false</code></li>
<li id="ENFORCE_GZIP"><code class="constant">ENFORCE_GZIP</code> <a href="#ENFORCE_GZIP">#</a><br />
(De)activates gzip output.<br />
Values: <code class="bool">true</code>|<code class="bool">false</code></li>
</ul>
<h3 id="filesystem">Filesystem and connections</h3>
<ul>
<li id="FS_CHMOD_DIR"><code class="constant">FS_CHMOD_DIR</code> <a href="#FS_CHMOD_DIR">#</a><br />
Defines the read and write permissions for directories.<br />
Values: Siehe <a href="http://php.net/manual/de/function.chmod.php">PHP Handbuch</a> (Default: <code class="int">0755</code>)</li>
<li id="FS_CHMOD_FILE"><code class="constant">FS_CHMOD_FILE</code> <a href="#FS_CHMOD_FILE">#</a><br />
Defines the read and write permissions for files.<br />
Values: Siehe <a href="http://php.net/manual/de/function.chmod.php">PHP Handbuch</a> (Default: <code class="int">0644</code>)</li>
<li id="FS_CONNECT_TIMEOUT"><code class="constant">FS_CONNECT_TIMEOUT</code> <a href="#FS_CONNECT_TIMEOUT">#</a><br />
Defines a timeout for building a connection.<br />
Values: <code class="int"><em>time in seconds</em></code> (Default: <code class="int">30</code>)</li>
<li id="FS_METHOD"><code class="constant">FS_METHOD</code> <a href="#FS_METHOD">#</a><br />
Defines the method to connect to the filesystem.<br />
Values: <code class="string">direct</code>|<code class="string">ssh</code>|<code class="string">ftpext</code>|<code class="string">ftpsockets</code></li>
<li id="FS_TIMEOUT"><code class="constant">FS_TIMEOUT</code> <a href="#FS_TIMEOUT">#</a><br />
Defines a timeout after a connection has been lost.<br />
Values: <code class="int"><em>time in seconds</em></code> (Default: <code class="int">30</code>)</li>
<li id="FTP_BASE"><code class="constant">FTP_BASE</code> <a href="#FTP_BASE">#</a><br />
Path to the WordPress root dir.<br />
Default: <code class="constant">ABSPATH</code></li>
<li id="FTP_CONTENT_DIR"><code class="constant">FTP_CONTENT_DIR</code> <a href="#FTP_CONTENT_DIR">#</a><br />
Path to the <code class="path">/wp-content/</code> dir.<br />
Default: <code class="constant">WP_CONTENT_DIR</code></li>
<li id="FTP_HOST"><code class="constant">FTP_HOST</code> <a href="#FTP_HOST">#</a><br />
Defines the FTP host.<br />
Values: <code class="string">IP Adresse, Domain und/oder Port</code></li>
<li id="FTP_LANG_DIR"><code class="constant">FTP_LANG_DIR</code> <a href="#FTP_LANG_DIR">#</a><br />
Path to the folder with language files.<br />
Default: <code class="constant">WP_LANG_DIR</code></li>
<li id="FTP_PASS"><code class="constant">FTP_PASS</code> <a href="#FTP_PASS">#</a><br />
Defines the FTP password.</li>
<li id="FTP_PLUGIN_DIR"><code class="constant">FTP_PLUGIN_DIR</code> <a href="#FTP_PLUGIN_DIR">#</a><br />
Path to the plugin dir.<br />
Default: <code class="constant">WP_PLUGIN_DIR</code></li>
<li id="FTP_PRIKEY"><code class="constant">FTP_PRIKEY</code> <a href="#FTP_PRIKEY">#</a><br />
Defines a private key for <abbr title="Secure Shell">SSH</abbr>.</li>
<li id="FTP_PUBKEY"><code class="constant">FTP_PUBKEY</code> <a href="#FTP_PUBKEY">#</a><br />
Defines a public key for <abbr title="Secure Shell">SSH</abbr>.</li>
<li id="FTP_SSH"><code class="constant">FTP_SSH</code> <a href="#FTP_SSH">#</a><br />
(De)activates <abbr title="Secure Shell">SSH</abbr>.<br />
Values: <code class="bool">true</code>|<code class="bool">false</code></li>
<li id="FTP_SSL"><code class="constant">FTP_SSL</code> <a href="#FTP_SSL">#</a><br />
(De)activates <abbr title="Secure Sockets Layer">SSL</abbr>.<br />
Values: <code class="bool">true</code>|<code class="bool">false</code></li>
<li id="FTP_USER"><code class="constant">FTP_USER</code> <a href="#FTP_USER">#</a><br />
Defines the FTP username.</li>
<li id="WP_PROXY_BYPASS_HOSTS"><code class="constant">WP_PROXY_BYPASS_HOSTS</code> <a href="#WP_PROXY_BYPASS_HOSTS">#</a><br />
Allows you to define some adresses which shouldn't be passed through a proxy.<br />
Values: <code class="string">www.example.com, *.example.org</code></li>
<li id="WP_PROXY_HOST"><code class="constant">WP_PROXY_HOST</code> <a href="#WP_PROXY_HOST">#</a><br />
Defines the proxy adresse.<br />
Values: <code class="string"><em>IP address or domain</em></code></li>
</li>
<li id="WP_PROXY_PASSWORD"><code class="constant">WP_PROXY_PASSWORD</code> <a href="#WP_PROXY_PASSWORD">#</a><br />
Defines the proxy password.</li>
<li id="WP_PROXY_PORT"><code class="constant">WP_PROXY_PORT</code> <a href="#WP_PROXY_PORT">#</a><br />
Defines the proxy port.</li>
<li id="WP_PROXY_USERNAME"><code class="constant">WP_PROXY_USERNAME</code> <a href="#WP_PROXY_USERNAME">#</a><br />
Defines the proxy username.</li>
<li id="WP_HTTP_BLOCK_EXTERNAL"><code class="constant">WP_HTTP_BLOCK_EXTERNAL</code> <a href="#WP_HTTP_BLOCK_EXTERNAL">#</a><br />
Allows you to block external request.<br />
Values: <code class="bool">true</code>|<code class="bool">false</code></li>
<li id="WP_ACCESSIBLE_HOSTS"><code class="constant">WP_ACCESSIBLE_HOSTS</code> <a href="#WP_ACCESSIBLE_HOSTS">#</a><br />
If <code class="constant">WP_HTTP_BLOCK_EXTERNAL</code> is defined you can add hosts which shouldn't be blocked.<br />
Values: <code class="string">www.example.com, *.example.org</code></li>
</ul>
<h3 id="themes">Themes</h3>
<ul>
<li id="BACKGROUND_IMAGE"><code class="constant">BACKGROUND_IMAGE</code> <a href="#BACKGROUND_IMAGE">#</a><br />
Defines a default background image.</li>
<li id="HEADER_IMAGE"><code class="constant">HEADER_IMAGE</code> <a href="#HEADER_IMAGE">#</a><br />
Defines a default header image.</li>
<li id="HEADER_IMAGE_HEIGHT"><code class="constant">HEADER_IMAGE_HEIGHT</code> <a href="#HEADER_IMAGE_HEIGHT">#</a><br />
Defines the height of the header image.</li>
<li id="HEADER_IMAGE_WIDTH"><code class="constant">HEADER_IMAGE_WIDTH</code> <a href="#HEADER_IMAGE_WIDTH">#</a><br />
Defines the width of the header image.</li>
<li id="HEADER_TEXTCOLOR"><code class="constant">HEADER_TEXTCOLOR</code> <a href="#HEADER_TEXTCOLOR">#</a><br />
Defines the font color for the header text.</li>
<li id="NO_HEADER_TEXT"><code class="constant">NO_HEADER_TEXT</code> <a href="#NO_HEADER_TEXT">#</a><br />
(De)activates the support for header text.<br />
Values: <code class="bool">true</code>|<code class="bool">false</code></li>
<li id="STYLESHEETPATH"><code class="constant">STYLESHEETPATH</code> <a href="#STYLESHEETPATH">#</a><br />
Defines the absolute path to the stylesheet of the current theme.</li>
<li id="TEMPLATEPATH"><code class="constant">TEMPLATEPATH</code> <a href="#TEMPLATEPATH">#</a><br />
Defines the absolute path to the template files of the current theme.</li>
<li id="WP_USE_THEMES"><code class="constant">WP_USE_THEMES</code> <a href="#WP_USE_THEMES">#</a><br />
(De)activates the loading of themes.<br />
Values: <code class="bool">true</code>|<code class="bool">false</code></li>
</ul>
<h3 id="debug">Debug</h3>
<ul>
<li id="SAVEQUERIES"><code class="constant">SAVEQUERIES</code> <a href="#SAVEQUERIES">#</a><br />
(De)activates the saving of database queries in an array (<em>$wpdb->queries</em>).<br />
Values: <code class="bool">true</code>|<code class="bool">false</code></li>
<li id="SCRIPT_DEBUG"><code class="constant">SCRIPT_DEBUG</code> <a href="#SCRIPT_DEBUG">#</a><br />
(De)activates the loading of compressed Javascript and CSS files.<br />
Values: <code class="bool">true</code>|<code class="bool">false</code></li>
<li id="WP_DEBUG"><code class="constant">WP_DEBUG</code> <a href="#WP_DEBUG">#</a><br />
(De)activates the debug mode in WordPress.<br />
Values: <code class="bool">true</code>|<code class="bool">false</code> (Default: <code class="bool">false</code>)</li>
<li id="WP_DEBUG_DISPLAY"><code class="constant">WP_DEBUG_DISPLAY</code> <a href="#WP_DEBUG_DISPLAY">#</a><br />
(De)activates the display of errors on the screen.<br />
Values: <code class="bool">true</code>|<code class="bool">false</code>|<code class="bool">null</code> (Default: <code class="bool">true</code>)</li>
<li id="WP_DEBUG_LOG"><code class="constant">WP_DEBUG_LOG</code> <a href="#WP_DEBUG_LOG">#</a><br />
(De)activates the writing of errors to the <code class="path">/wp-content/debug.log</code> file.<br />
Values: <code class="bool">true</code>|<code class="bool">false</code> (Default: <code class="bool">false</code>)</li>
</ul>
<h3 id="security">Security and cookies</h3>
<ul>
<li id="ADMIN_COOKIE_PATH"><code class="constant">ADMIN_COOKIE_PATH</code> <a href="#ADMIN_COOKIE_PATH">#</a><br />
Path to the <code class="path">/wp-admin/</code> dir.<br />
Default: <code class="constant">SITECOOKIEPATH</code> <code class="string">wp-admin</code> or for Multisite in subdirectory <code class="constant">SITECOOKIEPATH</code></li>
<li id="ALLOW_UNFILTERED_UPLOADS"><code class="constant">ALLOW_UNFILTERED_UPLOADS</code> <a href="#ALLOW_UNFILTERED_UPLOADS">#</a><br />
Allows unfiltered uploads by admins.<br />
Value: <code class="bool">true</code></li>
<li id="AUTH_COOKIE"><code class="constant">AUTH_COOKIE</code> <a href="#AUTH_COOKIE">#</a><br />
Cookie name for the authentication.<br />
Default: <code class="string">wordpress_</code> <code class="constant">COOKIEHASH</code></li>
<li id="AUTH_KEY"><code class="constant">AUTH_KEY</code> <a href="#AUTH_KEY">#</a><br />
Secret key.<br />
Values: See <a href="https://api.wordpress.org/secret-key/1.1/salt">generator</a></li>
<li id="AUTH_SALT"><code class="constant">AUTH_SALT</code> <a href="#AUTH_SALT">#</a><br />
Secret key.<br />
Values: See <a href="https://api.wordpress.org/secret-key/1.1/salt">generator</a></li>
<li id="COOKIEHASH"><code class="constant">COOKIEHASH</code> <a href="#COOKIEHASH">#</a><br />
Hash for generating cookie names.</li>
<li id="COOKIEPATH"><code class="constant">COOKIEPATH</code> <a href="#COOKIEPATH">#</a><br />
Path to WordPress root dir.<br />
Default: <code class="string"><em>Home URL without http(s)://</em></code></li>
<li id="COOKIE_DOMAIN"><code class="constant">COOKIE_DOMAIN</code> <a href="#COOKIE_DOMAIN">#</a><br />
Domain of the WordPress installation.<br />
Default: <code class="bool">false</code> or for Multisite with subdomains <code class="string">.<em>domain of the main site</em></code></li>
<li id="CUSTOM_TAGS"><code class="constant">CUSTOM_TAGS</code> <a href="#CUSTOM_TAGS">#</a><br />
Allows you to override the list of secure HTML tags. See <code class="path">/wp-includes/kses.php</code>.<br />
Values: <code class="bool">true</code>|<code class="bool">false</code> (Default: <code class="bool">false</code>)</li>
<li id="DISALLOW_FILE_EDIT"><code class="constant">DISALLOW_FILE_EDIT</code> <a href="#DISALLOW_FILE_EDIT">#</a><br />
Allows you to disallow theme and plugin edits via WordPress editor.<br />
Value: <code class="bool">true</code></li>
<li id="DISALLOW_FILE_MODS"><code class="constant">DISALLOW_FILE_MODS</code> <a href="#DISALLOW_FILE_MODS">#</a><br />
Allows you to disallow the editing, updating, installing and deleting of plugins, themes and core files via WordPress Backend.<br />
Value: <code class="bool">true</code></li>
<li id="DISALLOW_UNFILTERED_HTML"><code class="constant">DISALLOW_UNFILTERED_HTML</code> <a href="#DISALLOW_UNFILTERED_HTML">#</a><br />
Allows you to disallow unfiltered HTML for every user, admins too.<br />
Value: <code class="bool">true</code></li>
<li id="FORCE_SSL_ADMIN"><code class="constant">FORCE_SSL_ADMIN</code> <a href="#FORCE_SSL_ADMIN">#</a><br />
Activates <abbr title="Secure Sockets Layer">SSL</abbr> for logins and in the backend.<br />
Values: <code class="bool">true</code>|<code class="bool">false</code> (Default: <code class="bool">false</code>)</li>
<li id="FORCE_SSL_LOGIN"><code class="constant">FORCE_SSL_LOGIN</code> <a href="#FORCE_SSL_LOGIN">#</a><br />
Activates <abbr title="Secure Sockets Layer">SSL</abbr> for logins.<br />
Values: <code class="bool">true</code>|<code class="bool">false</code> (Default: <code class="bool">false</code>)</li>
<li id="LOGGED_IN_COOKIE"><code class="constant">LOGGED_IN_COOKIE</code> <a href="#LOGGED_IN_COOKIE">#</a><br />
Cookie name for logins.<br />
Default: <code class="string">wordpress_logged_in_</code> <code class="constant">COOKIEHASH</code></li>
<li id="LOGGED_IN_KEY"><code class="constant">LOGGED_IN_KEY</code> <a href="#LOGGED_IN_KEY">#</a><br />
Secret key.<br />
Values: See <a href="https://api.wordpress.org/secret-key/1.1/salt">generator</a></li>
<li id="LOGGED_IN_SALT"><code class="constant">LOGGED_IN_SALT</code> <a href="#LOGGED_IN_SALT">#</a><br />
Secret key.<br />
Values: See <a href="https://api.wordpress.org/secret-key/1.1/salt">generator</a></li>
<li id="NONCE_KEY"><code class="constant">NONCE_KEY</code> <a href="#NONCE_KEY">#</a><br />
Secret key.<br />
Values: See <a href="https://api.wordpress.org/secret-key/1.1/salt">generator</a></li>
<li id="NONCE_SALT"><code class="constant">NONCE_SALT</code> <a href="#NONCE_SALT">#</a><br />
Secret key.<br />
Values: See <a href="https://api.wordpress.org/secret-key/1.1/salt">generator</a></li>
<li id="PASS_COOKIE"><code class="constant">PASS_COOKIE</code> <a href="#PASS_COOKIE">#</a><br />
Cookie name for the password.<br />
Default: <code class="string">wordpresspass_</code> <code class="constant">COOKIEHASH</code></li>
<li id="PLUGINS_COOKIE_PATH"><code class="constant">PLUGINS_COOKIE_PATH</code> <a href="#PLUGINS_COOKIE_PATH">#</a><br />
Path to the plugins dir.<br />
Default: <code class="constant">WP_PLUGIN_URL</code> <em>without http(s)://</em></li>
<li id="SECURE_AUTH_COOKIE"><code class="constant">SECURE_AUTH_COOKIE</code> <a href="#SECURE_AUTH_COOKIE">#</a><br />
Cookie name for the <abbr title="Secure Sockets Layer">SSL</abbr> authentication.<br />
Default: <code class="string">wordpress_sec_</code> <code class="constant">COOKIEHASH</code></li>
<li id="SECURE_AUTH_KEY"><code class="constant">SECURE_AUTH_KEY</code> <a href="#SECURE_AUTH_KEY">#</a><br />
Secret key.<br />
Values: See <a href="https://api.wordpress.org/secret-key/1.1/salt">generator</a></li>
<li id="SECURE_AUTH_SALT"><code class="constant">SECURE_AUTH_SALT</code> <a href="#SECURE_AUTH_SALT">#</a><br />
Secret key.<br />
Values: See <a href="https://api.wordpress.org/secret-key/1.1/salt">generator</a></li>
<li id="SITECOOKIEPATH"><code class="constant">SITECOOKIEPATH</code> <a href="#SITECOOKIEPATH">#</a><br />
Path of you site.<br />
Default: <code class="string"><em>Site URL without http(s)://</em></code></li>
<li id="TEST_COOKIE"><code class="constant">TEST_COOKIE</code> <a href="#TEST_COOKIE">#</a><br />
Cookie name for the test cookie.<br />
Default: <code class="string">wordpress_test_cookie</code></li>
<li id="USER_COOKIE"><code class="constant">USER_COOKIE</code> <a href="#USER_COOKIE">#</a><br />
Cookie name for users.<br />
Default: <code class="string">wordpressuser_</code> <code class="constant">COOKIEHASH</code></li>
</ul>
<div class="incontent">
<h4>Guest Post</h4>
<p><img src="http://wpengineer.com/wp-content/uploads/dominik-schilling-g+.png" alt="Dominik Schilling Avatar" title="selbst" width="150" height="150" class="alignleft" />This post is written by Dominik Schilling - <a href="http://wpgrafie.de/">wpgrafie.de</a> and is a post in our Advent Calendar on WP Engineer about WordPress. Dominik is Student, Web Developer, WordPress Contributing Developer - <a href="http://profiles.wordpress.org/users/ocean90">ocean90</a> and he ♥ WordPress.<br />
Thank you very much from my part to <a href="https://plus.google.com/101675293278434581718/about" title="see his G+ rofile">Dominik</a>.<br />
If you also like to have your interesting post published on our website, please let us know on our contact page. Of course we will appreciate your contribution!
</div>
<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/2382/wordpress-constants-overview/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Add Icon to Site Link in the WordPress Admin Bar</title>
		<link>http://wpengineer.com/2366/add-icon-to-site-link-in-the-wordpress-admin-bar/</link>
		<comments>http://wpengineer.com/2366/add-icon-to-site-link-in-the-wordpress-admin-bar/#comments</comments>
		<pubDate>Fri, 16 Dec 2011 07:00:14 +0000</pubDate>
		<dc:creator>Frank</dc:creator>
				<category><![CDATA[WordPress Tutorials]]></category>
		<category><![CDATA[Advent Calendar]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WP]]></category>

		<guid isPermaLink="false">http://wpengineer.com/?p=2366</guid>
		<description><![CDATA[Each button in the Admin bar has a self-defining and space-saving icon. But the link to the blog frontend (which is represented as a blog title), has no icon. If you want, you can change it quickly - here is a small solution. The following code belongs in the functions.php of the Theme, or better, [...]]]></description>
			<content:encoded><![CDATA[<p>Each button in the Admin bar has a self-defining and space-saving icon. But the link to the blog frontend (which is represented as a blog title), has no icon. If you want, you can change it quickly - here is a small solution.</p>
<p><span id="more-2366"></span><br />
<img src="http://wpengineer.com/wp-content/uploads/wordpress-adminbar-icon.png" alt="Screenshot Admin Bar Icon Example" title="wordpress-adminbar-icon" width="278" height="168" class="aligncenter size-full wp-image-2367" /></p>
<p>The following code belongs in the <code>functions.php</code> of the Theme, or better, in a Plugin. It adds the current favicon before the blog title. And to fit the image into the overall picture of the admin bar, we darkened it and and gave it a round shape.</p>
<pre>
&lt;?php
/**
 * Plugin Name: Icon for Admin Bar Site Link
 * Plugin URI:  http://wpengineer.com/?p=2366
 * Description: Add Icon to Site Link in the WordPress Admin Bar
 * Version:	1.0.0
 * Author:      Sergej Müller
 * Author URI:  http://ebiene.de
 * License:     GPLv3
 */

// This file is not called from WordPress. We don&#039;t like that.
! defined( &#039;ABSPATH&#039; ) and exit;
// If the function exists this file is called as comments template.
// We don&#039;t do anything then.
if ( ! function_exists( &#039;sm_add_adminbar_site_icon&#039; ) ) {

	// add to admin area, inside head
	add_action( &#039;admin_head&#039;, &#039;sm_add_adminbar_site_icon&#039; );
	// add to frontend, inside head
	add_action( &#039;wp_head&#039;, &#039;sm_add_adminbar_site_icon&#039; );

	function sm_add_adminbar_site_icon() {

		if ( ! is_admin_bar_showing() ) {
			return;
		}

		echo &#039;&lt;style&gt;
			#wp-admin-bar-site-name &gt; a.ab-item:before {
				float: left;
				width: 16px;
				height: 16px;
				margin: 5px 5px 0 -1px;
				display: block;
				content: &quot;&quot;;
				opacity: 0.4;
				background: #000 url(&quot;http://www.google.com/s2/u/0/favicons?domain=&#039; . parse_url( home_url(), PHP_URL_HOST ). &#039;&quot;);
				border-radius: 16px;
			}
			#wp-admin-bar-site-name:hover &gt; a.ab-item:before {
				opacity: 1;
			}
		&lt;/style&gt;&#039;;
	}

}
</pre>
<div class="incontent">
<h4>Guest Post</h4>
<p><img src="http://wpengineer.com/wp-content/uploads/sergej_mueller.jpg" alt="Sergej Müller Avatar" title="sergej_mueller" width="64" height="64" class="alignleft size-full wp-image-2005" />This post is written by Sergej Müller <a href="http://wpseo.org">wpseo.de</a>, who created the popular WordPress Plugin to optimize your SEO.</p>
<p>Thank you very much from our part to Sergej.</p>
<p>If you also like to have your interesting post published on our website, please let us know on our contact page. Of course we will appreciate your contribution!
</p></div>
<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/2366/add-icon-to-site-link-in-the-wordpress-admin-bar/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Return the Template Name of Current WordPress Page</title>
		<link>http://wpengineer.com/2354/return-the-template-name-of-current-wordpress-page/</link>
		<comments>http://wpengineer.com/2354/return-the-template-name-of-current-wordpress-page/#comments</comments>
		<pubDate>Sun, 11 Dec 2011 10:34:00 +0000</pubDate>
		<dc:creator>Frank</dc:creator>
				<category><![CDATA[WordPress Tutorials]]></category>
		<category><![CDATA[Advent Calendar]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WP]]></category>

		<guid isPermaLink="false">http://wpengineer.com/?p=2354</guid>
		<description><![CDATA[WordPress save the assignment in the post_meta table and so it is easy to get the template name with the default function to return post meta data - get_post_meta(). The key for the value is _wp_page_template. On this point also a small hint: if you will, that you not find your key on the list [...]]]></description>
			<content:encoded><![CDATA[<p>WordPress save the assignment in the post_meta table and so it is easy to get the template name with the default function to return post meta data - <code>get_post_meta()</code>. The key for the value is <code>_wp_page_template</code>.<br />
<span id="more-2354"></span><br />
On this point also a small hint: if you will, that you not find your key on the list of post meta keys on the custom fields, create a key with underline and start on the string and WordPress don't list this key in select box; very useful for custom meta boxes on posts and pages.</p>
<pre>
$template_file = get_post_meta( get_the_ID(), &#039;_wp_page_template&#039;, TRUE );
</pre>
<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/2354/return-the-template-name-of-current-wordpress-page/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Remove Inline Style Of WordPress Gallery Shortcode</title>
		<link>http://wpengineer.com/2352/remove-inline-style-of-wordpress-gallery-shortcode/</link>
		<comments>http://wpengineer.com/2352/remove-inline-style-of-wordpress-gallery-shortcode/#comments</comments>
		<pubDate>Sat, 10 Dec 2011 07:07:03 +0000</pubDate>
		<dc:creator>Frank</dc:creator>
				<category><![CDATA[WordPress Tutorials]]></category>
		<category><![CDATA[Advent Calendar]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[gallery]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WP]]></category>

		<guid isPermaLink="false">http://wpengineer.com/?p=2352</guid>
		<description><![CDATA[Today I'll give you a small tip for the WordPress Gallery. With version 3.1 of WordPress it is possible to replace the inline style of the core, it's done easily with a Filter-Hook. Use this and include your custom style with the Theme in your frontend; no Plugins, CSS or functions in your Theme for [...]]]></description>
			<content:encoded><![CDATA[<p>Today I'll give you a small tip for the WordPress Gallery. With version 3.1 of WordPress it is possible to replace the inline style of the core, it's done easily with a Filter-Hook. Use this and include your custom style with the Theme in your frontend; no Plugins, CSS or functions in your Theme for this required - easy, but it works and this is the greatest part of WordPress - Hooks for everyone, everywhere<br />
<span id="more-2352"></span></p>
<pre>
add_filter( &#039;use_default_gallery_style&#039;, &#039;__return_false&#039; );
</pre>
<p>If you don`t understand the function <code>__return_false()</code> of the WP Core, please <a href="http://wpengineer.com/2319/advent-calendar-predefined-callback-functions-for-filters/" title="Predefined callback functions for filters">read our post</a> for this function.<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/2352/remove-inline-style-of-wordpress-gallery-shortcode/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Advent Calendar &#8211; Predefined callback functions for filters</title>
		<link>http://wpengineer.com/2319/advent-calendar-predefined-callback-functions-for-filters/</link>
		<comments>http://wpengineer.com/2319/advent-calendar-predefined-callback-functions-for-filters/#comments</comments>
		<pubDate>Sun, 04 Dec 2011 07:07:16 +0000</pubDate>
		<dc:creator>Latz</dc:creator>
				<category><![CDATA[WordPress Tutorials]]></category>
		<category><![CDATA[Advent Calendar]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://wpengineer.com/?p=2319</guid>
		<description><![CDATA[Filters are often used for removing content. For example, if you want to hide the admin bar you can do the following: function hide_admin_bar() { return FALSE; } add_filter( &#039;show_admin_bar&#039; , &#039;hide_admin_bar&#039; ); It's a bit tedious to define an additional function just to return "FALSE". Since version 3.0 WordPress provides various functions to shorten [...]]]></description>
			<content:encoded><![CDATA[<p>Filters are often used for removing content. For example, if you want to hide the admin bar you can do the following:</p>
<pre lang="php">
function hide_admin_bar() {
    return FALSE;
}
add_filter( &#039;show_admin_bar&#039; , &#039;hide_admin_bar&#039; );
</pre>
<p>It's a bit tedious to define an additional function just to return "<code>FALSE</code>". Since version 3.0 WordPress provides various functions to shorten the code:</p>
<ul>
<li>__return_true()</li>
<li>__return_false()</li>
<li>__return_zero()</li>
<li>__return_empty_array()</li>
</ul>
<p>The above code can now be written as</p>
<pre lang="php">
add_filter( &#039;show_admin_bar&#039;, &#039;__return_false&#039; );
</pre>
<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/2319/advent-calendar-predefined-callback-functions-for-filters/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Extend the TwentyEleven Navigation with your Social Icons</title>
		<link>http://wpengineer.com/2310/extend-the-twentyeleven-navigation-with-your-social-icons/</link>
		<comments>http://wpengineer.com/2310/extend-the-twentyeleven-navigation-with-your-social-icons/#comments</comments>
		<pubDate>Sat, 03 Dec 2011 07:32:55 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[WordPress Tutorials]]></category>
		<category><![CDATA[Advent Calendar]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[navigation]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://wpengineer.com/?p=2310</guid>
		<description><![CDATA[In this little tutorial we show how to add in the navigation of the TwentyEleven Theme our RSS Feed, a link with icons to our Twitter page and to our Facebook profile. Without writing a single line of PHP code. You are able to accomplish this with the WordPress Menu. First we go in the [...]]]></description>
			<content:encoded><![CDATA[<p><img class="aligncenter size-full wp-image-2313" title="TwentyEleven Screenshot" src="http://wpengineer.com/wp-content/uploads/twenty-eleven-screenshot.jpg" alt="TwentyEleven Screenshot" width="692" height="348" /></p>
<p>In this little tutorial we show how to add in the navigation of the TwentyEleven Theme our RSS Feed, a link with icons to our Twitter page and to our Facebook profile. Without writing a single line of PHP code. You are able to accomplish this with the WordPress Menu.</p>
<p>First we go in the backend to Design-&gt; Menu and activate the CSS Classes. Therefore we click on "Screen Options" on the very top right corner. And unter "Show advanced menu properties" you check the box for "CSS Classes" and close the Screen Options.</p>
<p><img class="alignnone size-full wp-image-2311" title="WordPress menu screen options" src="http://wpengineer.com/wp-content/uploads/screen-options.jpg" alt="WordPress menu screen options" width="574" height="136" /></p>
<p>After that we use the "Custom Links" to create the menu entries. We add the addresses to our RSS Feed, Facebook and Twitter and add them to the menu. There we assign the 3 menu entries to the CSS Classes. RSS Feed has the class <code>rss</code>, Twitter the class <code>twitter</code> and Facebook <code>facebook</code>. Don't forget to save.</p>
<p><img class="alignnone size-full wp-image-2314" title="WordPress Menu" src="http://wpengineer.com/wp-content/uploads/wordpress-menu.jpg" alt="WordPress Menu" width="423" height="400" /></p>
<p>I prepared a sprite, which you can download with a right mouse click-&gt;Save Image As… . You have to save this sprite into the folder <code>twentyeleven/images/</code>.</p>
<p><img class="alignnone size-full wp-image-2312" title="Social Sprite" src="http://wpengineer.com/wp-content/uploads/social-sprite.png" alt="Social Sprite" width="80" height="290" /></p>
<p>Then we open the file TwentyEleven style.css with a text editor and add at the end of the Menu block <code>#access</code> our additional CSS. We do not have much to add. We let our 3 list items float to the right, push the text out of view and position the graphic. Only for the hover, focus and active states, we must define a little tricky CSS rule in order to circumvent the background gradients of TwentyEleven.</p>
<pre>
#access .twitter, #access .rss, #access .facebook {
	float: right;
}
#access .twitter a, #access .rss a, #access .facebook a {
	background: transparent url(images/social-sprite.png) 0 0 no-repeat;
	padding: 0;
	text-indent: -9999px;
	width: 70px;
}
#access .rss a { background-position: 0 0; }
#access .facebook a { background-position: 0 -96px; }
#access .twitter a { background-position: 0 -48px; }
#access .rss a:hover, #access .rss a:focus, #access .rss a:active {
	background: transparent url(images/social-sprite.png) 0 -144px no-repeat;
}
#access .twitter a:hover, #access .twitter a:focus, #access .twitter a:active {
	background: transparent url(images/social-sprite.png) 0 -192px no-repeat;
}
#access .facebook a:hover, #access .facebook a:focus, #access .facebook a:active {
	background: transparent url(images/social-sprite.png) 0 -240px no-repeat;
}
</pre>
<p>This is just an example to experiment. Add your Google+ profile and expand this example with cool CSS tricks!<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/2310/extend-the-twentyeleven-navigation-with-your-social-icons/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Force Reload of Scripts and Stylesheets in your Plugin or Theme</title>
		<link>http://wpengineer.com/2292/force-reload-of-scripts-and-stylesheets-in-your-plugin-or-theme/</link>
		<comments>http://wpengineer.com/2292/force-reload-of-scripts-and-stylesheets-in-your-plugin-or-theme/#comments</comments>
		<pubDate>Fri, 21 Oct 2011 06:13:38 +0000</pubDate>
		<dc:creator>Latz</dc:creator>
				<category><![CDATA[WordPress Tutorials]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://wpengineer.com/?p=2292</guid>
		<description><![CDATA[If you're developing a WordPress theme or plugin you may have had the problem that scripts or stylesheets are not reloaded from the source when you refresh the page because they are cached somewhere on the way from the server to the browser. There are various methods to suppress this behaviour like disabling the browser [...]]]></description>
			<content:encoded><![CDATA[<p>If you're developing a WordPress theme or plugin you may have had the problem that scripts or stylesheets are not reloaded from the source when you refresh the page because they are cached somewhere on the way from the server to the browser. There are various methods to suppress this behaviour like disabling the browser cache in the options or by using a web development add-on. Sometimes this simply does not work because it's not always apparent where the content is cached since there are so many possibilities and you may have missed to disable all of them.</p>
<p>WordPress provides a simple method to ensure that all stylesheets and scripts are reloaded from the source when they have changed by providing a version parameter:</p>
<pre lang="php">
wp_enqueue_script( $handle, $src, $deps, $ver, $in_footer );
wp_enqueue_style( $handle, $src, $deps, $ver, $media);
</pre>
<p>You can increase the <code>$ver</code> parameter every time you've changed the files:</p>
<pre lang="php">
wp_enqueue_script( &#039;my_script&#039;, &#039;my_script.js&#039;, &#039;&#039;, &#039;0.11&#039; );
wp_enqueue_style( &#039;my_style&#039;, &#039;my_style.css&#039;, &#039;&#039;, &#039;0.11&#039; );
</pre>
<p>The URL of the stylesheet/script will be changed to '<code>.../my_script.js?ver=0.11</code>' so that every caching system detects the changed file and reloads it from its source and the user always gets the recent version.</p>
<p>But to change the version number manually every time in the development stage would be a bit tedious and you're a programmer, right? So let's automate this:</p>
<pre lang="php">
wp_enqueue_script( &#039;my_script&#039;, &#039;my_script.js&#039;, &#039;&#039;, time() );
wp_enqueue_style( &#039;my_style&#039;, &#039;my_style.css&#039;, &#039;&#039;, time() );
</pre>
<p>The value of <a href="http://php.net/manual/de/function.time.php">time()</a> changes every second so the version ID of the file changes constantly and it's reloaded from the source and not from some cache.</p>
<p>It's a bit disadvantageous that you have to substitute the time based version parameter by a "real" version number every time you deploy your code since the actual user still should have the benefits of cached scripts and stylesheets. Let's extend the idea:</p>
<pre lang="php">
define (&#039;VERSION&#039;, &#039;1.1&#039;);

function version_id() {
  if ( WP_DEBUG )
    return time();
  return VERSION;
}

wp_enqueue_script( &#039;my_script&#039;, &#039;my_script.js&#039;, &#039;&#039;, version_id() );
wp_enqueue_style( &#039;my_style&#039;, &#039;my_style.css&#039;, &#039;&#039;, version_id() );
</pre>
<p>This way you can make sure that in your development environment everything is reloaded from source all the time but a productive server takes advantage of caches.</p>
<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/2292/force-reload-of-scripts-and-stylesheets-in-your-plugin-or-theme/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>WordPress Custom Post Types Get Into The Loop</title>
		<link>http://wpengineer.com/2249/wordpress-custom-post-types-get-into-the-loop/</link>
		<comments>http://wpengineer.com/2249/wordpress-custom-post-types-get-into-the-loop/#comments</comments>
		<pubDate>Wed, 03 Aug 2011 09:23:25 +0000</pubDate>
		<dc:creator>Frank</dc:creator>
				<category><![CDATA[WordPress Tutorials]]></category>
		<category><![CDATA[custom post type]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[Theme]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WP]]></category>

		<guid isPermaLink="false">http://wpengineer.com/?p=2249</guid>
		<description><![CDATA[WordPress started a new era with the Custom Post Types for developers in the WordPress environment. The possibilities are numerous and primarily from the knowledge of the developer dependent. Nevertheless, there are so many tutorials how to use Custom Post Types in WordPress, but that is not enough - at least not in most cases [...]]]></description>
			<content:encoded><![CDATA[<p>WordPress started a new era with the Custom Post Types for developers in the WordPress environment. The possibilities are numerous and primarily from the knowledge of the developer dependent. Nevertheless, there are so many tutorials how to use Custom Post Types in WordPress, but that is not enough - at least not in most cases and therefore are various other steps necessary to make the use of CPT more efficient and smooth.</p>
<p>In this article I would like to briefly explain how to get content of Custom Post Types in the loop of WordPress. This is not a complete guide, but please feel free to add tips, critics, hints in our comment area.</p>
<p><span id="more-2249"></span><br />
<img src="http://wpengineer.com/wp-content/uploads/cpt-example.png" alt="" title="cpt-example" width="328" height="226" class="aligncenter size-full wp-image-2250" /><br />
The screenshot is an example of the use of CPT, hereby were the Plugins <a href="http://wordpress.org/extend/plugins/archive/" title="WordPress Plugin Archive">Archive</a> und <a href="http://wpplugins.com/plugin/281/snippets" title="WordPress Plugin Snippet">Snippet</a> created, they have different tasks and via CPT tailored to the requirements you need.</p>
<p>In the first case, the syntax is shown how to use the query and passes through the type of the CPT via parameters. In a template of the theme it ensures that only the CPT will be read. All other parameters of the query remain untouched.</p>
<pre>
query_posts( &#039;post_type=my_post_type&#039; )
</pre>
<p>Another solution differs essentially only in style and that several CPTs are passed, wich are in an array.</p>
<pre>
global $query_string;
parse_str( $query_string, $args );
$args&#091;&#039;post_type&#039;&#093; = array( &#039;my_post_type&#039;, &#039;my_second_post_type&#039; );
query_posts( $args );
</pre>
<p>To complete the loop of WP and not to limit, the array is added to the parameter of the <code>post_type</code>. So only via the array  <a href="http://php.net/manual/de/function.array-merge.php"><code>array_merge</code></a> the array is added to another array.</p>
<pre>
global $wp_query;
$args = array_merge( $wp_query-&gt;query, array( &#039;post_type&#039; =&gt; &#039;my_post_type&#039; ) );
query_posts( $args );
</pre>
<p>Furthermore you can define your own queries, especially if you want to use them in your own variables, either in your Themes or Plugins.</p>
<pre>
$args = array(
	&#039;post_type&#039; =&gt; &#039;my_post_type&#039;,
	&#039;post_status&#039; =&gt; &#039;publish&#039;,
	&#039;posts_per_page&#039; =&gt; -1
);

$posts = new WP_Query( $args );
if ( $posts -&gt; have_posts() ) {
	while ( $posts -&gt; have_posts() ) {
...
	}
}

wp_reset_query();
</pre>
<p>At the end a solution that has a particular charm that you control it via Plugin and turn it off easily while testing. Also, to implement the application in a Plugin is simple or as an extension of an existing Themes via Childtheme or Plugin. About the Hook <code>pre_get_posts</code> you can adjust various things of the query, including the CPT.<br />
In the example I have via conditional tags diverse conditions implemented, so that you can see, how it responds to the output in the frontend.</p>
<pre>
// $this? - example was used in class-structures
// add custom post type to wp loop
add_filter( &#039;pre_get_posts&#039;, array( $this, &#039;add_to_query&#039;) );

// ads to query
function add_to_query( $query ) {

	if ( is_admin() || is_preview() )
		return;

	if ( ! isset( $query -&gt; query_vars&#091;&#039;suppress_filters&#039;&#093; ) )
		$query -&gt; query_vars&#091;&#039;suppress_filters&#039;&#093; = FALSE;

	// conditional tags for restrictions
	if ( is_home() || is_front_page() &amp;&amp; ( FALSE == $query -&gt; query_vars&#091;&#039;suppress_filters&#039;&#093; ) ) {
		$query -&gt; set( $this -&gt; my_post_type, array( &#039;post&#039;, $this -&gt; get_textdomain() ) );

	return $query;
}
</pre>
<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/2249/wordpress-custom-post-types-get-into-the-loop/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

