function column_author_info($item)
 {
     //Build row actions
     $default = '';
     $photo = trav_get_avatar(array('id' => $item['user_id'], 'email' => $item['reviewer_email'], 'size' => 32));
     $str = '';
     $str = $photo;
     $str .= '<span class="author-detail">' . $item['reviewer_name'] . '<br />';
     $str .= '<a href="mailto:' . sanitize_email($item['reviewer_email']) . '">' . $item['reviewer_email'] . '</a><br />';
     $str .= '<a href="edit.php?post_type=accommodation&amp;page=reviews&amp;reviewer_ip=' . esc_url($item['reviewer_ip']) . '">' . $item['reviewer_ip'] . '</a></span>';
     return $str;
 }
Exemple #2
0
</span><i class="soap-icon-longarrow-right"></i></a></div>
									<?php 
        }
        ?>
								</div>
							</div>
							<div class="about-author block">
								<h2><?php 
        _e('About Author', 'trav');
        ?>
</h2>
								<div class="about-author-container">
									<div class="about-author-content">
										<div class="avatar">
											<?php 
        echo trav_get_avatar(array('id' => get_the_author_meta('ID'), 'email' => get_the_author_meta('email'), 'size' => 96));
        ?>
										</div>
										<div class="description">
											<h4><?php 
        the_author_posts_link();
        ?>
</h4>
											<p><?php 
        the_author_meta("description");
        ?>
</p>
										</div>
									</div>
									<div class="about-author-meta clearfix">
										<ul class="social-icons">
Exemple #3
0
    function trav_comment($comment, $args, $depth)
    {
        $GLOBALS['comment'] = $comment;
        ?>
		<li <?php 
        comment_class();
        ?>
 id="comment-<?php 
        comment_ID();
        ?>
">
			<div class="the-comment clearfix">
				<div class="avatar">
					<?php 
        echo trav_get_avatar(array('id' => $comment->user_id, 'email' => $comment->comment_author_email, 'size' => 72));
        ?>
				</div>
				<div class="comment-box">
					<div class="comment-author">
						<?php 
        $comment_reply_link = get_comment_reply_link(array_merge($args, array('reply_text' => __('REPLY', 'trav'), 'depth' => $depth)));
        $comment_reply_link = str_replace("class='comment-reply-link", "class='comment-reply-link button btn-mini pull-right", $comment_reply_link);
        echo $comment_reply_link;
        ?>
						<h4 class="box-title"><?php 
        echo get_comment_author_link();
        ?>
<small><?php 
        comment_date();
        ?>
</small></h4>
					</div>
					<div class="comment-text">
						<p><?php 
        comment_text();
        ?>
</p>
					</div>
				</div>
			</div>
		</li>
	<?php 
    }
Exemple #4
0
<?php

$user_id = get_current_user_id();
$user_info = trav_get_current_user_info();
$photo = trav_get_avatar(array('id' => $user_id, 'email' => $user_info['email'], 'size' => 270));
$_countries = trav_get_all_countries();
?>
<div class="view-profile">
	<article class="image-box style2 box innerstyle personal-details">
		<figure>
			<a title="" href="#"><?php 
echo wp_kses_post($photo);
?>
</a>
		</figure>
		<div class="details">
			<a href="#" class="button btn-mini pull-right edit-profile-btn"><?php 
echo __('EDIT PROFILE', 'trav');
?>
</a>
			<h2 class="box-title fullname"><?php 
echo esc_html($user_info['display_name']);
?>
</h2>
			<dl class="term-description">
				<?php 
