<?php
/**
 * Body Classes.
 * @package Travel Destination
 */

if (!function_exists('travel_destination_body_classes')) :

    function travel_destination_body_classes($travel_destination_classes)
    {
        $travel_destination_defaults = travel_destination_get_default_theme_options();
        $layout = travel_destination_get_final_sidebar_layout();

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

        // Sidebar layout logic
        $travel_destination_classes[] = $layout;

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

        return $travel_destination_classes;
    }

endif;

add_filter('body_class', 'travel_destination_body_classes');