<?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.8</title> <atom:link href="http://wpengineer.com/tag/wp28/feed/" rel="self" type="application/rss+xml" /><link>http://wpengineer.com</link> <description>WordPress News, Hacks, Tipps, Tutorials, Plugins and Themes</description> <lastBuildDate>Wed, 28 Jul 2010 13:37:05 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=2690</generator> <xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" /> <item><title>Themes and automatic_feed_links</title><link>http://wpengineer.com/themes-and-automatic_feed_links/</link> <comments>http://wpengineer.com/themes-and-automatic_feed_links/#comments</comments> <pubDate>Fri, 04 Sep 2009 11:56:13 +0000</pubDate> <dc:creator>Michael</dc:creator> <category><![CDATA[WordPress Hacks]]></category> <category><![CDATA[WordPress Themes]]></category> <category><![CDATA[hack]]></category> <category><![CDATA[Theme]]></category> <category><![CDATA[WordPress]]></category> <category><![CDATA[wp2.8]]></category><guid
isPermaLink="false">http://wpengineer.com/?p=1655</guid> <description><![CDATA[Since WordPress 2.8, there is the function automatic_feed_links() in the function.php. Which writes the link elements for the RSS protocols in the header of the document. The advantage of this feature is, you do not need to worry about whether a change comes in the Feed-protocoll in a new version of WordPress, removed or a [...]]]></description> <content:encoded><![CDATA[<p>Since WordPress 2.8, there is the function <strong>automatic_feed_links()</strong> in the function.php. Which writes the link elements for the RSS protocols in the header of the document. The advantage of this feature is, you do not need to worry about whether a change comes in the Feed-protocoll in a new version of WordPress, removed or a new one is added.</p><p><! - more -><br
/> If we develop a theme for the general public, you have 2 options. You use automatic_feed_links() and the theme does not work with WordPress prior to version 2.8, or you do not use this function and write the links as before, in your header.php.</p><p>I also have a 3rd alternative <img
src='http://wpengineer.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> .</p><div
class="wp_syntax"><div
class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">function_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'automatic_feed_links'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    automatic_feed_links<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
    add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'wp_head'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'wpe_feed_links'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> wpe_feed_links<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;link rel=&quot;alternate&quot; type=&quot;application/rss+xml&quot; title=&quot;'</span><span style="color: #339933;">.</span> get_bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'name'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">' RSS Feed&quot; href=&quot;'</span><span style="color: #339933;">.</span> get_bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'rss2_url'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot; /&gt;'</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;link rel=&quot;alternate&quot; type=&quot;application/atom+xml&quot; title=&quot;'</span><span style="color: #339933;">.</span> get_bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'name'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">' Atom Feed&quot; href=&quot;'</span><span style="color: #339933;">.</span> get_bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'atom_url'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot; /&gt;'</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;link rel=&quot;alternate&quot; type=&quot;application/rss+xml&quot; title=&quot;'</span><span style="color: #339933;">.</span> get_bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'name'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">' '</span><span style="color: #339933;">.</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'The latest comments to all posts in RSS'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot; href=&quot;'</span><span style="color: #339933;">.</span> get_bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'comments_rss2_url'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot; /&gt;'</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div><p>First we look if the function automatic_feed_links() exists. If not (prior to WP 2.8), we use the hook wp_head and write the links in the header of the page. Thus we don't need to adjust the header.php anymore.<br
/><hr
/><h3>Related posts:</h3><ul><li><a
href="http://wpengineer.com/wordpress-28-body_class-automatic_feed_links/" rel="bookmark" title="Permanent Link: WordPress 2.8 body_class, automatic_feed_links" class="liinternal">WordPress 2.8 body_class, automatic_feed_links</a></li><li><a
href="http://wpengineer.com/change-your-wordpress-theme-on/" rel="bookmark" title="Permanent Link: Change your WordPress Theme on Dependency" class="liinternal">Change your WordPress Theme on Dependency</a></li><li><a
href="http://wpengineer.com/theme-uninstaller/" rel="bookmark" title="Permanent Link: 5th Post Of Our Advent Calendar: Theme Uninstaller" class="liinternal">5th Post Of Our Advent Calendar: Theme Uninstaller</a></li><li><a
href="http://wpengineer.com/use-more-flexibility-in-wordpress-templates/" rel="bookmark" title="Permanent Link: Use More Flexibility In WordPress Templates" class="liinternal">Use More Flexibility In WordPress Templates</a></li><li><a
href="http://wpengineer.com/set-options-on-activation-themes/" rel="bookmark" title="Permanent Link: Set options on activation Themes" class="liinternal">Set options on activation Themes</a></li></ul><hr
/><p><img
style="float:left;" src="http://wpengineer.com/favicon.ico" alt="WP Engineer Favicon"/> Thanks for subscribing our feed! <a
href="http://buysellads.com/buy/detail/3646/" class="liexternal">Sponsor the WP Engineer Blog</a> and get your brand in front of several hundred users per day!<br
/> &copy; <a
href="http://wpengineer.com/" class="liinternal">WP Engineer Team</a>, All rights reserved <small>(Digital Fingerprint: WPEngineer-be0254ce2b4972feb4b9cb72034a092d)</small></p> ]]></content:encoded> <wfw:commentRss>http://wpengineer.com/themes-and-automatic_feed_links/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>WordPress 2.8 Single Post Navigation Widget</title><link>http://wpengineer.com/wordpress-2-8-single-post-navigation-widget/</link> <comments>http://wpengineer.com/wordpress-2-8-single-post-navigation-widget/#comments</comments> <pubDate>Mon, 27 Jul 2009 13:38:57 +0000</pubDate> <dc:creator>Michael</dc:creator> <category><![CDATA[WordPress Tutorials]]></category> <category><![CDATA[Widget]]></category> <category><![CDATA[Widget API]]></category> <category><![CDATA[WordPress]]></category> <category><![CDATA[wp2.8]]></category><guid
isPermaLink="false">http://wpengineer.com/?p=1551</guid> <description><![CDATA[Since WordPress 2.8, there is a new Widget API. In our post Build A WordPress 2.8 Widget With The New Widget API, I have used a simple example to describe how to build a Widget. This time Heiko and I've created something more complex. It is a Post Navigation Widget, which lists in the single [...]]]></description> <content:encoded><![CDATA[<p>Since WordPress 2.8, there is a new <strong>Widget API</strong>. In our post <a
href="http://wpengineer.com/wordpress-built-a-widget/" title="WordPress 2.8 Widget API" class="liinternal">Build A WordPress 2.8 Widget With The New Widget API</a>, I have used a simple example to describe how to build a <strong>Widget</strong>. This time Heiko and I've created something more complex.</p><p><span
id="more-1551"></span><br
/> It is a Post Navigation Widget, which lists in the single post view (single.php) a specific number of posts which were published before this post and a certain number of posts which were published after this post. I think this is a nice way to show older posts in the sidebar. Here's a screenshot, left of the backend, right of the sidebar:</p><p><img
src="http://wpengineer.com/blog/wp-content/uploads/post-navigation-widget.png" alt="WordPress Single Post Navigation Widget" title="WordPress Single Post Navigation Widget" width="505" height="386" class="aligncenter size-full wp-image-1553" /></p><p>I created a query to check if the class <strong>WP_Widget</strong> even exists, so the user won't get any error messages in WordPress versions prior to 2.8.</p><div
class="wp_syntax"><div
class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">class_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'WP_Widget'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">class</span> WPE_Widget_Post_Navigation <span style="color: #000000; font-weight: bold;">extends</span> WP_Widget <span style="color: #009900;">&#123;</span>
&nbsp;
        <span style="color: #000000; font-weight: bold;">function</span> WPE_Widget_Post_Navigation<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000088;">$widget_ops</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'classname'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'wpe_widget_post_navi'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'description'</span> <span style="color: #339933;">=&gt;</span> __<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">&quot;Some posts before and after the current post&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">WP_Widget</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'wpe-post-navi'</span><span style="color: #339933;">,</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'WPE Single Post Navigation'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$widget_ops</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
&nbsp;
        <span style="color: #000000; font-weight: bold;">function</span> widget<span style="color: #009900;">&#40;</span><span style="color: #000088;">$args</span><span style="color: #339933;">,</span> <span style="color: #000088;">$instance</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span>is_single<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                <span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$post</span><span style="color: #339933;">,</span> <span style="color: #000088;">$wpdb</span><span style="color: #339933;">;</span>
                <span style="color: #990000;">extract</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$args</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
                <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span><span style="color: #000088;">$number</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>int<span style="color: #009900;">&#41;</span> <span style="color: #000088;">$instance</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'number'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span>
                    <span style="color: #000088;">$number</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">5</span><span style="color: #339933;">;</span>
                <span style="color: #b1b100;">elseif</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$number</span> <span style="color: #339933;">&lt;</span> <span style="color: #cc66cc;">1</span> <span style="color: #009900;">&#41;</span>
                    <span style="color: #000088;">$number</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span>
                <span style="color: #b1b100;">elseif</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$number</span> <span style="color: #339933;">&gt;</span> <span style="color: #cc66cc;">10</span> <span style="color: #009900;">&#41;</span>
                    <span style="color: #000088;">$number</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">10</span><span style="color: #339933;">;</span>
