<?php
/**
 * Body Classes.
 * @package Electrician Company
 */

if (!function_exists('electrician_company_body_classes')) :

    function electrician_company_body_classes($electrician_company_classes)
    {
        $electrician_company_defaults = electrician_company_get_default_theme_options();
        $electrician_company_layout = electrician_company_get_final_sidebar_layout();

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

        // Sidebar layout logic
        $electrician_company_classes[] = $electrician_company_layout;

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

        return $electrician_company_classes;
    }

endif;

add_filter('body_class', 'electrician_company_body_classes');