<?php
/**
 * Body Classes.
 * @package Education Reform
 */

if (!function_exists('education_reform_body_classes')) :

    function education_reform_body_classes($education_reform_classes)
    {
        $education_reform_defaults = education_reform_get_default_theme_options();
        $education_reform_layout = education_reform_get_final_sidebar_layout();

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

        // Sidebar layout logic
        $education_reform_classes[] = $education_reform_layout;

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

        return $education_reform_classes;
    }

endif;

add_filter('body_class', 'education_reform_body_classes');