<?php
$attachment = $args['attachment'];
$attachment_url = trailingslashit($args['baseurl']) . $attachment['path'];
$attachment_ordinal = $args['attachment_ordinal'];
?>
<div class="communityally-attachment-entry">
	<div class="communityally-attachment-display" communityally-attachment-display="<?php echo esc_attr($attachment_ordinal); ?>">
		<img class="communityally-attachment-image" src="<?php echo esc_attr($attachment_url); ?>" alt="<?php echo esc_attr($attachment['name']); ?>" >
		<input class="communityally-attachment-input" type="hidden" name="attachment[<?php echo esc_attr($attachment_ordinal); ?>][name]" value="<?php echo esc_attr($attachment['name']); ?>" />
		<input class="communityally-attachment-input" type="hidden" name="attachment[<?php echo esc_attr($attachment_ordinal); ?>][path]" value="<?php echo esc_attr($attachment['path']); ?>" />
	</div>
	<div class="communityally-attachment-delete-button" communityally-attachment-remove-temp="<?php echo esc_attr($attachment_ordinal); ?>"></div>
</div>