Support » Plugin: Share Drafts Publicly » Please add filter for post_status array

  • Resolved mvbaxter


    I have installed the plugin “Prepare New Version”. Like many workflow plugins, this has added its own status that is not in your normal list.

    It would be very useful if you added a filter so I can add non-Publish status to the array of those where “Share draft publicly” metabox should show.

    Perhaps something like:

    $draft_status = apply_filters(‘sdp_get_status_array’,array(‘draft’,’pending’,’auto-draft’,’future’));
    if ( in_array( $post_status, $draft_status) ){
    add_meta_box( ‘share_drafts_publicly’, esc_html__( ‘Share Drafts Publicly’, ‘share_drafts_publicly’ ), array( $this, ‘display_meta_box’ ), null, ‘side’, ‘low’ );
    }; // end if

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Travis Lopes


    Version 1.1.1 has been released which introduces a new filter, “sdp_allowed_post_status”, which allows for setting which post statuses will present the “Share Drafts Publicly” metabox.

    Wow, that was fast! Thank you very much.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.