&nbsp;
                <span style="color: #000088;">$title_before</span> 		<span style="color: #339933;">=</span> apply_filters<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'widget_title'</span><span style="color: #339933;">,</span> <span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$instance</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'title_before'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> ? <span style="color: #0000ff;">'Posts before'</span> <span style="color: #339933;">:</span> <span style="color: #000088;">$instance</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'title_before'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #000088;">$title_after</span>	 	<span style="color: #339933;">=</span> apply_filters<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'widget_title'</span><span style="color: #339933;">,</span> <span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$instance</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'title_after'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> ? <span style="color: #0000ff;">'Posts after'</span> <span style="color: #339933;">:</span> <span style="color: #000088;">$instance</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'title_after'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #000088;">$before_widget_2</span>	<span style="color: #339933;">=</span> <span style="color: #990000;">preg_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;/(wpe\-post\-navi-\d+)/&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;<span style="color: #006699; font-weight: bold;">$1</span>-1&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$before_widget</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
                <span style="color: #000088;">$querystr</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;
                    SELECT *
                    FROM <span style="color: #006699; font-weight: bold;">$wpdb-&gt;posts</span> wposts
                    WHERE wposts.ID != <span style="color: #006699; font-weight: bold;">$post-&gt;ID</span>
                    AND wposts.post_type = 'post'
                    AND wposts.post_status = 'publish'
                    AND wposts.post_date <span style="color: #009933; font-weight: bold;">%s</span> '<span style="color: #006699; font-weight: bold;">$post-&gt;post_date</span>'
                    ORDER BY wposts.post_date <span style="color: #009933; font-weight: bold;">%s</span>
                    LIMIT <span style="color: #006699; font-weight: bold;">$number</span>
                 &quot;</span><span style="color: #339933;">;</span>
&nbsp;
                <span style="color: #000088;">$leading_posts</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$wpdb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_results</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">sprintf</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$querystr</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'&lt;'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'DESC'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> OBJECT<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #000088;">$trailing_posts</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$wpdb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_results</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">sprintf</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$querystr</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'&gt;'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'ASC'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> OBJECT<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
                <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$trailing_posts</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #990000;">count</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$trailing_posts</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                    <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$before_widget_2</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$before_title</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$title_before</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$after_title</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;ul&gt;&quot;</span><span style="color: #339933;">;</span>
                    <span style="color: #000088;">$trailing_posts</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array_reverse</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$trailing_posts</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    <span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$trailing_posts</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$post</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                        setup_postdata<span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                        <span style="color: #000000; font-weight: bold;">?&gt;</span> &lt;li&gt;&lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_permalink<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; title=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> esc_attr<span style="color: #009900;">&#40;</span>get_the_title<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> ? get_the_title<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> get_the_ID<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> get_the_title<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> the_title<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">else</span> the_ID<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> &lt;/a&gt;&lt;/li&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span>
                    <span style="color: #009900;">&#125;</span>
                    <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;/ul&gt;&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$after_widget</span><span style="color: #339933;">;</span>
                <span style="color: #009900;">&#125;</span>
&nbsp;
                <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$leading_posts</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #990000;">count</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$leading_posts</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                    <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$before_widget</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$before_title</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$title_after</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$after_title</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;ul&gt;&quot;</span><span style="color: #339933;">;</span>
                    <span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$leading_posts</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$post</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                        setup_postdata<span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                        <span style="color: #000000; font-weight: bold;">?&gt;</span> &lt;li&gt;&lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_permalink<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; title=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> esc_attr<span style="color: #009900;">&#40;</span>get_the_title<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> ? get_the_title<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> get_the_ID<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> get_the_title<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> the_title<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">else</span> the_ID<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> &lt;/a&gt;&lt;/li&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span>
                    <span style="color: #009900;">&#125;</span>
                    <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;/ul&gt;&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$after_widget</span><span style="color: #339933;">;</span>
                <span style="color: #009900;">&#125;</span>
                wp_reset_query<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span>
        <span style="color: #009900;">&#125;</span>
&nbsp;
        <span style="color: #000000; font-weight: bold;">function</span> update<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$new_instance</span><span style="color: #339933;">,</span> <span style="color: #000088;">$old_instance</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000088;">$instance</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$old_instance</span><span style="color: #339933;">;</span>
            <span style="color: #000088;">$instance</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'title_before'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">strip_tags</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$new_instance</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'title_before'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #000088;">$instance</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'number'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>int<span style="color: #009900;">&#41;</span> <span style="color: #000088;">$new_instance</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'number'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
            <span style="color: #000088;">$instance</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'title_after'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">strip_tags</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$new_instance</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'title_after'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
            <span style="color: #b1b100;">return</span> <span style="color: #000088;">$instance</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
        <span style="color: #000000; font-weight: bold;">function</span> form<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$instance</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000088;">$title_before</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$instance</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'title_before'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span> ? <span style="color: #0000ff;">'Posts before'</span> <span style="color: #339933;">:</span> esc_attr<span style="color: #009900;">&#40;</span><span style="color: #000088;">$instance</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'title_before'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #000088;">$title_after</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$instance</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'title_after'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span> ? <span style="color: #0000ff;">'Posts after'</span> <span style="color: #339933;">:</span> esc_attr<span style="color: #009900;">&#40;</span><span style="color: #000088;">$instance</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'title_after'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span><span style="color: #000088;">$number</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>int<span style="color: #009900;">&#41;</span> <span style="color: #000088;">$instance</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'number'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span>
                <span style="color: #000088;">$number</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">5</span><span style="color: #339933;">;</span>
            <span style="color: #b1b100;">elseif</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$number</span> <span style="color: #339933;">&lt;</span> <span style="color: #cc66cc;">1</span> <span style="color: #009900;">&#41;</span>
                <span style="color: #000088;">$number</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span>
            <span style="color: #b1b100;">elseif</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$number</span> <span style="color: #339933;">&gt;</span> <span style="color: #cc66cc;">10</span> <span style="color: #009900;">&#41;</span>
                <span style="color: #000088;">$number</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">10</span><span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">?&gt;</span>
            &lt;p&gt;&lt;label for=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_field_id</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'title_before'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;Title before:&lt;/label&gt;
            &lt;input class=&quot;widefat&quot; id=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_field_id</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'title_before'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; name=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_field_name</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'title_before'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; type=&quot;text&quot; value=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$title_before</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; /&gt;&lt;/p&gt;
            &lt;p&gt;&lt;label for=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_field_id</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'title_after'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;Title after:&lt;/label&gt;
            &lt;input class=&quot;widefat&quot; id=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_field_id</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'title_after'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; name=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_field_name</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'title_after'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; type=&quot;text&quot; value=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$title_after</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; /&gt;&lt;/p&gt;
            &lt;p&gt;&lt;label for=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_field_id</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'number'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;Number of posts to show before and after current post:&lt;/label&gt;
            &lt;input id=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_field_id</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'number'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; name=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_field_name</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'number'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; type=&quot;text&quot; value=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$number</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; size=&quot;3&quot; /&gt;&lt;br /&gt;
            &lt;small&gt;(at most 10)&lt;/small&gt;&lt;/p&gt;
    <span style="color: #000000; font-weight: bold;">&lt;?php</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span>
    register_widget<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'WPE_Widget_Post_Navigation'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div><p>Most of this should be self-explanatory. Now to the function <strong>widget () </strong>, which does the actual work. Here we had to do a little trick, because the widget actually creates 2 widgets, and they would get the same ID. That wouldn't be valid, so the code adds a -1 to one of the widget elements:</p><div
