<?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; wp2.7</title>
	<atom:link href="http://wpengineer.com/tag/wp27/feed/" rel="self" type="application/rss+xml" />
	<link>http://wpengineer.com</link>
	<description>WordPress News, Hacks, Tips, Tutorials, Plugins and Themes</description>
	<lastBuildDate>Mon, 21 May 2012 22:48:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>WordPress Plugin-Path</title>
		<link>http://wpengineer.com/1134/wordpress-plugin-path/</link>
		<comments>http://wpengineer.com/1134/wordpress-plugin-path/#comments</comments>
		<pubDate>Mon, 27 Apr 2009 13:26:26 +0000</pubDate>
		<dc:creator>Frank</dc:creator>
				<category><![CDATA[WordPress Hacks]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress 2.8]]></category>
		<category><![CDATA[WordPress Plugins]]></category>
		<category><![CDATA[WordPress Tutorials]]></category>
		<category><![CDATA[WP]]></category>
		<category><![CDATA[wp2.7]]></category>
		<category><![CDATA[wp2.8]]></category>

		<guid isPermaLink="false">http://wpengineer.com/?p=1134</guid>
		<description><![CDATA[When working on a Plugin I noticed that the path to its files is not always complete, which depends on the WordPress version. With WordPress Version 2.8 the function plugins_url() extends and it can be incorporate in a much cleaner way, no maintenance of the folder required, where the Plugin is put. An example will [...]]]></description>
			<content:encoded><![CDATA[<p>When working on a Plugin I noticed that the path to its files is not always complete, which depends on the WordPress version.<br />
With WordPress <strong>Version 2.8</strong> the function <code>plugins_url()</code> extends and it can be incorporate in a much cleaner way, no maintenance of the folder required, where the Plugin is put. An example will illustrate it and possibly will help the one or other author at his work.<br />
<span id="more-1134"></span><br />
In the articles &#8222;<a href="http://wpengineer.com/use-javascript-libraries-in-and-of-wordpress/">Use JavaScript Libraries In And Of WordPress</a>&#8220;, &#8222;<a href="http://wpengineer.com/top-level-menu-in-wordpress-27/">Top Level Menu In WordPress 2.7</a>&#8220; and &#8222;<a href="http://wpengineer.com/wordpress-return-url/">WordPress - Return URL</a>&#8220; I often have the function <code>plugins_url()</code>, because it delivers very nice the path.</p>
<p>As of WordPress version 2.8 the function can take two parameters:</p>
<pre lang="php">
/**
 * @param string $path Optional. Path relative to the plugins url.
 * @param string $plugin Optional. The plugin file that you want to be relative to - i.e. pass in __FILE__
 * @return string Plugins url link with optional path appended.
*/
function plugins_url($path = &#039;&#039;, $plugin = &#039;&#039;)
</pre>
<p>So far only the $ path parameter could be passed, so that required a proper definition of the folder.</p>
<pre lang="php">
$style = plugins_url( &#039;my_plugin_folder/css/style-frontend.css&#039; );
</pre>
<p>With the extension in version 2.8 of WordPress it can be done like:</p>
<pre lang="php">
$style = plugins_url( &#039;css/style-frontend.css&#039;, __FILE__ );
</pre>
<p>The use should make it simpler and clearer. But the question will come up, how do I do backwards compatibility of the plugin? You can either use the version query:</p>
<pre lang="php">
if ( version_compare( $wp_version, &#039;2.8dev&#039;, &#039;&gt;&#039; ) )
</pre>
<p>and then supplement or write a custom function for the replacement:</p>
<pre lang="php">
// function for WP &lt; 2.8
function plugins_url($path = &#039;&#039;, $plugin = &#039;&#039;) {
  if ( function_exists(&#039;is_ssl&#039;) )
    $scheme = ( is_ssl() ? &#039;https&#039; : &#039;http&#039; );
  else
    $scheme = &#039;http&#039;;
  $url = WP_PLUGIN_URL;
  if ( 0 === strpos($url, &#039;http&#039;) ) {
    if ( function_exists(&#039;is_ssl&#039;) &amp;&amp; is_ssl() )
      $url = str_replace( &#039;http://&#039;, &quot;{$scheme}://&quot;, $url );
  }

  if ( !empty($plugin) &amp;&amp; is_string($plugin) )
  {
    $folder = dirname(plugin_basename($plugin));
    if (&#039;.&#039; != $folder)
      $url .= &#039;/&#039; . ltrim($folder, &#039;/&#039;);
  }

  if ( !empty($path) &amp;&amp; is_string($path) &amp;&amp; strpos($path, &#039;..&#039;) === false )
    $url .= &#039;/&#039; . ltrim($path, &#039;/&#039;);

  return apply_filters(&#039;plugins_url&#039;, $url, $path, $plugin);
}
</pre>
<p>This is only an alternative, the possibilities are endless - maybe one or the other has a beautiful idea and solution?<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/1134/wordpress-plugin-path/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Numbering your comments, pingbacks, trackbacks or all</title>
		<link>http://wpengineer.com/759/numbering-your-comments-pingbacks-trackbacks-or-all/</link>
		<comments>http://wpengineer.com/759/numbering-your-comments-pingbacks-trackbacks-or-all/#comments</comments>
		<pubDate>Tue, 03 Feb 2009 12:51:04 +0000</pubDate>
		<dc:creator>Frank</dc:creator>
				<category><![CDATA[WordPress Hacks]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[comments]]></category>
		<category><![CDATA[Theme]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress Themes]]></category>
		<category><![CDATA[WordPress Tutorials]]></category>
		<category><![CDATA[WP]]></category>
		<category><![CDATA[wp2.7]]></category>

		<guid isPermaLink="false">http://wpengineer.com/?p=759</guid>
		<description><![CDATA[Since WordPress 2.7 exists an API for the comment area. Thereby you can purge the PHP-portion within comments.php. Jean-Baptiste shows a simple solution to count comments. This solution is very well known and get used pretty much since the first release of WordPress. But if you like to have a filter, which counts only the [...]]]></description>
			<content:encoded><![CDATA[<p>Since WordPress 2.7 exists an API for the comment area. Thereby you can purge the PHP-portion within <code>comments.php</code>. <a href="http://www.wprecipes.com/how-to-number-your-comments">Jean-Baptiste</a> shows a simple solution to count comments. This solution is very well known and get used pretty much since the first release of WordPress. But if you like to have a filter, which counts only the trackbacks or only the comments, then this solutions is worthless. Besides that, the How To is pretty poor and PHP-rookies could have troubles with it.</p>
<p>Relating to this and because of many questions about this topic I show you two simple functions, which you insert in your <code>functions.php</code> of your theme. Normally they get used as output in your <code>comments.php</code>.<br />
<span id="more-759"></span></p>
<pre lang="php">
/**
 * count for Trackback, pingback, comment, pings
 *
 * use it:
 * fb_comment_type_count(&#039;ping&#039;);
 * fb_comment_type_count(&#039;comment&#039;);
 */
if ( !function_exists(&#039;fb_comment_type_count&#039;) ) {
	function fb_get_comment_type_count( $type=&#039;all&#039;, $zero = false, $one = false, $more = false, $post_id = 0) {
		global $cjd_comment_count_cache, $id, $post;

		if ( !$post_id )
			$post_id = $post-&gt;ID;
		if ( !$post_id )
			return;

		if ( !isset($cjd_comment_count_cache&#091;$post_id&#093;) ) {
			$p = get_post($post_id);
			$p = array($p);
			update_comment_type_cache($p);
		}
		;
		if ( $type == &#039;pingback&#039; || $type == &#039;trackback&#039; || $type == &#039;comment&#039; )
			$count = $cjd_comment_count_cache&#091;$post_id&#093;&#091;$type&#093;;
		elseif ( $type == &#039;pings&#039; )
			$count = $cjd_comment_count_cache&#091;$post_id&#093;&#091;&#039;pingback&#039;&#093; + $cjd_comment_count_cache&#091;$post_id&#093;&#091;&#039;trackback&#039;&#093;;
		else
			$count = array_sum((array) $cjd_comment_count_cache&#091;$post_id&#093;);

		return apply_filters(&#039;fb_get_comment_type_count&#039;, $count);
	}

	// comment, trackback, pingback, pings, all
	function fb_comment_type_count( $type=&#039;all&#039;, $zero = false, $one = false, $more = false, $post_id = 0 ) {

		$number = fb_get_comment_type_count( $type, $zero, $one, $more, $post_id );

		if ( $number &gt; 1 )
			$output = str_replace(&#039;%&#039;, number_format_i18n($number), ( false === $more ) ? __(&#039;% Comments&#039;) : $more);
		elseif ( $number == 0 )
			$output = ( false === $zero ) ? __(&#039;No Comments&#039;) : $zero;
		else // must be one
			$output = ( false === $one ) ? __(&#039;1 Comment&#039;) : $one;

		echo apply_filters(&#039;fb_comment_type_count&#039;, $output, $number);
	}
}

if ( !function_exists(&#039;fb_update_comment_type_cache&#039;) ) {
	function fb_update_comment_type_cache(&amp;$queried_posts) {
		global $cjd_comment_count_cache, $wpdb;

		if ( !$queried_posts )
			return $queried_posts;

		foreach ( (array) $queried_posts as $post )
			if ( !isset($cjd_comment_count_cache&#091;$post-&gt;ID&#093;) )
				$post_id_list&#091;&#093; = $post-&gt;ID;

		if ( $post_id_list ) {
			$post_id_list = implode(&#039;,&#039;, $post_id_list);

			foreach ( array(&#039;&#039;, &#039;pingback&#039;, &#039;trackback&#039;) as $type ) {
				$counts = $wpdb-&gt;get_results(&quot;SELECT ID, COUNT( comment_ID ) AS ccount
							FROM $wpdb-&gt;posts
							LEFT JOIN $wpdb-&gt;comments ON ( comment_post_ID = ID AND comment_approved = &#039;1&#039; AND comment_type=&#039;$type&#039; )
							WHERE post_status = &#039;publish&#039; AND ID IN ($post_id_list)
							GROUP BY ID&quot;);

				if ( $counts ) {
					if ( &#039;&#039; == $type )
						$type = &#039;comment&#039;;
					foreach ( $counts as $count )
						$cjd_comment_count_cache&#091;$count-&gt;ID&#093;&#091;$type&#093; = $count-&gt;ccount;
				}
			}
		}

		return $queried_posts;
	}

	add_filter(&#039;the_posts&#039;, &#039;fb_update_comment_type_cache&#039;);
}
</pre>
<p>If both functions in your theme are available, the usage of the 3 forms comments, trackbacks and pingbacks could look like this:</p>
<pre lang="php">
if ( function_exists(&#039;wp_list_comments&#039;) ) {

	// WP 2.7 comment loop
	if ( have_comments() ) { ?&gt;

		&lt;?php if ( empty($comments_by_type&#091;&#039;comment&#039;&#093;) ) { ?&gt;
			&lt;h2 id=&quot;comments&quot;&gt;&lt;?php fb_comment_type_count( &#039;comment&#039; ); ?&gt;&lt;/h2&gt;
			&lt;ol class=&quot;commentlist&quot;&gt;
				&lt;?php wp_list_comments( &#039;type=comment&amp;callback=fb_theme_comment&#039; ); ?&gt;
			&lt;/ol&gt;
		&lt;?php } ?&gt;

		&lt;?php
		if ( function_exists( &#039;fb_comment_type_count&#039; ) ) {
			// alternative type pings for trackback + pingback
			if ( empty($comments_by_type&#091;&#039;$post_id&#039;&#093;) ) { ?&gt;
				&lt;h2 id=&quot;pingback&quot;&gt;&lt;?php fb_comment_type_count( &#039;pingback&#039;, &#039;No Pingback&#039;, &#039;OnePingback&#039;, &#039;% Pingbacks&#039; ); ?&gt;&lt;/h2&gt;
				&lt;ol class=&quot;pingbacklist&quot;&gt;
					&lt;?php wp_list_comments(&#039;type=pingback&#039;); ?&gt;
				&lt;/ol&gt;
			&lt;?php } ?&gt;

			&lt;?php
			// alternative type pings for trackback + pingback
			if ( empty($comments_by_type&#091;&#039;trackback&#039;&#093;) ) { ?&gt;
				&lt;h2 id=&quot;trackback&quot;&gt;&lt;?php fb_comment_type_count( &#039;trackback&#039;, &#039;No Trackback&#039;, &#039;One Trackback&#039;, &#039;% Trackbacks&#039; ); ?&gt;&lt;/h2&gt;
				&lt;ol class=&quot;trackbacklist&quot;&gt;
					&lt;?php wp_list_comments(&#039;type=trackback&#039;); ?&gt;
				&lt;/ol&gt;
			&lt;?php }
		} ?&gt;

		&lt;div class=&quot;navigation nav_comments&quot;&gt;
			&lt;div class=&quot;alignleft&quot;&gt;&lt;?php previous_comments_link() ?&gt;&lt;/div&gt;
			&lt;div class=&quot;alignright&quot;&gt;&lt;?php next_comments_link() ?&gt;&lt;/div&gt;
		&lt;/div&gt;

	&lt;?php } else {
		// this is displayed if there are no comments so far
	} ?&gt;
</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/759/numbering-your-comments-pingbacks-trackbacks-or-all/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
		<item>
		<title>Removing WordPress Login Design</title>
		<link>http://wpengineer.com/739/removing-wordpress-login-design/</link>
		<comments>http://wpengineer.com/739/removing-wordpress-login-design/#comments</comments>
		<pubDate>Mon, 02 Feb 2009 15:26:22 +0000</pubDate>
		<dc:creator>Frank</dc:creator>
				<category><![CDATA[WordPress Tutorials]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Theme]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress Hacks]]></category>
		<category><![CDATA[WordPress Themes]]></category>
		<category><![CDATA[WP]]></category>
		<category><![CDATA[wp2.7]]></category>

		<guid isPermaLink="false">http://wpengineer.com/?p=739</guid>
		<description><![CDATA[In a previous post, I showed the possibility, how to use WordPress in regard to Corporate Identity. For example adjusting the login area. This shouldn't be a tough task with the according articles. Create Your Own WordPress Login Design 10 Checks to the Perfect WordPress theme In both cases I didn't talk about how to [...]]]></description>
			<content:encoded><![CDATA[<p>In a previous post, I showed the possibility, how to use WordPress in regard to Corporate Identity. For example adjusting the login area. This shouldn't be a tough task with the <a href="http://wpengineer.com/create-your-own-wordpress-login-design/">according</a> articles.</p>
<ul>
<li><a href="http://wpengineer.com/create-your-own-wordpress-login-design/">Create Your Own WordPress Login Design</a></li>
<li><a href="http://wpengineer.com/perfect-wordpress-theme/">10 Checks to the Perfect WordPress theme</a></li>
</ul>
<p>In both cases I didn't talk about how to deactivate the default WordPress layout, since I always used the example based of the WordPress stylesheet. But the stylesheet of WordPress isn't really lean and why should you load unnecessary data, which you really don't need?</p>
<p>With a little hook and an appropriate function I can disable to load the stylesheet of WordPress and load my own CSS - How that works can be read in both articles about adjusting theme login.<br />
<span id="more-739"></span></p>
<pre lang="php">
if ( basename($_SERVER&#091;&#039;PHP_SELF&#039;&#093;) == &#039;wp-login.php&#039; )
	add_action( &#039;style_loader_tag&#039;, create_function( &#039;$a&#039;, &quot;return null;&quot; ) );
</pre>
<p>If you put the above syntax in your <code>functions.php</code>, it will also be disabled if you change or deactivate your theme.  So it's easy to adjust your frontend, backend and login area. As of my experience it is necessary in some business areas, even if it's only for small areas of the backend and login. But that is essential for me, if I like to have a <a href="http://wpengineer.com/perfect-wordpress-theme/">&#8222;perfect&#8220; Theme</a>.<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/739/removing-wordpress-login-design/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Create Your Own WordPress Login Design</title>
		<link>http://wpengineer.com/483/create-your-own-wordpress-login-design/</link>
		<comments>http://wpengineer.com/483/create-your-own-wordpress-login-design/#comments</comments>
		<pubDate>Wed, 17 Dec 2008 13:00:02 +0000</pubDate>
		<dc:creator>Frank</dc:creator>
				<category><![CDATA[WordPress Hacks]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Theme]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress Themes]]></category>
		<category><![CDATA[wp2.7]]></category>

		<guid isPermaLink="false">http://wpengineer.com/?p=483</guid>
		<description><![CDATA[WordPress 2.7 has been released these days and comes with some updates to the backend design. I think most of you already know that there is a new login-section. The design is now equal to the new backend's and the team did only little changes. From my point of view this is very important to [...]]]></description>
			<content:encoded><![CDATA[<p>WordPress 2.7 has been released these days and comes with some updates to the backend design. I think most of you already know that there is a new login-section. The design is now equal to the new backend's and the team did only little changes.<br />
From my point of view this is very important to an all-inclusive-package, like a theme &#8211; or a corporate design.<br />
The CSS changed a bit and if anybody wants to customize the login-section, I will show how to achieve it. The CSS is also included as a good starting point for your own custom design.</p>
<p><img src="http://wpengineer.com/wp-content/uploads/wp27-login.png" alt="" title="wp27-login" width="448" height="461" class="aligncenter size-full wp-image-484" /><br />
<span id="more-483"></span></p>
<h3>Loading the Stylesheet</h3>
<p>I have to use a simple function, which I put in <code>functions.php</code> of the current theme and integrate it via hook <code>login_head</code> into the login-head to load the css for the login-section. This will make the custom css being referenced only by one specific theme and if I switch to a different, a different css will also be loaded.</p>
<pre lang="php">
// custom login for theme
// folder themes/theme_name/custom-login/
function fb_custom_login() {
	echo &#039;&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;&#039; . get_bloginfo(&#039;template_directory&#039;) . &#039;/custom-login/custom-login.css&quot; /&gt;&#039;;
}

add_action(&#039;login_head&#039;, &#039;fb_custom_login&#039;);
</pre>
<p>The stylesheet comes with the name <code>custom-login.css</code> and is located in <code>/custom-login</code> in the folder of the theme.</p>
<h3>The Stylesheet</h3>
<p>Like I already said, here is tiny example, which includes classes and id's of the login-section, so you can customize it very easily.</p>
<pre lang="css">
html {
background-color: #fff;
}

#login form {
padding-top: 100px;
}
#login form .submit input {
border-color: #bcb38f !important;
color: #777 !important;
}
#login form .submit input:hover {
border-color: #bcb38f !important;
color: #bcb38f !important;
}
#login h1 {
display: none;
}
.login #nav a {
color: #777 !important;
}
.login #nav a:hover {
color: #bcb38f !important;
}

#wphead img, #wphead h1 {
display: none;
}
#wphead {
height: 100px;
}
#wphead-info {
padding-top: 27px;
}

#footer {
display: none;
}
#footer_custom {
clear: both;
text-align: center;
width: 500px;
margin: auto;
height: 100px;
}
#footer_custom .docs {
padding-top: 0px;
line-height: 100%;
}
#footer_image {
border:none;
}
</pre>
<p>The example above is just one way to customize the style. As usual there are unlimited possibilities with css and the art of it. A recommendational note from me, is to use the <a href="http://getfirebug.com/">Firebug</a> extension, which is really helpful when customizing css live. I can't mention this enough.<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/483/create-your-own-wordpress-login-design/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
		<item>
		<title>How To Improve WordPress Plugins</title>
		<link>http://wpengineer.com/353/how-to-improve-wordpress-plugins/</link>
		<comments>http://wpengineer.com/353/how-to-improve-wordpress-plugins/#comments</comments>
		<pubDate>Thu, 13 Nov 2008 11:00:16 +0000</pubDate>
		<dc:creator>Frank</dc:creator>
				<category><![CDATA[WordPress Plugins]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress Hacks]]></category>
		<category><![CDATA[WordPress Tutorials]]></category>
		<category><![CDATA[wp2.7]]></category>

		<guid isPermaLink="false">http://wpengineer.com/?p=353</guid>
		<description><![CDATA[With the upcoming WordPress release version 2.7 the menu changes to the vertical. This offers several features to the author which we already mentioned in some other posts. But this time I explicitly address Plugin authors and ask them to make their Plugins more user friendly in terms of usability. I will show only two [...]]]></description>
			<content:encoded><![CDATA[<p><div id="attachment_357" class="wp-caption alignright" style="width: 164px"><img src="http://wpengineer.com/wp-content/uploads/icon-menu.png" alt="Icon for Menu" title="icon-menu" width="154" height="360" class="size-full wp-image-357" /><p class="wp-caption-text">Icon for Menu</p></div><br />
With the upcoming WordPress release version 2.7 the menu changes to the vertical. This offers several features to the author which we already mentioned in some other posts. But this time I explicitly address Plugin authors and ask them to make their Plugins more user friendly in terms of usability. I will show only two tiny features.<br />
Each of them have been discussed several times on the wp-hacker-mailing-list, but nearly everybody considers them as big improvements to usability.<br />
<span id="more-353"></span></p>
<h3>Adding icons to the menu</h3>
<p>My first tip is how to add an icon in the Plugin menu. This is not just a great eye-catcher, but will also make the menu link more obvious and lead to an increase of usability. I won't use a link to some file for the icon this time, instead I will store the icon as a <a href="http://en.wikipedia.org/wiki/Base64">base64</a>-encoded string inside of the Plugin's code. The encoded string doesn't save me just the file or a folder, besides there is no access and no request done for the image, which in the end saves some time, when rendering this page.</p>
<p>I provide a little <a href=""http://bueltge.de/test/image2base64/">Service</a> for anyone who doesn't want to write the converter for the image himself. You can easily use my <a href="http://bueltge.de/test/image2base64/">Image2Base64 Generator</a> for this purpose.</p>
<p>The icon will only appear in version 2.7 or above, which can be checked with a simple query. You can get some additional information from the comments inside the code.</p>
<pre lang="php">
/**
 * Images/ Icons in base64-encoding
 * @use function fb_sayfa_sayac_get_resource_url() for display
 */
if( isset($_GET&#091;&#039;resource&#039;&#093;) &amp;&amp; !empty($_GET&#091;&#039;resource&#039;&#093;)) {
	# base64 encoding
	$resources = array(
		&#039;ssprc.gif&#039; =&gt;
		&#039;R0lGODlhCwALAKIEANTU1Kurq/b29pSUlP///wAAAAAAAAAAAC&#039;.
		&#039;H5BAEAAAQALAAAAAALAAsAAAMlSKoRMysGIZ50A1RJ3ybNow3f&#039;.
		&#039;VJGoQo4nRJDdpwqjtcDy/dhLAgA7&#039;.
		&#039;&#039;);

	if(array_key_exists($_GET&#091;&#039;resource&#039;&#093;, $resources)) {

		$content = base64_decode($resources&#091; $_GET&#091;&#039;resource&#039;&#093; &#093;);

		$lastMod = filemtime(__FILE__);
		$client = ( isset($_SERVER&#091;&#039;HTTP_IF_MODIFIED_SINCE&#039;&#093;) ? $_SERVER&#091;&#039;HTTP_IF_MODIFIED_SINCE&#039;&#093; : false );
		// Checking if the client is validating his cache and if it is current.
		if (isset($client) &amp;&amp; (strtotime($client) == $lastMod)) {
			// Client&#039;s cache IS current, so we just respond &#039;304 Not Modified&#039;.
			header(&#039;Last-Modified: &#039;.gmdate(&#039;D, d M Y H:i:s&#039;, $lastMod).&#039; GMT&#039;, true, 304);
			exit;
		} else {
			// Image not cached or cache outdated, we respond &#039;200 OK&#039; and output the image.
			header(&#039;Last-Modified: &#039;.gmdate(&#039;D, d M Y H:i:s&#039;, $lastMod).&#039; GMT&#039;, true, 200);
			header(&#039;Content-Length: &#039;.strlen($content));
			header(&#039;Content-Type: image/&#039; . substr(strrchr($_GET&#091;&#039;resource&#039;&#093;, &#039;.&#039;), 1) );
			echo $content;
			exit;
		}
	}
}

/**
 * Display Images/ Icons in base64-encoding
 * @return $resourceID
 */
function fb_sayfa_sayac_get_resource_url($resourceID) {

	return trailingslashit( get_bloginfo(&#039;url&#039;) ) . &#039;?resource=&#039; . $resourceID;
}

/**
 * add menu in backend
 */
function fb_sayfa_sayac_add_menu() {
	global $wp_version;
	if ( current_user_can(&#039;edit_posts&#039;) &amp;&amp; function_exists(&#039;add_submenu_page&#039;) ) {

		$menutitle = &#039;&#039;;
		if ( version_compare( $wp_version, &#039;2.6.999&#039;, &#039;&gt;&#039; ) ) {
			$menutitle = &#039;&lt;img src=&quot;&#039; . wpag_get_resource_url(&#039;ssprc.gif&#039;) . &#039;&quot; alt=&quot;&quot; /&gt;&#039; . &#039; &#039;;
		}
		$menutitle .= __(&#039;Post Read Counter&#039;, &#039;sayfasayacprc&#039;);

		add_submenu_page(&#039;index.php&#039;, __(&#039;Sayfa Sayac - Post Read Counter&#039;, &#039;sayfasayacprc&#039;), $menutitle, 9, __FILE__, &#039;fb_sayfa_sayac_statistic&#039;);
		$plugin = plugin_basename(__FILE__);
		add_filter( &#039;plugin_action_links_&#039; . $plugin, &#039;fb_sayfa_sayac_plugin_actions&#039; );
	}
}
</pre>
<p>I append an additional space to the the img tag, so it's not touching the menu text. You can also achieve this with a CSS style, but this will most likely be an inline style, which is unnecessary code and the performance will suffer a little bit in your backend. I have been talking about this to the WordPress developers for some time and maybe we will get the CSS definitions with 2.7.</p>
<h3>Direct link to "Settings"</h3>
<p><div id="attachment_355" class="wp-caption alignnone" style="width: 186px"><img src="http://wpengineer.com/wp-content/uploads/settings.png" alt="Settings links" title="settings" width="176" height="268" class="size-full wp-image-355" /><p class="wp-caption-text">Settings links</p></div></p>
<p>If you read the code above carefully, you probably noticed the use of the filter <code>plugin_action_links</code>. I use this filter to add a "Settings" link. This makes it easier for the user to find the settings page of your Plugin. Mostly the user has to search for the settings page of your Plugin, this can be a real time saver. In my screenshot you can see that I always put the "Settings" leftmost to the standard links <em>"Deactivate"</em> and <em>"Edit"</em>.</p>
<pre lang="php">
/**
 * Adds an action link to the Plugins page
 */
function fb_sayfa_sayac_plugin_actions($links) {

	$settings_link = &#039;&lt;a href=&quot;sayfa_sayac_de.php&quot;&gt;&#039; . __(&#039;Settings&#039;) . &#039;&lt;/a&gt;&#039;;
	array_unshift( $links, $settings_link );

	return $links;
}
</pre>
<p>The above function only works in WordPress 2.7 (more Informations form <a href="http://elektroelch.de/blog/2008/11/06/wordpress-absprung-im-plugin-bereich-v27/">Latz on his post</a> in German) and has been explained in great detail by <a href="http://elektroelch.de/blog/direct-settings-27/">Latz</a>! If you like to preserve compatibility with previous WordPress versions, you can do it with this snippet:</p>
<pre lang="php">
/**
 * Adds an action link to the Plugins page
 */
function fb_sayfa_sayac_plugin_actions($links, $file){
	static $this_plugin;

	if( !$this_plugin ) $this_plugin = plugin_basename(__FILE__);

	if( $file == $this_plugin ){
		$settings_link = &#039;&lt;a href=&quot;index.php?page=sayfa_sayac/sayfa_sayac_de.php&quot;&gt;&#039; . __(&#039;Settings&#039;) . &#039;&lt;/a&gt;&#039;;
		$links = array_merge( array($settings_link), $links); // before other links
	}
	return $links;
}
</pre>
<p>If you have to use this snippet, then the filter has to be used in a different way. You have to replace the code in function <code>fb_sayfa_sayac_add_menu()</code>:</p>
<pre lang="php">
$plugin = plugin_basename(__FILE__);
add_filter( &#039;plugin_action_links_&#039; . $plugin, &#039;fb_sayfa_sayac_plugin_actions&#039; );
</pre>
<p>with this</p>
<pre lang="php">
add_filter( &#039;plugin_action_links&#039;, &#039;fb_sayfa_sayac_plugin_actions&#039;, 10, 2 );
</pre>
<h3>Activate both hooks</h3>
<p>I can activate both hooks using the action <code>admin_menu</code>. Beforehand I check if the user is in the admin menu, so the code doesn't get evaluated if he is not.</p>
<pre lang="php">
/* Register WordPress hooks */
if ( is_admin() ) {
	add_action(&#039;admin_menu&#039;, &#039;fb_sayfa_sayac_add_menu&#039;);
}
</pre>
<p>I think that these two features really add some extra value for all WordPress users. Besides many Plugins have these features already integrated and I'm sure some more Plugins will get updated soon. Many users have confirmed the better usability, especially with the "Settings" link. Please use our comment area for more ideas, critics and compliments. We appreciate any suggestions you can give.<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/353/how-to-improve-wordpress-plugins/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>Add WordPress Dashboard Widgets</title>
		<link>http://wpengineer.com/307/add-wordpress-dashboard-widgets/</link>
		<comments>http://wpengineer.com/307/add-wordpress-dashboard-widgets/#comments</comments>
		<pubDate>Mon, 27 Oct 2008 01:49:05 +0000</pubDate>
		<dc:creator>Frank</dc:creator>
				<category><![CDATA[WordPress Hacks]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[Theme]]></category>
		<category><![CDATA[Widget]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress Tutorials]]></category>
		<category><![CDATA[WP]]></category>
		<category><![CDATA[wp2.7]]></category>

		<guid isPermaLink="false">http://wpengineer.com/?p=307</guid>
		<description><![CDATA[Finally WordPress 2.7 is coming along with widgets in the dashboard area, so it will be possible to adjust your dashboard as you like. For Plugin or theme authors it's even more interesting, since they can give the users additional value to their Plugins. They can offer information from their Plugin directly on the dashboard. [...]]]></description>
			<content:encoded><![CDATA[<p>Finally WordPress 2.7 is coming along with widgets in the dashboard area, so it will be possible to adjust your dashboard as you like.</p>
<p>For Plugin or theme authors it's even more interesting, since they can give the users additional value to their Plugins. They can offer information from their Plugin directly on the dashboard. The user can decide if he likes to display them or not.</p>
<p>It's easy to integrate and can be controlled like <a href="http://wpengineer.com/use-metaboxes-in-your-theme-or-plugin/">Meta Boxes (explained in detail)</a>. The following example shows how you can integrate a widget in a dashboard.<br />
<span id="more-307"></span></p>
</pre>
<p><div id="attachment_308" class="wp-caption aligncenter" style="width: 460px"><img src="http://wpengineer.com/wp-content/uploads/wp27-dashboard-erweitern.png" alt="WP 2.7 with new Widget in Dashboard" title="wp27-dashboard-expand" width="450" height="308" class="size-full wp-image-308" /><p class="wp-caption-text">WP 2.7 with new Widget in Dashboard</p></div></p>
<p>The above screenshot shows that I addes the widget <em>Test My Dashboard</em>. Also you can see the possibility to deactivate the widget in the menu.</p>
<pre lang="php">
/**
 * Content of Dashboard-Widget
 */
function my_wp_dashboard_test() {
	echo &#039;Test Add Dashboard-Widget&#039;;
}

/**
 * add Dashboard Widget via function wp_add_dashboard_widget()
 */
function my_wp_dashboard_setup() {
	wp_add_dashboard_widget( &#039;my_wp_dashboard_test&#039;, __( &#039;Test My Dashboard&#039; ), &#039;my_wp_dashboard_test&#039; );
}

/**
 * use hook, to integrate new widget
 */
add_action(&#039;wp_dashboard_setup&#039;, &#039;my_wp_dashboard_setup&#039;);
</pre>
<p>The function <code>wp_add_dashboard_widget()</code> is the key, which delivers the new widget; via hook <code>wp_dashboard_setup</code> it will be activated on the dashboard.</p>
<pre lang="php">
function wp_add_dashboard_widget( $widget_id, $widget_name, $callback, $control_callback = null )
</pre>
<p>The function needs 3 parameters and an additional one is optional.</p>
<ol>
<li>The <strong>ID</strong>, <em>first parameter</em>,will be used to deactivate the widget via JavaScript. In the Menu:
<pre lang="php">
&lt;label for=&quot;my_wp_dashboard_test-hide&quot;&gt;&lt;input class=&quot;hide-postbox-tog&quot; name=&quot;my_wp_dashboard_test-hide&quot; type=&quot;checkbox&quot; id=&quot;my_wp_dashboard_test-hide&quot; value=&quot;my_wp_dashboard_test&quot; checked=&quot;checked&quot; /&gt;Test My Dashboard&lt;/label&gt;
</pre>
<p>and also in the widget:</p>
<pre lang="php">
&lt;div id=&quot;my_wp_dashboard_test&quot; class=&quot;postbox &quot; &gt;
&lt;h3 class=&#039;hndle&#039;&gt;&lt;span&gt;Test My Dashboard&lt;/span&gt;&lt;/h3&gt;
&lt;div class=&quot;inside&quot;&gt;Test Add Dashboard-Widget&lt;/div&gt;
&lt;/div&gt;
</pre>
</li>
<li>The <em>second parameter</em> delivers the <strong>name</strong>, which will be displayed, wrapped in an h3-tag.
<pre lang="php">&lt;h3 class=&#039;hndle&#039;&gt;&lt;span&gt;Test My Dashboard&lt;/span&gt;&lt;/h3&gt;</pre>
</li>
<li>With the help of the <em>third parameter</em> the third <strong>function</strong> gets delivered, it contains the content of the widget. The <code>echo</code> does not take place, you have to use it explicitly. Therefore not only the content can be displayed, which makes it more flexible.</li>
</ol>
<h4>Hint</h4>
<p>The hook <code>activity_box_end</code>, which is available since version 2.3, still exists. It adds the content in widget &#8222;<em>Right Now</em>&#8220;.</p>
<h4>Update</h4>
<p>Nice to read: a update of this post to include options in the dashboard widget: <a href="http://rick.jinlabs.com/2009/02/01/how-add-options-to-your-wordpress-27-dashboard-widgets/">How add options to your WordPress 2.7 dashboard widgets</a><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/307/add-wordpress-dashboard-widgets/feed/</wfw:commentRss>
		<slash:comments>36</slash:comments>
		</item>
		<item>
		<title>Strange Things With Sticky Posts</title>
		<link>http://wpengineer.com/293/strange-things-with-sticky-posts/</link>
		<comments>http://wpengineer.com/293/strange-things-with-sticky-posts/#comments</comments>
		<pubDate>Wed, 22 Oct 2008 04:28:14 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[WordPress Hacks]]></category>
		<category><![CDATA[conditional tag]]></category>
		<category><![CDATA[sticky]]></category>
		<category><![CDATA[template tag]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[wp2.7]]></category>

		<guid isPermaLink="false">http://wpengineer.com/?p=293</guid>
		<description><![CDATA[Frank wrote in one of his last posts about the new sticky functionality in WordPress 2.7. Right now I'm working on a special theme and I noticed some strange things with sticky posts. Wrong Post Count If you like to show 6 posts on a page, I use query_posts('showposts=6');. But if one or more posts [...]]]></description>
			<content:encoded><![CDATA[<p>Frank wrote in one of his last posts about the new <a href="http://wpengineer.com/sticky-function-in-wordpress-27/" title="sticky function in WordPress 2.7">sticky functionality</a> in WordPress 2.7. Right now I'm working on a special theme and I noticed some strange things with sticky posts.<br />
<span id="more-293"></span></p>
<h3>Wrong Post Count</h3>
<p>If you like to show 6 posts on a page, I use <code>query_posts('showposts=6');</code>. But if one or more posts are "sticky", they get added to the other 6 posts. To show 6 posts actually, you have to know how many sticky posts you have.</p>
<p><strong>The solution:</strong></p>
<p><code>get_option('sticky_post')</code> gives you an array back with sticky post ID, which we can count.</p>
<pre lang="php">
$sticky = count(get_option(&#039;sticky_posts&#039;));
query_posts(&#039;showposts=&#039;. ( 6 - $sticky ));
</pre>
<h3>Still showing sticky posts in chronological sort order</h3>
<p>Pay attention to the CSS classes of the posts. The template tag <code>post_class()</code> gives the post the class. In the case of sticky post, it is also the class "sticky". If you think you can give the class sticky a red background and black border to have a nice teaser you will be disappointed. If you go to the next page to see previous posts, the sticky post will also be showed in the chronological order with a red background and black borders. Not really cool.</p>
<h3>Kill the Sticky</h3>
<p>If you don't want to have sticky posts, just write in your template:</p>
<pre lang="php">
update_option(&#039;sticky_posts&#039;, array());
</pre>
<p>With the empty array you overwrite the sticky options and no sticky posts are availably.</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/293/strange-things-with-sticky-posts/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>New Navi-Design in WordPress 2.7</title>
		<link>http://wpengineer.com/262/new-navi-design-in-wordpress-27/</link>
		<comments>http://wpengineer.com/262/new-navi-design-in-wordpress-27/#comments</comments>
		<pubDate>Tue, 14 Oct 2008 10:14:54 +0000</pubDate>
		<dc:creator>Frank</dc:creator>
				<category><![CDATA[WordPress News]]></category>
		<category><![CDATA[backend]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[wp2.7]]></category>

		<guid isPermaLink="false">http://wpengineer.com/?p=262</guid>
		<description><![CDATA[The Design and structure of the coming WordPress version 2.7 were presented several times already and discussed many times. Here are the new structure how the navigation design looks in WordPress 2.7, your thoughts? Update The new Design, today (29/10/2008) in beta. &#169; WP Engineer Team, All rights reserved (Digital Fingerprint: WPEngineer-be0254ce2b4972feb4b9cb72034a092d)]]></description>
			<content:encoded><![CDATA[<p>The Design and structure of the coming WordPress version 2.7 were presented several times already and discussed many times. Here are the new structure how the navigation design looks in WordPress 2.7, your thoughts?</p>
<p><div id="attachment_263" class="wp-caption aligncenter" style="width: 510px"><img src="http://wpengineer.com/wp-content/uploads/wp27_navi.png" alt="WP 2.7 Navi. actually Beta" title="wp27_navi" width="500" height="327" class="size-full wp-image-263" /><p class="wp-caption-text">WP 2.7 Navi. actually Beta</p></div></p>
<h4>Update</h4>
<p>The new Design, today (29/10/2008) in beta.<br />
<div id="attachment_308" class="wp-caption aligncenter" style="width: 460px"><img src="http://wpengineer.com/wp-content/uploads/wp27-dashboard-erweitern.png" alt="WP 2.7 with new Widget in Dashboard" title="wp27-dashboard-erweitern" width="450" height="247" class="size-full wp-image-308" /><p class="wp-caption-text">WP 2.7 with new Widget in Dashboard</p></div><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/262/new-navi-design-in-wordpress-27/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>How Core Update in WordPress 2.7 Works?</title>
		<link>http://wpengineer.com/227/how-core-update-in-wordpress-27-works/</link>
		<comments>http://wpengineer.com/227/how-core-update-in-wordpress-27-works/#comments</comments>
		<pubDate>Tue, 07 Oct 2008 17:57:27 +0000</pubDate>
		<dc:creator>Frank</dc:creator>
				<category><![CDATA[WordPress News]]></category>
		<category><![CDATA[update]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[wp2.7]]></category>

		<guid isPermaLink="false">http://wpengineer.com/?p=227</guid>
		<description><![CDATA[In recent days, there are more and more information about WordPress version 2.7 coming up. Especially about the automatic upgrade of WordPress. You already know the update function for Plugins, which is very convenient. Now the same for your WordPress installation, one click and you are up to date. Such a powerful and important function [...]]]></description>
			<content:encoded><![CDATA[<p>In recent days, there are more and more information about WordPress version 2.7 coming up. Especially about the automatic upgrade of WordPress.</p>
<p>You already know the update function for Plugins, which is very convenient. Now the same for your WordPress installation, one click and you are up to date.</p>
<p>Such a powerful and important function comes along with some questions and doubts of course.</p>
<p><div id="attachment_221" class="wp-caption aligncenter" style="width: 460px"><img src="http://wpengineer.com/wp-content/uploads/wp27_core_update.png" alt="WordPress 2.7 Core Update" title="wp27_core_update" width="450" height="260" class="size-full wp-image-221" /><p class="wp-caption-text">WordPress 2.7 Core Update</p></div></p>
<p>It's your own decision if you want to trust this function, but it's more secure than the automatic update for Plugins, since the Plugins are provided by different authors without control by the WordPress team. The process of the automatic WordPress update is well thought out, which I will explain, so you can get a better picture of it and it makes your decision easier for you if you want to use it or you still update manually.<br />
<span id="more-227"></span></p>
<ul>
<li>Your installation sends version and localization to <a href="http://api.wordpress.org/core/version-check/1.2/">http://api.wordpress.org/core/version-check/1.2/</a> and proofs if there is a newer version available. If there is a newer version, it sends back an address to the new available version. It also sends it in the correct language of your current installation. But right now, there is only the English version.</li>
<li>If there is a newer version, the files will be downloaded in system-temp.</li>
<li>Afterwards it creates a folder <code>wp-content/upgrade/core</code></li>
<li>Now the file <code>wp-admin/includes/update-core.php</code> will be copied from the new download package into the current installation.</li>
<li>This new file will be used to start the function <code>update_core()</code>.</li>
<li>The new version will be proved.</li>
<li>A file will be created in root for the maintain modus (<code>.maintenance</code> file). The file <code>wp-settings.php</code> checks that and avoid any access if this file exists. The visitor will just see a simple HTML page with a short message:<br />
<blockquote><p>Briefly unavailable for scheduled maintenance. Check back in a minute.</p></blockquote>
</li>
<li>Because of this maintain modus no one can access any files and now all files are getting copied from the installation package to the current installation.</li>
<li>All unneeded files are going to be deleted.</li>
<li><code>ugrade.php</code> contains the information, that the database can be upgraded now. You have to confirm the database update, so it is only possible after all new files are copied to the current installation.</li>
<li><code>wp-content/upgrade/core</code> will be deleted after a successful update.</li>
<li>The same with <code>.maintenance</code>.</li>
<li>After that the frontend is available again and all upgrade steps are listed in your admin area. Where you can see where a problem occurred if your upgrade wasn't successful.</li>
</ul>
<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/227/how-core-update-in-wordpress-27-works/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>WordPress 2.7 Update Core</title>
		<link>http://wpengineer.com/220/wordpress-27-update-core/</link>
		<comments>http://wpengineer.com/220/wordpress-27-update-core/#comments</comments>
		<pubDate>Fri, 03 Oct 2008 23:51:34 +0000</pubDate>
		<dc:creator>Frank</dc:creator>
				<category><![CDATA[WordPress News]]></category>
		<category><![CDATA[core]]></category>
		<category><![CDATA[update]]></category>
		<category><![CDATA[wp2.7]]></category>

		<guid isPermaLink="false">http://wpengineer.com/?p=220</guid>
		<description><![CDATA[The current development version with the core update is available now. Everybody can test it, the development team ask for your feedback. Everybody who doesn't want to check the SVN might be interested in this screenshot. This function amazed by it's simplicity, click, lean back and relax - done! It's still in Beta and I'm [...]]]></description>
			<content:encoded><![CDATA[<p>The current development version with the core update is available now. Everybody can test it, the development team ask for your feedback. Everybody who doesn't want to check the SVN might be interested in this screenshot.</p>
<p><div id="attachment_221" class="wp-caption aligncenter" style="width: 460px"><img src="http://wpengineer.com/wp-content/uploads/wp27_core_update.png" alt="WordPress 2.7 Core Update" title="wp27_core_update" width="450" height="260" class="size-full wp-image-221" /><p class="wp-caption-text">WordPress 2.7 Core Update</p></div></p>
<p>This function amazed by it's simplicity, click, lean back and relax - done! <span id="more-220"></span><br />
It's still in Beta and I'm sure many people will talk about the functionality, but that was a popular desire of the WordPress community. Will see if the endless discussion about the upgrade cycles will end or still continue.</p>
<p>Alternative you can still download the current version and install manually like always . Additional WordPress has to offer an own backup system. This saves the use of other Plugins and an upgrade including a backup is fast and simple. The backup creates a XML-File in WordPress format (WordPress WXR), which you can easily import again. It was greatly appreciated in WP-Hacker forum that you can find this function under tools.<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/220/wordpress-27-update-core/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

