Exemple #1
0
			</ul>
			<!-- Left Nav Section -->
			
			
			<?php 
}
?>

			<?php 
global $current_page_title;
$topbar_page_title = (bool) xt_option('topbar-sticky-page-title', null, 1);
if ($topbar_page_title && !is_front_page() && !empty($current_page_title)) {
    ?>
			<ul class="left page-title show-for-large-up">
				<li><?php 
    echo xt_trim_text($current_page_title, 25);
    ?>
</li>
			</ul>
			<?php 
}
?>

			<?php 
xt_get_nav_menu('main-mobile-menu', array('menu_class' => 'left menu show-for-small-only clearfix', 'container' => false));
?>
			
			<?php 
$social_networks_mobile_enabled = (bool) xt_option('topbar-mobile-menu-search');
if (!empty($social_networks_mobile_enabled)) {
    ?>
    function widget($args, $instance)
    {
        $instance = wp_parse_args((array) $instance, self::$widget_defaults);
        $this->fix_args($args);
        $title = apply_filters('widget_title', $instance['title'], $instance, $this->id_base);
        $number = $instance['number'];
        $show_date = (bool) $instance['show_date'];
        $bordered = (bool) $instance['bordered'];
        if ($bordered) {
            $this->set_border($args);
        }
        extract($args);
        $comments = get_comments(array('number' => $number, 'post_type' => 'post', 'status' => 'approve'));
        if (!empty($comments)) {
            echo $before_widget;
            if (!empty($title)) {
                echo $before_title . wp_kses_post($title) . $after_title;
            }
            ?>


			<ul class="recent_comments">
				<?php 
            foreach ($comments as $comment) {
                ?>
				<?php 
                $comment_url = get_permalink($comment->comment_post_ID) . '#comment-' . $comment->comment_ID;
                ?>
				<li>
					<a class="th left" href="<?php 
                echo esc_url($comment_url);
                ?>
"><?php 
                echo get_avatar($comment->user_id, 60, '', $comment->comment_author);
                ?>
</a>
					<div class="comment">
						<h6>
							<a href="<?php 
                echo esc_url($comment_url);
                ?>
">
								<span class="author"><?php 
                echo $comment->comment_author;
                ?>
 </span>
								<?php 
                if ($show_date) {
                    ?>
<span class="time"> &nbsp;|&nbsp; <?php 
                    echo xt_time_elapsed($comment->comment_date);
                    ?>
</span><?php 
                }
                ?>
								<br><?php 
                echo xt_trim_text(wp_kses_post($comment->comment_content));
                ?>
.
							</a> 
							
						</h6>
					</div>
				</li>
				<?php 
            }
            ?>
			</ul>

			<?php 
            echo $after_widget;
        } else {
            __("No comments yet!", XT_TEXT_DOMAIN);
        }
    }