Support » Plugin: BP Member Reviews » Filter (Member Type)

  • Resolved Ward

    (@yward)


    I’ve wrote this code for my bp-custom to filter the reviews and show them only on member type “Page”.

    function review_fun($allow, $reviewer_id, $reviewed_id){
    global $bp;
    $profileid = bp_displayed_user_id();
    $profiletype = xprofile_get_field_data( 'Type', $profileid );
    if($profiletype == 'Page'){
        return true; 
    } else {
        return false
    }
    }
    add_filter( 'bp_members_reviews_review_allowed', 'review_fun', 10, 3 );

    However, the code returns white screen, can you please tell me what I’m going wrong? Thanks!

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Filter (Member Type)’ is closed to new replies.