schtifin
Forum Replies Created
-
Just an FYI…
As a temporary solution, I installed the Adminimize plugin and removed the “Publish” button from the main edit/write post page. This prevents a user from being able to publish a post even though the user has publish_posts permissions. They can still select a custom status and save the post.
It’s probably not the best approach, but it works for now.
Forgive my ignorance, but the code snippet was in the WP functions file. How or where would I be able to see the var_dump info?
I tried a few different things like forcing new_status and old-status values, but I don’t believe I did that correctly. I also tried running wp_update_post after the new post was inserted, but that was a mistake.
I realize this is really outside the scope of edit-flow, so I do appreciate your help.
I believe this is the code you requested:
https://pastebin.com/aFkCsaXnIn this case, where would I place var_dump?
I ran a var_dump and the post_status information is being passed correctly. And naturally it shows up correctly when viewing the post in WP Admin Panel
Strange.
Yes on debugging. Everything appears to be working as expected.
I’ve tried a number of things and can’t seem to get this to work. I can only assume that when a new post is created using the web form, the status never changes from “draft” to the post status I am passing in wp_insert_post(). If I create a post manually and save it, I get the notification.
Any ideas on how I can force the notification or setup some kind of condition that would be met when using wp_insert_post()?
Thanks.
Status change notifications are working great, but I ran into an issue and wanted to get some insight from the experts.
I’m using wp_insert_post to automatically create new posts from a web form. I have configured it so that a specific custom status is assigned to these new posts. However, no notification is sent when the new post is created, I assume because the status technically has not been changed – it’s just getting a default status from wp_insert_post.
Is there a function or setting that enables sending a notification when a new post is created, perhaps with a specific custom status?
Forum: Plugins
In reply to: [Plugin: Edit Flow] Custom Post StatusHi Daniel,
I posted to the other forum topic. I think the second of your two suggestions would work great!
Thanks.
Hello Daniel,
I echo what pnews’ thoughts on the second of your two suggestions. For my needs, allowing them to select a post status from a drop-down and save it (remove the submit button) would work great for me.
Thanks.