<?php
/**
 * Body Classes.
 * @package electronics storefront
 */

if (!function_exists('electronics_storefront_body_classes')) :

    function electronics_storefront_body_classes($electronics_storefront_classes)
    {
        $electronics_storefront_defaults = electronics_storefront_get_default_theme_options();
        $electronics_storefront_layout = electronics_storefront_get_final_sidebar_layout();

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

        // Sidebar layout logic
        $electronics_storefront_classes[] = $electronics_storefront_layout;

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

        return $electronics_storefront_classes;
    }

endif;

add_filter('body_class', 'electronics_storefront_body_classes');