you can use 'wp_insert_post_data'
hook to check if the user is not an admin, and if the post status is allready “published” change it to “pending”:
add_filter('wp_insert_post_data','re_aprove');
function re_aprove($data , $postarr){
global $current_user;
get_currentuserinfo();
//check if current user is not admin
if (!current_user_can('manage_options')){
if ($data['post_status'] = "publish"){
$data['post_status'] = "pending";
}
}
return $data;
}
Related Posts:
- How to delete user roles?
- How can I disable the update notice for non-administrators?
- How to check user role?
- Best practices to handle multilpe roles and capabilities?
- Users can only save their draft once before saving for revision
- add_role() run only once?
- wp_update_user not updating
- How can I hide a category from Contributors in the edit/add new post screen?
- REST API, get user role?
- Is WordPress’ is_user_logged_in() secure?
- Associating an “author” with a custom taxonomy
- Allow user to Publish, but not Edit or Delete
- Email notification for editors only
- How do I properly format the user_role array?
- Custom Post Type’s Capabilities map_meta_cap issues
- Adding multiple user roles dynamically
- Author Role – Allow editing of Gallery images
- How do I allow anyone to edit a post — but not access dashboard
- What is the difference between “create_users” and “add_users” capabilities?
- Conditional Tags for Membership Levels when using Wishlist Member Plugin?
- Allow user to edit specific user with meta key using map_meta_cap
- How to remove sticky post capability for a specific user role?
- Let new user role to ‘edit_others_posts’ of other user role, not of its own type
- How to restrict access to specific pages on the back-end?
- User registration approval based on role selected
- add_menu_page() for more than one user role
- How do I turn off the Admin Bar for all Subscribers?
- Hide from specific role the top admin bar new button
- exclude roles from overview
- How do I remove the Other Roles field (from User Role Editor plugin) in wp-admin/user-new.php
- Can you set a role as author?
- How to allow user to edit post in wordpress
- wordpress editor role remove all but ‘menus’ in appearance menu
- Display user meta by different user role
- Conditional tag based on the role of author in author.php
- Custom user roles for access to specific parts of the site
- allow non logged in user to upload images in media library
- Assign a role to the user who registers on a form
- Subscriber (with read permissions) cannot view Private posts
- How can I add a custom role capability to use in a custom plugin?
- DISALLOW_FILE_EDIT constant being ignored
- How to change user role using hook
- Reset Roles (or undo role changes on theme change)
- Plugin creation – how to add user rights?
- User restricted only show posts assigned to current user
- Stop contributors from editing standard posts but allow them to edit a custom post type
- Give Editor Access to Custom Theme Options
- Authorize users for specific pages and/or categories
- create new user role for reader
- Woocommerce Wcvendors – duplicate emails when Vendor approved
- Hide Users by user role in Worpress
- Change user role of a particular user at specific time
- How to trigger an error: “You are not allowed to edit this post.”
- allowing subscriber role to delete their own posts
- Make a single page in WordPress available only for Admin and Subscribers
- Let users edit their role from the frontend
- Restrict access to a post once it is tagged as a given status
- List of users with email and role
- Subscription list function
- When using a user role editor how to find out any plugins’ or themes’ role?
- Require Capability to View Woocommerce Product
- Is there a capability/User role plugin that lets you specify edit ‘posts’ not ‘custom posts’? [duplicate]
- users in their Role can only their Posts
- How can I check if a visitor can read a post?
- Assigning a capability to a user role (code check)
- How to query users to count all with a custom capability and limit it to a set of roles?
- Adding a role using Members and Formidable Forms [closed]
- Set role to a guest user, it’s possible?
- wp_update_user very slow
- On action, change user role
- User role and capablities only for 1 plugin
- Add a second role when registering programmatically
- WordPress hide any html element by css when user-role
- What would cause wp_insert_user role to work sporadically?
- How can I add capability to multiple roles?
- After setting up a new Role, CPT and capabilities, the new role can’t see the featured image
- underscore not allowed in role slug?
- Custom Gutenberg Block and unfiltered_html capability
- Blank Screen Edit Page when using Editor Role
- Remove all video attachment, both files and post/postmeta from database?
- Can someone help me out? Why isn’t this working?
- dynamic home page according to role user
- Custom site role cannot access Appearance menu
- Set User Role based on age result from Facebook Log-In – WordPress
- Custom Role Allowing Things It Shouldn’t Be
- List users of specific role instead of removing them with specific role
- Frontend view of normal Visitor
- Custom Role accessing the wp-option table
- used code below to allow Editor access to menus – but change permanent, how do I revert?
- Disallow “contributors” to edit their own posts once they’ve been set to “Pending Review”
- Display based on specific user
- How can change 12000 user role into contributor by sql [duplicate]
- Is it possible to restrict a specific user to edit a specific custom post.
- Access to option page by role/capability
- Hide user fields based off capability
- Author capabilities: Deleting comments on their own published posts
- Set user role based on invitation code
- Security Issues with custom user role or changing core role capabilities?
- Get users by rôle in a list
- Role Scoper, don’t allow other users to see pending posts