<?php




/**
 * Register new Elementor widgets.
 *
 * @param \Elementor\Widgets_Manager $widgets_manager Elementor widgets manager.
 * @return void
 */
function register_new_widgets( $widgets_manager ) {

	    				if ( is_plugin_active( 'elementor/elementor.php' ) ) {


/* single product */
		require_once('single-product/widget-image.php');
		require_once('single-product/widget-zemanat.php');
		require_once('single-product/widget-add.php');
		require_once('single-product/widget-dokan.php');
		require_once('single-product/widget-time.php');
		require_once('single-product/widget-english.php');
		require_once('single-product/widget-easy.php');
		require_once('single-product/widget-sale.php');
		require_once('single-product/widget-joz.php');
		require_once('single-product/widget-bar.php');
		require_once('single-product/widget-short.php');
		require_once('single-product/widget-tab.php');
		require_once('single-product/widget-related.php');
		require_once('single-product/widget-meta.php');
		require_once('single-product/widget-offer.php');
		require_once('single-product/widget-emtiaz.php');
		require_once('single-product/widget-timer.php');
		require_once('single-product/widget-star.php');
		require_once('single-product/widget-catalog.php');
		require_once('single-product/widget-bread.php');
		require_once('single-product/widget-product.php');

		require_once('single-product/widget-box.php');




		require_once( __DIR__ . '/widget-product-off.php');
		require_once( __DIR__ . '/widget-product-offer.php');
		require_once( __DIR__ . '/widget-product-offer-two.php');
		require_once( __DIR__ . '/widget-product-offer-three.php');
		require_once( __DIR__ . '/widget-product-offer-five.php');
/* 1.1.5 */	require_once( __DIR__ . '/widget-product-offer-six.php');
/* 1.2.7 */	require_once( __DIR__ . '/offer/widget-product-offer.php');
/* 1.2.1 */	require_once( __DIR__ . '/element-product/widget-product-offer.php');
		require_once( __DIR__ . '/widget-product-one.php');
		require_once( __DIR__ . '/widget-product-lahze.php');
/* 1.1.5 */	require_once( __DIR__ . '/widget-product-lahze-two.php');
		require_once( __DIR__ . '/widget-product-two.php');
		require_once( __DIR__ . '/widget-product-five.php');
		require_once( __DIR__ . '/widget-product-six.php');
		require_once( __DIR__ . '/widget-product-list.php');
		require_once( __DIR__ . '/widget-product-seven.php');
		require_once( __DIR__ . '/widget-product-8.php');
		require_once( __DIR__ . '/widget-product-9.php');
		require_once( __DIR__ . '/widget-product-10.php');
/* 1.1.5 */ require_once( __DIR__ . '/widget-product-11.php');
/* 1.1.5 */ require_once( __DIR__ . '/widget-product-12.php');
		require_once( __DIR__ . '/widget-product-k.php');
		require_once( __DIR__ . '/widget-product-klist.php');
		require_once( __DIR__ . '/widget-product-koffer.php');
		/* 1.2.1 */	require_once( __DIR__ . '/element-product/widget-product-tab.php');
		/* 1.2.1 */	require_once( __DIR__ . '/element-product/widget-product-one.php');
		/* 1.2.1 */	require_once( __DIR__ . '/element-product/widget-product-two.php');
		/* 1.2.1 */	require_once( __DIR__ . '/element-product/widget-product-three.php');
		/* 1.2.1 */	require_once( __DIR__ . '/element-product/widget-product-four.php');
		/* 1.2.1 */	require_once( __DIR__ . '/element-product/widget-product-five.php');
		/* 1.2.1 */	require_once( __DIR__ . '/element-product/widget-product-six.php');
		/* 1.2.1 */	require_once( __DIR__ . '/element-product/widget-product-list.php');
		/* 1.2.1 */	require_once( __DIR__ . '/element-product/widget-product-list-one.php');
		/* 1.2.1 */	require_once( __DIR__ . '/element-product/widget-product-list-two.php');
		
		
		require_once( __DIR__ . '/widget-user.php');
		require_once( __DIR__ . '/widget-post.php');
		require_once( __DIR__ . '/widget-post-one.php');
		/* 1.2.1 */	require_once( __DIR__ . '/element-product/widget-post.php');
		require_once( __DIR__ . '/widget-search.php');
		require_once( __DIR__ . '/widget-search-head.php');
		require_once( __DIR__ . '/header/widget-search-head.php');
		require_once( __DIR__ . '/widget-catagory.php');
		require_once( __DIR__ . '/widget-catagory-two.php');
		require_once( __DIR__ . '/widget-catagory-five.php');
		require_once( __DIR__ . '/widget-footer-one.php');
		require_once( __DIR__ . '/widget-header-one.php');
	require_once( __DIR__ . '/widget-header-two.php');
		require_once( __DIR__ . '/widget-header-three.php');
		require_once( __DIR__ . '/widget-header-four.php');
		require_once( __DIR__ . '/widget-header-five.php');
		require_once( __DIR__ . '/widget-header-six.php');
		require_once( __DIR__ . '/widget-header-seven.php');
		/* هدر ۶ */
		require_once( __DIR__ . '/header/widget-header-one.php');
		require_once( __DIR__ . '/header/widget-header-two.php');
		
		require_once( __DIR__ . '/widget-header-menu.php');
		require_once( __DIR__ . '/header/widget-header-menu.php');
		require_once( __DIR__ . '/header/widget-header-menu-one.php');
		require_once( __DIR__ . '/header/widget-header-user.php');
		require_once( __DIR__ . '/blog/widget-blog.php');
	require_once( __DIR__ . '/blog/widget-blog-two.php');
		require_once( __DIR__ . '/blog/widget-blog-three.php');
		require_once( __DIR__ . '/blog/widget-blog-four.php');
		require_once( __DIR__ . '/blog/widget-blog-seven.php');
	require_once( __DIR__ . '/digi/widget-digi-one.php');
		require_once( __DIR__ . '/digi/widget-digi-two.php');
		require_once( __DIR__ . '/digi/widget-digi-three.php');
		require_once( __DIR__ . '/mobile/widget-mobile.php');
/* 1.2.1 */	require_once( __DIR__ . '/element-product/widget-image.php');
/* 1.2.1 */	require_once( __DIR__ . '/element-product/widget-two.php');
/* 1.2.5 */	require_once( __DIR__ . '/general/widget-icon.php');
/* 1.2.5 */	require_once( __DIR__ . '/general/widget-icon-one.php');
require_once( __DIR__ . '/general/widget-slide-one.php');
	require_once( __DIR__ . '/general/widget-counter.php');
		/* دسته بندی های جدید */


/* 1.2.5 */	require_once( __DIR__ . '/category/widget-catagory-one.php');
	require_once( __DIR__ . '/category/widget-catagory-two.php');



		/* header element */


/* single product */
								$widgets_manager->register( new \Elementor\imagesingle() );
								$widgets_manager->register( new \Elementor\zemanatsingle() );
								$widgets_manager->register( new \Elementor\addsingle() );
								$widgets_manager->register( new \Elementor\dokancatalog() );
								$widgets_manager->register( new \Elementor\timesingle() );
								$widgets_manager->register( new \Elementor\engishsingle() );
								$widgets_manager->register( new \Elementor\easysingle() );
								$widgets_manager->register( new \Elementor\salesingle() );
								$widgets_manager->register( new \Elementor\jozsingle() );
								$widgets_manager->register( new \Elementor\barsingle() );
								$widgets_manager->register( new \Elementor\shortsingle() );
								$widgets_manager->register( new \Elementor\tabsingle() );
								$widgets_manager->register( new \Elementor\relatedsingle() );
								$widgets_manager->register( new \Elementor\metasingle() );
								$widgets_manager->register( new \Elementor\offersingle() );
								$widgets_manager->register( new \Elementor\emtiazproduct() );
								$widgets_manager->register( new \Elementor\timersingle() );
								$widgets_manager->register( new \Elementor\starsingle() );
								$widgets_manager->register( new \Elementor\catalogsingle() );
								$widgets_manager->register( new \Elementor\breadsingle() );
								$widgets_manager->register( new \Elementor\productsingle() );

								$widgets_manager->register( new \Elementor\boxsingle() );



		$widgets_manager->register( new \Elementor\poff() );	
		$widgets_manager->register( new \Elementor\poff2() );
		$widgets_manager->register( new \Elementor\poff1() );
		$widgets_manager->register( new \Elementor\offer1() );
		$widgets_manager->register( new \Elementor\poff5() );
		$widgets_manager->register( new \Elementor\ponekoffer() );
		$widgets_manager->register( new \Elementor\pone7() );
		$widgets_manager->register( new \Elementor\offersix() );
		$widgets_manager->register( new \Elementor\offerseven() );
	/* 1.2.1 */		$widgets_manager->register( new \Elementor\newoffer() );
		$widgets_manager->register( new \Elementor\lahze() );
		$widgets_manager->register( new \Elementor\lahzetwo() );
		$widgets_manager->register( new \Elementor\pone() );
		$widgets_manager->register( new \Elementor\pone1() );
		$widgets_manager->register( new \Elementor\ponefive() );
		$widgets_manager->register( new \Elementor\ponek() );
		$widgets_manager->register( new \Elementor\pone10() );
		$widgets_manager->register( new \Elementor\pone11() );
		$widgets_manager->register( new \Elementor\pone14() );
		$widgets_manager->register( new \Elementor\pone13() );
		$widgets_manager->register( new \Elementor\poneklist() );
		$widgets_manager->register( new \Elementor\pone6() );
		$widgets_manager->register( new \Elementor\pone9() );
		$widgets_manager->register( new \Elementor\pone12() );
			/* 1.2.1 */		$widgets_manager->register( new \Elementor\peoducttab() );
			/* 1.2.1 */		$widgets_manager->register( new \Elementor\productlist() );
			/* 1.2.1 */		$widgets_manager->register( new \Elementor\productlist1() );
			/* 1.2.1 */		$widgets_manager->register( new \Elementor\productlist2() );
			/* 1.2.5 */		$widgets_manager->register( new \Elementor\product88() );
			/* 1.2.5 */		$widgets_manager->register( new \Elementor\product99() );
			/* 1.2.5 */		$widgets_manager->register( new \Elementor\product100() );
			/* 1.2.5 */		$widgets_manager->register( new \Elementor\product111() );
			/* 1.2.5 */		$widgets_manager->register( new \Elementor\product112() );
		$widgets_manager->register( new \Elementor\product113() );
		$widgets_manager->register( new \Elementor\wp1() );
		$widgets_manager->register( new \Elementor\wpp1() );
					/* 1.2.1 */		$widgets_manager->register( new \Elementor\wppost() );
		$widgets_manager->register( new \Elementor\search1() );
		$widgets_manager->register( new \Elementor\search2() );
		$widgets_manager->register( new \Elementor\search3() );
		$widgets_manager->register( new \Elementor\daste() );
		$widgets_manager->register( new \Elementor\wcategory() );
		$widgets_manager->register( new \Elementor\wcategorytwo() );
		$widgets_manager->register( new \Elementor\wcategoryfive() );
		
		/* دسته بندی های جدید */
		$widgets_manager->register( new \Elementor\catone() );
		$widgets_manager->register( new \Elementor\cattwo() );



		$widgets_manager->register( new \Elementor\footerone() );
		$widgets_manager->register( new \Elementor\headertwo() );
		$widgets_manager->register( new \Elementor\headerthree() );
		$widgets_manager->register( new \Elementor\headerthree1() );
		$widgets_manager->register( new \Elementor\headerone() );
		$widgets_manager->register( new \Elementor\headersix() );
		$widgets_manager->register( new \Elementor\headerseven() );
		$widgets_manager->register( new \Elementor\headerfive() );
		$widgets_manager->register( new \Elementor\headerfour() );
				/* هدر ۶ */
		$widgets_manager->register( new \Elementor\headereight() );
		$widgets_manager->register( new \Elementor\headernine() );
		$widgets_manager->register( new \Elementor\headeruser() );
		$widgets_manager->register( new \Elementor\menumobile() );
		$widgets_manager->register( new \Elementor\newmenu() );


		$widgets_manager->register( new \Elementor\blogone() );
		$widgets_manager->register( new \Elementor\blogtwo() );
		$widgets_manager->register( new \Elementor\blogthree() );
		$widgets_manager->register( new \Elementor\blogfour() );
		$widgets_manager->register( new \Elementor\blogseven() );
		$widgets_manager->register( new \Elementor\digione() );
		$widgets_manager->register( new \Elementor\digitwo() );
		$widgets_manager->register( new \Elementor\digithree() );
		$widgets_manager->register( new \Elementor\mobilebar() );
					/* 1.2.1 */		$widgets_manager->register( new \Elementor\imagebox() );
					/* 1.2.1 */		$widgets_manager->register( new \Elementor\imagebox1() );
					/* 1.2.5 */		$widgets_manager->register( new \Elementor\iconfarnam() );
					/* 1.2.5 */		$widgets_manager->register( new \Elementor\iconfarnam1() );
		$widgets_manager->register( new \Elementor\sliderimageone() );
		$widgets_manager->register( new \Elementor\counterproduct() );



}
	}
add_action( 'elementor/widgets/register', 'register_new_widgets' );




function add_elementor_widget_categories( $elements_manager ) {
	
    $categories = [];
    $categories['farnam'] =
        [
            'title' => 'المان های فرنام',
            'icon'  => 'fa fa-plug'
        ];
$categories['farnamproduct'] =
        [
            'title' => 'المان صفحه محصول فرنام',
            'icon'  => 'fa fa-plug'
        ];

    $old_categories = $elements_manager->get_categories();
    $categories = array_merge($categories, $old_categories);

    $set_categories = function ( $categories ) {
        $this->categories = $categories;
    };

    $set_categories->call( $elements_manager, $categories );

}

add_action( 'elementor/elements/categories_registered', 'add_elementor_widget_categories') ;


