Title: Draft status and shortcode patch
Last modified: August 31, 2016

---

# Draft status and shortcode patch

 *  Resolved [studio4](https://wordpress.org/support/users/studio4/)
 * (@studio4)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/draft-status-and-shortcode-patch/)
 * Hello,
 * Great plugin, thanks for all your hard work on this.
 * One problem we’ve encountered, however, is that blocks seem to ignore the post
   status i.e. draft and pending review bocks are still shown when using the shortcode.
   I believe the expectation is that they would behave as a normal post.
 * It’s a fairly simple fix;
 * insert the code below after line 270 in text-blocks.php:
    `if ( get_post_status(
   $id ) == 'publish' ) {` So the code should look like
 *     ```
       if( !$id ) return false;
       if ( get_post_status ( $id ) == 'publish' ) {
       ```
   
 * Then place an additional closing curly bracket } before the end of the function
   to close the conditional.
 * Hopefully this post should act as a quick fix for anyone else encountering the
   problem and also double as a patch for the developer when he has time to update
   the plugin.
 * [https://wordpress.org/plugins/reusable-text-blocks/](https://wordpress.org/plugins/reusable-text-blocks/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Hal Gatewood](https://wordpress.org/support/users/halgatewood/)
 * (@halgatewood)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/draft-status-and-shortcode-patch/#post-6917363)
 * This is great! I’ll add it to the next version that goes out.
    Thank you. Hal
 *  Plugin Author [Hal Gatewood](https://wordpress.org/support/users/halgatewood/)
 * (@halgatewood)
 * [10 years ago](https://wordpress.org/support/topic/draft-status-and-shortcode-patch/#post-6917477)
 * This was just added to version 1.5.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Draft status and shortcode patch’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/reusable-text-blocks_53c8f2.svg)
 * [Reusable Text Blocks](https://wordpress.org/plugins/reusable-text-blocks/)
 * [Support Threads](https://wordpress.org/support/plugin/reusable-text-blocks/)
 * [Active Topics](https://wordpress.org/support/plugin/reusable-text-blocks/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/reusable-text-blocks/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/reusable-text-blocks/reviews/)

## Tags

 * [bugfix](https://wordpress.org/support/topic-tag/bugfix/)
 * [Post-Status](https://wordpress.org/support/topic-tag/post-status/)

 * 2 replies
 * 2 participants
 * Last reply from: [Hal Gatewood](https://wordpress.org/support/users/halgatewood/)
 * Last activity: [10 years ago](https://wordpress.org/support/topic/draft-status-and-shortcode-patch/#post-6917477)
 * Status: resolved