Hello @andypp,
You can disallow users to edit post from wp-admin > User Frontend > Settings > Dashboard > User can edit posts.
Thanks
Thread Starter
andypp
(@andypp)
Sorry I didn’t make myself clear. I do want users to be able to edit posts while in pending mode, but once post has been published I don’t want them to be able to edit anymore.
Hi @andypp,
Currently we don’t have any kind of feature like that to disable editing published post as post authors should be able to update posts all time.
But for your specific case I can provide a workaround.
On this file : /wp-content/plugins/wp-user-frontend/class/frontend-form-post.php
On line 220 add this code :
if ( $curpost->post_status == 'publish') {
return '<div class="wpuf-info">' . __( 'You can\'t edit a post while published.', 'wpuf' );
}
This should do the trick for you. Let me know how this goes.
** And please save a copy of this file as this will be replaced while you update the plugin. But to get rid of this hassle we will add a filter hook on next release.
Thanks
Thread Starter
andypp
(@andypp)
It works perfectly, thanks a lot!
-
This reply was modified 8 years, 2 months ago by
andypp.
@andypp,
You are always welcome. Let us know if you need further help. You can always inspire us by letting us know your thoughts/review about our plugin which will help us to do more.
Thanks