WordPress.org

Ready to get started?Download WordPress

Forums

Edit Flow
[resolved] Custom Post Status and Gravity Forms (11 posts)

  1. Alex Vasquez
    Member
    Posted 1 year ago #

    I'm trying to work edit flow in my workflow for http://theurbandater.com. Just getting things in place, so far, so good.

    I have a content submission forms via the Gravity Forms plugin. When submitted it creates a post and I can assign a default status.

    The problem is that in Gravity Forms I can only choose draft, pending review, publish. The custom statuses generated by Edit Flow are not selectable. I'm not sure where the issue is, but I'm posting here and then on the other plugin vendor's site, too.

    http://wordpress.org/extend/plugins/edit-flow/

  2. Daniel Bachhuber
    Hand Built
    Plugin Author

    Posted 1 year ago #

    Gravity Forms probably has their own UI for post statuses. They'll need to add support for custom statuses.

  3. Alex Vasquez
    Member
    Posted 1 year ago #

    Daniel,
    Let's see if this helps. Here's what I got from Gravity Forms:

    The reason they are not selectable is because Edit Flow doesn't store those statuses in regular WordPress, but instead in their own function that Gravity Forms would have no idea about... You would have to find out how to access their statuses with PHP and then create a dropdown with those selections and then when the post is created, update the post status with the custom status selected. And you'd have to write similar PHP to access it in the backend as well.

    At least that's my assumption from a cursory glance.

    As I understand it, it appears that there's a disconnect on where each plugin stores/pulls post status info from.

    Thoughts?

  4. Daniel Bachhuber
    Hand Built
    Plugin Author

    Posted 1 year ago #

    Core's get_post_stati() should produce a list of all custom statuses.

  5. Daniel Bachhuber
    Hand Built
    Plugin Author

    Posted 1 year ago #

    Clarification: Edit Flow registers each custom status using core's (incomplete) custom status API, so if you use get_post_stati(), a list of all custom statuses should be produced.

  6. Alex Vasquez
    Member
    Posted 1 year ago #

    So, if Gravity Forms also used get_post_stati() then it would get WordPress's stati along with any other stati added by other plugins, such as Edit Flow. Correct?

  7. Alex Vasquez
    Member
    Posted 1 year ago #

    So you are correct, Gravity Forms gets the post stati elsewhere. This is the last response from Gravity Forms.

    You are right, Gravity Forms currently only supports the built-in post statuses. Using the get_post_stati() seems like a good idea and I will talk to the team and see if that is something we can include in the next version.

  8. Daniel Bachhuber
    Hand Built
    Plugin Author

    Posted 1 year ago #

    Cool, that sounds great. Custom statuses aren't fully supported in core, and thus probably why Gravity Forms isn't using them. If they switch over, it will be really useful to have them help put the functionality through the paces so we can finish up the core API.

  9. Alex Vasquez
    Member
    Posted 1 year ago #

    Just throwing this out there, Daniel. But it doesn't look like Gravity Forms will be using that method/function get_post_stati(). That probably doesn't matter to you or what you do, but I at least wanted to submit their reasoning behind it, perhaps it helps you and your team out.

    We looked into it, but decided not to implement it for two reasons.
    1- The get_post_stati() function returns all possible statuses and a lot of them don't really make sense to be an option when creating the post. They would confuse most users.
    2- WordPress doesn't use that function in the post edit screen. They actually hardcode a few post status (similar to how Gravity Form does).

    What we decided to do is include a Gravity Forms filter that will allow you do add post statuses to the list when needed. This filter will be available in GF 1.7

  10. Earthman Web & Media
    Member
    Posted 9 months ago #

    @digisavvy

    Alex said:

    What we decided to do is include a Gravity Forms filter that will allow you do add post statuses to the list when needed. This filter will be available in GF 1.7

    Hi Alex - that sounds great - Can you please link us to the documentation for using the filter you mention? I cannot find further details on this.

  11. Earthman Web & Media
    Member
    Posted 9 months ago #

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic