<?php
/**
 * Body Classes.
 * @package Wind Energy
 */

if (!function_exists('wind_energy_body_classes')) :

    function wind_energy_body_classes($wind_energy_classes)
    {
        $wind_energy_defaults = wind_energy_get_default_theme_options();
        $wind_energy_layout = wind_energy_get_final_sidebar_layout();

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

        // Sidebar layout logic
        $wind_energy_classes[] = $wind_energy_layout;

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

        return $wind_energy_classes;
    }

endif;

add_filter('body_class', 'wind_energy_body_classes');