WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Making Custom Status Public

[Resolved] Making Custom Status Public

  • Hello, I am having some problems with the recent update. I had the following code in place to make my custom status public, however, with the new update this is causing major site problems

    function alt_post_status() {
     global $post;
        global $wp_post_statuses;
        $wp_post_statuses['holding']->public = true;
    }
    add_action( 'init', 'alt_post_status' );

    I get an error inside of wp-admin/includes/class-wp-posts-list-table.php on line 149 when I put it in now. And all of the post lists in the admin area don’t appear. Any ideas? Or maybe is there a way to put in the old version for now? or different code to make my posts public?

    Thanks for your time

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Daniel Bachhuber
    Participant

    @danielbachhuber

    Additional “public” statuses aren’t yet fully supported in core, which is probably why you’re seeing problems. I would instead filter or add the ‘holding’ status to your queries.

    Thanks for the quick reply. I was able to patch the problem by adding this line:

    , 'public' => true

    On line 245 of the file plugins/edit-flow/modules/custom-status.php solved the problem. Obviously this isn’t ideal because it is going to be overwritten with every update. Any chance of adding a radio toggle to the admin screen with the next update?

    Yaron Guez
    Participant

    @yguez

    ktrusak, changing that line of code totally solved the problem I was having here:
    http://wordpress.org/support/topic/how-to-get-custom-statuses-to-show-up-in-the-archive

    Thanks so much!

    Daniel, is it possible to add this public functionality to the plugin in the next release?

    Yaron Guez
    Participant

    @yguez

    Found typos in my code. It works now. Though having the option to make statuses public would still be very useful.

    Plugin Author Daniel Bachhuber
    Participant

    @danielbachhuber

    The ability to make statuses public probably isn’t on the roadmap for Edit Flow, at least until core finishes custom status support.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Resolved] Making Custom Status Public’ is closed to new replies.