<?php if ($VAR->domain->hasWordpressConfigSecured) : ?>
    <Files wp-config.php>
    <?php if ($VAR->server->webserver->apache->useRequireOption): ?>
        Require all denied
    <?php else: ?>
        Order allow,deny
        Deny from all
    <?php endif; ?>
    </Files>
<?php endif; ?>

<?php foreach ($VAR->domain->wordpressInstances as $wordpress): ?>
    <?php if ($wordpress->isIndexingSecured) : ?>
        <Directory "<?php echo $wordpress->fullPath; ?>">
            Options All -Indexes
        </Directory>
    <?php endif; ?>
    <?php if ($wordpress->isDirectoryContentSecured) : ?>
        <Directory "<?php echo $wordpress->fullPath; ?>/wp-content">
            <FilesMatch \.php$>
            <?php if ($VAR->server->webserver->apache->useRequireOption): ?>
                Require all denied
            <?php else: ?>
                Order allow,deny
                Deny from all
            <?php endif; ?>
            </FilesMatch>
        </Directory>
    <?php endif; ?>
    <?php if ($wordpress->isDirectoryIncludesSecured) : ?>
        <Directory "<?php echo $wordpress->fullPath; ?>/wp-includes">
            <FilesMatch \.php$>
            <?php if ($VAR->server->webserver->apache->useRequireOption): ?>
                Require all denied
            <?php else: ?>
                Order allow,deny
                Deny from all
            <?php endif; ?>
            </FilesMatch>
        </Directory>
    <?php endif; ?>
<?php endforeach; ?>
