<?php
 
	$top_menu_array=array();
	$top_menu_array[] =array(
						'slug' => '210001',
						'parent' => 0,
						'title' => 'پرسش و پاسخ',
						'url' => home_url( '/' ).'faqs'
					);
					
	$$top_menu_array[] =array(
						'slug' => '210002',
						'parent' => 0,
						'title' => 'تماس با ما',
						'url' => home_url( '/' ).'contact-us'
					);
	
	$top_menu_array[] =array(
						'slug' => '210003',
						'parent' => 0,
						'title' => 'درباره ما',
						'url' => home_url( '/' ).'about-me'
					);		
						
	
	$top_menu_name  = 'منو در نوار فرعی';
	$top_menu = get_term_by( 'slug', $top_menu_name, 'nav_menu' );
	
	if(empty($top_menu)){
		$top_menu_id = wp_create_nav_menu($top_menu_name);
		$top_menu=array(array(
						'location' => false,
						'name' => $top_menu_name,
						'slug' => 'top-menu',
						'items' =>  $top_menu_array,
						),
					);
				
		bazinewsdemoimport_menu_import_json($top_menu);
		echo $top_menu_name .' ساخته شد <br>';

	}else{
		echo $top_menu_name .' قبلا وجود داشت <br>';
	}
	
	$locations['bazinews_plus_menu'] =  wp_get_nav_menu_object(  'منو در نوار فرعی' )->term_id;
  