• Resolved studio4

    (@studio4)


    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://www.ads-software.com/plugins/reusable-text-blocks/

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Draft status and shortcode patch’ is closed to new replies.