<?php
/**
 * Body Classes.
 * @package Storefront Eshop
 */

if (!function_exists('storefront_eshop_body_classes')) :

    function storefront_eshop_body_classes($storefront_eshop_classes)
    {
        $storefront_eshop_defaults = storefront_eshop_get_default_theme_options();
        $storefront_eshop_layout = storefront_eshop_get_final_sidebar_layout();

        // Adds a class of hfeed to non-singular pages.
        if (!is_singular()) {
            $storefront_eshop_classes[] = 'hfeed';
        }

        // Sidebar layout logic
        $storefront_eshop_classes[] = $storefront_eshop_layout;

        // Copyright alignment
        $copyright_alignment = get_theme_mod('storefront_eshop_copyright_alignment', 'Default');
        $storefront_eshop_classes[] = 'copyright-' . strtolower($copyright_alignment);

        return $storefront_eshop_classes;
    }

endif;

add_filter('body_class', 'storefront_eshop_body_classes');