<?php
/**
 * Body Classes.
 * @package OTT Vlogger
 */

if (!function_exists('ott_vlogger_body_classes')) :

    function ott_vlogger_body_classes($ott_vlogger_classes)
    {
        $ott_vlogger_defaults = ott_vlogger_get_default_theme_options();
        $ott_vlogger_layout = ott_vlogger_get_final_sidebar_layout();

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

        // Sidebar layout logic
        $ott_vlogger_classes[] = $ott_vlogger_layout;

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

        return $ott_vlogger_classes;
    }

endif;

add_filter('body_class', 'ott_vlogger_body_classes');