ID; $is_sticky = get_user_meta( $user_id, $prefix . 'sticky', true ); $desciption = get_user_meta( $user_id, 'description', true ); $roles = opalestate_user_roles_by_user_id( $user_id ); if ( ! is_array( $roles ) ) { $roles = [ $roles ]; } $related = get_user_meta( $user_id, $prefix . 'related_id', true ); $trusted = false; if ( in_array( 'opalestate_agency', $roles ) || in_array( 'opalestate_agent', $roles ) ) { $post = get_post( $related ); $link = get_permalink( $related ); $author_name = $post->post_title; if ( $post->post_type == 'opalestate_agency' ) { $prefixs = OPALESTATE_AGENCY_PREFIX; $picture = OpalEstate_Agency::get_avatar_url( $post->ID , 'full' ); } else { $prefixs = OPALESTATE_AGENT_PREFIX; $picture = OpalEstate_Agent::get_avatar_url( $post->ID , 'full' ); } $trusted = get_post_meta( $related, $prefixs . 'trusted', true ); } elseif ( $related ) { $post = get_post( $related ); $link = get_permalink( $related ); $author_name = $post->post_title; if ( $post->post_type == 'opalestate_agency' ) { $prefixs = OPALESTATE_AGENCY_PREFIX; $picture = OpalEstate_Agency::get_avatar_url( $post->ID , 'full' ); } else { $prefixs = OPALESTATE_AGENT_PREFIX; $picture = OpalEstate_Agent::get_avatar_url( $post->ID, 'full' ); } $trusted = get_post_meta( $related, $prefixs . 'trusted', true ); } else { $link = get_author_posts_url( $user_id ); $author_name = $author->display_name; $trusted = get_user_meta( $user_id, $prefix . 'trusted', true ); $picture = OpalEstate_User::get_author_picture( $user_id ); } ?>