Prevent authors to publish posts in WordPress

If you have a wordpress site with many authors (users with the role: Author) and you want to edit/check their posts before publications, you can add this code to function.php or you can create your own plugin with the code in it:

prevent-authors

/**
* Prevent authors to Publish posts
* will be activated with the plugin activation
* or immedetely if you add the code in function.php
*/

function remove_author_publish_posts(){

	// $wp_roles is an instance of WP_Roles.
	global $wp_roles;
	$wp_roles->remove_cap( 'author', 'publish_posts' );
}

add_action( 'init', 'remove_author_publish_posts' );

All your Authors will see “Submit for Review” instead of “Publish” button:
submit-for-review

Leave a Reply