Index: trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/category_block_theme.php
===================================================================
--- trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/category_block_theme.php	(revision 237)
+++ trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/category_block_theme.php	(revision 252)
@@ -17,25 +17,50 @@
 	$depth  = !is_numeric( $options[12] ) ? 0 : $options[12] ;
 	
-	$param = array(
-		'show_option_all' => $show_option_all, 
-		'orderby' => $orderby, 
-		'order' => $order, 
-		'show_last_update' => $show_last_updated, 
-		'style' => 'list',
-		'show_count' => $show_count, 
-		'hide_empty' => $hide_empty, 
-		'use_desc_for_title' => $use_desc_for_title, 
-		'child_of' => 0, 
-		'feed' => '', 
-		'feed_image' => '', 
-		'exclude' => $exclude, 
-		'include' => $includes, 
-		'hierarchical' => $hierarchical, 
-		'title_li' => '',
-		'number' => '',
-		'echo' => 0,
-		'depth' => $depth
-	);
-	$block['categories'] = wp_list_categories($param);
+	if (function_exists('wp_list_categories')){
+		$param = array(
+			'show_option_all' => $show_option_all, 
+			'orderby' => $orderby, 
+			'order' => $order, 
+			'show_last_update' => $show_last_updated, 
+			'style' => 'list',
+			'show_count' => $show_count, 
+			'hide_empty' => $hide_empty, 
+			'use_desc_for_title' => $use_desc_for_title, 
+			'child_of' => 0, 
+			'feed' => '', 
+			'feed_image' => '', 
+			'exclude' => $exclude, 
+			'include' => $includes, 
+			'hierarchical' => $hierarchical, 
+			'title_li' => '',
+			'number' => '',
+			'echo' => 0,
+			'depth' => $depth
+		);
+		$block['categories'] = wp_list_categories($param);
+	} else {
+		if (empty($show_option_all))
+			$optionall = 0;
+		else
+			$optionall = 1;
+		$param = array(
+			'optionall' => $optionall, 
+			'all' => $show_option_all,
+			'sort_column' => $orderby, 
+			'sort_order' => $order, 
+			'show_last_update' => $show_last_updated, 
+			'optioncount' => $show_count, 
+			'hide_empty' => $hide_empty, 
+			'use_desc_for_title' => $use_desc_for_title, 
+			'child_of' => 0, 
+			'feed' => '', 
+			'feed_image' => '', 
+			'exclude' => $exclude, 
+			'hierarchical' => $hierarchical, 
+			'recurse' => 1,
+		);
+		$block['categories'] = wp_list_cats($param);
+		
+	}
 	return $block ;	
 }
Index: trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/tag_cloud_block_theme.php
===================================================================
--- trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/tag_cloud_block_theme.php	(revision 237)
+++ trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/tag_cloud_block_theme.php	(revision 252)
@@ -25,9 +25,12 @@
 		'include' => $wp_include
 	);
-	ob_start();
-		wp_tag_cloud($param);
-		$output = ob_get_contents();
-	ob_end_clean();	
-
+	if (function_exists('wp_tag_cloud')) {
+		ob_start();
+			wp_tag_cloud($param);
+			$output = ob_get_contents();
+		ob_end_clean();	
+	} else {
+		$output = 'not function wp_tag_cloud()';
+	}
 	$block['tag_cloud'] = $output;								
 	return $block ;	
Index: trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/widget_block_theme.php
===================================================================
--- trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/widget_block_theme.php	(revision 237)
+++ trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/widget_block_theme.php	(revision 252)
@@ -38,5 +38,8 @@
 		}
 	}
-
+	if (!function_exists('wp_get_sidebars_widgets')) {
+		echo 'Not support sidebar widget';
+		return;
+	}
 	$sidebars_widgets = wp_get_sidebars_widgets();
 	$registered_sidebars = $wp_registered_sidebars[$index];
Index: trunk/xpressme_integration_kit/wp-content/themes/xpress_default/comments.php
===================================================================
--- trunk/xpressme_integration_kit/wp-content/themes/xpress_default/comments.php	(revision 237)
+++ trunk/xpressme_integration_kit/wp-content/themes/xpress_default/comments.php	(revision 252)
@@ -8,20 +8,48 @@
 		return;
 	}
