Support » Plugin: Content Mirror » Is it possible to include posts with draft status in list?

  • Resolved Kathy_Goss


    Hi Klas,
    I have been successfully using your plugin for the past year on our multisite. I have an odd request. Currently only “published” posts are included in the list. I would like to setup the mirroring while the original post is still in draft. The reason for this is that I want to send out automated text alerts to our multisite subscribers when new posts are published. I need to get the posts copied prior to the main site status changes to “published” which triggers the text alerts. Unfortunately, unless it is in a published state it does not appear in my mirrored content list. Any suggestions?

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


    Hi Kathy,

    Per default only posts with status ‘published’ are visible in the the content mirror select dialog. If you want posts with status public, pending and draft to show up, please change the code in content-mirror.php line 355 to:

    $post_items = get_posts ( array ( 'post_type' => $posttype, 'posts_per_page' => -1, 'orderby' => 'title', 'order' => 'ASC', 'post_status' => array('publish', 'pending', 'draft') ));

    You can use any of the following post status in the list at the end of that row:

    ‘publish’ – a published post or page.
    ‘pending’ – post is pending review.
    ‘draft’ – a post in draft status.
    ‘auto-draft’ – a newly created post, with no content.
    ‘future’ – a post to publish in the future.
    ‘private’ – not visible to users who are not logged in.
    ‘inherit’ – a revision. see get_children.
    ‘trash’ – post is in trash bin.
    ‘any’ – retrieves any status except those from post statuses with ‘exclude_from_search’ set to true (i.e. trash and auto-draft).

    Please let me know if it works as you wanted.

    You can download a modified plugin with the code change as above from here:


    Thanks Klas, yes it works and helps solve my problem.
    Best regards,

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Is it possible to include posts with draft status in list?’ is closed to new replies.