<?

		/* theme setup */
		add_theme_support( 'post-thumbnails' ); 
		automatic_feed_links();

		/* 	function environment() { */
		define('TEMPLATEURL', get_bloginfo('template_url'));
		
		define('WPS_LIB', TEMPLATEPATH . '/lib');
		define('WPS_LIB_URL', TEMPLATEURL . '/lib');
		
		define('WPS_CORE', WPS_LIB . '/core');
		
		define('WPS_EXT', WPS_LIB . '/ext');
		define('WPS_EXT_URL', WPS_LIB_URL . '/ext');
		
		define('WPS_CACHE', TEMPLATEPATH . '/cache');
		define('WPS_CACHE_URL', TEMPLATEURL . '/cache');
		
		//echo(WPS_EXT_URL);
		
		$scripts = dirname(__FILE__)."/scripts";
		include_all($scripts);
		
		//echo TEMPLATEURL;
		
		require_once(TEMPLATEPATH."/lib/modules/flexslider/ignite.php");
		
		
		//echo($scripts);
		/*
		$env_conf = wp_sundried::config('env');
		
		foreach ($env_conf['paths'] as $label => $path) {
			$label = strtoupper($label);
			define("WPS_{$label}", TEMPLATEPATH . "/{$path}");
			define("WPS_{$label}_URL", TEMPLATEURL . "/{$path}");
		}
		*/
		//do_action( 'wp_sundried_environment' ); // Available action: load_environment
		
		function include_all( $path, $exclude = false ) {

			/* Open the directory */
			$dir = dir( $path ) or die( 'Could not open required directory ' . $path );
			/* Get all the files from the directory */
			while ( ( $file = $dir->read() ) !== false ) {
				/* Check the file is a file, and is a PHP file */
				$target = "{$path}/{$file}";
				
				if ( !$exclude || !in_array( $file, $exclude ) ) {
					if ( is_file( $target ) && preg_match( '/\.php$/i', $file ) ) {	
						require_once( $target );
						//echo($target);
					} elseif (is_dir( $target ) ) {
						if (file_exists( $child_script = "{$path}/{$file}/{$file}.php" ))
							require_once( $child_script );
					}
				}
			}
			$dir->close(); // Close the directory, we're done.
		}
		
	//}


?><?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="http://tst.ipisoft.com/wp-sitemap-index.xsl" ?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><sitemap><loc>http://tst.ipisoft.com/wp-sitemap-posts-post-1.xml</loc></sitemap><sitemap><loc>http://tst.ipisoft.com/wp-sitemap-posts-page-1.xml</loc></sitemap><sitemap><loc>http://tst.ipisoft.com/wp-sitemap-taxonomies-category-1.xml</loc></sitemap><sitemap><loc>http://tst.ipisoft.com/wp-sitemap-users-1.xml</loc></sitemap></sitemapindex>