class="wp_syntax"><div
class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$before_widget_2</span> <span style="color: #339933;">=</span> <span style="color: #990000;">preg_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;/(wpe\-post\-navi-\d+)/&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;<span style="color: #006699; font-weight: bold;">$1</span>-1&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$before_widget</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div><p>2 queries are getting executed. One for the posts before this post and one for the posts after this post. if posts are available they will show up on the sidebar.</p><p><a
href="http://wpengineer.com/?download=Single%20Post%20Navigation%20Widget" title="Download Widget" class="liinternal">Download Widget</a>.<br
/> Then unpack and copy the code into <strong>functions.php</strong>. Please note, the widget is for <strong>WordPress 2.8</strong>.<br
/><hr
/><h3>Related posts:</h3><ul><li><a
href="http://wpengineer.com/wordpress-built-a-widget/" rel="bookmark" title="Permanent Link: Build A WordPress 2.8 Widget With The New Widget API" class="liinternal">Build A WordPress 2.8 Widget With The New Widget API</a></li><li><a
href="http://wpengineer.com/advent-calendar-24-days-tips-and-tricks-each-day-today-wordpress-comment-form-widget/" rel="bookmark" title="Permanent Link: Advent Calendar &#8211; 24 Days Tips And Tricks Each Day! Today: WordPress Comment Form Widget" class="liinternal">Advent Calendar &#8211; 24 Days Tips And Tricks Each Day! Today: WordPress Comment Form Widget</a></li><li><a
href="http://wpengineer.com/add-wordpress-dashboard-widgets/" rel="bookmark" title="Permanent Link: Add WordPress Dashboard Widgets" class="liinternal">Add WordPress Dashboard Widgets</a></li><li><a
href="http://wpengineer.com/wordpress-28-widgets-options-page/" rel="bookmark" title="Permanent Link: WordPress 2.8 Widgets Options Page &#8211; First Screenshot!" class="liinternal">WordPress 2.8 Widgets Options Page &#8211; First Screenshot!</a></li><li><a
href="http://wpengineer.com/new-navi-design-in-wordpress-27/" rel="bookmark" title="Permanent Link: New Navi-Design in WordPress 2.7" class="liinternal">New Navi-Design in WordPress 2.7</a></li></ul><hr
/><p><img
style="float:left;" src="http://wpengineer.com/favicon.ico" alt="WP Engineer Favicon"/> Thanks for subscribing our feed! <a
href="http://buysellads.com/buy/detail/3646/" class="liexternal">Sponsor the WP Engineer Blog</a> and get your brand in front of several hundred users per day!<br
/> &copy; <a
href="http://wpengineer.com/" class="liinternal">WP Engineer Team</a>, All rights reserved <small>(Digital Fingerprint: WPEngineer-be0254ce2b4972feb4b9cb72034a092d)</small></p> ]]></content:encoded> <wfw:commentRss>http://wpengineer.com/wordpress-2-8-single-post-navigation-widget/feed/</wfw:commentRss> <slash:comments>8</slash:comments> </item> <item><title>Cleanup WordPress Header</title><link>http://wpengineer.com/wordpress-header/</link> <comments>http://wpengineer.com/wordpress-header/#comments</comments> <pubDate>Mon, 13 Jul 2009 13:24:03 +0000</pubDate> <dc:creator>Frank</dc:creator> <category><![CDATA[WordPress Hacks]]></category> <category><![CDATA[PHP]]></category> <category><![CDATA[WordPress]]></category> <category><![CDATA[WordPress 2.8]]></category> <category><![CDATA[WordPress Themes]]></category> <category><![CDATA[WordPress Tutorials]]></category> <category><![CDATA[wp2.8]]></category><guid
isPermaLink="false">http://wpengineer.com/?p=1438</guid> <description><![CDATA[WordPress implements new standard features in the head of the theme since version 2.5, that are always on the hook wp_head. Even in WordPress 2.8 new functions were added. If you don't need them you can easily disable them by using the function remove_action. Function remove_action remove_action( $tag, $function_to_add, $priority, $accepted_args ); This function removes [...]]]></description> <content:encoded><![CDATA[<p>WordPress implements new standard features in the head of the theme since version 2.5, that are always on the hook <code>wp_head</code>. Even in WordPress 2.8 new functions were added. If you don't need them you can easily disable them by using the function <a
href="http://codex.wordpress.org/Function_Reference/remove_action" title="Doc in Codex" class="liwp"><code>remove_action</code></a>.<br
/> <span
id="more-1438"></span></p><h3>Function <code>remove_action</code></h3><p><code>remove_action( $tag, $function_to_add, $priority, $accepted_args );</code></p><blockquote><p>This function removes a function attached to a specified action hook. This method can be used to remove default functions attached to a specific action hook and possibly replace them with a substitute.</p><p><strong>Important:</strong> To remove a hook, the <code>$function_to_remove</code> and <code>$priority</code> arguments must match when the hook was added. This goes for both filters and actions. No warning will be given on removal failure.<br
/><cite>via: <a
href="http://codex.wordpress.org/Function_Reference/remove_action" class="liwp">WP Codexy</a></cite></p></blockquote><p>The following syntax shows an excerpt, only a part of the output you can have in your theme. They result from the standard functions, which are loaded in the head of the theme. Visible, if you search in the file <code>wp-includes/default-filters.php</code> for the Hook <code>wp_head</code>. Not all filters should be deactivated, because in most cases they are useful. But WordPress is not only as classical blog in use and therefore some functions are not necessary.</p><div
class="wp_syntax"><div
class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>link rel<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;alternate&quot;</span> type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;application/rss+xml&quot;</span> title<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;WP Engineer RSS Feed&quot;</span> href<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;http://wpengineer.com/feed/&quot;</span> <span style="color: #339933;">/&gt;</span>
<span style="color: #339933;">&lt;</span>link rel<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;alternate&quot;</span> type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;application/atom+xml&quot;</span> title<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;WP Engineer Atom Feed&quot;</span> href<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;http://wpengineer.com/feed/atom/&quot;</span> <span style="color: #339933;">/&gt;</span>
<span style="color: #339933;">&lt;</span>link rel<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;pingback&quot;</span> href<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;http://wpengineer.com/blog/xmlrpc.php&quot;</span> <span style="color: #339933;">/&gt;</span>
<span style="color: #339933;">&lt;</span>link rel<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;EditURI&quot;</span> type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;application/rsd+xml&quot;</span> title<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;RSD&quot;</span> href<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;http://wpengineer.com/xmlrpc.php?rsd&quot;</span> <span style="color: #339933;">/&gt;</span>
<span style="color: #339933;">&lt;</span>link rel<span style="color: #339933;">=</span><span style="color: #0000ff;">'index'</span> title<span style="color: #339933;">=</span><span style="color: #0000ff;">'WP Engineer'</span> href<span style="color: #339933;">=</span><span style="color: #0000ff;">'http://wpengineer.com'</span> <span style="color: #339933;">/&gt;</span>
<span style="color: #339933;">&lt;</span>link rel<span style="color: #339933;">=</span><span style="color: #0000ff;">'start'</span> title<span style="color: #339933;">=</span><span style="color: #0000ff;">'Use WordPress 2.7 Offline'</span> href<span style="color: #339933;">=</span><span style="color: #0000ff;">'http://wpengineer.com/use-wordpress-27-offline/'</span> <span style="color: #339933;">/&gt;</span>
<span style="color: #339933;">&lt;</span>link rel<span style="color: #339933;">=</span><span style="color: #0000ff;">'prev'</span> title<span style="color: #339933;">=</span><span style="color: #0000ff;">'Recents Drafts All Authors'</span> href<span style="color: #339933;">=</span><span style="color: #0000ff;">'http://wpengineer.com/recents-drafts-all-authors/'</span> <span style="color: #339933;">/&gt;</span></pre></div></div><p>This is an example, not a recommendation where some functions are deactivated. Check your header and turn off what you don't need. Less markup and better loading time.</p><div
class="wp_syntax"><div
class="code"><pre class="php" style="font-family:monospace;">remove_action<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'wp_head'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'feed_links_extra'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">3</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Display the links to the extra feeds such as category feeds</span>
remove_action<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'wp_head'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'feed_links'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">2</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Display the links to the general feeds: Post and Comment Feed</span>
remove_action<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'wp_head'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'rsd_link'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Display the link to the Really Simple Discovery service endpoint, EditURI link</span>
remove_action<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'wp_head'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'wlwmanifest_link'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Display the link to the Windows Live Writer manifest file.</span>
remove_action<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'wp_head'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'index_rel_link'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// index link</span>
remove_action<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'wp_head'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'parent_post_rel_link'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">10</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// prev link</span>
remove_action<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'wp_head'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'start_post_rel_link'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">10</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// start link</span>
remove_action<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'wp_head'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'adjacent_posts_rel_link'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">10</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Display relational links for the posts adjacent to the current post.</span>
remove_action<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'wp_head'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'wp_generator'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Display the XHTML generator that is generated on the wp_head hook, WP version</span></pre></div></div><hr
/><h3>Related posts:</h3><ul><li><a
href="http://wpengineer.com/new-screenshots-of-wordpress-3-0/" rel="bookmark" title="Permanent Link: New Screenshots Of WordPress 3.0" class="liinternal">New Screenshots Of WordPress 3.0</a></li><li><a
href="http://wpengineer.com/themes-and-automatic_feed_links/" rel="bookmark" title="Permanent Link: Themes and automatic_feed_links" class="liinternal">Themes and automatic_feed_links</a></li><li><a
href="http://wpengineer.com/moving-your-wordpress-blog-to-a-new-domain/" rel="bookmark" title="Permanent Link: Moving Your WordPress Blog To A New Domain" class="liinternal">Moving Your WordPress Blog To A New Domain</a></li><li><a
href="http://wpengineer.com/change-wordpress-mail-sender/" rel="bookmark" title="Permanent Link: Change WordPress Mail Sender" class="liinternal">Change WordPress Mail Sender</a></li><li><a
href="http://wpengineer.com/the-perfect-title-tag/" rel="bookmark" title="Permanent Link: The Perfect Title Tag" class="liinternal">The Perfect Title Tag</a></li></ul><hr
/><p><img
style="float:left;" src="http://wpengineer.com/favicon.ico" alt="WP Engineer Favicon"/> Thanks for subscribing our feed! <a
href="http://buysellads.com/buy/detail/3646/" class="liexternal">Sponsor the WP Engineer Blog</a> and get your brand in front of several hundred users per day!<br
/> &copy; <a
href="http://wpengineer.com/" class="liinternal">WP Engineer Team</a>, All rights reserved <small>(Digital Fingerprint: WPEngineer-be0254ce2b4972feb4b9cb72034a092d)</small></p> ]]></content:encoded> <wfw:commentRss>http://wpengineer.com/wordpress-header/feed/</wfw:commentRss> <slash:comments>10</slash:comments> </item> <item><title>More Memory For WordPress &#8211; More Information About WordPress</title><link>http://wpengineer.com/more-memory-for-wordpress-more-information-about-wordpress/</link> <comments>http://wpengineer.com/more-memory-for-wordpress-more-information-about-wordpress/#comments</comments> <pubDate>Thu, 18 Jun 2009 07:49:26 +0000</pubDate> <dc:creator>Frank</dc:creator> <category><![CDATA[WordPress Hacks]]></category> <category><![CDATA[WordPress Plugins]]></category> <category><![CDATA[Plugin]]></category> <category><![CDATA[WordPress]]></category> <category><![CDATA[WordPress 2.8]]></category> <category><![CDATA[WordPress Tutorials]]></category> <category><![CDATA[WP]]></category> <category><![CDATA[wp2.8]]></category><guid
isPermaLink="false">http://wpengineer.com/?p=1324</guid> <description><![CDATA[WordPress is growing and growing, with the growing of WordPress the demand of memory is also growing. The standard use is WordPress 32MByte (see settings.php ), which is not even provided by every hoster today. This is a problem - therefore: Lovely Hoster, give users more memory! But also to use the memory, it requires [...]]]></description> <content:encoded><![CDATA[<p><img
src="http://wpengineer.com/blog/wp-content/uploads/wp-system-health.png" alt="wp-system-health" title="wp-system-health" width="300" height="200" class="alignright size-full wp-image-1387" /><br
/> WordPress is growing and growing, with the growing of WordPress the demand of memory is also growing. The standard use is WordPress 32MByte (see <code> settings.php </code>), which is not even provided by every hoster today. This is a problem - therefore: Lovely Hoster, give users more memory!</p><p>But also to use the memory, it requires a small syntax extension in the configuration of WordPress.<br
/> <span
id="more-1324"></span><br
/> To have a quick overview about the demand: Use the Plugin for WordPress <em><a
href="http://alexrabe.boelinger.com/2009/06/14/dear-hoster-we-need-more-memory/" class="liexternal">WP-Memory-Usage</a></em> by Alex Rabe ...</p><p><img
src="http://wpengineer.com/blog/wp-content/uploads/memory-overview.png" alt="memory-overview" title="memory-overview" width="417" height="247" class="aligncenter size-full wp-image-1325" /></p><p>...  or the more extensive version of an analysis with the Plugin <a
href="http://www.code-styling.de/deutsch/wp-system-health-wie-gehts-meinem-wordpress" class="liexternal">WordPress System Health</a> by Heiko Rabe.</p><h3>More Information</h3><p>Thus, it provides the analysis of blogs and a quick way to see the problems at a customers blog or project of your own. This WordPress Plugin <a
href="http://www.code-styling.de/deutsch/wp-system-health-wie-gehts-meinem-wordpress" class="liexternal">Health System</a> will not only provide information on the status of WordPress, but will also provide information on important configuration settings, supply information on the state of the database and also the tables and information about PHP. In each mode you can add various details, which provide a lot of information to the WordPress experts about the system without the need to investigate the individual Settings, the PHP and the database information.</p><h3>More Memory</h3><p>It is recommended when working with WordPress to increase memory, as long the <a
href="http://www.webhostingsearch.com/" class="liexternal">host</a> permits. This requires the expansion of <code>wp-config.php</code>; the best way is to do it in steps in order to check the possibilities of the host.</p><div
class="wp_syntax"><div
class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// more memory</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'WP_MEMORY_LIMIT'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'64M'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// even more memory</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'WP_MEMORY_LIMIT'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'96M'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// a good deal more memory ;-)</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'WP_MEMORY_LIMIT'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'128M'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div><p>Will you get a white page as return, then it was too much and it goes back down to 32 MByte. Good luck.<br
/><hr
/><h3>Related posts:</h3><ul><li><a
href="http://wpengineer.com/wordpress-ftp-data-with-constant/" rel="bookmark" title="Permanent Link: WordPress FTP Data With Constant" class="liinternal">WordPress FTP Data With Constant</a></li><li><a
href="http://wpengineer.com/wordpress-plugin-development/" rel="bookmark" title="Permanent Link: WordPress Plugin Development: Style Your Message Boxes" class="liinternal">WordPress Plugin Development: Style Your Message Boxes</a></li><li><a
href="http://wpengineer.com/update-informations-only-for-admins/" rel="bookmark" title="Permanent Link: Update Informations Only for Admins" class="liinternal">Update Informations Only for Admins</a></li><li><a
href="http://wpengineer.com/custom-fields-in-your-feed/" rel="bookmark" title="Permanent Link: Custom Fields in your Feed" class="liinternal">Custom Fields in your Feed</a></li><li><a
href="http://wpengineer.com/change-admin-pagination-on-posts-pages-and-comments/" rel="bookmark" title="Permanent Link: Change Admin Pagination on Posts, Pages and Comments" class="liinternal">Change Admin Pagination on Posts, Pages and Comments</a></li></ul><hr
/><p><img
style="float:left;" src="http://wpengineer.com/favicon.ico" alt="WP Engineer Favicon"/> Thanks for subscribing our feed! <a
href="http://buysellads.com/buy/detail/3646/" class="liexternal">Sponsor the WP Engineer Blog</a> and get your brand in front of several hundred users per day!<br
/> &copy; <a
href="http://wpengineer.com/" class="liinternal">WP Engineer Team</a>, All rights reserved <small>(Digital Fingerprint: WPEngineer-be0254ce2b4972feb4b9cb72034a092d)</small></p> ]]></content:encoded> <wfw:commentRss>http://wpengineer.com/more-memory-for-wordpress-more-information-about-wordpress/feed/</wfw:commentRss> <slash:comments>15</slash:comments> </item> <item><title>Set Meta Links For WordPress Plugins</title><link>http://wpengineer.com/meta-links-for-wordpress-plugins/</link> <comments>http://wpengineer.com/meta-links-for-wordpress-plugins/#comments</comments> <pubDate>Wed, 10 Jun 2009 13:46:01 +0000</pubDate> <dc:creator>Frank</dc:creator> <category><![CDATA[WordPress Hacks]]></category> <category><![CDATA[WordPress Tutorials]]></category> <category><![CDATA[development]]></category> <category><![CDATA[PHP]]></category> <category><![CDATA[Plugin]]></category> <category><![CDATA[WordPress]]></category> <category><![CDATA[WordPress 2.8]]></category> <category><![CDATA[WP]]></category> <category><![CDATA[wp2.8]]></category><guid
isPermaLink="false">http://wpengineer.com/?p=1295</guid> <description><![CDATA[In the past I explained in the article &#8222;How To Improve WordPress Plugins&#8220; , how you can expand Plugins with useful functions and therefore optimize their usage. One of the suggestions was a simple link to the options page of your Plugin. With WordPress 2.8 the Plugin page will be a little bit different and [...]]]></description> <content:encoded><![CDATA[<p>In the past I explained in the article &#8222;<a
href="http://wpengineer.com/how-to-improve-wordpress-plugins/" class="liinternal">How To Improve WordPress Plugins</a>&#8220; , how you can expand Plugins with useful functions and therefore optimize their usage. One of the suggestions was a simple link to the options page of your Plugin.<br
/> With WordPress 2.8 the Plugin page will be a little bit different and now there will be a hook, which you can use to enter a link, which is even more convenient.<br
/> <span
id="more-1295"></span><br
/> This tutorial works only in Version 2.8 or higher. For 2.7 you have to use the tutorial of &#8222;<a
href="http://wpengineer.com/how-to-improve-wordpress-plugins/" class="liinternal">How To Improve WordPress Plugins</a>&#8220; or without further explanation this short snippet.</p><div
class="wp_syntax"><div
class="code"><pre class="php" style="font-family:monospace;"><span style="color: #009933; font-style: italic;">/**
 * @version WP 2.7
 * Add action link(s) to plugins page
 */</span>
