<?php
/**
 * Body Classes.
 * @package Modern Art Gallery
 */

if (!function_exists('modern_art_gallery_body_classes')) :

    function modern_art_gallery_body_classes($modern_art_gallery_classes)
    {
        $modern_art_gallery_defaults = modern_art_gallery_get_default_theme_options();
        $modern_art_gallery_layout = modern_art_gallery_get_final_sidebar_layout();

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

        // Sidebar layout logic
        $modern_art_gallery_classes[] = $modern_art_gallery_layout;

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

        return $modern_art_gallery_classes;
    }

endif;

add_filter('body_class', 'modern_art_gallery_body_classes');