WordPress.org

Support

Support » Plugins and Hacks » WP-Members: Membership Framework » [Resolved] [Plugin: WP-Members] "unblock" is true even when set to "false" or "0"

[Resolved] [Plugin: WP-Members] "unblock" is true even when set to "false" or "0"

  • 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; }

    http://wordpress.org/extend/plugins/wp-members/

Viewing 1 replies (of 1 total)
  • Plugin Author Chad Butler

    @cbutlerjr

    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 ”.

Viewing 1 replies (of 1 total)
  • The topic ‘[Resolved] [Plugin: WP-Members] "unblock" is true even when set to "false" or "0"’ is closed to new replies.
Skip to toolbar