<?php

if ( ! function_exists( 'aalto_edge_register_widgets' ) ) {
	function aalto_edge_register_widgets() {
		$widgets = apply_filters( 'aalto_edge_register_widgets', $widgets = array() );

		if(aalto_edge_core_plugin_installed()) {
			foreach ($widgets as $widget) {
				aalto_edge_create_wp_widget($widget);
			}
		}
	}

	add_action( 'widgets_init', 'aalto_edge_register_widgets' );
}

