Home Forums Plugin Support WP User Frontend Pro Disable post editing when post is in "publish/live" status?

This topic is: resolved

This topic contains 4 replies, has 2 voices, and was last updated by  paperweight 5 years, 6 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #10179

    paperweight
    Participant
    Post count: 122

    We currently have this option:

    Disable post editing while post in “pending” status

    It would be extremely beneficial to also add this function:

    Disable post editing when post is in “publish/live” status

    The reason: I want my users to ONLY edit posts if they have not submitted it. After they submit it, it should be in Draft status for the admin to approve it. So when it is submitted and when it is published, User should not have the ability to edit anything anymore.

    Is this possible to add? Ot is this possible to also have me tweak in the code now? Or, is this already available but I am not doing it correctly? ๐Ÿ˜‰

    #10199

    Tareq Hasan
    Keymaster
    Post count: 2831

    May be I helped you something like this before, with a different post status?

    Anyway, you need to change /class/frontend-dashboard.php in line 178 and add publish status.
    [php]if ( ( $post->post_status == ‘pending' || $post->post_status == ‘publish' ) && $disable_pending_edit == ‘on' ) { [/php]

    #10270

    paperweight
    Participant
    Post count: 122

    Right, however I have a problem with post_status=draft and post_status=pending. They both appear to do the same thing in this WPUF Pro plugin?

    For example, when a user makes a Post but wants to save a draft, what post_status is that saved?

    Then when that user submits the Post to the Admin but we want to save it in Draft format before it is published by Admin, what post_status is that?

    I am trying to show text if the user saved a draft, but then I wan tto show other text when the user submits the Post but the Post is not yet published. So that is my problem, and it seems like pending and draft do the same thing here but they should not. Am I correct or am I looking at this problem incorrectly? ๐Ÿ˜‰

    #10291

    Tareq Hasan
    Keymaster
    Post count: 2831

    For example, when a user makes a Post but wants to save a draft, what post_status is that saved?

    If the user clicks save as draft, it saves as draft. Once he hits the submit button, then it follows the forms post_status setting.

    Your problems are complex and I am not sure how to answer them :-/

    #12598

    paperweight
    Participant
    Post count: 122

    Thanks Tareq. I don't intend to pose difficult problems. ๐Ÿ™‚ We are trying to configure it around our needs. I think we figured this out now. Great plugin and great support~

Viewing 5 posts - 1 through 5 (of 5 total)

The topic ‘Disable post editing when post is in "publish/live" status?’ is closed to new replies.