Ejemplo n.º 1
0
function comments()
{
    if (has_comments() === false) {
        return false;
    }
    $items = IoC::resolve('comments');
    if ($result = $items->valid()) {
        // register single comment
        IoC::instance('comment', $items->current(), true);
        // move to next
        $items->next();
    }
    return $result;
}
Ejemplo n.º 2
0
function comments()
{
    if (!has_comments()) {
        return false;
    }
    $comments = Registry::get('comments');
    if ($result = $comments->valid()) {
        // register single comment
        Registry::set('comment', $comments->current());
        // move to next
        $comments->next();
    }
    return $result;
}
			</article>
		</section>

	</div>




		<!-- Comments are closed but keeping code just in case -->
		<!--
		<?php 
if (comments_open()) {
    ?>
		<section class="comments">
			<?php 
    if (has_comments()) {
        ?>
			<ul class="commentlist">
				<?php 
        $i = 0;
        while (comments()) {
            $i++;
            ?>
				<li class="comment" id="comment-<?php 
            echo comment_id();
            ?>
">
					<div class="wrap">
						<h2><?php 
            echo comment_name();
            ?>
Ejemplo n.º 4
0
<?php

if (comments_open() and has_comments()) {
    ?>
    <?php 
    while (comments()) {
        ?>
        <div class="post-comment">
            <p class="comment"><?php 
        echo comment_text();
        ?>
</p><br />
                <i style="font-size: 15px;"><?php 
        echo comment_date();
        ?>
 - <?php 
        echo comment_name();
        ?>
</i></p>
            <hr />
        </div>
    <?php 
    }
}
?>
<div id="respond">
<br />
<?php 
if (comments_open()) {
    ?>
        <h3>Leave a comment</h3>
Ejemplo n.º 5
0
                            <p><?php 
            echo comment_text();
            ?>
</p>
                        </section>
                    </article>
                <?php 
        }
        ?>
            </section>
        <?php 
    }
    ?>

        <header class="anchor-article__title <?php 
    echo has_comments() ? 'anchor-article__title--short' : '';
    ?>
 mdl-card__title">
            <h2 class="mdl-card__title-text">
                Add a comment
            </h2>
        </header>

        <!-- Comments -->
        <section class="anchor-article__content mdl-card__supporting-text mdl-typography--text-justify">
            <div class="mdl-color-text--accent"><?php 
    echo comment_form_notifications();
    ?>
</div>

            <!-- Add comment -->