<?php
/**
 * @var $post_type
 * @var $user
 * @var $pid
 */

if ( apply_filters( 'wpj_' . $post_type . '_view_contact_button_filter', true ) ) {

	if ( $post_type == 'request' ) { ?>

		<a class="text-button text-button-gray-outlined text-button-medium mt5 w100 <?php echo ! is_user_logged_in() ? 'login-link' : ''; ?>" href="<?php echo wpj_get_pm_link( $user->user_nicename ) . '?request_id=' . $pid; ?>">

			<?php _e( 'Contact', 'wpjobster' ); ?>

		</a>

	<?php } else { ?>

		<a class="text-button text-button-gray-outlined text-button-medium <?php echo ! is_user_logged_in() ? 'login-link' : ''; ?>" href="<?php echo wpj_get_pm_link( $user->user_nicename ) . '?job_id=' . $pid; ?>">

			<?php _e( 'Contact', 'wpjobster' ); ?>

		</a>

	<?php }

}