<?php
/**
 * @var $uid
 */

if ( $uid == get_current_user_id() ) { ?>

	<div class="ui toggle checkbox handlerx label-left" id="vacation_mode_toggle_ui">

		<input type="checkbox" name="vacation_mode_toggle" <?php echo wpj_get_user_vacation( get_current_user_id() ) ? 'checked' : ''; ?>>

		<label for="vacation_mode_toggle"></label>

	</div>

	<?php echo '<style>.user-profile-vacation-row-wrapper{display:none;}</style>'; // for page builder

} else echo '<style>.user-profile-vacation-mode-row-wrapper,.user-profile-edit-profile-row-wrapper{display:none;}</style>'; // for page builder

if ( ! wpj_get_user_vacation( wpj_get_user_id() ) ) echo '<style>.user-profile-vacation-row-wrapper{display:none;}</style>'; // for page builder