+	
+	if (function_exists('have_comments'))
+		$have_comments= have_comments();
+	else
+		$have_comments= $comments;
+
 ?>
 
 <!-- You can start editing here. -->
-
-<?php if ( have_comments() ) : ?>
+<?php if ( $have_comments ) : ?>
 	<?php if ( ! empty($comments_by_type['comment']) ) : ?>
 		<h3 id="xpress_comments"><?php comments_number(__('No Responses', 'xpress'), __('One Response', 'xpress'), __('% Responses', 'xpress'));?> <?php printf(__('to &#8220;%s&#8221;', 'xpress'), the_title('', '', false)); ?></h3>
 		<div id="xpress_commentlist">
-			<?php wp_list_comments('type=comment&style=div'); ?>
+			<?php if (function_exists('wp_list_comments')) : ?>
+				<?php wp_list_comments('type=comment&style=div'); ?>
+			 		<ol class="commentlist">
+ 			<?php else : ?>
+				<?php foreach ($comments as $comment) : ?>
+					<li <?php echo $oddcomment; ?>id="comment-<?php comment_ID() ?>">
+						<?php if (function_exists('get_avatar')) echo get_avatar( $comment, 32 ); ?>	
+						<?php printf(__('<cite>%s</cite> Says:', 'xpressme'), get_comment_author_link()); ?>
+						<?php if ($comment->comment_approved == '0') : ?>
+						<em><?php _e('Your comment is awaiting moderation.', 'xpressme'); ?></em>
+						<?php endif; ?>
+						<br />
+						<small class="commentmetadata"><a href="#comment-<?php comment_ID() ?>" title=""><?php printf(__('%1$s at %2$s', 'xpressme'), get_comment_date(__('F jS, Y', 'xpressme')), get_comment_time()); ?></a> <?php edit_comment_link(__('Comment Edit', 'xpressme'),'&nbsp;&nbsp;',''); ?></small>
+						<?php comment_text() ?>
+					</li>
+				<?php
+					/* Changes every other comment to a different class */
+					$oddcomment = ( empty( $oddcomment ) ) ? 'class="alt" ' : '';
+				?>
+				<?php endforeach; /* end for each comment */ ?>
+				</ol>
+			<?php endif; ?>
 		</div>
 	<?php endif; ?>
-	
-	<div class="navigation">
-		<div class="alignleft"><?php previous_comments_link() ?></div>
-		<div class="alignright"><?php next_comments_link() ?></div>
-	</div>
+	<?php if (function_exists('wp_list_comments')) : ?>
+		<div class="navigation">
+			<div class="alignleft"><?php previous_comments_link() ?></div>
+			<div class="alignright"><?php next_comments_link() ?></div>
+		</div>
+	<?php endif; ?>
+				
 <?php else : // this is displayed if there are no comments so far ?>
 
@@ -39,7 +67,9 @@
 	</div>
 			
-	<div id="cancel-comment-reply"> 
-		<small><?php cancel_comment_reply_link() ?></small>
-	</div> 
+	<?php if ( function_exists('cancel_comment_reply_link') ): ?>
+		<div id="cancel-comment-reply"> 
+			<small><?php cancel_comment_reply_link() ?></small>
+		</div> 
+	<?php endif; ?>
 	
 	<?php if ( get_option('comment_registration') && !$user_ID ) : ?>
@@ -49,5 +79,9 @@
 			<div id="xpress-comment-user">
 				<?php if ( $user_ID ) : ?>
-					<p><?php printf(__('Logged in as <a href="%1$s">%2$s</a>.', 'xpress'), get_option('siteurl') . '/wp-admin/profile.php', $user_identity); ?> <a href="<?php echo wp_logout_url(get_permalink()); ?>" title="<?php _e('Log out of this account', 'xpress'); ?>"><?php _e('Log out &raquo;', 'xpress'); ?></a></p>
+					<?php if ( function_exists('wp_logout_url') ): ?>
+						<p><?php printf(__('Logged in as <a href="%1$s">%2$s</a>.', 'xpress'), get_option('siteurl') . '/wp-admin/profile.php', $user_identity); ?> <a href="<?php echo wp_logout_url(get_permalink()); ?>" title="<?php _e('Log out of this account', 'xpress'); ?>"><?php _e('Log out &raquo;', 'xpress'); ?></a></p>
+					<?php else : ?>
+						<p><?php printf(__('Logged in as <a href="%1$s">%2$s</a>.', 'xpress'), get_option('siteurl') . '/wp-admin/profile.php', $user_identity); ?> <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?action=logout" title="<?php _e('Log out of this account', 'xpress'); ?>"><?php _e('Log out &raquo;', 'xpress'); ?></a></p>
+					<?php endif; ?>
 				<?php else : ?>
 					<p><input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="22" tabindex="1" <?php if ($req) echo "aria-required='true'"; ?> />
