Skip to content
This repository was archived by the owner on Oct 17, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions whiteboard/comments.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@
<?php endif; ?>
<?php endif; ?>

<?php $i++; ?> <!-- variable for alternating comment styles -->
<?php $i=0; ?> <!-- variable for alternating comment styles -->
<?php if($comments) : ?>
<h3><?php comments_number('No comments', 'One comment', '% comments'); ?></h3>
<ol>
<?php foreach($comments as $comment) : ?>
<?php $i++; ?>
<?php $comment_type = get_comment_type(); ?> <!-- checks for comment type -->
<?php if($comment_type == 'comment') { ?> <!-- outputs only comments -->
<li id="comment-<?php comment_ID(); ?>" class="comment <?php if($i&1) { echo 'odd';} else {echo 'even';} ?> <?php $user_info = get_userdata(1); if ($user_info->ID == $comment->user_id) echo 'authorComment'; ?> <?php if ($comment->user_id > 0) echo 'user-comment'; ?>">
Expand Down Expand Up @@ -89,4 +90,4 @@
<p><?php _e('The comments are closed.'); ?></p>
<?php endif; ?>
</div><!--#commentsForm-->
</div><!--#comments-->
</div><!--#comments-->
11 changes: 7 additions & 4 deletions whiteboard/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ function cwc_rss_post_thumbnail($content) {
}

// custom background support
add_custom_background();
add_theme_support('custom-background');

// custom header image support
define('NO_HEADER_TEXT', true );
Expand All @@ -79,7 +79,9 @@ function admin_header_style() {
}
</style><?php
}
add_custom_image_header( '', 'admin_header_style' );
add_theme_support('custom-header', array(
'admin-head-callback' => 'admin_header_style'
));

// adds Post Format support
// learn more: http://codex.wordpress.org/Post_Formats
Expand All @@ -100,7 +102,8 @@ function wb_remove_version() {
function comment_count( $count ) {
if ( ! is_admin() ) {
global $id;
$comments_by_type = &separate_comments(get_comments('status=approve&post_id=' . $id));
$comments = get_comments('status=approve&postid=' . $id);
$comments_by_type = separate_comments($comments);
return count($comments_by_type['comment']);
} else {
return $count;
Expand Down Expand Up @@ -202,4 +205,4 @@ function lgap_main_page() {
';
}
// end LifeGuard Assistant
?>
?>