<?php
/**
 * Body Classes.
 * @package Car Booking
 */

if (!function_exists('car_booking_body_classes')) :

    function car_booking_body_classes($car_booking_classes)
    {
        $car_booking_defaults = car_booking_get_default_theme_options();
        $car_booking_layout = car_booking_get_final_sidebar_layout();

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

        // Sidebar layout logic
        $car_booking_classes[] = $car_booking_layout;

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

        return $car_booking_classes;
    }

endif;

add_filter('body_class', 'car_booking_body_classes');