<?php
/**
 * Body Classes.
 * @package Home Construction Builder
 */

if (!function_exists('home_construction_builder_body_classes')) :

    function home_construction_builder_body_classes($home_construction_builder_classes)
    {
        $home_construction_builder_defaults = home_construction_builder_get_default_theme_options();
        $home_construction_builder_layout = home_construction_builder_get_final_sidebar_layout();

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

        // Sidebar layout logic
        $home_construction_builder_classes[] = $home_construction_builder_layout;

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

        return $home_construction_builder_classes;
    }

endif;

add_filter('body_class', 'home_construction_builder_body_classes');