Ejemplo n.º 1
0
    function ipin_list_comments($comment, $args, $depth)
    {
        global $wp_rewrite;
        $GLOBALS['comment'] = $comment;
        ?>
	<li <?php 
        comment_class();
        ?>
 id="comment-<?php 
        comment_ID();
        ?>
">

		<?php 
        $comment_author = get_user_by('id', $comment->user_id);
        ?>
		<div class="comment-avatar">
			<?php 
        if ($comment_author) {
            ?>
			<a href="<?php 
            echo home_url('/' . $wp_rewrite->author_base . '/') . $comment_author->user_nicename;
            ?>
/">
			<?php 
        }
        ?>
				<?php 
        echo get_avatar($comment->user_id, '48');
        ?>
			<?php 
        if ($comment_author) {
            ?>
			</a>
			<?php 
        }
        ?>
		</div>

		<div class="pull-right<?php 
        if (!is_user_logged_in()) {
            echo ' hide';
        }
        ?>
"><?php 
        comment_reply_link(array('reply_text' => __('Reply', 'ipin'), 'login_text' => __('Reply', 'ipin'), 'depth' => $depth, 'max_depth' => $args['max_depth']));
        ?>
</div>

		<div class="comment-content">

			<strong><span <?php 
        comment_class();
        ?>
>
			<?php 
        if ($comment_author) {
            ?>
			<a class="url" href="<?php 
            echo home_url('/' . $wp_rewrite->author_base . '/') . $comment_author->user_nicename;
            ?>
/">
			<?php 
        }
        ?>
				<?php 
        echo $comment->comment_author;
        ?>
			<?php 
        if ($comment_author) {
            ?>
			</a>
			<?php 
        }
        ?>
			</span></strong> 
			<span class="text-muted">&#8226; <?php 
        echo ipin_human_time_diff(mysql2date('U', get_gmt_from_date(get_comment_date('Y-m-d H:i:s'))));
        ?>
</span> <a href="#comment-<?php 
        comment_ID();
        ?>
" title="<?php 
        esc_attr_e('Comment Permalink', 'ipin');
        ?>
">#</a> <?php 
        edit_comment_link('e', '', '');
        ?>
			<?php 
        if ($comment->comment_approved == '0') {
            ?>
			<br /><em><?php 
            _e('Your comment is awaiting moderation.', 'ipin');
            ?>
</em>
			<?php 
        }
        ?>
			
			<?php 
        comment_text();
        ?>
		</div>
	<?php 
    }
Ejemplo n.º 2
0
    echo home_url('/' . $wp_rewrite->author_base . '/') . get_the_author_meta('user_nicename');
    ?>
/">
                    <div class="post-top-wrapper-author"><?php 
    echo get_the_author_meta('display_name');
    ?>
</div>
                </a>
                <?php 
    $original_post_id = get_post_meta($post->ID, "_Original Post ID", true);
    if ($original_post_id != '' && $original_post_id != 'deleted') {
        _e('Repinned', 'ipin');
    } else {
        _e('Pinned', 'ipin');
    }
    echo ' ' . ipin_human_time_diff(get_post_time('U', true));
    ?>
            </div>
        </div>

        <?php 
    $imgsrc = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'full');
    $imgsrc_full = $imgsrc[0];
    //exclude animated gif
    if (substr($imgsrc[0], -3) != 'gif' && intval($imgsrc[1]) > 520) {
        $imgsrc = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'large');
    }
    if ($imgsrc[0] == '') {
        $imgsrc[0] = get_template_directory_uri() . '/img/blank.gif';
    }
    ?>
Ejemplo n.º 3
0
							<h1><?php 
    the_title();
    ?>
</h1>
						</div>
						
						<div class="post-meta-top">
							<div class="pull-right"><a href="#navigation"><?php 
    comments_number(__('0 Comments', 'ipin'), __('1 Comment', 'ipin'), __('% Comments', ' ipin'));
    ?>
</a><?php 
    edit_post_link(__('Edit', 'ipin'), ' | ');
    ?>
</div>
							<div class="pull-left"><?php 
    echo ipin_human_time_diff(get_post_time('U', true)) . ' / ';
    the_author();
    ?>
</div>
						</div>		

						<div class="post-content">
							<?php 
    if (has_post_thumbnail()) {
        the_post_thumbnail();
    }
    the_content();
    wp_link_pages(array('before' => '<p><strong>' . __('Pages:', 'ipin') . '</strong>', 'after' => '</p>'));
    ?>
							
							<div class="clearfix"></div>
Ejemplo n.º 4
0
            case "repin":
                _e('repinned your', 'ipin');
                echo ' <a href="' . get_permalink($notification->notification_post_id) . '">' . __('pin', 'ipin') . '</a>';
                break;
            case "following":
                _e('is following you', 'ipin');
                break;
            case "comment":
                _e('commented on your', 'ipin');
                echo ' <a href="' . get_permalink($notification->notification_post_id) . '">' . __('pin', 'ipin') . '</a>';
                break;
        }
        ?>
							<br />
							<?php 
        echo ipin_human_time_diff(strtotime($notification->notification_date), current_time('timestamp'));
        ?>
						</td>
						<td class="notifications_post_id"><a href="<?php 
        echo get_permalink($notification->notification_post_id);
        ?>
"><?php 
        echo get_the_post_thumbnail($notification->notification_post_id, 'thumbnail');
        ?>
</a></td>
					</tr>
				<?php 
    }
}
?>
			</table>