<?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>Bolo的博客 &#187; WordPress</title>
	<atom:link href="http://blog.imbolo.com/category/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.imbolo.com</link>
	<description>一个设计爱好者杂七杂八的博客</description>
	<lastBuildDate>Wed, 23 Nov 2011 16:19:45 +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.2 新亮点</title>
		<link>http://blog.imbolo.com/whats-coming-in-wordpress-3-2/</link>
		<comments>http://blog.imbolo.com/whats-coming-in-wordpress-3-2/#comments</comments>
		<pubDate>Thu, 05 May 2011 17:12:25 +0000</pubDate>
		<dc:creator>bolo</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://blog.imbolo.com/?p=1998</guid>
		<description><![CDATA[WordPress 即将更新到 3.2，和 3.1 的理念一样，WordPress 3.2 将继续在用户体验上下功夫。WordPress 3.2 将会有以下更新。]]></description>
			<content:encoded><![CDATA[<p>WordPress 即将更新到 3.2，和 3.1 的理念一样，WordPress 3.2 将继续在用户体验上下功夫。WordPress 3.2 将会有以下更新。</p>
<h3>新的后台样式</h3>
<p><img src="http://i1001.photobucket.com/albums/af131/bolo1988/dashboard.gif" alt="WordPress 3.2 后台样式" /></p>
<p>WordPress 3.2 的后台样式将更加清爽、时尚。</p>
<p><span id="more-1998"></span></p>
<h3>新的默认主题</h3>
<p><img src="http://i1001.photobucket.com/albums/af131/bolo1988/2011v2.gif" alt="WordPress 3.2 默认主题 Twenty Eleven" /></p>
<p>WordPress 3.2 的默认主题为新设计的 Twenty Eleven 主题，该主题布局和 Twenty Ten 差不多，到在后台可以选择黑/白两种配色，并且有几种默认的分栏布局可以选择。</p>
<h3>改进升级程序</h3>
<p>以前 WordPress 升级的时候会下载整个压缩包，使很多国内主机用户在升级 WordPress 经常遭遇服务器超时。而改良后的升级程序只会更新相对于当前版本有所改动的文件，升级速度大大提高。</p>
<h3>广阔的写作空间</h3>
<p><img src="http://i1001.photobucket.com/albums/af131/bolo1988/distractionfree.gif" alt="WordPress 3.2 全屏写作" /></p>
<p>WordPress 的文章编辑器总是显得很狭隘，非常不利于调整内容排版，WordPress 3.2 的文章编辑器将可以扩大至全屏！尽情写作吧。</p>
<h3>提升运行效率</h3>
<p>WordPress 3.2 会去掉核心代码里一些罗哩罗嗦的地方，以提高整体效率。在为是否用 WordPress 建站的你们，以后可以放下这块心头石了。</p>
<h3>新的 PHP 和 MySQL 环境需求</h3>
<p>WordPress 3.2 要求服务器最低要有 PHP 5.2.4 和 MySQL5 的环境，在准备升级 WordPress 3.2 前，请先用探针查看自己服务器的配置，实在不行就顺便换个更好的服务器吧。</p>
<p>BTW，据说 WordPress 3.2 将在 2011 年 6 月 30 日发布，期待吧。</p>
<p  class="related_post_title">Related Posts</p><ul class="related_post"><li><a href="http://blog.imbolo.com/wordpress-3-2-the-plan-faster-lighter/" title="WordPress 3.2 将着重提高效率和程序轻量化">WordPress 3.2 将着重提高效率和程序轻量化</a></li><li><a href="http://blog.imbolo.com/wp-plugin-author-list-plus/" title="适合多人博客的作者列表插件：Author-List-Plus">适合多人博客的作者列表插件：Author-List-Plus</a></li><li><a href="http://blog.imbolo.com/improve-wordpress-navigation-menu-output/" title="为 WordPress 3.0 自定义菜单添加描述">为 WordPress 3.0 自定义菜单添加描述</a></li><li><a href="http://blog.imbolo.com/customizing-the-new-wordpress-3-0-custom-menus-adding-different-icons-to-each-link/" title="为 WordPress 3.0 的自定义菜单链接添加栏目图标">为 WordPress 3.0 的自定义菜单链接添加栏目图标</a></li><li><a href="http://blog.imbolo.com/wordpress-insert-a-advertisement-at-the-more-tag/" title="WordPress 在 more 截断处插入广告">WordPress 在 more 截断处插入广告</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://blog.imbolo.com/whats-coming-in-wordpress-3-2/feed/</wfw:commentRss>
		<slash:comments>30</slash:comments>
		</item>
		<item>
		<title>WordPress SEO 技巧：内链优化</title>
		<link>http://blog.imbolo.com/wordpress-seo-tips/</link>
		<comments>http://blog.imbolo.com/wordpress-seo-tips/#comments</comments>
		<pubDate>Sun, 24 Oct 2010 15:55:52 +0000</pubDate>
		<dc:creator>bolo</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[Theme]]></category>

		<guid isPermaLink="false">http://blog.imbolo.com/?p=1968</guid>
		<description><![CDATA[最近在做一个新网站，Google 刚开始收录的时候发现归档页面的排名比文章还高，猜测原因是归档页面获得的内链太多了，因此产生一个把所有的指向归档页面的链接全部加上 rel="nofollow" 属性的想法。]]></description>
			<content:encoded><![CDATA[<p>最近在做一个新网站，Google 刚开始收录的时候发现归档页面的排名比文章还高，猜测原因是归档页面获得的内链太多了，因此产生一个把所有的指向归档页面的链接全部加上 rel=&#8221;nofollow&#8221; 属性的想法。要达到这个目的，我们完全可以用 WordPress 强大的 filter 来实现。打开主题的 functions.php ，在里面加上以下的代码：</p>
<p><span id="more-1968"></span></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">//给标签云里的链接加上 rel=&quot;nofollow&quot;</span>
add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'wp_tag_cloud'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'cis_nofollow_tag_cloud'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">function</span> cis_nofollow_tag_cloud<span style="color: #009900;">&#40;</span><span style="color: #000088;">$text</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">return</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'&lt;a href='</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'&lt;a rel=&quot;nofollow&quot; href='</span><span style="color: #339933;">,</span>  <span style="color: #000088;">$text</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>	
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//给 the_tags() 生成的链接 加上 rel=&quot;nofollow&quot;</span>
add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'the_tags'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'cis_nofollow_the_tag'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">function</span> cis_nofollow_the_tag<span style="color: #009900;">&#40;</span><span style="color: #000088;">$text</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">return</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'rel=&quot;tag&quot;'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'rel=&quot;tag nofollow&quot;'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$text</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//给 wp_list_categories() 生成的链接加上 rel=&quot;nofollow&quot;</span>
add_filter<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'wp_list_categories'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'cis_nofollow_wp_list_categories'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">function</span> cis_nofollow_wp_list_categories<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$text</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
	<span style="color: #000088;">$text</span> <span style="color: #339933;">=</span> <span style="color: #990000;">stripslashes</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$text</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$text</span> <span style="color: #339933;">=</span> <span style="color: #990000;">preg_replace_callback</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'|&lt;a (.+?)&gt;|i'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'wp_rel_nofollow_callback'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$text</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">return</span> <span style="color: #000088;">$text</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//给 the_category() 生成的链接加上 rel=&quot;nofollow&quot;</span>
add_filter<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'the_category'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'cis_nofollow_the_category'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">function</span> cis_nofollow_the_category<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$text</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
	<span style="color: #000088;">$text</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'rel=&quot;category tag&quot;'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$text</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$text</span> <span style="color: #339933;">=</span> cis_nofollow_wp_list_categories<span style="color: #009900;">&#40;</span><span style="color: #000088;">$text</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">return</span> <span style="color: #000088;">$text</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//给 the_author_post_link 生成的链接加上 rel=&quot;nofollow&quot;</span>
add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'the_author_posts_link'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'cis_nofollow_the_author_posts_link'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">function</span> cis_nofollow_the_author_posts_link <span style="color: #009900;">&#40;</span><span style="color: #000088;">$link</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">return</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'&lt;/a&gt;&lt;a href='</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'&lt;a rel=&quot;nofollow&quot; href='</span><span style="color: #339933;">,</span>  <span style="color: #000088;">$link</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>	
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//给 comments_popup_link_attributes() 生成的链接加上 rel=&quot;nofollow&quot;</span>
add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'comments_popup_link_attributes'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'cis_nofollow_comments_popup_link_attributes'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">function</span> cis_nofollow_comments_popup_link_attributes <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">' rel=&quot;nofollow&quot;'</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>上面的 filter 针对的都是主题开发时一些使用率比较高的函数，基本上已经能满足我的要求了。</p>
<p></a></pre>
<p  class="related_post_title">Related Posts</p><ul class="related_post"><li><a href="http://blog.imbolo.com/improve-the-experience-of-plugin-in-a-theme/" title="提高主题的插件体验">提高主题的插件体验</a></li><li><a href="http://blog.imbolo.com/how-to-combine-plugin-with-theme-1/" title="如何把插件集成到主题里(1)">如何把插件集成到主题里(1)</a></li><li><a href="http://blog.imbolo.com/wp-plugin-author-list-plus/" title="适合多人博客的作者列表插件：Author-List-Plus">适合多人博客的作者列表插件：Author-List-Plus</a></li><li><a href="http://blog.imbolo.com/improve-wordpress-navigation-menu-output/" title="为 WordPress 3.0 自定义菜单添加描述">为 WordPress 3.0 自定义菜单添加描述</a></li><li><a href="http://blog.imbolo.com/access-your-feedburner-stats-from-wordpress-dashboard/" title="在 WordPress 后台查看 FeedBurner 数据">在 WordPress 后台查看 FeedBurner 数据</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://blog.imbolo.com/wordpress-seo-tips/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
		<item>
		<title>WordPress 3.1 将带来什么？</title>
		<link>http://blog.imbolo.com/whats-coming-in-wordpress-3-1/</link>
		<comments>http://blog.imbolo.com/whats-coming-in-wordpress-3-1/#comments</comments>
		<pubDate>Mon, 18 Oct 2010 13:14:08 +0000</pubDate>
		<dc:creator>bolo</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[WEB]]></category>

		<guid isPermaLink="false">http://blog.imbolo.com/?p=1965</guid>
		<description><![CDATA[世界上最流行的博客程序 WordPress 从 3.0 版开始向 CMS 转型，短短四个月之后，WordPress 将发布 3.1 版本，相对于 3.0 ，3.1 版进行了多项重大更新。下面是目前泄露出来一些更新，虽然未必会在 3.1 版里全部出现，但也将是 WordPress 发展的趋势。]]></description>
			<content:encoded><![CDATA[<p>世界上最流行的博客程序 WordPress 从 3.0 版开始向 CMS 转型，短短四个月之后，WordPress 将发布 3.1 版本，相对于 3.0 ，3.1 版进行了多项重大更新。下面是目前泄露出来一些更新，虽然未必会在 3.1 版里全部出现，但也将是 WordPress 发展的趋势。</p>
<h3>内链系统</h3>
<p>作为最受专业博主期待的功能之一，新版的 WordPress 会在文章编辑界面添加一个搜索框，用来搜索已有的文章，并快速地把链接插入到新文章中。大家都知道增加内链对 SEO 非常重要。</p>
<h3>管理员快捷工具条</h3>
<p><img src="http://i1001.photobucket.com/albums/af131/bolo1988/WordPress31.gif" alt="WordPress 3.1 管理员快捷工具条" /></p>
<p>WordPress 后台打开速度慢的问题一直以来已经饱受诟病，3.1 版将改善这个问题。如果你是管理员用户的话，在访问博客前台的时候页面顶部将出现一个管理员工具条，你可以快速访问后台控制板的任何页面。根据 WordPress 老大 Matt Mullenweg 的介绍，“这将是 WordPress 迈向前端编辑的第一步”。不过我现在担心的是，这个变化会不会带来管理员访问前台缓慢的新问题呢？</p>
<p><span id="more-1965"></span></p>
<h3>异步加载（AJAX）管理界面</h3>
<p>WordPress 改善管理体验的第二击，具体会变成怎样目前还不得而知，但我们可以拭目而待。</p>
<h3>独立的网络控制面板</h3>
<p>目前 WordPress 的多站点管理还非常麻烦。WordPress 将着手把多站点管理面板从控制台中独立出来，是子站点将拥有一个独立的控制台。由于这项工作非常复杂和费事，有可能推迟到 WordPress 3.2 才推出。</p>
<h3>改进主题管理的 UI</h3>
<p>WordPress 继续改进管理体验。当你是一个多站点超级管理员的时候，你往往需要预先安装很多的主题供用户选用，改良的 UI 将令超级管理员能更加方便地安装和管理主题。</p>
<h3>文章模板和文章样式</h3>
<p><img src="http://i1001.photobucket.com/albums/af131/bolo1988/04996052.gif" alt="WordPress 3.1 文章模板和文章样式" /></p>
<p>作为细化自定义文章类型的一项工作，你可以为不同内容的文章选择不同的模板和样式。假如你的博客既有展示图片的文章，又有以文本为主的文章的时候，采用不同的文章样式将使你的博客拥有更佳的阅读体验。</p>
<p  class="related_post_title">Related Posts</p><ul class="related_post"><li><a href="http://blog.imbolo.com/css-turn-off-webkit-browsers-input-highlight-and-textarea-resize/" title="CSS 屏蔽 Webkit 浏览器 input 高亮和 textarea 缩放">CSS 屏蔽 Webkit 浏览器 input 高亮和 textarea 缩放</a></li><li><a href="http://blog.imbolo.com/create-a-simple-ajax-rss-widget-with-jquery-and-yahoo-pipes/" title="利用 Yahoo Pipes 和 jQuery 做一个 RSS 挂件">利用 Yahoo Pipes 和 jQuery 做一个 RSS 挂件</a></li><li><a href="http://blog.imbolo.com/center-multiple-divs-with-css/" title="CSS 多个子框架居中">CSS 多个子框架居中</a></li><li><a href="http://blog.imbolo.com/the-css3-flexible-box-model/" title="CSS3 灵活的盒子模型(Flexible Box Module) &#8211; 1">CSS3 灵活的盒子模型(Flexible Box Module) &#8211; 1</a></li><li><a href="http://blog.imbolo.com/web-rounded-conner-choice/" title="网页圆角的取舍">网页圆角的取舍</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://blog.imbolo.com/whats-coming-in-wordpress-3-1/feed/</wfw:commentRss>
		<slash:comments>24</slash:comments>
		</item>
		<item>
		<title>适合多人博客的作者列表插件：Author-List-Plus</title>
		<link>http://blog.imbolo.com/wp-plugin-author-list-plus/</link>
		<comments>http://blog.imbolo.com/wp-plugin-author-list-plus/#comments</comments>
		<pubDate>Fri, 10 Sep 2010 12:13:54 +0000</pubDate>
		<dc:creator>bolo</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Plugins]]></category>

		<guid isPermaLink="false">http://blog.imbolo.com/?p=1957</guid>
		<description><![CDATA[Author-List-Plus 是 CantonBolo 为 WPJAM 应用商城做的第一个收费 WordPress 插件。能自动显示博客里所有作者的用户资料并统计每个作者的文章数，非常适合多人博客。]]></description>
			<content:encoded><![CDATA[<p>Author-List-Plus 是 CantonBolo 为 <a href="http://wpjam.net/?ref=CantonBolo">WPJAM 应用商城</a> 做的第一个收费 WordPress 插件。能自动显示博客里所有作者的用户资料并统计每个作者的文章数，非常适合多人博客。</p>
<p><img src="http://i1001.photobucket.com/albums/af131/bolo1988/65e9cca0.png" alt="作者列表预览" /></p>
<p>作为一个多人博客，如何才能让你的访客更多地了解博客的撰稿人们呢？建立一个完善的作者列表是一个效果良好的做法。而 Author-List-Plus 插件则可以满足大部分多人博客的需求，除了 WordPress 默认支持的个人资料以外，Author-List-Plus 还可以让每个作者都设置自己的所在地、SNS、微博等资料，博客管理员可以设置在作者列表里显示哪些资料，而更为强大的是，博主无需修改主题模板，Author-List-Plus 可以自动把作者列表添加到特定的页面里，使用非常简单！</p>
<p><span id="more-1957"></span><br />
<img src="http://i1001.photobucket.com/albums/af131/bolo1988/6322118f.png" alt="详细的后台选项" /></p>
<p>当然，如果你想作者列表更加美观的话，你可以为作者列表写一个样式，Author-List-Plus 默认生成的 HTML 结构以足够让你写出非常漂亮的样式！</p>
<h2>使用方法</h2>
<ol>
<li>上传并激活插件后，每个作者都可以在自己的 Profile (档案) 页面添加更多的自定义资料</li>
<li>博客管理员可以在 Author List Plus Options 页面定制作者列表显示的内容</li>
</ol>
<p>Author-List-Plus 只售 <strong>￥ 9.98</strong> ，需要的童鞋可以到 <a href="http://wpjam.net/item/author-list-plus/?ref=CantonBolo">WPJAM 应用商城</a> 购买。</p>
<p  class="related_post_title">Related Posts</p><ul class="related_post"><li><a href="http://blog.imbolo.com/wordpress-plugin-ibegin-share-mod/" title="WordPress 分享插件：iBegin Share (mod)">WordPress 分享插件：iBegin Share (mod)</a></li><li><a href="http://blog.imbolo.com/diy-a-plugin/" title="做一个自己的插件">做一个自己的插件</a></li><li><a href="http://blog.imbolo.com/wordpress-plugin-admin-post-navigation/" title="插件推荐：Admin Post Navigation">插件推荐：Admin Post Navigation</a></li><li><a href="http://blog.imbolo.com/overlay4wp/" title="WordPress相册插件：Overlay4WP">WordPress相册插件：Overlay4WP</a></li><li><a href="http://blog.imbolo.com/whats-coming-in-wordpress-3-2/" title="WordPress 3.2 新亮点">WordPress 3.2 新亮点</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://blog.imbolo.com/wp-plugin-author-list-plus/feed/</wfw:commentRss>
		<slash:comments>24</slash:comments>
		</item>
		<item>
		<title>为 WordPress 3.0 自定义菜单添加描述</title>
		<link>http://blog.imbolo.com/improve-wordpress-navigation-menu-output/</link>
		<comments>http://blog.imbolo.com/improve-wordpress-navigation-menu-output/#comments</comments>
		<pubDate>Tue, 20 Jul 2010 06:04:42 +0000</pubDate>
		<dc:creator>bolo</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Skill]]></category>
		<category><![CDATA[Theme]]></category>

		<guid isPermaLink="false">http://blog.imbolo.com/?p=1914</guid>
		<description><![CDATA[WordPress 3.0 增加了一个强大的自定义菜单功能，但美中不足是要实现题图这样包含描述的菜单时，单靠目前 WordPress 的功能还无法实现。本文将教你改变 WordPress 默认的菜单输出，打造更加个性的菜单。]]></description>
			<content:encoded><![CDATA[<p><img src="http://i1001.photobucket.com/albums/af131/bolo1988/1-3.png" alt="WordPress 带描述的菜单" /></p>
<p>WordPress 3.0 增加了一个强大的自定义菜单功能，但美中不足是要实现题图这样包含描述的菜单时，单靠目前 WordPress 的功能还无法实现。本文将教你改变 WordPress 默认的菜单输出，打造更加个性的菜单。</p>
<p>也许你已经知道，当后台出现 <strong>Appearance > Menus</strong> 这个菜单项的时候，就标明你使用的主题支持 WordPress 3.0 自定义菜单。只需要用 <a href="http://codex.wordpress.org/Function_Reference/wp_nav_menu">wp_nav_menu()</a> 函数进行调用即可。但问题是 WordPress 输出的菜单 HTML 结构如下：<span id="more-1914"></span></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="html4strick" style="font-family:monospace;">&lt;ul id=&quot;menu-main&quot;&gt;
    &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Home&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;#&quot;&gt;About&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Contact&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Blog&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</pre></td></tr></table></div>

<p>但我们需要的是像下面这种结构的菜单：</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="html4strick" style="font-family:monospace;">&lt;ul id=&quot;menu-main&quot;&gt;
     &lt;li&gt;&lt;a href=&quot;#&quot;&gt;&lt;strong&gt;Home&lt;/strong&gt;&lt;span&gt;Description&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
     &lt;li&gt;&lt;a href=&quot;#&quot;&gt;&lt;strong&gt;About&lt;/strong&gt;&lt;span&gt;Description&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
     &lt;li&gt;&lt;a href=&quot;#&quot;&gt;&lt;strong&gt;Contact&lt;/strong&gt;&lt;span&gt;Description&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
     &lt;li&gt;&lt;a href=&quot;#&quot;&gt;&lt;strong&gt;Blog&lt;/strong&gt;&lt;span&gt;Description&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</pre></td></tr></table></div>

<p>通过对比，很明显 WordPress 默认输出的菜单结构并不能满足我们的要求。我们需要做的是先为每个菜单项写上 description，然后添加一个 filter 对 WordPress 输出的菜单进行整理。</p>
<p>在 <strong>Appearance > Menus</strong> 页面，菜单项的 description 输入框默认是隐藏的，我们可以在页顶的 <strong>Screen Options</strong> 里把 <strong>Description</strong> 勾上。<br />
<img src="http://i1001.photobucket.com/albums/af131/bolo1988/2-3.png" alt="显示菜单项描述输入框" /><br />
然后我们就开始为菜单项加上描述吧！<br />
<img src="http://i1001.photobucket.com/albums/af131/bolo1988/3-3.png" alt="填写菜单项描述" /><br />
在默认情况下，WordPress 已经自动为 Page 菜单项写上了长长的描述，在这里我们可以把这些描述改为自己喜欢的内容。</p>
<p>接下来我们要写一个 filter 用来整理 WordPress 输出的菜单代码。<a href="http://codex.wordpress.org/Function_Reference/wp_nav_menu">wp_nav_menu()</a> 函数有一个 <strong>walker</strong> 参数，我们通过这个参数来调用 filter。下面是 filter 的代码：</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">class</span> description_walker <span style="color: #000000; font-weight: bold;">extends</span> Walker_Nav_Menu
<span style="color: #009900;">&#123;</span>
      <span style="color: #000000; font-weight: bold;">function</span> start_el<span style="color: #009900;">&#40;</span><span style="color: #339933;">&amp;</span><span style="color: #000088;">$output</span><span style="color: #339933;">,</span> <span style="color: #000088;">$item</span><span style="color: #339933;">,</span> <span style="color: #000088;">$depth</span><span style="color: #339933;">,</span> <span style="color: #000088;">$args</span><span style="color: #009900;">&#41;</span>
      <span style="color: #009900;">&#123;</span>
           <span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$wp_query</span><span style="color: #339933;">;</span>
           <span style="color: #000088;">$indent</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$depth</span> <span style="color: #009900;">&#41;</span> ? <span style="color: #990000;">str_repeat</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$depth</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">;</span>
&nbsp;
           <span style="color: #000088;">$class_names</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$value</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">;</span>
&nbsp;
           <span style="color: #000088;">$classes</span> <span style="color: #339933;">=</span> <span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$item</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">classes</span> <span style="color: #009900;">&#41;</span> ? <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#41;</span> <span style="color: #000088;">$item</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">classes</span><span style="color: #339933;">;</span>
&nbsp;
           <span style="color: #000088;">$class_names</span> <span style="color: #339933;">=</span> <span style="color: #990000;">join</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">' '</span><span style="color: #339933;">,</span> apply_filters<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'nav_menu_css_class'</span><span style="color: #339933;">,</span> <span style="color: #990000;">array_filter</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$classes</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$item</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
           <span style="color: #000088;">$class_names</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">' class=&quot;'</span><span style="color: #339933;">.</span> esc_attr<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$class_names</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&quot;'</span><span style="color: #339933;">;</span>
&nbsp;
           <span style="color: #000088;">$output</span> <span style="color: #339933;">.=</span> <span style="color: #000088;">$indent</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&lt;li id=&quot;menu-item-'</span><span style="color: #339933;">.</span> <span style="color: #000088;">$item</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&quot;'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$value</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$class_names</span> <span style="color: #339933;">.</span><span style="color: #0000ff;">'&gt;'</span><span style="color: #339933;">;</span>
&nbsp;
           <span style="color: #000088;">$attributes</span>  <span style="color: #339933;">=</span> <span style="color: #339933;">!</span> <span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$item</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">attr_title</span> <span style="color: #009900;">&#41;</span> ? <span style="color: #0000ff;">' title=&quot;'</span>  <span style="color: #339933;">.</span> esc_attr<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$item</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">attr_title</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot;'</span> <span style="color: #339933;">:</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">;</span>
           <span style="color: #000088;">$attributes</span> <span style="color: #339933;">.=</span> <span style="color: #339933;">!</span> <span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$item</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">target</span> <span style="color: #009900;">&#41;</span>     ? <span style="color: #0000ff;">' target=&quot;'</span> <span style="color: #339933;">.</span> esc_attr<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$item</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">target</span>     <span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot;'</span> <span style="color: #339933;">:</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">;</span>
           <span style="color: #000088;">$attributes</span> <span style="color: #339933;">.=</span> <span style="color: #339933;">!</span> <span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$item</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">xfn</span> <span style="color: #009900;">&#41;</span>        ? <span style="color: #0000ff;">' rel=&quot;'</span>    <span style="color: #339933;">.</span> esc_attr<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$item</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">xfn</span>        <span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot;'</span> <span style="color: #339933;">:</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">;</span>
           <span style="color: #000088;">$attributes</span> <span style="color: #339933;">.=</span> <span style="color: #339933;">!</span> <span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$item</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">url</span> <span style="color: #009900;">&#41;</span>        ? <span style="color: #0000ff;">' href=&quot;'</span>   <span style="color: #339933;">.</span> esc_attr<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$item</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">url</span>        <span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot;'</span> <span style="color: #339933;">:</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">;</span>
&nbsp;
           <span style="color: #000088;">$prepend</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'&lt;strong&gt;'</span><span style="color: #339933;">;</span>
           <span style="color: #000088;">$append</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'&lt;/strong&gt;'</span><span style="color: #339933;">;</span>
           <span style="color: #000088;">$description</span>  <span style="color: #339933;">=</span> <span style="color: #339933;">!</span> <span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$item</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">description</span> <span style="color: #009900;">&#41;</span> ? <span style="color: #0000ff;">'&lt;span&gt;'</span><span style="color: #339933;">.</span>esc_attr<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$item</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">description</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&lt;/span&gt;'</span> <span style="color: #339933;">:</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">;</span>
&nbsp;
           <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$depth</span> <span style="color: #339933;">!=</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span>
           <span style="color: #009900;">&#123;</span>
                     <span style="color: #000088;">$description</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$append</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$prepend</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span>
           <span style="color: #009900;">&#125;</span>
&nbsp;
            <span style="color: #000088;">$item_output</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$args</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">before</span><span style="color: #339933;">;</span>
            <span style="color: #000088;">$item_output</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'&lt;a '</span><span style="color: #339933;">.</span> <span style="color: #000088;">$attributes</span> <span style="color: #339933;">.</span><span style="color: #0000ff;">'&gt;'</span><span style="color: #339933;">;</span>
            <span style="color: #000088;">$item_output</span> <span style="color: #339933;">.=</span> <span style="color: #000088;">$args</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">link_before</span> <span style="color: #339933;">.</span><span style="color: #000088;">$prepend</span><span style="color: #339933;">.</span>apply_filters<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'the_title'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$item</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">title</span><span style="color: #339933;">,</span> <span style="color: #000088;">$item</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #000088;">$append</span><span style="color: #339933;">;</span>
            <span style="color: #000088;">$item_output</span> <span style="color: #339933;">.=</span> <span style="color: #000088;">$description</span><span style="color: #339933;">.</span><span style="color: #000088;">$args</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">link_after</span><span style="color: #339933;">;</span>
            <span style="color: #000088;">$item_output</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'&lt;/a&gt;'</span><span style="color: #339933;">;</span>
            <span style="color: #000088;">$item_output</span> <span style="color: #339933;">.=</span> <span style="color: #000088;">$args</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">after</span><span style="color: #339933;">;</span>
&nbsp;
            <span style="color: #000088;">$output</span> <span style="color: #339933;">.=</span> apply_filters<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'walker_nav_menu_start_el'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$item_output</span><span style="color: #339933;">,</span> <span style="color: #000088;">$item</span><span style="color: #339933;">,</span> <span style="color: #000088;">$depth</span><span style="color: #339933;">,</span> <span style="color: #000088;">$args</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #339933;">&lt;/</span>li<span style="color: #339933;">&gt;</span></pre></td></tr></table></div>

<p>这个 filter 只是在 WordPress 默认的 walker 脚本的基础上修改了一些内容（原代码在 wp-includes/nav-menu-template.php），并且只为顶级菜单项添加描述。</p>
<p>最后一步，我们只需在调用菜单的时候告诉 WordPress：“调用这个菜单的时候使用我自己的 walker 脚本”，WordPress 就会自动生成你所需要的结构的菜单了。在调用菜单是，我们这样写：</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">wp_nav_menu<span style="color: #009900;">&#40;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
	<span style="color: #0000ff;">'container'</span> <span style="color: #339933;">=&gt;</span>false<span style="color: #339933;">,</span>
	<span style="color: #0000ff;">'menu_class'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'nav'</span><span style="color: #339933;">,</span>
	<span style="color: #0000ff;">'echo'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">,</span>
	<span style="color: #0000ff;">'before'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span>
	<span style="color: #0000ff;">'after'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span>
	<span style="color: #0000ff;">'link_before'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span>
	<span style="color: #0000ff;">'link_after'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span>
	<span style="color: #0000ff;">'depth'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span>
	<span style="color: #0000ff;">'walker'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000000; font-weight: bold;">new</span> description_walker<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>要令菜单更好看的话，我们只需要编写自己喜欢的 CSS 样式即可。</p>
<p  class="related_post_title">Related Posts</p><ul class="related_post"><li><a href="http://blog.imbolo.com/customizing-the-new-wordpress-3-0-custom-menus-adding-different-icons-to-each-link/" title="为 WordPress 3.0 的自定义菜单链接添加栏目图标">为 WordPress 3.0 的自定义菜单链接添加栏目图标</a></li><li><a href="http://blog.imbolo.com/inpad/" title="主题发布：Inpad">主题发布：Inpad</a></li><li><a href="http://blog.imbolo.com/custom-gravatar/" title="自定义默认Gravatar头像">自定义默认Gravatar头像</a></li><li><a href="http://blog.imbolo.com/show-the-date-of-each-post/" title="显示每篇文章的日期">显示每篇文章的日期</a></li><li><a href="http://blog.imbolo.com/ajax-posting-comments/" title="为主题添加AJAX提交评论功能">为主题添加AJAX提交评论功能</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://blog.imbolo.com/improve-wordpress-navigation-menu-output/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>在 WordPress 后台查看 FeedBurner 数据</title>
		<link>http://blog.imbolo.com/access-your-feedburner-stats-from-wordpress-dashboard/</link>
		<comments>http://blog.imbolo.com/access-your-feedburner-stats-from-wordpress-dashboard/#comments</comments>
		<pubDate>Thu, 03 Jun 2010 16:53:15 +0000</pubDate>
		<dc:creator>bolo</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Feed]]></category>
		<category><![CDATA[Plugins]]></category>

		<guid isPermaLink="false">http://blog.imbolo.com/?p=1876</guid>
		<description><![CDATA[为了管理和统计的方便，很多人会使用 FeedBurner 来烧录博客的 Feed ，今天介绍一款插件，可以在 WordPress 的后台查看自己的 FeedBurner 统计数据。]]></description>
			<content:encoded><![CDATA[<p>为了管理和统计的方便，很多人会使用 FeedBurner 来烧录博客的 Feed ，今天介绍一款插件，可以在 WordPress 的后台查看自己的 FeedBurner 统计数据。</p>
<h3>打开“Awareness API”</h3>
<p>首先要做的是在 FeedBurner 里打开 Feed 的 Awareness API，否则任何人都无法通过其他途径获取你的 Feed 统计数据。在 FeedBurener 的 My Feeds 页面选择博客的 Feed ，在 Publicize 选项卡里打开 Awareness API 选项，点击 Activate 即可打开 Awareness API 功能，非常简单。<span id="more-1876"></span></p>
<p><img src="http://i1001.photobucket.com/albums/af131/bolo1988/1-2.png" alt="开启 FeedBurner Awareness API" /></p>
<h2>安装和配置 <a href="http://www.speedbreeze.com/feed-stats/" rel="nofollow">Feed Stats for WordPress</a> 插件</h2>
<p>这个插件可以在官方插件目录找到，安装并激活以后在后台的 Setting（设置） -> Feed Stats 页面里进行设置。只需在 FeedBurner Feed URL 里填写 FeedBurner 提供的 Feed 地址，点解 Test 提示 <strong>This feed is valid.</strong> 即为成功。</p>
<p><img src="http://i1001.photobucket.com/albums/af131/bolo1988/2-2.png" alt="配置 Feed Stats for WordPress 插件" /></p>
<p>完成配置后你马上就可以在 Dashbroad -> Feed Stats 里查看 Feed 的统计数据了，非常详细。</p>
<p><img src="http://i1001.photobucket.com/albums/af131/bolo1988/3-2.png" alt="在 WordPress 后台查看 FeedBurner 数据" /></p>
<h3>几个重要的细节</h3>
<ul>
<li>统计数据仅在你打开 Feed Stats 页面是才会从 FeedBurner 获取，插件不会一直进行连接</li>
<li>插件默认只获取最近十天的数据</li>
</ul>
<p  class="related_post_title">Related Posts</p><ul class="related_post"><li><a href="http://blog.imbolo.com/wordpress-seo-tips/" title="WordPress SEO 技巧：内链优化">WordPress SEO 技巧：内链优化</a></li><li><a href="http://blog.imbolo.com/wp-plugin-author-list-plus/" title="适合多人博客的作者列表插件：Author-List-Plus">适合多人博客的作者列表插件：Author-List-Plus</a></li><li><a href="http://blog.imbolo.com/wordpress-plugin-ibegin-share-mod/" title="WordPress 分享插件：iBegin Share (mod)">WordPress 分享插件：iBegin Share (mod)</a></li><li><a href="http://blog.imbolo.com/wordpress-microblog-plugin-wp-admin-microblog/" title="WordPress 微博插件： WP Admin Microblog">WordPress 微博插件： WP Admin Microblog</a></li><li><a href="http://blog.imbolo.com/diy-a-plugin/" title="做一个自己的插件">做一个自己的插件</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://blog.imbolo.com/access-your-feedburner-stats-from-wordpress-dashboard/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>为 WordPress 3.0 的自定义菜单链接添加栏目图标</title>
		<link>http://blog.imbolo.com/customizing-the-new-wordpress-3-0-custom-menus-adding-different-icons-to-each-link/</link>
		<comments>http://blog.imbolo.com/customizing-the-new-wordpress-3-0-custom-menus-adding-different-icons-to-each-link/#comments</comments>
		<pubDate>Tue, 25 May 2010 15:18:57 +0000</pubDate>
		<dc:creator>bolo</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Theme]]></category>

		<guid isPermaLink="false">http://blog.imbolo.com/?p=1854</guid>
		<description><![CDATA[WordPress 3.0 为了增强 CMS 功能，加入了自定义菜单的功能，除了定义菜单项目外，还可以菜单定义各个项目的 CSS Class。我们可以利用这个功能来为菜单项目添加一个个性图标。]]></description>
			<content:encoded><![CDATA[<p><img src="http://i1001.photobucket.com/albums/af131/bolo1988/custompagemenuitemicon.png" alt="WordPress 3.0 自定义菜单栏目图标" /></p>
<p>WordPress 3.0 为了增强 CMS 功能，加入了自定义菜单的功能，除了定义菜单项目外，还可以菜单定义各个项目的 CSS Class。我们可以利用这个功能来为菜单项目添加一个个性图标。</p>
<p>在 WordPress 3.0 的 Appearance（外观）-> Menus（菜单）面板里我们可以看到自定义菜单的设置，首先点击“Creat Menu”，再在左栏勾选需要的菜单项目后点击“Add to Menu”可以把勾选的项目添加到刚才建立的自定义菜单里。这是展开菜单项可以看到相关项目的参数。<span id="more-1854"></span></p>
<p><img src="http://i1001.photobucket.com/albums/af131/bolo1988/Captura-de-pantalla-2010-05-24-a-la.png" alt="默认自定义菜单项目参数" /></p>
<p>默认情况下能修改的参数很少，这时点击屏幕左上角的“Screen Options（屏幕参数）”，把“Show advanced menu properties（显示高级菜单属性）”里的项目全部勾选，我们就可以看到更多的参数。以本文题图为例，为各个项目分别加上 Home、Advertise、Contact、Archives 和 About 的 CSS Class，这样在前台调用菜单时，这些项目将拥有一个自定义的 CSS Class，接下来我们可以通过 CSS 为这些项目加上图标。</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
</pre></td><td class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#header</span> ul<span style="color: #6666ff;">.navigation</span> li a<span style="color: #6666ff;">.home</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">&quot;images/home.png&quot;</span><span style="color: #00AA00;">&#41;</span> <span style="color: #993333;">no-repeat</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">1px</span> <span style="color: #993333;">transparent</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#header</span> ul<span style="color: #6666ff;">.navigation</span> li a<span style="color: #6666ff;">.about</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">&quot;images/about.png&quot;</span><span style="color: #00AA00;">&#41;</span> <span style="color: #993333;">no-repeat</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">0px</span> <span style="color: #993333;">transparent</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#header</span> ul<span style="color: #6666ff;">.navigation</span> li a<span style="color: #6666ff;">.advertise</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">&quot;images/advertise.png&quot;</span><span style="color: #00AA00;">&#41;</span> <span style="color: #993333;">no-repeat</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">0px</span> <span style="color: #993333;">transparent</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#header</span> ul<span style="color: #6666ff;">.navigation</span> li a<span style="color: #6666ff;">.archive</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">&quot;images/archive.png&quot;</span><span style="color: #00AA00;">&#41;</span> <span style="color: #993333;">no-repeat</span> <span style="color: #933;">1px</span> <span style="color: #933;">2px</span> <span style="color: #993333;">transparent</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#header</span> ul<span style="color: #6666ff;">.navigation</span> li a<span style="color: #6666ff;">.contact</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">&quot;images/contact.png&quot;</span><span style="color: #00AA00;">&#41;</span> <span style="color: #993333;">no-repeat</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">3px</span> <span style="color: #993333;">transparent</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p>在 WordPress 3.0 之前的版本里，我们可以通过 JavaScript 等方法为菜单项目加上图标。原理是获取菜单项的 title 值，再为它加上一个和 title 值相同的 Class，在 jQuery 里可以这样写：</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'ul.navigation li a'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">addClass</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000066; font-weight: bold;">return</span> $<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'title'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p  class="related_post_title">Related Posts</p><ul class="related_post"><li><a href="http://blog.imbolo.com/improve-wordpress-navigation-menu-output/" title="为 WordPress 3.0 自定义菜单添加描述">为 WordPress 3.0 自定义菜单添加描述</a></li><li><a href="http://blog.imbolo.com/inpad/" title="主题发布：Inpad">主题发布：Inpad</a></li><li><a href="http://blog.imbolo.com/custom-gravatar/" title="自定义默认Gravatar头像">自定义默认Gravatar头像</a></li><li><a href="http://blog.imbolo.com/show-the-date-of-each-post/" title="显示每篇文章的日期">显示每篇文章的日期</a></li><li><a href="http://blog.imbolo.com/ajax-posting-comments/" title="为主题添加AJAX提交评论功能">为主题添加AJAX提交评论功能</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://blog.imbolo.com/customizing-the-new-wordpress-3-0-custom-menus-adding-different-icons-to-each-link/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>WordPress 在 more 截断处插入广告</title>
		<link>http://blog.imbolo.com/wordpress-insert-a-advertisement-at-the-more-tag/</link>
		<comments>http://blog.imbolo.com/wordpress-insert-a-advertisement-at-the-more-tag/#comments</comments>
		<pubDate>Thu, 20 May 2010 05:01:48 +0000</pubDate>
		<dc:creator>bolo</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Advertisment]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://blog.imbolo.com/?p=1847</guid>
		<description><![CDATA[在文章内插入的广告具有相当高的点击率。在 WordPress 里，我发现很多人利用 JavaScript 把广告插入到 more 截断标签处，作为内文广告。昨晚我也在内文里放了 Google Adsense，但我是用 WordPress 自带的 add_filter 函数实现的。]]></description>
			<content:encoded><![CDATA[<p>在文章内插入的广告具有相当高的点击率。在 WordPress 里，我发现很多人利用 JavaScript 把广告插入到 more 截断标签处，作为内文广告。昨晚我也在内文里放了 Google Adsense，但我是用 WordPress 自带的 add_filter 函数实现的。</p>
<p>打开主题的 function.php ，插入下面的代码：</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #009933; font-style: italic;">/**
 * The filter to insert the ads
 */</span>
<span style="color: #000000; font-weight: bold;">function</span> bl_insert_ad_code_filter<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$content</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$id</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">// 只在文章页面显示</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span>is_single<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #000088;">$content</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">// 首先插入广告代码</span>
	<span style="color: #000088;">$html</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'&lt;div class=&quot;single_ads&quot;&gt;你的广告代码&lt;/div&gt;'</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">// more 标签在 WordPress 2.3 前是一个 a 标签，2.3 后是一个 span 标签</span>
		<span style="color: #666666; font-style: italic;">// 保证兼容性</span>
		<span style="color: #b1b100;">return</span> <span style="color: #990000;">preg_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;#\《(a|span) id＼=<span style="color: #000099; font-weight: bold;">\&quot;</span>more-<span style="color: #006699; font-weight: bold;">$id</span><span style="color: #000099; font-weight: bold;">\&quot;</span>\》\《/<span style="color: #000099; font-weight: bold;">\\</span>1\》#&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$html</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;<span style="color: #006699; font-weight: bold;">$0</span>&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$content</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #666666; font-style: italic;">//因为 wp-syntax 插件的问题，请把上一句代码中的书名号替换成“&lt; ”和“&gt;”，“＼”换成“\”</span>
&nbsp;
	<span style="color: #b1b100;">return</span> <span style="color: #000088;">$content</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'the_content'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'bl_insert_ad_code_filter'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">50</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>利用这个 filter 我们还可以在文章任意的地方插入广告，或者添加其他的应用，大家可以尽情发挥创意。<span id="more-1847"></span></p>
<p  class="related_post_title">Related Posts</p><ul class="related_post"><li><a href="http://blog.imbolo.com/whats-coming-in-wordpress-3-2/" title="WordPress 3.2 新亮点">WordPress 3.2 新亮点</a></li><li><a href="http://blog.imbolo.com/wordpress-3-2-the-plan-faster-lighter/" title="WordPress 3.2 将着重提高效率和程序轻量化">WordPress 3.2 将着重提高效率和程序轻量化</a></li><li><a href="http://blog.imbolo.com/wp-plugin-author-list-plus/" title="适合多人博客的作者列表插件：Author-List-Plus">适合多人博客的作者列表插件：Author-List-Plus</a></li><li><a href="http://blog.imbolo.com/improve-wordpress-navigation-menu-output/" title="为 WordPress 3.0 自定义菜单添加描述">为 WordPress 3.0 自定义菜单添加描述</a></li><li><a href="http://blog.imbolo.com/customizing-the-new-wordpress-3-0-custom-menus-adding-different-icons-to-each-link/" title="为 WordPress 3.0 的自定义菜单链接添加栏目图标">为 WordPress 3.0 的自定义菜单链接添加栏目图标</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://blog.imbolo.com/wordpress-insert-a-advertisement-at-the-more-tag/feed/</wfw:commentRss>
		<slash:comments>39</slash:comments>
		</item>
		<item>
		<title>WordPress 高级设置技巧</title>
		<link>http://blog.imbolo.com/wordpress-advance-setting-tips/</link>
		<comments>http://blog.imbolo.com/wordpress-advance-setting-tips/#comments</comments>
		<pubDate>Thu, 29 Apr 2010 15:16:29 +0000</pubDate>
		<dc:creator>bolo</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://blog.imbolo.com/?p=1825</guid>
		<description><![CDATA[WordPress 在编写和修改文章是默认会每隔 60 秒自动保存一次，并且生成一个修订存档，这个设置未必适合每一个人，但后台并没有提供相关的设置。我们可以修改 wp-config.php 里的参数来进行设置。]]></description>
			<content:encoded><![CDATA[<p>WordPress 在编写和修改文章是默认会每隔 60 秒自动保存一次，并且生成一个修订存档，这个设置未必适合每一个人，但后台并没有提供相关的设置。我们可以修改 wp-config.php 里的参数来进行设置。</p>
<h3>修改自动保存间隔时间</h3>
<p>打开 WordPress 根目录里的 wp-config.php(2.9版本在 wp-settings.php 里)，找到以下的代码：</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'AUTOSAVE_INTERVAL'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">60</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>这个常量是 WordPress 自动保存的间隔时间，把 60 修改成你想要的秒数即可。<span id="more-1825"></span></p>
<h3>关闭生成修订版功能</h3>
<p>继续查找以下代码：</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$default_constants</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'WP_POST_REVISIONS'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">true</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// 如果没有这句的话则查找</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'WP_POST_REVISIONS'</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>把 true 改为 false 可以关闭生成修订版本的功能，节省数据库容量 (这个值也可以设置为大于 0 的整数，表示允许生成修订版的最大数量)。 另外，在 WordPress 2.9 以前，还可以查找 <strong>define(&#8216;WP_POST_REVISIONS&#8217;, 3);</strong> 修改 <strong>3</strong> 为修订版的最大数量。</p>
<h3>清空回收站的时间间隔 (2.9)</h3>
<p>WordPress 2.9 里加入了一个回收站功能（Trash），可以把不需要的条目放到回收站里，WordPress 默认每 30 天清空一次回收站。如果你要修改这个间隔的话，可以在 wp-settings.php 里查找以下代码：</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'EMPTY_TRASH_DAYS'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">30</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>把 30 修改成你喜欢的天数即可。</p>
<h3>强制使用 SSL 加密登录</h3>
<p>为了增强网站安全性，有很多人都购买了带 SSL 加密的主机。WordPress 从 2.6 开始支持使用 SSL 地址登录后台。查找以下代码：</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'FORCE_SSL_ADMIN'</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>把 false 修改成 true 可以让管理员使用 SSL 加密协议登录。继续查找以下代码：</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'FORCE_SSL_LOGIN'</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>把 false 修改成 true 则可以让所有用户都使用 SSL 加密协议登录。</p>
<p  class="related_post_title">Related Posts</p><ul class="related_post"><li><a href="http://blog.imbolo.com/whats-coming-in-wordpress-3-2/" title="WordPress 3.2 新亮点">WordPress 3.2 新亮点</a></li><li><a href="http://blog.imbolo.com/wordpress-3-2-the-plan-faster-lighter/" title="WordPress 3.2 将着重提高效率和程序轻量化">WordPress 3.2 将着重提高效率和程序轻量化</a></li><li><a href="http://blog.imbolo.com/wp-plugin-author-list-plus/" title="适合多人博客的作者列表插件：Author-List-Plus">适合多人博客的作者列表插件：Author-List-Plus</a></li><li><a href="http://blog.imbolo.com/improve-wordpress-navigation-menu-output/" title="为 WordPress 3.0 自定义菜单添加描述">为 WordPress 3.0 自定义菜单添加描述</a></li><li><a href="http://blog.imbolo.com/customizing-the-new-wordpress-3-0-custom-menus-adding-different-icons-to-each-link/" title="为 WordPress 3.0 的自定义菜单链接添加栏目图标">为 WordPress 3.0 的自定义菜单链接添加栏目图标</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://blog.imbolo.com/wordpress-advance-setting-tips/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>WordPress 分享插件：iBegin Share (mod)</title>
		<link>http://blog.imbolo.com/wordpress-plugin-ibegin-share-mod/</link>
		<comments>http://blog.imbolo.com/wordpress-plugin-ibegin-share-mod/#comments</comments>
		<pubDate>Wed, 21 Apr 2010 11:46:12 +0000</pubDate>
		<dc:creator>bolo</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Plugins]]></category>

		<guid isPermaLink="false">http://blog.imbolo.com/?p=1801</guid>
		<description><![CDATA[WordPress 分享插件：iBegin Share (修改版)]]></description>
			<content:encoded><![CDATA[<p><img src="http://i1001.photobucket.com/albums/af131/bolo1988/wordpresspluginiBeginShare.png" alt="WordPress 分享插件：iBegin Share (修改版)" /></p>
<p>因为网络上提供的网址分享插件都没有一个能完全符合我的要求的，所以我曾经想自己做一个分享插件。但得益于 WordPress 繁多的插件，我找到了 <a href="http://wordpress.org/extend/plugins/ibegin-share/" rel="external">iBegin Share</a> 这个插件（在官网下载的插件无法正常运行，因此我制作了一个修改版），它已经满足了我大部分的要求。<span id="more-1801"></span></p>
<h3>特点：</h3>
<ul>
<li>可以自由定义自己喜欢的分享服务</li>
<li>可以对文章被分享的次数进行统计</li>
<li>加载的脚本比较小</li>
<li>不依赖第三方网站运行（提供分享服务的网站除外）</li>
<li>除了分享到其他网络以外，还可以把页面转换成 PDF 或 Word 文档保存到本地</li>
</ul>
<h3>如何使用</h3>
<p>iBegin Share 提供了两种调用方式，他们之间的区别是一种用图片来表示分享按钮，另一种是通过文本方式表示分享按钮。我们可以在模板里通过以下代码调用分享按钮。</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span> ?php <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span> <span style="color: #990000;">function_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'iBeginShare_TextLink'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
	<span style="color: #339933;">&lt;</span>span id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;share-tool&quot;</span><span style="color: #339933;">&gt;</span>
		<span style="color: #339933;">&lt;</span> ?php iBeginShare_TextLink<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> <span style="color: #666666; font-style: italic;">//通过文本方式表示分享按钮</span>
		<span style="color: #666666; font-style: italic;">// 或者</span>
		<span style="color: #339933;">&lt;</span> ?php iBeginShare_Button<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> <span style="color: #666666; font-style: italic;">//通过图片方式表示分享按钮</span>
	<span style="color: #339933;">&lt;/</span>span<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span> ?php <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>两种按钮的效果大家可以自己安装插件测试一下。</p>
<h3>修改版</h3>
<p>由于插件作者在编写插件时写错了一个变量的值，因此大家在官方插件目录里下载的插件是无法运行的。我自己制作了一个修改版，修正了作者的错误，并且用一些国内常用的分享服务代替了一些国外服务。效果如本文配图，国内服务在第一行，国外服务在第二行。大家可以点<a href="http://cantonbolo.googlecode.com/files/ibegin-share.zip">这里下载</a>我修改的版本。</p>
<p  class="related_post_title">Related Posts</p><ul class="related_post"><li><a href="http://blog.imbolo.com/wp-plugin-author-list-plus/" title="适合多人博客的作者列表插件：Author-List-Plus">适合多人博客的作者列表插件：Author-List-Plus</a></li><li><a href="http://blog.imbolo.com/diy-a-plugin/" title="做一个自己的插件">做一个自己的插件</a></li><li><a href="http://blog.imbolo.com/wordpress-plugin-admin-post-navigation/" title="插件推荐：Admin Post Navigation">插件推荐：Admin Post Navigation</a></li><li><a href="http://blog.imbolo.com/overlay4wp/" title="WordPress相册插件：Overlay4WP">WordPress相册插件：Overlay4WP</a></li><li><a href="http://blog.imbolo.com/whats-coming-in-wordpress-3-2/" title="WordPress 3.2 新亮点">WordPress 3.2 新亮点</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://blog.imbolo.com/wordpress-plugin-ibegin-share-mod/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
	</channel>
</rss>

