<?php
/**
 * Body Classes.
 * @package Agriculture Farm Lite
 */

if (!function_exists('agriculture_farm_lite_body_classes')) :

    function agriculture_farm_lite_body_classes($agriculture_farm_lite_classes)
    {
        $agriculture_farm_lite_defaults = agriculture_farm_lite_get_default_theme_options();
        $agriculture_farm_lite_layout = agriculture_farm_lite_get_final_sidebar_layout();

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

        // Sidebar layout logic
        $agriculture_farm_lite_classes[] = $agriculture_farm_lite_layout;

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

        return $agriculture_farm_lite_classes;
    }

endif;

add_filter('body_class', 'agriculture_farm_lite_body_classes');