<?php

/**
 * Render homepage sections.
 */
function charity_elite_homepage_sections() {
	$charity_elite_homepage_sections = charity_elite_get_homepage_sections();
	$charity_elite_sorted_sections   = array_keys( $charity_elite_homepage_sections );

	foreach ( $charity_elite_sorted_sections as $charity_elite_section ) {
		if ( in_array( $charity_elite_section, array_keys( $charity_elite_homepage_sections ) ) ) {
			require get_template_directory() . '/sections/' . $charity_elite_section . '.php';
		}
	}
}