<span style="color: #000000; font-weight: bold;">function</span> set_plugin_meta27<span style="color: #009900;">&#40;</span><span style="color: #000088;">$links</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
	<span style="color: #000088;">$plugin</span> <span style="color: #339933;">=</span> plugin_basename<span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">__FILE__</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000088;">$settings_link</span> <span style="color: #339933;">=</span> <span style="color: #990000;">sprintf</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'&lt;a href=&quot;options-general.php?page=%s&quot;&gt;%s&lt;/a&gt;'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$plugin</span><span style="color: #339933;">,</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Settings'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #990000;">array_unshift</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$links</span><span style="color: #339933;">,</span> <span style="color: #000088;">$settings_link</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #b1b100;">return</span> <span style="color: #000088;">$links</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
add_filter<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'plugin_action_links_'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$plugin</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'set_plugin_meta27'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div><p>Since version 2.8 the backend is a little bit different, also the meta links to Plugins are displayed differently from now on, which you can use as you can see on this screenshot.</p><p><a
href="http://wpengineer.com/blog/wp-content/uploads/28_plugin_meta_link.png" class="liimagelink"><img
src="http://wpengineer.com/blog/wp-content/uploads/28_plugin_meta_link-299x221.png" alt="28_plugin_meta_link" title="28_plugin_meta_link" width="299" height="221" class="aligncenter size-medium wp-image-1296" /></a></p><p>You can use following code to set the link to your options page. You can use the term &#8222;Settings&#8220; , so you don't have to take care about other languages, since it is already in the respective language package included. The word will be adjust automatically to the according language.</p><div
class="wp_syntax"><div
class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> set_plugin_meta<span style="color: #009900;">&#40;</span><span style="color: #000088;">$links</span><span style="color: #339933;">,</span> <span style="color: #000088;">$file</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
	<span style="color: #000088;">$plugin</span> <span style="color: #339933;">=</span> plugin_basename<span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">__FILE__</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">// create link</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$file</span> <span style="color: #339933;">==</span> <span style="color: #000088;">$plugin</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #990000;">array_merge</span><span style="color: #009900;">&#40;</span>
			<span style="color: #000088;">$links</span><span style="color: #339933;">,</span>
			<span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span> <span style="color: #990000;">sprintf</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'&lt;a href=&quot;options-general.php?page=%s&quot;&gt;%s&lt;/a&gt;'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$plugin</span><span style="color: #339933;">,</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Settings'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #b1b100;">return</span> <span style="color: #000088;">$links</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
