• Resolved mvbaxter

    (@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
    `

    https://wordpress.org/plugins/share-drafts-publicly/

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

    (@travislopes)

    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.

    Thread Starter mvbaxter

    (@mvbaxter)

    Wow, that was fast! Thank you very much.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Please add filter for post_status array’ is closed to new replies.