Quantcast
Channel: WordPress › Support » Forum: Hacks - Recent Topics
Viewing all articles
Browse latest Browse all 8245

candybrie on "Change to Pending, but no revision"

$
0
0

So I have to make sure whatever edits are made by someone with x user role are automatically pending. They aren't allowed to publish, but have to be able to edit others published work.

I hooked onto wp_insert_post_data and added the below to change it to pending every time they make changes.

if ('academic_editor' == $role ){

			if(isset( $data['post_status'])) {
				$data['post_status']= 'pending';	//set published status to pending review
				$data['post_date'] = current_time('mysql');
				$data['post_date_gmt'] = get_gmt_from_date($post_date);
			}
		}

The problem is that, I am some how messing up the revision system. One of the main features we chose wordpress for was the compare revisions, so we definitely need that to work. Any insights on how to make the revisions work while making every post they edit change to pending?


Viewing all articles
Browse latest Browse all 8245

Trending Articles