add_filter<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'plugin_row_meta'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'set_plugin_meta'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">10</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">2</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div><p>Alternativ you can use the follow functions to link before other links on the plugin page.</p><div
class="wp_syntax"><div
class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// plugin definitions</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'FB_BASENAME'</span><span style="color: #339933;">,</span> plugin_basename<span style="color: #009900;">&#40;</span> <span style="color: #009900; font-weight: bold;">__FILE__</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'FB_BASEFOLDER'</span><span style="color: #339933;">,</span> plugin_basename<span style="color: #009900;">&#40;</span> <span style="color: #990000;">dirname</span><span style="color: #009900;">&#40;</span> <span style="color: #009900; font-weight: bold;">__FILE__</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'FB_FILENAME'</span><span style="color: #339933;">,</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span> FB_BASEFOLDER<span style="color: #339933;">.</span><span style="color: #0000ff;">'/'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span> plugin_basename<span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">__FILE__</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> filter_plugin_meta<span style="color: #009900;">&#40;</span><span style="color: #000088;">$links</span><span style="color: #339933;">,</span> <span style="color: #000088;">$file</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">/* create link */</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$file</span> <span style="color: #339933;">==</span> FB_BASENAME <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #990000;">array_unshift</span><span style="color: #009900;">&#40;</span>
			<span style="color: #000088;">$links</span><span style="color: #339933;">,</span>
			<span style="color: #990000;">sprintf</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'&lt;a href=&quot;options-general.php?page=%s&quot;&gt;%s&lt;/a&gt;'</span><span style="color: #339933;">,</span> FB_FILENAME<span style="color: #339933;">,</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Settings'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #b1b100;">return</span> <span style="color: #000088;">$links</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$wp_version</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #990000;">version_compare</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$wp_version</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'2.8alpha'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'&gt;'</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>
	add_filter<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'plugin_row_meta'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'filter_plugin_meta'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">10</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">2</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// only 2.8 and higher</span>
