user controls - Wordpress - Allow a userclass to save a page as a draft - but not publish w/o admin approval -


I want to create a user class that can edit pages, and without having the ability to publish it, Can save them in the form. An administrator must publish the draft and publish the draft after publishing the draft.

This idea is similar to the TDO Mini Form, except that it will be done in the WordPress Admin Panel, there will be no form, and they want to be a registered user in a specific category.

Thank you!

Install, create a role for these users (or reuse the author's role) And do not give them publish_posts capabilities.

Here's one thing about how I get this case from one of my client sites:

update

To prevent publishing of edits, you will see the action transition_post_status You must hook in and look for changes This action tells you old and new post position and post id:

  add_action ('transition_post_status', 'my_watcher', 10, 3); Function my_watcher ($ new_status, $ old_status, $ postid) {// Get post content etc. $ Post = & amp; Get_post ($ postid); // Compare the content and / or situation, do something} In my case, it was overwhelming, plus we feared, users would feel very much patron. I have just made one to list all the changes for the editors, now users can see their edits live immediately, if necessary, editors cleaned things. works great. Users learn how to make good edits, which are not touched again, and the work of editors decreases from time to time. :) 

ยน Be aware: all text strings are in German, you may have to edit them. There was no time for I18n, sorry.


Comments