WP-Members: Membership Framework
[resolved] [Plugin: WP-Members] "unblock" is true even when set to "false" or "0" (2 posts)

  1. CodeMonkey613
    Posted 3 years ago #

    I made an Advanced Custom Field entry for the 'unblock' field to easily switch between true/false. However, it doesn't matter what the setting is on the field (can be true, false, 0, 1) it always unblocks the post/page. I have to delete the custom variable altogether to make it block again.

    wp-members-core.php at line 338 doesn't make any sense. You would have to change it to something like this:

    $unblock_var = get_post_custom_values('unblock');

    if( WPMEM_BLOCK_POSTS == 1 && (!isset(unblock_var) || (isset($unblock_var) && ($unblock_var == "false" || $unblock_var == "0"))) ){ $block = true; }


  2. Chad Butler
    Plugin Author

    Posted 3 years ago #

    There is a legacy reason for the way it is the way it is. It will probably accept a false value in the future, but for now, to do what you are trying to do, you should be able to set the value to ''.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP-Members: Membership Framework
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.