<?php
/**
 * @var $pid
 * @var $remove_class
 * @var $delete_text
 * @var $add_class
 * @var $add_text_minus
 * @var $delete_text_plus
 * @var $add_text
 */

if ( is_user_logged_in() ) { ?>

	<div class="upb_add_remove_links">

		<?php if ( upb_check_post_is_read( $pid, upb_get_user_id() ) ) { ?>

			<a href="#" rel="<?php echo $pid; ?>" class="upb_del_bookmark upb_bookmark_control upb_bookmark_control_<?php echo $pid; ?>">
				<div class="full-heart"></div>
				<div class="<?php echo $remove_class; ?>">
					<span><?php echo $delete_text; ?></span>
				</div>
			</a>

			<a href="#" rel="<?php echo $pid; ?>" class="upb_add_bookmark upb_bookmark_control upb_bookmark_control_<?php echo $pid; ?>" style="display:none;">
				<div class="empty-heart"></div>
				<div class="<?php echo $add_class; ?>">
					<span><?php echo $add_text_minus; ?></span>
				</div>
			</a>

		<?php } else { ?>

			<a href="#" rel="<?php echo $pid; ?>" class="upb_del_bookmark upb_bookmark_control upb_bookmark_control_<?php echo $pid; ?>" style="display:none;">
				<div class="full-heart"></div>
				<div class="<?php echo $remove_class; ?>">
					<span><?php echo $delete_text_plus; ?></span>
				</div>
			</a>

			<a href="#" rel="<?php echo $pid; ?>" class="upb_add_bookmark upb_bookmark_control upb_bookmark_control_<?php echo $pid; ?>">
				<div class="empty-heart"></div>
				<div class="<?php echo $add_class; ?>">
					<span><?php echo $add_text; ?></span>
				</div>
			</a>

		<?php } ?>

	</div>

<?php } else { ?>

	<div class="upb_add_remove_links">

		<a href="<?php echo esc_url( wpj_get_login_link() ); ?>" rel="<?php echo $pid; ?>" class="login-link">
			<div class="empty-heart"></div>
			<span>
				<div class="<?php echo $add_class; ?>">
					<span><?php echo $add_text; ?></span>
				</div>
			</span>
		</a>

	</div>

<?php }