Hi,
With the V1 version of your plugin I had implemented some custom code to prevent emails of listing authors from being displayed to the public. Website visitors could only see email or phone contact info IF they were logged in. This is VERY important to us, so I would really appreciate knowing how to re-implement the same functionality in V2!
Also, I don’t see any options for visitors to contact listing authors via a form on the website – why did that option disappear, and how do I bring it back?
Thanks!
Previous code which was working fine on V1:
function _gdPB_hide_email_setup() {
if ( is_user_logged_in() ) {
return;
}
$fields = array();
$fields[] = 'geodir_email';
// ADD MORE FIELDS HERE
if ( ! empty( $fields ) ) {
foreach ( $fields as $field ) {
add_filter( 'geodir_show_' . $field, '_gdPB_hide_email', 10, 2 );
}
}
}
function _gdPB_hide_email( $html, $params ) {
if ( ! is_user_logged_in() ) {
$html = 'Log in to send message.</br>' ;
return $html;
}
}
add_filter( 'init', '_gdPB_hide_email_setup', 10 );