add_filter<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'plugin_action_links'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'filter_plugin_meta'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">10</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">2</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div><p>This little hack is easy to do but has a significant value for the user, since it's easy to get to the options page. It's just sad, that the developer of WordPress always changing the hook, so you have to adjust it after every new version. Hope that won't happen again in the near future.<br
/><hr
/><h3>Related posts:</h3><ul><li><a
href="http://wpengineer.com/image-metadata-in-wordpress/" rel="bookmark" title="Permanent Link: Image Metadata in WordPress" class="liinternal">Image Metadata in WordPress</a></li><li><a
href="http://wpengineer.com/the-perfect-title-tag/" rel="bookmark" title="Permanent Link: The Perfect Title Tag" class="liinternal">The Perfect Title Tag</a></li><li><a
href="http://wpengineer.com/wordpress-27-optimize-the-management/" rel="bookmark" title="Permanent Link: WordPress 2.7 Optimize The Management" class="liinternal">WordPress 2.7 Optimize The Management</a></li><li><a
href="http://wpengineer.com/igoogle-gadget-for-your-blog/" rel="bookmark" title="Permanent Link: iGoogle Gadget for your Blog" class="liinternal">iGoogle Gadget for your Blog</a></li><li><a
href="http://wpengineer.com/3rd-door-today-the-advice-dont-steal-premium-wordpress-themes/" rel="bookmark" title="Permanent Link: 3rd Door &#8211; Today The Advice: Don&#8217;t Steal Premium WordPress Themes" class="liinternal">3rd Door &#8211; Today The Advice: Don&#8217;t Steal Premium WordPress Themes</a></li></ul><hr
/><p><img
style="float:left;" src="http://wpengineer.com/favicon.ico" alt="WP Engineer Favicon"/> Thanks for subscribing our feed! <a
href="http://buysellads.com/buy/detail/3646/" class="liexternal">Sponsor the WP Engineer Blog</a> and get your brand in front of several hundred users per day!<br
/> &copy; <a
href="http://wpengineer.com/" class="liinternal">WP Engineer Team</a>, All rights reserved <small>(Digital Fingerprint: WPEngineer-be0254ce2b4972feb4b9cb72034a092d)</small></p> ]]></content:encoded> <wfw:commentRss>http://wpengineer.com/meta-links-for-wordpress-plugins/feed/</wfw:commentRss> <slash:comments>6</slash:comments> </item> <item><title>WordPress Proxysupport</title><link>http://wpengineer.com/wordpress-proxysupport/</link> <comments>http://wpengineer.com/wordpress-proxysupport/#comments</comments> <pubDate>Fri, 15 May 2009 10:58:13 +0000</pubDate> <dc:creator>Frank</dc:creator> <category><![CDATA[WordPress Hacks]]></category> <category><![CDATA[Constants]]></category> <category><![CDATA[PHP]]></category> <category><![CDATA[proxy]]></category> <category><![CDATA[WordPress]]></category> <category><![CDATA[WordPress 2.8]]></category> <category><![CDATA[WordPress Tutorials]]></category> <category><![CDATA[WP]]></category> <category><![CDATA[wp2.8]]></category><guid
isPermaLink="false">http://wpengineer.com/?p=1227</guid> <description><![CDATA[Who is using WordPress in an intranet environment, will quickly realize, that despite internet connection, no feed content gets loaded in the backend. In general, it's because of the proxy of the company. So far WordPress wasn't particularly flexible in this case. As of WordPress 2.8 that will change and new constants make ensure that [...]]]></description> <content:encoded><![CDATA[<p>Who is using WordPress in an intranet environment, will quickly realize, that despite internet connection, no feed content gets loaded in the backend. In general, it's because of the proxy of the company. So far WordPress wasn't particularly flexible in this case. As of WordPress 2.8 that will change and new constants make ensure that you now can enter the proxy directly to <code>wp-config.php</code>.<br
/> <span
id="more-1227"></span></p><h3>Until WordPress 2.7</h3><p>Up to this version of WordPress it works only with an adjustment in the core, in <code>wp-includes/class-snoopy.php</code>. Here you have to change the settings of <code>$proxy_host</code>, <code>$proxy_port</code> and <code>$_isproxy</code>. The value of var <code>$_isproxy = false;</code> will of course have <code>TRUE</code> as value.</p><div
class="wp_syntax"><div
class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$host</span>       <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;www.php.net&quot;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// host name we are connecting to</span>
<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$port</span>       <span style="color: #339933;">=</span> <span style="color: #cc66cc;">8080</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// port we are connecting to</span>
<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$proxy_host</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// proxy host to use</span>
<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$proxy_port</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// proxy port to use</span>
<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$proxy_user</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// proxy user to use</span>
<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$proxy_pass</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// proxy password to use</span>
<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$_isproxy</span>   <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// set if using a proxy server</span></pre></div></div><h3>WordPress 2.8</h3><p>With the new version it is much easier, because no more intrusion into the core files is necessary and the possibility to define the values in the configuration file <code>wp-config.php</code>.</p><div
class="wp_syntax"><div
class="code"><pre class="php" style="font-family:monospace;"><span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'WP_PROXY_HOST'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'192.168.84.101'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'WP_PROXY_PORT'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'8080'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'WP_PROXY_USERNAME'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'my_user_name'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'WP_PROXY_PASSWORD'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'my_password'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'WP_PROXY_BYPASS_HOSTS'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'localhost, www.example.com'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div><p>Various references are also in<a
href="http://core.trac.wordpress.org/ticket/4011" class="liwp">Ticket 4011</a>.<br
/><hr
/><p><img
style="float:left;" src="http://wpengineer.com/favicon.ico" alt="WP Engineer Favicon"/> Thanks for subscribing our feed! <a
href="http://buysellads.com/buy/detail/3646/" class="liexternal">Sponsor the WP Engineer Blog</a> and get your brand in front of several hundred users per day!<br
/> &copy; <a
href="http://wpengineer.com/" class="liinternal">WP Engineer Team</a>, All rights reserved <small>(Digital Fingerprint: WPEngineer-be0254ce2b4972feb4b9cb72034a092d)</small></p> ]]></content:encoded> <wfw:commentRss>http://wpengineer.com/wordpress-proxysupport/feed/</wfw:commentRss> <slash:comments>9</slash:comments> </item> <item><title>WordPress 2.8 Feature Password</title><link>http://wpengineer.com/wordpress-28-feature-password/</link> <comments>http://wpengineer.com/wordpress-28-feature-password/#comments</comments> <pubDate>Tue, 05 May 2009 21:14:16 +0000</pubDate> <dc:creator>Frank</dc:creator> <category><![CDATA[WordPress News]]></category> <category><![CDATA[security]]></category> <category><![CDATA[WordPress]]></category> <category><![CDATA[WordPress 2.8]]></category> <category><![CDATA[WP]]></category> <category><![CDATA[wp2.8]]></category><guid
isPermaLink="false">http://wpengineer.com/?p=1211</guid> <description><![CDATA[WordPress 2.8 is going to be published soon, even though they do not have a date yet. Nevertheless, another small insight into a new feature. After a new installation of WordPress, you get informed that you are logged in with the default password and this can be a security risk. It is therefore strongly recommended [...]]]></description> <content:encoded><![CDATA[<p>WordPress 2.8 is going to be published soon, even though they do not have a date yet. Nevertheless, another small insight into a new feature. After a new installation of WordPress, you get informed that you are logged in with the default password and this can be a <a
href="http://perishablepress.com/press/2009/05/05/important-security-fix-for-wordpress/" class="liexternal">security risk</a>. It is therefore strongly recommended to change the password. The necessary internal links to set a new password are included in this notice.</p><p><a
href="http://wpengineer.com/blog/wp-content/uploads/wp28_passwort.png" class="liimagelink"><img
src="http://wpengineer.com/blog/wp-content/uploads/wp28_passwort-300x47.png" alt="wp28_passwort" title="wp28_passwort" width="300" height="47" class="aligncenter size-medium wp-image-1210" /></a><br
/><hr
/><h3>Related posts:</h3><ul><li><a
href="http://wpengineer.com/change-wording-for-password-page/" rel="bookmark" title="Permanent Link: Change Wording for Password Page" class="liinternal">Change Wording for Password Page</a></li><li><a
href="http://wpengineer.com/use-wordpress-login/" rel="bookmark" title="Permanent Link: Use WordPress Login" class="liinternal">Use WordPress Login</a></li><li><a
href="http://wpengineer.com/new-feature-in-wordpress-2-9-the_post_image/" rel="bookmark" title="Permanent Link: New feature in WordPress 2.9 &#8211; the_post_image()" class="liinternal">New feature in WordPress 2.9 &#8211; the_post_image()</a></li><li><a
href="http://wpengineer.com/wordpress-proxysupport/" rel="bookmark" title="Permanent Link: WordPress Proxysupport" class="liinternal">WordPress Proxysupport</a></li><li><a
href="http://wpengineer.com/wordpress-2-9-add_theme_support-and-has_post_image/" rel="bookmark" title="Permanent Link: WordPress 2.9 add_theme_support and has_post_image" class="liinternal">WordPress 2.9 add_theme_support and has_post_image</a></li></ul><hr
/><p><img
style="float:left;" src="http://wpengineer.com/favicon.ico" alt="WP Engineer Favicon"/> Thanks for subscribing our feed! <a
href="http://buysellads.com/buy/detail/3646/" class="liexternal">Sponsor the WP Engineer Blog</a> and get your brand in front of several hundred users per day!<br
/> &copy; <a
href="http://wpengineer.com/" class="liinternal">WP Engineer Team</a>, All rights reserved <small>(Digital Fingerprint: WPEngineer-be0254ce2b4972feb4b9cb72034a092d)</small></p> ]]></content:encoded> <wfw:commentRss>http://wpengineer.com/wordpress-28-feature-password/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>Bye Bye my-hacks.php?</title><link>http://wpengineer.com/my-hacksphp/</link> <comments>http://wpengineer.com/my-hacksphp/#comments</comments> <pubDate>Thu, 30 Apr 2009 10:44:00 +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[WordPress]]></category> <category><![CDATA[WordPress Plugins]]></category> <category><![CDATA[WordPress Tutorials]]></category> <category><![CDATA[wp2.8]]></category><guid
isPermaLink="false">http://wpengineer.com/?p=1164</guid> <description><![CDATA[Soon the new 2.8 version of WordPress will be released, but the hype is not as much as it was some years ago, when version 2.0 was released for example. But the new version brings many new things, fixes a large number of problems and WordPress is in my view, more open than in the [...]]]></description> <content:encoded><![CDATA[<p>Soon the new 2.8 version of WordPress will be released, but the hype is not as much as it was some years ago, when version 2.0 was released for example.</p><p>But the new<a
href="http://codex.wordpress.org/Version_2.8" class="liwp"> version brings many new things</a>, fixes a large number of problems and WordPress is in my view, more open than in the prior versions. One of the points that users should be aware of is the fact that the option for the support of the <code>my-hacks.php </code> removed. <a
href="http://wordpress.org/development/2003/12/new-feature-my-hacksphp/" class="liwp"> 2003 </a> this file was announced as a feature, and now it's going to be removed silently. WordPress has a sophisticated interface system, you can start at various points and bring in new functionality, so that the developer team decided that there is no longer need to support this solution. Alternatives and possibilities of further usage will briefly shown here.</p><p><span
id="more-1164"></span></p><h3>Further usage of my-hacks.php</h3><p>The file with its own extensions can still be used in 2.8, it only can't be enabled via option in the backend anymore. If you want to do this, you have to set the entry <code> hack_file </code> in the table <em> options </em> on <em>1</em>.<br
/> This is done either directly in the database, for example through phpMyAdmin, or via code:</p><div
class="wp_syntax"><div
class="code"><pre class="php" style="font-family:monospace;">update_option<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'hack_file'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div><p>Alternatively you can get the option via a Plugin back into the backend, see <a
href="http://schnurpsel.de/das-ende-der-wordpress-hacker-145/" class="liexternal">Post and Plugin download </a> at Schurpsel.</p><p>The query of the file remains in the core and should remain so, also the query of the fields in the database should remain.</p><div
class="wp_syntax"><div
class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// Check for hacks file if the option is enabled</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> get_option<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'hack_file'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #990000;">file_exists</span><span style="color: #009900;">&#40;</span>ABSPATH <span style="color: #339933;">.</span> <span style="color: #0000ff;">'my-hacks.php'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>
		<span style="color: #b1b100;">require</span><span style="color: #009900;">&#40;</span>ABSPATH <span style="color: #339933;">.</span> <span style="color: #0000ff;">'my-hacks.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div><p>To keep everything as it was, store the file in the root (<code>ABSPATH</code>) of the installation.</p><p>The idea to no longer support is obviously connected with considerations and because WordPress offers excellent interfaces. In addition, the file got pulled early and was therefore not always a clean solution as you know of other interfaces. A test for intolerance and problems is not possible and the file can also slow down the system.</p><h3>Via Plugin</h3><p>One of the interfaces is the Plugin interface, and therefore lends itself to that, to create a Plugin, to do small hacks. Either you learn how to do this, for example in my small tutorial how to write a Plugin or you use this template.</p><p>Just create a PHP file and insert the following syntax, then create your own hacks and copy the file in the Plugin directory. You only have to activate it in your backend.</p><div