@@ -69,5 +103,9 @@
 					<input name="submit" type="submit" id="submit" tabindex="5" value="<?php _e('Submit Comment', 'xpress'); ?>" />
 				</div>
-				<?php comment_id_fields(); ?> 	
+				<?php if (function_exists('comment_id_fields')) : ?>
+					<?php comment_id_fields(); //@since 2.7.0 ?>  
+				<?php else : ?>
+					<input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />
+				<?php endif; ?>
 				<?php do_action('comment_form', $post->ID); ?>
 			</div>
Index: trunk/xpressme_integration_kit/wp-content/themes/xpress_default/index.php
===================================================================
--- trunk/xpressme_integration_kit/wp-content/themes/xpress_default/index.php	(revision 237)
+++ trunk/xpressme_integration_kit/wp-content/themes/xpress_default/index.php	(revision 252)
@@ -26,5 +26,9 @@
 						<?php if (function_exists('hotDates')) { hotDates(); }?>
 						<div class ="xpress-post-title">
-							<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %s', 'xpress'), the_title_attribute('echo=0')); ?>"><?php the_title(); ?></a></h2>
+							<?php if(function_exists('the_title_attribute')) : ?>			
+								<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %s', 'xpress'), the_title_attribute('echo=0')); ?>"><?php the_title(); ?></a></h2>
+							<?php else : ?>
+								<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %s', 'xpress'), the_title('','',false)); ?>"><?php the_title(); ?></a></h2>
+							<?php endif; ?>
 						</div>
 					</div>
Index: trunk/xpressme_integration_kit/wp-content/themes/xpress_default/searchform.php
===================================================================
--- trunk/xpressme_integration_kit/wp-content/themes/xpress_default/searchform.php	(revision 237)
+++ trunk/xpressme_integration_kit/wp-content/themes/xpress_default/searchform.php	(revision 252)
@@ -1,5 +1,9 @@
 <form method="get" id="searchform" action="<?php bloginfo('url'); ?>/">
 <label class="hidden" for="s"><?php _e('Search for:', 'xpress'); ?></label>
-<div><input type="text" value="<?php the_search_query(); ?>" name="s" id="s" />
+<?php if(function_exists('the_search_query')) : ?>			
+	<div><input type="text" value="<?php the_search_query(); ?>" name="s" id="s" />
+<?php else : ?>
+	<div><input type="text" value="<?php echo attribute_escape($s); ?>" name="s" id="s" />
+<?php endif; ?>
 <input type="submit" id="searchsubmit" value="<?php _e('Search', 'xpress'); ?>" />
 </div>
Index: trunk/xpressme_integration_kit/wp-content/themes/xpress_default/single.php
===================================================================
--- trunk/xpressme_integration_kit/wp-content/themes/xpress_default/single.php	(revision 237)
+++ trunk/xpressme_integration_kit/wp-content/themes/xpress_default/single.php	(revision 252)
@@ -21,5 +21,9 @@
 						<?php if (function_exists('hotDates')) { hotDates(); }?>
 						<div class ="xpress-post-title">
-							<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %s', 'xpress'), the_title_attribute('echo=0')); ?>"><?php the_title(); ?></a></h2>
+							<?php if(function_exists('the_title_attribute')) : ?>			
+								<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %s', 'xpress'), the_title_attribute('echo=0')); ?>"><?php the_title(); ?></a></h2>
+							<?php else : ?>
+								<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %s', 'xpress'), the_title('','',false)); ?>"><?php the_title(); ?></a></h2>
+							<?php endif; ?>
 						</div>
 					</div>
@@ -61,5 +65,5 @@
 							
 					<div id ="xpress-comments-block">
-						<?php comments_template('', true); ?>
+						<?php comments_template(); ?>
 					</div>
 				</div>
