-
Notifications
You must be signed in to change notification settings - Fork 0
/
functions.php
52 lines (43 loc) · 2.03 KB
/
functions.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?php
if ( ! isset( $content_width ) ) {
$content_width = 630;
}
if ( function_exists('register_sidebar') )
register_sidebar();
add_action( 'after_setup_theme', 'ghostwriter_setup' );
function ghostwriter_setup() {
// Add default posts and comments RSS feed links to head
add_theme_support( 'automatic-feed-links' );
}
add_filter('avatar_defaults', 'ghostwriter_gravatar');
function ghostwriter_gravatar($avatar_defaults) {
$myavatar = get_template_directory_uri() . '/images/avatar.gif';
$avatar_defaults[$myavatar] = "Ghostwriter";
return $avatar_defaults;
}
add_filter('gallery_style', create_function('$css', 'return preg_replace("#img {(.*?)}#s", "img {}", $css);'));
function ghostwriter_comment($comment, $args, $depth) {
$GLOBALS['comment'] = $comment; ?>
<li <?php comment_class(); ?> id="comment-<?php comment_ID() ?>">
<div id="div-comment-<?php comment_ID(); ?>">
<div class="commentleft">
<?php echo get_avatar(get_comment_author_email(), '48'); ?>
</div>
<div class="commentright">
<div class="commentmeta">
<span class="commentauthor"><?php comment_author_link() ?></span>
<small class="commentmetadata">
<a href="#comment-<?php comment_ID() ?>" title=""><?php comment_date('F jS, Y') ?></a> <?php edit_comment_link('edit',' ',''); ?>
</small>
</div>
<div class="commentcontent">
<?php if ($comment->comment_approved == '0') : ?>
<small><em>Your comment is awaiting moderation.</em></small><br />
<?php endif; ?>
<?php comment_text() ?>
<?php echo comment_reply_link(array('before' => '<div class="reply">', 'after' => '</div>', 'reply_text' => 'Reply to this comment', 'depth' => $depth, 'max_depth' => $args['max_depth'] )); ?>
</div>
</div>
</div>
<?php
}