<?php

$exist_icon192 = file_exists(ABSPATH . '/icon-192.png');
$exist_icon512 = file_exists(ABSPATH . '/icon-512.png');

if  ( laniakea_option('manifest_active')== 1 && (!$exist_icon192 || !$exist_icon512)) :
?>

    <div class="notice notice-error">
        <p><strong>Per utilizzare correttamente il manifest.json, devi includere le icone nella root del sito web:</strong></p>
        <ul>
            <?php if (!$exist_icon192) : ?><li>nome : icon-192.png - 192x192 pixel</li><?php endif; ?>
            <?php if (!$exist_icon512) : ?><li>nome : icon-512.png - 512x512 pixel</li><?php endif; ?>
        </ul>
    </div>

<?php endif; ?>

<div class="field-group">
    <h3><label><?php laniakea_input('manifest_active', 'checkbox'); ?> Abilita manifest.json</label></h3>
</div>

<div class="field-group">
    <h3>Manifest Short Name</h3>
    <?php laniakea_input('manifest_short_name', 'text'); ?>
</div>

<div class="field-group">
    <h3>Manifest Name</h3>
    <?php laniakea_input('manifest_name', 'text'); ?>
</div>

<div class="field-group">
    <h3>Manifest Start URL</h3>
    <?php laniakea_input('manifest_start_url', 'text'); ?>
</div>

<div class="field-group">
    <h3>Manifest Theme & Background Color </h3>
    <?php laniakea_input('manifest_color', 'color'); ?>
</div>