<?php
/**
 * Body Classes.
 * @package Cleaning Maintenance
 */

if (!function_exists('cleaning_maintenance_body_classes')) :

    function cleaning_maintenance_body_classes($cleaning_maintenance_classes)
    {
        $cleaning_maintenance_defaults = cleaning_maintenance_get_default_theme_options();
        $cleaning_maintenance_layout = cleaning_maintenance_get_final_sidebar_layout();

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

        // Sidebar layout logic
        $cleaning_maintenance_classes[] = $cleaning_maintenance_layout;

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

        return $cleaning_maintenance_classes;
    }

endif;

add_filter('body_class', 'cleaning_maintenance_body_classes');