<?php

$value = empty($args['value']) ? $args['placeholder'] : wpautop($args['value']);

if ($args['class']) {
    $args['options']['editor_class'] = $args['class'];
}

$conditional = salesloo_field_get_conditional_data($args);

?>
<div class="salesloo-field <?php echo $args['direction']; ?>" <?php echo implode(' ', $conditional); ?>>
    <div class="salesloo-field-label">
        <label><?php echo $args['label']; ?></label>
    </div>
    <div class="salesloo-field-input">
        <?php
        echo $args['before'];
        wp_editor(wpautop($value), $args['name'], $args['options']);
        echo $args['after'];
        ?>
    </div>
</div>