Forums

[resolved] [plugin: WP Favorite Posts] Disallow Favoriting of Unpublished Posts? (5 posts)

  1. justbishop
    Member
    Posted 2 years ago #

    The title pretty much says it all, but to explain a bit more in depth, users can preview their own pending and draft posts and favorite them. Of course no one else would be able to see that person's favorite posts list, but it's causing unpublished posts to show up in the widget :/

    http://wordpress.org/extend/plugins/wp-favorite-posts/

  2. justbishop
    Member
    Posted 2 years ago #

    I might be onto something, but I need some PHP help!

    Would it be possible to use the is_preview conditional tag somehow to prevent the "mark as favorite" link from displaying when the post is viewed from preview mode? Here's the WP Favorite Posts code as it is:

    <?php if (function_exists('wpfp_link')) { wpfp_link(); } ?>

    I've been searching the forums for hours trying to chip away at this, and the closest I've come (per another thread) is:

    <?php if (is_preview() && (function_exists('wpfp_link')) { wpfp_link(); } ?>

    and

    <?php if (is_preview('false') && (function_exists('wpfp_link')) { wpfp_link(); } ?>

    Both of which return the error (the above code is on line 37):

    Parse error: syntax error, unexpected '{' in /home/*****/public_html/noise/wp-content/themes/fixed-blix/single.php on line 37

  3. justbishop
    Member
    Posted 2 years ago #

    Bug addressed by plugin author (thanks so much!) :D

  4. Huseyin Berberoglu
    Member
    Posted 2 years ago #

    You're welcome justin :)

  5. justbishop
    Member
    Posted 2 years ago #

    ashley ;)

Topic Closed

This topic has been closed to new replies.

About this Topic