<?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>Star life &#187; google adsense</title>
	<atom:link href="http://liuchangjun.com/tag/google-adsense/feed/" rel="self" type="application/rss+xml" />
	<link>http://liuchangjun.com</link>
	<description>无欲速 无见小利 欲速则不达 见小利则大事不成</description>
	<lastBuildDate>Wed, 13 Jul 2011 15:00:25 +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>制作了一个Google Adsense插件，copy from e-xia.com</title>
		<link>http://liuchangjun.com/2009/08/28/google-adsense-for-wordpress-plugins/</link>
		<comments>http://liuchangjun.com/2009/08/28/google-adsense-for-wordpress-plugins/#comments</comments>
		<pubDate>Fri, 28 Aug 2009 05:23:32 +0000</pubDate>
		<dc:creator>star</dc:creator>
				<category><![CDATA[BLOG]]></category>
		<category><![CDATA[google adsense]]></category>
		<category><![CDATA[wordpress plugin]]></category>

		<guid isPermaLink="false">http://liuchangjun.com/?p=145</guid>
		<description><![CDATA[<p>昨天成功申请了Google Adsense帐户，网上找了一下相关的wordpress插件，根据轶侠的文章做了一个简单插件，据说要30年才能达到Google $100的标准 O(∩_∩)O~</p> <p>原文在这里：给WP加上Google广告代码</p> &#60;?php add_filter('the_content', 'google_ads'); function google_ads($content){ if(is_page()&#124;&#124;is_single()){ ob_start(); ?&#62; &#60;div class="google center"&#62; &#60;!--Google AdSense Code HERE--&#62; &#60;/div&#62; &#60;?php $content = ob_get_contents().$content; ob_end_clean(); } return $content; } ?&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>昨天成功申请了Google Adsense帐户，网上找了一下相关的wordpress插件，根据<a title="查看轶侠的所有文章" href="http://e-xia.com/author/yixiaadmin/">轶侠</a>的文章做了一个简单插件，据说要30年才能达到Google $100的标准 O(∩_∩)O~</p>
<p>原文在这里：<a href="http://e-xia.com/2009/02/add-google-adsense-to-wordpress/">给WP加上Google广告代码</a></p>
<div style="border: 1px solid #cccccc; margin: 5px 0pt; padding: 15px 0pt; background: #fcffff none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous; overflow-x: auto; overflow-y: hidden;">
<pre style="margin: 0pt 10px; font-family: 'Courier New',Courier,Fixed;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
add_filter<span style="color: #009900;">(</span><span style="color: #0000ff;">'the_content'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'google_ads'</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">function</span> google_ads<span style="color: #009900;">(</span><span style="color: #000033;">$content</span><span style="color: #009900;">)</span><span style="color: #009900;">{</span>
  <span style="color: #b1b100;">if</span><span style="color: #009900;">(</span>is_page<span style="color: #009900;">(</span><span style="color: #009900;">)</span><span style="color: #339933;">||</span>is_single<span style="color: #009900;">(</span><span style="color: #009900;">)</span><span style="color: #009900;">)</span><span style="color: #009900;">{</span>
    <span style="color: #990000;">ob_start</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span>
<span style="color: #339933;">&lt;</span>div <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">"google center"</span><span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;!--</span>Google AdSense Code HERE<span style="color: #339933;">--&gt;</span>
<span style="color: #339933;">&lt;/</span>div<span style="color: #339933;">&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;?php</span>
    <span style="color: #000033;">$content</span> <span style="color: #339933;">=</span> <span style="color: #990000;">ob_get_contents</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span><span style="color: #339933;">.</span><span style="color: #000033;">$content</span><span style="color: #339933;">;</span>
    <span style="color: #990000;">ob_end_clean</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">}</span>
  <span style="color: #b1b100;">return</span> <span style="color: #000033;">$content</span><span style="color: #339933;">;</span>
<span style="color: #009900;">}</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre>
</div>
]]></content:encoded>
			<wfw:commentRss>http://liuchangjun.com/2009/08/28/google-adsense-for-wordpress-plugins/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

