<?php

namespace GS_BOOKS;

defined('ABSPATH') || exit;

$publish = Helpers::get_post_meta('_gsbks_publish');
$is_visible = isset($field) ? Helpers::is_visible($field) : true;
$classes = isset($field) ? Helpers::get_visible_classes($field, 'gsb-info-single') : ['gsb-info-single'];

if (! empty($publish) && $is_visible) : ?>

    <div class="gsb-published-date <?php echo esc_attr(implode(' ', $classes)); ?>">

        <div class="gsb-info-single-name">
            <span class="gsb-info-single-icon"> <i class="fas fa-calendar-alt"></i> </span>
            <?php echo esc_html(Helpers::get_translation('gsb_publish_text_modify')); ?>:
        </div>

        <div class="gsb-info-single-value">
            <?php echo esc_html($publish); ?>
        </div>

    </div>

<?php endif; ?>