if (!empty($user_info['login'])) {
    ?>
<dt><?php 
    echo __('user name', 'trav');
    ?>
Exemple #5
0
        function widget($args, $instance)
        {
            global $data, $post;
            extract($args);
            $posts = $instance['posts'];
            $comments = $instance['comments'];
            $tags_count = $instance['tags'];
            $show_popular_posts = isset($instance['show_popular_posts']) ? 'true' : 'false';
            $show_recent_posts = isset($instance['show_recent_posts']) ? 'true' : 'false';
            $show_comments = isset($instance['show_comments']) ? 'true' : 'false';
            $show_tags = isset($instance['show_tags']) ? 'true' : 'false';
            $orderby = $instance['orderby'];
            if (!$orderby) {
                $orderby = 'Highest Comments';
            }
            echo wp_kses_post($before_widget);
            ?>
		<div class="tab-container box">
			<ul class="tabs full-width">
				<?php 
            if ($show_recent_posts == 'true') {
                ?>
				<li class="active"><a data-toggle="tab" href="#recent-posts"><?php 
                echo __('Recent', 'trav');
                ?>
</a></li>
				<?php 
            }
            ?>
				<?php 
            if ($show_popular_posts == 'true') {
                ?>
				<li><a data-toggle="tab" href="#popular-posts"><?php 
                echo __('Popular', 'trav');
                ?>
</a></li>
				<?php 
            }
            ?>
				<?php 
            if ($show_comments == 'true') {
                ?>
				<li><a data-toggle="tab" href="#new-comments"><?php 
                echo __('Comment', 'trav');
                ?>
</a></li>
				<?php 
            }
            ?>
			</ul>
			<div class="tab-content">
				<?php 
            if ($show_recent_posts == 'true') {
                ?>
				<div id="recent-posts" class="tab-pane fade in active">
					<?php 
                $recent_posts = new WP_Query('posts_per_page=' . $tags_count);
                if ($recent_posts->have_posts()) {
                    ?>
						<div class="image-box style14">
							<?php 
                    while ($recent_posts->have_posts()) {
                        $recent_posts->the_post();
                        ?>
							<article class="box">
								<?php 
                        if (has_post_thumbnail()) {
                            ?>
								<figure><a href="<?php 
                            the_permalink();
                            ?>
"><?php 
                            the_post_thumbnail('widget-thumb');
                            ?>
</a></figure>
								<?php 
                        }
                        ?>
								<div class="details">
									<h5 class="box-title"><a href="<?php 
                        the_permalink();
                        ?>
"><?php 
                        the_title();
                        ?>
</a></h5>
								</div>
							</article>
							<?php 
                    }
                    ?>
						</div>
					<?php 
                }
                ?>
					<?php 
                wp_reset_postdata();
                ?>
				</div>
				<?php 
            }
            ?>
				<?php 
            if ($show_popular_posts == 'true') {
                ?>
				<div id="popular-posts" class="tab-pane fade">
					<?php 
                if ($orderby == 'Highest Comments') {
                    $order_string = '&orderby=comment_count';
                } else {
                    $order_string = '&meta_key=trav_count_post_views&orderby=meta_value_num';
                }
                $popular_posts = new WP_Query('posts_per_page=' . $posts . $order_string . '&order=DESC');
                if ($popular_posts->have_posts()) {
                    ?>
						<div class="image-box style14">
							<?php 
                    while ($popular_posts->have_posts()) {
                        $popular_posts->the_post();
                        ?>
							<article class="box">
								<?php 
                        if (has_post_thumbnail()) {
                            ?>
								<figure><a href="<?php 
                            the_permalink();
                            ?>
"><?php 
                            the_post_thumbnail('widget-thumb');
                            ?>
</a></figure>
								<?php 
                        }
                        ?>
								<div class="details">
									<h5 class="box-title"><a href="<?php 
                        the_permalink();
                        ?>
"><?php 
                        the_title();
                        ?>
</a></h5>
								</div>
							</article>
							<?php 
                    }
                    ?>
						</div>
					<?php 
                }
                ?>
					<?php 
                wp_reset_postdata();
                ?>
				</div>
				<?php 
            }
            ?>
				<?php 
            if ($show_comments == 'true') {
                ?>
				<div id="new-comments" class="tab-pane fade">
					<?php 
                $number = $instance['comments'];
                global $wpdb;
                $recent_comments = "SELECT DISTINCT ID, post_title, post_password, comment_ID, comment_post_ID, comment_author, comment_author_email, comment_date_gmt, comment_approved, comment_type, comment_author_url, user_id, SUBSTRING(comment_content,1,110) AS com_excerpt FROM {$wpdb->comments} LEFT OUTER JOIN {$wpdb->posts} ON ({$wpdb->comments}.comment_post_ID = {$wpdb->posts}.ID) WHERE comment_approved = '1' AND comment_type = '' AND post_password = '' ORDER BY comment_date_gmt DESC LIMIT {$number}";
                $the_comments = $wpdb->get_results($recent_comments);
                if (!empty($the_comments)) {
                    ?>
						<div class="image-box style14">
						<?php 
                    foreach ($the_comments as $comment) {
                        ?>
							<article class="box">
								<figure><a>
									<?php 
                        echo trav_get_avatar(array('id' => $comment->user_id, 'email' => $comment->comment_author_email, 'size' => 52));
                        ?>
								</a></figure>
								<div class="details">
									<p><?php 
                        echo esc_html(strip_tags($comment->comment_author));
                        ?>
 <?php 
                        _e('says', 'trav');
                        ?>
:</p>
									<h5 class="box-title">
										<a href="<?php 
                        echo esc_url(get_permalink($comment->ID) . '#comment-' . $comment->comment_ID);
                        ?>
" title="<?php 
                        echo esc_attr(strip_tags($comment->comment_author));
                        ?>
 on <?php 
                        echo esc_attr($comment->post_title);
                        ?>
"><?php 
                        echo trav_string_limit_words(strip_tags($comment->com_excerpt), 12);
                        ?>
...</a>
									</h5>
								</div>
							</article>
						<?php 
                    }
                    ?>
						</div>
					<?php 
                }
                ?>
				</div>
				<?php 
            }
            ?>
			</div>
		</div>
		<?php 
            echo wp_kses_post($after_widget);
        }