Home Forums Plugin Support WP User Frontend Pro Front-end Editing

This topic is: resolved

This topic contains 5 replies, has 3 voices, and was last updated by  DeanT765 5 years, 8 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #6349

    DeanT765
    Participant
    Post count: 14

    I've been trying to set my installation of WPUF to have a post stay the same status it was prior to editing instead of publishing live automatically. Could you point me in the right direction on that?

    #6358

    Mahi
    Member
    Post count: 1555

    When you create form there is a tab – “Post Setting”

    Under that tab you should be able to set post status.

    #6360

    Tareq Hasan
    Keymaster
    Post count: 2831

    @deant765, the situation you are in, I understand that. But the problem is, it conflicts with the post editing post status feature. As it's selected to “publish”, when a user edits his post, it publishes the post automatically. If you don't want to let him edit the post while it's in pending mode, the solution would removing the edit link while pending. Thus it requires some editing in the dashboard.

    #6362

    DeanT765
    Participant
    Post count: 14

    There would be a conflict, but for this particular installation of mine that would be fine. I tried to find where the post status is set in frontend-form-post.php but I didn't have any luck even when I thought I found it.

    I tried changing line 237 to

    $postarr['post_status'] = get_post_status($post_id);

    but that didn't do the trick. Is there an alternate line I'm missing?

    #6368

    Tareq Hasan
    Keymaster
    Post count: 2831

    You should put the status into this:

    [php]
    // if post_id is passed, we update the post
    if ( isset( $_POST[‘post_id'] ) ) {
    $is_update = true;
    $postarr[‘ID'] = $_POST[‘post_id'];
    $postarr[‘post_date'] = $_POST[‘post_date'];
    $postarr[‘comment_status'] = $_POST[‘comment_status'];
    $postarr[‘post_author'] = $_POST[‘post_author'];
    }
    [/php]

    #6375

    DeanT765
    Participant
    Post count: 14

    Yup that did the trick once I changed the line of code to $postarr['post_status'] = get_post_status($postarr['ID']);

    Thanks again

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

The topic ‘Front-end Editing’ is closed to new replies.