class="wp_syntax"><div
class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #666666; font-style: italic;">/*
Plugin Name: my-hacks.php
Plugin URI: http://
Description: my-hacks.php - replacement since WordPress 2.8
Author: DU
Version: 0.1
Author URI: http://
*/</span>
&nbsp;
<span style="color: #009933; font-style: italic;">/**
 * put your hacks here
 */</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div><h3>Theme functions</h3><p>The active theme can always bring their own functions, therefore it uses the file <code> functions.php </code> which can be added to each theme. The idea is to explicitly provide new functions for each theme. Therefore, you can store there your hacks, just write it in your <code> functions.php </code> of your theme, upload to the theme folder and you're done.</p><h3>Alternative language folder</h3><p>A third possibility to carry out their own functions is the language folder, the default is the <code> /wp-content/languages/ </code>; <code> wp-content </code> can be moved and renamed since version 2.5. If a language key is set in the <code> wp-config.php </code>, for example, en_US, then WordPress looks for a language file <code>.mo </code> - and a <code>.php</code> file and if exist, it will be used.</p><div
class="wp_syntax"><div
class="code"><pre class="php" style="font-family:monospace;"><span style="color: #990000;">define</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'WPLANG'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'de_DE'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div><div
class="wp_syntax"><div
class="code"><pre class="php" style="font-family:monospace;"><span style="color: #009933; font-style: italic;">/**
 * The locale of the blog
 * @since 1.5.0
 */</span>
<span style="color: #000088;">$locale</span> <span style="color: #339933;">=</span> get_locale<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$locale_file</span> <span style="color: #339933;">=</span> WP_LANG_DIR <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;/<span style="color: #006699; font-weight: bold;">$locale</span>.php&quot;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #990000;">is_readable</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$locale_file</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>
	<span style="color: #b1b100;">require_once</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$locale_file</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009933; font-style: italic;">/**
 * Loads the theme's translated strings.
 *
 * If the current locale exists as a .mo file in the theme's root directory, it
 * will be included in the translated strings by the $domain.
 *
 * The .mo files must be named based on the locale exactly.
 *
 * @since 1.5.0
 *
 * @param string $domain Unique identifier for retrieving translated strings
 */</span>
<span style="color: #000000; font-weight: bold;">function</span> load_theme_textdomain<span style="color: #009900;">&#40;</span><span style="color: #000088;">$domain</span><span style="color: #339933;">,</span> <span style="color: #000088;">$path</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$locale</span> <span style="color: #339933;">=</span> get_locale<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000088;">$path</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span> <span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$path</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> ? get_template_directory<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000088;">$path</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000088;">$mofile</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;<span style="color: #006699; font-weight: bold;">$path</span>/<span style="color: #006699; font-weight: bold;">$locale</span>.mo&quot;</span><span style="color: #339933;">;</span>
	load_textdomain<span style="color: #009900;">&#40;</span><span style="color: #000088;">$domain</span><span style="color: #339933;">,</span> <span style="color: #000088;">$mofile</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div><p>This should of course only be used for hacks and features, which has something to do with the language of the blog. Basically, you can also put functions there. This possibility is especially well suited to create language typical functions, such for a clean use of URLs in Permalinks (instead of u for ue ü etc.).<br
/><hr
/><p><img
style="float:left;" src="http://wpengineer.com/favicon.ico" alt="WP Engineer Favicon"/> Thanks for subscribing our feed! <a
href="http://buysellads.com/buy/detail/3646/" class="liexternal">Sponsor the WP Engineer Blog</a> and get your brand in front of several hundred users per day!<br
/> &copy; <a
href="http://wpengineer.com/" class="liinternal">WP Engineer Team</a>, All rights reserved <small>(Digital Fingerprint: WPEngineer-be0254ce2b4972feb4b9cb72034a092d)</small></p> ]]></content:encoded> <wfw:commentRss>http://wpengineer.com/my-hacksphp/feed/</wfw:commentRss> <slash:comments>7</slash:comments> </item> <item><title>WordPress Plugin-Path</title><link>http://wpengineer.com/wordpress-plugin-path/</link> <comments>http://wpengineer.com/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/" class="liinternal">Top Level Menu In WordPress 2.7</a>&#8220; and &#8222;<a
href="http://wpengineer.com/wordpress-return-url/" class="liinternal">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><div
class="wp_syntax"><div
class="code"><pre class="php" style="font-family:monospace;"><span style="color: #009933; font-style: italic;">/**
 * @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.
*/</span>
<span style="color: #000000; font-weight: bold;">function</span> plugins_url<span style="color: #009900;">&#40;</span><span style="color: #000088;">$path</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span> <span style="color: #000088;">$plugin</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span></pre></div></div><p>So far only the $ path parameter could be passed, so that required a proper definition of the folder.</p><div
class="wp_syntax"><div
class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$style</span> <span style="color: #339933;">=</span> plugins_url<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'my_plugin_folder/css/style-frontend.css'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div><p>With the extension in version 2.8 of WordPress it can be done like:</p><div
class="wp_syntax"><div
class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$style</span> <span style="color: #339933;">=</span> plugins_url<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'css/style-frontend.css'</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">__FILE__</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div><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><div
class="wp_syntax"><div
class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #990000;">version_compare</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$wp_version</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'2.8dev'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'&gt;'</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span></pre></div></div><p>and then supplement or write a custom function for the replacement:</p><div
class="wp_syntax"><div
class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// function for WP &lt; 2.8</span>
<span style="color: #000000; font-weight: bold;">function</span> plugins_url<span style="color: #009900;">&#40;</span><span style="color: #000088;">$path</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span> <span style="color: #000088;">$plugin</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #990000;">function_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'is_ssl'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>
    <span style="color: #000088;">$scheme</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span> is_ssl<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> ? <span style="color: #0000ff;">'https'</span> <span style="color: #339933;">:</span> <span style="color: #0000ff;">'http'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">else</span>
    <span style="color: #000088;">$scheme</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'http'</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$url</span> <span style="color: #339933;">=</span> WP_PLUGIN_URL<span style="color: #339933;">;</span>
  <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #cc66cc;">0</span> <span style="color: #339933;">===</span> <span style="color: #990000;">strpos</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$url</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'http'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #990000;">function_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'is_ssl'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> is_ssl<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>
      <span style="color: #000088;">$url</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'http://'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;<span style="color: #006699; font-weight: bold;">{$scheme}</span>://&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$url</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$plugin</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #990000;">is_string</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$plugin</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>
  <span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$folder</span> <span style="color: #339933;">=</span> <span style="color: #990000;">dirname</span><span style="color: #009900;">&#40;</span>plugin_basename<span style="color: #009900;">&#40;</span><span style="color: #000088;">$plugin</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'.'</span> <span style="color: #339933;">!=</span> <span style="color: #000088;">$folder</span><span style="color: #009900;">&#41;</span>
      <span style="color: #000088;">$url</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'/'</span> <span style="color: #339933;">.</span> <span style="color: #990000;">ltrim</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$folder</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'/'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$path</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #990000;">is_string</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$path</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #990000;">strpos</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$path</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'..'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">===</span> <span style="color: #009900; font-weight: bold;">false</span> <span style="color: #009900;">&#41;</span>
    <span style="color: #000088;">$url</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'/'</span> <span style="color: #339933;">.</span> <span style="color: #990000;">ltrim</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$path</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'/'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #b1b100;">return</span> apply_filters<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'plugins_url'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$url</span><span style="color: #339933;">,</span> <span style="color: #000088;">$path</span><span style="color: #339933;">,</span> <span style="color: #000088;">$plugin</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div><p>This is only an alternative, the possibilities are endless - maybe one or the other has a beautiful idea and solution?<br
