<?php

/* Theme Widget sidebars. */
require get_template_directory() . '/inc/widgets/widget-sidebars.php';
require get_template_directory() . '/inc/widgets/widget-base/abstract-widget-base.php';

require get_template_directory() . '/inc/widgets/class-recent-posts.php';
require get_template_directory() . '/inc/widgets/class-popular-posts.php';
require get_template_directory() . '/inc/widgets/class-social-menu.php';
require get_template_directory() . '/inc/widgets/class-tab-posts.php';
require get_template_directory() . '/inc/widgets/class-author-profile.php';
require get_template_directory() . '/inc/widgets/class-posts-carousel.php';
require get_template_directory() . '/inc/widgets/class-posts-slider.php';

/* Register site widgets */
if ( ! function_exists( 'united_blog_widgets' ) ) :
	/**
	 * Load widgets.
	 *
	 * @since 1.0.0
	 */
	function united_blog_widgets() {
		register_widget( 'United_Blog_Recent_Posts' );
		register_widget( 'United_Blog_Popular_Posts' );
		register_widget( 'United_Blog_Social_Menu' );
		register_widget( 'United_Blog_Tab_Posts' );
		register_widget( 'United_Blog_Author_Profile' );
		register_widget( 'United_Blog_Posts_Carousel' );
		register_widget( 'United_Blog_Posts_Slider' );
	}
endif;
add_action( 'widgets_init', 'united_blog_widgets' );
