<?php
/**
 * Body Classes.
 * @package Spa Parlor
 */

if (!function_exists('spa_parlor_body_classes')) :

    function spa_parlor_body_classes($spa_parlor_classes)
    {
        $spa_parlor_defaults = spa_parlor_get_default_theme_options();
        $spa_parlor_layout = spa_parlor_get_final_sidebar_layout();

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

        // Sidebar layout logic
        $spa_parlor_classes[] = $spa_parlor_layout;

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

        return $spa_parlor_classes;
    }

endif;

add_filter('body_class', 'spa_parlor_body_classes');