/><hr
/><h3>Related posts:</h3><ul><li><a
href="http://wpengineer.com/wordpress-return-url/" rel="bookmark" title="Permanent Link: WordPress &#8211; Return URL" class="liinternal">WordPress &#8211; Return URL</a></li><li><a
href="http://wpengineer.com/determine-path-to-plugin-and-content-directories/" rel="bookmark" title="Permanent Link: Determine Path To Plugin and Content Directories" class="liinternal">Determine Path To Plugin and Content Directories</a></li><li><a
href="http://wpengineer.com/my-hacksphp/" rel="bookmark" title="Permanent Link: Bye Bye my-hacks.php?" class="liinternal">Bye Bye my-hacks.php?</a></li><li><a
href="http://wpengineer.com/embed-wordpress-functions-outside-wordpress/" rel="bookmark" title="Permanent Link: Embed WordPress Functions Outside WordPress" class="liinternal">Embed WordPress Functions Outside WordPress</a></li><li><a
href="http://wpengineer.com/top-level-menu-in-wordpress-27/" rel="bookmark" title="Permanent Link: Top Level Menu In WordPress 2.7" class="liinternal">Top Level Menu In WordPress 2.7</a></li></ul><hr
/><p><img
style="float:left;" src="http://wpengineer.com/favicon.ico" alt="WP Engineer Favicon"/> Thanks for subscribing our feed! <a
href="http://buysellads.com/buy/detail/3646/" class="liexternal">Sponsor the WP Engineer Blog</a> and get your brand in front of several hundred users per day!<br
/> &copy; <a
href="http://wpengineer.com/" class="liinternal">WP Engineer Team</a>, All rights reserved <small>(Digital Fingerprint: WPEngineer-be0254ce2b4972feb4b9cb72034a092d)</small></p> ]]></content:encoded> <wfw:commentRss>http://wpengineer.com/wordpress-plugin-path/feed/</wfw:commentRss> <slash:comments>5</slash:comments> </item> <item><title>Change Admin Pagination on Posts, Pages and Comments</title><link>http://wpengineer.com/change-admin-pagination-on-posts-pages-and-comments/</link> <comments>http://wpengineer.com/change-admin-pagination-on-posts-pages-and-comments/#comments</comments> <pubDate>Mon, 20 Apr 2009 10:53:39 +0000</pubDate> <dc:creator>Frank</dc:creator> <category><![CDATA[WordPress Hacks]]></category> <category><![CDATA[WordPress Plugins]]></category> <category><![CDATA[Admin]]></category> <category><![CDATA[Code]]></category> <category><![CDATA[PHP]]></category> <category><![CDATA[WordPress]]></category> <category><![CDATA[WordPress Tutorials]]></category> <category><![CDATA[wp2.8]]></category><guid
isPermaLink="false">http://wpengineer.com/?p=1030</guid> <description><![CDATA[One or the other users in the backend of WordPress find it quite disturbing that not more than 20 articles, pages and comments per page gets listed. Especially if you work with many tables and you have a fast connection, then an increased number of listed articles, pages, comments is useful. How to adapt and [...]]]></description> <content:encoded><![CDATA[<p>One or the other users in the backend of WordPress find it quite disturbing that not more than 20 articles, pages and comments per page gets listed. Especially if you work with many tables and you have a fast connection, then an increased number of listed articles, pages, comments is useful. How to adapt and with a little CSS getting the best presentation I will show now, here are some tips.<br
/> <span
id="more-1030"></span></p><h3>As of WordPress version 2.8</h3><p>With WordPress 2.8 comes a new value in the user's options for each page in the backend. This allows each user to extend the number of listed pages, articles and comments per page. If you like to solve it also in advance of WordPress 2.8, then the following syntax helps.</p><p><img
src="http://wpengineer.com/blog/wp-content/uploads/posts_per_page.png" alt="posts_per_page" title="posts_per_page" width="371" height="186" class="aligncenter size-full wp-image-1031" /></p><h3>Alternative Plugin</h3><p>You should embed the syntax in a Plugin.<br
/> I am purposely not providing a Plugin, because the support of my existing solutions is already overwhelming. So it is rather as a basis for people who want to start here and as a memory for me when I need it again.</p><p>Some comments I have directly written down in the source code, so it is understandable. Also I do upload a CSS file, the content can be found at the end, which changes the design a little bit and create a better overview of the large number of entries.</p><p><img
src="http://wpengineer.com/blog/wp-content/uploads/posts_per_page2.png" alt="posts_per_page2" title="posts_per_page2" width="406" height="258" class="aligncenter size-full wp-image-1032" /></p><div
class="wp_syntax"><div
class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// value for posts</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'FB_CAP_PER_POST'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">100</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// value for pages</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'FB_CAP_PER_PAGE'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">100</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// value for comments</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'FB_CAP_PER_COMMENT'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">100</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// only in admin area</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> is_admin<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$pagenow</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$pagenow</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">'edit-pages.php'</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		add_filter<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'manage_pages_query'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'page_ChangeAdminPagination'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		add_action<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'admin_print_styles'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'AddMyStylesheet'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$pagenow</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">'edit.php'</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		add_action<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'admin_head'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'post_ChangeAdminPagination'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		add_action<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'admin_print_styles'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'AddMyStylesheet'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$pagenow</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">'edit-comments.php'</span> <span style="color: #009900;">&#41;</span>
		add_filter<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'comments_per_page'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'comment_ChangeAdminPagination'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> post_ChangeAdminPagination<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$wp_query</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$wp_query</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">query_vars</span><span style="color: #009900;">&#91;</span>s<span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">''</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$per_post</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>int<span style="color: #009900;">&#41;</span> FB_CAP_PER_POST<span style="color: #339933;">;</span>
		<span style="color: #000088;">$wp_query</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">query</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'showposts='</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$per_post</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> page_ChangeAdminPagination<span style="color: #009900;">&#40;</span><span style="color: #000088;">$query</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$per_page</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000088;">$per_page</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>int<span style="color: #009900;">&#41;</span> FB_CAP_PER_PAGE<span style="color: #339933;">;</span>
	<span style="color: #666666; font-style: italic;">//$query['posts_per_page'] = $per_page;</span>
	<span style="color: #000088;">$query</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'posts_per_archive_page'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$per_page</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #b1b100;">return</span> <span style="color: #000088;">$query</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> comment_ChangeAdminPagination<span style="color: #009900;">&#40;</span><span style="color: #000088;">$count</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
	<span style="color: #000088;">$per_comment</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>int<span style="color: #009900;">&#41;</span> FB_CAP_PER_COMMENT<span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #b1b100;">return</span> <span style="color: #000088;">$per_comment</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> AddMyStylesheet<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
		<span style="color: #000088;">$myStyleFile</span> <span style="color: #339933;">=</span> WP_PLUGIN_URL <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/change_admin_pagination/css/style.css'</span><span style="color: #339933;">;</span>
		wp_register_style<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'change_admin_pagination'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$myStyleFile</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		wp_enqueue_style<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'change_admin_pagination'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div><p>The following content is intended only to that area for editing the page or next to the entry contribution is shown. Thus, the line is smaller and has more entries available to view.</p><div
class="wp_syntax"><div
class="code"><pre class="css" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">/**
 * style for smaller tables in admin of WordPress
 * @author Frank Bültge
 * @date 01.04.2009 20:51:59
 */</span>
<span style="color: #6666ff;">.post-title</span> strong <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #6666ff;">.row-actions</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">margin-left</span><span style="color: #00AA00;">:</span> <span style="color: #933;"><span style="color: #cc66cc;">1</span>%</span> !important<span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #6666ff;">.check-column</span><span style="color: #00AA00;">,</span> tr td <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">padding-bottom</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span> !important<span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
&nbsp;
<span style="color: #6666ff;">.column-date</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;"><span style="color: #cc66cc;">15</span>%</span> !important<span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
td<span style="color: #6666ff;">.date</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">.6em</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
td<span style="color: #6666ff;">.date</span> abbr <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">right</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div><hr
/><h3>Related posts:</h3><ul><li><a
href="http://wpengineer.com/correct-pagination-with-get_posts/" rel="bookmark" title="Permanent Link: Correct Pagination with get_posts" class="liinternal">Correct Pagination with get_posts</a></li><li><a
href="http://wpengineer.com/hide-the-comment-pagination/" rel="bookmark" title="Permanent Link: Hide The Comment Pagination" class="liinternal">Hide The Comment Pagination</a></li><li><a
href="http://wpengineer.com/comment-pagination-and-reply-depth-in-wordpress-27/" rel="bookmark" title="Permanent Link: Comment Pagination And Reply Depth In WordPress 2.7" class="liinternal">Comment Pagination And Reply Depth In WordPress 2.7</a></li><li><a
href="http://wpengineer.com/show-amount-of-posts-pages-categories-tags-comments-for-wordpress-themes/" rel="bookmark" title="Permanent Link: Show Amount Of Posts, Pages, Categories, Tags, Comments For WordPress Themes" class="liinternal">Show Amount Of Posts, Pages, Categories, Tags, Comments For WordPress Themes</a></li><li><a
href="http://wpengineer.com/wp_list_comments-in-wordpress-27/" rel="bookmark" title="Permanent Link: wp_list_comments In WordPress 2.7" class="liinternal">wp_list_comments In WordPress 2.7</a></li></ul><hr
/><p><img
style="float:left;" src="http://wpengineer.com/favicon.ico" alt="WP Engineer Favicon"/> Thanks for subscribing our feed! <a
href="http://buysellads.com/buy/detail/3646/" class="liexternal">Sponsor the WP Engineer Blog</a> and get your brand in front of several hundred users per day!<br
/> &copy; <a
href="http://wpengineer.com/" class="liinternal">WP Engineer Team</a>, All rights reserved <small>(Digital Fingerprint: WPEngineer-be0254ce2b4972feb4b9cb72034a092d)</small></p> ]]></content:encoded> <wfw:commentRss>http://wpengineer.com/change-admin-pagination-on-posts-pages-and-comments/feed/</wfw:commentRss> <slash:comments>7</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Database Caching 44/120 queries in 1.095 seconds using disk
Object Caching 2768/2980 objects using disk

Served from: wpengineer.com @ 2010-07-29 13:30:10 -->