<?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>Comments on: Change published to pending after update</title>
	<atom:link href="http://shinephp.com/change-published-to-pending/feed/" rel="self" type="application/rss+xml" />
	<link>http://shinephp.com/change-published-to-pending/</link>
	<description>WordPress, PHP, MySQL, general WEB development hints, reviews, plugins, news...</description>
	<lastBuildDate>Sat, 08 Jun 2013 23:58:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: Vladimir Garagulya</title>
		<link>http://shinephp.com/change-published-to-pending/comment-page-1/#comment-2437</link>
		<dc:creator>Vladimir Garagulya</dc:creator>
		<pubDate>Tue, 23 Apr 2013 00:45:00 +0000</pubDate>
		<guid isPermaLink="false">http://shinephp.com/?p=2303#comment-2437</guid>
		<description><![CDATA[Hi,
There is no way to achieve this without a lot of PHP/WordPress API coding. It is a subject of separate WP plugin development. I can imagine this as user with custom role for such plugin without &#039;edit_others_posts&#039; capability get list of posts via plugin, selects one, edits its copy and sends for review. Administrator, or supervisor, defined by plugin, get notice about pending posts updates. Thus real post could be replaced updated one only after Admin moderate it.]]></description>
		<content:encoded><![CDATA[<p>Hi,<br />
There is no way to achieve this without a lot of PHP/WordPress API coding. It is a subject of separate WP plugin development. I can imagine this as user with custom role for such plugin without &#8216;edit_others_posts&#8217; capability get list of posts via plugin, selects one, edits its copy and sends for review. Administrator, or supervisor, defined by plugin, get notice about pending posts updates. Thus real post could be replaced updated one only after Admin moderate it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jpfotoz</title>
		<link>http://shinephp.com/change-published-to-pending/comment-page-1/#comment-2436</link>
		<dc:creator>jpfotoz</dc:creator>
		<pubDate>Mon, 22 Apr 2013 13:32:00 +0000</pubDate>
		<guid isPermaLink="false">http://shinephp.com/?p=2303#comment-2436</guid>
		<description><![CDATA[Hi Vladimir,

That did work... BUT - the posted article now becomes in a preview mode -- and thus the page throws a &quot;page not found&quot; error.  any SEO to that page now is invalid.  Is there any way to have it keep the original version as visible and submit some sort of preview for review.  Once that is approved, the new version can replace the old version?  I&#039;m trying to manage a team of editors that need to review / edit posts by former employees.  Thanks.]]></description>
		<content:encoded><![CDATA[<p>Hi Vladimir,</p>
<p>That did work&#8230; BUT &#8211; the posted article now becomes in a preview mode &#8212; and thus the page throws a &#8220;page not found&#8221; error.  any SEO to that page now is invalid.  Is there any way to have it keep the original version as visible and submit some sort of preview for review.  Once that is approved, the new version can replace the old version?  I&#8217;m trying to manage a team of editors that need to review / edit posts by former employees.  Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vladimir Garagulya</title>
		<link>http://shinephp.com/change-published-to-pending/comment-page-1/#comment-2434</link>
		<dc:creator>Vladimir Garagulya</dc:creator>
		<pubDate>Sat, 20 Apr 2013 01:34:00 +0000</pubDate>
		<guid isPermaLink="false">http://shinephp.com/?p=2303#comment-2434</guid>
		<description><![CDATA[Hi,
problem could be that you inserted role name &quot;ConentWriter&quot; into code, but you should use role ID, that is lowercase &#039;conentwriter&#039;. Try it please. ]]></description>
		<content:encoded><![CDATA[<p>Hi,<br />
problem could be that you inserted role name &#8220;ConentWriter&#8221; into code, but you should use role ID, that is lowercase &#8216;conentwriter&#8217;. Try it please. </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jpfotoz</title>
		<link>http://shinephp.com/change-published-to-pending/comment-page-1/#comment-2433</link>
		<dc:creator>jpfotoz</dc:creator>
		<pubDate>Sat, 20 Apr 2013 00:14:00 +0000</pubDate>
		<guid isPermaLink="false">http://shinephp.com/?p=2303#comment-2433</guid>
		<description><![CDATA[Hi Vladimir. -- I tried your code and it also didn&#039;t work for me.

I
 placed it in my theme&#039;s function.php (it had some code already there so
 I added it at the end before the closing ?&gt; bracket )

I followed your steps - one exception my role is called &quot;ConentWriter&quot; - so I changed that value in your  sample code.

When I tested, the &#039;Update&quot; button present - and the page got published.  NOT what I was expecting.

I even made a /mu-plugins folder and place the php function inside as a filename.php

What did I do wrong?

Also Austin&#039;s code above is incomplete - there&#039;s an open { where  there seems like it should be a closing }.]]></description>
		<content:encoded><![CDATA[<p>Hi Vladimir. &#8212; I tried your code and it also didn&#8217;t work for me.</p>
<p>I<br />
 placed it in my theme&#8217;s function.php (it had some code already there so<br />
 I added it at the end before the closing ?&gt; bracket )</p>
<p>I followed your steps &#8211; one exception my role is called &#8220;ConentWriter&#8221; &#8211; so I changed that value in your  sample code.</p>
<p>When I tested, the &#8216;Update&#8221; button present &#8211; and the page got published.  NOT what I was expecting.</p>
<p>I even made a /mu-plugins folder and place the php function inside as a filename.php</p>
<p>What did I do wrong?</p>
<p>Also Austin&#8217;s code above is incomplete &#8211; there&#8217;s an open { where  there seems like it should be a closing }.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vladimir Garagulya</title>
		<link>http://shinephp.com/change-published-to-pending/comment-page-1/#comment-2428</link>
		<dc:creator>Vladimir Garagulya</dc:creator>
		<pubDate>Thu, 18 Apr 2013 12:34:00 +0000</pubDate>
		<guid isPermaLink="false">http://shinephp.com/?p=2303#comment-2428</guid>
		<description><![CDATA[According to screenshot you copied just part of Austin&#039;s code, which is visible on the page by default. The rest part will be shown, if you click on &quot;see more&quot; link at the bottom of code fragment. That&#039;s why you got error message.

I tested code above again at my test site with WordPress 3.5.1 installed. It works as expected. You may download ready to execute file from this link
http://shinephp.com/wp-content/downloads/wordpress/publish-to-pending.zip
This code expected role with name &#039;editor_without_publish&#039;. What I did step by step: 
1) Using User Role Editor plguin I created new role with name &#039;editor_without_publish&#039; as copy of the &#039;editor&#039; role;
2) excluded &#039;publish_posts&#039; and &#039;publish_pages&#039; capabilities from new created role &#039;editor_without_publish&#039;.
3) assigned role &#039;editor_without_publish&#039; to user I selected for testing.
4) opened for editing post from other user, changed its content and clicked &#039;Update&#039; button.

As the result updated post got state &#039;Pending Review&#039;.

1) You can place code from the file I mentioned into your functions.php file
2) You can create directory wp-content/mu-plugins and place that file into this directory. It will be executed automatically by WordPress as plugin. &#039;mu&#039; means &#039;must use&#039; here.]]></description>
		<content:encoded><![CDATA[<p>According to screenshot you copied just part of Austin&#8217;s code, which is visible on the page by default. The rest part will be shown, if you click on &#8220;see more&#8221; link at the bottom of code fragment. That&#8217;s why you got error message.</p>
<p>I tested code above again at my test site with WordPress 3.5.1 installed. It works as expected. You may download ready to execute file from this link<br />
<a href="http://shinephp.com/wp-content/downloads/wordpress/publish-to-pending.zip" rel="nofollow">http://shinephp.com/wp-content/downloads/wordpress/publish-to-pending.zip</a><br />
This code expected role with name &#8216;editor_without_publish&#8217;. What I did step by step:<br />
1) Using User Role Editor plguin I created new role with name &#8216;editor_without_publish&#8217; as copy of the &#8216;editor&#8217; role;<br />
2) excluded &#8216;publish_posts&#8217; and &#8216;publish_pages&#8217; capabilities from new created role &#8216;editor_without_publish&#8217;.<br />
3) assigned role &#8216;editor_without_publish&#8217; to user I selected for testing.<br />
4) opened for editing post from other user, changed its content and clicked &#8216;Update&#8217; button.</p>
<p>As the result updated post got state &#8216;Pending Review&#8217;.</p>
<p>1) You can place code from the file I mentioned into your functions.php file<br />
2) You can create directory wp-content/mu-plugins and place that file into this directory. It will be executed automatically by WordPress as plugin. &#8216;mu&#8217; means &#8216;must use&#8217; here.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
