<?php 

    $post_id = get_the_ID() ?: null;
    $syrus_theme_options_ads = $post_id ? get_post_meta(get_the_ID(), 'syrus_theme_options_ads', true) : serialize([]);
    $syrus_theme_options_ads = unserialize($syrus_theme_options_ads) ?: [];
?>

<b><?php esc_html_e("Head | Footer | Content (Ads)",'syrus') ?></b>
<ul>
    <li>
        <label for="syrus_theme_options_ads_post_before">
            <input type="checkbox" value="post_before" name="syrus_theme_options_ads[]" id="syrus_theme_options_ads_post_before" <?php echo in_array('post_before', $syrus_theme_options_ads) ? 'checked' : '' ?> autocomplete="off">
            <?php esc_html_e('Don\'t insert post before', 'syrus') ?>
        </label>
    </li>
    <li>
        <label for="syrus_theme_options_ads_post_after">
            <input type="checkbox" value="post_after" name="syrus_theme_options_ads[]" id="syrus_theme_options_ads_post_after" <?php echo in_array('post_after', $syrus_theme_options_ads) ? 'checked' : '' ?> autocomplete="off">
            <?php esc_html_e('Don\'t insert post after', 'syrus') ?>
        </label>
    </li>
    <li>
        <label for="syrus_theme_options_ads_post_blocco_1">
            <input type="checkbox" value="post_blocco_1" name="syrus_theme_options_ads[]" id="syrus_theme_options_ads_post_blocco_1" <?php echo in_array('post_blocco_1', $syrus_theme_options_ads) ? 'checked' : '' ?> autocomplete="off">
            <?php esc_html_e('Don\'t insert block 1', 'syrus') ?>
        </label>
    </li>
    <li>
        <label for="syrus_theme_options_ads_post_blocco_2">
            <input type="checkbox" value="post_blocco_2" name="syrus_theme_options_ads[]" id="syrus_theme_options_ads_post_blocco_2" <?php echo in_array('post_blocco_2', $syrus_theme_options_ads) ? 'checked' : '' ?> autocomplete="off">
            <?php esc_html_e('Don\'t insert block 2', 'syrus') ?>
        </label>
    </li>
    <li>
        <label for="syrus_theme_options_ads_post_blocco_3">
            <input type="checkbox" value="post_blocco_3" name="syrus_theme_options_ads[]" id="syrus_theme_options_ads_post_blocco_3" <?php echo in_array('post_blocco_3', $syrus_theme_options_ads) ? 'checked' : '' ?> autocomplete="off">
            <?php esc_html_e('Don\'t insert block 3', 'syrus') ?>
        </label>
    </li>
</ul>