<?php

namespace Saswp;

function property_description_shortcode() {
    $settings = new \Saswp\Settings();
    $property = new \Saswp\Repository\PropertyRepository();
    $propertyDescriptionDTO = $property->get($settings->get('sas_one_property_page_id'))->getPropertyDescription();
    if ($propertyDescriptionDTO->description) {
        return '<div class="property-description">' . wp_kses_post($propertyDescriptionDTO->description) . '</div>';
    } 
    return '<div class="description" data-shortcode="property_description"></div>';
}

?>