<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
	
	>
<channel>
	<title>《wordpress发布文章时的Action事件》的评论</title>
	<atom:link href="http://blog.11034.org/2012-09/wordpress_post_actions.html/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.11034.org/2012-09/wordpress_post_actions.html</link>
	<description></description>
	<lastBuildDate>Mon, 26 Nov 2018 07:59:57 +0800</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.2.38</generator>
	<item>
		<title>作者：-Flyぁ梦-</title>
		<link>http://blog.11034.org/2012-09/wordpress_post_actions.html#comment-2448</link>
		<dc:creator><![CDATA[-Flyぁ梦-]]></dc:creator>
		<pubDate>Tue, 28 Apr 2015 14:08:38 +0000</pubDate>
		<guid isPermaLink="false">http://blog.stariy.org/?p=1322#comment-2448</guid>
		<description><![CDATA[不好意思，我并没有写过这方面的，wp的程序也好久没碰了...]]></description>
		<content:encoded><![CDATA[<p>不好意思，我并没有写过这方面的，wp的程序也好久没碰了&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：骆小驼</title>
		<link>http://blog.11034.org/2012-09/wordpress_post_actions.html#comment-2447</link>
		<dc:creator><![CDATA[骆小驼]]></dc:creator>
		<pubDate>Sat, 18 Apr 2015 06:42:06 +0000</pubDate>
		<guid isPermaLink="false">http://blog.stariy.org/?p=1322#comment-2447</guid>
		<description><![CDATA[请问

我想在文章新建和保存时，将提交的内容处理后，再提交上去；要怎么做呢

例如：

想把内容自己分页；

提交的内容是：$_POST[post_content]

处理好内容是：$img_post_content_new


那我保存时要怎么做呢




我尝试：

function is_dmz_auto_page( $post_id ) {
	
	if ( $parent_id = wp_is_post_revision( $post_id ) ) 
	$post_id = $parent_id;
	
	$content=$img_post_content_new=str_replace($search_array,$replace_array,$_POST[post_content]);
	
				$my_post = array();
				$my_post[&#039;ID&#039;] = $post_id;
				$my_post[&#039;post_content&#039;] =$content;
				wp_update_post($my_post );
				
	update_post_meta($post_id, &#039;dmz_img_nextpage&#039;, &#039;ok&#039;);

}
add_action( &#039;save_post&#039;, &#039;is_dmz_auto_page&#039; );


我这样写不行]]></description>
		<content:encoded><![CDATA[<p>请问</p>
<p>我想在文章新建和保存时，将提交的内容处理后，再提交上去；要怎么做呢</p>
<p>例如：</p>
<p>想把内容自己分页；</p>
<p>提交的内容是：$_POST[post_content]</p>
<p>处理好内容是：$img_post_content_new</p>
<p>那我保存时要怎么做呢</p>
<p>我尝试：</p>
<p>function is_dmz_auto_page( $post_id ) {</p>
<p>	if ( $parent_id = wp_is_post_revision( $post_id ) )<br />
	$post_id = $parent_id;</p>
<p>	$content=$img_post_content_new=str_replace($search_array,$replace_array,$_POST[post_content]);</p>
<p>				$my_post = array();<br />
				$my_post[&#8216;ID&#8217;] = $post_id;<br />
				$my_post[&#8216;post_content&#8217;] =$content;<br />
				wp_update_post($my_post );</p>
<p>	update_post_meta($post_id, &#8216;dmz_img_nextpage&#8217;, &#8216;ok&#8217;);</p>
<p>}<br />
add_action( &#8216;save_post&#8217;, &#8216;is_dmz_auto_page&#8217; );</p>
<p>我这样写不行</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：Leniy</title>
		<link>http://blog.11034.org/2012-09/wordpress_post_actions.html#comment-2245</link>
		<dc:creator><![CDATA[Leniy]]></dc:creator>
		<pubDate>Tue, 07 May 2013 03:27:48 +0000</pubDate>
		<guid isPermaLink="false">http://blog.stariy.org/?p=1322#comment-2245</guid>
		<description><![CDATA[&lt;a href=&quot;#comment-2244&quot; rel=&quot;nofollow&quot;&gt;@stariy &lt;/a&gt; 
权限判断。例如有些页面只有回复的权限没有新发布评论的权限]]></description>
		<content:encoded><![CDATA[<p><a href="#comment-2244" rel="nofollow">@stariy </a><br />
权限判断。例如有些页面只有回复的权限没有新发布评论的权限</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：stariy</title>
		<link>http://blog.11034.org/2012-09/wordpress_post_actions.html#comment-2244</link>
		<dc:creator><![CDATA[stariy]]></dc:creator>
		<pubDate>Mon, 06 May 2013 10:41:38 +0000</pubDate>
		<guid isPermaLink="false">http://blog.stariy.org/?p=1322#comment-2244</guid>
		<description><![CDATA[评论发表和批准的时候做什么事呢？发送邮件？]]></description>
		<content:encoded><![CDATA[<p>评论发表和批准的时候做什么事呢？发送邮件？</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：Leniy</title>
		<link>http://blog.11034.org/2012-09/wordpress_post_actions.html#comment-2241</link>
		<dc:creator><![CDATA[Leniy]]></dc:creator>
		<pubDate>Mon, 06 May 2013 04:24:23 +0000</pubDate>
		<guid isPermaLink="false">http://blog.stariy.org/?p=1322#comment-2241</guid>
		<description><![CDATA[我comment_unapproved_to_approved和comment_post用得最多]]></description>
		<content:encoded><![CDATA[<p>我comment_unapproved_to_approved和comment_post用得最多</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：stariy</title>
		<link>http://blog.11034.org/2012-09/wordpress_post_actions.html#comment-1928</link>
		<dc:creator><![CDATA[stariy]]></dc:creator>
		<pubDate>Sun, 25 Nov 2012 04:56:47 +0000</pubDate>
		<guid isPermaLink="false">http://blog.stariy.org/?p=1322#comment-1928</guid>
		<description><![CDATA[具体发邮件看看吧]]></description>
		<content:encoded><![CDATA[<p>具体发邮件看看吧</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：阿媚沙</title>
		<link>http://blog.11034.org/2012-09/wordpress_post_actions.html#comment-1926</link>
		<dc:creator><![CDATA[阿媚沙]]></dc:creator>
		<pubDate>Sat, 24 Nov 2012 00:43:27 +0000</pubDate>
		<guid isPermaLink="false">http://blog.stariy.org/?p=1322#comment-1926</guid>
		<description><![CDATA[请问你可以接受定做wordpress插件吗？如果可以，希望能和你合作一下。大致要求是一个项目管理插件，有任务的时候自动向团队成员发布提醒，某位成员完成了任务会自动发一个邮件提醒接下来怎么做，每个程序的要求等。这个流程我会写出来。我知道可以在现有的项目管理的插件基础上进行修改就是了。只是我对于php不太懂。期待回复。]]></description>
		<content:encoded><![CDATA[<p>请问你可以接受定做wordpress插件吗？如果可以，希望能和你合作一下。大致要求是一个项目管理插件，有任务的时候自动向团队成员发布提醒，某位成员完成了任务会自动发一个邮件提醒接下来怎么做，每个程序的要求等。这个流程我会写出来。我知道可以在现有的项目管理的插件基础上进行修改就是了。只是我对于php不太懂。期待回复。</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：stariy</title>
		<link>http://blog.11034.org/2012-09/wordpress_post_actions.html#comment-1821</link>
		<dc:creator><![CDATA[stariy]]></dc:creator>
		<pubDate>Fri, 28 Sep 2012 13:21:53 +0000</pubDate>
		<guid isPermaLink="false">http://blog.stariy.org/?p=1322#comment-1821</guid>
		<description><![CDATA[一个Linux也能一个人写得出来，看完wordpress源码自然也不是难事，只不过很少人会有那么长的空闲时间]]></description>
		<content:encoded><![CDATA[<p>一个Linux也能一个人写得出来，看完wordpress源码自然也不是难事，只不过很少人会有那么长的空闲时间</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：蓬勃主机</title>
		<link>http://blog.11034.org/2012-09/wordpress_post_actions.html#comment-1820</link>
		<dc:creator><![CDATA[蓬勃主机]]></dc:creator>
		<pubDate>Fri, 28 Sep 2012 05:48:35 +0000</pubDate>
		<guid isPermaLink="false">http://blog.stariy.org/?p=1322#comment-1820</guid>
		<description><![CDATA[wordpress的源码全部看明白那是多么大的工作量啊 不是把英文词典背会了你就会English的]]></description>
		<content:encoded><![CDATA[<p>wordpress的源码全部看明白那是多么大的工作量啊 不是把英文词典背会了你就会English的</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：stariy</title>
		<link>http://blog.11034.org/2012-09/wordpress_post_actions.html#comment-1818</link>
		<dc:creator><![CDATA[stariy]]></dc:creator>
		<pubDate>Thu, 27 Sep 2012 04:23:27 +0000</pubDate>
		<guid isPermaLink="false">http://blog.stariy.org/?p=1322#comment-1818</guid>
		<description><![CDATA[异步发送增加一次http请求应该算是增加了服务器负担，为的是减少用户访问时间。这和收录没有关系...]]></description>
		<content:encoded><![CDATA[<p>异步发送增加一次http请求应该算是增加了服务器负担，为的是减少用户访问时间。这和收录没有关系&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：luacloud</title>
		<link>http://blog.11034.org/2012-09/wordpress_post_actions.html#comment-1817</link>
		<dc:creator><![CDATA[luacloud]]></dc:creator>
		<pubDate>Thu, 27 Sep 2012 02:17:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.stariy.org/?p=1322#comment-1817</guid>
		<description><![CDATA[这样的异步方式倒是也不错，至少减少了服务器的负担，只是这样是不是对收录会有影响啊。]]></description>
		<content:encoded><![CDATA[<p>这样的异步方式倒是也不错，至少减少了服务器的负担，只是这样是不是对收录会有影响啊。</p>
]]></content:encoded>
	</item>
</channel>
</rss>
