<?php
/**
 * Body Classes.
 * @package Event Decorations
 */

if (!function_exists('event_decorations_body_classes')) :

    function event_decorations_body_classes($event_decorations_classes)
    {
        $event_decorations_defaults = event_decorations_get_default_theme_options();
        $event_decorations_layout = event_decorations_get_final_sidebar_layout();

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

        // Sidebar layout logic
        $event_decorations_classes[] = $event_decorations_layout;

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

        return $event_decorations_classes;
    }

endif;

add_filter('body_class', 'event_decorations_body_classes');