<?php
$footer = get_theme_mod('footer_layout', 'footer-copyright-social');

// Footer layouts shipped by this theme. Other layout values may be rendered
// by other code hooked to the same `kubelio_footer` hook — so bail here for
// any value not in this list to avoid a duplicate footer. If that other code
// is inactive, the Fallback theme_mod filter resets the value to one of the
// layouts listed here.
$free_layouts = array(
    'footer-copyright-social',
    'footer-copyright-menu',
    'footer-column-3-big-first',
    'footer-column-4-equal',
);

if (! in_array($footer, $free_layouts, true)) {
    return;
}

kubelio_get_template_part("footer/{$footer}");
