This topic contains 5 reply and 3 voices, and was last updated by DeanT765 6 years, 2 months ago
Viewing 5 Posts - 1 through 5 (of 5 total)
Author Posts
July 26, 2013 at 9:36 pm 6349
DeanT765 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?
July 27, 2013 at 1:17 am 6358
Mahi Mahi

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

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

July 27, 2013 at 1:38 am 6360
Tareq Hasan Tareq Hasan

@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.

July 27, 2013 at 2:11 am 6362
DeanT765 DeanT765

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?

July 27, 2013 at 5:02 am 6368
Tareq Hasan Tareq Hasan

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]

July 27, 2013 at 6:03 am 6375
DeanT765 DeanT765

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

Thanks again

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