<?php
/**
 * Custom widgets.
 *
 * @package OMag
 */

if ( ! function_exists( 'omag_load_widgets' ) ) :

	/**
	 * Load widgets.
	 *
	 * @since 1.0.0
	 */
	function omag_load_widgets() {

		// News Style One
		register_widget( 'OMag_News_Style_One' );

		// News Style Two
		register_widget( 'OMag_News_Style_Two' );

		// News Style Three
		register_widget( 'OMag_News_Style_Three' );

		// OMag Primary Recent Posts
		register_widget( 'OMag_Primary_Recent_Posts_Widget' );

		// OMag Secondary Recent Posts
		register_widget( 'OMag_Secondary_Recent_Posts_Widget' );

		// OMag Connect Socially
		register_widget( 'OMag_Connect_Socially_Widget' );

	}

endif;

add_action( 'widgets_init', 'omag_load_widgets' );


/**
 * OMag News Style One Widget
 */
require get_template_directory() . '/inc/widgets/omag-news-style-one.php';

/**
 * OMag News Style Two Widget
 */
require get_template_directory() . '/inc/widgets/omag-news-style-two.php';

/**
 * OMag News Style Three Widget
 */
require get_template_directory() . '/inc/widgets/omag-news-style-three.php';

/**
 * OMag Primary Recent Posts
 */
require get_template_directory() . '/inc/widgets/recent-posts-primary.php';

/**
 * OMag Secondary Recent Posts
 */
require get_template_directory() . '/inc/widgets/recent-posts-secondary.php';

/**
 * OMag Connect Socially
 */
require get_template_directory() . '/inc/widgets/connect-socially.php';
