<?php
/**
 * Body Classes.
 * @package Fruits Farming
 */

if (!function_exists('fruits_farming_body_classes')) :

    function fruits_farming_body_classes($fruits_farming_classes)
    {
        $fruits_farming_defaults = fruits_farming_get_default_theme_options();
        $fruits_farming_layout = fruits_farming_get_final_sidebar_layout();

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

        // Sidebar layout logic
        $fruits_farming_classes[] = $fruits_farming_layout;

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

        return $fruits_farming_classes;
    }

endif;

add_filter('body_class', 'fruits_farming_body_classes');