<?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>NeatCN(NeatStudio工作室) &#187; Wordpress开发</title>
	<atom:link href="http://www.neatcn.com/topics/wordpress/feed" rel="self" type="application/rss+xml" />
	<link>http://www.neatcn.com</link>
	<description>NeatStudio工作室</description>
	<lastBuildDate>Fri, 09 Dec 2011 13:07:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>WordPress 3.0</title>
		<link>http://www.neatcn.com/show-67-1.shtml</link>
		<comments>http://www.neatcn.com/show-67-1.shtml#comments</comments>
		<pubDate>Mon, 07 Jun 2010 23:15:39 +0000</pubDate>
		<dc:creator>膘叔</dc:creator>
				<category><![CDATA[Wordpress开发]]></category>

		<guid isPermaLink="false">http://www.neatcn.com/?p=67</guid>
		<description><![CDATA[【2010-06-21】今天，我已经升级到了3.0了。over &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- 上次是RC，这次是RC2，看来正式版离我们很近了。 事实上我也明白，如果不想多用户版，2.9已经够用了。wp为了让插件更容易开发，忽略的是性能，因此，在不装插件的情况下，WP的性能其实也还是可以接受的。只是插件多了，每次都要add_actin,add_xxxxx，就慢上很多。虽然插件都有缓存，但IO的消耗不会少呀？ 看原新闻怎么说吧，RC2只更新了一条： Changes: This release contains many bugfixes and improvements since Release Candidate 1. There have been improvements in the nav menus, multisite, the TwentyTen theme, and the upgrade functions, to name a few. There is also &#8230; <a href="http://www.neatcn.com/show-67-1.shtml">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>【2010-06-21】今天，我已经升级到了3.0了。over<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
上次是RC，这次是RC2，看来正式版离我们很近了。<br />
事实上我也明白，如果不想多用户版，2.9已经够用了。wp为了让插件更容易开发，忽略的是性能，因此，在不装插件的情况下，WP的性能其实也还是可以接受的。只是插件多了，每次都要add_actin,add_xxxxx，就慢上很多。虽然插件都有缓存，但IO的消耗不会少呀？<br />
看原新闻怎么说吧，RC2只更新了一条：<br />
Changes:<br />
This release contains many bugfixes and improvements since Release Candidate 1. There have been improvements in the nav menus, multisite, the TwentyTen theme, and the upgrade functions, to name a few. There is also new contextual help available.<br />
感觉好象没什么太大的意义，看来，稳定多了。stable版本即将出现了</p>
]]></content:encoded>
			<wfw:commentRss>http://www.neatcn.com/show-67-1.shtml/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress : Adding Administration Menus</title>
		<link>http://www.neatcn.com/show-66-1.shtml</link>
		<comments>http://www.neatcn.com/show-66-1.shtml#comments</comments>
		<pubDate>Wed, 26 May 2010 03:43:59 +0000</pubDate>
		<dc:creator>膘叔</dc:creator>
				<category><![CDATA[Wordpress开发]]></category>
		<category><![CDATA[adminpage]]></category>

		<guid isPermaLink="false">http://www.neatcn.com/?p=66</guid>
		<description><![CDATA[If you want to give your pluging an options page,you must set a administration menu or options sub menu. Some manual can find it on wordpress.org.
OK,to add an administration menu, you must do three things:

   1. Create a function that contains the menu-building code
   2. Register the above function using the "admin_menu" action hook
   3. Create the HTML output for the page (screen) displayed when the menu item is clicked  <a href="http://www.neatcn.com/show-66-1.shtml">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>If you want to give your pluging an options page,you must set a administration menu or options sub menu. Some manual can find it on wordpress.org.<br />
OK,to add an administration menu, you must do three things:</p>
<p>   1. Create a function that contains the menu-building code<br />
   2. Register the above function using the &#8220;admin_menu&#8221; action hook<br />
   3. Create the HTML output for the page (screen) displayed when the menu item is clicked </p>
<p>It is that second step that is often overlooked by new developers. You cannot simply call the menu code described; you must put it inside a function, and then register the function.</p>
<p>Here is a very simple example of the three steps just described. This plugin will add a sub-level menu item under the Settings top-level menu, and when selected, that menu item will cause a very basic screen to display. Note: this code should be added to a main plugin PHP file or a separate PHP include file. </p>
<pre class="brush:php">
< ?php
add_action('admin_menu', 'my_plugin_menu');

function my_plugin_menu() {
  add_options_page('My Plugin Options', 'My Plugin', 'manage_options', 'my-unique-identifier', 'my_plugin_options');
}

function my_plugin_options() {
  if (!current_user_can('manage_options'))  {
    wp_die( __('You do not have sufficient permissions to access this page.') );
  }
  echo '< div class="wrap" >';
  echo '< p >Here is where the form would go if I actually had options.< / p >';
  echo '< / div >';
}
?>
</pre>
<p>Now,you looked this example, the function, my_plugin_menu(), adds a new item to the Administration menu via the add_options_page function. Note: more complicated multiple menu items can be added, but that will be described later. Notice the add_action line&#8211;that invokes the hook which &#8220;registers&#8221; the function, my_plugin_menu(). Without that add_action, a PHP error for &#8220;undefined function&#8221; will be thrown when attempting to activate the plugin. Finely, the add_options_page  code refers to the my_plugin_options() function which contains the actual page to be displayed (and PHP code to be processed) when someone clicks the menu item.</p>
<p>The actual detail of these processes is described in more detail in the sections below. Remember to enclose creation of the menu and the html page in functions, and invoke the admin_menu hook to get the whole process started!<br />
&#8212;//some code and english manual copy from http://codex.wordpress.org/Adding_Administration_Menus&#8212;<br />
if you want to set an administration menu,you can see it..</p>
]]></content:encoded>
			<wfw:commentRss>http://www.neatcn.com/show-66-1.shtml/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>wordpress开发的几个事项</title>
		<link>http://www.neatcn.com/show-64-1.shtml</link>
		<comments>http://www.neatcn.com/show-64-1.shtml#comments</comments>
		<pubDate>Tue, 18 May 2010 01:01:39 +0000</pubDate>
		<dc:creator>膘叔</dc:creator>
				<category><![CDATA[Wordpress开发]]></category>

		<guid isPermaLink="false">http://www.neatcn.com/?p=64</guid>
		<description><![CDATA[1、自定义字段，详见 http://codex.wordpress.org/Using_Custom_Fields ，几个常见的方法有： add_post_meta($id,$key,$value,$unique),update_post_meta,delete_post_meta get_post_meta,get_post_meta_keys,get_post_meta_values 用于模版中的有，the_meta,get_post_meta 2、图片存在哪里？图片其实也是一条post数据，只是 post_type = attachment而己 其它post_type有，draft（草稿）,revision（历史数据）等。 当图片的post_parent没有值时，认为它是孤立附件。如果有值是认为是有关联的，仅关联第一次，如果有多个文章插入此图片，默认只关联第一次的。 3、wp_links是友情链接表 wp_comments是回复表 wp_commentmeta和postmeta类似，但一般都用不到。 wp_options是系统配置表，可以用get_options等获取。 wp_terms等三个表是关联表，wp_terms里面存放了category,tag等信息 wp_users等两个表是用户相关表。由于usermeta信息是key,value对应的，所以当要取所有的用户及全部配置信息时就很郁闷。如果用户不多，建议是把wp_usermeta全部取出来之后，再用foreach等做键值对应，否则，SQL查询就会死人。]]></description>
			<content:encoded><![CDATA[<p>1、自定义字段，详见  http://codex.wordpress.org/Using_Custom_Fields ，几个常见的方法有：<br />
    add_post_meta($id,$key,$value,$unique),update_post_meta,delete_post_meta<br />
    get_post_meta,get_post_meta_keys,get_post_meta_values<br />
    用于模版中的有，the_meta,get_post_meta</p>
<p>2、图片存在哪里？图片其实也是一条post数据，只是  post_type = attachment而己<br />
    其它post_type有，draft（草稿）,revision（历史数据）等。<br />
    当图片的post_parent没有值时，认为它是孤立附件。如果有值是认为是有关联的，仅关联第一次，如果有多个文章插入此图片，默认只关联第一次的。</p>
<p>3、wp_links是友情链接表<br />
        wp_comments是回复表<br />
        wp_commentmeta和postmeta类似，但一般都用不到。<br />
        wp_options是系统配置表，可以用get_options等获取。<br />
        wp_terms等三个表是关联表，wp_terms里面存放了category,tag等信息<br />
        wp_users等两个表是用户相关表。由于usermeta信息是key,value对应的，所以当要取所有的用户及全部配置信息时就很郁闷。如果用户不多，建议是把wp_usermeta全部取出来之后，再用foreach等做键值对应，否则，SQL查询就会死人。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.neatcn.com/show-64-1.shtml/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress的插件开发全攻略（目录）</title>
		<link>http://www.neatcn.com/show-63-1.shtml</link>
		<comments>http://www.neatcn.com/show-63-1.shtml#comments</comments>
		<pubDate>Mon, 17 May 2010 03:10:54 +0000</pubDate>
		<dc:creator>膘叔</dc:creator>
				<category><![CDATA[Wordpress开发]]></category>

		<guid isPermaLink="false">http://www.neatcn.com/?p=63</guid>
		<description><![CDATA[这篇文章是我转自sexywp.com的文章，有PDF版的下载哦，不过仔细看了之后，还是觉得比较简单，当然如果是初学的话，了解一下也足够了。 How to Write a WordPress Plugin &#8211; Introduction 介绍 Seven Reasons to Write a WordPress Plugin 编写插件的七个理 由 How to Get Ideas for WordPress Plugins 怎样获得 WordPress插件的创意 Structure of a WordPress Plugin WordPress 插件的结构 WordPress Plugin Actions WordPress 插件Actions &#8230; <a href="http://www.neatcn.com/show-63-1.shtml">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>这篇文章是我转自sexywp.com的文章，有PDF版的下载哦，不过仔细看了之后，还是觉得比较简单，当然如果是初学的话，了解一下也足够了。</p>
<ol>
<li><a href="http://www.devlounge.net/articles/how-to-write-a-wordpress-plugin-introduction">How  to Write a WordPress Plugin &#8211; Introduction</a></li>
<li><a href="http://sexywp.com/how-to-write-a-wp-plugin-01.htm">介绍</a></li>
<li><a href="http://www.devlounge.net/articles/seven-reasons-to-write-a-wordpress-plugin">Seven  Reasons to Write a WordPress Plugin</a></li>
<li><a href="http://sexywp.com/how-to-write-a-wp-plugin-02.htm">编写插件的七个理 由</a></li>
<li><a href="http://www.devlounge.net/articles/how-to-get-ideas-for-wordpress-plugins">How  to Get Ideas for WordPress Plugins</a></li>
<li><a href="http://sexywp.com/how-to-write-a-wp-plugin-03.htm">怎样获得 WordPress插件的创意</a></li>
<li><a href="http://www.devlounge.net/articles/structure-of-a-wordpress-plugin">Structure  of a WordPress Plugin</a></li>
<li><a href="http://sexywp.com/how-to-write-a-wp-plugin-04.htm">WordPress 插件的结构</a></li>
<li><a href="http://www.devlounge.net/articles/wordpress-plugin-actions">WordPress  Plugin Actions</a></li>
<li><a href="http://sexywp.com/how-to-write-a-wp-plugin-05.htm">WordPress  插件Actions</a></li>
<li><a href="http://www.devlounge.net/articles/wordpress-plugin-filters">WordPress  Plugin Filters</a></li>
<li><a href="http://sexywp.com/how-to-write-a-wp-plugin-06.htm">WordPress 插件Filter</a></li>
<li><a href="http://www.devlounge.net/articles/constructing-an-wordpress-plugin-admin-panel">Constructing  a WordPress Plugin Admin Panel</a></li>
<li><a href="http://sexywp.com/how-to-write-a-wp-plugin-07.htm">构造一个 WordPress插件管理员面板</a></li>
<li><a href="http://www.devlounge.net/articles/constructing-a-wordpress-plugin-users-panel">Constructing  a WordPress Plugin User’s Panel</a></li>
<li><a href="http://sexywp.com/how-to-write-a-wp-plugin-08.htm">构建一个 WordPress插件用户面板</a></li>
<li><a href="http://www.devlounge.net/articles/wordpress-plugins-and-database-interaction">WordPress  Plugins and Database Interaction</a></li>
<li><a href="http://sexywp.com/how-to-write-a-wp-plugin-09.htm">WordPress 插件和数据库交互</a></li>
<li><a href="http://www.devlounge.net/articles/using-javascript-and-css-with-your-wordpress-plugin">Using  JavaScript and CSS with your WordPress Plugin</a></li>
<li><a href="http://sexywp.com/how-to-write-a-wp-plugin-10.htm">在你的 WordPress插件中使用Javascript和CSS</a></li>
<li><a href="http://www.devlounge.net/articles/using-ajax-with-your-wordpress-plugin">Using  AJAX with your WordPress Plugin</a></li>
<li><a href="http://sexywp.com/how-to-write-a-wp-plugin-11.htm">在你的WP插件中 使用AJAX</a></li>
<li><a href="http://www.devlounge.net/articles/releasing-and-promoting-your-wordpress-plugin">Releasing  and Promoting Your WordPress Plugin</a></li>
<li><a href="http://sexywp.com/how-to-write-a-wp-plugin-12.htm">发布并推广你的 WordPress插件</a></li>
</ol>
<p>作者：<a href="http://sexywp.com/">Charles </a>原文链接：<a href="http://sexywp.com/how-to-write-a-wp-plugin-contents.htm">插件开发全攻略（目 录）</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.neatcn.com/show-63-1.shtml/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>测试最简单的插件</title>
		<link>http://www.neatcn.com/show-26-1.shtml</link>
		<comments>http://www.neatcn.com/show-26-1.shtml#comments</comments>
		<pubDate>Tue, 16 Mar 2010 01:37:29 +0000</pubDate>
		<dc:creator>膘叔</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Wordpress开发]]></category>
		<category><![CDATA[add_filter]]></category>

		<guid isPermaLink="false">http://www.neatcn.com/?p=26</guid>
		<description><![CDATA[尝试使用wordpress的时候，看了一下插件的简要信息，说白了，就是一个add_filter在调用相关信息。于是参照hello_dolly插件写了一个最简单的插件，也就是在文章内容后面加上一个版权信息。好象除了默认的模版外，其他就没有这样的提示了。所以，我就开始这样的尝试。 /** * @package NeatCN Copyright * @author neatcn / gouki * @version 0.1 */ /* Plugin Name: NeatCN WordPress Copyright Plugin URI: http://neatcn.com/# Description: 显示文章的版权信息 Author: NeatCN / gouki Version: 0.1 Author URI: http://neatcn.com/ */ function neatCopyRight ( $content &#8230; <a href="http://www.neatcn.com/show-26-1.shtml">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>尝试使用wordpress的时候，看了一下插件的简要信息，说白了，就是一个add_filter在调用相关信息。于是参照hello_dolly插件写了一个最简单的插件，也就是在文章内容后面加上一个版权信息。好象除了默认的模版外，其他就没有这样的提示了。所以，我就开始这样的尝试。</p>
<pre class="brush:php">
/**
 * @package NeatCN Copyright
 * @author neatcn / gouki
 * @version 0.1
 */
/*
Plugin Name: NeatCN WordPress Copyright
Plugin URI: http://neatcn.com/#
Description: 显示文章的版权信息
Author: NeatCN / gouki
Version: 0.1
Author URI: http://neatcn.com/
*/
function neatCopyRight ( $content )
{
	$content .= < <<EOT

wordpress测试插件【显示版权信息】，显示在文章结尾
EOT;
	echo( $content );
}
add_filter('the_content' , 'neatCopyRight' , 1 , 1000);
</pre>
<p>于是在文章内容结束后就有了这一行信息。当然上面仅仅是测试，我不会满足这点的。于是我对neatCopyRight进行了改进，插件也就变成了0.2版了。</p>
<pre class="brush:php">
/*
  说明，the_time，the_category这些函数在文章里居然没有输出值，所以还需要研究一下
  0.2是个失败的作品，晚上回家继续研究
 */
function neatCopyRight ( $content )
{
	$postTime = the_time('l, F jS, Y') . the_time();
	$currentCate = the_category(', ');
	$rssLink = post_comments_feed_link('RSS 2.0');
	$content .= < <<EOT
		<!-- 您可以参考wp-content/themes/default/single.php -->

本文发表于 $postTime , 隶属于 $currentCate 分类，你可以订阅本文的评论：$rssLink 

EOT;
	echo( $content );
}
</pre>
<p>第一个插件，连配置啥的都没有。只能算是一个尝试，尝试了一下add_filter函数而己</p>
]]></content:encoded>
			<wfw:commentRss>http://www.neatcn.com/show-26-1.shtml/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>如何关闭WordPress修订功能</title>
		<link>http://www.neatcn.com/show-13-1.shtml</link>
		<comments>http://www.neatcn.com/show-13-1.shtml#comments</comments>
		<pubDate>Fri, 12 Mar 2010 14:35:23 +0000</pubDate>
		<dc:creator>膘叔</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Wordpress开发]]></category>
		<category><![CDATA[reversion]]></category>
		<category><![CDATA[wp cleaner]]></category>

		<guid isPermaLink="false">http://www.neatcn.com/?p=13</guid>
		<description><![CDATA[WordPress其实挺不错，但是Revision却不是特别方便，因为每一次的版本保存，都会增加一条主键记录。所以，你会发现，我的网站的文章，第一条是show-1-1.shtml，第二条却是show-11-1.shtml，中间10条却是Reversion所导致的。 由此可见，这样的频繁添加记录对于数据库来说是一个不小的压力，但对于普通用户来说，这个功能却真的并不是那样重要，但所幸，还是有办法 可以解决这个问题。 只要你打开wp-config.php文件，在文件的最后require(&#8216;wp-setting.php&#8217;)前加入： /** * 当值为-1或者true时，代表保存所有的Revision * 当值为false或者0时，代表关闭Revision * 当值大于0，并且是数字是，代表保留n次Revision */ define('WP_POST_REVISIONS',false); 具体说明请查看官方的说明文档“Revision Management”。 不过，如果你已经有了Revision的控制，但却想删除它，怎么办？除了直接执行sql外，还有就是安装这个WP Cleaner插件，我这里就不多做介绍了，我用下来，感觉不错很方便。]]></description>
			<content:encoded><![CDATA[<p>WordPress其实挺不错，但是Revision却不是特别方便，因为每一次的版本保存，都会增加一条主键记录。所以，你会发现，我的网站的文章，第一条是show-1-1.shtml，第二条却是show-11-1.shtml，中间10条却是Reversion所导致的。<br />
由此可见，这样的频繁添加记录对于数据库来说是一个不小的压力，但对于普通用户来说，这个功能却真的并不是那样重要，但所幸，还是有办法 可以解决这个问题。<br />
只要你打开wp-config.php文件，在文件的最后require(&#8216;wp-setting.php&#8217;)前加入：</p>
<pre class="brush:php">/**
 * 当值为-1或者true时，代表保存所有的Revision
 * 当值为false或者0时，代表关闭Revision
 * 当值大于0，并且是数字是，代表保留n次Revision
 */
define('WP_POST_REVISIONS',false);
</pre>
<p>具体说明请查看官方的说明文档“<a href="http://codex.wordpress.org/Revision_Management" target="_blank">Revision Management</a>”。</p>
<p>不过，如果你已经有了Revision的控制，但却想删除它，怎么办？除了直接执行sql外，还有就是安装这个<a href="http://www.jiangmiao.org/blog/c/wpcleaner">WP Cleaner</a>插件，我这里就不多做介绍了，我用下来，感觉不错很方便。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.neatcn.com/show-13-1.shtml/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

