<?php 
    
    global $syrus, $wp_embed; 
    $syrus_theme_options_ads = get_post_meta(get_the_ID(), 'syrus_theme_options_ads', true) ?: serialize([]);
    $syrus_theme_options_ads = unserialize($syrus_theme_options_ads);
?>

<article class="single-post post-<?php echo get_the_ID() ;?>" data-id-article="<?php echo get_the_ID() ;?>" data-url="<?php echo get_the_permalink() ;?>">
    <h1 class="single-post-title"><?php echo wp_kses_post(get_the_title()); ?></h1>
    <?php $syrus->thumb_img(['img_container_size'=>"12"]); ?>

    <div class="row">
        <div class="col-12 d-flex justify-content-center">
            <p class="single-post-date"><?php echo esc_html( get_the_date() ); ?></p>
            <p class="author-meta ms-2"><?php esc_html_e( 'By', 'syrus' ); ?> <?php the_author(); ?></p>
        </div>
    </div>

    <div class="row single-content">
        <div id="syrus-theme-post-before">
            <?php if(!in_array('post_before', $syrus_theme_options_ads)) : ?>
                <?php $syrus->get_option('ads','post_before',true); ?>
            <?php endif; ?>
        </div>

        <div id="single-post-the-content">
            <?php if(current_user_can('edit_post', get_the_ID())) { ?>
                <span class="dashicons dashicons-edit-large icona-modifica-articolo" 
                        onclick="window.location.href='<?php echo admin_url('post.php') ?>?post=<?php echo get_the_ID() ?>&action=edit'">
                </span>
            <?php  } ?>
            <?php the_content(); ?>
        </div>

        <div id="syrus-theme-post-after">
            <?php if(!in_array('post_after', $syrus_theme_options_ads)) : ?>
                <?php $syrus->get_option('ads','post_after',true); ?>
            <?php endif; ?>
        </div>
    </div>

    <div class="row" id="single-post-article">
        <?php wp_list_comments() ?>
    </div>
</article>
<div class="post-end post-end-<?php echo get_the_ID(); ?>"></div>
