<?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>ZWWoOoOo &#187; WordPress</title>
	<atom:link href="http://zww.me/archives/category/wordpress/feed" rel="self" type="application/rss+xml" />
	<link>http://zww.me</link>
	<description>因为喜欢所以折腾...无折腾不铁血！</description>
	<lastBuildDate>Wed, 08 Feb 2012 14:08:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>WordPress后台：我被自己火星了一下</title>
		<link>http://zww.me/archives/25557</link>
		<comments>http://zww.me/archives/25557#comments</comments>
		<pubDate>Sun, 18 Dec 2011 02:54:21 +0000</pubDate>
		<dc:creator>zwwooooo</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WP其它]]></category>
		<category><![CDATA[囧]]></category>

		<guid isPermaLink="false">http://zww.me/?p=25557</guid>
		<description><![CDATA[自从前几天我升级到 WordPress 3.3 后，我进后台就一直很纳闷，死活找不到博客首页链接…… 没道理啊，WordPress 不可能这么没人性化啊，肯定哪里搞错了，可我找遍所有设置处都没找到相关设置啊，后来忙着其他事就放着了…… 今天进后台回复评论，回复完想打开博客首页，又郁闷起来了……于是在 Twitter 发了条牢骚，很快就得到推友 @ihacklog 的回推： 厄，我忘了 Admin bar 这货了，我记得我在 WP 3.1 时就屏蔽掉这个工具栏，而且方法比较绝： 对，直接把工具条的 js 注销了……囧rz，没想到自己把自己给火星了！ 立马打开主题文件 functions.php 删除此绝法代码！然后在去后台 》设置当前用户 》勾选不在前台显示工具栏（我真不喜欢在前台看到此工具栏） 有时发现比较蛋疼的问题又不符合对方的做事风格时，就要先考虑自身问题了…… 吐槽：“仪表盘”的翻译真令人蛋疼！ 我有点想用繁体版的 WordPress 了…… PS：我给博客的“read more”按钮加了蛋疼的 jQuery 效果，朋友，您无聊、蛋疼、有耐性……吗？那么先ctrl+f5刷新我的首页，然后把鼠标指针停留在“read more”上面吧 声明: 除非注明，ZWWoOoOo文章均为原创，转载请以链接形式标明本文地址本文地址: http://zww.me/archives/25557]]></description>
			<content:encoded><![CDATA[<p>自从前几天我<a title="升级到 WordPress 3.3，被雷到" href="http://zww.me/archives/25555">升级到 WordPress 3.3 后</a>，我进后台就一直很纳闷，死活找不到博客首页链接……</p>
<p><img title="" src="http://im.zww.im/2011/12/111216-wp-dashboard-1.jpg" alt="" /></p>
<p>没道理啊，WordPress 不可能这么没人性化啊，肯定哪里搞错了，可我找遍所有设置处都没找到相关设置啊，后来忙着其他事就放着了……</p>
<p>今天进<a title="WP后台直接回复评论：支持二级无限嵌套评论、@方式、邮件通知" href="http://zww.me/archives/25538">后台回复评论</a>，回复完想打开博客首页，又郁闷起来了……于是在 Twitter 发了条牢骚，很快就得到推友 <a href="https://twitter.com/#!/ihacklog">@ihacklog</a> 的回推：</p>
<p><img title="" src="http://im.zww.im/2011/12/111216-wp-dashboard-2.jpg" alt="" /></p>
<p>厄，我忘了 Admin bar 这货了，我记得我在 WP 3.1 时就屏蔽掉这个工具栏，而且方法比较绝：</p>
<p><img title="" src="http://im.zww.im/2011/12/111216-wp-dashboard-3.jpg" alt="" /></p>
<p>对，直接把工具条的 js 注销了……囧rz，没想到自己把自己给火星了！</p>
<p>立马打开主题文件 functions.php 删除此绝法代码！然后在去后台 》设置当前用户 》勾选不在前台显示工具栏（我真不喜欢在前台看到此工具栏）</p>
<p><img title="" src="http://im.zww.im/2011/12/111216-wp-dashboard-4.jpg" alt="" /></p>
<p><strong>有时发现比较蛋疼的问题又不符合对方的做事风格时，就要先考虑自身问题了</strong>……</p>
<p>吐槽：“仪表盘”的翻译真令人蛋疼！</p>
<p><img title="" src="http://im.zww.im/2011/12/111216-wp-dashboard-5.jpg" alt="" /></p>
<p>我有点想用繁体版的 WordPress 了……</p>
<p><span style="color: #800000;"><strong>PS：我给博客的“read more”按钮加了蛋疼的 jQuery 效果，朋友，您无聊、蛋疼、有耐性……吗？那么先ctrl+f5刷新我的首页，然后把鼠标指针停留在“read more”上面吧</strong></span></p>
<p class="announce"><span><strong>声明:</strong></span> 除非注明，<a href="http://zww.me/">ZWWoOoOo</a>文章均为原创，转载请以链接形式标明本文地址<br />本文地址: <a href="http://zww.me/archives/25557">http://zww.me/archives/25557</a></p>]]></content:encoded>
			<wfw:commentRss>http://zww.me/archives/25557/feed</wfw:commentRss>
		<slash:comments>148</slash:comments>
		</item>
		<item>
		<title>升级到 WordPress 3.3，被雷到</title>
		<link>http://zww.me/archives/25555</link>
		<comments>http://zww.me/archives/25555#comments</comments>
		<pubDate>Wed, 14 Dec 2011 16:40:00 +0000</pubDate>
		<dc:creator>zwwooooo</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WP中文版]]></category>
		<category><![CDATA[WP新版信息]]></category>

		<guid isPermaLink="false">http://zww.me/?p=25555</guid>
		<description><![CDATA[WordPress 3.3 发布了，于是我就升级了，完！ 哈哈，开玩笑的，我是不会写一句话的文章的，不是我的风格，虽然这篇文章核心内容也就是第一句话&#8230;&#8230; 其实前段时间我写《WordPress 3.3 主题审核又升级鸟》时已经是RC版本了，所以早就知道正式版很快了。 刚才回复完这2天朋友们的评论后就在后台更新了，本来我是不打算写的，只是被升级后的提示雷到了&#8230;&#8230;所以顺便贴出来： 欢迎使用 WordPress 3.3 感谢升级到最新版本！使用 WordPress 3.3 不仅可以让男生更帅，女生更美、改良人格，还可以大幅提升您在网上发布的体验。诶，开玩笑的，其实她只能提升您的使用体验，但是光这一点就很不错了 有没有被雷到？哈哈，顺便贴些新版介绍吧，然后睡觉去！ 简易上传 文件类型检测 我们进行简化啦！现在只有一个上传图标，您不必再像原先那样自己根据文件类型在一堆图标中选择了。在您上传完成之后，符合您文件类型的属性栏目将自动显示，供您填写。 支持拖放上传的多媒体上传工具 在文章和页面中添加图片等文件变得更简单了。将文件拖至上传窗口即可！一次还可以拖放上传多个文件。 更多文件格式 上传工具现已支持上传 rar 和 7z 格式的文件。 仪表盘的设计 弹出菜单 全新的自动弹出式菜单提高您的效率，减少不必要的反复鼠标点击。当您把鼠标放置在主菜单项目上方时，其子菜单会自动弹出&#8212;&#8212;从此访问任何页面只需一次鼠标点击！ 原顶部内容 + 管理工具栏 = 一体化工具栏 为了节约宝贵的屏幕空间，我们将之前的&#8220;管理工具栏&#8221;和仪表盘的顶部内容结合了起来，制作了全新的一体化工具栏。将鼠标移至相应功能分类的上方来快捷访问各项功能。 自适应的界面 很多仪表盘页面的样式已经过优化，适合更多的屏幕大小，包括 iPad 和一些&#8220;平板电脑&#8221;设备。 &#8220;帮助&#8221;选项卡们 每个仪表盘页面右上方的&#8220;帮助&#8221;选项卡日前接受了我们的整容手术。原先大段的帮助内容大多分成了几个小类，更加实用，便于查找。其右侧的相关链接则一直显示。 耳目一新 新特性气泡提示 今后在我们大幅改动页面设计时，新的&#8220;气泡提示&#8221;会自动通知您，告知改动的详情，方便您更快了解并适应我们的新设计。 获知升级内容 就是这个页面！今后每当您升级 WordPress 后，您都会看到这个页面 &#8212;&#8212; 本页面也可以通过点击工具栏左侧的 W 图标访问到 &#8212;&#8212; 令您了解我们最近更新了什么。 [...]]]></description>
			<content:encoded><![CDATA[<p>WordPress 3.3 发布了，于是我就升级了，完！</p>
<p>哈哈，开玩笑的，我是不会写一句话的文章的，不是我的风格，虽然这篇文章核心内容也就是第一句话&hellip;&hellip;</p>
<p>其实前段时间我写《<a title="WordPress 3.3 主题审核又升级鸟" href="http://zww.me/archives/25541">WordPress 3.3 主题审核又升级鸟</a>》时已经是RC版本了，所以早就知道正式版很快了。</p>
<p>刚才回复完这2天朋友们的评论后就在后台更新了，本来我是不打算写的，只是被升级后的提示雷到了&hellip;&hellip;所以顺便贴出来：</p>
<h3>欢迎使用 WordPress 3.3</h3>
<p><strong>感谢升级到最新版本！使用 WordPress 3.3 不仅可以让男生更帅，女生更美、改良人格，还可以大幅提升您在网上发布的体验。诶，开玩笑的，其实她只能提升您的使用体验，但是光这一点就很不错了 <img src='http://zww.me/wordpress/wp-content/themes/zTwoBorders/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </strong></p>
<p>有没有被雷到？哈哈，顺便贴些新版介绍吧，然后睡觉去！</p>
<blockquote><h3>简易上传</h3>
<p><strong>文件类型检测</strong></p>
<p>我们进行简化啦！现在只有一个上传图标，您不必再像原先那样自己根据文件类型在一堆图标中选择了。在您上传完成之后，符合您文件类型的属性栏目将自动显示，供您填写。</p>
<p><strong>支持拖放上传的多媒体上传工具</strong></p>
<p>在文章和页面中添加图片等文件变得更简单了。将文件拖至上传窗口即可！一次还可以拖放上传多个文件。</p>
<p><strong>更多文件格式</strong></p>
<p>上传工具现已支持上传 rar 和 7z 格式的文件。</p>
<h3>仪表盘的设计</h3>
<p><strong>弹出菜单</strong></p>
<p>全新的自动弹出式菜单提高您的效率，减少不必要的反复鼠标点击。当您把鼠标放置在主菜单项目上方时，其子菜单会自动弹出&mdash;&mdash;从此访问任何页面只需一次鼠标点击！</p>
<p><strong>原顶部内容 + 管理工具栏 = 一体化工具栏</strong></p>
<p>为了节约宝贵的屏幕空间，我们将之前的&ldquo;管理工具栏&rdquo;和仪表盘的顶部内容结合了起来，制作了全新的一体化工具栏。将鼠标移至相应功能分类的上方来快捷访问各项功能。</p>
<p><strong>自适应的界面</strong></p>
<p>很多仪表盘页面的样式已经过优化，适合更多的屏幕大小，包括 iPad 和一些&ldquo;平板电脑&rdquo;设备。</p>
<p><strong>&ldquo;帮助&rdquo;选项卡们</strong></p>
<p>每个仪表盘页面右上方的&ldquo;帮助&rdquo;选项卡日前接受了我们的整容手术。原先大段的帮助内容大多分成了几个小类，更加实用，便于查找。其右侧的相关链接则一直显示。</p>
<h3>耳目一新</h3>
<p><strong>新特性气泡提示</strong></p>
<p>今后在我们大幅改动页面设计时，新的&ldquo;气泡提示&rdquo;会自动通知您，告知改动的详情，方便您更快了解并适应我们的新设计。</p>
<p><strong>获知升级内容</strong></p>
<p>就是这个页面！今后每当您升级 WordPress 后，您都会看到这个页面 &mdash;&mdash; 本页面也可以通过点击工具栏左侧的 W 图标访问到 &mdash;&mdash; 令您了解我们最近更新了什么。</p>
<p><strong>仪表盘欢迎框</strong></p>
<p>在用户安装完 WordPress ，第一次访问仪表盘的首页时，会看到&ldquo;欢迎&rdquo;框。欢迎框展示如何完成配置并开始使用 WordPress。在用户关闭该框后，可以通过仪表盘首页的&ldquo;显示选项&rdquo;令其再度显示出来。</p>
<h3>内容相关</h3>
<p><strong>增强的合作编辑</strong></p>
<p>您原来是否遇到过&ldquo;某人也在编辑这篇文章&rdquo;的提示，但是实际上此人已经编辑完了的问题？今后，只有他人正在编辑页面上时，您才会得到提示&mdash;&mdash;没有延时！</p>
<p><strong>Tumblr 导入工具</strong></p>
<p>要从 Tumblr 将内容导入到 WordPress？现在可以了！访问&ldquo;工具&rdquo; &gt; &ldquo;导入&rdquo;来获取新的 Tumblr 导入工具。该导入工具甚至支持自动为您选择正确的文章形式，在导入之前先选择一个支持文章形式功能的主题即可。</p>
<p><strong>边栏小工具改进</strong></p>
<p>主题所支持的边栏数目和位置通常各不相同。更改主题经常需要您手动重新配置边栏。但现在，如果您切换回原来使用过的主题，其边栏小工具将自动恢复。注意：如果您在切换主题之后又添加了新的边栏，您原来小工具的设置能被保留，但是无法自动恢复回它们各自的位置，这时您将需要从&ldquo;未使用的小工具&rdquo;中半自动地将他们放回原先的位置。</p>
<h3>面板之下</h3>
<p><strong>灵活的固定链接选择</strong></p>
<p>固定链接方面，您有了更多的格式选择。删除 URL 中的日期信息、在 URL 中包含分类目录别名不会再降低程序运行效率。</p>
<p><strong>文章别名：更别致</strong></p>
<p>在文章标题中的特殊字符（比如 Word 中的引号）不会再把文章的别名弄得一团糟。</p>
<p><strong>jQuery 和 jQuery UI</strong></p>
<p>WordPress 现已包含整个 jQuery UI 和 jQuery 的最新版本（1.7.1）。</p>
<p><strong>is_main_query()</strong></p>
<p>这个实用的方法可以返回一个指定的 WP_Query 对象是否是主 WordPress 查询。</p>
<p><strong>WP_Screen API</strong></p>
<p>WordPress 新增了超棒的 API，供您调整各个后台页面的细节，比如创建内容丰富的页面、添加帮助文本、适应页面上下文等等。</p>
<p><strong>编辑器 API 的大调整</strong></p>
<p>新的编辑器 API 可以自动为您的插件页面添加文章、页面编辑器及其所需的所有 JS 和 CSS 文件。它甚至支持您在一个页面上加入多个编辑器。</p>
</blockquote>
<p>晚安～</p>
<div><embed id="lingoes_plugin_object" type="application/lingoes-npruntime-capture-word-plugin" width="0" height="0" hidden="true"></embed></div>
<p class="announce"><span><strong>声明:</strong></span> 除非注明，<a href="http://zww.me/">ZWWoOoOo</a>文章均为原创，转载请以链接形式标明本文地址<br />本文地址: <a href="http://zww.me/archives/25555">http://zww.me/archives/25555</a></p>]]></content:encoded>
			<wfw:commentRss>http://zww.me/archives/25555/feed</wfw:commentRss>
		<slash:comments>108</slash:comments>
		</item>
		<item>
		<title>jQuery实现: 标签云显示每标签的文章数</title>
		<link>http://zww.me/archives/25553</link>
		<comments>http://zww.me/archives/25553#comments</comments>
		<pubDate>Sat, 10 Dec 2011 08:32:00 +0000</pubDate>
		<dc:creator>zwwooooo</dc:creator>
				<category><![CDATA[WP Trick]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Trick]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WP函数]]></category>

		<guid isPermaLink="false">http://zww.me/archives/25553</guid>
		<description><![CDATA[这是西门需要的功能，西门目前是通过修改WordPress源文件实现的，但他希望用WordPress函数的钩子来实现，不过今天下午我看了下标签云（标签列表）源代码，木有适合的钩子来改变输出数据（我看了源码后觉得是这样，或许有其它办法），函数只提供了2个钩子，一个是标签类别，一个是整个函数钩子&#8230;&#8230; 不过，在讨论+测试过程中我发现标签云列表本身就有&#8220;鼠标悬停显示当前标签的文章数&#8221;，所以是可以用 jQuery 来解决的。于是我就用到我博客侧边栏的标签云了，效果如下图：（也可以点击侧边栏的&#8220;签&#8221;查看效果） 怎么样？很蛋疼吧&#8230;&#8230; 下面是实现方法，当然显示效果不是和我一样，我只是提供简单 jQuery 代码，具体的样式自行写 css 假如你的标签云调用代码如下： &#60;div class="widget"&#62; &#160;&#160;&#160; &#60;h3&#62;标签云&#60;/h3&#62; &#160;&#160;&#160; &#60;div id="tag_cloud"&#62;&#60;?php wp_tag_cloud('unit=px&#38;smallest=12&#38;largest=12&#38;number=50'); ?&#62;&#60;/div&#62; &#60;/div&#62; 然后是 jQuery 代码，当然前提是先挂 jQuery 库 jQuery(document).ready(function($){ ////////TAG Cloud里面显示&#8220;每标签的文章数&#8221; by zwwooooo $('#tag_cloud a').each(function(){ &#160;&#160;&#160; var num=$(this).attr('title').split(' ')[0]; //获取标签里面的title值 &#160;&#160;&#160; var a=$(this).html()+' &#60;span class="tag_num"&#62;('+num+')&#60;/span&#62;'; //然后是标签的名插入此标签的文章数 &#160;&#160;&#160; $(this).html(a); //最后是改变标签名 }); }) 文章数的样式可以通过 tag_num 这个class定义 好吧，很简单，是不？对，就是这么简单，高手忽略吧。 文囧，稍微记录一些碰到的、问到的问题及解决方法也可。 声明: 除非注明，ZWWoOoOo文章均为原创，转载请以链接形式标明本文地址本文地址: [...]]]></description>
			<content:encoded><![CDATA[<p>这是西门需要的功能，西门目前是通过修改WordPress源文件实现的，但他希望用WordPress函数的钩子来实现，不过今天下午我看了下标签云（标签列表）源代码，木有适合的钩子来改变输出数据（我看了源码后觉得是这样，或许有其它办法），函数只提供了2个钩子，一个是标签类别，一个是整个函数钩子&hellip;&hellip;</p>
<p>不过，在讨论+测试过程中我发现标签云列表本身就有&ldquo;鼠标悬停显示当前标签的文章数&rdquo;，所以是可以用 jQuery 来解决的。于是我就用到我博客侧边栏的标签云了，效果如下图：（也可以点击侧边栏的&ldquo;签&rdquo;查看效果）</p>
<p><img src="http://im.zww.im/2011/12/111210-jquery-add-tag-number-1.jpg" alt="标签云显示每标签的文章数" /></p>
<p><img src="http://im.zww.im/2011/12/111210-jquery-add-tag-number-2.jpg" alt="标签云显示每标签的文章数" /></p>
<p>怎么样？很蛋疼吧&hellip;&hellip;</p>
<p>下面是实现方法，当然显示效果不是和我一样，我只是提供简单 jQuery 代码，具体的样式自行写 css</p>
<ol>
<li>假如你的标签云调用代码如下：</li>
</ol>
<pre>&lt;div class="widget"&gt;
&nbsp;&nbsp;&nbsp; &lt;h3&gt;标签云&lt;/h3&gt;
&nbsp;&nbsp;&nbsp; &lt;div id="<span style="color: #0000ff;">tag_cloud</span>"&gt;<span style="color: #ff0000;">&lt;?php</span> wp_tag_cloud('<span style="color: #808080;">unit=px&amp;smallest=12&amp;largest=12&amp;number=50</span>'); <span style="color: #ff0000;">?&gt;</span>&lt;/div&gt;
&lt;/div&gt;
</pre>
<ol>
<li>然后是 jQuery 代码，当然前提是先挂 jQuery 库</li>
</ol>
<pre>jQuery(document).ready(function($){
    <span style="color: #008000;">////////TAG Cloud里面显示&ldquo;每标签的文章数&rdquo; by zwwooooo</span>
    $('#<span style="color: #0000ff;">tag_cloud</span> a').each(function(){
&nbsp;&nbsp;&nbsp;     var num=$(this).attr('title').split(' ')[0]; <span style="color: #008000;">//获取标签里面的title值</span>
&nbsp;&nbsp;&nbsp;     var a=$(this).html()+' &lt;span class="tag_num"&gt;('+num+')&lt;/span&gt;'; <span style="color: #008000;">//然后是标签的名插入此标签的文章数</span>
&nbsp;&nbsp;&nbsp;     $(this).html(a); <span style="color: #008000;">//最后是改变标签名</span>
    });
})
</pre>
<p>文章数的样式可以通过 tag_num 这个class定义</p>
<p>好吧，很简单，是不？对，就是这么简单，高手忽略吧。</p>
<p>文囧，稍微记录一些碰到的、问到的问题及解决方法也可。</p>
<p class="announce"><span><strong>声明:</strong></span> 除非注明，<a href="http://zww.me/">ZWWoOoOo</a>文章均为原创，转载请以链接形式标明本文地址<br />本文地址: <a href="http://zww.me/archives/25553">http://zww.me/archives/25553</a></p>]]></content:encoded>
			<wfw:commentRss>http://zww.me/archives/25553/feed</wfw:commentRss>
		<slash:comments>91</slash:comments>
		</item>
		<item>
		<title>WordPress 3.3 主题审核又升级鸟</title>
		<link>http://zww.me/archives/25541</link>
		<comments>http://zww.me/archives/25541#comments</comments>
		<pubDate>Sun, 13 Nov 2011 04:15:45 +0000</pubDate>
		<dc:creator>zwwooooo</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WP其它]]></category>

		<guid isPermaLink="false">http://zww.me/?p=25541</guid>
		<description><![CDATA[昨天收到 WordPress 官方主题开发者的邮件，里面提及 WordPress 3.3 对于主题审核的要求，我英文不好，简单说一下。 New WordPress 3.3 Functionality - 主题不得使用后台指针（Admin pointers）【注：好像是因为容易跟插件冲突，而WP官方还木有推出相应的 API】 - 主题不得产生 _doing_it_wrong() 的任何警告【注：主题审核人员现在也有些会要求你debug时无任何警告】 现在的审核要求修正 - 必须用 get_template_directory()/get_stylesheet_directory() 代替 TEMPLATEPATH/STYLESHEETPATH【注：这个是早要求了，但不是必须，现在是必须了】 - admin-enqueued scripts/stylesheets必须使用主题特定钩子挂接，例如：admin_enqueue_script-appearance_page_$menu_slug - 修改主题标题必须使用 wp_title filter 去过滤 wp_title()，或者通过参数来去 wp_title() - 主题不得使用 function_exists() 函数包装其它函数/功能让其兼容老版本的 WordPress【注：这个我在最近升级 zBench 时就被提醒了】 - 版权和许可 o 主题必须声明版权和许可信息 o 衍生主题必须保留或者声明原作的版本和许可信息（GPL-applicable examples） - 底部链接的 anchor 文本, alt 文本, title [...]]]></description>
			<content:encoded><![CDATA[<p>昨天收到 WordPress 官方主题开发者的邮件，里面提及 WordPress 3.3 对于主题审核的要求，我英文不好，简单说一下。</p>
<p><strong>New WordPress 3.3 Functionality</strong></p>
<p>- 主题不得使用后台指针（Admin pointers）【注：好像是因为容易跟插件冲突，而WP官方还木有推出相应的 API】</p>
<p>- 主题不得产生 _doing_it_wrong() 的任何警告【注：主题审核人员现在也有些会要求你debug时无任何警告】</p>
<p><strong>现在的审核要求修正</strong></p>
<p>- 必须用 get_template_directory()/get_stylesheet_directory() 代替 TEMPLATEPATH/STYLESHEETPATH【注：这个是早要求了，但不是必须，现在是必须了】</p>
<p>- admin-enqueued scripts/stylesheets必须使用主题特定钩子挂接，例如：admin_enqueue_script-appearance_page_$menu_slug</p>
<p>- 修改主题标题必须使用 wp_title filter 去过滤 wp_title()，或者通过参数来去 wp_title()</p>
<p>- 主题不得使用 function_exists() 函数包装其它函数/功能让其兼容老版本的 WordPress【注：这个我在最近升级 <a href="http://zww.me/archives/25131" title="zBench">zBench</a> 时就被提醒了】</p>
<p>- 版权和许可<br />
o 主题必须声明版权和许可信息<br />
o 衍生主题必须保留或者声明原作的版本和许可信息（GPL-applicable examples）</p>
<p>- 底部链接的 anchor 文本, alt 文本, title 文本必须跟链接相匹配</p>
<p>- 主题不得使用 TimThumb【<del datetime="2011-11-13T04:57:02+00:00">注：这是啥？是不是指一些指示性的东东？例如介绍</del>】<br />
Update: TimThumb应该是如 <a href="http://zww.me/archives/25541/comment-page-1#comment-64275">Justice</a> 所说指那个广泛使用的第三方缩略图工具</p>
<p>- 国际化：主题的翻译功能里面必须使用字符串，而不是变量、常数或者串联的。</p>
<p>- 主题不得仿制以前和现在的网站设计。仿制非网站设计主题，将考虑在逐案基础（注：这句我不会翻译，原文 - Themes that clone non-website designs will be considered on a case-by-case basis.）</p>
<p><strong>推荐修正</strong></p>
<p>- 主题设置和数据安全<br />
o 推荐用 do_settings_sections() 输出设置/表单，而不是硬编码标记。</p>
<p><strong>准则</strong></p>
<p>- Credit Links<br />
o 主题链接（ThemeURI）不能仅仅是主题演示站，而必须是与此主题相关内容为主。<br />
o 主题作者链接（AuthorURI）必须是个人性质的网站</p>
<p>英文好的朋友去看原文吧：<a href="http://make.wordpress.org/themes/2011/11/10/wordpress-3-3-proposed-guidelines-revisions/" title="WordPress 3.3 Proposed Guidelines Revisions">这里</a></p>
<p>尾：想把主题提交官网的童鞋们，在蛋疼基础上更上一层楼吧——双蛋疼！</p>
<p class="announce"><span><strong>声明:</strong></span> 除非注明，<a href="http://zww.me/">ZWWoOoOo</a>文章均为原创，转载请以链接形式标明本文地址<br />本文地址: <a href="http://zww.me/archives/25541">http://zww.me/archives/25541</a></p>]]></content:encoded>
			<wfw:commentRss>http://zww.me/archives/25541/feed</wfw:commentRss>
		<slash:comments>88</slash:comments>
		</item>
		<item>
		<title>WP后台直接回复评论：支持二级无限嵌套评论、@方式、邮件通知</title>
		<link>http://zww.me/archives/25538</link>
		<comments>http://zww.me/archives/25538#comments</comments>
		<pubDate>Sat, 29 Oct 2011 13:20:27 +0000</pubDate>
		<dc:creator>zwwooooo</dc:creator>
				<category><![CDATA[WP Trick]]></category>
		<category><![CDATA[Trick]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://zww.me/?p=25538</guid>
		<description><![CDATA[“WP后台直接回复评论：支持二级无限嵌套评论、@方式、邮件通知”是我上个星期就折腾好的功能，目前我和A.shun在用，非常方便。 我一直想要这功能，但一直木有高手去写，于是自己用蛋疼的 jQuery 实现…… 前提： 【一定要】无限嵌套：完美的WordPress无限嵌套回复方法 【可选】要支持评论回复通知，那么参考：整理: WordPress 评论回复邮件通知代码 ps：好吧，前一篇我卖关子了，其实就这里用用而已…… 步骤： 开始以前再次提醒：你的主题一定要支持无限嵌套评论！！！ 1. 把下面蛋疼的 jQuery 代码存为 admin_reply.js，放在所用主题目录。或者直接点这里下载 Update: 2011.10.30 修正 @xxx 的链接（感谢axiu同志反馈） jQuery(document).ready(function($){ //WP后台直接回复评论：支持二级无限嵌套评论、@方式、邮件通知 by zwwooooo     $('.vim-r').click(function(){         var $submitted_on=$(this).parent().parent().parent().children('.submitted-on');         if ($submitted_on.children('a').length == 2) {             var parentID=$submitted_on.find('a:last').attr('href').split('#')[1];             $('#replyrow').find('#comment_ID').attr('value',parentID);         }         var atid = '"#' + $submitted_on.children('a:first').attr('href').split('#')[1].split('-')[1] + '"';         var [...]]]></description>
			<content:encoded><![CDATA[<p>“WP后台直接回复评论：支持二级无限嵌套评论、@方式、邮件通知”是我上个星期就折腾好的功能，目前我和A.shun在用，非常方便。</p>
<p>我一直想要这功能，但一直木有高手去写，于是自己用蛋疼的 jQuery 实现……</p>
<p><strong>前提</strong>：</p>
<p>【一定要】无限嵌套：<a title="完美的WordPress无限嵌套回复方法" href="http://zww.me/archives/25191">完美的WordPress无限嵌套回复方法</a></p>
<p>【可选】要支持评论回复通知，那么参考：<a title="整理: WordPress 评论回复邮件通知代码" href="http://zww.me/archives/25536">整理: WordPress 评论回复邮件通知代码</a><br />
ps：好吧，前一篇我卖关子了，其实就这里用用而已……</p>
<p><strong>步骤</strong>：</p>
<p><span style="text-decoration: underline;">开始以前再次提醒：你的主题一定要支持无限嵌套评论！！！</span></p>
<p>1. 把下面蛋疼的 jQuery 代码存为 admin_reply.js，放在所用主题目录。或者直接点<a href="http://zww-wp-plugin.googlecode.com/files/admin_reply.zip">这里</a>下载</p>
<p><span style="color: #ff0000;">Update:</span> 2011.10.30 修正 @xxx 的链接（感谢<a href="http://zww.me/archives/25538/comment-page-1#comment-63895">axiu</a>同志反馈）</p>
<pre><span style="color: #000000;">jQuery</span>(<span style="color: #000000;">document</span><span style="color: #000000;">).</span><span style="color: #000000;">ready</span>(<span style="color: #000080; font-weight: bold;">function</span>(<span style="color: #000000;">$</span><span style="color: #000000;">){</span> <span style="color: #008000;">//WP后台直接回复评论：支持二级无限嵌套评论、@方式、邮件通知 by zwwooooo</span>
     <span style="color: #000000;">$</span>(<span style="color: #0000ff;">'.vim-r'</span><span style="color: #000000;">).</span><span style="color: #000000;">click</span>(<span style="color: #000080; font-weight: bold;">function</span><span style="color: #000000;">(){</span>
         <span style="color: #000080; font-weight: bold;">var</span> <span style="color: #000000;">$submitted_on</span><span style="color: #000000;">=</span><span style="color: #000000;">$</span>(<span style="color: #000080; font-weight: bold;">this</span><span style="color: #000000;">).</span><span style="color: #000000;">parent</span><span style="color: #000000;">().</span><span style="color: #000000;">parent</span><span style="color: #000000;">().</span><span style="color: #000000;">parent</span><span style="color: #000000;">().</span><span style="color: #000000;">children</span>(<span style="color: #0000ff;">'.submitted-on'</span>);
         <span style="color: #000080; font-weight: bold;">if</span> (<span style="color: #000000;">$submitted_on</span><span style="color: #000000;">.</span><span style="color: #000000;">children</span>(<span style="color: #0000ff;">'a'</span><span style="color: #000000;">).</span><span style="color: #000000;">length</span> <span style="color: #000000;">==</span> <span style="color: #0000ff;">2</span>) <span style="color: #000000;">{</span>
             <span style="color: #000080; font-weight: bold;">var</span> <span style="color: #000000;">parentID</span><span style="color: #000000;">=</span><span style="color: #000000;">$submitted_on</span><span style="color: #000000;">.</span><span style="color: #000000;">find</span>(<span style="color: #0000ff;">'a:last'</span><span style="color: #000000;">).</span><span style="color: #000000;">attr</span>(<span style="color: #0000ff;">'href'</span><span style="color: #000000;">).</span><span style="color: #000000;">split</span>(<span style="color: #0000ff;">'#'</span><span style="color: #000000;">)[</span><span style="color: #0000ff;">1</span><span style="color: #000000;">]</span><span style="color: #000000;">;</span>
             <span style="color: #000000;">$</span>(<span style="color: #0000ff;">'#replyrow'</span><span style="color: #000000;">).</span><span style="color: #000000;">find</span>(<span style="color: #0000ff;">'#comment_ID'</span><span style="color: #000000;">).</span><span style="color: #000000;">attr</span>(<span style="color: #0000ff;">'value'</span><span style="color: #000000;">,</span><span style="color: #000000;">parentID</span>);
         <span style="color: #000000;">}</span>
         <span style="color: #000080; font-weight: bold;">var</span> <span style="color: #000000;">atid</span> <span style="color: #000000;">=</span> <span style="color: #0000ff;">'"#'</span> <span style="color: #000000;">+</span> <span style="color: #000000;">$submitted_on</span><span style="color: #000000;">.</span><span style="color: #000000;">children</span>(<span style="color: #0000ff;">'a:first'</span><span style="color: #000000;">).</span><span style="color: #000000;">attr</span>(<span style="color: #0000ff;">'href'</span><span style="color: #000000;">).</span><span style="color: #000000;">split</span>(<span style="color: #0000ff;">'#'</span><span style="color: #000000;">)[</span><span style="color: #0000ff;">1</span><span style="color: #000000;">].</span><span style="color: #000000;">split</span>(<span style="color: #0000ff;">'-'</span><span style="color: #000000;">)[</span><span style="color: #0000ff;">1</span><span style="color: #000000;">]</span> <span style="color: #000000;">+</span> <span style="color: #0000ff;">'"'</span>;
         <span style="color: #000080; font-weight: bold;">var</span> <span style="color: #000000;">atname</span> <span style="color: #000000;">=</span> <span style="color: #000000;">$submitted_on</span><span style="color: #000000;">.</span><span style="color: #000000;">parent</span><span style="color: #000000;">().</span><span style="color: #000000;">prev</span>(<span style="color: #0000ff;">'td.author'</span><span style="color: #000000;">).</span><span style="color: #000000;">find</span>(<span style="color: #0000ff;">'strong'</span><span style="color: #000000;">).</span><span style="color: #000000;">text</span><span style="color: #000000;">().</span><span style="color: #000000;">replace</span>(<span style="color: #0000ff;">/^(\s|\xA0)+|(\s|\xA0)+$/g</span><span style="color: #000000;">,</span> <span style="color: #0000ff;">''</span>);
         <span style="color: #000000;">$</span>(<span style="color: #0000ff;">"#replycontent"</span><span style="color: #000000;">).</span><span style="color: #000000;">attr</span>(<span style="color: #0000ff;">'value'</span><span style="color: #000000;">,</span><span style="color: #0000ff;">'&lt;a href='</span> <span style="color: #000000;">+</span> <span style="color: #000000;">atid</span> <span style="color: #000000;">+</span> <span style="color: #0000ff;">'&gt;@'</span> <span style="color: #000000;">+</span> <span style="color: #000000;">atname</span> <span style="color: #000000;">+</span> <span style="color: #0000ff;">' &lt;/a&gt;\n'</span><span style="color: #000000;">).</span><span style="color: #000000;">focus</span>();
         <span style="color: #000000;">$</span>(<span style="color: #0000ff;">"#replycontent"</span><span style="color: #000000;">).</span><span style="color: #000000;">attr</span>(<span style="color: #0000ff;">'onkeydown'</span><span style="color: #000000;">,</span><span style="color: #0000ff;">'if(event.ctrlKey){if(event.keyCode==13){document.getElementById(\'replybtn\').click();return false}};'</span>);
         <span style="color: #000000;">$</span>(<span style="color: #0000ff;">'#replybtn'</span><span style="color: #000000;">).</span><span style="color: #000000;">click</span>(<span style="color: #000080; font-weight: bold;">function</span><span style="color: #000000;">(){</span>
             <span style="color: #000000;">$</span>(<span style="color: #0000ff;">"#replycontent"</span><span style="color: #000000;">).</span><span style="color: #000000;">attr</span>(<span style="color: #0000ff;">'onkeydown'</span><span style="color: #000000;">,</span><span style="color: #0000ff;">''</span>);
         <span style="color: #000000;">})</span>
     <span style="color: #000000;">})</span>
 <span style="color: #000000;">});</span></pre>
<p>2. 然后把下面这段加入到主题的 functions.php 里面去：</p>
<pre style="color: #008080;"><span style="color: #000080; font-weight: bold;">function</span> <span style="color: #000000;">admin_reply_admin_enqueue_scripts</span>( <span style="color: #000000;">$hook_suffix</span> ) <span style="color: #000000;">{</span>
    <span style="color: #000000;">wp_enqueue_script</span>( <span style="color: #0000ff;">'admin-reply-js'</span><span style="color: #000000;">,</span> <span style="color: #000000;">get_template_directory_uri</span>() <span style="color: #000000;">.</span> <span style="color: #0000ff;">'/admin_reply.js'</span><span style="color: #000000;">,</span> <span style="color: #000080; font-weight: bold;">false</span><span style="color: #000000;">,</span> <span style="color: #0000ff;">'by-zwwooooo'</span> );
<span style="color: #000000;">}</span>
<span style="color: #000000;">add_action</span>( <span style="color: #0000ff;">'admin_print_styles'</span><span style="color: #000000;">,</span> <span style="color: #0000ff;">'admin_reply_admin_enqueue_scripts'</span> );</pre>
<p>然后就没有然后了……</p>
<div></div>
<p class="announce"><span><strong>声明:</strong></span> 除非注明，<a href="http://zww.me/">ZWWoOoOo</a>文章均为原创，转载请以链接形式标明本文地址<br />本文地址: <a href="http://zww.me/archives/25538">http://zww.me/archives/25538</a></p>]]></content:encoded>
			<wfw:commentRss>http://zww.me/archives/25538/feed</wfw:commentRss>
		<slash:comments>177</slash:comments>
		</item>
		<item>
		<title>整理: WordPress 评论回复邮件通知代码</title>
		<link>http://zww.me/archives/25536</link>
		<comments>http://zww.me/archives/25536#comments</comments>
		<pubDate>Mon, 24 Oct 2011 08:39:10 +0000</pubDate>
		<dc:creator>zwwooooo</dc:creator>
				<category><![CDATA[WP Trick]]></category>
		<category><![CDATA[Trick]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WP函数]]></category>

		<guid isPermaLink="false">http://zww.me/?p=25536</guid>
		<description><![CDATA[这是自用的评论回复邮件通知代码，源码来自 Willin、Qiqiboy，有兴趣者可以去这两位作者博客看看。 这版本的评论回复通知是支持嵌套和@用户方式的。 用法很简单，把下面的代码扔到主题的 functions.php 里面即可（原则上要打开 WordPress 原生嵌套，具体木有去研究。） * 代码放到 &#60;?php ?&#62; 内 /* 邮件通知 by Qiqiboy */ function comment_mail_notify($comment_id) {     $comment = get_comment($comment_id);//根据id获取这条评论相关数据     $content=$comment-&#62;comment_content;     //对评论内容进行匹配     $match_count=preg_match_all('/&#60;a href="#comment-([0-9]+)?" rel="nofollow"&#62;/si',$content,$matchs);     if($match_count&#62;0){//如果匹配到了         foreach($matchs[1] as $parent_id){//对每个子匹配都进行邮件发送操作             SimPaled_send_email($parent_id,$comment);         }     }elseif($comment-&#62;comment_parent!='0'){//以防万一，有人故意删了@回复，还可以通过查找父级评论id来确定邮件发送对象         $parent_id=$comment-&#62;comment_parent;         SimPaled_send_email($parent_id,$comment);     }else return; } add_action('comment_post', 'comment_mail_notify'); [...]]]></description>
			<content:encoded><![CDATA[<p>这是自用的评论回复邮件通知代码，源码来自 <a title="Willin Kan' s Blog" href="http://kan.willin.org/">Willin</a>、<a title="QiQiBoy" href="http://www.qiqiboy.com/">Qiqiboy</a>，有兴趣者可以去这两位作者博客看看。</p>
<p>这版本的评论回复通知是支持嵌套和@用户方式的。</p>
<p>用法很简单，把下面的代码扔到主题的 functions.php 里面即可（原则上要打开 WordPress 原生嵌套，具体木有去研究。）</p>
<p>* 代码放到 <span style="color: #ff0000;">&lt;?php ?&gt;</span> 内</p>
<pre style="color: #008080;"> <span style="color: #008800; font-style: italic;">/* 邮件通知 by Qiqiboy */</span>
 <span style="color: #000080; font-weight: bold;">function</span> <span style="color: #000000;">comment_mail_notify</span>(<span style="color: #000000;">$comment_id</span>) <span style="color: #000000;">{</span>
     <span style="color: #000000;">$comment</span> <span style="color: #000000;">=</span> <span style="color: #000000;">get_comment</span>(<span style="color: #000000;">$comment_id</span>);<span style="color: #008800; font-style: italic;">//根据id获取这条评论相关数据</span>
     <span style="color: #000000;">$content</span><span style="color: #000000;">=</span><span style="color: #000000;">$comment</span><span style="color: #000000;">-&gt;</span><span style="color: #ff0000;">comment_content</span>;
     <span style="color: #008800; font-style: italic;">//对评论内容进行匹配</span>
     <span style="color: #000000;">$match_count</span><span style="color: #000000;">=</span><span style="color: #000000;">preg_match_all</span>(<span style="color: #0000ff;">'/&lt;a href="#comment-([0-9]+)?" rel="nofollow"&gt;/si'</span><span style="color: #000000;">,</span><span style="color: #000000;">$content</span><span style="color: #000000;">,</span><span style="color: #000000;">$matchs</span>);
     <span style="color: #000080; font-weight: bold;">if</span>(<span style="color: #000000;">$match_count</span><span style="color: #000000;">&gt;</span><span style="color: #0000ff;">0</span><span style="color: #000000;">){</span><span style="color: #008800; font-style: italic;">//如果匹配到了</span>
         <span style="color: #000080; font-weight: bold;">foreach</span>(<span style="color: #000000;">$matchs</span><span style="color: #000000;">[</span><span style="color: #0000ff;">1</span><span style="color: #000000;">]</span> <span style="color: #000080; font-weight: bold;">as</span> <span style="color: #000000;">$parent_id</span><span style="color: #000000;">){</span><span style="color: #008800; font-style: italic;">//对每个子匹配都进行邮件发送操作</span>
             <span style="color: #000000;">SimPaled_send_email</span>(<span style="color: #000000;">$parent_id</span><span style="color: #000000;">,</span><span style="color: #000000;">$comment</span>);
         <span style="color: #000000;">}</span>
     <span style="color: #000000;">}</span><span style="color: #000080; font-weight: bold;">elseif</span>(<span style="color: #000000;">$comment</span><span style="color: #000000;">-&gt;</span><span style="color: #ff0000;">comment_parent</span><span style="color: #000000;">!=</span><span style="color: #0000ff;">'0'</span><span style="color: #000000;">){</span><span style="color: #008800; font-style: italic;">//以防万一，有人故意删了@回复，还可以通过查找父级评论id来确定邮件发送对象</span>
         <span style="color: #000000;">$parent_id</span><span style="color: #000000;">=</span><span style="color: #000000;">$comment</span><span style="color: #000000;">-&gt;</span><span style="color: #ff0000;">comment_parent</span>;
         <span style="color: #000000;">SimPaled_send_email</span>(<span style="color: #000000;">$parent_id</span><span style="color: #000000;">,</span><span style="color: #000000;">$comment</span>);
     <span style="color: #000000;">}</span><span style="color: #000080; font-weight: bold;">else</span> <span style="color: #000080; font-weight: bold;">return</span>;
 <span style="color: #000000;">}</span>
 <span style="color: #000000;">add_action</span>(<span style="color: #0000ff;">'comment_post'</span><span style="color: #000000;">,</span> <span style="color: #0000ff;">'comment_mail_notify'</span>);
 <span style="color: #000080; font-weight: bold;">function</span> <span style="color: #000000;">SimPaled_send_email</span>(<span style="color: #000000;">$parent_id</span><span style="color: #000000;">,</span><span style="color: #000000;">$comment</span><span style="color: #000000;">){</span><span style="color: #008800; font-style: italic;">//发送邮件的函数 by Qiqiboy.com</span>
     <span style="color: #000000;">$admin_email</span> <span style="color: #000000;">=</span> <span style="color: #000000;">get_bloginfo</span> (<span style="color: #0000ff;">'admin_email'</span>);<span style="color: #008800; font-style: italic;">//管理员邮箱</span>
     <span style="color: #000000;">$parent_comment</span><span style="color: #000000;">=</span><span style="color: #000000;">get_comment</span>(<span style="color: #000000;">$parent_id</span>);<span style="color: #008800; font-style: italic;">//获取被回复人（或叫父级评论）相关信息</span>
     <span style="color: #000000;">$author_email</span><span style="color: #000000;">=</span><span style="color: #000000;">$comment</span><span style="color: #000000;">-&gt;</span><span style="color: #ff0000;">comment_author_email</span>;<span style="color: #008800; font-style: italic;">//评论人邮箱</span>
     <span style="color: #000000;">$to</span> <span style="color: #000000;">=</span> <span style="color: #000000;">trim</span>(<span style="color: #000000;">$parent_comment</span><span style="color: #000000;">-&gt;</span><span style="color: #ff0000;">comment_author_email</span>);<span style="color: #008800; font-style: italic;">//被回复人邮箱</span>
     <span style="color: #000000;">$spam_confirmed</span> <span style="color: #000000;">=</span> <span style="color: #000000;">$comment</span><span style="color: #000000;">-&gt;</span><span style="color: #ff0000;">comment_approved</span>;
     <span style="color: #000080; font-weight: bold;">if</span> (<span style="color: #000000;">$spam_confirmed</span> <span style="color: #000000;">!=</span> <span style="color: #0000ff;">'spam'</span> <span style="color: #000000;">&amp;&amp;</span> <span style="color: #000000;">$to</span> <span style="color: #000000;">!=</span> <span style="color: #000000;">$admin_email</span> <span style="color: #000000;">&amp;&amp;</span> <span style="color: #000000;">$to</span> <span style="color: #000000;">!=</span> <span style="color: #000000;">$author_email</span>) <span style="color: #000000;">{</span>
         <span style="color: #000000;">$wp_email</span> <span style="color: #000000;">=</span> <span style="color: #0000ff;">'no-reply@'</span> <span style="color: #000000;">.</span> <span style="color: #000000;">preg_replace</span>(<span style="color: #0000ff;">'#^www\.#'</span><span style="color: #000000;">,</span> <span style="color: #0000ff;">''</span><span style="color: #000000;">,</span> <span style="color: #000000;">strtolower</span>(<span style="color: #000000;">$_SERVER</span><span style="color: #000000;">[</span><span style="color: #0000ff;">'SERVER_NAME'</span><span style="color: #000000;">]));</span> <span style="color: #008800; font-style: italic;">// e-mail 發出點, no-reply 可改為可用的 e-mail.</span>
         <span style="color: #000000;">$subject</span> <span style="color: #000000;">=</span> <span style="color: #0000ff;">'您在 ['</span> <span style="color: #000000;">.</span> <span style="color: #000000;">get_option</span>(<span style="color: #0000ff;">"blogname"</span>) <span style="color: #000000;">.</span> <span style="color: #0000ff;">'] 的留言有了回應'</span>;
         <span style="color: #000000;">$message</span> <span style="color: #000000;">=</span> <span style="color: #0000ff;">'&lt;div style="background-color:#eef2fa;border:1px solid #d8e3e8;color:#111;padding:0 15px;-moz-border-radius:5px;-webkit-border-radius:5px;-khtml-border-radius:5px;"&gt;</span>
 <span style="color: #0000ff;">            &lt;p&gt;'</span> <span style="color: #000000;">.</span> <span style="color: #000000;">trim</span>(<span style="color: #000000;">get_comment</span>(<span style="color: #000000;">$parent_id</span>)<span style="color: #000000;">-&gt;</span><span style="color: #ff0000;">comment_author</span>) <span style="color: #000000;">.</span> <span style="color: #0000ff;">', 您好!&lt;/p&gt;</span>
 <span style="color: #0000ff;">            &lt;p&gt;您曾在《'</span> <span style="color: #000000;">.</span> <span style="color: #000000;">get_the_title</span>(<span style="color: #000000;">$comment</span><span style="color: #000000;">-&gt;</span><span style="color: #ff0000;">comment_post_ID</span>) <span style="color: #000000;">.</span> <span style="color: #0000ff;">'》的留言:&lt;br /&gt;'</span>
             <span style="color: #000000;">.</span> <span style="color: #000000;">trim</span>(<span style="color: #000000;">get_comment</span>(<span style="color: #000000;">$parent_id</span>)<span style="color: #000000;">-&gt;</span><span style="color: #ff0000;">comment_content</span>) <span style="color: #000000;">.</span> <span style="color: #0000ff;">'&lt;/p&gt;</span>
 <span style="color: #0000ff;">            &lt;p&gt;'</span> <span style="color: #000000;">.</span> <span style="color: #000000;">trim</span>(<span style="color: #000000;">$comment</span><span style="color: #000000;">-&gt;</span><span style="color: #ff0000;">comment_author</span>) <span style="color: #000000;">.</span> <span style="color: #0000ff;">' 给你的回复:&lt;br /&gt;'</span>
             <span style="color: #000000;">.</span> <span style="color: #000000;">trim</span>(<span style="color: #000000;">$comment</span><span style="color: #000000;">-&gt;</span><span style="color: #ff0000;">comment_content</span>) <span style="color: #000000;">.</span> <span style="color: #0000ff;">'&lt;br /&gt;&lt;/p&gt;</span>
 <span style="color: #0000ff;">            &lt;p&gt;您可以点击 &lt;a href="'</span> <span style="color: #000000;">.</span> <span style="color: #000000;">htmlspecialchars</span>(<span style="color: #000000;">get_comment_link</span>(<span style="color: #000000;">$parent_id</span><span style="color: #000000;">,</span><span style="color: #000080; font-weight: bold;">array</span>(<span style="color: #0000ff;">"type"</span> <span style="color: #000000;">=&gt;</span> <span style="color: #0000ff;">"all"</span>))) <span style="color: #000000;">.</span> <span style="color: #0000ff;">'"&gt;查看回复的完整內容&lt;/a&gt;&lt;/p&gt;</span>
 <span style="color: #0000ff;">            &lt;p&gt;欢迎再度光临 &lt;a href="'</span> <span style="color: #000000;">.</span> <span style="color: #000000;">get_option</span>(<span style="color: #0000ff;">'home'</span>) <span style="color: #000000;">.</span> <span style="color: #0000ff;">'"&gt;'</span> <span style="color: #000000;">.</span> <span style="color: #000000;">get_option</span>(<span style="color: #0000ff;">'blogname'</span>) <span style="color: #000000;">.</span> <span style="color: #0000ff;">'&lt;/a&gt;&lt;/p&gt;</span>
 <span style="color: #0000ff;">            &lt;p&gt;(此邮件有系统自动发出, 请勿回复.)&lt;/p&gt;&lt;/div&gt;'</span>;
         <span style="color: #000000;">$from</span> <span style="color: #000000;">=</span> <span style="color: #0000ff;">"From: </span><span style="color: #0000ff;">\"</span><span style="color: #0000ff;">"</span> <span style="color: #000000;">.</span> <span style="color: #000000;">get_option</span>(<span style="color: #0000ff;">'blogname'</span>) <span style="color: #000000;">.</span> <span style="color: #0000ff;">"</span><span style="color: #0000ff;">\"</span><span style="color: #0000ff;"> &lt;</span><span style="color: #0000ff;">$wp_email</span><span style="color: #0000ff;">&gt;"</span>;
         <span style="color: #000000;">$headers</span> <span style="color: #000000;">=</span> <span style="color: #0000ff;">"</span><span style="color: #0000ff;">$from</span><span style="color: #0000ff;">\n</span><span style="color: #0000ff;">Content-Type: text/html; charset="</span> <span style="color: #000000;">.</span> <span style="color: #000000;">get_option</span>(<span style="color: #0000ff;">'blog_charset'</span>) <span style="color: #000000;">.</span> <span style="color: #0000ff;">"</span><span style="color: #0000ff;">\n</span><span style="color: #0000ff;">"</span>;
         <span style="color: #000000;">wp_mail</span>( <span style="color: #000000;">$to</span><span style="color: #000000;">,</span> <span style="color: #000000;">$subject</span><span style="color: #000000;">,</span> <span style="color: #000000;">$message</span><span style="color: #000000;">,</span> <span style="color: #000000;">$headers</span> );
     <span style="color: #000000;">}</span>
 <span style="color: #000000;">}</span></pre>
<p>这篇是过渡文章，为下篇文章的代码做准备。</p>
<div></div>
<p class="announce"><span><strong>声明:</strong></span> 除非注明，<a href="http://zww.me/">ZWWoOoOo</a>文章均为原创，转载请以链接形式标明本文地址<br />本文地址: <a href="http://zww.me/archives/25536">http://zww.me/archives/25536</a></p>]]></content:encoded>
			<wfw:commentRss>http://zww.me/archives/25536/feed</wfw:commentRss>
		<slash:comments>78</slash:comments>
		</item>
		<item>
		<title>WordPress: 带 favicon.ico 显示的友情链接自定义页面</title>
		<link>http://zww.me/archives/25533</link>
		<comments>http://zww.me/archives/25533#comments</comments>
		<pubDate>Sat, 15 Oct 2011 02:18:41 +0000</pubDate>
		<dc:creator>zwwooooo</dc:creator>
				<category><![CDATA[WP Trick]]></category>
		<category><![CDATA[Trick]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://zww.me/?p=25533</guid>
		<description><![CDATA[总是有朋友问起，虽然网上搜一下就能找到，不过问多了就觉得有点回答麻烦，干脆写个文章以后可以直接扔文章地址。 我只说步骤，不解析原理，需要了解的朋友可以去我这代码源出处 qiqiboy.com 搜索一下。 &#62; 示例页面：点击 1. 上传一个 16×16 大小的图片作为木有 favicon.ico 的网站默认 ico，把图片上传到所用主题的 images 目录下，这里示例中默认 ico 图片是 links_default.gif 2. 复制一份你主题的 page.php，改名为 page-links.php 3. 在 page-links.php 找到文章内容输出函数 &#60;?php the_content(); ?&#62;，在其下面加入下面的代码，注意看代码注释： &#60;div class="page-links"&#62; &#60;h3&#62;页内链接&#60;/h3&#62; &#60;ul&#62; &#60;?php $default_ico = get_template_directory_uri().'/images/links_default.gif'; //默认 ico 图片位置 $bookmarks = get_bookmarks('title_li=&#38;orderby=rand'); //全部链接随机输出 //如果你要输出某个链接分类的链接，更改一下get_bookmarks参数即可 //如要输出链接分类ID为5的链接 title_li=&#38;categorize=0&#38;category=5&#38;orderby=rand if ( !empty($bookmarks) ) { foreach ($bookmarks as [...]]]></description>
			<content:encoded><![CDATA[<p>总是有朋友问起，虽然网上搜一下就能找到，不过问多了就觉得有点回答麻烦，干脆写个文章以后可以直接扔文章地址。</p>
<p>我只说步骤，不解析原理，需要了解的朋友可以去我这代码源出处 <a title="Qiqiboy" href="http://qiqiboy.com">qiqiboy.com</a> 搜索一下。</p>
<p>&gt; 示例页面：<a title="Links | ZWWoOoOo" href="http://zww.me/links">点击</a></p>
<p>1. 上传一个 16×16 大小的图片作为木有 favicon.ico 的网站默认 ico，把图片上传到所用主题的 images 目录下，这里示例中默认 ico 图片是 links_default.gif</p>
<p>2. 复制一份你主题的 page.php，改名为 page-links.php</p>
<p>3. 在 page-links.php 找到文章内容输出函数 &lt;?php the_content(); ?&gt;，在其下面加入下面的代码，注意看代码注释：</p>
<pre><span style="color: #000080; font-weight: bold;">&lt;div</span> <span style="color: #ff0000;">class=</span><span style="color: #0000ff;">"page-links"</span><span style="color: #000080; font-weight: bold;">&gt;</span>
    <span style="color: #000080; font-weight: bold;">&lt;h3&gt;</span>页内链接<span style="color: #000080; font-weight: bold;">&lt;/h3&gt;</span>
    <span style="color: #000080; font-weight: bold;">&lt;ul&gt;</span>
        <span style="color: #008080;">&lt;?php</span>
        <span style="color: #000000;">$default_ico</span> <span style="color: #000000;">=</span> <span style="color: #000000;">get_template_directory_uri</span>()<span style="color: #000000;">.</span><span style="color: #0000ff;">'/images/links_default.gif'</span>; <em><span style="color: #008000;">//默认 ico 图片位置</span></em>
        <span style="color: #000000;">$bookmarks</span> <span style="color: #000000;">=</span> <span style="color: #000000;">get_bookmarks</span>(<span style="color: #0000ff;">'title_li=&amp;orderby=rand'</span>); <span style="color: #008800; font-style: italic;">//全部链接随机输出</span>
        <span style="color: #008800; font-style: italic;">//如果你要输出某个链接分类的链接，更改一下get_bookmarks参数即可</span>
        <span style="color: #008800; font-style: italic;">//如要输出链接分类ID为5的链接 title_li=&amp;categorize=0&amp;category=5&amp;orderby=rand</span>
        <span style="color: #000080; font-weight: bold;">if</span> ( <span style="color: #000000;">!</span><span style="color: #000080; font-weight: bold;">empty</span>(<span style="color: #000000;">$bookmarks</span>) ) <span style="color: #000000;">{</span>
            <span style="color: #000080; font-weight: bold;">foreach</span> (<span style="color: #000000;">$bookmarks</span> <span style="color: #000080; font-weight: bold;">as</span> <span style="color: #000000;">$bookmark</span>) <span style="color: #000000;">{</span>
            <span style="color: #000080; font-weight: bold;">echo</span> <span style="color: #0000ff;">'&lt;li&gt;&lt;img src="'</span><span style="color: #000000;">,</span> <span style="color: #000000;">$bookmark</span><span style="color: #000000;">-&gt;</span><span style="color: #ff0000;">link_url</span> <span style="color: #000000;">,</span> <span style="color: #0000ff;">'/favicon.ico" onerror="javascript:this.src=\''</span> <span style="color: #000000;">,</span> <span style="color: #000000;">$default_ico</span> <span style="color: #000000;">,</span> <span style="color: #0000ff;">'\'" /&gt;&lt;a href="'</span> <span style="color: #000000;">,</span> <span style="color: #000000;">$bookmark</span><span style="color: #000000;">-&gt;</span><span style="color: #ff0000;">link_url</span> <span style="color: #000000;">,</span> <span style="color: #0000ff;">'" title="'</span> <span style="color: #000000;">,</span> <span style="color: #000000;">$bookmark</span><span style="color: #000000;">-&gt;</span><span style="color: #ff0000;">link_description</span> <span style="color: #000000;">,</span> <span style="color: #0000ff;">'" target="_blank" &gt;'</span> <span style="color: #000000;">,</span> <span style="color: #000000;">$bookmark</span><span style="color: #000000;">-&gt;</span><span style="color: #ff0000;">link_name</span> <span style="color: #000000;">,</span> <span style="color: #0000ff;">'&lt;/a&gt;&lt;/li&gt;'</span>;
            <span style="color: #000000;">}</span>
        <span style="color: #000000;">}</span>
        <span style="color: #008080;">?&gt;</span>
    <span style="color: #000080; font-weight: bold;">&lt;/ul&gt;</span>
<span style="color: #000080; font-weight: bold;">&lt;/div&gt;</span></pre>
<p>4. 为了好看点，你可以给 page-links 这个class定义一下样式，下面是我的主题所用样式，可以参考一下：</p>
<pre><span style="color: #000000;">.page-links</span><span style="color: #000000;">{</span><span style="color: #000080; font-weight: bold;">overflow</span><span style="color: #000000;">:</span><span style="color: #000080; font-weight: bold;">hidden</span>;<span style="color: #000080; font-weight: bold;">margin</span><span style="color: #000000;">:</span><span style="color: #0000ff;">0</span> <span style="color: #0000ff;">0</span> <span style="color: #0000ff;">24px</span>;<span style="color: #000080; font-weight: bold;">padding</span><span style="color: #000000;">:</span><span style="color: #0000ff;">0</span><span style="color: #000000;">;}</span>
<span style="color: #000000;">.page-links</span> <span style="color: #000080; font-weight: bold;">h3</span><span style="color: #000000;">{</span><span style="color: #000080; font-weight: bold;">border-bottom</span><span style="color: #000000;">:</span><span style="color: #0000ff;">1px</span> <span style="color: #000080; font-weight: bold;">solid</span> <span style="color: #0000ff;">#bfbebe</span>;<span style="color: #000080; font-weight: bold;">text-align</span><span style="color: #000000;">:</span><span style="color: #000080; font-weight: bold;">center</span>;<span style="color: #000080; font-weight: bold;">margin</span><span style="color: #000000;">:</span><span style="color: #0000ff;">0</span><span style="color: #000000;">;}</span>
<span style="color: #000000;">.page-links</span> <span style="color: #000080; font-weight: bold;">ul</span><span style="color: #000000;">{</span><span style="color: #000080; font-weight: bold;">margin</span><span style="color: #000000;">:</span><span style="color: #0000ff;">0</span>;<span style="color: #000080; font-weight: bold;">padding</span><span style="color: #000000;">:</span><span style="color: #0000ff;">5px</span> <span style="color: #0000ff;">0</span> <span style="color: #0000ff;">0</span> <span style="color: #0000ff;">0</span><span style="color: #000000;">;}</span>
<span style="color: #000000;">.page-links</span> <span style="color: #000080; font-weight: bold;">ul</span> <span style="color: #000080; font-weight: bold;">li</span><span style="color: #000000;">{</span><span style="color: #000080; font-weight: bold;">float</span><span style="color: #000000;">:</span><span style="color: #000080; font-weight: bold;">left</span>;<span style="color: #000080; font-weight: bold;">width</span><span style="color: #000000;">:</span><span style="color: #0000ff;">150px</span>;<span style="color: #000080; font-weight: bold;">line-height</span><span style="color: #000000;">:</span><span style="color: #0000ff;">16px</span>;<span style="color: #000080; font-weight: bold;">height</span><span style="color: #000000;">:</span><span style="color: #0000ff;">16px</span>;<span style="color: #000080; font-weight: bold;">margin</span><span style="color: #000000;">:</span><span style="color: #0000ff;">5px</span> <span style="color: #0000ff;">5px</span> <span style="color: #0000ff;">0</span>;<span style="color: #000080; font-weight: bold;">padding</span><span style="color: #000000;">:</span><span style="color: #0000ff;">0</span>;<span style="color: #000080; font-weight: bold;">list-style-type</span><span style="color: #000000;">:</span><span style="color: #000080; font-weight: bold;">none</span><span style="color: #000000;">;}</span>
<span style="color: #000000;">.page-links</span> <span style="color: #000080; font-weight: bold;">ul</span> <span style="color: #000080; font-weight: bold;">li</span><span style="color: #000000;">:hover</span><span style="color: #000000;">{</span><span style="color: #000080; font-weight: bold;">background</span><span style="color: #000000;">:</span><span style="color: #0000ff;">#f2f2f2</span><span style="color: #000000;">;}</span>
<span style="color: #000000;">.page-links</span> <span style="color: #000080; font-weight: bold;">ul</span> <span style="color: #000080; font-weight: bold;">li</span> <span style="color: #000080; font-weight: bold;">img</span><span style="color: #000000;">{</span><span style="color: #000080; font-weight: bold;">width</span><span style="color: #000000;">:</span><span style="color: #0000ff;">16px</span>;<span style="color: #000080; font-weight: bold;">height</span><span style="color: #000000;">:</span><span style="color: #0000ff;">16px</span>;<span style="color: #000080; font-weight: bold;">margin</span><span style="color: #000000;">:</span><span style="color: #0000ff;">0</span> <span style="color: #0000ff;">5px</span> <span style="color: #0000ff;">-2px</span> <span style="color: #0000ff;">0</span>;<span style="color: #000080; font-weight: bold;">padding</span><span style="color: #000000;">:</span><span style="color: #0000ff;">0</span>;<span style="color: #000080; font-weight: bold;">border</span><span style="color: #000000;">:</span><span style="color: #000080; font-weight: bold;">none</span><span style="color: #000000;">;}</span></pre>
<p>5. 建立一个页面，别名（slug）为 links 即可。</p>
<p>完！</p>
<p class="announce"><span><strong>声明:</strong></span> 除非注明，<a href="http://zww.me/">ZWWoOoOo</a>文章均为原创，转载请以链接形式标明本文地址<br />本文地址: <a href="http://zww.me/archives/25533">http://zww.me/archives/25533</a></p>]]></content:encoded>
			<wfw:commentRss>http://zww.me/archives/25533/feed</wfw:commentRss>
		<slash:comments>75</slash:comments>
		</item>
		<item>
		<title>WordPress付费主题: zSnos2.5</title>
		<link>http://zww.me/archives/25509</link>
		<comments>http://zww.me/archives/25509#comments</comments>
		<pubDate>Tue, 30 Aug 2011 02:18:37 +0000</pubDate>
		<dc:creator>zwwooooo</dc:creator>
				<category><![CDATA[WP Theme]]></category>
		<category><![CDATA[zSnos]]></category>
		<category><![CDATA[zTheme]]></category>
		<category><![CDATA[付费主题]]></category>

		<guid isPermaLink="false">http://zww.me/?p=25509</guid>
		<description><![CDATA[这是付费主题 zSnos2 的升级版本，所以购买过 zSnos2 的朋友可以直接联系我获取 zSnos2.5。 相比上个版本来说，2.5版本更少线条，头部改为单一的导航菜单，支持WP自定义菜单。还有就是把以前的“唠叨栏”改在头部，加上“老汉推车”效果，还有很多细节修改。 Theme name: zSnos2.5 Version: 1.0.0 Author: zwwooooo Demo &#124; 演示: http://demo.zww.me/?wptheme=zsnos2.5 价 格：99 RMB / 份 购买过 zSnos2 的朋友可以免费获取：请先发邮件给我，说明购买 zSnos2 时所用联系方式和博客地址，我核对后发送。 购买地址：淘宝店 （或者直接给我发邮件 zwwblog[at]gmail.com）- 注：这次只打算售出几份。 说明： 自定义logo 支持 Google 自定义搜索，需要在主题设置里设置 WP3.0自定义菜单功能 可自定义订阅地址 “老汉推车”消息滚动栏：支持输出 n 条（可以自定义）twitter推、公告信息 主题自带文章摘录功能，可以关闭使用 WP 默认摘录功能 2种缩略图支持：1. WP自带的“特色图片”方式；2. “特色图片”、自动获取文章第一张图片方式。可以自定义缩略图显示宽度 Ajax 存档页面模板 page-archives.php 内页链接页面模板 page-links.php（可以自定义链接分类id） zShowBox图片放大展示功能，可以关闭 内置广告位：侧边栏125×125广告位4个、文章开头左浮广告位、评论框右侧广告位 侧边栏 [...]]]></description>
			<content:encoded><![CDATA[<p>这是付费主题 <a title="WordPress付费主题: zSnos2" href="http://zww.me/archives/25393">zSnos2</a> 的升级版本，所以购买过 zSnos2 的朋友可以直接联系我获取 zSnos2.5。</p>
<p>相比上个版本来说，2.5版本更少线条，头部改为单一的导航菜单，支持WP自定义菜单。还有就是把以前的“唠叨栏”改在头部，加上“<a title="jQuery: “老汉推车”走马灯效果" href="http://zww.me/archives/25450">老汉推车</a>”效果，还有很多细节修改。</p>
<p><strong>Theme name</strong>: zSnos2.5</p>
<p><strong>Version</strong>: 1.0.0</p>
<p><strong>Author</strong>: zwwooooo</p>
<p><strong>Demo | 演示</strong>: <a title="zSnos2.5" href="http://demo.zww.me/?wptheme=zsnos2.5">http://demo.zww.me/?wptheme=zsnos2.5</a></p>
<p><strong>价 格</strong>：99 RMB / 份</p>
<p><strong>购买过 zSnos2 的朋友可以免费获取</strong>：请先发邮件给我，说明购买 zSnos2 时所用联系方式和博客地址，我核对后发送。</p>
<p><strong>购买地址</strong>：<a title="淘宝: zSnos2.5" href="http://item.taobao.com/item.htm?id=12719463580">淘宝店</a> （或者直接给我发邮件 zwwblog[at]gmail.com）- <span style="color: #ff0000;">注：</span>这次只打算售出几份。</p>
<p><strong>说明</strong>：</p>
<ul>
<li>自定义logo</li>
<li>支持 Google 自定义搜索，需要在主题设置里设置</li>
<li>WP3.0自定义菜单功能</li>
<li>可自定义订阅地址</li>
<li>“老汉推车”消息滚动栏：支持输出 n 条（可以自定义）twitter推、公告信息</li>
<li>主题自带文章摘录功能，可以关闭使用 WP 默认摘录功能</li>
<li>2种缩略图支持：1. WP自带的“特色图片”方式；2. “特色图片”、自动获取文章第一张图片方式。可以自定义缩略图显示宽度</li>
<li>Ajax 存档页面模板 page-archives.php</li>
<li>内页链接页面模板 page-links.php（可以自定义链接分类id）</li>
<li>zShowBox图片放大展示功能，可以关闭</li>
<li>内置广告位：侧边栏125×125广告位4个、文章开头左浮广告位、评论框右侧广告位</li>
<li>侧边栏 Tab 内容切换：最新评论、最新/随机文章、最热文章、标签云、存档</li>
<li>侧边栏读者墙</li>
<li>文章页相关文章</li>
<li>文章末网站声明（可以自定义）</li>
<li>额外整合：<a title="Willin Kan" href="http://kan.willin.org">willin</a> 的 Ajax 评论提交、评论表情支持、评论html标签、分页导航</li>
</ul>
<p><strong>兼容性</strong>: 同样，不鸟 IE6～IE8，但不会一塌糊涂，就是木有圆角和png32的支持……你懂的。</p>
<p>另外支持插件：WP-PageNavi, WP-PostViews, wp-utf8-excerpt, WP-RecentComments, WP-UserAgent</p>
<p>PS1: 如果你使用 WP-UserAgent 插件，请在插件设置那里 UserAgent Output Location 设置为“Custom（Advanced）”</p>
<p>PS2: 这次是直接从 zSnos-Private 整理过来的，所以或许会有小 Bug，购买的朋友如果发现什么问题可以直接联系我修正。</p>
<p><strong>下面是一些效果图</strong></p>
<p>- 首页 -</p>
<p><a href="http://im.zww.im/2011/08/110830-zsnos2.5-1.png"><img src="http://im.zww.im/2011/08/110830-zsnos2.5-1.png" alt="" width="1020" height="775" /></a></p>
<p>- 置顶文章 hover 效果 -</p>
<p><a href="http://im.zww.im/2011/08/110830-zsnos2.5-2.png"><img src="http://im.zww.im/2011/08/110830-zsnos2.5-2.png" alt="" width="676" height="290" /></a></p>
<p>- 文章页 -</p>
<p><a href="http://im.zww.im/2011/08/110830-zsnos2.5-3.png"><img src="http://im.zww.im/2011/08/110830-zsnos2.5-3.png" alt="" width="693" height="601" /></a></p>
<p>- 评论样式: 原创旗杆风格 -</p>
<p><a href="http://im.zww.im/2011/08/110830-zsnos2.5-4.png"><img src="http://im.zww.im/2011/08/110830-zsnos2.5-4.png" alt="" width="668" height="639" /></a></p>
<p>- 评论框 -</p>
<p><a href="http://im.zww.im/2011/08/110830-zsnos2.5-5.png"><img src="http://im.zww.im/2011/08/110830-zsnos2.5-5.png" alt="" width="487" height="280" /></a></p>
<p>- 侧边栏 -</p>
<p><a href="http://im.zww.im/2011/08/110830-zsnos2.5-6.png"><img src="http://im.zww.im/2011/08/110830-zsnos2.5-6.png" alt="" width="292" height="691" /></a></p>
<p>- 主题设置 -</p>
<p><a href="http://im.zww.im/2011/08/110830-zsnos2.5-7.png"><img src="http://im.zww.im/2011/08/110830-zsnos2.5-7.png" alt="" width="500" height="989" /></a></p>
<p class="announce"><span><strong>声明:</strong></span> 除非注明，<a href="http://zww.me/">ZWWoOoOo</a>文章均为原创，转载请以链接形式标明本文地址<br />本文地址: <a href="http://zww.me/archives/25509">http://zww.me/archives/25509</a></p>]]></content:encoded>
			<wfw:commentRss>http://zww.me/archives/25509/feed</wfw:commentRss>
		<slash:comments>112</slash:comments>
		</item>
		<item>
		<title>WordPress Theme: Chocolate-pro</title>
		<link>http://zww.me/archives/25504</link>
		<comments>http://zww.me/archives/25504#comments</comments>
		<pubDate>Wed, 17 Aug 2011 07:02:04 +0000</pubDate>
		<dc:creator>zwwooooo</dc:creator>
				<category><![CDATA[WP Theme]]></category>
		<category><![CDATA[Chocolate-pro]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[zTheme]]></category>

		<guid isPermaLink="false">http://zww.me/?p=25504</guid>
		<description><![CDATA[这是 Chocolate-lite 主题的 pro 版，其实这个主题我在5月份就基本完成，后来因为乱七八糟的事搁置了。前天突然想起+心血来潮完善了一下，晚上联系此主题设计者 schiy 商定今天两博客统一发布。 特点：（相比 lite 版） 主要是多配色风格选择，目前内置的配色有：巧克力（lite）、黑色、绿色、粉色，默认是巧克力。 侧边栏顶部 4 个 125×125 广告位 文章开头左浮广告位 ajax评论提交（代码 via willin），默认木有开启，需要在主题设置开启 木有了 Chocolate-pro 主题信息 Design &#124; 设计：schiy Function &#124; 制作：zwwooooo 配色：schiy{巧克力、绿色、粉色}，zwwooooo{黑色} Requires &#124; 环境需求：WordPress 3.0+ Demo &#124; 演示：Chocolate-pro Download &#124; 下载：Download from Google Code Changelog &#124; 更新日志： = 1.0.0 = 2011.8.17 Chocolate-pro 1.0.0 release screenshot &#124; [...]]]></description>
			<content:encoded><![CDATA[<p>这是 <a title="Chocolate-lite" href="http://zww.me/archives/25435">Chocolate-lite</a> 主题的 pro 版，其实这个主题我在5月份就基本完成，后来因为乱七八糟的事搁置了。前天突然想起+心血来潮完善了一下，晚上联系此主题设计者 schiy 商定今天两博客统一发布。</p>
<p><strong>特点</strong>：（相比 lite 版）</p>
<ul>
<li>主要是多配色风格选择，目前内置的配色有：巧克力（lite）、黑色、绿色、粉色，默认是巧克力。</li>
<li>侧边栏顶部 4 个 125×125 广告位</li>
<li>文章开头左浮广告位</li>
<li>ajax评论提交（代码 via <a title="willin kan" href="http://kan.willin.org/">willin</a>），默认木有开启，需要在主题设置开启</li>
<li>木有了</li>
</ul>
<p><strong>Chocolate-pro 主题信息</strong></p>
<p>Design | 设计：<a title="Schiy" href="http://schiy.com/">schiy</a></p>
<p>Function | 制作：zwwooooo</p>
<p>配色：schiy{巧克力、绿色、粉色}，zwwooooo{黑色}</p>
<p>Requires | 环境需求：WordPress 3.0+</p>
<p>Demo | 演示：<a title="Demo：Chocolate-pro theme" href="http://demo.zww.me/?wptheme=chocolate-pro">Chocolate-pro</a></p>
<p>Download | 下载：<a title="Chocolate-pro 1.0.0" href="http://zww-wp-theme.googlecode.com/files/chocolate-pro.1.0.0.zip">Download from Google Code</a></p>
<p><strong>Changelog | 更新日志：</strong></p>
<p>= 1.0.0 =<br />
2011.8.17 Chocolate-pro 1.0.0 release</p>
<p><strong>screenshot | 样式截图:</strong></p>
<p>Home | 首页</p>
<p>--黑色</p>
<p><img title="" src="http://im.zww.im/2011/08/110817-chocolate-pro-1.png" alt="" /></p>
<p>--绿色</p>
<p><img title="" src="http://im.zww.im/2011/08/110817-chocolate-pro-3.png" alt="" /></p>
<p>--粉色</p>
<p><img title="" src="http://im.zww.im/2011/08/110817-chocolate-pro-2.png" alt="" /></p>
<p>--巧克力，参考 lite 版</p>
<p>Comment | 评论</p>
<p><img title="" src="http://im.zww.im/2011/08/110817-chocolate-pro-4.png" alt="" /></p>
<p>Theme Options | 主题设置</p>
<p><img title="" src="http://im.zww.im/2011/08/110817-chocolate-pro-5.png" alt="" /></p>
<p class="announce"><span><strong>声明:</strong></span> 除非注明，<a href="http://zww.me/">ZWWoOoOo</a>文章均为原创，转载请以链接形式标明本文地址<br />本文地址: <a href="http://zww.me/archives/25504">http://zww.me/archives/25504</a></p>]]></content:encoded>
			<wfw:commentRss>http://zww.me/archives/25504/feed</wfw:commentRss>
		<slash:comments>95</slash:comments>
		</item>
		<item>
		<title>WordPress每篇文章显示指定数量的评论者头像及评论内容</title>
		<link>http://zww.me/archives/25502</link>
		<comments>http://zww.me/archives/25502#comments</comments>
		<pubDate>Fri, 12 Aug 2011 02:18:26 +0000</pubDate>
		<dc:creator>zwwooooo</dc:creator>
				<category><![CDATA[WP Trick]]></category>
		<category><![CDATA[Trick]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WP函数]]></category>

		<guid isPermaLink="false">http://zww.me/?p=25502</guid>
		<description><![CDATA[这是“郑永”童鞋最近需求/折腾的功能效果，也跟我提起过，但最近几天较忙木有回复评论，我也是昨天才看到他的评论的。去他博客时，发现他以“不达到目的不罢休的折腾精神”自己根据老主题的 comments.php 代码顺藤摸瓜地折腾出来，精神可嘉，WP就需要这种折腾精神，有兴趣的朋友可以去这里围观，霍霍。 不过，我个人觉得这样稍微麻烦点，倒不如直接用 get_comments() 函数获取评论来的简单。今晚刚好有空，就顺便折腾下，有需要的可以参考折腾。 或许文章标题表述的还是不够清楚，这里再陈述一下：博客首页文章列表里面的每篇文章显示指定数量的最新评论者头像和评论内容，而且评论内容是鼠标 hover 头像时浮窗显示。 具体的演示我就懒得做了，效果图如下（我测试时用的是 zBench 主题） 下面是实现步骤和代码 1. 打开所用主题的首页php文件，通常是 index.php（有些主题是 home.php，具体根据自己主题修改），然后找到下面类似的函数： &#60;?php the_content(); ?&#62; PS：有些主题是调用摘录的，就是这样的 &#60;?php the_excerpt(); ?&#62; 2. 把下面的 php 代码扔到上面找到的函数下面，注意根据自己需求设置代码中的参数 &#60;?php $nums=5; //要显示几个评论 $get_comments_num=30; //获取最大评论数，主要用来排除博主的评论。 $fc_comments = get_comments('status=approve&#38;type=comment&#38;number='.$get_comments_num.'&#38;post_id='.get_the_ID()); if ( !empty($fc_comments) ) {     $my_email=get_bloginfo ('admin_email'); //排除管理员的评论     $i = 1; ?&#62;     &#60;div class="fc_comments"&#62;         &#60;ul&#62;&#60;?php [...]]]></description>
			<content:encoded><![CDATA[<p>这是“郑永”童鞋最近需求/折腾的功能效果，也跟我提起过，但最近几天较忙木有回复评论，我也是昨天才看到他的评论的。去他博客时，发现他以“不达到目的不罢休的折腾精神”自己根据老主题的 comments.php 代码顺藤摸瓜地折腾出来，精神可嘉，WP就需要这种折腾精神，有兴趣的朋友可以去<a title="wordpress首页列表显示每篇的评论头像" href="http://www.xptt.com/wordpress-page-list-shows-each-picture-comments.html">这里</a>围观，霍霍。</p>
<p>不过，我个人觉得这样稍微麻烦点，倒不如直接用 get_comments() 函数获取评论来的简单。今晚刚好有空，就顺便折腾下，有需要的可以参考折腾。</p>
<p>或许文章标题表述的还是不够清楚，这里再陈述一下：<span style="text-decoration: underline;">博客首页文章列表里面的每篇文章显示指定数量的最新评论者头像和评论内容，而且评论内容是鼠标 hover 头像时浮窗显示。</span></p>
<p>具体的演示我就懒得做了，<strong>效果图如下</strong>（我测试时用的是 <a title="WordPress Theme: zBench" href="http://zww.me/archives/25131">zBench</a> 主题）</p>
<p><img title="" src="http://im.zww.im/2011/08/110811-fc-comments.jpg" alt="" /></p>
<p><strong>下面是实现步骤和代码</strong></p>
<p>1. 打开所用主题的首页php文件，通常是 index.php（有些主题是 home.php，具体根据自己主题修改），然后找到下面类似的函数：</p>
<p>&lt;?php the_content(); ?&gt;</p>
<p>PS：有些主题是调用摘录的，就是这样的 &lt;?php the_excerpt(); ?&gt;</p>
<p>2. 把下面的 php 代码扔到上面找到的函数下面，注意根据自己需求设置代码中的参数</p>
<pre><span style="color: #008080;">&lt;?php</span> <span style="color: #000000;">$nums</span><span style="color: #000000;">=</span><span style="color: #0000ff;">5</span>; <span style="color: #008800; font-style: italic;">//要显示几个评论</span>
 <span style="color: #000000;">$get_comments_num</span><span style="color: #000000;">=</span><span style="color: #0000ff;">30</span>; <span style="color: #008800; font-style: italic;">//获取最大评论数，主要用来排除博主的评论。</span>
 <span style="color: #000000;">$fc_comments</span> <span style="color: #000000;">=</span> <span style="color: #000000;">get_comments</span>(<span style="color: #0000ff;">'status=approve&amp;type=comment&amp;number='</span><span style="color: #000000;">.</span><span style="color: #000000;">$get_comments_num</span><span style="color: #000000;">.</span><span style="color: #0000ff;">'&amp;post_id='</span><span style="color: #000000;">.</span><span style="color: #000000;">get_the_ID</span>());
 <span style="color: #000080; font-weight: bold;">if</span> ( <span style="color: #000000;">!</span><span style="color: #000080; font-weight: bold;">empty</span>(<span style="color: #000000;">$fc_comments</span>) ) <span style="color: #000000;">{</span>
     <span style="color: #000000;">$my_email</span><span style="color: #000000;">=</span><span style="color: #000000;">get_bloginfo</span> (<span style="color: #0000ff;">'admin_email'</span>); <span style="color: #008800; font-style: italic;">//排除管理员的评论</span>
     <span style="color: #000000;">$i</span> <span style="color: #000000;">=</span> <span style="color: #0000ff;">1</span>; <span style="color: #008080;">?&gt;</span>
     <span style="color: #000080; font-weight: bold;">&lt;div</span> <span style="color: #ff0000;">class=</span><span style="color: #0000ff;">"fc_comments"</span><span style="color: #000080; font-weight: bold;">&gt;</span>
         <span style="color: #000080; font-weight: bold;">&lt;ul&gt;</span><span style="color: #008080;">&lt;?php</span>
             <span style="color: #000000;">$commentcount</span> <span style="color: #000000;">=</span> <span style="color: #000000;">$fc_comments</span><span style="color: #000000;">-&gt;</span><span style="color: #ff0000;">comment_count</span>;
             <span style="color: #000000;">$fc_output</span><span style="color: #000000;">=</span><span style="color: #0000ff;">''</span>;
             <span style="color: #000080; font-weight: bold;">foreach</span> (<span style="color: #000000;">$fc_comments</span> <span style="color: #000080; font-weight: bold;">as</span> <span style="color: #000000;">$fc_comment</span>) <span style="color: #000000;">{</span>
                 <span style="color: #000080; font-weight: bold;">if</span> (<span style="color: #000000;">$fc_comment</span><span style="color: #000000;">-&gt;</span><span style="color: #ff0000;">comment_author_email</span> <span style="color: #000000;">!=</span> <span style="color: #000000;">$my_email</span>) <span style="color: #000000;">{</span>
                     <span style="color: #000000;">$fc_avatar</span><span style="color: #000000;">=</span><span style="color: #000000;">get_avatar</span>(<span style="color: #000000;">$fc_comment</span><span style="color: #000000;">-&gt;</span><span style="color: #ff0000;">comment_author_email</span><span style="color: #000000;">,</span><span style="color: #0000ff;">60</span>);
                     <span style="color: #000000;">$fc_output</span> <span style="color: #000000;">.=</span> <span style="color: #0000ff;">'&lt;li&gt;&lt;a href="'</span>
                     <span style="color: #000000;">.</span><span style="color: #000000;">get_comment_link</span>( <span style="color: #000000;">$fc_comment</span><span style="color: #000000;">-&gt;</span><span style="color: #ff0000;">comment_ID</span><span style="color: #000000;">,</span> <span style="color: #000080; font-weight: bold;">array</span>(<span style="color: #0000ff;">'type'</span> <span style="color: #000000;">=&gt;</span> <span style="color: #0000ff;">'all'</span>))<span style="color: #000000;">.</span><span style="color: #0000ff;">'"&gt;'</span>
                     <span style="color: #000000;">.</span><span style="color: #000000;">$fc_avatar</span>
                     <span style="color: #000000;">.</span><span style="color: #0000ff;">'&lt;/a&gt;&lt;ul&gt;&lt;li&gt;'</span>
                     <span style="color: #000000;">.</span><span style="color: #000000;">$fc_avatar</span>
                     <span style="color: #000000;">.</span><span style="color: #0000ff;">'&lt;p&gt;'</span>
                     <span style="color: #000000;">.</span><span style="color: #0000ff;">'&lt;strong&gt;'</span><span style="color: #000000;">.</span><span style="color: #000000;">$fc_comment</span><span style="color: #000000;">-&gt;</span><span style="color: #ff0000;">comment_author</span><span style="color: #000000;">.</span><span style="color: #0000ff;">'&lt;/strong&gt; '</span>
                     <span style="color: #000000;">.</span><span style="color: #000000;">$fc_comment</span><span style="color: #000000;">-&gt;</span><span style="color: #ff0000;">comment_date</span>
                     <span style="color: #000000;">.</span><span style="color: #0000ff;">'&lt;/p&gt;&lt;p&gt;'</span>
                     <span style="color: #000000;">.</span><span style="color: #000000;">convert_smilies</span>(<span style="color: #000000;">strip_tags</span>(<span style="color: #000000;">$fc_comment</span><span style="color: #000000;">-&gt;</span><span style="color: #ff0000;">comment_content</span>))
                     <span style="color: #000000;">.</span><span style="color: #0000ff;">'&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;'</span>;
                     <span style="color: #000080; font-weight: bold;">if</span> (<span style="color: #000000;">$i</span> <span style="color: #000000;">==</span> <span style="color: #000000;">$nums</span> || <span style="color: #000000;">$i</span> <span style="color: #000000;">==</span> <span style="color: #000000;">$commentcount</span>) <span style="color: #000080; font-weight: bold;">break</span>; <span style="color: #008800; font-style: italic;">//评论数量达到退出遍历</span>
                     <span style="color: #000000;">++</span><span style="color: #000000;">$i</span>;
                 <span style="color: #000000;">}</span>
             <span style="color: #000000;">}</span>
             <span style="color: #000080; font-weight: bold;">echo</span> <span style="color: #000000;">$fc_output</span>;
             <span style="color: #000080; font-weight: bold;">if</span> (<span style="color: #000000;">$fc_output</span>) <span style="color: #000080; font-weight: bold;">echo</span> <span style="color: #0000ff;">'&lt;li class="fc_more"&gt;'</span><span style="color: #000000;">,</span> <span style="color: #000000;">comments_popup_link</span>(<span style="color: #0000ff;">''</span><span style="color: #000000;">,</span><span style="color: #0000ff;">''</span><span style="color: #000000;">,</span><span style="color: #0000ff;">'&amp;raquo; more...'</span><span style="color: #000000;">),</span> <span style="color: #0000ff;">'&lt;/li&gt;'</span>;<span style="color: #008080;">?&gt;</span>
         <span style="color: #000080; font-weight: bold;">&lt;/ul&gt;</span>
     <span style="color: #000080; font-weight: bold;">&lt;/div&gt;</span><span style="color: #008080;">&lt;?php</span>
 <span style="color: #000000;">}</span> <span style="color: #008080;">?&gt;</span></pre>
<p>3. 然后就可以工作了……哦，CSS 样式参考，根据自己主题可以做适量修改</p>
<pre><span style="color: #000000;">.fc_comments</span> <span style="color: #000080; font-weight: bold;">ul</span><span style="color: #000000;">,</span><span style="color: #000000;">.fc_comments</span> <span style="color: #000080; font-weight: bold;">ul</span> <span style="color: #000080; font-weight: bold;">ul</span> p<span style="color: #000000;">{</span><span style="color: #000080; font-weight: bold;">margin</span><span style="color: #000000;">:</span><span style="color: #0000ff;">0</span>;<span style="color: #000080; font-weight: bold;">padding</span><span style="color: #000000;">:</span><span style="color: #0000ff;">0</span><span style="color: #000000;">;}</span>
<span style="color: #000000;">.fc_comments</span> <span style="color: #000080; font-weight: bold;">ul</span> <span style="color: #000080; font-weight: bold;">li</span><span style="color: #000000;">{</span><span style="color: #000080; font-weight: bold;">position</span><span style="color: #000000;">:</span><span style="color: #000080; font-weight: bold;">relative</span>;<span style="color: #000080; font-weight: bold;">list-style</span><span style="color: #000000;">:</span><span style="color: #000080; font-weight: bold;">none</span>;<span style="color: #000080; font-weight: bold;">float</span><span style="color: #000000;">:</span><span style="color: #000080; font-weight: bold;">left</span>;<span style="color: #000080; font-weight: bold;">line-height</span><span style="color: #000000;">:</span><span style="color: #0000ff;">18px</span>;<span style="color: #000080; font-weight: bold;">margin-right</span><span style="color: #000000;">:</span><span style="color: #0000ff;">5px</span><span style="color: #000000;">;}</span>
<span style="color: #000000;">.fc_comments</span> <span style="color: #000080; font-weight: bold;">ul</span> <span style="color: #000080; font-weight: bold;">li</span><span style="color: #000000;">.fc_more</span><span style="color: #000000;">{</span><span style="color: #000080; font-weight: bold;">line-height</span><span style="color: #000000;">:</span><span style="color: #0000ff;">16px</span>;<span style="color: #000080; font-weight: bold;">padding-top</span><span style="color: #000000;">:</span><span style="color: #0000ff;">8px</span><span style="color: #000000;">;}</span>
<span style="color: #000000;">.fc_comments</span> <span style="color: #000080; font-weight: bold;">ul</span> <span style="color: #000080; font-weight: bold;">li</span> <span style="color: #000080; font-weight: bold;">img</span><span style="color: #000000;">.avatar</span><span style="color: #000000;">{</span><span style="color: #000080; font-weight: bold;">width</span><span style="color: #000000;">:</span><span style="color: #0000ff;">20px</span>;<span style="color: #000080; font-weight: bold;">height</span><span style="color: #000000;">:</span><span style="color: #0000ff;">20px</span>;<span style="color: #000080; font-weight: bold;">margin</span><span style="color: #000000;">:</span><span style="color: #0000ff;">0</span>;<span style="color: #000080; font-weight: bold;">padding</span><span style="color: #000000;">:</span><span style="color: #0000ff;">1px</span>;<span style="color: #000080; font-weight: bold;">border</span><span style="color: #000000;">:</span><span style="color: #0000ff;">1px</span> <span style="color: #000080; font-weight: bold;">solid</span> <span style="color: #0000ff;">#ddd</span><span style="color: #000000;">;}</span>
<span style="color: #000000;">.fc_comments</span> <span style="color: #000080; font-weight: bold;">ul</span> <span style="color: #000080; font-weight: bold;">li</span> <span style="color: #000080; font-weight: bold;">img</span><span style="color: #000000;">.avatar</span><span style="color: #000000;">:hover</span><span style="color: #000000;">{</span><span style="color: #000080; font-weight: bold;">border-color</span><span style="color: #000000;">:</span><span style="color: #0000ff;">#999</span><span style="color: #000000;">;}</span>
<span style="color: #000000;">.fc_comments</span> <span style="color: #000080; font-weight: bold;">ul</span> <span style="color: #000080; font-weight: bold;">li</span><span style="color: #000000;">:hover</span> <span style="color: #000000;">&gt;</span> <span style="color: #000080; font-weight: bold;">ul</span><span style="color: #000000;">{</span><span style="color: #000080; font-weight: bold;">display</span><span style="color: #000000;">:</span><span style="color: #000080; font-weight: bold;">block</span><span style="color: #000000;">;}</span>
<span style="color: #000000;">.fc_comments</span> <span style="color: #000080; font-weight: bold;">ul</span> <span style="color: #000080; font-weight: bold;">ul</span><span style="color: #000000;">{</span><span style="color: #000080; font-weight: bold;">display</span><span style="color: #000000;">:</span><span style="color: #000080; font-weight: bold;">none</span>;<span style="color: #000080; font-weight: bold;">position</span><span style="color: #000000;">:</span><span style="color: #000080; font-weight: bold;">absolute</span>;<span style="color: #000080; font-weight: bold;">bottom</span><span style="color: #000000;">:</span><span style="color: #0000ff;">40px</span>;<span style="color: #000080; font-weight: bold;">left</span><span style="color: #000000;">:</span><span style="color: #0000ff;">0</span><span style="color: #000000;">;}</span>
<span style="color: #000000;">.fc_comments</span> <span style="color: #000080; font-weight: bold;">ul</span> <span style="color: #000080; font-weight: bold;">ul</span> <span style="color: #000080; font-weight: bold;">li</span><span style="color: #000000;">{</span><span style="color: #000080; font-weight: bold;">width</span><span style="color: #000000;">:</span><span style="color: #0000ff;">280px</span>;<span style="color: #000080; font-weight: bold;">padding</span><span style="color: #000000;">:</span><span style="color: #0000ff;">5px</span>;<span style="color: #000080; font-weight: bold;">border</span><span style="color: #000000;">:</span><span style="color: #0000ff;">2px</span> <span style="color: #000080; font-weight: bold;">solid</span> <span style="color: #0000ff;">#999</span>;<span style="color: #000080; font-weight: bold;">background-color</span><span style="color: #000000;">:</span><span style="color: #0000ff;">#fff</span><span style="color: #000000;">;}</span>
<span style="color: #000000;">.fc_comments</span> <span style="color: #000080; font-weight: bold;">ul</span> <span style="color: #000080; font-weight: bold;">ul</span> <span style="color: #000080; font-weight: bold;">li</span> <span style="color: #000080; font-weight: bold;">img</span><span style="color: #000000;">.avatar</span><span style="color: #000000;">{</span><span style="color: #000080; font-weight: bold;">float</span><span style="color: #000000;">:</span><span style="color: #000080; font-weight: bold;">left</span>;<span style="color: #000080; font-weight: bold;">width</span><span style="color: #000000;">:</span><span style="color: #0000ff;">32px</span>;<span style="color: #000080; font-weight: bold;">height</span><span style="color: #000000;">:</span><span style="color: #0000ff;">32px</span>;<span style="color: #000080; font-weight: bold;">margin-right</span><span style="color: #000000;">:</span><span style="color: #0000ff;">5px</span><span style="color: #000000;">;}</span></pre>
<p>4. 真的没有了</p>
<p>PS1: 浮窗效果我用 css 实现，自然就是不支持 IE6 了，对 IE6 喜欢/藕断丝连的朋友还是放过它吧，让它安静的走开（离去）！如果你要炫的效果，那么就用 jQuery 吧，这里就不写了。</p>
<p>PS2: 其实还可以用 wp_list_comments() 函数来实现的，不过要另外写回调函数，有意思的朋友可以折腾一下，不是很难。</p>
<p><strong>后话：</strong>其实我个人不喜欢加这个功能，因为我稍微有点速度控，每篇文章都调用一定数量的评论，当然会增大服务器的压力，直接影响的就是速度，当然，如果单页文章列表数量不多的话可以考虑，而且主机给力的话，这点速度影响是感觉不到的。</p>
<p>另外，由于众所周知的原因，gravatar头像的服务器在国内偶尔会抽风 + 速度慢，所以最好给头像加缓存，具体方法参考我以前的文章：《<a title="willin 的简单 gravatar 头像缓存" href="http://zww.me/archives/24711">willin 的简单gravatar 头像缓存</a>》、《<a title="让willin简单头像缓存函数my_avatar()真正支持alt" href="http://zww.me/archives/25296">让willin简单头像缓存函数my_avatar()真正支持alt</a>》</p>
<p><del><em>预告：懒人方式 - 直接扔到  functions.php 的方式，待续……</em></del> （不是很多人需要，“懒人方式”放弃折腾）</p>
<p class="announce"><span><strong>声明:</strong></span> 除非注明，<a href="http://zww.me/">ZWWoOoOo</a>文章均为原创，转载请以链接形式标明本文地址<br />本文地址: <a href="http://zww.me/archives/25502">http://zww.me/archives/25502</a></p>]]></content:encoded>
			<wfw:commentRss>http://zww.me/archives/25502/feed</wfw:commentRss>
		<slash:comments>105</slash:comments>
		</item>
	</channel>
</rss>

